@kmkf-fe-packages/services-components 2.2.44-beta.1 → 2.2.44-beta.101
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/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/Hooks/useColumnsConfig.js +2 -2
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
- package/dist/esm/commonComponents/GlobalContext/index.js +52 -19
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +4 -2
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +2 -1
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +4 -2
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +43 -8
- package/dist/esm/components/BS/common/BsHeaderPic.js +4 -1
- package/dist/esm/components/BS/common/BsMemo.js +3 -1
- package/dist/esm/components/BS/common/BsType.js +3 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +3 -1
- package/dist/esm/components/Cascader/index.d.ts +8 -6
- package/dist/esm/components/Cascader/index.js +26 -22
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +4 -3
- package/dist/esm/components/CommonHeaderGood/index.js +47 -3
- package/dist/esm/components/CommonMultiStatus/index.js +73 -36
- package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
- package/dist/esm/components/KM/KmExchange/index.js +136 -0
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +10 -0
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
- package/dist/esm/components/Payment/index.d.ts +13 -12
- package/dist/esm/components/Payment/index.js +31 -11
- package/dist/esm/components/PicturePro/index.d.ts +9 -0
- package/dist/esm/components/PicturePro/index.js +17 -0
- package/dist/esm/components/PostIng/index.d.ts +1 -1
- package/dist/esm/components/Public/Goods/index.d.ts +9 -0
- package/dist/esm/components/Public/Goods/index.js +23 -2
- package/dist/esm/components/Public/ReissueGoods/index.js +41 -5
- package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
- package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
- package/dist/esm/components/ReceiverAddress/index.js +41 -27
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +8 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/service/api.js +1 -0
- package/package.json +4 -4
|
@@ -6,13 +6,13 @@ 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 { Cascader } from
|
|
11
|
-
import intersection from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Cascader } from 'antd';
|
|
11
|
+
import intersection from 'lodash/intersection';
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
|
-
import { findLabelBySelectValue, transMultSelectOptions, tree } from
|
|
13
|
+
import { findLabelBySelectValue, transMultSelectOptions, tree } from '@kmkf-fe-packages/kmkf-utils';
|
|
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 BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
18
18
|
var _this = this,
|
|
@@ -31,11 +31,13 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
32
|
_defineProperty(this, "format", void 0);
|
|
33
33
|
_defineProperty(this, "options", void 0);
|
|
34
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
35
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
34
36
|
_defineProperty(this, "getValues", function (value) {
|
|
35
37
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
36
38
|
return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
|
|
37
39
|
return i.label;
|
|
38
|
-
})) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(
|
|
40
|
+
})) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(',');
|
|
39
41
|
});
|
|
40
42
|
_defineProperty(this, "renderClient", function (record) {
|
|
41
43
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -51,7 +53,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
51
53
|
}
|
|
52
54
|
return /*#__PURE__*/React.createElement("span", null, (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref === void 0 ? void 0 : (_ref$map = _ref.map(function (item) {
|
|
53
55
|
return item === null || item === void 0 ? void 0 : item.label;
|
|
54
|
-
})) === null || _ref$map === void 0 ? void 0 : _ref$map.join(
|
|
56
|
+
})) === null || _ref$map === void 0 ? void 0 : _ref$map.join(','));
|
|
55
57
|
// return (
|
|
56
58
|
// <span>
|
|
57
59
|
// {findLabelBySelectValue(
|
|
@@ -75,11 +77,11 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
75
77
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
76
78
|
var _ref2, _ref2$map;
|
|
77
79
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
|
|
78
|
-
return
|
|
80
|
+
return '--';
|
|
79
81
|
}
|
|
80
82
|
return (_ref2 = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref2 === void 0 ? void 0 : (_ref2$map = _ref2.map(function (item) {
|
|
81
83
|
return item === null || item === void 0 ? void 0 : item.label;
|
|
82
|
-
})) === null || _ref2$map === void 0 ? void 0 : _ref2$map.join(
|
|
84
|
+
})) === null || _ref2$map === void 0 ? void 0 : _ref2$map.join(',');
|
|
83
85
|
// return findLabelBySelectValue(
|
|
84
86
|
// (record?.[`${this.id}_multSelect`] || [])?.map(
|
|
85
87
|
// (item: any) => item.actived
|
|
@@ -98,14 +100,14 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
98
100
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
99
101
|
required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
|
|
100
102
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
101
|
-
tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip :
|
|
103
|
+
tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : '',
|
|
102
104
|
component: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
|
|
103
105
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
104
106
|
options: transMultSelectOptions(((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || []),
|
|
105
107
|
fieldNames: {
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
108
|
-
children:
|
|
108
|
+
label: 'label',
|
|
109
|
+
value: 'actived',
|
|
110
|
+
children: 'children'
|
|
109
111
|
},
|
|
110
112
|
showSearch: true,
|
|
111
113
|
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
@@ -122,26 +124,26 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
122
124
|
// 过滤组件id
|
|
123
125
|
name: item.name,
|
|
124
126
|
// 过滤组件名称
|
|
125
|
-
filterComponentType:
|
|
127
|
+
filterComponentType: 'Cascader',
|
|
126
128
|
props: {
|
|
127
129
|
options: options,
|
|
128
130
|
multiple: true,
|
|
129
|
-
maxTagCount:
|
|
131
|
+
maxTagCount: 'responsive',
|
|
130
132
|
fieldNames: {
|
|
131
|
-
label:
|
|
132
|
-
value:
|
|
133
|
-
children:
|
|
133
|
+
label: 'label',
|
|
134
|
+
value: 'actived',
|
|
135
|
+
children: 'children'
|
|
134
136
|
}
|
|
135
137
|
},
|
|
136
138
|
filterFn: function filterFn(value) {
|
|
137
139
|
return function (i) {
|
|
138
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
140
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
139
141
|
};
|
|
140
142
|
},
|
|
141
143
|
formatFilterValue: function formatFilterValue(val) {
|
|
142
144
|
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
143
145
|
return val.map(function (item) {
|
|
144
|
-
var node = tree.findNodeByValue(options,
|
|
146
|
+
var node = tree.findNodeByValue(options, 'actived', item[item.length - 1]);
|
|
145
147
|
if (node) {
|
|
146
148
|
var label = node.label,
|
|
147
149
|
actived = node.actived;
|
|
@@ -165,9 +167,11 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
165
167
|
this.children = [];
|
|
166
168
|
this.isCombinationComponent = false;
|
|
167
169
|
this.canSort = true;
|
|
168
|
-
this.dataType =
|
|
169
|
-
this.format =
|
|
170
|
+
this.dataType = 'array';
|
|
171
|
+
this.format = 'cascader';
|
|
170
172
|
this.options = ((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.options) || [];
|
|
173
|
+
this.standardDateType = 'Array';
|
|
174
|
+
this.exampleValue = '[{"label":"卖家补偿","actived":3},{"label":"麦基修改","actived":"3-1"}]';
|
|
171
175
|
}
|
|
172
176
|
|
|
173
177
|
/**
|
|
@@ -25,7 +25,7 @@ export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: {
|
|
|
25
25
|
export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
|
|
26
26
|
export declare const JstGoodImage: ({ list, type, platformType, logisticsCompanyFormType, }: any) => any;
|
|
27
27
|
export declare const BsExpressRender: ({ list, showField, platformType, logisticsCompanyFormType, }: any) => any;
|
|
28
|
-
export declare const CommonOrderContent: ({ list, valueKey: initValueKey, failValue, options, isShowPopover, }: any) => any;
|
|
28
|
+
export declare const CommonOrderContent: ({ list, valueKey: initValueKey, failValue, options, isShowPopover, idKey, }: any) => any;
|
|
29
29
|
export declare const BsGoodImage: ({ item, index }: {
|
|
30
30
|
item: any;
|
|
31
31
|
index: number;
|
|
@@ -294,7 +294,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
294
294
|
text: item.logisticsCode
|
|
295
295
|
})) : company ? company : item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
|
|
296
296
|
text: item.logisticsCode
|
|
297
|
-
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, getSendName(item)].join("/") : item.sendId ? item.sendId : getSendName(item)) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
297
|
+
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, getSendName(item)].join("/") : item.sendId ? item.sendId : getSendName(item)) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null, type === 5 ? /*#__PURE__*/React.createElement("span", null, item.returnWarehouseName && item.returnWarehouseId ? [item.returnWarehouseId, item.returnWarehouseName].join("/") : item.returnWarehouseId ? item.returnWarehouseId : item.returnWarehouseName) : null));
|
|
298
298
|
}) : null;
|
|
299
299
|
};
|
|
300
300
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
@@ -333,7 +333,8 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
333
333
|
_ref8$options = _ref8.options,
|
|
334
334
|
options = _ref8$options === void 0 ? [] : _ref8$options,
|
|
335
335
|
_ref8$isShowPopover = _ref8.isShowPopover,
|
|
336
|
-
isShowPopover = _ref8$isShowPopover === void 0 ? true : _ref8$isShowPopover
|
|
336
|
+
isShowPopover = _ref8$isShowPopover === void 0 ? true : _ref8$isShowPopover,
|
|
337
|
+
idKey = _ref8.idKey;
|
|
337
338
|
var getContentData = function getContentData(item, index) {
|
|
338
339
|
if (item.platformId) return {
|
|
339
340
|
text: "平台售后单号",
|
|
@@ -345,7 +346,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
345
346
|
};
|
|
346
347
|
return {
|
|
347
348
|
text: "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1),
|
|
348
|
-
id: item.systemOrderId || item.systemOrderNo
|
|
349
|
+
id: item.systemOrderId || item.systemOrderNo || (item === null || item === void 0 ? void 0 : item[idKey])
|
|
349
350
|
};
|
|
350
351
|
};
|
|
351
352
|
var orderContent = function orderContent(item, index) {
|
|
@@ -19,7 +19,7 @@ import { isNull, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
19
19
|
import { BsHeaderPic, BsHeaderChild } from "../BS/common";
|
|
20
20
|
import ReissueGift from "../BsE3/ReissueGift";
|
|
21
21
|
import { erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
22
|
-
import { getJstColumns } from "@kmkf-fe-packages/basic-components";
|
|
22
|
+
import { getJstColumns, getKmColumns } from "@kmkf-fe-packages/basic-components";
|
|
23
23
|
var orderGoodsHeaderComponentMap = {
|
|
24
24
|
pic: BsHeaderPic
|
|
25
25
|
};
|
|
@@ -1543,6 +1543,10 @@ var GoodHeaderMap = {
|
|
|
1543
1543
|
supplierCode: {
|
|
1544
1544
|
name: "供应商编码",
|
|
1545
1545
|
width: 150
|
|
1546
|
+
},
|
|
1547
|
+
remark: {
|
|
1548
|
+
name: "备注",
|
|
1549
|
+
width: 200
|
|
1546
1550
|
}
|
|
1547
1551
|
},
|
|
1548
1552
|
moneyKey: "money"
|
|
@@ -1617,6 +1621,38 @@ var GoodHeaderMap = {
|
|
|
1617
1621
|
},
|
|
1618
1622
|
moneyKey: "money"
|
|
1619
1623
|
},
|
|
1624
|
+
KM_RETURN_GOODS: {
|
|
1625
|
+
headerMap: getKmColumns()["KM_RETURN_GOODS"].reduce(function (acc, item) {
|
|
1626
|
+
acc[item.dataIndex] = _objectSpread(_objectSpread({}, item.headerMapping || {}), {}, {
|
|
1627
|
+
component: orderGoodsHeaderComponentMap[item.headerComponentType] || BsHeaderChild,
|
|
1628
|
+
name: item.title,
|
|
1629
|
+
key: item.dataIndex,
|
|
1630
|
+
width: item.width || 150
|
|
1631
|
+
});
|
|
1632
|
+
return acc;
|
|
1633
|
+
}, {}),
|
|
1634
|
+
itemKey: getKmColumns()["KM_RETURN_GOODS"].reduce(function (acc, item) {
|
|
1635
|
+
acc[item.dataIndex] = item.title;
|
|
1636
|
+
return acc;
|
|
1637
|
+
}, {}),
|
|
1638
|
+
moneyKey: "price"
|
|
1639
|
+
},
|
|
1640
|
+
KM_EXCHANGE_GOODS: {
|
|
1641
|
+
headerMap: getKmColumns()["KM_EXCHANGE_GOODS"].reduce(function (acc, item) {
|
|
1642
|
+
acc[item.dataIndex] = _objectSpread(_objectSpread({}, item.headerMapping || {}), {}, {
|
|
1643
|
+
component: orderGoodsHeaderComponentMap[item.headerComponentType] || BsHeaderChild,
|
|
1644
|
+
name: item.title,
|
|
1645
|
+
key: item.dataIndex,
|
|
1646
|
+
width: item.width || 150
|
|
1647
|
+
});
|
|
1648
|
+
return acc;
|
|
1649
|
+
}, {}),
|
|
1650
|
+
itemKey: getKmColumns()["KM_EXCHANGE_GOODS"].reduce(function (acc, item) {
|
|
1651
|
+
acc[item.dataIndex] = item.title;
|
|
1652
|
+
return acc;
|
|
1653
|
+
}, {}),
|
|
1654
|
+
moneyKey: "price"
|
|
1655
|
+
},
|
|
1620
1656
|
JY_GOODS: {
|
|
1621
1657
|
headerMap: {
|
|
1622
1658
|
productName: {
|
|
@@ -2147,7 +2183,7 @@ var GoodHeaderMap = {
|
|
|
2147
2183
|
},
|
|
2148
2184
|
sellTotal: {
|
|
2149
2185
|
component: BsHeaderChild,
|
|
2150
|
-
name: "
|
|
2186
|
+
name: "总金额",
|
|
2151
2187
|
key: "sellTotal",
|
|
2152
2188
|
width: 150
|
|
2153
2189
|
},
|
|
@@ -2219,7 +2255,15 @@ var GoodHeaderMap = {
|
|
|
2219
2255
|
component: BsHeaderChild,
|
|
2220
2256
|
name: "是否预售货品",
|
|
2221
2257
|
key: "isPresell",
|
|
2222
|
-
width: 150
|
|
2258
|
+
width: 150,
|
|
2259
|
+
transformValue: function transformValue(val) {
|
|
2260
|
+
if (isNull(val)) return "--";
|
|
2261
|
+
return val === "1" ? "是" : "否";
|
|
2262
|
+
},
|
|
2263
|
+
renderExport: function renderExport(val) {
|
|
2264
|
+
if (isNull(val)) return "--";
|
|
2265
|
+
return val === "1" ? "是" : "否";
|
|
2266
|
+
}
|
|
2223
2267
|
},
|
|
2224
2268
|
brandName: {
|
|
2225
2269
|
component: BsHeaderChild,
|
|
@@ -133,6 +133,41 @@ var typeMap = {
|
|
|
133
133
|
idKey: "systemOrderId",
|
|
134
134
|
failValue: "失败",
|
|
135
135
|
dataType: "array_object"
|
|
136
|
+
},
|
|
137
|
+
JKY_WAREHOUSING_STATUS: {
|
|
138
|
+
options: [{
|
|
139
|
+
value: "0",
|
|
140
|
+
label: "未收货",
|
|
141
|
+
color: "#ff4d4f"
|
|
142
|
+
}, {
|
|
143
|
+
value: "1",
|
|
144
|
+
label: "部分收货",
|
|
145
|
+
color: "#e7780f"
|
|
146
|
+
}, {
|
|
147
|
+
value: "2",
|
|
148
|
+
label: "收货完成",
|
|
149
|
+
color: "#52c41a"
|
|
150
|
+
}, {
|
|
151
|
+
label: "收货完成-少收",
|
|
152
|
+
value: "3",
|
|
153
|
+
color: "#e7780f"
|
|
154
|
+
}, {
|
|
155
|
+
label: "收货完成-超收",
|
|
156
|
+
value: "4",
|
|
157
|
+
color: "#e7780f"
|
|
158
|
+
}, {
|
|
159
|
+
label: "无需收货",
|
|
160
|
+
value: "5",
|
|
161
|
+
color: "#52c41a"
|
|
162
|
+
}],
|
|
163
|
+
key: "jkyInStockStatusItemList",
|
|
164
|
+
code: "jkyInStockStatusList",
|
|
165
|
+
name: "商品入库状态(勿填)",
|
|
166
|
+
type: 2,
|
|
167
|
+
valueKey: "status",
|
|
168
|
+
idKey: "sourceTradeNo",
|
|
169
|
+
failValue: "失败",
|
|
170
|
+
dataType: "array_object"
|
|
136
171
|
}
|
|
137
172
|
};
|
|
138
173
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -158,7 +193,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
158
193
|
_defineProperty(this, "dataType", void 0);
|
|
159
194
|
_defineProperty(this, "isSingleValue", void 0);
|
|
160
195
|
_defineProperty(this, "renderClient", function (record) {
|
|
161
|
-
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
|
|
196
|
+
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
|
|
162
197
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
163
198
|
return !isNull(item);
|
|
164
199
|
}) : false;
|
|
@@ -167,16 +202,17 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
167
202
|
label: _this.name,
|
|
168
203
|
value: /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
169
204
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
205
|
+
idKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.idKey,
|
|
206
|
+
valueKey: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.valueKey,
|
|
207
|
+
failValue: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.failValue,
|
|
208
|
+
options: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.options,
|
|
173
209
|
isShowPopover: !_this.isSingleValue
|
|
174
210
|
})
|
|
175
211
|
}) : null;
|
|
176
212
|
});
|
|
177
213
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
178
|
-
var _typeMap$_this$
|
|
179
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
214
|
+
var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8, _typeMap$_this$type9;
|
|
215
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
|
|
180
216
|
//兼容多个商品
|
|
181
217
|
return /*#__PURE__*/React.createElement("span", {
|
|
182
218
|
onClick: function onClick(e) {
|
|
@@ -184,40 +220,41 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
184
220
|
}
|
|
185
221
|
}, /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
186
222
|
list: list,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
223
|
+
idKey: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.idKey,
|
|
224
|
+
valueKey: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.valueKey,
|
|
225
|
+
failValue: (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.failValue,
|
|
226
|
+
options: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.options,
|
|
190
227
|
isShowPopover: !_this.isSingleValue
|
|
191
228
|
}));
|
|
192
229
|
});
|
|
193
230
|
_defineProperty(this, "renderLog", function (r) {
|
|
194
|
-
var _typeMap$_this$
|
|
195
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
231
|
+
var _typeMap$_this$type10;
|
|
232
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
196
233
|
if (isNull(list)) return null;
|
|
197
234
|
return _this.renderPc(undefined, r);
|
|
198
235
|
});
|
|
199
236
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
200
|
-
var _typeMap$_this$
|
|
201
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
237
|
+
var _typeMap$_this$type11;
|
|
238
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.key)];
|
|
202
239
|
});
|
|
203
240
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
204
|
-
var _typeMap$_this$
|
|
205
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
241
|
+
var _typeMap$_this$type12;
|
|
242
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.key)];
|
|
206
243
|
return (list || []).map(function (item) {
|
|
207
|
-
var _typeMap$_this$
|
|
208
|
-
var currentOption = (_typeMap$_this$
|
|
209
|
-
var _typeMap$_this$
|
|
210
|
-
return item[(_typeMap$_this$
|
|
244
|
+
var _typeMap$_this$type13, _typeMap$_this$type14, _typeMap$_this$type15, _typeMap$_this$type18, _typeMap$_this$type19;
|
|
245
|
+
var currentOption = (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : (_typeMap$_this$type14 = _typeMap$_this$type13.options) === null || _typeMap$_this$type14 === void 0 ? void 0 : (_typeMap$_this$type15 = _typeMap$_this$type14.find) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.call(_typeMap$_this$type14, function (option) {
|
|
246
|
+
var _typeMap$_this$type16;
|
|
247
|
+
return item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey] === option.value;
|
|
211
248
|
});
|
|
212
249
|
if (_this.isSingleValue) {
|
|
213
|
-
var _typeMap$_this$
|
|
214
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
250
|
+
var _typeMap$_this$type17;
|
|
251
|
+
return 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]) || "";
|
|
215
252
|
}
|
|
216
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
253
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.valueKey]) || "");
|
|
217
254
|
}).join(",");
|
|
218
255
|
});
|
|
219
256
|
_defineProperty(this, "editRender", function (p) {
|
|
220
|
-
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$
|
|
257
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type20;
|
|
221
258
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
222
259
|
title: _this.name,
|
|
223
260
|
name: _this.id,
|
|
@@ -227,19 +264,19 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
227
264
|
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,
|
|
228
265
|
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 : "",
|
|
229
266
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
230
|
-
type: (_typeMap$_this$
|
|
267
|
+
type: (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.type,
|
|
231
268
|
failValue: typeMap[_this.type].failValue
|
|
232
269
|
}))
|
|
233
270
|
});
|
|
234
271
|
});
|
|
235
272
|
_defineProperty(this, "filterConfig", function (item) {
|
|
236
|
-
var _typeMap$_this$
|
|
273
|
+
var _typeMap$_this$type21, _item$templateConfig;
|
|
237
274
|
return {
|
|
238
|
-
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
275
|
+
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
239
276
|
type: item.type,
|
|
240
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
277
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.code),
|
|
241
278
|
name: "".concat(_this.name),
|
|
242
|
-
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
279
|
+
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
243
280
|
props: {
|
|
244
281
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
245
282
|
fieldNames: {
|
|
@@ -250,11 +287,11 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
250
287
|
},
|
|
251
288
|
filterFn: function filterFn(value) {
|
|
252
289
|
return function (i) {
|
|
253
|
-
var _typeMap$_this$
|
|
254
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
290
|
+
var _typeMap$_this$type22;
|
|
291
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type22 = typeMap[_this.type]) === null || _typeMap$_this$type22 === void 0 ? void 0 : _typeMap$_this$type22.code), value);
|
|
255
292
|
};
|
|
256
293
|
},
|
|
257
|
-
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
294
|
+
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS", "JKY_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
258
295
|
if (value.type === "in") {
|
|
259
296
|
return value.keywords;
|
|
260
297
|
} else {
|
|
@@ -279,17 +316,17 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
279
316
|
required: true,
|
|
280
317
|
validator: function validator(_, value) {
|
|
281
318
|
var hasNo = (value || []).some(function (item) {
|
|
282
|
-
var _typeMap$_this$
|
|
283
|
-
return item[(_typeMap$_this$
|
|
319
|
+
var _typeMap$_this$type23;
|
|
320
|
+
return item[(_typeMap$_this$type23 = typeMap[_this.type]) === null || _typeMap$_this$type23 === void 0 ? void 0 : _typeMap$_this$type23.valueKey];
|
|
284
321
|
});
|
|
285
322
|
if (!hasNo) {
|
|
286
|
-
var _typeMap$_this$
|
|
287
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
323
|
+
var _typeMap$_this$type24;
|
|
324
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type24 = typeMap[_this.type]) === null || _typeMap$_this$type24 === void 0 ? void 0 : _typeMap$_this$type24.name)));
|
|
288
325
|
}
|
|
289
326
|
return Promise.resolve();
|
|
290
327
|
}
|
|
291
328
|
}] : [];
|
|
292
329
|
this.align = "left";
|
|
293
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS";
|
|
330
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS" || this.type === "JKY_WAREHOUSING_STATUS";
|
|
294
331
|
});
|
|
295
332
|
export default CommonMultiStatus;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
declare class KmExchange 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
|
+
returnGoods: CommonHeaderGoods;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: () => null;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
22
|
+
getComponentValue: (r: Record) => {
|
|
23
|
+
kmExchangeGoods: any;
|
|
24
|
+
};
|
|
25
|
+
renderExport: (value: any, record: any) => null;
|
|
26
|
+
editRender: (p: any) => React.JSX.Element;
|
|
27
|
+
filterConfig: (item: ColumnConfig) => {
|
|
28
|
+
searchDefaultConditions: "like";
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
filterComponentType: "Input";
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
export default KmExchange;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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); }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 "react";
|
|
12
|
+
import GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { SYMBOL } from "../../../constant";
|
|
17
|
+
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
|
+
import { CommonExchangeGoods, erpFormValidator } from "@kmkf-fe-packages/basic-components";
|
|
19
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
var KmExchange = /*#__PURE__*/_createClass(function KmExchange(options) {
|
|
21
|
+
var _this = this,
|
|
22
|
+
_this$componentConfig6,
|
|
23
|
+
_this$componentConfig8;
|
|
24
|
+
_classCallCheck(this, KmExchange);
|
|
25
|
+
_defineProperty(this, "name", void 0);
|
|
26
|
+
_defineProperty(this, "id", void 0);
|
|
27
|
+
_defineProperty(this, "sortField", void 0);
|
|
28
|
+
_defineProperty(this, "type", void 0);
|
|
29
|
+
_defineProperty(this, "rules", void 0);
|
|
30
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
31
|
+
_defineProperty(this, "effects", void 0);
|
|
32
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
33
|
+
_defineProperty(this, "formField", void 0);
|
|
34
|
+
_defineProperty(this, "canSort", void 0);
|
|
35
|
+
_defineProperty(this, "children", void 0);
|
|
36
|
+
_defineProperty(this, "dataType", void 0);
|
|
37
|
+
_defineProperty(this, "returnGoods", void 0);
|
|
38
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
+
var _this$componentConfig;
|
|
40
|
+
var kmExchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_kmExchangeGoods")]) || "[]");
|
|
41
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
+
id: "".concat(_this.id, "-out"),
|
|
43
|
+
label: "".concat(_this.name, "-\u6362\u51FA"),
|
|
44
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
45
|
+
type: _this.type,
|
|
46
|
+
list: kmExchangeGoods || [],
|
|
47
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
48
|
+
})
|
|
49
|
+
})) : null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderPc", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
55
|
+
var _r, _this$componentConfig2;
|
|
56
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_kmExchangeGoods")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
57
|
+
type: _this.type,
|
|
58
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_kmExchangeGoods")]) || [],
|
|
59
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
60
|
+
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
61
|
+
});
|
|
62
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
63
|
+
return {
|
|
64
|
+
kmExchangeGoods: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_kmExchangeGoods")]
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
68
|
+
return null;
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(this, "editRender", function (p) {
|
|
71
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3, _this$effects4;
|
|
72
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
73
|
+
title: _this.name,
|
|
74
|
+
name: _this.id,
|
|
75
|
+
rules: _this.rules,
|
|
76
|
+
required: false,
|
|
77
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
78
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
79
|
+
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 : "",
|
|
80
|
+
component: /*#__PURE__*/React.createElement(CommonExchangeGoods, _extends({}, _this.componentConfig, {
|
|
81
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
82
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
83
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
84
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
85
|
+
form: (_this$effects4 = _this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.form,
|
|
86
|
+
width: "90%",
|
|
87
|
+
type: "KM_EXCHANGE_GOODS"
|
|
88
|
+
}))
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
92
|
+
return [{
|
|
93
|
+
searchDefaultConditions: SYMBOL.like,
|
|
94
|
+
type: item.type,
|
|
95
|
+
id: "".concat(item.id, "_kmExchangeGoods"),
|
|
96
|
+
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
97
|
+
filterComponentType: "Input"
|
|
98
|
+
}];
|
|
99
|
+
});
|
|
100
|
+
this.name = options.name;
|
|
101
|
+
this.id = options.id;
|
|
102
|
+
this.sortField = "".concat(options.id);
|
|
103
|
+
this.formField = "".concat(options.id);
|
|
104
|
+
this.type = options.type;
|
|
105
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
106
|
+
this.isCombinationComponent = true;
|
|
107
|
+
this.canSort = false;
|
|
108
|
+
this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
109
|
+
id: "".concat(options.id, "_kmExchangeGoods"),
|
|
110
|
+
name: "商品信息"
|
|
111
|
+
}));
|
|
112
|
+
this.children = [this.returnGoods];
|
|
113
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
114
|
+
this.rules = [{
|
|
115
|
+
required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
|
|
116
|
+
validator: function validator(_, value) {
|
|
117
|
+
var _this$componentConfig7, _value$kmExchangeGood;
|
|
118
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && (_value$kmExchangeGood = value.kmExchangeGoods) !== null && _value$kmExchangeGood !== void 0 && _value$kmExchangeGood.length)) {
|
|
119
|
+
return Promise.reject(new Error("请选择快麦换货商品"));
|
|
120
|
+
}
|
|
121
|
+
return Promise.resolve();
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
|
|
125
|
+
validator: function validator(_rule, value) {
|
|
126
|
+
if (!_rule.required) return Promise.resolve();
|
|
127
|
+
var validatorFlag = erpFormValidator(_rule, value, "KM_EXCHANGE_GOODS", _this.componentConfig);
|
|
128
|
+
if (validatorFlag) {
|
|
129
|
+
return validatorFlag;
|
|
130
|
+
}
|
|
131
|
+
return Promise.resolve();
|
|
132
|
+
}
|
|
133
|
+
}];
|
|
134
|
+
this.dataType = "object";
|
|
135
|
+
});
|
|
136
|
+
export default KmExchange;
|
|
@@ -19,6 +19,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
dataType: ComponentInterface["dataType"];
|
|
21
21
|
isChange: boolean;
|
|
22
|
+
compoundConfig: ComponentInterface["compoundConfig"];
|
|
22
23
|
constructor(options: PickOption);
|
|
23
24
|
editRender: (p: any) => React.JSX.Element;
|
|
24
25
|
renderClient: (record: Record) => React.JSX.Element;
|