@kmkf-fe-packages/services-components 0.7.15-alpha.52 → 0.7.15-alpha.54
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/commonComponents/ShopList/index.d.ts +1 -1
- package/dist/esm/commonComponents/ShopList/index.js +4 -2
- package/dist/esm/components/ActualPayment/index.js +2 -2
- package/dist/esm/components/BS/BsExchange/index.d.ts +6 -6
- package/dist/esm/components/BS/BsExchange/index.js +74 -75
- package/dist/esm/components/BS/common/BsMemo.js +5 -5
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +11 -16
- package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -5
- package/dist/esm/components/JST/JstLogistics/index.js +28 -17
- package/dist/esm/components/JST/JstSendGood/index.d.ts +10 -4
- package/dist/esm/components/JST/JstSendGood/index.js +27 -17
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +6 -0
- package/package.json +4 -4
|
@@ -9,5 +9,5 @@ declare type ShopListProps = {
|
|
|
9
9
|
shopList: Shop[];
|
|
10
10
|
[prop: string]: any;
|
|
11
11
|
};
|
|
12
|
-
declare const ShopList: ({ shopList, onChange, setShopId, ...prop }: ShopListProps) => React.JSX.Element;
|
|
12
|
+
declare const ShopList: ({ shopList, valueMapping, onChange, setShopId, ...prop }: ShopListProps) => React.JSX.Element;
|
|
13
13
|
export default ShopList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["shopList", "onChange", "setShopId"];
|
|
1
|
+
var _excluded = ["shopList", "valueMapping", "onChange", "setShopId"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -8,6 +8,8 @@ import PlatformAvatar from "../PlatformAvatar";
|
|
|
8
8
|
var ShopList = function ShopList(_ref) {
|
|
9
9
|
var _shopList$filter;
|
|
10
10
|
var shopList = _ref.shopList,
|
|
11
|
+
_ref$valueMapping = _ref.valueMapping,
|
|
12
|
+
valueMapping = _ref$valueMapping === void 0 ? "shopId" : _ref$valueMapping,
|
|
11
13
|
onChange = _ref.onChange,
|
|
12
14
|
setShopId = _ref.setShopId,
|
|
13
15
|
prop = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -21,7 +23,7 @@ var ShopList = function ShopList(_ref) {
|
|
|
21
23
|
return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1;
|
|
22
24
|
})) === null || _shopList$filter === void 0 ? void 0 : _shopList$filter.map(function (item) {
|
|
23
25
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
24
|
-
value: item
|
|
26
|
+
value: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
25
27
|
label: item.shopName
|
|
26
28
|
}, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
27
29
|
styles: {
|
|
@@ -159,10 +159,10 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
|
159
159
|
this.canSort = true;
|
|
160
160
|
this.children = [];
|
|
161
161
|
this.componentConfig = options.componentConfig;
|
|
162
|
-
this.rules = [{
|
|
162
|
+
this.rules = options.type === "ACTUAL_PAYMENT" ? [{
|
|
163
163
|
pattern: /^\d+(\.\d{1,2})?$/,
|
|
164
164
|
message: "字段为正数或最多两位小数"
|
|
165
|
-
}];
|
|
165
|
+
}] : [];
|
|
166
166
|
this.dataMap = {
|
|
167
167
|
ACTUAL_PAYMENT: "actualPayment",
|
|
168
168
|
BS_NET_RECEIPTS: "bsNetReceipts",
|
|
@@ -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);
|
|
@@ -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
|
-
import { BsGoodsTable } from "../../Common";
|
|
19
|
+
import { BsGoodsTable, BsExchangeList } from "../../Common";
|
|
20
20
|
import ItemView from "../../../commonComponents/ItemView";
|
|
21
|
-
import { isNull, filterFn as _filterFn } from
|
|
22
|
-
import { BsExchange as Exchange } from
|
|
21
|
+
import { isNull, filterFn as _filterFn } 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,22 +170,22 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
170
170
|
_defineProperty(this, "bsType", void 0);
|
|
171
171
|
_defineProperty(this, "bsMemo", void 0);
|
|
172
172
|
_defineProperty(this, "renderClient", function (record) {
|
|
173
|
-
var _this$componentConfig,
|
|
174
|
-
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, {
|
|
173
|
+
var _record, _record$bsExchangeTyp, _this$componentConfig, _record2, _record2$bsExchangeTy, _this$componentConfig2, _record3, _record3$bsExchangeTy, _this$componentConfig3;
|
|
174
|
+
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, {
|
|
175
175
|
id: _this.id,
|
|
176
|
-
label: "".concat(_this.name
|
|
176
|
+
label: "".concat(_this.name),
|
|
177
177
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
178
178
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeReturnGoods) || [],
|
|
179
179
|
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
180
180
|
})
|
|
181
|
-
}), [
|
|
181
|
+
}) : 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, {
|
|
182
182
|
id: _this.id,
|
|
183
|
-
label: "".concat(_this.name
|
|
184
|
-
value: /*#__PURE__*/React.createElement(
|
|
183
|
+
label: "".concat(_this.name),
|
|
184
|
+
value: /*#__PURE__*/React.createElement(BsExchangeList, {
|
|
185
185
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeSwapOutGoods) || [],
|
|
186
186
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
187
187
|
})
|
|
188
|
-
}) : null, [
|
|
188
|
+
}) : 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, {
|
|
189
189
|
id: _this.id,
|
|
190
190
|
label: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
191
191
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
@@ -229,7 +229,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
229
229
|
type: item.type,
|
|
230
230
|
id: "".concat(item.id, "_bsReissueType"),
|
|
231
231
|
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
232
|
-
filterComponentType:
|
|
232
|
+
filterComponentType: "Cascader",
|
|
233
233
|
props: {
|
|
234
234
|
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
235
235
|
},
|
|
@@ -243,19 +243,19 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
243
243
|
type: item.type,
|
|
244
244
|
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
245
245
|
name: "".concat(_this.name, "-\u9000\u56DE"),
|
|
246
|
-
filterComponentType:
|
|
246
|
+
filterComponentType: "Input"
|
|
247
247
|
}, {
|
|
248
248
|
searchDefaultConditions: SYMBOL.like,
|
|
249
249
|
type: item.type,
|
|
250
250
|
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
251
251
|
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
252
|
-
filterComponentType:
|
|
252
|
+
filterComponentType: "Input"
|
|
253
253
|
}, {
|
|
254
254
|
searchDefaultConditions: SYMBOL.like,
|
|
255
255
|
type: item.type,
|
|
256
256
|
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
257
257
|
name: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
258
|
-
filterComponentType:
|
|
258
|
+
filterComponentType: "Input"
|
|
259
259
|
}];
|
|
260
260
|
});
|
|
261
261
|
this.name = options.name;
|
|
@@ -268,11 +268,11 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
268
268
|
this.canSort = false;
|
|
269
269
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
270
270
|
id: "".concat(options.id, "_bsExchangeType_type"),
|
|
271
|
-
name:
|
|
271
|
+
name: "换货类型"
|
|
272
272
|
}));
|
|
273
273
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
274
274
|
id: "".concat(options.id, "_bsExchangeType_memo"),
|
|
275
|
-
name:
|
|
275
|
+
name: "换货备注"
|
|
276
276
|
}));
|
|
277
277
|
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) {
|
|
278
278
|
if (returnHeaderMap[next]) {
|
|
@@ -300,25 +300,24 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
300
300
|
return prv;
|
|
301
301
|
}, [])));
|
|
302
302
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
303
|
-
this.rules =
|
|
304
|
-
required:
|
|
303
|
+
this.rules = [{
|
|
304
|
+
required: (_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required,
|
|
305
305
|
validator: function validator(_, value) {
|
|
306
306
|
var _value$bsExchangeRetu;
|
|
307
307
|
if (!value || !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
308
|
-
return Promise.reject(new Error(
|
|
308
|
+
return Promise.reject(new Error("请选择bs换货商品"));
|
|
309
309
|
}
|
|
310
310
|
return Promise.resolve();
|
|
311
311
|
}
|
|
312
312
|
}, {
|
|
313
313
|
validator: function validator(_, value) {
|
|
314
314
|
var _value$bsExchangeType;
|
|
315
|
-
|
|
316
|
-
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])) {
|
|
315
|
+
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])) {
|
|
317
316
|
var hasNoGood = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
318
317
|
return !(item !== null && item !== void 0 && item.bsExchangeReturnGoods.length);
|
|
319
318
|
});
|
|
320
319
|
if (hasNoGood) {
|
|
321
|
-
return Promise.reject(new Error(
|
|
320
|
+
return Promise.reject(new Error("请选择退回商品后再提交工单"));
|
|
322
321
|
}
|
|
323
322
|
var hasMore = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
324
323
|
var returnMoney = ((item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || []).reduce(function (prv, next) {
|
|
@@ -332,18 +331,18 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
332
331
|
return returnMoney < swapOutMoney;
|
|
333
332
|
});
|
|
334
333
|
if (hasMore) {
|
|
335
|
-
return Promise.reject(new Error(
|
|
334
|
+
return Promise.reject(new Error("换货商品的金额不能大于退回商品的金额"));
|
|
336
335
|
}
|
|
337
336
|
var hasLen = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
338
337
|
return (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods.length) !== (item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods.length);
|
|
339
338
|
});
|
|
340
339
|
if (hasLen) {
|
|
341
|
-
return Promise.reject(new Error(
|
|
340
|
+
return Promise.reject(new Error("请核对商品数据,再提交工单"));
|
|
342
341
|
}
|
|
343
342
|
}
|
|
344
343
|
return Promise.resolve();
|
|
345
344
|
}
|
|
346
|
-
}]
|
|
347
|
-
this.dataType =
|
|
345
|
+
}];
|
|
346
|
+
this.dataType = "object";
|
|
348
347
|
});
|
|
349
348
|
export default BsExchange;
|
|
@@ -51,7 +51,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
51
51
|
})) === null || _find === void 0 ? void 0 : _find.children;
|
|
52
52
|
var text = (children || []).find(function (item) {
|
|
53
53
|
return item.value === memo;
|
|
54
|
-
});
|
|
54
|
+
}).label;
|
|
55
55
|
return !isNull(r === null || r === void 0 ? void 0 : r[key]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
56
56
|
id: _this.id,
|
|
57
57
|
label: _this.name,
|
|
@@ -68,16 +68,16 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
68
68
|
return _this.renderPc(undefined, r);
|
|
69
69
|
});
|
|
70
70
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
71
|
-
var _ref3,
|
|
71
|
+
var _ref3, _ref4, _find2, _this$componentConfig2;
|
|
72
72
|
var id = _this.getParentId();
|
|
73
|
-
var type = r !== null && r !== void 0 && r[id] ? (_ref3 = (r === null || r === void 0 ? void 0 :
|
|
74
|
-
var memo = r !== null && r !== void 0 && r[_this.id] ? (_ref4 = (r === null || r === void 0 ? void 0 :
|
|
73
|
+
var type = r !== null && r !== void 0 && r[id] ? (_ref3 = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref3 === void 0 ? void 0 : _ref3[0] : "";
|
|
74
|
+
var memo = r !== null && r !== void 0 && r[_this.id] ? (_ref4 = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref4 === void 0 ? void 0 : _ref4[1] : "";
|
|
75
75
|
var children = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
76
76
|
return item.value === type;
|
|
77
77
|
})) === null || _find2 === void 0 ? void 0 : _find2.children;
|
|
78
78
|
var text = (children || []).find(function (item) {
|
|
79
79
|
return item.value === memo;
|
|
80
|
-
});
|
|
80
|
+
}).label;
|
|
81
81
|
return text;
|
|
82
82
|
});
|
|
83
83
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
@@ -19,7 +19,7 @@ export declare const BsGoodImage: ({ item, index }: {
|
|
|
19
19
|
item: any;
|
|
20
20
|
index: number;
|
|
21
21
|
}) => React.JSX.Element;
|
|
22
|
-
export declare const BsExchangeList: ({ list }: any) => React.JSX.Element;
|
|
22
|
+
export declare const BsExchangeList: ({ list, showHeader }: any) => React.JSX.Element;
|
|
23
23
|
export declare const BsGoodPic: (list: string[]) => React.JSX.Element[];
|
|
24
24
|
export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
25
25
|
list: any[];
|
|
@@ -260,25 +260,20 @@ export var BsGoodImage = function BsGoodImage(_ref7) {
|
|
|
260
260
|
};
|
|
261
261
|
//bs换货 todo
|
|
262
262
|
export var BsExchangeList = function BsExchangeList(_ref8) {
|
|
263
|
-
var list = _ref8.list
|
|
263
|
+
var list = _ref8.list,
|
|
264
|
+
showHeader = _ref8.showHeader;
|
|
264
265
|
return /*#__PURE__*/React.createElement("div", {
|
|
265
266
|
className: styles.bsImgBox
|
|
266
267
|
}, list.map(function (item) {
|
|
267
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}, ((item === null || item === void 0 ? void 0 : item.returnGood) || []).map(function (t, i) {
|
|
277
|
-
return BsGoodImage({
|
|
278
|
-
item: t,
|
|
279
|
-
index: i
|
|
280
|
-
});
|
|
281
|
-
})));
|
|
268
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
269
|
+
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
270
|
+
showHeader: showHeader,
|
|
271
|
+
text: "退回"
|
|
272
|
+
}), BsGoodsTable({
|
|
273
|
+
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
274
|
+
showHeader: showHeader,
|
|
275
|
+
text: "换出"
|
|
276
|
+
}));
|
|
282
277
|
}));
|
|
283
278
|
};
|
|
284
279
|
//bs图片展示
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
4
|
declare class JstLogistics implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
|
+
sortChildField: {
|
|
9
|
+
name: string;
|
|
10
|
+
key: string;
|
|
11
|
+
dataType: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}[];
|
|
8
14
|
type: string;
|
|
9
15
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
16
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
11
17
|
align: ALignType;
|
|
12
18
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
13
19
|
isCombinationComponent: boolean;
|
|
14
20
|
formField: string;
|
|
15
21
|
canSort: boolean;
|
|
16
22
|
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface[
|
|
23
|
+
dataType: ComponentInterface['dataType'];
|
|
18
24
|
constructor(options: PickOption);
|
|
19
25
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
26
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,23 +6,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import { ExpressData } from
|
|
11
|
-
import some from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import some from 'lodash/some';
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import { JstGoodImage } from "../../Common";
|
|
14
|
-
import { JstGoods } from
|
|
14
|
+
import { JstGoods } from '@kmkf-fe-packages/basic-components';
|
|
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
19
|
JST_LOGISTICS: {
|
|
20
|
-
key:
|
|
21
|
-
name:
|
|
20
|
+
key: 'jstItemList',
|
|
21
|
+
name: 'jst'
|
|
22
22
|
},
|
|
23
23
|
BS_LOGISTICS: {
|
|
24
|
-
key:
|
|
25
|
-
name:
|
|
24
|
+
key: 'bsLogisticsList',
|
|
25
|
+
name: 'bs'
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
@@ -34,6 +34,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
34
34
|
_defineProperty(this, "name", void 0);
|
|
35
35
|
_defineProperty(this, "id", void 0);
|
|
36
36
|
_defineProperty(this, "sortField", void 0);
|
|
37
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
37
38
|
_defineProperty(this, "type", void 0);
|
|
38
39
|
_defineProperty(this, "rules", void 0);
|
|
39
40
|
_defineProperty(this, "componentConfig", void 0);
|
|
@@ -80,8 +81,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
80
81
|
var _typeMap$_this$type4;
|
|
81
82
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
|
|
82
83
|
return (list || []).map(function (item) {
|
|
83
|
-
return [_this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join(
|
|
84
|
-
}).join(
|
|
84
|
+
return [_this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join('/');
|
|
85
|
+
}).join(',');
|
|
85
86
|
});
|
|
86
87
|
_defineProperty(this, "editRender", function (p) {
|
|
87
88
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -104,10 +105,10 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
104
105
|
type: item.type,
|
|
105
106
|
id: "".concat(item.id, "_logisticsCode"),
|
|
106
107
|
name: "".concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.name, "\u7269\u6D41\u5355\u53F7"),
|
|
107
|
-
filterComponentType:
|
|
108
|
+
filterComponentType: 'Input',
|
|
108
109
|
filterFn: function filterFn(value) {
|
|
109
110
|
return function (i) {
|
|
110
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
111
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCode'), value);
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
}, {
|
|
@@ -115,14 +116,14 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
115
116
|
type: item.type,
|
|
116
117
|
id: "".concat(item.id, "_logisticsCompany"),
|
|
117
118
|
name: "".concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.name, "\u7269\u6D41\u516C\u53F8"),
|
|
118
|
-
filterComponentType:
|
|
119
|
+
filterComponentType: 'MultipleSelect',
|
|
119
120
|
props: {
|
|
120
121
|
options: _this.expressDateInstance.getExpressData() || []
|
|
121
122
|
},
|
|
122
123
|
filterFn: function filterFn(value) {
|
|
123
124
|
return function (i) {
|
|
124
125
|
var _ref;
|
|
125
|
-
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
126
|
+
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCompany').split(',') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
126
127
|
var _String;
|
|
127
128
|
var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
128
129
|
return logisticsCompany;
|
|
@@ -140,7 +141,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
140
141
|
this.isCombinationComponent = false;
|
|
141
142
|
this.canSort = false;
|
|
142
143
|
this.children = [];
|
|
143
|
-
this.dataType =
|
|
144
|
+
this.dataType = 'object';
|
|
144
145
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
145
146
|
required: true,
|
|
146
147
|
validator: function validator(_, value) {
|
|
@@ -153,7 +154,17 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
153
154
|
return Promise.resolve();
|
|
154
155
|
}
|
|
155
156
|
}] : [];
|
|
156
|
-
this.align =
|
|
157
|
+
this.align = 'left';
|
|
157
158
|
this.expressDateInstance = ExpressData.getInstance();
|
|
159
|
+
this.sortChildField = [{
|
|
160
|
+
name: '物流公司',
|
|
161
|
+
key: "".concat(options.id, "_logisticsCompany"),
|
|
162
|
+
options: this.expressDateInstance.getExpressData(),
|
|
163
|
+
dataType: 'string'
|
|
164
|
+
}, {
|
|
165
|
+
name: '物流单号',
|
|
166
|
+
key: "".concat(options.id, "_logisticsCode"),
|
|
167
|
+
dataType: 'string'
|
|
168
|
+
}];
|
|
158
169
|
});
|
|
159
170
|
export default JstLogistics;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class JstSendGood implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
|
+
sortChildField: {
|
|
8
|
+
name: string;
|
|
9
|
+
key: string;
|
|
10
|
+
dataType: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}[];
|
|
7
13
|
type: string;
|
|
8
14
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
15
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
16
|
align: ALignType;
|
|
11
17
|
isCombinationComponent: boolean;
|
|
12
18
|
formField: string;
|
|
13
19
|
canSort: boolean;
|
|
14
20
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
21
|
+
dataType: ComponentInterface['dataType'];
|
|
16
22
|
constructor(options: PickOption);
|
|
17
23
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
18
24
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,22 +6,22 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import some from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import some from 'lodash/some';
|
|
11
11
|
import GetFormItem from "../../GetFormItem";
|
|
12
12
|
import { JstGoodImage } from "../../Common";
|
|
13
|
-
import { JstGoods } from
|
|
13
|
+
import { JstGoods } from '@kmkf-fe-packages/basic-components';
|
|
14
14
|
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
var typeMap = {
|
|
18
18
|
JST_SEND_GOOD: {
|
|
19
|
-
key:
|
|
20
|
-
name:
|
|
19
|
+
key: 'jstItemList',
|
|
20
|
+
name: 'jst'
|
|
21
21
|
},
|
|
22
22
|
BS_SEND_GOOD: {
|
|
23
|
-
key:
|
|
24
|
-
name:
|
|
23
|
+
key: 'bsSendGood',
|
|
24
|
+
name: 'bs'
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
@@ -33,6 +33,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
33
33
|
_defineProperty(this, "name", void 0);
|
|
34
34
|
_defineProperty(this, "id", void 0);
|
|
35
35
|
_defineProperty(this, "sortField", void 0);
|
|
36
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
36
37
|
_defineProperty(this, "type", void 0);
|
|
37
38
|
_defineProperty(this, "rules", void 0);
|
|
38
39
|
_defineProperty(this, "componentConfig", void 0);
|
|
@@ -78,8 +79,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
78
79
|
var _typeMap$_this$type4;
|
|
79
80
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
|
|
80
81
|
return (list || []).map(function (item) {
|
|
81
|
-
return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join(
|
|
82
|
-
}).join(
|
|
82
|
+
return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join('/');
|
|
83
|
+
}).join(',');
|
|
83
84
|
});
|
|
84
85
|
_defineProperty(this, "editRender", function (p) {
|
|
85
86
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
@@ -100,7 +101,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
100
101
|
type: item.type,
|
|
101
102
|
id: "".concat(item.id, "_sendName"),
|
|
102
103
|
name: "".concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.name, "\u53D1\u8D27\u4ED3\u540D\u79F0"),
|
|
103
|
-
filterComponentType:
|
|
104
|
+
filterComponentType: 'Input',
|
|
104
105
|
filterFn: function filterFn(value) {
|
|
105
106
|
return function (i) {
|
|
106
107
|
var _ref, _typeMap$_this$type6;
|
|
@@ -116,7 +117,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
116
117
|
type: item.type,
|
|
117
118
|
id: "".concat(item.id, "_sendId"),
|
|
118
119
|
name: "".concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.name, "\u53D1\u8D27\u4ED3\u7F16\u7801"),
|
|
119
|
-
filterComponentType:
|
|
120
|
+
filterComponentType: 'Input',
|
|
120
121
|
filterFn: function filterFn(value) {
|
|
121
122
|
return function (i) {
|
|
122
123
|
var _ref2, _typeMap$_this$type8;
|
|
@@ -133,20 +134,29 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
133
134
|
this.id = options.id;
|
|
134
135
|
this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
|
|
135
136
|
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.key);
|
|
137
|
+
this.sortChildField = [{
|
|
138
|
+
name: '发货仓名称',
|
|
139
|
+
key: "".concat(options.id, "_sendName"),
|
|
140
|
+
dataType: 'string'
|
|
141
|
+
}, {
|
|
142
|
+
name: '发货仓编码',
|
|
143
|
+
key: "".concat(options.id, "_sendId"),
|
|
144
|
+
dataType: 'string'
|
|
145
|
+
}];
|
|
136
146
|
this.type = options.type;
|
|
137
147
|
this.componentConfig = options.componentConfig;
|
|
138
|
-
this.dataType =
|
|
148
|
+
this.dataType = 'object';
|
|
139
149
|
this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
|
|
140
150
|
required: true,
|
|
141
151
|
validator: function validator(_, value) {
|
|
142
152
|
if (!value || !value.length) {
|
|
143
|
-
return Promise.reject(new Error(
|
|
153
|
+
return Promise.reject(new Error('请选择宝贝'));
|
|
144
154
|
}
|
|
145
155
|
var hasNo = (value || []).some(function (item) {
|
|
146
156
|
var _this$componentConfig2, _this$componentConfig3;
|
|
147
|
-
if ([
|
|
157
|
+
if (['sendName'].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showField) || '')) {
|
|
148
158
|
return item.sendName;
|
|
149
|
-
} else if ([
|
|
159
|
+
} else if (['sendId'].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '')) {
|
|
150
160
|
return item.sendId;
|
|
151
161
|
} else {
|
|
152
162
|
return item.sendId && item.sendName;
|
|
@@ -158,7 +168,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
158
168
|
return Promise.resolve();
|
|
159
169
|
}
|
|
160
170
|
}] : [];
|
|
161
|
-
this.align =
|
|
171
|
+
this.align = 'left';
|
|
162
172
|
this.isCombinationComponent = false;
|
|
163
173
|
this.canSort = false;
|
|
164
174
|
this.children = [];
|
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) => ActualPayment | BsExchange | 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 | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -22,6 +22,12 @@ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' |
|
|
|
22
22
|
export interface ComponentInterface {
|
|
23
23
|
id: string;
|
|
24
24
|
sortField: string;
|
|
25
|
+
sortChildField?: {
|
|
26
|
+
name: string;
|
|
27
|
+
key: string;
|
|
28
|
+
dataType: string;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}[];
|
|
25
31
|
name: string;
|
|
26
32
|
columnHeader?: string | JSX.Element;
|
|
27
33
|
type: string;
|
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.54",
|
|
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.54",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.54"
|
|
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": "6c0e32801a413f48ae0a0a4baf247a0995a9644e"
|
|
44
44
|
}
|