@kmkf-fe-packages/basic-components 2.2.44-beta.71 → 2.2.44-beta.74
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 +635 -106
- package/dist/index.js +635 -106
- 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/constants/columnsBaseInfoMap.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -7936,7 +7936,8 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7936
7936
|
placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
|
|
7937
7937
|
allowClear: true,
|
|
7938
7938
|
onChange: function onChange(e) {
|
|
7939
|
-
|
|
7939
|
+
var _e$target$value;
|
|
7940
|
+
return changeHandle((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim(), 'receiverName');
|
|
7940
7941
|
}
|
|
7941
7942
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
7942
7943
|
value: value.receiverMobile,
|
|
@@ -7944,7 +7945,8 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7944
7945
|
allowClear: true,
|
|
7945
7946
|
placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
|
|
7946
7947
|
onChange: function onChange(e) {
|
|
7947
|
-
|
|
7948
|
+
var _e$target$value2;
|
|
7949
|
+
return changeHandle((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'receiverMobile');
|
|
7948
7950
|
}
|
|
7949
7951
|
})), /*#__PURE__*/React.createElement(Space, {
|
|
7950
7952
|
wrap: true
|
|
@@ -7961,7 +7963,8 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7961
7963
|
placeholder: "\u8BE6\u7EC6\u5730\u5740",
|
|
7962
7964
|
allowClear: true,
|
|
7963
7965
|
onChange: function onChange(e) {
|
|
7964
|
-
|
|
7966
|
+
var _e$target$value3;
|
|
7967
|
+
return changeHandle((_e$target$value3 = e.target.value) === null || _e$target$value3 === void 0 ? void 0 : _e$target$value3.trim(), 'detail');
|
|
7965
7968
|
}
|
|
7966
7969
|
})));
|
|
7967
7970
|
};
|
|
@@ -8683,6 +8686,21 @@ var processErpSendGood = function processErpSendGood(getValue) {
|
|
|
8683
8686
|
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8684
8687
|
};
|
|
8685
8688
|
};
|
|
8689
|
+
var processErpReturnWarehouse = function processErpReturnWarehouse(getValue) {
|
|
8690
|
+
return function (nex, config) {
|
|
8691
|
+
var kmReturnWarehouseMap = {
|
|
8692
|
+
KM_RETURN_WAREHOUSE: {
|
|
8693
|
+
list: 'kmReturnWarehouse'
|
|
8694
|
+
}
|
|
8695
|
+
};
|
|
8696
|
+
var initValue = [{
|
|
8697
|
+
kmReturnWarehouseName: '',
|
|
8698
|
+
kmReturnWarehouseId: ''
|
|
8699
|
+
}];
|
|
8700
|
+
var itemList = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(kmReturnWarehouseMap[nex.workOrderComponentType].list)), initValue);
|
|
8701
|
+
return _defineProperty({}, nex.uniqueKey, (itemList === null || itemList === void 0 ? void 0 : itemList.length) ? itemList : initValue);
|
|
8702
|
+
};
|
|
8703
|
+
};
|
|
8686
8704
|
var processBsPosting = function processBsPosting(getValue) {
|
|
8687
8705
|
return function (nex, config) {
|
|
8688
8706
|
var bsAddress = [transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingProvince"))), transTextToNumber(getValue("".concat(nex.uniqueKey, "_bsPostingCity")))];
|
|
@@ -8982,6 +9000,14 @@ var processWdtExchangeGoods = function processWdtExchangeGoods(getValue) {
|
|
|
8982
9000
|
});
|
|
8983
9001
|
};
|
|
8984
9002
|
};
|
|
9003
|
+
var processKmExchangeGoods = function processKmExchangeGoods(getValue) {
|
|
9004
|
+
return function (nex, config) {
|
|
9005
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9006
|
+
kmExchangeGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmExchangeGoods")), []),
|
|
9007
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
|
|
9008
|
+
});
|
|
9009
|
+
};
|
|
9010
|
+
};
|
|
8985
9011
|
var processJstExchangeGoods = function processJstExchangeGoods(getValue) {
|
|
8986
9012
|
return function (nex, config) {
|
|
8987
9013
|
return _defineProperty({}, nex.uniqueKey, {
|
|
@@ -9198,6 +9224,28 @@ var processKmReissueGoods = function processKmReissueGoods(templateColumns) {
|
|
|
9198
9224
|
};
|
|
9199
9225
|
};
|
|
9200
9226
|
};
|
|
9227
|
+
var processKmReturnGoods = function processKmReturnGoods(templateColumns) {
|
|
9228
|
+
return function (getValue) {
|
|
9229
|
+
return function (nex, config) {
|
|
9230
|
+
var orderNo = '';
|
|
9231
|
+
var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
|
|
9232
|
+
return col.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
9233
|
+
});
|
|
9234
|
+
if (tradeId) {
|
|
9235
|
+
orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
|
|
9236
|
+
}
|
|
9237
|
+
return _defineProperty({}, nex.uniqueKey, {
|
|
9238
|
+
kmSystemOrder: {
|
|
9239
|
+
orderNo: orderNo
|
|
9240
|
+
},
|
|
9241
|
+
kmReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9242
|
+
kmReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmReturnGoods")), []),
|
|
9243
|
+
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9244
|
+
kmSystemOrderNo: getValue("".concat(nex.uniqueKey, "_kmSystemOrderNo"))
|
|
9245
|
+
});
|
|
9246
|
+
};
|
|
9247
|
+
};
|
|
9248
|
+
};
|
|
9201
9249
|
var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
|
|
9202
9250
|
return function (getValue) {
|
|
9203
9251
|
return function (nex, config) {
|
|
@@ -9291,14 +9339,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
|
|
|
9291
9339
|
};
|
|
9292
9340
|
var processLabel = function processLabel(getValue) {
|
|
9293
9341
|
return function (nex, config) {
|
|
9294
|
-
var
|
|
9295
|
-
return
|
|
9342
|
+
var _ref77;
|
|
9343
|
+
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;
|
|
9296
9344
|
};
|
|
9297
9345
|
};
|
|
9298
9346
|
var processMemberLevel = function processMemberLevel(getValue) {
|
|
9299
9347
|
return function (nex, config) {
|
|
9300
|
-
var
|
|
9301
|
-
return
|
|
9348
|
+
var _ref78;
|
|
9349
|
+
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;
|
|
9302
9350
|
};
|
|
9303
9351
|
};
|
|
9304
9352
|
var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
|
|
@@ -9415,6 +9463,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9415
9463
|
BS_E3_SEND_GOOD: processErpSendGood,
|
|
9416
9464
|
KM_SEND_GOOD: processErpSendGood,
|
|
9417
9465
|
GY_SEND_GOOD: processErpSendGood,
|
|
9466
|
+
KM_RETURN_WAREHOUSE: processErpReturnWarehouse,
|
|
9418
9467
|
BS_POSTING: processBsPosting,
|
|
9419
9468
|
BS_GOODS: processBsGoods,
|
|
9420
9469
|
WDT_GOODS: processWdtGoods(templateColumns),
|
|
@@ -9425,10 +9474,12 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
9425
9474
|
GY_GOODS: processGyGoods(templateColumns),
|
|
9426
9475
|
KM_GOODS: processKmGoods(templateColumns),
|
|
9427
9476
|
KM_REISSUE_GOODS: processKmReissueGoods(templateColumns),
|
|
9477
|
+
KM_RETURN_GOODS: processKmReturnGoods(templateColumns),
|
|
9428
9478
|
JST_GOODS: processJstGoods(templateColumns),
|
|
9429
9479
|
BS_REISSUE_GOODS: processBsReissueGoods,
|
|
9430
9480
|
BS_EXCHANGE_GOODS: processBsExchangeGoods,
|
|
9431
9481
|
WDT_EXCHANGE_GOODS: processWdtExchangeGoods,
|
|
9482
|
+
KM_EXCHANGE_GOODS: processKmExchangeGoods,
|
|
9432
9483
|
JST_EXCHANGE_GOODS: processJstExchangeGoods,
|
|
9433
9484
|
BS_RETURN_GOODS: processBsReturnGoods,
|
|
9434
9485
|
WDT_RETURN_GOODS: processWdtReturnGoods(),
|
|
@@ -10728,7 +10779,8 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
10728
10779
|
disabled = props.disabled,
|
|
10729
10780
|
_onBlur = props.onBlur;
|
|
10730
10781
|
var changeValue = function changeValue(e, type) {
|
|
10731
|
-
|
|
10782
|
+
var _e$target$value;
|
|
10783
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim())));
|
|
10732
10784
|
};
|
|
10733
10785
|
// useEffect(() => {
|
|
10734
10786
|
// //淘宝平台和抖音平台需要展示买家id
|
|
@@ -10753,7 +10805,8 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
10753
10805
|
changeValue(e, 'buyerNick');
|
|
10754
10806
|
},
|
|
10755
10807
|
onBlur: function onBlur(e) {
|
|
10756
|
-
|
|
10808
|
+
var _e$target$value2;
|
|
10809
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'buyerNick');
|
|
10757
10810
|
}
|
|
10758
10811
|
});
|
|
10759
10812
|
};
|
|
@@ -10875,8 +10928,9 @@ var RemarkInput = function RemarkInput(props) {
|
|
|
10875
10928
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10876
10929
|
};
|
|
10877
10930
|
var changeRemark = function changeRemark(e) {
|
|
10931
|
+
var _e$target$value;
|
|
10878
10932
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
10879
|
-
remark: e.target.value
|
|
10933
|
+
remark: (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim()
|
|
10880
10934
|
});
|
|
10881
10935
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10882
10936
|
};
|
|
@@ -10919,7 +10973,7 @@ var Logistics = function Logistics(props) {
|
|
|
10919
10973
|
var handleInputChange = function handleInputChange(e) {
|
|
10920
10974
|
var val = e.target.value;
|
|
10921
10975
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10922
|
-
order: val
|
|
10976
|
+
order: val === null || val === void 0 ? void 0 : val.trim()
|
|
10923
10977
|
}));
|
|
10924
10978
|
};
|
|
10925
10979
|
var handelSelectChange = function handelSelectChange(val) {
|
|
@@ -10983,7 +11037,8 @@ var AliPay = function AliPay(props) {
|
|
|
10983
11037
|
disabled = props.disabled,
|
|
10984
11038
|
_onBlur = props.onBlur;
|
|
10985
11039
|
var changeValue = function changeValue(e, type) {
|
|
10986
|
-
|
|
11040
|
+
var _e$target$value;
|
|
11041
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim())));
|
|
10987
11042
|
};
|
|
10988
11043
|
return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
10989
11044
|
disabled: disabled,
|
|
@@ -12654,7 +12709,8 @@ var Invoice = function Invoice(props) {
|
|
|
12654
12709
|
}),
|
|
12655
12710
|
current = _useRef.current;
|
|
12656
12711
|
var handleInputChange = function handleInputChange(e) {
|
|
12657
|
-
var
|
|
12712
|
+
var _e$target$value;
|
|
12713
|
+
var ordinaryTaitou = (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim();
|
|
12658
12714
|
setVisible(false);
|
|
12659
12715
|
setList([]);
|
|
12660
12716
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
@@ -12677,8 +12733,9 @@ var Invoice = function Invoice(props) {
|
|
|
12677
12733
|
handleChange(ordinaryTaitou);
|
|
12678
12734
|
};
|
|
12679
12735
|
var handleValueClick = function handleValueClick(e) {
|
|
12736
|
+
var _e$target$value2;
|
|
12680
12737
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
12681
|
-
ordinarySerial: e.target.value
|
|
12738
|
+
ordinarySerial: (_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim()
|
|
12682
12739
|
});
|
|
12683
12740
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
12684
12741
|
};
|
|
@@ -12989,7 +13046,8 @@ var Payment = function Payment(props) {
|
|
|
12989
13046
|
// }
|
|
12990
13047
|
// }, [shopId, shopList]);
|
|
12991
13048
|
var changeValue = function changeValue(e, type) {
|
|
12992
|
-
var
|
|
13049
|
+
var _e$target$value;
|
|
13050
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim()));
|
|
12993
13051
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
12994
13052
|
type === 'enterprisePaymentTid' && (onSearch === null || onSearch === void 0 ? void 0 : onSearch(e));
|
|
12995
13053
|
};
|
|
@@ -13050,7 +13108,8 @@ var Payment = function Payment(props) {
|
|
|
13050
13108
|
return changeValue(e, item.name);
|
|
13051
13109
|
},
|
|
13052
13110
|
onBlur: function onBlur(e) {
|
|
13053
|
-
|
|
13111
|
+
var _e$target$value2;
|
|
13112
|
+
return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), item.name);
|
|
13054
13113
|
}
|
|
13055
13114
|
}), (replaceValueCh === null || replaceValueCh === void 0 ? void 0 : replaceValueCh[item.name]) && /*#__PURE__*/React.createElement("p", {
|
|
13056
13115
|
style: {
|
|
@@ -13343,7 +13402,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13343
13402
|
disabled: disabled || isEdit,
|
|
13344
13403
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
13345
13404
|
onChange: function onChange(e) {
|
|
13346
|
-
|
|
13405
|
+
var _e$target$value;
|
|
13406
|
+
return changeHandle((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim(), 'interceptCode');
|
|
13347
13407
|
},
|
|
13348
13408
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
13349
13409
|
}))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
|
|
@@ -13418,7 +13478,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13418
13478
|
disabled: disabled || isEdit,
|
|
13419
13479
|
placeholder: senderMobileLabel,
|
|
13420
13480
|
onChange: function onChange(e) {
|
|
13421
|
-
|
|
13481
|
+
var _e$target$value2;
|
|
13482
|
+
return changeHandle((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'interceptSenderMobile');
|
|
13422
13483
|
}
|
|
13423
13484
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
13424
13485
|
label: '退回地址',
|
|
@@ -13477,7 +13538,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13477
13538
|
},
|
|
13478
13539
|
placeholder: "\u5176\u4ED6",
|
|
13479
13540
|
onChange: function onChange(e) {
|
|
13480
|
-
|
|
13541
|
+
var _e$target$value3;
|
|
13542
|
+
return changeHandle((_e$target$value3 = e.target.value) === null || _e$target$value3 === void 0 ? void 0 : _e$target$value3.trim(), 'interceptLogisticsStatusOther');
|
|
13481
13543
|
}
|
|
13482
13544
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
13483
13545
|
label: '拦截状态',
|
|
@@ -13531,7 +13593,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13531
13593
|
disabled: true,
|
|
13532
13594
|
placeholder: "\u63A5\u53E3\u72B6\u6001\u539F\u56E0",
|
|
13533
13595
|
onChange: function onChange(e) {
|
|
13534
|
-
|
|
13596
|
+
var _e$target$value4;
|
|
13597
|
+
return changeHandle((_e$target$value4 = e.target.value) === null || _e$target$value4 === void 0 ? void 0 : _e$target$value4.trim(), 'interceptLogisticsApiStatusReason');
|
|
13535
13598
|
}
|
|
13536
13599
|
})));
|
|
13537
13600
|
};
|
|
@@ -13607,7 +13670,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13607
13670
|
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
13608
13671
|
var handleInputChange = function handleInputChange(e, type) {
|
|
13609
13672
|
var val = e.target.value;
|
|
13610
|
-
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
13673
|
+
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val === null || val === void 0 ? void 0 : val.trim())));
|
|
13611
13674
|
};
|
|
13612
13675
|
var handelSelectChange = function handelSelectChange(val) {
|
|
13613
13676
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
@@ -14007,10 +14070,14 @@ var typeInitValueMap = {
|
|
|
14007
14070
|
}],
|
|
14008
14071
|
4: [{
|
|
14009
14072
|
deliveryNo: null
|
|
14073
|
+
}],
|
|
14074
|
+
5: [{
|
|
14075
|
+
returnWarehouseName: null,
|
|
14076
|
+
returnWarehouseId: null
|
|
14010
14077
|
}]
|
|
14011
14078
|
};
|
|
14012
14079
|
var jstGoods = function jstGoods(props) {
|
|
14013
|
-
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;
|
|
14080
|
+
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;
|
|
14014
14081
|
var _props$value = props.value,
|
|
14015
14082
|
value = _props$value === void 0 ? [] : _props$value,
|
|
14016
14083
|
onChange = props.onChange,
|
|
@@ -14083,13 +14150,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
14083
14150
|
newList[changeIndex] = changeOrderInfo;
|
|
14084
14151
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
14085
14152
|
};
|
|
14153
|
+
var handleSelectedReturn = function handleSelectedReturn(val, type, option, onlyShowFieldSelect) {
|
|
14154
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
14155
|
+
changeOrderInfo[type] = val;
|
|
14156
|
+
if (!onlyShowFieldSelect) {
|
|
14157
|
+
changeOrderInfo['returnWarehouseId'] = option.value;
|
|
14158
|
+
}
|
|
14159
|
+
if (isSelectName && type === 'returnWarehouseName') {
|
|
14160
|
+
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
14161
|
+
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
14162
|
+
changeOrderInfo['returnWarehouseName'] = option.label;
|
|
14163
|
+
}
|
|
14164
|
+
var newList = _toConsumableArray(value);
|
|
14165
|
+
newList[changeIndex] = changeOrderInfo;
|
|
14166
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
14167
|
+
};
|
|
14086
14168
|
var filterOption = function filterOption(input, option) {
|
|
14087
14169
|
var _option$label;
|
|
14088
14170
|
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
14089
14171
|
};
|
|
14090
14172
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
14091
14173
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
14092
|
-
changeOrderInfo[type] = val;
|
|
14174
|
+
changeOrderInfo[type] = val === null || val === void 0 ? void 0 : val.trim();
|
|
14093
14175
|
var newList = _toConsumableArray(value);
|
|
14094
14176
|
newList[changeIndex] = changeOrderInfo;
|
|
14095
14177
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -14197,7 +14279,35 @@ var jstGoods = function jstGoods(props) {
|
|
|
14197
14279
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
14198
14280
|
},
|
|
14199
14281
|
value: (_value$changeIndex13 = value[changeIndex]) === null || _value$changeIndex13 === void 0 ? void 0 : _value$changeIndex13.sendName
|
|
14200
|
-
})) : null
|
|
14282
|
+
})) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, ['returnWarehouseId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
14283
|
+
disabled: disabled,
|
|
14284
|
+
placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u4ED3\u7F16\u7801",
|
|
14285
|
+
onChange: function onChange(e) {
|
|
14286
|
+
return changeInputHandle(e.target.value, 'returnWarehouseId');
|
|
14287
|
+
},
|
|
14288
|
+
value: (_value$changeIndex14 = value[changeIndex]) === null || _value$changeIndex14 === void 0 ? void 0 : _value$changeIndex14.returnWarehouseId
|
|
14289
|
+
}), ['returnWarehouseName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
14290
|
+
style: {
|
|
14291
|
+
minWidth: '100px',
|
|
14292
|
+
maxWidth: '180px'
|
|
14293
|
+
},
|
|
14294
|
+
disabled: disabled,
|
|
14295
|
+
placeholder: "\u9000\u8D27\u4ED3\u540D\u79F0",
|
|
14296
|
+
showSearch: true,
|
|
14297
|
+
options: sendOptions,
|
|
14298
|
+
filterOption: filterOption,
|
|
14299
|
+
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,
|
|
14300
|
+
onChange: function onChange(value, option) {
|
|
14301
|
+
return handleSelectedReturn(value, 'returnWarehouseName', option, onlyShowFieldSelect);
|
|
14302
|
+
}
|
|
14303
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
14304
|
+
disabled: disabled,
|
|
14305
|
+
placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u4ED3\u540D\u79F0",
|
|
14306
|
+
onChange: function onChange(e) {
|
|
14307
|
+
return changeInputHandle(e.target.value, 'returnWarehouseName');
|
|
14308
|
+
},
|
|
14309
|
+
value: (_value$changeIndex17 = value[changeIndex]) === null || _value$changeIndex17 === void 0 ? void 0 : _value$changeIndex17.returnWarehouseName
|
|
14310
|
+
}))) : null) : null);
|
|
14201
14311
|
};
|
|
14202
14312
|
|
|
14203
14313
|
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";
|
|
@@ -21695,16 +21805,28 @@ function toNum$3(value) {
|
|
|
21695
21805
|
}
|
|
21696
21806
|
return void 0;
|
|
21697
21807
|
}
|
|
21698
|
-
var
|
|
21699
|
-
|
|
21808
|
+
var isNumberOrNumberString$2 = function isNumberOrNumberString(value) {
|
|
21809
|
+
if (typeof value === 'number') return true;
|
|
21810
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
21811
|
+
return false;
|
|
21812
|
+
};
|
|
21813
|
+
var getColumns$6 = function getColumns() {
|
|
21814
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
21815
|
+
_ref$text = _ref.text,
|
|
21700
21816
|
disabled = _ref.disabled,
|
|
21701
|
-
updateHandle = _ref.updateHandle
|
|
21817
|
+
updateHandle = _ref.updateHandle,
|
|
21818
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
21702
21819
|
return {
|
|
21703
21820
|
KM_GOODS: [{
|
|
21704
21821
|
dataIndex: 'skuPropertiesName',
|
|
21705
21822
|
title: "\u89C4\u683C\u540D\u79F0",
|
|
21706
21823
|
width: 250,
|
|
21707
21824
|
render: renderTextEllipsis
|
|
21825
|
+
}, {
|
|
21826
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
21827
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
21828
|
+
width: 150,
|
|
21829
|
+
render: renderTextEllipsis
|
|
21708
21830
|
}, {
|
|
21709
21831
|
dataIndex: 'sysTitle',
|
|
21710
21832
|
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
@@ -21828,6 +21950,11 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21828
21950
|
title: "\u89C4\u683C\u540D\u79F0",
|
|
21829
21951
|
width: 250,
|
|
21830
21952
|
render: renderTextEllipsis
|
|
21953
|
+
}, {
|
|
21954
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
21955
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
21956
|
+
width: 150,
|
|
21957
|
+
render: renderTextEllipsis
|
|
21831
21958
|
}, {
|
|
21832
21959
|
dataIndex: 'sysTitle',
|
|
21833
21960
|
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
@@ -21872,7 +21999,9 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21872
21999
|
dataIndex: 'realNum',
|
|
21873
22000
|
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
21874
22001
|
width: 100,
|
|
21875
|
-
validator: function validator(_rule, value) {
|
|
22002
|
+
validator: function validator(_rule, value, extraParams) {
|
|
22003
|
+
console.log('实际补发数量-extraParams', extraParams);
|
|
22004
|
+
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
21876
22005
|
var title = '';
|
|
21877
22006
|
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
21878
22007
|
var realNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
@@ -21900,8 +22029,21 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21900
22029
|
}
|
|
21901
22030
|
}, {
|
|
21902
22031
|
dataIndex: 'desiredNum',
|
|
21903
|
-
title: "\
|
|
22032
|
+
title: "\u7533\u8BF7\u8865\u53D1\u6570\u91CF",
|
|
21904
22033
|
width: 100,
|
|
22034
|
+
validator: function validator(_rule, value) {
|
|
22035
|
+
var title = '';
|
|
22036
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
22037
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22038
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22039
|
+
if (res) {
|
|
22040
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22041
|
+
}
|
|
22042
|
+
return res;
|
|
22043
|
+
})) {
|
|
22044
|
+
return Promise.reject("".concat(title, "\u7533\u8BF7\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22045
|
+
}
|
|
22046
|
+
},
|
|
21905
22047
|
render: function render(val, record, index) {
|
|
21906
22048
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
21907
22049
|
style: {
|
|
@@ -21970,11 +22112,336 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
21970
22112
|
align: 'center',
|
|
21971
22113
|
ellipsis: true
|
|
21972
22114
|
});
|
|
22115
|
+
}),
|
|
22116
|
+
KM_RETURN_GOODS: [{
|
|
22117
|
+
dataIndex: 'skuPropertiesName',
|
|
22118
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
22119
|
+
width: 250,
|
|
22120
|
+
render: renderTextEllipsis
|
|
22121
|
+
}, {
|
|
22122
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
22123
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
22124
|
+
width: 150,
|
|
22125
|
+
render: renderTextEllipsis
|
|
22126
|
+
}, {
|
|
22127
|
+
dataIndex: 'sysTitle',
|
|
22128
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
22129
|
+
width: 150,
|
|
22130
|
+
render: renderTextEllipsis
|
|
22131
|
+
}, {
|
|
22132
|
+
dataIndex: 'shortTitle',
|
|
22133
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
22134
|
+
width: 150,
|
|
22135
|
+
render: renderTextEllipsis
|
|
22136
|
+
}, {
|
|
22137
|
+
dataIndex: 'title',
|
|
22138
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
22139
|
+
width: 150,
|
|
22140
|
+
render: renderTextEllipsis
|
|
22141
|
+
}, {
|
|
22142
|
+
dataIndex: 'sysOuterId',
|
|
22143
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
22144
|
+
width: 150,
|
|
22145
|
+
render: renderTextEllipsis
|
|
22146
|
+
}, {
|
|
22147
|
+
dataIndex: 'itemSysId',
|
|
22148
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
22149
|
+
width: 150,
|
|
22150
|
+
render: renderTextEllipsis
|
|
22151
|
+
}, {
|
|
22152
|
+
dataIndex: 'skuSysId',
|
|
22153
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
22154
|
+
width: 150,
|
|
22155
|
+
render: renderTextEllipsis
|
|
22156
|
+
}, {
|
|
22157
|
+
dataIndex: 'skuId',
|
|
22158
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
22159
|
+
width: 170,
|
|
22160
|
+
render: renderTextEllipsis
|
|
22161
|
+
}, {
|
|
22162
|
+
dataIndex: 'outerSkuId',
|
|
22163
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u7801",
|
|
22164
|
+
width: 170,
|
|
22165
|
+
render: renderTextEllipsis
|
|
22166
|
+
}, {
|
|
22167
|
+
dataIndex: 'realNum',
|
|
22168
|
+
title: "\u5B9E\u9645\u9000\u8D27\u6570\u91CF",
|
|
22169
|
+
width: 100,
|
|
22170
|
+
render: function render(val, record, index) {
|
|
22171
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22172
|
+
style: {
|
|
22173
|
+
width: 70
|
|
22174
|
+
},
|
|
22175
|
+
value: val,
|
|
22176
|
+
min: 1,
|
|
22177
|
+
precision: 0,
|
|
22178
|
+
onChange: function onChange(num) {
|
|
22179
|
+
updateDataHandle({
|
|
22180
|
+
realNum: num,
|
|
22181
|
+
refundMoney: num && isNumberOrNumberString$2(record.price) ? num * record.price : null
|
|
22182
|
+
}, index);
|
|
22183
|
+
}
|
|
22184
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22185
|
+
}
|
|
22186
|
+
}, {
|
|
22187
|
+
dataIndex: 'desiredNum',
|
|
22188
|
+
title: "\u7533\u8BF7\u9000\u8D27\u6570\u91CF",
|
|
22189
|
+
width: 100,
|
|
22190
|
+
validator: function validator(_rule, value) {
|
|
22191
|
+
var title = '';
|
|
22192
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReturnGoods) || []).some(function (goods) {
|
|
22193
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22194
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22195
|
+
if (res) {
|
|
22196
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22197
|
+
}
|
|
22198
|
+
return res;
|
|
22199
|
+
})) {
|
|
22200
|
+
return Promise.reject("".concat(title, "\u7533\u8BF7\u9000\u8D27\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22201
|
+
}
|
|
22202
|
+
},
|
|
22203
|
+
render: function render(val, record, index) {
|
|
22204
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22205
|
+
style: {
|
|
22206
|
+
width: 70
|
|
22207
|
+
},
|
|
22208
|
+
value: val,
|
|
22209
|
+
min: 1,
|
|
22210
|
+
precision: 0,
|
|
22211
|
+
onChange: function onChange(num) {
|
|
22212
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
22213
|
+
}
|
|
22214
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22215
|
+
}
|
|
22216
|
+
}, {
|
|
22217
|
+
dataIndex: 'goodNum',
|
|
22218
|
+
title: "\u826F\u54C1\u6570",
|
|
22219
|
+
width: 100,
|
|
22220
|
+
render: function render(val, record, index) {
|
|
22221
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22222
|
+
style: {
|
|
22223
|
+
width: 70
|
|
22224
|
+
},
|
|
22225
|
+
value: val,
|
|
22226
|
+
min: 1,
|
|
22227
|
+
precision: 0,
|
|
22228
|
+
onChange: function onChange(num) {
|
|
22229
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'goodNum');
|
|
22230
|
+
}
|
|
22231
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22232
|
+
}
|
|
22233
|
+
}, {
|
|
22234
|
+
dataIndex: 'defectiveNum',
|
|
22235
|
+
title: "\u6B21\u54C1\u6570",
|
|
22236
|
+
width: 100,
|
|
22237
|
+
render: function render(val, record, index) {
|
|
22238
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22239
|
+
style: {
|
|
22240
|
+
width: 70
|
|
22241
|
+
},
|
|
22242
|
+
value: val,
|
|
22243
|
+
min: 1,
|
|
22244
|
+
precision: 0,
|
|
22245
|
+
onChange: function onChange(num) {
|
|
22246
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'defectiveNum');
|
|
22247
|
+
}
|
|
22248
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22249
|
+
}
|
|
22250
|
+
}, {
|
|
22251
|
+
dataIndex: 'price',
|
|
22252
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
22253
|
+
width: 150,
|
|
22254
|
+
render: function render(val) {
|
|
22255
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
22256
|
+
}
|
|
22257
|
+
}, {
|
|
22258
|
+
dataIndex: 'refundMoney',
|
|
22259
|
+
title: "\u5B9E\u9000\u91D1\u989D",
|
|
22260
|
+
width: 150,
|
|
22261
|
+
render: function render(val, record, index) {
|
|
22262
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22263
|
+
style: {
|
|
22264
|
+
width: 130
|
|
22265
|
+
},
|
|
22266
|
+
value: val,
|
|
22267
|
+
min: 0,
|
|
22268
|
+
precision: 2,
|
|
22269
|
+
onChange: function onChange(num) {
|
|
22270
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'refundMoney');
|
|
22271
|
+
}
|
|
22272
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22273
|
+
}
|
|
22274
|
+
}, {
|
|
22275
|
+
dataIndex: 'type',
|
|
22276
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
22277
|
+
width: 150,
|
|
22278
|
+
render: renderTextEllipsis
|
|
22279
|
+
}, {
|
|
22280
|
+
dataIndex: 'sysPicPath',
|
|
22281
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
22282
|
+
width: 100,
|
|
22283
|
+
headerComponentType: 'pic',
|
|
22284
|
+
render: function render(val) {
|
|
22285
|
+
var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
|
|
22286
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
22287
|
+
width: 30,
|
|
22288
|
+
src: imgUrl
|
|
22289
|
+
});
|
|
22290
|
+
}
|
|
22291
|
+
}].map(function (item) {
|
|
22292
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22293
|
+
align: 'center',
|
|
22294
|
+
ellipsis: true
|
|
22295
|
+
});
|
|
22296
|
+
}),
|
|
22297
|
+
KM_EXCHANGE_GOODS: [{
|
|
22298
|
+
dataIndex: 'skuPropertiesName',
|
|
22299
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
22300
|
+
width: 250,
|
|
22301
|
+
render: renderTextEllipsis
|
|
22302
|
+
}, {
|
|
22303
|
+
dataIndex: 'sysSkuPropertiesName',
|
|
22304
|
+
title: "\u7CFB\u7EDF\u89C4\u683C\u540D\u79F0",
|
|
22305
|
+
width: 150,
|
|
22306
|
+
render: renderTextEllipsis
|
|
22307
|
+
}, {
|
|
22308
|
+
dataIndex: 'sysTitle',
|
|
22309
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
22310
|
+
width: 150,
|
|
22311
|
+
render: renderTextEllipsis
|
|
22312
|
+
}, {
|
|
22313
|
+
dataIndex: 'shortTitle',
|
|
22314
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
22315
|
+
width: 150,
|
|
22316
|
+
render: renderTextEllipsis
|
|
22317
|
+
}, {
|
|
22318
|
+
dataIndex: 'title',
|
|
22319
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
22320
|
+
width: 150,
|
|
22321
|
+
render: renderTextEllipsis
|
|
22322
|
+
}, {
|
|
22323
|
+
dataIndex: 'sysOuterId',
|
|
22324
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
22325
|
+
width: 150,
|
|
22326
|
+
render: renderTextEllipsis
|
|
22327
|
+
}, {
|
|
22328
|
+
dataIndex: 'itemSysId',
|
|
22329
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
22330
|
+
width: 150,
|
|
22331
|
+
render: renderTextEllipsis
|
|
22332
|
+
}, {
|
|
22333
|
+
dataIndex: 'skuSysId',
|
|
22334
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
22335
|
+
width: 150,
|
|
22336
|
+
render: renderTextEllipsis
|
|
22337
|
+
}, {
|
|
22338
|
+
dataIndex: 'skuId',
|
|
22339
|
+
title: "\u5E73\u53F0\u89C4\u683CID",
|
|
22340
|
+
width: 170,
|
|
22341
|
+
render: renderTextEllipsis
|
|
22342
|
+
}, {
|
|
22343
|
+
dataIndex: 'outerSkuId',
|
|
22344
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u7801",
|
|
22345
|
+
width: 170,
|
|
22346
|
+
render: renderTextEllipsis
|
|
22347
|
+
}, {
|
|
22348
|
+
dataIndex: 'realNum',
|
|
22349
|
+
title: "\u5B9E\u9645\u6362\u51FA\u6570\u91CF",
|
|
22350
|
+
width: 100,
|
|
22351
|
+
validator: function validator(_rule, value, extraParams) {
|
|
22352
|
+
if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
|
|
22353
|
+
var title = '';
|
|
22354
|
+
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
22355
|
+
var realNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
22356
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
22357
|
+
if (res) {
|
|
22358
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22359
|
+
}
|
|
22360
|
+
return res;
|
|
22361
|
+
})) {
|
|
22362
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u6362\u51FA\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22363
|
+
}
|
|
22364
|
+
},
|
|
22365
|
+
render: function render(val, record, index) {
|
|
22366
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22367
|
+
style: {
|
|
22368
|
+
width: 70
|
|
22369
|
+
},
|
|
22370
|
+
value: val,
|
|
22371
|
+
min: 1,
|
|
22372
|
+
precision: 0,
|
|
22373
|
+
onChange: function onChange(num) {
|
|
22374
|
+
updateDataHandle({
|
|
22375
|
+
realNum: num,
|
|
22376
|
+
refundMoney: num && isNumberOrNumberString$2(record.price) ? num * record.price : null
|
|
22377
|
+
}, index);
|
|
22378
|
+
}
|
|
22379
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22380
|
+
}
|
|
22381
|
+
}, {
|
|
22382
|
+
dataIndex: 'desiredNum',
|
|
22383
|
+
title: "\u5E94\u6362\u51FA\u6570\u91CF",
|
|
22384
|
+
width: 100,
|
|
22385
|
+
validator: function validator(_rule, value) {
|
|
22386
|
+
var title = '';
|
|
22387
|
+
if (((value === null || value === void 0 ? void 0 : value.kmExchangeGoods) || []).some(function (goods) {
|
|
22388
|
+
var desiredNum = toNum$3(goods === null || goods === void 0 ? void 0 : goods.desiredNum);
|
|
22389
|
+
var res = typeof desiredNum === 'number' ? desiredNum < 1 : true;
|
|
22390
|
+
if (res) {
|
|
22391
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
22392
|
+
}
|
|
22393
|
+
return res;
|
|
22394
|
+
})) {
|
|
22395
|
+
return Promise.reject("".concat(title, "\u5E94\u6362\u51FA\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22396
|
+
}
|
|
22397
|
+
},
|
|
22398
|
+
render: function render(val, record, index) {
|
|
22399
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22400
|
+
style: {
|
|
22401
|
+
width: 70
|
|
22402
|
+
},
|
|
22403
|
+
value: val,
|
|
22404
|
+
min: 1,
|
|
22405
|
+
precision: 0,
|
|
22406
|
+
onChange: function onChange(num) {
|
|
22407
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
22408
|
+
}
|
|
22409
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22410
|
+
}
|
|
22411
|
+
}, {
|
|
22412
|
+
dataIndex: 'price',
|
|
22413
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
22414
|
+
width: 150,
|
|
22415
|
+
render: function render(val) {
|
|
22416
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
22417
|
+
}
|
|
22418
|
+
}, {
|
|
22419
|
+
dataIndex: 'type',
|
|
22420
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
22421
|
+
width: 150,
|
|
22422
|
+
render: renderTextEllipsis
|
|
22423
|
+
}, {
|
|
22424
|
+
dataIndex: 'sysPicPath',
|
|
22425
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
22426
|
+
width: 100,
|
|
22427
|
+
headerComponentType: 'pic',
|
|
22428
|
+
render: function render(val) {
|
|
22429
|
+
var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
|
|
22430
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
22431
|
+
width: 30,
|
|
22432
|
+
src: imgUrl
|
|
22433
|
+
});
|
|
22434
|
+
}
|
|
22435
|
+
}].map(function (item) {
|
|
22436
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22437
|
+
align: 'center',
|
|
22438
|
+
ellipsis: true
|
|
22439
|
+
});
|
|
21973
22440
|
})
|
|
21974
22441
|
};
|
|
21975
22442
|
};
|
|
21976
22443
|
|
|
21977
|
-
var isNumberOrNumberString$
|
|
22444
|
+
var isNumberOrNumberString$3 = function isNumberOrNumberString(value) {
|
|
21978
22445
|
if (typeof value === 'number') return true;
|
|
21979
22446
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
21980
22447
|
return false;
|
|
@@ -22112,7 +22579,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22112
22579
|
onChange: function onChange(num) {
|
|
22113
22580
|
updateDataHandle({
|
|
22114
22581
|
sellCount: num,
|
|
22115
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22582
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
|
|
22116
22583
|
}, index);
|
|
22117
22584
|
}
|
|
22118
22585
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22132,7 +22599,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22132
22599
|
onChange: function onChange(num) {
|
|
22133
22600
|
updateDataHandle({
|
|
22134
22601
|
sellPrice: num,
|
|
22135
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22602
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
|
|
22136
22603
|
}, index);
|
|
22137
22604
|
}
|
|
22138
22605
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22335,7 +22802,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22335
22802
|
onChange: function onChange(num) {
|
|
22336
22803
|
updateDataHandle({
|
|
22337
22804
|
sellCount: num,
|
|
22338
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22805
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
|
|
22339
22806
|
}, index);
|
|
22340
22807
|
}
|
|
22341
22808
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22355,7 +22822,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
22355
22822
|
onChange: function onChange(num) {
|
|
22356
22823
|
updateDataHandle({
|
|
22357
22824
|
sellPrice: num,
|
|
22358
|
-
sellTotal: num && isNumberOrNumberString$
|
|
22825
|
+
sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
|
|
22359
22826
|
}, index);
|
|
22360
22827
|
}
|
|
22361
22828
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22479,7 +22946,7 @@ var getColumns$8 = function getColumns(_ref) {
|
|
|
22479
22946
|
};
|
|
22480
22947
|
};
|
|
22481
22948
|
|
|
22482
|
-
var isNumberOrNumberString$
|
|
22949
|
+
var isNumberOrNumberString$4 = function isNumberOrNumberString(value) {
|
|
22483
22950
|
if (typeof value === 'number') return true;
|
|
22484
22951
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
22485
22952
|
return false;
|
|
@@ -22569,7 +23036,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22569
23036
|
onChange: function onChange(num) {
|
|
22570
23037
|
updateDataHandle({
|
|
22571
23038
|
sellCount: num,
|
|
22572
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23039
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellPrice) ? num * record.sellPrice : null
|
|
22573
23040
|
}, index);
|
|
22574
23041
|
}
|
|
22575
23042
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22594,7 +23061,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22594
23061
|
onChange: function onChange(num) {
|
|
22595
23062
|
updateDataHandle({
|
|
22596
23063
|
sellPrice: num,
|
|
22597
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23064
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellCount) ? num * record.sellCount : null
|
|
22598
23065
|
}, index);
|
|
22599
23066
|
}
|
|
22600
23067
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22893,7 +23360,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22893
23360
|
onChange: function onChange(num) {
|
|
22894
23361
|
updateDataHandle({
|
|
22895
23362
|
sellCount: num,
|
|
22896
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23363
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellPrice) ? num * record.sellPrice : null
|
|
22897
23364
|
}, index);
|
|
22898
23365
|
}
|
|
22899
23366
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -22913,7 +23380,7 @@ var getColumns$9 = function getColumns(_ref) {
|
|
|
22913
23380
|
onChange: function onChange(num) {
|
|
22914
23381
|
updateDataHandle({
|
|
22915
23382
|
sellPrice: num,
|
|
22916
|
-
sellTotal: num && isNumberOrNumberString$
|
|
23383
|
+
sellTotal: num && isNumberOrNumberString$4(record.sellCount) ? num * record.sellCount : null
|
|
22917
23384
|
}, index);
|
|
22918
23385
|
}
|
|
22919
23386
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
@@ -23141,7 +23608,8 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
23141
23608
|
})), getColumns$6({
|
|
23142
23609
|
text: text,
|
|
23143
23610
|
disabled: disabled,
|
|
23144
|
-
updateHandle: updateHandle
|
|
23611
|
+
updateHandle: updateHandle,
|
|
23612
|
+
updateDataHandle: updateDataHandle
|
|
23145
23613
|
})), getColumns$7({
|
|
23146
23614
|
text: text,
|
|
23147
23615
|
disabled: disabled,
|
|
@@ -23165,7 +23633,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
23165
23633
|
});
|
|
23166
23634
|
};
|
|
23167
23635
|
var erpColumnsMap = getColumnsMap$1();
|
|
23168
|
-
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
23636
|
+
var erpFormValidator = function erpFormValidator(_rule, value, type, extraParams) {
|
|
23169
23637
|
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
23170
23638
|
return column.validator;
|
|
23171
23639
|
}).filter(Boolean);
|
|
@@ -23175,7 +23643,7 @@ var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
|
23175
23643
|
try {
|
|
23176
23644
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
23177
23645
|
var validatorFn = _step.value;
|
|
23178
|
-
var validatorResult = validatorFn(_rule, value,
|
|
23646
|
+
var validatorResult = validatorFn(_rule, value, extraParams);
|
|
23179
23647
|
if (validatorResult) {
|
|
23180
23648
|
res = validatorResult;
|
|
23181
23649
|
break;
|
|
@@ -23300,7 +23768,7 @@ var isErpType = {
|
|
|
23300
23768
|
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
23301
23769
|
},
|
|
23302
23770
|
isKm: function isKm(type) {
|
|
23303
|
-
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
23771
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'KM_EXCHANGE_GOODS'].includes(type);
|
|
23304
23772
|
},
|
|
23305
23773
|
isJy: function isJy(type) {
|
|
23306
23774
|
return ['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type);
|
|
@@ -23565,11 +24033,17 @@ var processKmGoods$1 = function processKmGoods(_ref8) {
|
|
|
23565
24033
|
KM_REISSUE_GOODS: {
|
|
23566
24034
|
realNum: 1,
|
|
23567
24035
|
desiredNum: 1
|
|
24036
|
+
},
|
|
24037
|
+
KM_RETURN_GOODS: {},
|
|
24038
|
+
KM_EXCHANGE_GOODS: {
|
|
24039
|
+
realNum: 1,
|
|
24040
|
+
desiredNum: 1
|
|
23568
24041
|
}
|
|
23569
24042
|
};
|
|
23570
24043
|
return list.map(function (item) {
|
|
23571
24044
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
23572
24045
|
skuPropertiesName: item.specName,
|
|
24046
|
+
sysSkuPropertiesName: item.specId,
|
|
23573
24047
|
sysTitle: item.goodName,
|
|
23574
24048
|
title: null,
|
|
23575
24049
|
shortTitle: item.goodShortName,
|
|
@@ -23634,6 +24108,8 @@ var GoodsModalMap = {
|
|
|
23634
24108
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
23635
24109
|
KM_GOODS: KmGoodsModal,
|
|
23636
24110
|
KM_REISSUE_GOODS: KmGoodsModal,
|
|
24111
|
+
KM_RETURN_GOODS: KmGoodsModal,
|
|
24112
|
+
KM_EXCHANGE_GOODS: KmGoodsModal,
|
|
23637
24113
|
JY_GOODS: JyGoodsModal$1,
|
|
23638
24114
|
JY_REISSUE_GOODS: JyGoodsModal$1,
|
|
23639
24115
|
JKY_GOODS: JkyGoodsModal$1,
|
|
@@ -23653,6 +24129,7 @@ var systemOrderNoMap = {
|
|
|
23653
24129
|
JKY_GOODS: 'tradeNo',
|
|
23654
24130
|
JKY_REISSUE_GOODS: 'tradeNo',
|
|
23655
24131
|
KM_REISSUE_GOODS: 'sid',
|
|
24132
|
+
KM_RETURN_GOODS: 'sid',
|
|
23656
24133
|
JST_REISSUE_GOODS: 'oId',
|
|
23657
24134
|
GY_REISSUE_GOODS: 'code',
|
|
23658
24135
|
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
@@ -23740,7 +24217,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
23740
24217
|
_context2.next = 6;
|
|
23741
24218
|
return getDataSourceAsync();
|
|
23742
24219
|
case 6:
|
|
23743
|
-
if (!['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
24220
|
+
if (!['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
23744
24221
|
_context2.next = 9;
|
|
23745
24222
|
break;
|
|
23746
24223
|
}
|
|
@@ -23945,7 +24422,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
23945
24422
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
23946
24423
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
23947
24424
|
// 判断是否为是否展示系统单筛选项
|
|
23948
|
-
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;
|
|
24425
|
+
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;
|
|
23949
24426
|
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;
|
|
23950
24427
|
var refModal = useRef();
|
|
23951
24428
|
console.debug('表格数据', value);
|
|
@@ -24035,6 +24512,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
24035
24512
|
case 'GY_RETURN_GOODS':
|
|
24036
24513
|
case 'KM_GOODS':
|
|
24037
24514
|
case 'KM_REISSUE_GOODS':
|
|
24515
|
+
case 'KM_RETURN_GOODS':
|
|
24516
|
+
case 'KM_EXCHANGE_GOODS':
|
|
24038
24517
|
case 'JY_GOODS':
|
|
24039
24518
|
case 'JY_REISSUE_GOODS':
|
|
24040
24519
|
case 'JKY_GOODS':
|
|
@@ -27525,6 +28004,27 @@ var componentMap$4 = {
|
|
|
27525
28004
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
27526
28005
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
27527
28006
|
}
|
|
28007
|
+
},
|
|
28008
|
+
KM_EXCHANGE_GOODS: {
|
|
28009
|
+
type: 'km',
|
|
28010
|
+
showChooseTradeGoodsBtn: true,
|
|
28011
|
+
valueKey: 'kmExchangeGoods',
|
|
28012
|
+
returnTypeKey: 'kmExchangeType',
|
|
28013
|
+
systemOrder: 'kmSystemOrder',
|
|
28014
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
28015
|
+
oIdKey: 'billNo',
|
|
28016
|
+
goodDetailsKey: 'subOrders',
|
|
28017
|
+
skuIdKey: 'skuId',
|
|
28018
|
+
outerOiIdKey: '',
|
|
28019
|
+
name: '快麦',
|
|
28020
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
28021
|
+
eventNameMap: {
|
|
28022
|
+
// pubsub 事件
|
|
28023
|
+
exchangeCopyGood: 'kmExchangeCopyGood',
|
|
28024
|
+
exchangeBackCopyGood: 'kmExchangeBackCopyGood',
|
|
28025
|
+
returnGoodsSysorder: 'kmReturnGoodsSysorder',
|
|
28026
|
+
returnGoodsSysorderBack: 'kmReturnGoodsSysorderBack'
|
|
28027
|
+
}
|
|
27528
28028
|
}
|
|
27529
28029
|
};
|
|
27530
28030
|
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
@@ -27625,6 +28125,10 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
27625
28125
|
return new Promise(function (resolve) {
|
|
27626
28126
|
pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
|
|
27627
28127
|
resolve(data);
|
|
28128
|
+
console.log('getDataSourceAsync---111data--', data, getGoodDetails({
|
|
28129
|
+
returnGoodsValue: data,
|
|
28130
|
+
mode: isStrict
|
|
28131
|
+
}));
|
|
27628
28132
|
setOriginDataSource(getGoodDetails({
|
|
27629
28133
|
returnGoodsValue: data,
|
|
27630
28134
|
mode: isStrict
|
|
@@ -27633,6 +28137,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
27633
28137
|
pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
|
|
27634
28138
|
});
|
|
27635
28139
|
};
|
|
28140
|
+
console.log('aaa--', originDataSource);
|
|
27636
28141
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
27637
28142
|
key: componentMap$4[compType].type
|
|
27638
28143
|
}, props), {}, {
|
|
@@ -27969,6 +28474,30 @@ var typeMap$2 = {
|
|
|
27969
28474
|
uniqueKey: 'id',
|
|
27970
28475
|
isShowSelectTradeGoods: true
|
|
27971
28476
|
},
|
|
28477
|
+
KM_RETURN_GOODS: {
|
|
28478
|
+
compType: '退货',
|
|
28479
|
+
key: 'kmReturnGoods',
|
|
28480
|
+
typeName: 'kmReturnType',
|
|
28481
|
+
systemOrder: 'kmSystemOrder',
|
|
28482
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
28483
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
28484
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
28485
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
28486
|
+
orderTypeKey: 'orderType',
|
|
28487
|
+
oIdKey: 'billNo',
|
|
28488
|
+
outerOiIdKey: '',
|
|
28489
|
+
goodDetailsKey: 'subOrders',
|
|
28490
|
+
uniqueKey: 'id',
|
|
28491
|
+
isShowSelectTradeGoods: true,
|
|
28492
|
+
showErpGoodsBtn: false,
|
|
28493
|
+
eventNameMap: {
|
|
28494
|
+
// pubsub 事件
|
|
28495
|
+
exchangeCopyGood: 'kmExchangeCopyGood',
|
|
28496
|
+
exchangeBackCopyGood: 'kmExchangeBackCopyGood',
|
|
28497
|
+
returnGoodsSysorder: 'kmReturnGoodsSysorder',
|
|
28498
|
+
returnGoodsSysorderBack: 'kmReturnGoodsSysorderBack'
|
|
28499
|
+
}
|
|
28500
|
+
},
|
|
27972
28501
|
JY_REISSUE_GOODS: {
|
|
27973
28502
|
compType: '补发',
|
|
27974
28503
|
key: 'jyReissueGoods',
|
|
@@ -28002,7 +28531,7 @@ var typeMap$2 = {
|
|
|
28002
28531
|
}
|
|
28003
28532
|
};
|
|
28004
28533
|
var PublicReissue = function PublicReissue(props) {
|
|
28005
|
-
var _typeMap$
|
|
28534
|
+
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;
|
|
28006
28535
|
var value = props.value,
|
|
28007
28536
|
onChange = props.onChange,
|
|
28008
28537
|
_props$reasonList = props.reasonList,
|
|
@@ -28120,24 +28649,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28120
28649
|
};
|
|
28121
28650
|
var sysItemIdMap = useMemo(function () {
|
|
28122
28651
|
var map = {};
|
|
28123
|
-
if (
|
|
28124
|
-
var _value$
|
|
28125
|
-
|
|
28652
|
+
if (['KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
28653
|
+
var _value$goodsKey, _value$goodsKey$filte;
|
|
28654
|
+
var goodsKey = typeMap$2[type].key;
|
|
28655
|
+
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) {
|
|
28126
28656
|
return item === null || item === void 0 ? void 0 : item.sysItemId;
|
|
28127
|
-
})) === null || _value$
|
|
28657
|
+
})) === null || _value$goodsKey$filte === void 0 ? void 0 : _value$goodsKey$filte.forEach(function (item) {
|
|
28128
28658
|
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);
|
|
28129
28659
|
map[key] = item;
|
|
28130
28660
|
});
|
|
28131
28661
|
}
|
|
28132
28662
|
return map;
|
|
28133
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
28663
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key]]);
|
|
28134
28664
|
// 用于跟踪已经处理过的 sysItemId,避免重复处理
|
|
28135
28665
|
var processedSysItemIdsRef = useRef(new Set());
|
|
28136
28666
|
useEffect(function () {
|
|
28137
28667
|
var fetchSupplier = /*#__PURE__*/function () {
|
|
28138
28668
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sysItemIds) {
|
|
28139
|
-
var _currentValue$
|
|
28140
|
-
var needFetchIds, supplierMap, hasChange, currentValue,
|
|
28669
|
+
var _currentValue$goodsKe;
|
|
28670
|
+
var needFetchIds, supplierMap, hasChange, currentValue, goodsKey, kmGoods;
|
|
28141
28671
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
28142
28672
|
while (1) switch (_context2.prev = _context2.next) {
|
|
28143
28673
|
case 0:
|
|
@@ -28165,7 +28695,8 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28165
28695
|
// 检查是否有实际变化,避免不必要的更新
|
|
28166
28696
|
hasChange = false;
|
|
28167
28697
|
currentValue = valueRef.current;
|
|
28168
|
-
|
|
28698
|
+
goodsKey = typeMap$2[type].key;
|
|
28699
|
+
kmGoods = currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$goodsKe = currentValue[goodsKey]) === null || _currentValue$goodsKe === void 0 ? void 0 : _currentValue$goodsKe.map(function (item) {
|
|
28169
28700
|
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);
|
|
28170
28701
|
var supplierInfo = supplierMap.get(key);
|
|
28171
28702
|
var newSupplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
|
|
@@ -28182,12 +28713,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28182
28713
|
}
|
|
28183
28714
|
return item;
|
|
28184
28715
|
}); // 只在有实际变化时才更新
|
|
28185
|
-
if (hasChange &&
|
|
28186
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, {
|
|
28187
|
-
kmReissueGoods: kmReissueGoods
|
|
28188
|
-
}));
|
|
28716
|
+
if (hasChange && kmGoods) {
|
|
28717
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, _defineProperty({}, goodsKey, kmGoods)));
|
|
28189
28718
|
}
|
|
28190
|
-
case
|
|
28719
|
+
case 13:
|
|
28191
28720
|
case "end":
|
|
28192
28721
|
return _context2.stop();
|
|
28193
28722
|
}
|
|
@@ -28203,20 +28732,20 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28203
28732
|
}
|
|
28204
28733
|
}, [sysItemIdMap]);
|
|
28205
28734
|
var getGoodDetails = function getGoodDetails(_ref5) {
|
|
28206
|
-
var _typeMap$
|
|
28735
|
+
var _typeMap$type19, _typeMap$type20, _value$typeMap$type$s6, _typeMap$type21, _typeMap$type22, _typeMap$type23, _typeMap$type24;
|
|
28207
28736
|
var mode = _ref5.mode,
|
|
28208
28737
|
sysOrderNo = _ref5.sysOrderNo,
|
|
28209
28738
|
_ref5$isAllOrders = _ref5.isAllOrders,
|
|
28210
28739
|
isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
|
|
28211
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28212
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28740
|
+
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];
|
|
28741
|
+
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];
|
|
28213
28742
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
28214
28743
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
28215
28744
|
});
|
|
28216
28745
|
var orderRest = undefined;
|
|
28217
28746
|
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
28218
28747
|
orderRest = true;
|
|
28219
|
-
} else if (
|
|
28748
|
+
} else if (['KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
|
|
28220
28749
|
orderRest = {
|
|
28221
28750
|
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
28222
28751
|
canEdit: true
|
|
@@ -28230,12 +28759,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28230
28759
|
canEdit: true
|
|
28231
28760
|
};
|
|
28232
28761
|
}
|
|
28233
|
-
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
28762
|
+
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] : [];
|
|
28234
28763
|
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
28235
28764
|
var _order$typeMap$type$g;
|
|
28236
28765
|
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;
|
|
28237
28766
|
});
|
|
28238
|
-
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$
|
|
28767
|
+
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)) : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.updateGoodsHandle(orders, orderRest) : [];
|
|
28239
28768
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
28240
28769
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
28241
28770
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -28243,30 +28772,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28243
28772
|
return list;
|
|
28244
28773
|
};
|
|
28245
28774
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
28246
|
-
var _typeMap$
|
|
28775
|
+
var _typeMap$type25;
|
|
28247
28776
|
var newValue = _objectSpread2({}, value);
|
|
28248
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28777
|
+
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 || [];
|
|
28249
28778
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
28250
28779
|
};
|
|
28251
28780
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
28252
|
-
var _typeMap$
|
|
28781
|
+
var _typeMap$type26, _typeMap$type27, _value$typeMap$type$t2, _typeMap$type32, _value$typeMap$type$t3, _typeMap$type34;
|
|
28253
28782
|
var newValue = _objectSpread2({}, value);
|
|
28254
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28255
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28256
|
-
var _value$typeMap$type$s7, _typeMap$
|
|
28257
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$
|
|
28783
|
+
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;
|
|
28784
|
+
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) {
|
|
28785
|
+
var _value$typeMap$type$s7, _typeMap$type28, _typeMap$type30, _typeMap$type31;
|
|
28786
|
+
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) || [];
|
|
28258
28787
|
var targetOrder = val && orders.find(function (oItem) {
|
|
28259
|
-
var _typeMap$
|
|
28260
|
-
return oItem[(_typeMap$
|
|
28788
|
+
var _typeMap$type29;
|
|
28789
|
+
return oItem[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.oIdKey] === val;
|
|
28261
28790
|
});
|
|
28262
|
-
newValue[(_typeMap$
|
|
28263
|
-
}
|
|
28264
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
28265
|
-
var _typeMap$
|
|
28266
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28267
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
28268
|
-
var _typeMap$
|
|
28269
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28791
|
+
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];
|
|
28792
|
+
}
|
|
28793
|
+
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])) {
|
|
28794
|
+
var _typeMap$type33;
|
|
28795
|
+
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)] = [];
|
|
28796
|
+
} 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])) {
|
|
28797
|
+
var _typeMap$type35;
|
|
28798
|
+
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({
|
|
28270
28799
|
mode: isStrict,
|
|
28271
28800
|
sysOrderNo: val
|
|
28272
28801
|
});
|
|
@@ -28274,27 +28803,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28274
28803
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
28275
28804
|
};
|
|
28276
28805
|
//显示选择商品按钮
|
|
28277
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
28806
|
+
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]);
|
|
28278
28807
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
28279
|
-
var _typeMap$
|
|
28808
|
+
var _typeMap$type37, _typeMap$type38, _typeMap$type39, _uniqBy, _typeMap$type40;
|
|
28280
28809
|
var newValue = _objectSpread2({}, value);
|
|
28281
28810
|
// 原订单商品
|
|
28282
28811
|
var originTradeGoodList = getGoodDetails({
|
|
28283
28812
|
mode: isStrict,
|
|
28284
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28813
|
+
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
|
|
28285
28814
|
}) || [];
|
|
28286
28815
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
28287
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28288
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28289
|
-
var _typeMap$
|
|
28290
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28816
|
+
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)]) || [];
|
|
28817
|
+
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 = 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) {
|
|
28818
|
+
var _typeMap$type41;
|
|
28819
|
+
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']);
|
|
28291
28820
|
});
|
|
28292
28821
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
28293
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28822
|
+
}, [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]);
|
|
28294
28823
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
28295
28824
|
gutter: 8,
|
|
28296
28825
|
wrap: true,
|
|
28297
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28826
|
+
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())
|
|
28298
28827
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
28299
28828
|
className: "gutter-row",
|
|
28300
28829
|
xs: {
|
|
@@ -28310,12 +28839,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28310
28839
|
},
|
|
28311
28840
|
disabled: disabled,
|
|
28312
28841
|
allowClear: false,
|
|
28313
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28842
|
+
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)],
|
|
28314
28843
|
onChange: function onChange(val) {
|
|
28315
28844
|
return changeSystemOrderHandle(val);
|
|
28316
28845
|
},
|
|
28317
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28318
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$
|
|
28846
|
+
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")
|
|
28847
|
+
}, ((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) {
|
|
28319
28848
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
28320
28849
|
key: item[typeMap$2[type].oIdKey],
|
|
28321
28850
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -28337,11 +28866,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28337
28866
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
28338
28867
|
allowClear: false,
|
|
28339
28868
|
options: reasonList,
|
|
28340
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28869
|
+
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)],
|
|
28341
28870
|
onChange: function onChange(val) {
|
|
28342
28871
|
return changeTypeHandle(val);
|
|
28343
28872
|
}
|
|
28344
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28873
|
+
})), (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.createElement(Col, {
|
|
28345
28874
|
className: "gutter-row",
|
|
28346
28875
|
xs: {
|
|
28347
28876
|
span: 11
|
|
@@ -28350,7 +28879,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28350
28879
|
span: 6
|
|
28351
28880
|
}
|
|
28352
28881
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
28353
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28882
|
+
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)],
|
|
28354
28883
|
disabled: disabled,
|
|
28355
28884
|
readOnly: true
|
|
28356
28885
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -28361,25 +28890,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
28361
28890
|
canUpdateNumber: showChangeBtn,
|
|
28362
28891
|
hasSelectedSystemOrder: showChangeBtn,
|
|
28363
28892
|
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
28364
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28365
|
-
|
|
28893
|
+
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,
|
|
28894
|
+
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,
|
|
28366
28895
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
28367
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28896
|
+
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)],
|
|
28368
28897
|
onChange: function onChange(val) {
|
|
28369
28898
|
return changeGoodHandle(val);
|
|
28370
28899
|
},
|
|
28371
28900
|
onModeChange: handleModeChange,
|
|
28372
|
-
showModeBtn: !!(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28901
|
+
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),
|
|
28373
28902
|
isStrict: isStrict,
|
|
28374
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28375
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
28376
|
-
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28903
|
+
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,
|
|
28904
|
+
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,
|
|
28905
|
+
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)]] : [],
|
|
28377
28906
|
tradeGoods: {
|
|
28378
28907
|
originDataSource: getGoodDetails({
|
|
28379
28908
|
mode: isStrict,
|
|
28380
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28909
|
+
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
|
|
28381
28910
|
}),
|
|
28382
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
28911
|
+
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',
|
|
28383
28912
|
selectedGoodsChange: selectedGoodsChange
|
|
28384
28913
|
}
|
|
28385
28914
|
})));
|