@kmkf-fe-packages/basic-components 2.3.15 → 2.3.17
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/index.esm.js +677 -104
- package/dist/index.js +677 -104
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8701,6 +8701,21 @@ var processErpSendGood = function processErpSendGood(getValue) {
|
|
|
8701
8701
|
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8702
8702
|
};
|
|
8703
8703
|
};
|
|
8704
|
+
var processErpReturnWarehouse = function processErpReturnWarehouse(getValue) {
|
|
8705
|
+
return function (nex, config) {
|
|
8706
|
+
var kmReturnWarehouseMap = {
|
|
8707
|
+
KM_RETURN_WAREHOUSE: {
|
|
8708
|
+
list: 'kmReturnWarehouse'
|
|
8709
|
+
}
|
|
8710
|
+
};
|
|
8711
|
+
var initValue = [{
|
|
8712
|
+
kmReturnWarehouseName: '',
|
|
8713
|
+
kmReturnWarehouseId: ''
|
|
8714
|
+
}];
|
|
8715
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(kmReturnWarehouseMap[nex.workOrderComponentType].list)), initValue);
|
|
8716
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8717
|
+
};
|
|
8718
|
+
};
|
|
8704
8719
|
var processBsPosting = function processBsPosting(getValue) {
|
|
8705
8720
|
return function (nex, config) {
|
|
8706
8721
|
var bsAddress = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingCity")))];
|
|
@@ -9000,6 +9015,14 @@ var processWdtExchangeGoods = function processWdtExchangeGoods(getValue) {
|
|
|
9000
9015
|
});
|
|
9001
9016
|
};
|
|
9002
9017
|
};
|
|
9018
|
+
var processKmExchangeGoods = function processKmExchangeGoods(getValue) {
|
|
9019
|
+
return function (nex, config) {
|
|
9020
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9021
|
+
kmExchangeGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmExchangeGoods")), []),
|
|
9022
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
9023
|
+
});
|
|
9024
|
+
};
|
|
9025
|
+
};
|
|
9003
9026
|
var processJstExchangeGoods = function processJstExchangeGoods(getValue) {
|
|
9004
9027
|
return function (nex, config) {
|
|
9005
9028
|
return _defineProperty({}, nex.uniqueKey, {
|
|
@@ -9216,6 +9239,28 @@ var processKmReissueGoods = function processKmReissueGoods(templateColumns) {
|
|
|
9216
9239
|
};
|
|
9217
9240
|
};
|
|
9218
9241
|
};
|
|
9242
|
+
var processKmReturnGoods = function processKmReturnGoods(templateColumns) {
|
|
9243
|
+
return function (getValue) {
|
|
9244
|
+
return function (nex, config) {
|
|
9245
|
+
var orderNo = '';
|
|
9246
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9247
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9248
|
+
});
|
|
9249
|
+
if (tradeId) {
|
|
9250
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9251
|
+
}
|
|
9252
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9253
|
+
kmSystemOrder: {
|
|
9254
|
+
orderNo: orderNo
|
|
9255
|
+
},
|
|
9256
|
+
kmReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReturnType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9257
|
+
kmReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReturnGoods")), []),
|
|
9258
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9259
|
+
kmSystemOrderNo: getValue("".concat(nex.uniqueKey, "_kmSystemOrderNo"))
|
|
9260
|
+
});
|
|
9261
|
+
};
|
|
9262
|
+
};
|
|
9263
|
+
};
|
|
9219
9264
|
var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
|
|
9220
9265
|
return function (getValue) {
|
|
9221
9266
|
return function (nex, config) {
|
|
@@ -9309,14 +9354,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
|
|
|
9309
9354
|
};
|
|
9310
9355
|
var processLabel = function processLabel(getValue) {
|
|
9311
9356
|
return function (nex, config) {
|
|
9312
|
-
var
|
|
9313
|
-
return
|
|
9357
|
+
var _ref77;
|
|
9358
|
+
return _ref77 = {}, _defineProperty(_ref77, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref77, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref77;
|
|
9314
9359
|
};
|
|
9315
9360
|
};
|
|
9316
9361
|
var processMemberLevel = function processMemberLevel(getValue) {
|
|
9317
9362
|
return function (nex, config) {
|
|
9318
|
-
var
|
|
9319
|
-
return
|
|
9363
|
+
var _ref78;
|
|
9364
|
+
return _ref78 = {}, _defineProperty(_ref78, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref78, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref78;
|
|
9320
9365
|
};
|
|
9321
9366
|
};
|
|
9322
9367
|
var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
|
|
@@ -9433,6 +9478,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9433
9478
|
BS_E3_SEND_GOOD: processErpSendGood,
|
|
9434
9479
|
KM_SEND_GOOD: processErpSendGood,
|
|
9435
9480
|
GY_SEND_GOOD: processErpSendGood,
|
|
9481
|
+
KM_RETURN_WAREHOUSE: processErpReturnWarehouse,
|
|
9436
9482
|
BS_POSTING: processBsPosting,
|
|
9437
9483
|
BS_GOODS: processBsGoods,
|
|
9438
9484
|
WDT_GOODS: processWdtGoods(templateColumns),
|
|
@@ -9443,10 +9489,12 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9443
9489
|
GY_GOODS: processGyGoods(templateColumns),
|
|
9444
9490
|
KM_GOODS: processKmGoods(templateColumns),
|
|
9445
9491
|
KM_REISSUE_GOODS: processKmReissueGoods(templateColumns),
|
|
9492
|
+
KM_RETURN_GOODS: processKmReturnGoods(templateColumns),
|
|
9446
9493
|
JST_GOODS: processJstGoods(templateColumns),
|
|
9447
9494
|
BS_REISSUE_GOODS: processBsReissueGoods,
|
|
9448
9495
|
BS_EXCHANGE_GOODS: processBsExchangeGoods,
|
|
9449
9496
|
WDT_EXCHANGE_GOODS: processWdtExchangeGoods,
|
|
9497
|
+
KM_EXCHANGE_GOODS: processKmExchangeGoods,
|
|
9450
9498
|
JST_EXCHANGE_GOODS: processJstExchangeGoods,
|
|
9451
9499
|
BS_RETURN_GOODS: processBsReturnGoods,
|
|
9452
9500
|
WDT_RETURN_GOODS: processWdtReturnGoods(),
|
|
@@ -14037,10 +14085,14 @@ var typeInitValueMap = {
|
|
|
14037
14085
|
}],
|
|
14038
14086
|
4: [{
|
|
14039
14087
|
deliveryNo: null
|
|
14088
|
+
}],
|
|
14089
|
+
5: [{
|
|
14090
|
+
returnWarehouseName: null,
|
|
14091
|
+
returnWarehouseId: null
|
|
14040
14092
|
}]
|
|
14041
14093
|
};
|
|
14042
14094
|
var jstGoods = function jstGoods(props) {
|
|
14043
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12, _value$changeIndex13;
|
|
14095
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12, _value$changeIndex13, _value$changeIndex14, _value$changeIndex15, _value$changeIndex16, _value$changeIndex17;
|
|
14044
14096
|
var _props$value = props.value,
|
|
14045
14097
|
value = _props$value === void 0 ? [] : _props$value,
|
|
14046
14098
|
onChange = props.onChange,
|
|
@@ -14113,6 +14165,21 @@ var jstGoods = function jstGoods(props) {
|
|
|
14113
14165
|
newList[changeIndex] = changeOrderInfo;
|
|
14114
14166
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
14115
14167
|
};
|
|
14168
|
+
var handleSelectedReturn = function handleSelectedReturn(val, type, option, onlyShowFieldSelect) {
|
|
14169
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
14170
|
+
changeOrderInfo[type] = val;
|
|
14171
|
+
if (!onlyShowFieldSelect) {
|
|
14172
|
+
changeOrderInfo['returnWarehouseId'] = option.value;
|
|
14173
|
+
}
|
|
14174
|
+
if (isSelectName && type === 'returnWarehouseName') {
|
|
14175
|
+
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
14176
|
+
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
14177
|
+
changeOrderInfo['returnWarehouseName'] = option.label;
|
|
14178
|
+
}
|
|
14179
|
+
var newList = _toConsumableArray(value);
|
|
14180
|
+
newList[changeIndex] = changeOrderInfo;
|
|
14181
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
14182
|
+
};
|
|
14116
14183
|
var filterOption = function filterOption(input, option) {
|
|
14117
14184
|
var _option$label;
|
|
14118
14185
|
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
@@ -14227,7 +14294,35 @@ var jstGoods = function jstGoods(props) {
|
|
|
14227
14294
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
14228
14295
|
},
|
|
14229
14296
|
value: (_value$changeIndex13 = value[changeIndex]) === null || _value$changeIndex13 === void 0 ? void 0 : _value$changeIndex13.sendName
|
|
14230
|
-
})) : null
|
|
14297
|
+
})) : null, type === 5 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['returnWarehouseId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14298
|
+
disabled: disabled,
|
|
14299
|
+
placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u4ED3\u7F16\u7801",
|
|
14300
|
+
onChange: function onChange(e) {
|
|
14301
|
+
return changeInputHandle(e.target.value, 'returnWarehouseId');
|
|
14302
|
+
},
|
|
14303
|
+
value: (_value$changeIndex14 = value[changeIndex]) === null || _value$changeIndex14 === void 0 ? void 0 : _value$changeIndex14.returnWarehouseId
|
|
14304
|
+
}), ['returnWarehouseName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14305
|
+
style: {
|
|
14306
|
+
minWidth: '100px',
|
|
14307
|
+
maxWidth: '180px'
|
|
14308
|
+
},
|
|
14309
|
+
disabled: disabled,
|
|
14310
|
+
placeholder: "\u9000\u8D27\u4ED3\u540D\u79F0",
|
|
14311
|
+
showSearch: true,
|
|
14312
|
+
options: sendOptions,
|
|
14313
|
+
filterOption: filterOption,
|
|
14314
|
+
value: ((_value$changeIndex15 = value[changeIndex]) === null || _value$changeIndex15 === void 0 ? void 0 : _value$changeIndex15.sendSnapshotId) || ((_value$changeIndex16 = value[changeIndex]) === null || _value$changeIndex16 === void 0 ? void 0 : _value$changeIndex16.returnWarehouseName) || null,
|
|
14315
|
+
onChange: function onChange(value, option) {
|
|
14316
|
+
return handleSelectedReturn(value, 'returnWarehouseName', option, onlyShowFieldSelect);
|
|
14317
|
+
}
|
|
14318
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14319
|
+
disabled: disabled,
|
|
14320
|
+
placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u4ED3\u540D\u79F0",
|
|
14321
|
+
onChange: function onChange(e) {
|
|
14322
|
+
return changeInputHandle(e.target.value, 'returnWarehouseName');
|
|
14323
|
+
},
|
|
14324
|
+
value: (_value$changeIndex17 = value[changeIndex]) === null || _value$changeIndex17 === void 0 ? void 0 : _value$changeIndex17.returnWarehouseName
|
|
14325
|
+
}))) : null) : null);
|
|
14231
14326
|
};
|
|
14232
14327
|
|
|
14233
14328
|
var css_248z$a = ".jstGoodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.jstGoodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.jstGoodsBox .right-context {\n font-size: 12px;\n}\n.jstGoodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.jstGoodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.jstGoodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.jstimgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.jstimgBox .add-btn {\n color: #86909c;\n}\n.jstimgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
@@ -21696,16 +21791,28 @@ function toNum$3(value) {
|
|
|
21696
21791
|
}
|
|
21697
21792
|
return void 0;
|
|
21698
21793
|
}
|
|
21699
|
-
var
|
|
21700
|
-
|
|
21794
|
+
var isNumberOrNumberString$2 = function isNumberOrNumberString(value) {
|
|
21795
|
+
if (typeof value === 'number') return true;
|
|
21796
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
21797
|
+
return false;
|
|
21798
|
+
};
|
|
21799
|
+
var getColumns$6 = function getColumns() {
|
|
21800
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
21801
|
+
_ref$text = _ref.text,
|
|
21701
21802
|
disabled = _ref.disabled,
|
|
21702
|
-
updateHandle = _ref.updateHandle
|
|
21803
|
+
updateHandle = _ref.updateHandle,
|
|
21804
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
21703
21805
|
return {
|
|
21704
21806
|
KM_GOODS: [{
|
|
21705
21807
|
dataIndex: 'skuPropertiesName',
|
|
21706
21808
|
title: "\u89C4\u683C\u540D\u79F0",
|
|
21707
21809
|
width: 250,
|
|
21708
21810
|
render: renderTextEllipsis
|
|
21811
|
+
}, {
|
|
21812
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
21813
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
21814
|
+
width: 150,
|
|
21815
|
+
render: renderTextEllipsis
|
|
21709
21816
|
}, {
|
|
21710
21817
|
dataIndex: 'sysTitle',
|
|
21711
21818
|
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
@@ -21829,6 +21936,11 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21829
21936
|
title: "\u89C4\u683C\u540D\u79F0",
|
|
21830
21937
|
width: 250,
|
|
21831
21938
|
render: renderTextEllipsis
|
|
21939
|
+
}, {
|
|
21940
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
21941
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
21942
|
+
width: 150,
|
|
21943
|
+
render: renderTextEllipsis
|
|
21832
21944
|
}, {
|
|
21833
21945
|
dataIndex: 'sysTitle',
|
|
21834
21946
|
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
@@ -21873,7 +21985,9 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21873
21985
|
dataIndex: 'realNum',
|
|
21874
21986
|
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
21875
21987
|
width: 100,
|
|
21876
|
-
validator: function validator(_rule, value) {
|
|
21988
|
+
validator: function validator(_rule, value, extraParams) {
|
|
21989
|
+
console.log('实际补发数量-extraParams', extraParams);
|
|
21990
|
+
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
21877
21991
|
var title = '';
|
|
21878
21992
|
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
21879
21993
|
var realNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
@@ -21901,8 +22015,21 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21901
22015
|
}
|
|
21902
22016
|
}, {
|
|
21903
22017
|
dataIndex: 'desiredNum',
|
|
21904
|
-
title: "\
|
|
22018
|
+
title: "\u7533\u8BF7\u8865\u53D1\u6570\u91CF",
|
|
21905
22019
|
width: 100,
|
|
22020
|
+
validator: function validator(_rule, value) {
|
|
22021
|
+
var title = '';
|
|
22022
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
22023
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22024
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22025
|
+
if (res) {
|
|
22026
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22027
|
+
}
|
|
22028
|
+
return res;
|
|
22029
|
+
})) {
|
|
22030
|
+
return Promise.reject("".concat(title, "\u7533\u8BF7\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22031
|
+
}
|
|
22032
|
+
},
|
|
21906
22033
|
render: function render(val, record, index) {
|
|
21907
22034
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
21908
22035
|
style: {
|
|
@@ -21971,11 +22098,336 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21971
22098
|
align: 'center',
|
|
21972
22099
|
ellipsis: true
|
|
21973
22100
|
});
|
|
22101
|
+
}),
|
|
22102
|
+
KM_RETURN_GOODS: [{
|
|
22103
|
+
dataIndex: 'skuPropertiesName',
|
|
22104
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
22105
|
+
width: 250,
|
|
22106
|
+
render: renderTextEllipsis
|
|
22107
|
+
}, {
|
|
22108
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
22109
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
22110
|
+
width: 150,
|
|
22111
|
+
render: renderTextEllipsis
|
|
22112
|
+
}, {
|
|
22113
|
+
dataIndex: 'sysTitle',
|
|
22114
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
22115
|
+
width: 150,
|
|
22116
|
+
render: renderTextEllipsis
|
|
22117
|
+
}, {
|
|
22118
|
+
dataIndex: 'shortTitle',
|
|
22119
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
22120
|
+
width: 150,
|
|
22121
|
+
render: renderTextEllipsis
|
|
22122
|
+
}, {
|
|
22123
|
+
dataIndex: 'title',
|
|
22124
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
22125
|
+
width: 150,
|
|
22126
|
+
render: renderTextEllipsis
|
|
22127
|
+
}, {
|
|
22128
|
+
dataIndex: 'sysOuterId',
|
|
22129
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
22130
|
+
width: 150,
|
|
22131
|
+
render: renderTextEllipsis
|
|
22132
|
+
}, {
|
|
22133
|
+
dataIndex: 'itemSysId',
|
|
22134
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
22135
|
+
width: 150,
|
|
22136
|
+
render: renderTextEllipsis
|
|
22137
|
+
}, {
|
|
22138
|
+
dataIndex: 'skuSysId',
|
|
22139
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
22140
|
+
width: 150,
|
|
22141
|
+
render: renderTextEllipsis
|
|
22142
|
+
}, {
|
|
22143
|
+
dataIndex: 'skuId',
|
|
22144
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
22145
|
+
width: 170,
|
|
22146
|
+
render: renderTextEllipsis
|
|
22147
|
+
}, {
|
|
22148
|
+
dataIndex: 'outerSkuId',
|
|
22149
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u7801",
|
|
22150
|
+
width: 170,
|
|
22151
|
+
render: renderTextEllipsis
|
|
22152
|
+
}, {
|
|
22153
|
+
dataIndex: 'realNum',
|
|
22154
|
+
title: "\u5B9E\u9645\u9000\u8D27\u6570\u91CF",
|
|
22155
|
+
width: 100,
|
|
22156
|
+
render: function render(val, record, index) {
|
|
22157
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22158
|
+
style: {
|
|
22159
|
+
width: 70
|
|
22160
|
+
},
|
|
22161
|
+
value: val,
|
|
22162
|
+
min: 1,
|
|
22163
|
+
precision: 0,
|
|
22164
|
+
onChange: function onChange(num) {
|
|
22165
|
+
updateDataHandle({
|
|
22166
|
+
realNum: num,
|
|
22167
|
+
refundMoney: num && isNumberOrNumberString$2(record.price) ? num * record.price : null
|
|
22168
|
+
}, index);
|
|
22169
|
+
}
|
|
22170
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22171
|
+
}
|
|
22172
|
+
}, {
|
|
22173
|
+
dataIndex: 'desiredNum',
|
|
22174
|
+
title: "\u7533\u8BF7\u9000\u8D27\u6570\u91CF",
|
|
22175
|
+
width: 100,
|
|
22176
|
+
validator: function validator(_rule, value) {
|
|
22177
|
+
var title = '';
|
|
22178
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReturnGoods) || []).some(function (goods) {
|
|
22179
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22180
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22181
|
+
if (res) {
|
|
22182
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22183
|
+
}
|
|
22184
|
+
return res;
|
|
22185
|
+
})) {
|
|
22186
|
+
return Promise.reject("".concat(title, "\u7533\u8BF7\u9000\u8D27\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22187
|
+
}
|
|
22188
|
+
},
|
|
22189
|
+
render: function render(val, record, index) {
|
|
22190
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22191
|
+
style: {
|
|
22192
|
+
width: 70
|
|
22193
|
+
},
|
|
22194
|
+
value: val,
|
|
22195
|
+
min: 1,
|
|
22196
|
+
precision: 0,
|
|
22197
|
+
onChange: function onChange(num) {
|
|
22198
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
22199
|
+
}
|
|
22200
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22201
|
+
}
|
|
22202
|
+
}, {
|
|
22203
|
+
dataIndex: 'goodNum',
|
|
22204
|
+
title: "\u826F\u54C1\u6570",
|
|
22205
|
+
width: 100,
|
|
22206
|
+
render: function render(val, record, index) {
|
|
22207
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22208
|
+
style: {
|
|
22209
|
+
width: 70
|
|
22210
|
+
},
|
|
22211
|
+
value: val,
|
|
22212
|
+
min: 1,
|
|
22213
|
+
precision: 0,
|
|
22214
|
+
onChange: function onChange(num) {
|
|
22215
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'goodNum');
|
|
22216
|
+
}
|
|
22217
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22218
|
+
}
|
|
22219
|
+
}, {
|
|
22220
|
+
dataIndex: 'defectiveNum',
|
|
22221
|
+
title: "\u6B21\u54C1\u6570",
|
|
22222
|
+
width: 100,
|
|
22223
|
+
render: function render(val, record, index) {
|
|
22224
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22225
|
+
style: {
|
|
22226
|
+
width: 70
|
|
22227
|
+
},
|
|
22228
|
+
value: val,
|
|
22229
|
+
min: 1,
|
|
22230
|
+
precision: 0,
|
|
22231
|
+
onChange: function onChange(num) {
|
|
22232
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'defectiveNum');
|
|
22233
|
+
}
|
|
22234
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22235
|
+
}
|
|
22236
|
+
}, {
|
|
22237
|
+
dataIndex: 'price',
|
|
22238
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
22239
|
+
width: 150,
|
|
22240
|
+
render: function render(val) {
|
|
22241
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
22242
|
+
}
|
|
22243
|
+
}, {
|
|
22244
|
+
dataIndex: 'refundMoney',
|
|
22245
|
+
title: "\u5B9E\u9000\u91D1\u989D",
|
|
22246
|
+
width: 150,
|
|
22247
|
+
render: function render(val, record, index) {
|
|
22248
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22249
|
+
style: {
|
|
22250
|
+
width: 130
|
|
22251
|
+
},
|
|
22252
|
+
value: val,
|
|
22253
|
+
min: 0,
|
|
22254
|
+
precision: 2,
|
|
22255
|
+
onChange: function onChange(num) {
|
|
22256
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'refundMoney');
|
|
22257
|
+
}
|
|
22258
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22259
|
+
}
|
|
22260
|
+
}, {
|
|
22261
|
+
dataIndex: 'type',
|
|
22262
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
22263
|
+
width: 150,
|
|
22264
|
+
render: renderTextEllipsis
|
|
22265
|
+
}, {
|
|
22266
|
+
dataIndex: 'sysPicPath',
|
|
22267
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
22268
|
+
width: 100,
|
|
22269
|
+
headerComponentType: 'pic',
|
|
22270
|
+
render: function render(val) {
|
|
22271
|
+
var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
|
|
22272
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
22273
|
+
width: 30,
|
|
22274
|
+
src: imgUrl
|
|
22275
|
+
});
|
|
22276
|
+
}
|
|
22277
|
+
}].map(function (item) {
|
|
22278
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22279
|
+
align: 'center',
|
|
22280
|
+
ellipsis: true
|
|
22281
|
+
});
|
|
22282
|
+
}),
|
|
22283
|
+
KM_EXCHANGE_GOODS: [{
|
|
22284
|
+
dataIndex: 'skuPropertiesName',
|
|
22285
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
22286
|
+
width: 250,
|
|
22287
|
+
render: renderTextEllipsis
|
|
22288
|
+
}, {
|
|
22289
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
22290
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
22291
|
+
width: 150,
|
|
22292
|
+
render: renderTextEllipsis
|
|
22293
|
+
}, {
|
|
22294
|
+
dataIndex: 'sysTitle',
|
|
22295
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
22296
|
+
width: 150,
|
|
22297
|
+
render: renderTextEllipsis
|
|
22298
|
+
}, {
|
|
22299
|
+
dataIndex: 'shortTitle',
|
|
22300
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
22301
|
+
width: 150,
|
|
22302
|
+
render: renderTextEllipsis
|
|
22303
|
+
}, {
|
|
22304
|
+
dataIndex: 'title',
|
|
22305
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
22306
|
+
width: 150,
|
|
22307
|
+
render: renderTextEllipsis
|
|
22308
|
+
}, {
|
|
22309
|
+
dataIndex: 'sysOuterId',
|
|
22310
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
22311
|
+
width: 150,
|
|
22312
|
+
render: renderTextEllipsis
|
|
22313
|
+
}, {
|
|
22314
|
+
dataIndex: 'itemSysId',
|
|
22315
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
22316
|
+
width: 150,
|
|
22317
|
+
render: renderTextEllipsis
|
|
22318
|
+
}, {
|
|
22319
|
+
dataIndex: 'skuSysId',
|
|
22320
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
22321
|
+
width: 150,
|
|
22322
|
+
render: renderTextEllipsis
|
|
22323
|
+
}, {
|
|
22324
|
+
dataIndex: 'skuId',
|
|
22325
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
22326
|
+
width: 170,
|
|
22327
|
+
render: renderTextEllipsis
|
|
22328
|
+
}, {
|
|
22329
|
+
dataIndex: 'outerSkuId',
|
|
22330
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u7801",
|
|
22331
|
+
width: 170,
|
|
22332
|
+
render: renderTextEllipsis
|
|
22333
|
+
}, {
|
|
22334
|
+
dataIndex: 'realNum',
|
|
22335
|
+
title: "\u5B9E\u9645\u6362\u51FA\u6570\u91CF",
|
|
22336
|
+
width: 100,
|
|
22337
|
+
validator: function validator(_rule, value, extraParams) {
|
|
22338
|
+
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
22339
|
+
var title = '';
|
|
22340
|
+
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
22341
|
+
var realNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
22342
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
22343
|
+
if (res) {
|
|
22344
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22345
|
+
}
|
|
22346
|
+
return res;
|
|
22347
|
+
})) {
|
|
22348
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u6362\u51FA\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22349
|
+
}
|
|
22350
|
+
},
|
|
22351
|
+
render: function render(val, record, index) {
|
|
22352
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22353
|
+
style: {
|
|
22354
|
+
width: 70
|
|
22355
|
+
},
|
|
22356
|
+
value: val,
|
|
22357
|
+
min: 1,
|
|
22358
|
+
precision: 0,
|
|
22359
|
+
onChange: function onChange(num) {
|
|
22360
|
+
updateDataHandle({
|
|
22361
|
+
realNum: num,
|
|
22362
|
+
refundMoney: num && isNumberOrNumberString$2(record.price) ? num * record.price : null
|
|
22363
|
+
}, index);
|
|
22364
|
+
}
|
|
22365
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22366
|
+
}
|
|
22367
|
+
}, {
|
|
22368
|
+
dataIndex: 'desiredNum',
|
|
22369
|
+
title: "\u5E94\u6362\u51FA\u6570\u91CF",
|
|
22370
|
+
width: 100,
|
|
22371
|
+
validator: function validator(_rule, value) {
|
|
22372
|
+
var title = '';
|
|
22373
|
+
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
22374
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22375
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22376
|
+
if (res) {
|
|
22377
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22378
|
+
}
|
|
22379
|
+
return res;
|
|
22380
|
+
})) {
|
|
22381
|
+
return Promise.reject("".concat(title, "\u5E94\u6362\u51FA\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22382
|
+
}
|
|
22383
|
+
},
|
|
22384
|
+
render: function render(val, record, index) {
|
|
22385
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
22386
|
+
style: {
|
|
22387
|
+
width: 70
|
|
22388
|
+
},
|
|
22389
|
+
value: val,
|
|
22390
|
+
min: 1,
|
|
22391
|
+
precision: 0,
|
|
22392
|
+
onChange: function onChange(num) {
|
|
22393
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
22394
|
+
}
|
|
22395
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
22396
|
+
}
|
|
22397
|
+
}, {
|
|
22398
|
+
dataIndex: 'price',
|
|
22399
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
22400
|
+
width: 150,
|
|
22401
|
+
render: function render(val) {
|
|
22402
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
22403
|
+
}
|
|
22404
|
+
}, {
|
|
22405
|
+
dataIndex: 'type',
|
|
22406
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
22407
|
+
width: 150,
|
|
22408
|
+
render: renderTextEllipsis
|
|
22409
|
+
}, {
|
|
22410
|
+
dataIndex: 'sysPicPath',
|
|
22411
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
22412
|
+
width: 100,
|
|
22413
|
+
headerComponentType: 'pic',
|
|
22414
|
+
render: function render(val) {
|
|
22415
|
+
var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
|
|
22416
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
22417
|
+
width: 30,
|
|
22418
|
+
src: imgUrl
|
|
22419
|
+
});
|
|
22420
|
+
}
|
|
22421
|
+
}].map(function (item) {
|
|
22422
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22423
|
+
align: 'center',
|
|
22424
|
+
ellipsis: true
|
|
22425
|
+
});
|
|
21974
22426
|
})
|
|
21975
22427
|
};
|
|
21976
22428
|
};
|
|
21977
22429
|
|
|
21978
|
-
var isNumberOrNumberString$
|
|
22430
|
+
var isNumberOrNumberString$3 = function isNumberOrNumberString(value) {
|
|
21979
22431
|
if (typeof value === 'number') return true;
|
|
21980
22432
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
21981
22433
|
return false;
|
|
@@ -22113,7 +22565,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22113
22565
|
onChange: function onChange(num) {
|
|
22114
22566
|
updateDataHandle({
|
|
22115
22567
|
sellCount: num,
|
|
22116
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22568
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
|
|
22117
22569
|
}, index);
|
|
22118
22570
|
}
|
|
22119
22571
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22133,7 +22585,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22133
22585
|
onChange: function onChange(num) {
|
|
22134
22586
|
updateDataHandle({
|
|
22135
22587
|
sellPrice: num,
|
|
22136
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22588
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
|
|
22137
22589
|
}, index);
|
|
22138
22590
|
}
|
|
22139
22591
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22336,7 +22788,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22336
22788
|
onChange: function onChange(num) {
|
|
22337
22789
|
updateDataHandle({
|
|
22338
22790
|
sellCount: num,
|
|
22339
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22791
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
|
|
22340
22792
|
}, index);
|
|
22341
22793
|
}
|
|
22342
22794
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22356,7 +22808,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22356
22808
|
onChange: function onChange(num) {
|
|
22357
22809
|
updateDataHandle({
|
|
22358
22810
|
sellPrice: num,
|
|
22359
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22811
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
|
|
22360
22812
|
}, index);
|
|
22361
22813
|
}
|
|
22362
22814
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22468,7 +22920,7 @@ var getColumns$8 = function getColumns(_ref) {
|
|
|
22468
22920
|
};
|
|
22469
22921
|
};
|
|
22470
22922
|
|
|
22471
|
-
var isNumberOrNumberString$
|
|
22923
|
+
var isNumberOrNumberString$4 = function isNumberOrNumberString(value) {
|
|
22472
22924
|
if (typeof value === 'number') return true;
|
|
22473
22925
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
22474
22926
|
return false;
|
|
@@ -22558,7 +23010,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22558
23010
|
onChange: function onChange(num) {
|
|
22559
23011
|
updateDataHandle({
|
|
22560
23012
|
sellCount: num,
|
|
22561
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23013
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellPrice) ? num * record.sellPrice : null
|
|
22562
23014
|
}, index);
|
|
22563
23015
|
}
|
|
22564
23016
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22583,7 +23035,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22583
23035
|
onChange: function onChange(num) {
|
|
22584
23036
|
updateDataHandle({
|
|
22585
23037
|
sellPrice: num,
|
|
22586
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23038
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellCount) ? num * record.sellCount : null
|
|
22587
23039
|
}, index);
|
|
22588
23040
|
}
|
|
22589
23041
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22882,7 +23334,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22882
23334
|
onChange: function onChange(num) {
|
|
22883
23335
|
updateDataHandle({
|
|
22884
23336
|
sellCount: num,
|
|
22885
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23337
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellPrice) ? num * record.sellPrice : null
|
|
22886
23338
|
}, index);
|
|
22887
23339
|
}
|
|
22888
23340
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -22902,7 +23354,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22902
23354
|
onChange: function onChange(num) {
|
|
22903
23355
|
updateDataHandle({
|
|
22904
23356
|
sellPrice: num,
|
|
22905
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23357
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellCount) ? num * record.sellCount : null
|
|
22906
23358
|
}, index);
|
|
22907
23359
|
}
|
|
22908
23360
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
@@ -23130,7 +23582,8 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
23130
23582
|
})), getColumns$6({
|
|
23131
23583
|
text: text,
|
|
23132
23584
|
disabled: disabled,
|
|
23133
|
-
updateHandle: updateHandle
|
|
23585
|
+
updateHandle: updateHandle,
|
|
23586
|
+
updateDataHandle: updateDataHandle
|
|
23134
23587
|
})), getColumns$7({
|
|
23135
23588
|
text: text,
|
|
23136
23589
|
disabled: disabled,
|
|
@@ -23154,7 +23607,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
23154
23607
|
});
|
|
23155
23608
|
};
|
|
23156
23609
|
var erpColumnsMap = getColumnsMap$1();
|
|
23157
|
-
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
23610
|
+
var erpFormValidator = function erpFormValidator(_rule, value, type, extraParams) {
|
|
23158
23611
|
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
23159
23612
|
return column.validator;
|
|
23160
23613
|
}).filter(Boolean);
|
|
@@ -23164,7 +23617,7 @@ var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
|
23164
23617
|
try {
|
|
23165
23618
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
23166
23619
|
var validatorFn = _step.value;
|
|
23167
|
-
var validatorResult = validatorFn(_rule, value,
|
|
23620
|
+
var validatorResult = validatorFn(_rule, value, extraParams);
|
|
23168
23621
|
if (validatorResult) {
|
|
23169
23622
|
res = validatorResult;
|
|
23170
23623
|
break;
|
|
@@ -23289,7 +23742,7 @@ var isErpType = {
|
|
|
23289
23742
|
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
23290
23743
|
},
|
|
23291
23744
|
isKm: function isKm(type) {
|
|
23292
|
-
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
23745
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'KM_EXCHANGE_GOODS'].includes(type);
|
|
23293
23746
|
},
|
|
23294
23747
|
isJy: function isJy(type) {
|
|
23295
23748
|
return ['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type);
|
|
@@ -23554,11 +24007,17 @@ var processKmGoods$1 = function processKmGoods(_ref8) {
|
|
|
23554
24007
|
KM_REISSUE_GOODS: {
|
|
23555
24008
|
realNum: 1,
|
|
23556
24009
|
desiredNum: 1
|
|
24010
|
+
},
|
|
24011
|
+
KM_RETURN_GOODS: {},
|
|
24012
|
+
KM_EXCHANGE_GOODS: {
|
|
24013
|
+
realNum: 1,
|
|
24014
|
+
desiredNum: 1
|
|
23557
24015
|
}
|
|
23558
24016
|
};
|
|
23559
24017
|
return list.map(function (item) {
|
|
23560
24018
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
23561
24019
|
skuPropertiesName: item.specName,
|
|
24020
|
+
sysSkuPropertiesName: item.specId,
|
|
23562
24021
|
sysTitle: item.goodName,
|
|
23563
24022
|
title: null,
|
|
23564
24023
|
shortTitle: item.goodShortName,
|
|
@@ -23623,6 +24082,8 @@ var GoodsModalMap = {
|
|
|
23623
24082
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
23624
24083
|
KM_GOODS: KmGoodsModal,
|
|
23625
24084
|
KM_REISSUE_GOODS: KmGoodsModal,
|
|
24085
|
+
KM_RETURN_GOODS: KmGoodsModal,
|
|
24086
|
+
KM_EXCHANGE_GOODS: KmGoodsModal,
|
|
23626
24087
|
JY_GOODS: JyGoodsModal$1,
|
|
23627
24088
|
JY_REISSUE_GOODS: JyGoodsModal$1,
|
|
23628
24089
|
JKY_GOODS: JkyGoodsModal$1,
|
|
@@ -23642,6 +24103,8 @@ var systemOrderNoMap = {
|
|
|
23642
24103
|
JKY_GOODS: 'tradeNo',
|
|
23643
24104
|
JKY_REISSUE_GOODS: 'tradeNo',
|
|
23644
24105
|
KM_REISSUE_GOODS: 'sid',
|
|
24106
|
+
KM_RETURN_GOODS: 'sid',
|
|
24107
|
+
KM_EXCHANGE_GOODS: 'sid',
|
|
23645
24108
|
JST_REISSUE_GOODS: 'oId',
|
|
23646
24109
|
GY_REISSUE_GOODS: 'code',
|
|
23647
24110
|
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
@@ -23667,7 +24130,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
23667
24130
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
23668
24131
|
width = _ref.width,
|
|
23669
24132
|
_ref$isReissueType = _ref.isReissueType,
|
|
23670
|
-
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType
|
|
24133
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType,
|
|
24134
|
+
_ref$isReloadSelectTa = _ref.isReloadSelectTable,
|
|
24135
|
+
isReloadSelectTable = _ref$isReloadSelectTa === void 0 ? false : _ref$isReloadSelectTa,
|
|
24136
|
+
validSystemOrderFn = _ref.validSystemOrderFn;
|
|
23671
24137
|
var _useState = React.useState(),
|
|
23672
24138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23673
24139
|
selectSystemNo = _useState2[0],
|
|
@@ -23712,36 +24178,52 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
23712
24178
|
}();
|
|
23713
24179
|
var openModal = /*#__PURE__*/function () {
|
|
23714
24180
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
24181
|
+
var flag;
|
|
23715
24182
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
23716
24183
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23717
24184
|
case 0:
|
|
24185
|
+
if (!validSystemOrderFn) {
|
|
24186
|
+
_context2.next = 7;
|
|
24187
|
+
break;
|
|
24188
|
+
}
|
|
24189
|
+
_context2.next = 3;
|
|
24190
|
+
return validSystemOrderFn();
|
|
24191
|
+
case 3:
|
|
24192
|
+
flag = _context2.sent;
|
|
24193
|
+
if (!(flag === false)) {
|
|
24194
|
+
_context2.next = 7;
|
|
24195
|
+
break;
|
|
24196
|
+
}
|
|
24197
|
+
console.log('validSystemOrderFn校验不通过');
|
|
24198
|
+
return _context2.abrupt("return");
|
|
24199
|
+
case 7:
|
|
23718
24200
|
if (!validSystemOrder) {
|
|
23719
|
-
_context2.next =
|
|
24201
|
+
_context2.next = 10;
|
|
23720
24202
|
break;
|
|
23721
24203
|
}
|
|
23722
24204
|
antd.message.warning('请选择补发系统单');
|
|
23723
24205
|
return _context2.abrupt("return");
|
|
23724
|
-
case
|
|
23725
|
-
if (!(getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length))) {
|
|
23726
|
-
_context2.next =
|
|
24206
|
+
case 10:
|
|
24207
|
+
if (!(getDataSourceAsync && (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || isReloadSelectTable))) {
|
|
24208
|
+
_context2.next = 13;
|
|
23727
24209
|
break;
|
|
23728
24210
|
}
|
|
23729
|
-
_context2.next =
|
|
24211
|
+
_context2.next = 13;
|
|
23730
24212
|
return getDataSourceAsync();
|
|
23731
|
-
case
|
|
23732
|
-
if (!['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
23733
|
-
_context2.next =
|
|
24213
|
+
case 13:
|
|
24214
|
+
if (!['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
24215
|
+
_context2.next = 16;
|
|
23734
24216
|
break;
|
|
23735
24217
|
}
|
|
23736
|
-
_context2.next =
|
|
24218
|
+
_context2.next = 16;
|
|
23737
24219
|
return getKmSupplier(dataSource);
|
|
23738
|
-
case
|
|
24220
|
+
case 16:
|
|
23739
24221
|
setTradeGoodsVisible(true);
|
|
23740
24222
|
// 补发直接传入的是systemNo
|
|
23741
24223
|
if (isShowSelect && isReissueType) {
|
|
23742
24224
|
setSelectSystemNo(selectedSystemOrders || []);
|
|
23743
24225
|
}
|
|
23744
|
-
case
|
|
24226
|
+
case 18:
|
|
23745
24227
|
case "end":
|
|
23746
24228
|
return _context2.stop();
|
|
23747
24229
|
}
|
|
@@ -23856,7 +24338,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
23856
24338
|
SelectTradeGoods.displayName = 'SelectTradeGoods';
|
|
23857
24339
|
var getButtonText = function getButtonText() {
|
|
23858
24340
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
23859
|
-
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
24341
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_EXCHANGE_GOODS'].includes(type)) {
|
|
23860
24342
|
return '选择快麦ERP商品';
|
|
23861
24343
|
}
|
|
23862
24344
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -23927,14 +24409,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
23927
24409
|
_props$templateDetail = props.templateDetail,
|
|
23928
24410
|
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail,
|
|
23929
24411
|
_props$hasSelectedSys = props.hasSelectedSystemOrder,
|
|
23930
|
-
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys
|
|
24412
|
+
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys,
|
|
24413
|
+
isReloadSelectTable = props.isReloadSelectTable,
|
|
24414
|
+
validSystemOrderFn = props.validSystemOrderFn;
|
|
23931
24415
|
var canDelete = ['JST_AFTERSALE_GOODS'].includes(type);
|
|
23932
24416
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
23933
24417
|
// 监听聚水潭退货商品
|
|
23934
24418
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
23935
24419
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
23936
24420
|
// 判断是否为是否展示系统单筛选项
|
|
23937
|
-
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
24421
|
+
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
23938
24422
|
var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS', 'JKY_REISSUE_GOODS'].includes(type) || false;
|
|
23939
24423
|
var refModal = React.useRef();
|
|
23940
24424
|
console.debug('表格数据', value);
|
|
@@ -24024,6 +24508,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
24024
24508
|
case 'GY_RETURN_GOODS':
|
|
24025
24509
|
case 'KM_GOODS':
|
|
24026
24510
|
case 'KM_REISSUE_GOODS':
|
|
24511
|
+
case 'KM_RETURN_GOODS':
|
|
24512
|
+
case 'KM_EXCHANGE_GOODS':
|
|
24027
24513
|
case 'JY_GOODS':
|
|
24028
24514
|
case 'JY_REISSUE_GOODS':
|
|
24029
24515
|
case 'JKY_GOODS':
|
|
@@ -24226,6 +24712,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
24226
24712
|
checked: isStrict,
|
|
24227
24713
|
onChange: handleCheckboxChange
|
|
24228
24714
|
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
|
|
24715
|
+
isReloadSelectTable: isReloadSelectTable,
|
|
24716
|
+
validSystemOrderFn: validSystemOrderFn,
|
|
24229
24717
|
validSystemOrder: validSystemOrder,
|
|
24230
24718
|
isShowSelect: isShowSelect,
|
|
24231
24719
|
uniqueKey: uniqueKey,
|
|
@@ -24956,7 +25444,8 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
24956
25444
|
billNo: item.tradeNo,
|
|
24957
25445
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
24958
25446
|
billTag: item.tagName || item.tags,
|
|
24959
|
-
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
25447
|
+
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus],
|
|
25448
|
+
logisticsName: kmkfUtils.ExpressData.getInstance('wdt').getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCode, false) || (item === null || item === void 0 ? void 0 : item.logisticsName)
|
|
24960
25449
|
});
|
|
24961
25450
|
});
|
|
24962
25451
|
}
|
|
@@ -27514,6 +28003,55 @@ var componentMap$4 = {
|
|
|
27514
28003
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
27515
28004
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
27516
28005
|
}
|
|
28006
|
+
},
|
|
28007
|
+
KM_EXCHANGE_GOODS: {
|
|
28008
|
+
type: 'km',
|
|
28009
|
+
showChooseTradeGoodsBtn: true,
|
|
28010
|
+
valueKey: 'kmExchangeGoods',
|
|
28011
|
+
returnTypeKey: 'kmExchangeType',
|
|
28012
|
+
systemOrder: 'kmSystemOrder',
|
|
28013
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
28014
|
+
oIdKey: 'billNo',
|
|
28015
|
+
goodDetailsKey: 'subOrders',
|
|
28016
|
+
skuIdKey: 'skuId',
|
|
28017
|
+
outerOiIdKey: '',
|
|
28018
|
+
name: '快麦',
|
|
28019
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
28020
|
+
isReloadSelectTable: true,
|
|
28021
|
+
validSystemOrderFn: function () {
|
|
28022
|
+
var _validSystemOrderFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(form) {
|
|
28023
|
+
var returnGoodsValue;
|
|
28024
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28025
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28026
|
+
case 0:
|
|
28027
|
+
_context.next = 2;
|
|
28028
|
+
return form.getFieldValue('KM3F7B91C2');
|
|
28029
|
+
case 2:
|
|
28030
|
+
returnGoodsValue = _context.sent;
|
|
28031
|
+
if (returnGoodsValue.kmSystemOrderNo) {
|
|
28032
|
+
_context.next = 6;
|
|
28033
|
+
break;
|
|
28034
|
+
}
|
|
28035
|
+
antd.message.error('请选择退货系统单');
|
|
28036
|
+
return _context.abrupt("return", false);
|
|
28037
|
+
case 6:
|
|
28038
|
+
case "end":
|
|
28039
|
+
return _context.stop();
|
|
28040
|
+
}
|
|
28041
|
+
}, _callee);
|
|
28042
|
+
}));
|
|
28043
|
+
function validSystemOrderFn(_x) {
|
|
28044
|
+
return _validSystemOrderFn.apply(this, arguments);
|
|
28045
|
+
}
|
|
28046
|
+
return validSystemOrderFn;
|
|
28047
|
+
}(),
|
|
28048
|
+
eventNameMap: {
|
|
28049
|
+
// pubsub 事件
|
|
28050
|
+
exchangeCopyGood: 'kmExchangeCopyGood',
|
|
28051
|
+
exchangeBackCopyGood: 'kmExchangeBackCopyGood',
|
|
28052
|
+
returnGoodsSysorder: 'kmReturnGoodsSysorder',
|
|
28053
|
+
returnGoodsSysorderBack: 'kmReturnGoodsSysorderBack'
|
|
28054
|
+
}
|
|
27517
28055
|
}
|
|
27518
28056
|
};
|
|
27519
28057
|
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
@@ -27521,7 +28059,8 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
27521
28059
|
var value = props.value,
|
|
27522
28060
|
onChange = props.onChange,
|
|
27523
28061
|
disabled = props.disabled,
|
|
27524
|
-
compType = props.type
|
|
28062
|
+
compType = props.type,
|
|
28063
|
+
form = props.form;
|
|
27525
28064
|
var uniqueKey = (componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$4[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.skuIdKey) || 'uuid';
|
|
27526
28065
|
var valueRef = React.useRef({});
|
|
27527
28066
|
// PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
|
|
@@ -27614,6 +28153,10 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
27614
28153
|
return new Promise(function (resolve) {
|
|
27615
28154
|
pubsub__default['default'].subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
|
|
27616
28155
|
resolve(data);
|
|
28156
|
+
console.log('getDataSourceAsync---111data--', data, getGoodDetails({
|
|
28157
|
+
returnGoodsValue: data,
|
|
28158
|
+
mode: isStrict
|
|
28159
|
+
}));
|
|
27617
28160
|
setOriginDataSource(getGoodDetails({
|
|
27618
28161
|
returnGoodsValue: data,
|
|
27619
28162
|
mode: isStrict
|
|
@@ -27622,9 +28165,14 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
27622
28165
|
pubsub__default['default'].publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
|
|
27623
28166
|
});
|
|
27624
28167
|
};
|
|
28168
|
+
console.log('aaa--', originDataSource);
|
|
27625
28169
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
27626
28170
|
key: componentMap$4[compType].type
|
|
27627
28171
|
}, props), {}, {
|
|
28172
|
+
validSystemOrderFn: function validSystemOrderFn() {
|
|
28173
|
+
return componentMap$4[compType].validSystemOrderFn(form);
|
|
28174
|
+
},
|
|
28175
|
+
isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
|
|
27628
28176
|
disabled: disabled,
|
|
27629
28177
|
canUpdateNumber: true,
|
|
27630
28178
|
showChangeBtn: true,
|
|
@@ -27800,7 +28348,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
27800
28348
|
var newValue = _objectSpread2({}, value);
|
|
27801
28349
|
// 原订单商品
|
|
27802
28350
|
var originTradeGoodList = getGoodDetails({
|
|
27803
|
-
mode: isStrict
|
|
28351
|
+
mode: isStrict,
|
|
28352
|
+
isAllOrders: true
|
|
27804
28353
|
}) || [];
|
|
27805
28354
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27806
28355
|
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
@@ -27958,6 +28507,30 @@ var typeMap$2 = {
|
|
|
27958
28507
|
uniqueKey: 'id',
|
|
27959
28508
|
isShowSelectTradeGoods: true
|
|
27960
28509
|
},
|
|
28510
|
+
KM_RETURN_GOODS: {
|
|
28511
|
+
compType: '退货',
|
|
28512
|
+
key: 'kmReturnGoods',
|
|
28513
|
+
typeName: 'kmReturnType',
|
|
28514
|
+
systemOrder: 'kmSystemOrder',
|
|
28515
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
28516
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
28517
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
28518
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
28519
|
+
orderTypeKey: 'orderType',
|
|
28520
|
+
oIdKey: 'billNo',
|
|
28521
|
+
outerOiIdKey: '',
|
|
28522
|
+
goodDetailsKey: 'subOrders',
|
|
28523
|
+
uniqueKey: 'id',
|
|
28524
|
+
isShowSelectTradeGoods: true,
|
|
28525
|
+
showErpGoodsBtn: false,
|
|
28526
|
+
eventNameMap: {
|
|
28527
|
+
// pubsub 事件
|
|
28528
|
+
exchangeCopyGood: 'kmExchangeCopyGood',
|
|
28529
|
+
exchangeBackCopyGood: 'kmExchangeBackCopyGood',
|
|
28530
|
+
returnGoodsSysorder: 'kmReturnGoodsSysorder',
|
|
28531
|
+
returnGoodsSysorderBack: 'kmReturnGoodsSysorderBack'
|
|
28532
|
+
}
|
|
28533
|
+
},
|
|
27961
28534
|
JY_REISSUE_GOODS: {
|
|
27962
28535
|
compType: '补发',
|
|
27963
28536
|
key: 'jyReissueGoods',
|
|
@@ -27991,7 +28564,7 @@ var typeMap$2 = {
|
|
|
27991
28564
|
}
|
|
27992
28565
|
};
|
|
27993
28566
|
var PublicReissue = function PublicReissue(props) {
|
|
27994
|
-
var _typeMap$
|
|
28567
|
+
var _typeMap$type18, _typeMap$type36, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _value$typeMap$type$s8, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54, _value$typeMap$type$s9, _typeMap$type55, _typeMap$type56, _typeMap$type57, _typeMap$type58;
|
|
27995
28568
|
var value = props.value,
|
|
27996
28569
|
onChange = props.onChange,
|
|
27997
28570
|
_props$reasonList = props.reasonList,
|
|
@@ -28109,24 +28682,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28109
28682
|
};
|
|
28110
28683
|
var sysItemIdMap = React.useMemo(function () {
|
|
28111
28684
|
var map = {};
|
|
28112
|
-
if (
|
|
28113
|
-
var _value$
|
|
28114
|
-
|
|
28685
|
+
if (['KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
28686
|
+
var _value$goodsKey, _value$goodsKey$filte;
|
|
28687
|
+
var goodsKey = typeMap$2[type].key;
|
|
28688
|
+
value === null || value === void 0 ? void 0 : (_value$goodsKey = value[goodsKey]) === null || _value$goodsKey === void 0 ? void 0 : (_value$goodsKey$filte = _value$goodsKey.filter(function (item) {
|
|
28115
28689
|
return item === null || item === void 0 ? void 0 : item.sysItemId;
|
|
28116
|
-
})) === null || _value$
|
|
28690
|
+
})) === null || _value$goodsKey$filte === void 0 ? void 0 : _value$goodsKey$filte.forEach(function (item) {
|
|
28117
28691
|
var key = !(item === null || item === void 0 ? void 0 : item.sysSkuId) || (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' || (item === null || item === void 0 ? void 0 : item.sysSkuId) == (item === null || item === void 0 ? void 0 : item.sysItemId) ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
|
|
28118
28692
|
map[key] = item;
|
|
28119
28693
|
});
|
|
28120
28694
|
}
|
|
28121
28695
|
return map;
|
|
28122
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
28696
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key]]);
|
|
28123
28697
|
// 用于跟踪已经处理过的 sysItemId,避免重复处理
|
|
28124
28698
|
var processedSysItemIdsRef = React.useRef(new Set());
|
|
28125
28699
|
React.useEffect(function () {
|
|
28126
28700
|
var fetchSupplier = /*#__PURE__*/function () {
|
|
28127
28701
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sysItemIds) {
|
|
28128
|
-
var _currentValue$
|
|
28129
|
-
var needFetchIds, supplierMap, hasChange, currentValue,
|
|
28702
|
+
var _currentValue$goodsKe;
|
|
28703
|
+
var needFetchIds, supplierMap, hasChange, currentValue, goodsKey, kmGoods;
|
|
28130
28704
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
28131
28705
|
while (1) switch (_context2.prev = _context2.next) {
|
|
28132
28706
|
case 0:
|
|
@@ -28154,7 +28728,8 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28154
28728
|
// 检查是否有实际变化,避免不必要的更新
|
|
28155
28729
|
hasChange = false;
|
|
28156
28730
|
currentValue = valueRef.current;
|
|
28157
|
-
|
|
28731
|
+
goodsKey = typeMap$2[type].key;
|
|
28732
|
+
kmGoods = currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$goodsKe = currentValue[goodsKey]) === null || _currentValue$goodsKe === void 0 ? void 0 : _currentValue$goodsKe.map(function (item) {
|
|
28158
28733
|
var key = !(item === null || item === void 0 ? void 0 : item.sysSkuId) || (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' || (item === null || item === void 0 ? void 0 : item.sysSkuId) == (item === null || item === void 0 ? void 0 : item.sysItemId) ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
|
|
28159
28734
|
var supplierInfo = supplierMap.get(key);
|
|
28160
28735
|
var newSupplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
|
|
@@ -28171,12 +28746,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28171
28746
|
}
|
|
28172
28747
|
return item;
|
|
28173
28748
|
}); // 只在有实际变化时才更新
|
|
28174
|
-
if (hasChange &&
|
|
28175
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, {
|
|
28176
|
-
kmReissueGoods: kmReissueGoods
|
|
28177
|
-
}));
|
|
28749
|
+
if (hasChange && kmGoods) {
|
|
28750
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, _defineProperty({}, goodsKey, kmGoods)));
|
|
28178
28751
|
}
|
|
28179
|
-
case
|
|
28752
|
+
case 13:
|
|
28180
28753
|
case "end":
|
|
28181
28754
|
return _context2.stop();
|
|
28182
28755
|
}
|
|
@@ -28192,20 +28765,20 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28192
28765
|
}
|
|
28193
28766
|
}, [sysItemIdMap]);
|
|
28194
28767
|
var getGoodDetails = function getGoodDetails(_ref5) {
|
|
28195
|
-
var _typeMap$
|
|
28768
|
+
var _typeMap$type19, _typeMap$type20, _value$typeMap$type$s6, _typeMap$type21, _typeMap$type22, _typeMap$type23, _typeMap$type24;
|
|
28196
28769
|
var mode = _ref5.mode,
|
|
28197
28770
|
sysOrderNo = _ref5.sysOrderNo,
|
|
28198
28771
|
_ref5$isAllOrders = _ref5.isAllOrders,
|
|
28199
28772
|
isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
|
|
28200
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28201
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28773
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrder];
|
|
28774
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo];
|
|
28202
28775
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
28203
28776
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
28204
28777
|
});
|
|
28205
28778
|
var orderRest = undefined;
|
|
28206
28779
|
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
28207
28780
|
orderRest = true;
|
|
28208
|
-
} else if (
|
|
28781
|
+
} else if (['KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
28209
28782
|
orderRest = {
|
|
28210
28783
|
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
28211
28784
|
canEdit: true
|
|
@@ -28219,12 +28792,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28219
28792
|
canEdit: true
|
|
28220
28793
|
};
|
|
28221
28794
|
}
|
|
28222
|
-
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
28795
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
|
|
28223
28796
|
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
28224
28797
|
var _order$typeMap$type$g;
|
|
28225
28798
|
return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
|
|
28226
28799
|
});
|
|
28227
|
-
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$
|
|
28800
|
+
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.isSelectTradeGoodsMerge)) && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.updateGoodsHandle(orders, orderRest, type)) : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.updateGoodsHandle(orders, orderRest, type) : [];
|
|
28228
28801
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
28229
28802
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
28230
28803
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -28232,30 +28805,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28232
28805
|
return list;
|
|
28233
28806
|
};
|
|
28234
28807
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
28235
|
-
var _typeMap$
|
|
28808
|
+
var _typeMap$type25;
|
|
28236
28809
|
var newValue = _objectSpread2({}, value);
|
|
28237
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28810
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)] = val || [];
|
|
28238
28811
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
28239
28812
|
};
|
|
28240
28813
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
28241
|
-
var _typeMap$
|
|
28814
|
+
var _typeMap$type26, _typeMap$type27, _value$typeMap$type$t2, _typeMap$type32, _value$typeMap$type$t3, _typeMap$type34;
|
|
28242
28815
|
var newValue = _objectSpread2({}, value);
|
|
28243
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28244
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28245
|
-
var _value$typeMap$type$s7, _typeMap$
|
|
28246
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$
|
|
28816
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)] = val;
|
|
28817
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderBillType) {
|
|
28818
|
+
var _value$typeMap$type$s7, _typeMap$type28, _typeMap$type30, _typeMap$type31;
|
|
28819
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
|
|
28247
28820
|
var targetOrder = val && orders.find(function (oItem) {
|
|
28248
|
-
var _typeMap$
|
|
28249
|
-
return oItem[(_typeMap$
|
|
28821
|
+
var _typeMap$type29;
|
|
28822
|
+
return oItem[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.oIdKey] === val;
|
|
28250
28823
|
});
|
|
28251
|
-
newValue[(_typeMap$
|
|
28252
|
-
}
|
|
28253
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
28254
|
-
var _typeMap$
|
|
28255
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28256
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
28257
|
-
var _typeMap$
|
|
28258
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28824
|
+
newValue[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.orderTypeKey];
|
|
28825
|
+
}
|
|
28826
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
28827
|
+
var _typeMap$type33;
|
|
28828
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = [];
|
|
28829
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
28830
|
+
var _typeMap$type35;
|
|
28831
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)] = getGoodDetails({
|
|
28259
28832
|
mode: isStrict,
|
|
28260
28833
|
sysOrderNo: val
|
|
28261
28834
|
});
|
|
@@ -28263,27 +28836,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28263
28836
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
28264
28837
|
};
|
|
28265
28838
|
//显示选择商品按钮
|
|
28266
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28839
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrderNo]);
|
|
28267
28840
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
28268
|
-
var _typeMap$
|
|
28841
|
+
var _typeMap$type37, _typeMap$type38, _typeMap$type39, _uniqBy, _typeMap$type40;
|
|
28269
28842
|
var newValue = _objectSpread2({}, value);
|
|
28270
28843
|
// 原订单商品
|
|
28271
28844
|
var originTradeGoodList = getGoodDetails({
|
|
28272
28845
|
mode: isStrict,
|
|
28273
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28846
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.isShowSelectTradeGoods
|
|
28274
28847
|
}) || [];
|
|
28275
28848
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
28276
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28277
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28278
|
-
var _typeMap$
|
|
28279
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28849
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key)]) || [];
|
|
28850
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
28851
|
+
var _typeMap$type41;
|
|
28852
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.uniqueKey) || 'uuid']);
|
|
28280
28853
|
});
|
|
28281
28854
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
28282
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28855
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.key)], isStrict]);
|
|
28283
28856
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
28284
28857
|
gutter: 8,
|
|
28285
28858
|
wrap: true,
|
|
28286
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28859
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.key) || "".concat(Date.now())
|
|
28287
28860
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
28288
28861
|
className: "gutter-row",
|
|
28289
28862
|
xs: {
|
|
@@ -28299,12 +28872,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28299
28872
|
},
|
|
28300
28873
|
disabled: disabled,
|
|
28301
28874
|
allowClear: false,
|
|
28302
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28875
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrderNo)],
|
|
28303
28876
|
onChange: function onChange(val) {
|
|
28304
28877
|
return changeSystemOrderHandle(val);
|
|
28305
28878
|
},
|
|
28306
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28307
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$
|
|
28879
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
28880
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
28308
28881
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
28309
28882
|
key: item[typeMap$2[type].oIdKey],
|
|
28310
28883
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -28326,11 +28899,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28326
28899
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
28327
28900
|
allowClear: false,
|
|
28328
28901
|
options: reasonList,
|
|
28329
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28902
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.typeName)],
|
|
28330
28903
|
onChange: function onChange(val) {
|
|
28331
28904
|
return changeTypeHandle(val);
|
|
28332
28905
|
}
|
|
28333
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28906
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
28334
28907
|
className: "gutter-row",
|
|
28335
28908
|
xs: {
|
|
28336
28909
|
span: 11
|
|
@@ -28339,7 +28912,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28339
28912
|
span: 6
|
|
28340
28913
|
}
|
|
28341
28914
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
28342
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28915
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.systemOrderBillType)],
|
|
28343
28916
|
disabled: disabled,
|
|
28344
28917
|
readOnly: true
|
|
28345
28918
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -28350,25 +28923,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28350
28923
|
canUpdateNumber: showChangeBtn,
|
|
28351
28924
|
hasSelectedSystemOrder: showChangeBtn,
|
|
28352
28925
|
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
28353
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28354
|
-
|
|
28926
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.alwaysShowChooseErpGoodsBtn,
|
|
28927
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.showErpGoodsBtn,
|
|
28355
28928
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
28356
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28929
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.key)],
|
|
28357
28930
|
onChange: function onChange(val) {
|
|
28358
28931
|
return changeGoodHandle(val);
|
|
28359
28932
|
},
|
|
28360
28933
|
onModeChange: handleModeChange,
|
|
28361
|
-
showModeBtn: !!(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28934
|
+
showModeBtn: !!(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.showModeBtn),
|
|
28362
28935
|
isStrict: isStrict,
|
|
28363
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28364
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
28365
|
-
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28936
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.isShowSelectTradeGoods,
|
|
28937
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
28938
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.systemOrderNo)]] : [],
|
|
28366
28939
|
tradeGoods: {
|
|
28367
28940
|
originDataSource: getGoodDetails({
|
|
28368
28941
|
mode: isStrict,
|
|
28369
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28942
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.isShowSelectTradeGoods
|
|
28370
28943
|
}),
|
|
28371
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28944
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type58 = typeMap$2[type]) === null || _typeMap$type58 === void 0 ? void 0 : _typeMap$type58.uniqueKey) || 'uuid',
|
|
28372
28945
|
selectedGoodsChange: selectedGoodsChange
|
|
28373
28946
|
}
|
|
28374
28947
|
})));
|