@kmkf-fe-packages/services-components 0.7.15-alpha.57 → 0.7.15-alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/ActualPayment/index.d.ts +4 -4
- package/dist/esm/components/ActualPayment/index.js +22 -22
- package/dist/esm/components/BS/BsExchange/index.d.ts +14 -9
- package/dist/esm/components/BS/BsExchange/index.js +79 -74
- package/dist/esm/components/BS/BsReissue/index.d.ts +14 -7
- package/dist/esm/components/BS/BsReissue/index.js +39 -29
- package/dist/esm/components/BS/common/BsType.d.ts +3 -2
- package/dist/esm/components/BS/common/BsType.js +8 -2
- package/dist/esm/components/TradeDateTime/index.d.ts +1 -9
- package/dist/esm/components/TradeDateTime/index.js +6 -1
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class ActualPayment implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -10,8 +10,8 @@ declare class ActualPayment implements ComponentInterface {
|
|
|
10
10
|
formField: string;
|
|
11
11
|
canSort: boolean;
|
|
12
12
|
children: ComponentInterface[];
|
|
13
|
-
componentConfig: ComponentInterface[
|
|
14
|
-
dataType: ComponentInterface[
|
|
13
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
15
|
dataMap: Record;
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getKeyByComponentType: (type: string) => any;
|
|
@@ -9,17 +9,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
9
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
10
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
11
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
|
-
import React from
|
|
13
|
-
import { ApaasInput } from
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
-
import { isNull, filterFn as _filterFn } from
|
|
16
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
17
|
import { SYMBOL } from "../../constant";
|
|
18
18
|
var typeMap = {
|
|
19
|
-
ACTUAL_PAYMENT:
|
|
20
|
-
BS_NET_RECEIPTS:
|
|
21
|
-
BS_DEPOSIT:
|
|
22
|
-
BS_PACKAGE_WEIGHT:
|
|
19
|
+
ACTUAL_PAYMENT: 'actualPayment',
|
|
20
|
+
BS_NET_RECEIPTS: 'bsNetReceipts',
|
|
21
|
+
BS_DEPOSIT: 'bsDeposit',
|
|
22
|
+
BS_PACKAGE_WEIGHT: 'bsPackageWeight'
|
|
23
23
|
};
|
|
24
24
|
var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
25
25
|
var _this = this;
|
|
@@ -37,7 +37,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
37
37
|
_defineProperty(this, "dataType", void 0);
|
|
38
38
|
_defineProperty(this, "dataMap", void 0);
|
|
39
39
|
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
40
|
-
return typeMap[type] ||
|
|
40
|
+
return typeMap[type] || '';
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderClient", function (record) {
|
|
43
43
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -49,7 +49,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
49
49
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
50
50
|
var _record;
|
|
51
51
|
var type = _this.type;
|
|
52
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record :
|
|
52
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
|
|
53
53
|
});
|
|
54
54
|
_defineProperty(this, "renderLog", function (r) {
|
|
55
55
|
var type = _this.type;
|
|
@@ -63,7 +63,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
63
63
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
64
64
|
var _record2;
|
|
65
65
|
var type = _this.type;
|
|
66
|
-
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 :
|
|
66
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
67
67
|
});
|
|
68
68
|
_defineProperty(this, "editRender", function (p) {
|
|
69
69
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -87,7 +87,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
87
87
|
// 过滤组件id
|
|
88
88
|
name: item.name,
|
|
89
89
|
// 过滤组件名称
|
|
90
|
-
filterComponentType:
|
|
90
|
+
filterComponentType: 'Rate',
|
|
91
91
|
rules: [{
|
|
92
92
|
validator: function () {
|
|
93
93
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
@@ -112,13 +112,13 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
112
112
|
_context.next = 5;
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
|
-
return _context.abrupt("return", Promise.reject(new Error(
|
|
115
|
+
return _context.abrupt("return", Promise.reject(new Error('请输入正确的金额区间范围')));
|
|
116
116
|
case 5:
|
|
117
117
|
if (!(value[0] > value[1])) {
|
|
118
118
|
_context.next = 7;
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
|
-
return _context.abrupt("return", Promise.reject(new Error(
|
|
121
|
+
return _context.abrupt("return", Promise.reject(new Error('开始金额必须小于结束金额')));
|
|
122
122
|
case 7:
|
|
123
123
|
case "end":
|
|
124
124
|
return _context.stop();
|
|
@@ -132,7 +132,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
132
132
|
}()
|
|
133
133
|
}],
|
|
134
134
|
props: {
|
|
135
|
-
placeholder: ["
|
|
135
|
+
placeholder: ["\u59CB-".concat(item.name), "\u7EC8-".concat(item.name)]
|
|
136
136
|
},
|
|
137
137
|
formatFilterValue: function formatFilterValue(val) {
|
|
138
138
|
if (val !== null && val !== void 0 && val.some(function (v) {
|
|
@@ -154,23 +154,23 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
154
154
|
this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
|
|
155
155
|
this.name = options.name;
|
|
156
156
|
this.type = options.type;
|
|
157
|
-
this.dataType =
|
|
157
|
+
this.dataType = 'number';
|
|
158
158
|
this.isCombinationComponent = false;
|
|
159
159
|
this.canSort = true;
|
|
160
160
|
this.children = [];
|
|
161
161
|
this.componentConfig = options.componentConfig;
|
|
162
|
-
this.rules = options.type ===
|
|
162
|
+
this.rules = options.type === 'ACTUAL_PAYMENT' ? [{
|
|
163
163
|
pattern: /^\d+(\.\d{1,2})?$/,
|
|
164
|
-
message:
|
|
164
|
+
message: '字段为正数或最多两位小数'
|
|
165
165
|
}] : [{
|
|
166
166
|
pattern: /^(([0-9]*(\.[0-9]{1,})$)|([0-9]+$))/,
|
|
167
|
-
message:
|
|
167
|
+
message: '请输入数字'
|
|
168
168
|
}];
|
|
169
169
|
this.dataMap = {
|
|
170
|
-
ACTUAL_PAYMENT:
|
|
171
|
-
BS_NET_RECEIPTS:
|
|
172
|
-
BS_DEPOSIT:
|
|
173
|
-
BS_PACKAGE_WEIGHT:
|
|
170
|
+
ACTUAL_PAYMENT: 'actualPayment',
|
|
171
|
+
BS_NET_RECEIPTS: 'bsNetReceipts',
|
|
172
|
+
BS_DEPOSIT: 'bsDeposit',
|
|
173
|
+
BS_PACKAGE_WEIGHT: 'bsPackageWeight'
|
|
174
174
|
};
|
|
175
175
|
});
|
|
176
176
|
export default ActualPayment;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsType, BsMemo } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BsType, BsMemo } from '../common/index';
|
|
4
4
|
declare class BsExchange implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
11
|
+
effects: ComponentInterface['effects'];
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface['dataType'];
|
|
17
17
|
bsType: BsType;
|
|
18
18
|
bsMemo: BsMemo;
|
|
19
19
|
constructor(options: PickOption);
|
|
@@ -24,15 +24,20 @@ declare class BsExchange implements ComponentInterface {
|
|
|
24
24
|
renderExport: (value: any, record: any) => null;
|
|
25
25
|
editRender: (p: any) => React.JSX.Element;
|
|
26
26
|
filterConfig: (item: ColumnConfig) => ({
|
|
27
|
-
searchDefaultConditions: "
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
28
|
type: string;
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
filterComponentType: "Cascader";
|
|
32
32
|
props: {
|
|
33
33
|
options: any[] | undefined;
|
|
34
|
+
fieldNames: {
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
children: string;
|
|
38
|
+
};
|
|
34
39
|
};
|
|
35
|
-
|
|
40
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
36
41
|
} | {
|
|
37
42
|
searchDefaultConditions: "like";
|
|
38
43
|
type: string;
|
|
@@ -40,7 +45,7 @@ declare class BsExchange implements ComponentInterface {
|
|
|
40
45
|
name: string;
|
|
41
46
|
filterComponentType: "Input";
|
|
42
47
|
props?: undefined;
|
|
43
|
-
|
|
48
|
+
formatFilterValue?: undefined;
|
|
44
49
|
})[];
|
|
45
50
|
}
|
|
46
51
|
export default BsExchange;
|
|
@@ -14,138 +14,138 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
14
14
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
16
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
import React from
|
|
17
|
+
import React from 'react';
|
|
18
18
|
import GetFormItem from "../../GetFormItem";
|
|
19
19
|
import { BsGoodsTable, BsExchangeList } from "../../Common";
|
|
20
20
|
import ItemView from "../../../commonComponents/ItemView";
|
|
21
|
-
import { isNull
|
|
22
|
-
import { BsExchange as Exchange } from
|
|
21
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
22
|
+
import { BsExchange as Exchange } from '@kmkf-fe-packages/basic-components';
|
|
23
23
|
import { SYMBOL } from "../../../constant";
|
|
24
24
|
import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
25
25
|
var returnHeaderMap = {
|
|
26
26
|
pic: {
|
|
27
27
|
component: BsHeaderPic,
|
|
28
|
-
name:
|
|
29
|
-
key:
|
|
28
|
+
name: '退回图片',
|
|
29
|
+
key: 'pic'
|
|
30
30
|
},
|
|
31
31
|
name: {
|
|
32
32
|
component: BsHeaderName,
|
|
33
|
-
name:
|
|
34
|
-
key:
|
|
33
|
+
name: '退回名称',
|
|
34
|
+
key: 'name'
|
|
35
35
|
},
|
|
36
36
|
code: {
|
|
37
37
|
component: BsHeaderCode,
|
|
38
|
-
name:
|
|
39
|
-
key:
|
|
38
|
+
name: '退回编码',
|
|
39
|
+
key: 'code'
|
|
40
40
|
},
|
|
41
41
|
sku: {
|
|
42
42
|
component: BsHeaderSku,
|
|
43
|
-
name:
|
|
44
|
-
key:
|
|
43
|
+
name: '退回sku编码',
|
|
44
|
+
key: 'sku'
|
|
45
45
|
},
|
|
46
46
|
money: {
|
|
47
47
|
component: BsHeaderMoney,
|
|
48
|
-
name:
|
|
49
|
-
key:
|
|
48
|
+
name: '退回实付金额',
|
|
49
|
+
key: 'money'
|
|
50
50
|
},
|
|
51
51
|
number: {
|
|
52
52
|
component: BsHeaderNumber,
|
|
53
|
-
name:
|
|
54
|
-
key:
|
|
53
|
+
name: '退回数量',
|
|
54
|
+
key: 'number'
|
|
55
55
|
},
|
|
56
56
|
share: {
|
|
57
57
|
component: BsHeaderShare,
|
|
58
|
-
name:
|
|
59
|
-
key:
|
|
58
|
+
name: '退回分摊价',
|
|
59
|
+
key: 'share'
|
|
60
60
|
},
|
|
61
61
|
type: {
|
|
62
62
|
component: BsHeaderType,
|
|
63
|
-
name:
|
|
64
|
-
key:
|
|
63
|
+
name: '退回赠品类型',
|
|
64
|
+
key: 'giftType'
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
var swapOutHeaderMap = {
|
|
68
68
|
pic: {
|
|
69
69
|
component: BsHeaderPic,
|
|
70
|
-
name:
|
|
71
|
-
key:
|
|
70
|
+
name: '换出图片',
|
|
71
|
+
key: 'pic'
|
|
72
72
|
},
|
|
73
73
|
name: {
|
|
74
74
|
component: BsHeaderName,
|
|
75
|
-
name:
|
|
76
|
-
key:
|
|
75
|
+
name: '换出名称',
|
|
76
|
+
key: 'name'
|
|
77
77
|
},
|
|
78
78
|
code: {
|
|
79
79
|
component: BsHeaderCode,
|
|
80
|
-
name:
|
|
81
|
-
key:
|
|
80
|
+
name: '换出编码',
|
|
81
|
+
key: 'code'
|
|
82
82
|
},
|
|
83
83
|
sku: {
|
|
84
84
|
component: BsHeaderSku,
|
|
85
|
-
name:
|
|
86
|
-
key:
|
|
85
|
+
name: '换出sku编码',
|
|
86
|
+
key: 'sku'
|
|
87
87
|
},
|
|
88
88
|
money: {
|
|
89
89
|
component: BsHeaderMoney,
|
|
90
|
-
name:
|
|
91
|
-
key:
|
|
90
|
+
name: '换出实付金额',
|
|
91
|
+
key: 'money'
|
|
92
92
|
},
|
|
93
93
|
number: {
|
|
94
94
|
component: BsHeaderNumber,
|
|
95
|
-
name:
|
|
96
|
-
key:
|
|
95
|
+
name: '换出数量',
|
|
96
|
+
key: 'number'
|
|
97
97
|
},
|
|
98
98
|
share: {
|
|
99
99
|
component: BsHeaderShare,
|
|
100
|
-
name:
|
|
101
|
-
key:
|
|
100
|
+
name: '换出分摊价',
|
|
101
|
+
key: 'share'
|
|
102
102
|
},
|
|
103
103
|
type: {
|
|
104
104
|
component: BsHeaderType,
|
|
105
|
-
name:
|
|
106
|
-
key:
|
|
105
|
+
name: '换出赠品类型',
|
|
106
|
+
key: 'type'
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
var giftHeaderMap = {
|
|
110
110
|
pic: {
|
|
111
111
|
component: BsHeaderPic,
|
|
112
|
-
name:
|
|
113
|
-
key:
|
|
112
|
+
name: '赠品图片',
|
|
113
|
+
key: 'pic'
|
|
114
114
|
},
|
|
115
115
|
name: {
|
|
116
116
|
component: BsHeaderName,
|
|
117
|
-
name:
|
|
118
|
-
key:
|
|
117
|
+
name: '赠品名称',
|
|
118
|
+
key: 'name'
|
|
119
119
|
},
|
|
120
120
|
code: {
|
|
121
121
|
component: BsHeaderCode,
|
|
122
|
-
name:
|
|
123
|
-
key:
|
|
122
|
+
name: '赠品编码',
|
|
123
|
+
key: 'code'
|
|
124
124
|
},
|
|
125
125
|
sku: {
|
|
126
126
|
component: BsHeaderSku,
|
|
127
|
-
name:
|
|
128
|
-
key:
|
|
127
|
+
name: '赠品sku编码',
|
|
128
|
+
key: 'sku'
|
|
129
129
|
},
|
|
130
130
|
money: {
|
|
131
131
|
component: BsHeaderMoney,
|
|
132
|
-
name:
|
|
133
|
-
key:
|
|
132
|
+
name: '赠品实付金额',
|
|
133
|
+
key: 'money'
|
|
134
134
|
},
|
|
135
135
|
number: {
|
|
136
136
|
component: BsHeaderNumber,
|
|
137
|
-
name:
|
|
138
|
-
key:
|
|
137
|
+
name: '赠品数量',
|
|
138
|
+
key: 'number'
|
|
139
139
|
},
|
|
140
140
|
share: {
|
|
141
141
|
component: BsHeaderShare,
|
|
142
|
-
name:
|
|
143
|
-
key:
|
|
142
|
+
name: '赠品分摊价',
|
|
143
|
+
key: 'share'
|
|
144
144
|
},
|
|
145
145
|
type: {
|
|
146
146
|
component: BsHeaderType,
|
|
147
|
-
name:
|
|
148
|
-
key:
|
|
147
|
+
name: '赠品赠品类型',
|
|
148
|
+
key: 'giftType'
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
@@ -170,21 +170,21 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
170
170
|
_defineProperty(this, "bsMemo", void 0);
|
|
171
171
|
_defineProperty(this, "renderClient", function (record) {
|
|
172
172
|
var _record, _record$bsExchangeTyp, _this$componentConfig, _record2, _record2$bsExchangeTy, _this$componentConfig2, _record3, _record3$bsExchangeTy, _this$componentConfig3;
|
|
173
|
-
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), [
|
|
173
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), ['1', '3'].includes(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : (_record$bsExchangeTyp = _record.bsExchangeType) === null || _record$bsExchangeTyp === void 0 ? void 0 : _record$bsExchangeTyp[0]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
174
174
|
id: _this.id,
|
|
175
175
|
label: "".concat(_this.name),
|
|
176
176
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
177
177
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeReturnGoods) || [],
|
|
178
178
|
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
179
179
|
})
|
|
180
|
-
}) : null, [
|
|
180
|
+
}) : null, ['2', '4'].includes(record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : (_record2$bsExchangeTy = _record2.bsExchangeType) === null || _record2$bsExchangeTy === void 0 ? void 0 : _record2$bsExchangeTy[0]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
181
181
|
id: _this.id,
|
|
182
182
|
label: "".concat(_this.name),
|
|
183
183
|
value: /*#__PURE__*/React.createElement(BsExchangeList, {
|
|
184
184
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeSwapOutGoods) || [],
|
|
185
185
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
186
186
|
})
|
|
187
|
-
}) : null, [
|
|
187
|
+
}) : null, ['3', '4'].includes(record === null || record === void 0 ? void 0 : (_record3 = record["".concat(_this.id)]) === null || _record3 === void 0 ? void 0 : (_record3$bsExchangeTy = _record3.bsExchangeType) === null || _record3$bsExchangeTy === void 0 ? void 0 : _record3$bsExchangeTy[0]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
188
188
|
id: _this.id,
|
|
189
189
|
label: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
190
190
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
@@ -222,39 +222,44 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
222
222
|
});
|
|
223
223
|
});
|
|
224
224
|
_defineProperty(this, "filterConfig", function (item) {
|
|
225
|
-
var _item$
|
|
225
|
+
var _item$templateConfig;
|
|
226
226
|
return [{
|
|
227
|
-
searchDefaultConditions: SYMBOL.
|
|
227
|
+
searchDefaultConditions: SYMBOL.in,
|
|
228
228
|
type: item.type,
|
|
229
|
-
id: "".concat(item.id, "
|
|
229
|
+
id: "".concat(item.id, "_bsExchangeType"),
|
|
230
230
|
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
231
|
-
filterComponentType:
|
|
231
|
+
filterComponentType: 'Cascader',
|
|
232
232
|
props: {
|
|
233
|
-
options: item === null || item === void 0 ? void 0 : (_item$
|
|
233
|
+
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
234
|
+
fieldNames: {
|
|
235
|
+
label: 'label',
|
|
236
|
+
value: 'value',
|
|
237
|
+
children: 'children'
|
|
238
|
+
}
|
|
234
239
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return
|
|
238
|
-
}
|
|
240
|
+
formatFilterValue: function formatFilterValue(val) {
|
|
241
|
+
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
242
|
+
return [val[val.length - 1]];
|
|
243
|
+
}
|
|
239
244
|
}
|
|
240
245
|
}, {
|
|
241
246
|
searchDefaultConditions: SYMBOL.like,
|
|
242
247
|
type: item.type,
|
|
243
248
|
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
244
249
|
name: "".concat(_this.name, "-\u9000\u56DE"),
|
|
245
|
-
filterComponentType:
|
|
250
|
+
filterComponentType: 'Input'
|
|
246
251
|
}, {
|
|
247
252
|
searchDefaultConditions: SYMBOL.like,
|
|
248
253
|
type: item.type,
|
|
249
254
|
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
250
255
|
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
251
|
-
filterComponentType:
|
|
256
|
+
filterComponentType: 'Input'
|
|
252
257
|
}, {
|
|
253
258
|
searchDefaultConditions: SYMBOL.like,
|
|
254
259
|
type: item.type,
|
|
255
260
|
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
256
261
|
name: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
257
|
-
filterComponentType:
|
|
262
|
+
filterComponentType: 'Input'
|
|
258
263
|
}];
|
|
259
264
|
});
|
|
260
265
|
this.name = options.name;
|
|
@@ -267,11 +272,11 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
267
272
|
this.canSort = false;
|
|
268
273
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
269
274
|
id: "".concat(options.id, "_bsExchangeType_type"),
|
|
270
|
-
name:
|
|
275
|
+
name: '换货类型'
|
|
271
276
|
}));
|
|
272
277
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
273
278
|
id: "".concat(options.id, "_bsExchangeType_memo"),
|
|
274
|
-
name:
|
|
279
|
+
name: '换货备注'
|
|
275
280
|
}));
|
|
276
281
|
this.children = [this.bsType, this.bsMemo].concat(_toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
|
|
277
282
|
if (returnHeaderMap[next]) {
|
|
@@ -303,19 +308,19 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
303
308
|
validator: function validator(_, value) {
|
|
304
309
|
var _this$componentConfig5, _value$bsExchangeRetu;
|
|
305
310
|
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
306
|
-
return Promise.reject(new Error(
|
|
311
|
+
return Promise.reject(new Error('请选择bs换货商品'));
|
|
307
312
|
}
|
|
308
313
|
return Promise.resolve();
|
|
309
314
|
}
|
|
310
315
|
}, {
|
|
311
316
|
validator: function validator(_, value) {
|
|
312
317
|
var _value$bsExchangeType;
|
|
313
|
-
if (value && [
|
|
318
|
+
if (value && ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
|
|
314
319
|
var hasNoGood = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
315
320
|
return !(item !== null && item !== void 0 && item.bsExchangeReturnGoods.length);
|
|
316
321
|
});
|
|
317
322
|
if (hasNoGood) {
|
|
318
|
-
return Promise.reject(new Error(
|
|
323
|
+
return Promise.reject(new Error('请选择退回商品后再提交工单'));
|
|
319
324
|
}
|
|
320
325
|
var hasMore = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
321
326
|
var returnMoney = ((item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || []).reduce(function (prv, next) {
|
|
@@ -329,18 +334,18 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
329
334
|
return returnMoney < swapOutMoney;
|
|
330
335
|
});
|
|
331
336
|
if (hasMore) {
|
|
332
|
-
return Promise.reject(new Error(
|
|
337
|
+
return Promise.reject(new Error('换货商品的金额不能大于退回商品的金额'));
|
|
333
338
|
}
|
|
334
339
|
var hasLen = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
335
340
|
return (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods.length) !== (item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods.length);
|
|
336
341
|
});
|
|
337
342
|
if (hasLen) {
|
|
338
|
-
return Promise.reject(new Error(
|
|
343
|
+
return Promise.reject(new Error('请核对商品数据,再提交工单'));
|
|
339
344
|
}
|
|
340
345
|
}
|
|
341
346
|
return Promise.resolve();
|
|
342
347
|
}
|
|
343
348
|
}];
|
|
344
|
-
this.dataType =
|
|
349
|
+
this.dataType = 'object';
|
|
345
350
|
});
|
|
346
351
|
export default BsExchange;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsType, BsMemo } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BsType, BsMemo } from '../common/index';
|
|
4
4
|
declare class BsReissue implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
11
|
+
effects: ComponentInterface['effects'];
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface['dataType'];
|
|
17
17
|
bsType: BsType;
|
|
18
18
|
bsMemo: BsMemo;
|
|
19
19
|
constructor(options: PickOption);
|
|
@@ -24,14 +24,20 @@ declare class BsReissue implements ComponentInterface {
|
|
|
24
24
|
renderExport: () => null;
|
|
25
25
|
editRender: (p: any) => React.JSX.Element;
|
|
26
26
|
filterConfig: (item: ColumnConfig) => ({
|
|
27
|
-
searchDefaultConditions: "
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
28
|
type: string;
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
filterComponentType: "Cascader";
|
|
32
32
|
props: {
|
|
33
33
|
options: any[] | undefined;
|
|
34
|
+
fieldNames: {
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
children: string;
|
|
38
|
+
};
|
|
34
39
|
};
|
|
40
|
+
formatFilterValue: (val: Array<string>) => string[] | undefined;
|
|
35
41
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
36
42
|
} | {
|
|
37
43
|
searchDefaultConditions: "like";
|
|
@@ -40,6 +46,7 @@ declare class BsReissue implements ComponentInterface {
|
|
|
40
46
|
name: string;
|
|
41
47
|
filterComponentType: "Input";
|
|
42
48
|
props?: undefined;
|
|
49
|
+
formatFilterValue?: undefined;
|
|
43
50
|
filterFn?: undefined;
|
|
44
51
|
})[];
|
|
45
52
|
}
|
|
@@ -14,54 +14,54 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
14
14
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
16
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
import React from
|
|
17
|
+
import React from 'react';
|
|
18
18
|
import GetFormItem from "../../GetFormItem";
|
|
19
19
|
import ItemView from "../../../commonComponents/ItemView";
|
|
20
|
-
import { isNull, filterFn as _filterFn } from
|
|
21
|
-
import { BsReissue as Reissue } from
|
|
20
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
21
|
+
import { BsReissue as Reissue } from '@kmkf-fe-packages/basic-components';
|
|
22
22
|
import { SYMBOL } from "../../../constant";
|
|
23
23
|
import { BsGoodsTable } from "../../Common";
|
|
24
24
|
import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
25
25
|
var childHeaderMap = {
|
|
26
26
|
pic: {
|
|
27
27
|
component: BsHeaderPic,
|
|
28
|
-
name:
|
|
29
|
-
key:
|
|
28
|
+
name: '图片',
|
|
29
|
+
key: 'pic'
|
|
30
30
|
},
|
|
31
31
|
name: {
|
|
32
32
|
component: BsHeaderName,
|
|
33
|
-
name:
|
|
34
|
-
key:
|
|
33
|
+
name: '名称',
|
|
34
|
+
key: 'name'
|
|
35
35
|
},
|
|
36
36
|
code: {
|
|
37
37
|
component: BsHeaderCode,
|
|
38
|
-
name:
|
|
39
|
-
key:
|
|
38
|
+
name: '编码',
|
|
39
|
+
key: 'code'
|
|
40
40
|
},
|
|
41
41
|
sku: {
|
|
42
42
|
component: BsHeaderSku,
|
|
43
|
-
name:
|
|
44
|
-
key:
|
|
43
|
+
name: 'sku编码',
|
|
44
|
+
key: 'sku'
|
|
45
45
|
},
|
|
46
46
|
money: {
|
|
47
47
|
component: BsHeaderMoney,
|
|
48
|
-
name:
|
|
49
|
-
key:
|
|
48
|
+
name: '实付金额',
|
|
49
|
+
key: 'money'
|
|
50
50
|
},
|
|
51
51
|
number: {
|
|
52
52
|
component: BsHeaderNumber,
|
|
53
|
-
name:
|
|
54
|
-
key:
|
|
53
|
+
name: '数量',
|
|
54
|
+
key: 'number'
|
|
55
55
|
},
|
|
56
56
|
share: {
|
|
57
57
|
component: BsHeaderShare,
|
|
58
|
-
name:
|
|
59
|
-
key:
|
|
58
|
+
name: '分摊价',
|
|
59
|
+
key: 'share'
|
|
60
60
|
},
|
|
61
61
|
type: {
|
|
62
62
|
component: BsHeaderType,
|
|
63
|
-
name:
|
|
64
|
-
key:
|
|
63
|
+
name: '赠品类型',
|
|
64
|
+
key: 'giftType'
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
@@ -85,7 +85,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
85
85
|
_defineProperty(this, "bsMemo", void 0);
|
|
86
86
|
_defineProperty(this, "renderClient", function (record) {
|
|
87
87
|
var _this$componentConfig;
|
|
88
|
-
console.log(
|
|
88
|
+
console.log('bsreissue', record);
|
|
89
89
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), /*#__PURE__*/React.createElement(ItemView, {
|
|
90
90
|
id: _this.id,
|
|
91
91
|
label: _this.name,
|
|
@@ -124,15 +124,25 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
_defineProperty(this, "filterConfig", function (item) {
|
|
127
|
-
var _item$
|
|
127
|
+
var _item$templateConfig;
|
|
128
128
|
return [{
|
|
129
|
-
searchDefaultConditions: SYMBOL.
|
|
129
|
+
searchDefaultConditions: SYMBOL.in,
|
|
130
130
|
type: item.type,
|
|
131
131
|
id: "".concat(item.id, "_bsReissueType"),
|
|
132
132
|
name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
|
|
133
|
-
filterComponentType:
|
|
133
|
+
filterComponentType: 'Cascader',
|
|
134
134
|
props: {
|
|
135
|
-
options: item === null || item === void 0 ? void 0 : (_item$
|
|
135
|
+
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
136
|
+
fieldNames: {
|
|
137
|
+
label: 'label',
|
|
138
|
+
value: 'value',
|
|
139
|
+
children: 'children'
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
formatFilterValue: function formatFilterValue(val) {
|
|
143
|
+
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
144
|
+
return [val[val.length - 1]];
|
|
145
|
+
}
|
|
136
146
|
},
|
|
137
147
|
filterFn: function filterFn(value) {
|
|
138
148
|
return function (i) {
|
|
@@ -144,7 +154,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
144
154
|
type: item.type,
|
|
145
155
|
id: "".concat(item.id, "_bsReissueGoods"),
|
|
146
156
|
name: "".concat(_this.name),
|
|
147
|
-
filterComponentType:
|
|
157
|
+
filterComponentType: 'Input'
|
|
148
158
|
}];
|
|
149
159
|
});
|
|
150
160
|
this.name = options.name;
|
|
@@ -157,11 +167,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
157
167
|
this.canSort = false;
|
|
158
168
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
159
169
|
id: "".concat(options.id, "_bsReissueType_type"),
|
|
160
|
-
name:
|
|
170
|
+
name: '补发类型'
|
|
161
171
|
}));
|
|
162
172
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
163
173
|
id: "".concat(options.id, "_bsReissueType_memo"),
|
|
164
|
-
name:
|
|
174
|
+
name: '补发备注'
|
|
165
175
|
}));
|
|
166
176
|
this.children = [this.bsType, this.bsMemo].concat(_toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
|
|
167
177
|
if (childHeaderMap[next]) {
|
|
@@ -178,11 +188,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
178
188
|
validator: function validator(_, value) {
|
|
179
189
|
var _value$bsReissueGoods;
|
|
180
190
|
if (!value || !(value !== null && value !== void 0 && (_value$bsReissueGoods = value.bsReissueGoods) !== null && _value$bsReissueGoods !== void 0 && _value$bsReissueGoods.length)) {
|
|
181
|
-
return Promise.reject(new Error(
|
|
191
|
+
return Promise.reject(new Error('请选择bs补发商品'));
|
|
182
192
|
}
|
|
183
193
|
return Promise.resolve();
|
|
184
194
|
}
|
|
185
195
|
}] : [];
|
|
186
|
-
this.dataType =
|
|
196
|
+
this.dataType = 'object';
|
|
187
197
|
});
|
|
188
198
|
export default BsReissue;
|
|
@@ -22,14 +22,15 @@ declare class BsType implements ComponentInterface {
|
|
|
22
22
|
renderExport: (value: string, record: Record) => any;
|
|
23
23
|
editRender: () => null;
|
|
24
24
|
filterConfig: (item: ColumnConfig) => {
|
|
25
|
-
searchDefaultConditions: "
|
|
25
|
+
searchDefaultConditions: "in";
|
|
26
26
|
type: string;
|
|
27
27
|
id: string;
|
|
28
28
|
name: string;
|
|
29
29
|
filterComponentType: "Cascader";
|
|
30
30
|
props: {
|
|
31
|
-
options: any[]
|
|
31
|
+
options: any[];
|
|
32
32
|
};
|
|
33
|
+
formatFilterValue: (val: Array<string>) => string | undefined;
|
|
33
34
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
34
35
|
};
|
|
35
36
|
}
|
|
@@ -87,14 +87,20 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
87
87
|
_defineProperty(this, "filterConfig", function (item) {
|
|
88
88
|
var _item$config;
|
|
89
89
|
var subKey = item.subKey;
|
|
90
|
+
console.log('bsTypefilterConfig', item);
|
|
90
91
|
return {
|
|
91
|
-
searchDefaultConditions: SYMBOL.
|
|
92
|
+
searchDefaultConditions: SYMBOL.in,
|
|
92
93
|
type: item.type,
|
|
93
94
|
id: item.id,
|
|
94
95
|
name: "".concat(item.name, "-\u7C7B\u578B"),
|
|
95
96
|
filterComponentType: 'Cascader',
|
|
96
97
|
props: {
|
|
97
|
-
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
98
|
+
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList) || []
|
|
99
|
+
},
|
|
100
|
+
formatFilterValue: function formatFilterValue(val) {
|
|
101
|
+
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
102
|
+
return val[val.length - 1];
|
|
103
|
+
}
|
|
98
104
|
},
|
|
99
105
|
filterFn: function filterFn(value) {
|
|
100
106
|
return function (i) {
|
|
@@ -25,14 +25,6 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
25
25
|
renderExport: (value: unknown, record: Record) => any;
|
|
26
26
|
editRender: (p: any) => React.JSX.Element;
|
|
27
27
|
getKeyByComponentType: (type: string) => any;
|
|
28
|
-
filterConfig: (item: ColumnConfig) =>
|
|
29
|
-
searchDefaultConditions: "between";
|
|
30
|
-
type: string;
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
filterComponentType: "Date";
|
|
34
|
-
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
35
|
-
formatFilterValue: (val: Array<any>) => number[] | undefined;
|
|
36
|
-
};
|
|
28
|
+
filterConfig: (item: ColumnConfig) => any;
|
|
37
29
|
}
|
|
38
30
|
export default BasicDataTime;
|
|
@@ -85,8 +85,9 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
|
85
85
|
return typeMap[type];
|
|
86
86
|
});
|
|
87
87
|
_defineProperty(this, "filterConfig", function (item) {
|
|
88
|
+
var _ref;
|
|
88
89
|
var key = _this.getKeyByComponentType(item.type);
|
|
89
|
-
|
|
90
|
+
var params = {
|
|
90
91
|
searchDefaultConditions: SYMBOL.between,
|
|
91
92
|
type: item.type,
|
|
92
93
|
id: "".concat(item.id, "_").concat(key),
|
|
@@ -108,6 +109,10 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
};
|
|
112
|
+
if ((_ref = ["BS_SIGNING_TIME", "BS_SEND_TIME", "BS_TRADE_PAYMENT_TIME"]) !== null && _ref !== void 0 && _ref.includes(item.type)) {
|
|
113
|
+
params.componentDataType = "dataTime";
|
|
114
|
+
}
|
|
115
|
+
return params;
|
|
111
116
|
});
|
|
112
117
|
this.name = options.name;
|
|
113
118
|
this.id = options.id;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ShopInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/dist/esm/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.59",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.59",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.59"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "ef98dc4d8d95dde163615b0127589766b2d0f36a"
|
|
44
44
|
}
|