@kmkf-fe-packages/services-components 2.0.0-rc.7 → 2.0.0
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/CopyText/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +5 -2
- package/dist/esm/components/BS/BsGoods/index.js +1 -1
- package/dist/esm/components/BS/BsLogistics/index.js +8 -1
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
- package/dist/esm/components/BS/BsSystemOrder/index.js +12 -147
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +6 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +20 -9
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +1 -0
- package/dist/esm/components/BS/common/BsHeaderGood.js +139 -103
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +19 -18
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +17 -16
- package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
- package/dist/esm/components/BS/common/expressCode.js +4 -1
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/BsE3/BsGoods/index.js +1 -1
- package/dist/esm/components/BsE3/BsReissueE3/index.js +1 -1
- package/dist/esm/components/Common/constants/bs.d.ts +3 -0
- package/dist/esm/components/Common/constants/bs.js +90 -0
- package/dist/esm/components/Common/constants/bs_e3.d.ts +3 -0
- package/dist/esm/components/Common/constants/bs_e3.js +154 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +5 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +26 -0
- package/dist/esm/components/Common/constants/defaultColumns.d.ts +3 -0
- package/dist/esm/components/Common/constants/defaultColumns.js +76 -0
- package/dist/esm/components/Common/constants/gy.d.ts +3 -0
- package/dist/esm/components/Common/constants/gy.js +153 -0
- package/dist/esm/components/Common/constants/system.d.ts +3 -0
- package/dist/esm/components/Common/constants/system.js +58 -0
- package/dist/esm/components/Common/constants/wdt.d.ts +3 -0
- package/dist/esm/components/Common/constants/wdt.js +280 -0
- package/dist/esm/components/Common/index.d.ts +13 -5
- package/dist/esm/components/Common/index.js +221 -912
- package/dist/esm/components/CommonHeaderGood/index.d.ts +1 -0
- package/dist/esm/components/CommonHeaderGood/index.js +322 -93
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -4
- package/dist/esm/components/CommonMultiStatus/index.js +78 -74
- package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
- package/dist/esm/components/CommonSystemOrder/index.js +25 -25
- package/dist/esm/components/EItemEnCode/index.d.ts +3 -1
- package/dist/esm/components/EItemEnCode/index.js +26 -29
- package/dist/esm/components/GY/GyGoods/index.d.ts +33 -0
- package/dist/esm/components/GY/GyGoods/index.js +123 -0
- package/dist/esm/components/GY/GyReissue/index.d.ts +58 -0
- package/dist/esm/components/GY/GyReissue/index.js +188 -0
- package/dist/esm/components/JST/JstSendGood/index.js +32 -16
- package/dist/esm/components/KmErpSendGood/index.js +11 -11
- package/dist/esm/components/MsgStatus/index.d.ts +5 -5
- package/dist/esm/components/MsgStatus/index.js +39 -48
- package/dist/esm/components/PostIng/index.js +3 -2
- package/dist/esm/components/ReceiverAddress/index.js +74 -8
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +12 -3
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +36 -13
- package/dist/esm/components/StatusSelect/index.d.ts +1 -1
- package/dist/esm/components/StatusSelect/index.js +1 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +10 -4
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/service/api.d.ts +3 -0
- package/dist/esm/service/api.js +59 -38
- package/dist/esm/type.d.ts +8 -3
- package/package.json +4 -4
|
@@ -8,104 +8,108 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
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; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
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); }
|
|
11
|
-
import React from
|
|
12
|
-
import some from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import some from "lodash/some";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import { CommonOrderContent } from "../Common";
|
|
15
|
-
import { CommonMultiStatus as Status } from
|
|
15
|
+
import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
20
|
RETURN_GOODS_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value:
|
|
23
|
-
label:
|
|
24
|
-
color:
|
|
22
|
+
value: "成功",
|
|
23
|
+
label: "成功",
|
|
24
|
+
color: "#52c41a"
|
|
25
25
|
}, {
|
|
26
|
-
value:
|
|
27
|
-
label:
|
|
28
|
-
color:
|
|
26
|
+
value: "失败",
|
|
27
|
+
label: "失败",
|
|
28
|
+
color: "#ff4d4f"
|
|
29
29
|
}],
|
|
30
|
-
key:
|
|
31
|
-
code:
|
|
32
|
-
name:
|
|
30
|
+
key: "returnGoodsStatusList",
|
|
31
|
+
code: "returnGoodsStatusValue",
|
|
32
|
+
name: "退货状态",
|
|
33
33
|
type: 1,
|
|
34
|
-
valueKey:
|
|
35
|
-
idKey:
|
|
36
|
-
failValue:
|
|
34
|
+
valueKey: "status",
|
|
35
|
+
idKey: "systemOrderId",
|
|
36
|
+
failValue: "失败"
|
|
37
37
|
},
|
|
38
38
|
EXCHANGE_STATUS: {
|
|
39
39
|
options: [{
|
|
40
|
-
value:
|
|
41
|
-
label:
|
|
42
|
-
color:
|
|
40
|
+
value: "成功",
|
|
41
|
+
label: "成功",
|
|
42
|
+
color: "#52c41a"
|
|
43
43
|
}, {
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
46
|
-
color:
|
|
44
|
+
value: "失败",
|
|
45
|
+
label: "失败",
|
|
46
|
+
color: "#ff4d4f"
|
|
47
47
|
}],
|
|
48
|
-
key:
|
|
49
|
-
code:
|
|
50
|
-
name:
|
|
48
|
+
key: "exchangeReason",
|
|
49
|
+
code: "exchangeStatusValue",
|
|
50
|
+
name: "换货状态",
|
|
51
51
|
type: 1,
|
|
52
|
-
valueKey:
|
|
53
|
-
idKey:
|
|
54
|
-
failValue:
|
|
52
|
+
valueKey: "status",
|
|
53
|
+
idKey: "systemOrderId",
|
|
54
|
+
failValue: "失败"
|
|
55
55
|
},
|
|
56
56
|
WAREHOUSING_STATUS: {
|
|
57
57
|
options: [{
|
|
58
|
-
value:
|
|
59
|
-
label:
|
|
60
|
-
color:
|
|
58
|
+
value: "2",
|
|
59
|
+
label: "已入库",
|
|
60
|
+
color: "#52c41a"
|
|
61
61
|
}, {
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
color:
|
|
62
|
+
value: "1",
|
|
63
|
+
label: "部分入库",
|
|
64
|
+
color: "#e7780f"
|
|
65
65
|
}, {
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
color:
|
|
66
|
+
value: "0",
|
|
67
|
+
label: "未入库",
|
|
68
|
+
color: "#ff4d4f"
|
|
69
69
|
}],
|
|
70
|
-
key:
|
|
71
|
-
code:
|
|
72
|
-
name:
|
|
70
|
+
key: "inStockStatusItemList",
|
|
71
|
+
code: "inStockStatusList",
|
|
72
|
+
name: "商品入库状态(勿填)",
|
|
73
73
|
type: 2,
|
|
74
|
-
valueKey:
|
|
75
|
-
idKey:
|
|
76
|
-
failValue:
|
|
74
|
+
valueKey: "status",
|
|
75
|
+
idKey: "systemOrderId",
|
|
76
|
+
failValue: "失败",
|
|
77
|
+
dataType: "array_object"
|
|
77
78
|
},
|
|
78
79
|
BS_E3_WAREHOUSING_STATUS: {
|
|
79
80
|
options: [{
|
|
80
|
-
value:
|
|
81
|
-
label:
|
|
82
|
-
color:
|
|
81
|
+
value: "2",
|
|
82
|
+
label: "已入库",
|
|
83
|
+
color: "#52c41a"
|
|
83
84
|
}, {
|
|
84
|
-
value:
|
|
85
|
-
label:
|
|
86
|
-
color:
|
|
85
|
+
value: "1",
|
|
86
|
+
label: "部分入库",
|
|
87
|
+
color: "#e7780f"
|
|
87
88
|
}, {
|
|
88
|
-
value:
|
|
89
|
-
label:
|
|
90
|
-
color:
|
|
89
|
+
value: "0",
|
|
90
|
+
label: "未入库",
|
|
91
|
+
color: "#ff4d4f"
|
|
91
92
|
}, {
|
|
92
|
-
value:
|
|
93
|
-
label:
|
|
94
|
-
color:
|
|
93
|
+
value: "3",
|
|
94
|
+
label: "已退回给客户",
|
|
95
|
+
color: "#1B5BF3"
|
|
95
96
|
}],
|
|
96
|
-
key:
|
|
97
|
-
code:
|
|
98
|
-
name:
|
|
97
|
+
key: "bsE3InStockStatusItemList",
|
|
98
|
+
code: "bsE3InStockStatusList",
|
|
99
|
+
name: "商品入库状态",
|
|
99
100
|
type: 2,
|
|
100
|
-
valueKey:
|
|
101
|
-
idKey:
|
|
102
|
-
failValue:
|
|
101
|
+
valueKey: "status",
|
|
102
|
+
idKey: "systemOrderId",
|
|
103
|
+
failValue: "失败",
|
|
104
|
+
dataType: "array_object"
|
|
103
105
|
}
|
|
104
106
|
};
|
|
105
107
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
106
108
|
var _this = this,
|
|
107
109
|
_typeMap$options$type,
|
|
108
110
|
_typeMap$options$type2,
|
|
111
|
+
_typeMap$options$type3,
|
|
112
|
+
_typeMap$options$type4,
|
|
109
113
|
_this$componentConfig5,
|
|
110
114
|
_this$componentConfig6;
|
|
111
115
|
_classCallCheck(this, CommonMultiStatus);
|
|
@@ -176,10 +180,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
176
180
|
});
|
|
177
181
|
if (_this.isSingleValue) {
|
|
178
182
|
var _typeMap$_this$type15;
|
|
179
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
183
|
+
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "";
|
|
180
184
|
}
|
|
181
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
182
|
-
}).join(
|
|
185
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || "");
|
|
186
|
+
}).join(",");
|
|
183
187
|
});
|
|
184
188
|
_defineProperty(this, "editRender", function (p) {
|
|
185
189
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
|
|
@@ -190,7 +194,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
190
194
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
191
195
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
192
196
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
193
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
197
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
194
198
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
195
199
|
type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
|
|
196
200
|
failValue: typeMap[_this.type].failValue
|
|
@@ -200,16 +204,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
200
204
|
_defineProperty(this, "filterConfig", function (item) {
|
|
201
205
|
var _typeMap$_this$type19, _item$templateConfig;
|
|
202
206
|
return {
|
|
203
|
-
searchDefaultConditions: [
|
|
207
|
+
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
204
208
|
type: item.type,
|
|
205
209
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
|
|
206
210
|
name: "".concat(_this.name),
|
|
207
|
-
filterComponentType: [
|
|
211
|
+
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
208
212
|
props: {
|
|
209
213
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
210
214
|
fieldNames: {
|
|
211
|
-
label:
|
|
212
|
-
value:
|
|
215
|
+
label: "label",
|
|
216
|
+
value: "value"
|
|
213
217
|
}
|
|
214
218
|
},
|
|
215
219
|
filterFn: function filterFn(value) {
|
|
@@ -218,8 +222,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
218
222
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
|
|
219
223
|
};
|
|
220
224
|
},
|
|
221
|
-
formatFilterValue: [
|
|
222
|
-
if (value.type ===
|
|
225
|
+
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
226
|
+
if (value.type === "keywords") {
|
|
223
227
|
return value.keywords;
|
|
224
228
|
} else {
|
|
225
229
|
return value;
|
|
@@ -238,7 +242,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
238
242
|
this.isCombinationComponent = false;
|
|
239
243
|
this.canSort = false;
|
|
240
244
|
this.children = [];
|
|
241
|
-
this.dataType =
|
|
245
|
+
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : "object";
|
|
242
246
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
243
247
|
required: true,
|
|
244
248
|
validator: function validator(_, value) {
|
|
@@ -253,7 +257,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
253
257
|
return Promise.resolve();
|
|
254
258
|
}
|
|
255
259
|
}] : [];
|
|
256
|
-
this.align =
|
|
257
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type ===
|
|
260
|
+
this.align = "left";
|
|
261
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS";
|
|
258
262
|
});
|
|
259
263
|
export default CommonMultiStatus;
|
|
@@ -1,18 +1,18 @@
|
|
|
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 CommonSystemOrder implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,42 +6,42 @@ 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 { CommonOrderContent } from "../Common";
|
|
13
|
-
import { CommonSystemOrder as SystemOrder } from
|
|
13
|
+
import { CommonSystemOrder as SystemOrder } 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, batchInput } from "../../constant";
|
|
17
17
|
var typeMap = {
|
|
18
18
|
BS_DELIVERY_NO: {
|
|
19
|
-
key:
|
|
20
|
-
code:
|
|
21
|
-
name:
|
|
19
|
+
key: "deliveryNoList",
|
|
20
|
+
code: "deliveryNoIds",
|
|
21
|
+
name: "出库单",
|
|
22
22
|
type: 1,
|
|
23
|
-
valueKey:
|
|
23
|
+
valueKey: "deliveryNo"
|
|
24
24
|
},
|
|
25
25
|
RETURN_GOODS_TRADE_ID: {
|
|
26
|
-
key:
|
|
27
|
-
code:
|
|
28
|
-
name:
|
|
26
|
+
key: "returnGoodsTradeItemList",
|
|
27
|
+
code: "returnGoodsTradeIdList",
|
|
28
|
+
name: "退货单id",
|
|
29
29
|
type: 2,
|
|
30
|
-
valueKey:
|
|
30
|
+
valueKey: ["returnGoodsTradeId", "returnLogisticsCode"]
|
|
31
31
|
},
|
|
32
32
|
REISSUE_TRADE_ID: {
|
|
33
|
-
key:
|
|
34
|
-
code:
|
|
35
|
-
name:
|
|
33
|
+
key: "tradeItemList",
|
|
34
|
+
code: "tradeIdList",
|
|
35
|
+
name: "补发单id",
|
|
36
36
|
type: 3,
|
|
37
|
-
valueKey:
|
|
37
|
+
valueKey: "billNo"
|
|
38
38
|
},
|
|
39
39
|
EXCHANGE_TRADE_ID: {
|
|
40
|
-
key:
|
|
41
|
-
code:
|
|
42
|
-
name:
|
|
40
|
+
key: "tradeItemList",
|
|
41
|
+
code: "tradeIdList",
|
|
42
|
+
name: "换货单id",
|
|
43
43
|
type: 4,
|
|
44
|
-
valueKey:
|
|
44
|
+
valueKey: "billNo"
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(options) {
|
|
@@ -108,7 +108,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
108
108
|
return (list || []).map(function (item) {
|
|
109
109
|
var _typeMap$_this$type8;
|
|
110
110
|
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
|
|
111
|
-
}).join(
|
|
111
|
+
}).join(",");
|
|
112
112
|
});
|
|
113
113
|
_defineProperty(this, "editRender", function (p) {
|
|
114
114
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _typeMap$_this$type9;
|
|
@@ -119,7 +119,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
119
119
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
120
120
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
121
121
|
required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
|
|
122
|
-
tooltip: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.showTooltip ? (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.tooltip :
|
|
122
|
+
tooltip: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.showTooltip ? (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.tooltip : "",
|
|
123
123
|
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
124
124
|
type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
|
|
125
125
|
}))
|
|
@@ -132,7 +132,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
132
132
|
type: item.type,
|
|
133
133
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
|
|
134
134
|
name: "".concat(_this.name),
|
|
135
|
-
filterComponentType:
|
|
135
|
+
filterComponentType: "Input",
|
|
136
136
|
filterFn: function filterFn(value) {
|
|
137
137
|
return function (i) {
|
|
138
138
|
var _typeMap$_this$type11;
|
|
@@ -153,7 +153,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
153
153
|
this.isCombinationComponent = false;
|
|
154
154
|
this.canSort = false;
|
|
155
155
|
this.children = [];
|
|
156
|
-
this.dataType =
|
|
156
|
+
this.dataType = "object";
|
|
157
157
|
this.rules = (_this$componentConfig7 = this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required ? [{
|
|
158
158
|
required: true,
|
|
159
159
|
validator: function validator(_, value) {
|
|
@@ -168,6 +168,6 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
168
168
|
return Promise.resolve();
|
|
169
169
|
}
|
|
170
170
|
}] : [];
|
|
171
|
-
this.align =
|
|
171
|
+
this.align = "left";
|
|
172
172
|
});
|
|
173
173
|
export default CommonSystemOrder;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BsHeaderGood } from "../BS/common/index";
|
|
4
|
+
import type { ShowHeaderObjType } from "../../type";
|
|
4
5
|
declare class EItemEncode implements ComponentInterface {
|
|
5
6
|
name: string;
|
|
6
7
|
id: string;
|
|
@@ -15,7 +16,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
15
16
|
children: ComponentInterface[];
|
|
16
17
|
goods: BsHeaderGood;
|
|
17
18
|
dataType: ComponentInterface["dataType"];
|
|
18
|
-
showHeader: string[];
|
|
19
|
+
showHeader: (string | ShowHeaderObjType)[];
|
|
19
20
|
platform?: ComponentInterface["platform"];
|
|
20
21
|
sortChildField: {
|
|
21
22
|
name: string;
|
|
@@ -25,6 +26,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
25
26
|
}[];
|
|
26
27
|
constructor(options: PickOption);
|
|
27
28
|
getSortChildFields: () => any;
|
|
29
|
+
getShowHeader: (showHeader: any) => any[];
|
|
28
30
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
29
31
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
30
32
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -16,6 +16,7 @@ import { BsHeaderGood } from "../BS/common/index";
|
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
17
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
|
+
import { columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
19
20
|
var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
20
21
|
var _this = this,
|
|
21
22
|
_this$componentConfig3,
|
|
@@ -38,23 +39,33 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
38
39
|
_defineProperty(this, "platform", void 0);
|
|
39
40
|
_defineProperty(this, "sortChildField", void 0);
|
|
40
41
|
_defineProperty(this, "getSortChildFields", function () {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
numIid: '商品id',
|
|
45
|
-
skuId: 'skuId',
|
|
46
|
-
outerSkuId: 'sku编码',
|
|
47
|
-
propertiesName: 'sku信息'
|
|
48
|
-
};
|
|
49
|
-
return Object.keys(mapping).map(function (item) {
|
|
42
|
+
return columnsGoodsList.filter(function (item) {
|
|
43
|
+
return !["picUrl", "num"].includes(item.dataIndex);
|
|
44
|
+
}).map(function (item) {
|
|
50
45
|
return {
|
|
51
|
-
name:
|
|
52
|
-
key: "".concat(_this.id, "_").concat(item),
|
|
46
|
+
name: item.title,
|
|
47
|
+
key: "".concat(_this.id, "_").concat(item.dataIndex),
|
|
53
48
|
dataType: "arrayObject",
|
|
54
|
-
disabled: !_this.showHeader.includes(item)
|
|
49
|
+
disabled: !_this.showHeader.includes(item.dataIndex)
|
|
55
50
|
};
|
|
56
51
|
});
|
|
57
52
|
});
|
|
53
|
+
_defineProperty(this, "getShowHeader", function (showHeader) {
|
|
54
|
+
if (!Array.isArray(showHeader)) {
|
|
55
|
+
return columnsGoodsList.map(function (item) {
|
|
56
|
+
return item.dataIndex;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
60
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
61
|
+
if (isStringArray) return showHeader;
|
|
62
|
+
if (isObjectArray) return showHeader.filter(function (item) {
|
|
63
|
+
return item.show !== false;
|
|
64
|
+
}).map(function (item) {
|
|
65
|
+
return item.dataIndex;
|
|
66
|
+
});
|
|
67
|
+
return [];
|
|
68
|
+
});
|
|
58
69
|
_defineProperty(this, "renderClient", function (record) {
|
|
59
70
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
60
71
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -105,9 +116,9 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
105
116
|
required: false,
|
|
106
117
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
107
118
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
108
|
-
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip :
|
|
119
|
+
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
|
|
109
120
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({
|
|
110
|
-
isSingleRow: _this.platform !==
|
|
121
|
+
isSingleRow: _this.platform !== "pc"
|
|
111
122
|
}, _this.componentConfig, {
|
|
112
123
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
113
124
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
@@ -134,21 +145,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
134
145
|
this.type = options.type;
|
|
135
146
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
136
147
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
137
|
-
this.showHeader = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader)
|
|
138
|
-
// 商品名称
|
|
139
|
-
"outerId",
|
|
140
|
-
// 商品编码
|
|
141
|
-
"picUrl",
|
|
142
|
-
// 图片
|
|
143
|
-
"numIid",
|
|
144
|
-
// 商品id
|
|
145
|
-
"skuId",
|
|
146
|
-
// skuId
|
|
147
|
-
"outerSkuId",
|
|
148
|
-
// sku编码
|
|
149
|
-
"propertiesName" // sku 信息
|
|
150
|
-
];
|
|
151
|
-
|
|
148
|
+
this.showHeader = this.getShowHeader((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader);
|
|
152
149
|
this.isCombinationComponent = true;
|
|
153
150
|
this.canSort = false;
|
|
154
151
|
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
declare class GyGoods implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
isCombinationComponent: boolean;
|
|
13
|
+
formField: string;
|
|
14
|
+
canSort: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
gyGoods: CommonHeaderGoods;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: () => null;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
|
+
getComponentValue: (r: Record) => any;
|
|
23
|
+
renderExport: () => null;
|
|
24
|
+
editRender: (p: any) => React.JSX.Element;
|
|
25
|
+
filterConfig: (item: ColumnConfig) => {
|
|
26
|
+
searchDefaultConditions: "like";
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "Input";
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export default GyGoods;
|