@kmkf-fe-packages/basic-components 2.2.13-beta.86 → 2.2.13-beta.91
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 +128 -103
- package/dist/index.js +128 -103
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -8810,9 +8810,6 @@ var processBsExchangeGoods = function processBsExchangeGoods(getValue) {
|
|
|
8810
8810
|
var bsExchangeType = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? Array.isArray(config.initReason) ? config.initReason : [config.initReason] : []);
|
|
8811
8811
|
var bsExchangeReturnGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeReturnGoods")), []);
|
|
8812
8812
|
var bsExchangeSwapOutGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeSwapOutGoods")), []);
|
|
8813
|
-
console.log('bsExchangeType', bsExchangeType);
|
|
8814
|
-
console.log('bsExchangeReturnGoods', bsExchangeReturnGoods);
|
|
8815
|
-
console.log('bsExchangeSwapOutGoods', bsExchangeSwapOutGoods);
|
|
8816
8813
|
//补发组装数据
|
|
8817
8814
|
if ((bsExchangeType === null || bsExchangeType === void 0 ? void 0 : bsExchangeType.length) && ['2', '4'].includes(bsExchangeType[0])) {
|
|
8818
8815
|
var maxLen = maxBy(bsExchangeReturnGoods, function (t) {
|
|
@@ -21824,7 +21821,12 @@ var systemOrderNoMap = {
|
|
|
21824
21821
|
JST_GOODS: 'oId',
|
|
21825
21822
|
WLN_GOODS: 'tradeNo',
|
|
21826
21823
|
JY_GOODS: 'tradeNo',
|
|
21827
|
-
JY_REISSUE_GOODS: 'tradeNo'
|
|
21824
|
+
JY_REISSUE_GOODS: 'tradeNo',
|
|
21825
|
+
KM_REISSUE_GOODS: 'sid',
|
|
21826
|
+
JST_REISSUE_GOODS: 'oId',
|
|
21827
|
+
GY_REISSUE_GOODS: 'code',
|
|
21828
|
+
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
21829
|
+
WDT_REISSUE_GOODS: 'tradeNo'
|
|
21828
21830
|
};
|
|
21829
21831
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21830
21832
|
var columns = _ref.columns,
|
|
@@ -21834,14 +21836,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21834
21836
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21835
21837
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21836
21838
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21837
|
-
_ref$
|
|
21838
|
-
|
|
21839
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21840
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21839
21841
|
_ref$systemOrders = _ref.systemOrders,
|
|
21840
21842
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21841
21843
|
_ref$selectedSystemOr = _ref.selectedSystemOrders,
|
|
21844
|
+
selectedSystemOrders = _ref$selectedSystemOr === void 0 ? [] : _ref$selectedSystemOr,
|
|
21845
|
+
_ref$validSystemOrder = _ref.validSystemOrder,
|
|
21846
|
+
validSystemOrder = _ref$validSystemOrder === void 0 ? false : _ref$validSystemOrder,
|
|
21842
21847
|
_ref$type = _ref.type,
|
|
21843
21848
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21844
|
-
width = _ref.width
|
|
21849
|
+
width = _ref.width,
|
|
21850
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21851
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21845
21852
|
var _useState = useState(),
|
|
21846
21853
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21847
21854
|
selectSystemNo = _useState2[0],
|
|
@@ -21851,6 +21858,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21851
21858
|
tradeGoodsVisible = _useState4[0],
|
|
21852
21859
|
setTradeGoodsVisible = _useState4[1];
|
|
21853
21860
|
var openModal = function openModal() {
|
|
21861
|
+
if (validSystemOrder) {
|
|
21862
|
+
message.warning('请选择补发系统单');
|
|
21863
|
+
return;
|
|
21864
|
+
}
|
|
21854
21865
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21855
21866
|
getDataSourceAsync().then(function () {
|
|
21856
21867
|
setTradeGoodsVisible(true);
|
|
@@ -21858,15 +21869,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21858
21869
|
} else {
|
|
21859
21870
|
setTradeGoodsVisible(true);
|
|
21860
21871
|
}
|
|
21861
|
-
//
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
// );
|
|
21866
|
-
// setSelectSystemNo(codeList || []);
|
|
21867
|
-
// }
|
|
21872
|
+
// 补发直接传入的是systemNo
|
|
21873
|
+
if (isShowSelect && isReissueType) {
|
|
21874
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21875
|
+
}
|
|
21868
21876
|
};
|
|
21869
|
-
|
|
21870
21877
|
var closeModal = function closeModal() {
|
|
21871
21878
|
return setTradeGoodsVisible(false);
|
|
21872
21879
|
};
|
|
@@ -21882,10 +21889,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21882
21889
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21883
21890
|
}));
|
|
21884
21891
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21885
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21886
|
-
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21887
|
-
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21888
|
-
}));
|
|
21889
21892
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21890
21893
|
};
|
|
21891
21894
|
var rowSelection = {
|
|
@@ -21910,7 +21913,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21910
21913
|
style: {
|
|
21911
21914
|
maxWidth: '1000px'
|
|
21912
21915
|
}
|
|
21913
|
-
},
|
|
21916
|
+
}, isShowSelect && /*#__PURE__*/React.createElement(Row, {
|
|
21914
21917
|
style: {
|
|
21915
21918
|
marginBottom: '12px'
|
|
21916
21919
|
}
|
|
@@ -22014,13 +22017,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22014
22017
|
systemOrders = props.systemOrders,
|
|
22015
22018
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22016
22019
|
_props$templateDetail = props.templateDetail,
|
|
22017
|
-
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail
|
|
22020
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail,
|
|
22021
|
+
_props$hasSelectedSys = props.hasSelectedSystemOrder,
|
|
22022
|
+
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys;
|
|
22018
22023
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22019
22024
|
// 监听聚水潭退货商品
|
|
22020
22025
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
22021
22026
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22022
|
-
//
|
|
22023
|
-
var
|
|
22027
|
+
// 判断是否为是否展示系统单筛选项
|
|
22028
|
+
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
22029
|
+
var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
22024
22030
|
var refModal = useRef();
|
|
22025
22031
|
console.debug('表格数据', value);
|
|
22026
22032
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22296,6 +22302,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22296
22302
|
return params;
|
|
22297
22303
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22298
22304
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
22305
|
+
var validSystemOrder = useMemo(function () {
|
|
22306
|
+
return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
|
|
22307
|
+
}, [type, hasSelectedSystemOrder]);
|
|
22299
22308
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
22300
22309
|
style: {
|
|
22301
22310
|
float: 'right'
|
|
@@ -22304,7 +22313,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22304
22313
|
checked: isStrict,
|
|
22305
22314
|
onChange: handleCheckboxChange
|
|
22306
22315
|
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React.createElement(SelectTradeGoods, {
|
|
22307
|
-
|
|
22316
|
+
validSystemOrder: validSystemOrder,
|
|
22317
|
+
isShowSelect: isShowSelect,
|
|
22308
22318
|
uniqueKey: uniqueKey,
|
|
22309
22319
|
type: type,
|
|
22310
22320
|
columns: orderModalColumns,
|
|
@@ -22314,7 +22324,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22314
22324
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22315
22325
|
systemOrders: systemOrders,
|
|
22316
22326
|
selectedSystemOrders: selectedSystemOrders,
|
|
22317
|
-
width: width || 850
|
|
22327
|
+
width: width || 850,
|
|
22328
|
+
isReissueType: isReissueType
|
|
22318
22329
|
}), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
|
|
22319
22330
|
type: "link",
|
|
22320
22331
|
onClick: handleChangeGoods
|
|
@@ -25436,11 +25447,12 @@ var typeMap$1 = {
|
|
|
25436
25447
|
money: 'orderPrice',
|
|
25437
25448
|
share: 'sharePrice'
|
|
25438
25449
|
},
|
|
25439
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25450
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25451
|
+
isShowSelectTradeGoods: true
|
|
25440
25452
|
}
|
|
25441
25453
|
};
|
|
25442
25454
|
var wdtReissue = function wdtReissue(props) {
|
|
25443
|
-
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s6, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
25455
|
+
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s6, _typeMap$type28, _typeMap$type29, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s7, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
25444
25456
|
var value = props.value,
|
|
25445
25457
|
onChange = props.onChange,
|
|
25446
25458
|
_props$reasonList = props.reasonList,
|
|
@@ -25469,36 +25481,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25469
25481
|
}
|
|
25470
25482
|
return;
|
|
25471
25483
|
}, [value]);
|
|
25472
|
-
// useEffect(() => {
|
|
25473
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
25474
|
-
// if (systemOrderNo) {
|
|
25475
|
-
// if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
|
|
25476
|
-
// onChange?.({
|
|
25477
|
-
// ...value,
|
|
25478
|
-
// [typeMap[type]?.key]: getGoodDetails({
|
|
25479
|
-
// mode: isStrict
|
|
25480
|
-
// })
|
|
25481
|
-
// })
|
|
25482
|
-
// }
|
|
25483
|
-
// }
|
|
25484
|
-
// return;
|
|
25485
|
-
// }, [value?.[typeMap[type]?.systemOrderNo]]);
|
|
25486
|
-
// const getWdtOrderList = async (orderNo: string) => {
|
|
25487
|
-
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
25488
|
-
// const orders = data?.trades || [];
|
|
25489
|
-
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
25490
|
-
// return { billNo, billType, billTag }
|
|
25491
|
-
// });
|
|
25492
|
-
// onChange({
|
|
25493
|
-
// ...value,
|
|
25494
|
-
// [typeMap[type]?.systemOrder]: {
|
|
25495
|
-
// ...value[typeMap[type]?.systemOrder],
|
|
25496
|
-
// showOrderInfo,
|
|
25497
|
-
// orders,
|
|
25498
|
-
// },
|
|
25499
|
-
// });
|
|
25500
|
-
// })
|
|
25501
|
-
// };
|
|
25502
25484
|
var getOrderList = /*#__PURE__*/function () {
|
|
25503
25485
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25504
25486
|
var _typeMap$type5;
|
|
@@ -25558,17 +25540,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25558
25540
|
}))));
|
|
25559
25541
|
};
|
|
25560
25542
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25561
|
-
var _typeMap$type14, _typeMap$type15
|
|
25543
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25562
25544
|
var mode = _ref3.mode,
|
|
25563
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25545
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25546
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25547
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25564
25548
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrder];
|
|
25565
25549
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo];
|
|
25566
25550
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25567
25551
|
return order.tradeNo === systemOrderNo;
|
|
25568
25552
|
});
|
|
25569
|
-
var
|
|
25553
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
25554
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25555
|
+
var _order$goodDetails;
|
|
25556
|
+
return order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length;
|
|
25557
|
+
});
|
|
25558
|
+
var goodDetails = hasGoodDetails ? updateWdtGoodsHandle([order]) : [];
|
|
25570
25559
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25571
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25560
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25572
25561
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25573
25562
|
}) : goodDetails;
|
|
25574
25563
|
};
|
|
@@ -25671,7 +25660,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25671
25660
|
type: type,
|
|
25672
25661
|
disabled: disabled,
|
|
25673
25662
|
canUpdateNumber: showChangeBtn,
|
|
25674
|
-
|
|
25663
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25664
|
+
// showChangeBtn={showChangeBtn}
|
|
25675
25665
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25676
25666
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
|
|
25677
25667
|
onChange: function onChange(val) {
|
|
@@ -25680,9 +25670,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25680
25670
|
onModeChange: handleModeChange,
|
|
25681
25671
|
showModeBtn: showModeBtn,
|
|
25682
25672
|
isStrict: isStrict,
|
|
25673
|
+
isShowSelectTradeGoods: typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.isShowSelectTradeGoods,
|
|
25674
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders,
|
|
25675
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type33 = typeMap$1[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrderNo)]] : [],
|
|
25683
25676
|
tradeGoods: {
|
|
25684
25677
|
originDataSource: getGoodDetails({
|
|
25685
|
-
mode: isStrict
|
|
25678
|
+
mode: isStrict,
|
|
25679
|
+
isAllOrders: typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type34 = typeMap$1[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.isShowSelectTradeGoods
|
|
25686
25680
|
}),
|
|
25687
25681
|
selectedGoodsChange: selectedGoodsChange
|
|
25688
25682
|
}
|
|
@@ -25706,7 +25700,8 @@ var typeMap$2 = {
|
|
|
25706
25700
|
outerOiIdKey: '',
|
|
25707
25701
|
goodDetailsKey: 'items',
|
|
25708
25702
|
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
25709
|
-
uniqueKey: 'uuid'
|
|
25703
|
+
uniqueKey: 'uuid',
|
|
25704
|
+
isShowSelectTradeGoods: true
|
|
25710
25705
|
},
|
|
25711
25706
|
JST_RETURN_GOODS: {
|
|
25712
25707
|
compType: '退货',
|
|
@@ -25745,7 +25740,8 @@ var typeMap$2 = {
|
|
|
25745
25740
|
oIdKey: 'billNo',
|
|
25746
25741
|
outerOiIdKey: '',
|
|
25747
25742
|
goodDetailsKey: 'subOrders',
|
|
25748
|
-
uniqueKey: 'id'
|
|
25743
|
+
uniqueKey: 'id',
|
|
25744
|
+
isShowSelectTradeGoods: true
|
|
25749
25745
|
},
|
|
25750
25746
|
JY_REISSUE_GOODS: {
|
|
25751
25747
|
compType: '补发',
|
|
@@ -25764,7 +25760,7 @@ var typeMap$2 = {
|
|
|
25764
25760
|
}
|
|
25765
25761
|
};
|
|
25766
25762
|
var PublicReissue = function PublicReissue(props) {
|
|
25767
|
-
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50,
|
|
25763
|
+
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _value$typeMap$type$s9, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54;
|
|
25768
25764
|
var value = props.value,
|
|
25769
25765
|
onChange = props.onChange,
|
|
25770
25766
|
_props$reasonList = props.reasonList,
|
|
@@ -26033,25 +26029,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26033
26029
|
type: type,
|
|
26034
26030
|
disabled: disabled,
|
|
26035
26031
|
canUpdateNumber: showChangeBtn,
|
|
26036
|
-
|
|
26037
|
-
|
|
26038
|
-
|
|
26032
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
26033
|
+
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
26034
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.alwaysShowChooseErpGoodsBtn,
|
|
26035
|
+
// showErpGoodsBtn={typeMap?.[type]?.showErpGoodsBtn}
|
|
26039
26036
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
26040
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26037
|
+
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.key)],
|
|
26041
26038
|
onChange: function onChange(val) {
|
|
26042
26039
|
return changeGoodHandle(val);
|
|
26043
26040
|
},
|
|
26044
26041
|
onModeChange: handleModeChange,
|
|
26045
26042
|
showModeBtn: false,
|
|
26046
26043
|
isStrict: isStrict,
|
|
26047
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26048
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
26044
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.isShowSelectTradeGoods,
|
|
26045
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
26046
|
+
selectedSystemOrders: showChangeBtn ? [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.systemOrderNo)]] : [],
|
|
26049
26047
|
tradeGoods: {
|
|
26050
26048
|
originDataSource: getGoodDetails({
|
|
26051
26049
|
mode: isStrict,
|
|
26052
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26050
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.isShowSelectTradeGoods
|
|
26053
26051
|
}),
|
|
26054
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26052
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.uniqueKey) || 'uuid',
|
|
26055
26053
|
selectedGoodsChange: selectedGoodsChange
|
|
26056
26054
|
}
|
|
26057
26055
|
})));
|
|
@@ -26839,11 +26837,12 @@ var typeMap$3 = {
|
|
|
26839
26837
|
typeName: 'bsE3ReissueType',
|
|
26840
26838
|
systemOrder: 'bsE3SystemOrder',
|
|
26841
26839
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26842
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26840
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26841
|
+
isShowSelectTradeGoods: true
|
|
26843
26842
|
}
|
|
26844
26843
|
};
|
|
26845
26844
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26846
|
-
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
26845
|
+
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29, _typeMap$type30, _value$typeMap$type$s7, _typeMap$type31, _typeMap$type32, _typeMap$type33;
|
|
26847
26846
|
var value = props.value,
|
|
26848
26847
|
onChange = props.onChange,
|
|
26849
26848
|
_props$reasonList = props.reasonList,
|
|
@@ -26945,17 +26944,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26945
26944
|
}))));
|
|
26946
26945
|
};
|
|
26947
26946
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26948
|
-
var _typeMap$type13, _typeMap$type14
|
|
26947
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26949
26948
|
var mode = _ref4.mode,
|
|
26950
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26949
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26950
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26951
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26951
26952
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
26952
26953
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
26953
26954
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26954
26955
|
return order.orderSn === systemOrderNo;
|
|
26955
26956
|
});
|
|
26956
|
-
var
|
|
26957
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
26958
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
26959
|
+
var _order$orderDetailGet;
|
|
26960
|
+
return order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length;
|
|
26961
|
+
});
|
|
26962
|
+
var goodDetails = hasGoodDetails ? updateBsE3GoodsHandle([order], 'sharePrice') : [];
|
|
26957
26963
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26958
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26964
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26959
26965
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26960
26966
|
}) : goodDetails;
|
|
26961
26967
|
};
|
|
@@ -27056,7 +27062,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27056
27062
|
type: type,
|
|
27057
27063
|
disabled: disabled,
|
|
27058
27064
|
canUpdateNumber: showChangeBtn,
|
|
27059
|
-
|
|
27065
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27066
|
+
// showChangeBtn={showChangeBtn}
|
|
27060
27067
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27061
27068
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
27062
27069
|
onChange: function onChange(val) {
|
|
@@ -27065,9 +27072,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27065
27072
|
onModeChange: handleModeChange,
|
|
27066
27073
|
showModeBtn: false,
|
|
27067
27074
|
isStrict: isStrict,
|
|
27075
|
+
isShowSelectTradeGoods: typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.isShowSelectTradeGoods,
|
|
27076
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders,
|
|
27077
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)]] : [],
|
|
27068
27078
|
tradeGoods: {
|
|
27069
27079
|
originDataSource: getGoodDetails({
|
|
27070
|
-
mode: isStrict
|
|
27080
|
+
mode: isStrict,
|
|
27081
|
+
isAllOrders: typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type33 = typeMap$3[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.isShowSelectTradeGoods
|
|
27071
27082
|
}),
|
|
27072
27083
|
selectedGoodsChange: selectedGoodsChange
|
|
27073
27084
|
}
|
|
@@ -27096,11 +27107,12 @@ var typeMap$4 = {
|
|
|
27096
27107
|
money: 'orderPrice',
|
|
27097
27108
|
share: 'sharePrice'
|
|
27098
27109
|
},
|
|
27099
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27110
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27111
|
+
isShowSelectTradeGoods: true
|
|
27100
27112
|
}
|
|
27101
27113
|
};
|
|
27102
27114
|
var GyReissue = function GyReissue(props) {
|
|
27103
|
-
var _typeMap$
|
|
27115
|
+
var _typeMap$type32, _typeMap$type33, _typeMap$type34, _systemOrder$orders, _typeMap$type35, _value$typeMap$type$s9, _typeMap$type36, _typeMap$type37, _typeMap$type38, _typeMap$type39, _value$typeMap$type$s10, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
27104
27116
|
var value = props.value,
|
|
27105
27117
|
onChange = props.onChange,
|
|
27106
27118
|
_props$reasonList = props.reasonList,
|
|
@@ -27246,17 +27258,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27246
27258
|
}))));
|
|
27247
27259
|
};
|
|
27248
27260
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27249
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27261
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27250
27262
|
var mode = _ref7.mode,
|
|
27251
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27263
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27264
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27265
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27252
27266
|
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrder];
|
|
27253
27267
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo];
|
|
27254
27268
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27255
27269
|
return order.code === systemOrderNo;
|
|
27256
27270
|
});
|
|
27257
|
-
var
|
|
27271
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
27272
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
27273
|
+
var _order$details;
|
|
27274
|
+
return order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length;
|
|
27275
|
+
});
|
|
27276
|
+
var goodDetails = hasGoodDetails ? updateGyGoodsHandle(orders) : [];
|
|
27258
27277
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27259
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27278
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27260
27279
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27261
27280
|
}) : goodDetails;
|
|
27262
27281
|
};
|
|
@@ -27293,25 +27312,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27293
27312
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27294
27313
|
};
|
|
27295
27314
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
27296
|
-
var _ref12, _typeMap$
|
|
27315
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27297
27316
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27298
27317
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27299
27318
|
// 原订单商品
|
|
27300
27319
|
var originTradeGoodList = getGoodDetails({
|
|
27301
|
-
mode: isStrict
|
|
27320
|
+
mode: isStrict,
|
|
27321
|
+
isAllOrders: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.isShowSelectTradeGoods
|
|
27302
27322
|
}) || [];
|
|
27303
27323
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27304
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27305
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27324
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)]) || [];
|
|
27325
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
27306
27326
|
return skuList.includes(item.uuid);
|
|
27307
27327
|
});
|
|
27308
27328
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27309
27329
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27310
27330
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27311
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27331
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)], isStrict]);
|
|
27312
27332
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27313
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27314
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27333
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder];
|
|
27334
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.systemOrderNo]);
|
|
27315
27335
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
27316
27336
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
27317
27337
|
gutter: 8,
|
|
@@ -27331,12 +27351,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27331
27351
|
},
|
|
27332
27352
|
disabled: disabled,
|
|
27333
27353
|
allowClear: false,
|
|
27334
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27354
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.systemOrderNo)],
|
|
27335
27355
|
onChange: function onChange(val) {
|
|
27336
27356
|
return changeSystemOrderHandle(val);
|
|
27337
27357
|
},
|
|
27338
27358
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27339
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
27359
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type36 = typeMap$4[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.showOrderInfo) || []).map(function (item) {
|
|
27340
27360
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
27341
27361
|
className: styles$6.systemNoDisabled,
|
|
27342
27362
|
key: item.billNo,
|
|
@@ -27360,7 +27380,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27360
27380
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27361
27381
|
allowClear: false,
|
|
27362
27382
|
options: reasonList,
|
|
27363
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27383
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type37 = typeMap$4[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.typeName)],
|
|
27364
27384
|
onChange: function onChange(val) {
|
|
27365
27385
|
return changeTypeHandle(val);
|
|
27366
27386
|
}
|
|
@@ -27370,19 +27390,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27370
27390
|
type: type,
|
|
27371
27391
|
disabled: disabled,
|
|
27372
27392
|
canUpdateNumber: showChangeBtn,
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27393
|
+
// showChangeBtn={showChangeBtn}
|
|
27394
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27395
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27396
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27376
27397
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27377
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27398
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type38 = typeMap$4[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key)],
|
|
27378
27399
|
onChange: function onChange(val) {
|
|
27379
27400
|
return changeGoodHandle(val);
|
|
27380
27401
|
},
|
|
27381
27402
|
onModeChange: handleModeChange,
|
|
27382
27403
|
isStrict: isStrict,
|
|
27404
|
+
isShowSelectTradeGoods: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type39 = typeMap$4[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.isShowSelectTradeGoods,
|
|
27405
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s10 = value[(_typeMap$type40 = typeMap$4[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrder]) === null || _value$typeMap$type$s10 === void 0 ? void 0 : _value$typeMap$type$s10.orders,
|
|
27406
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type41 = typeMap$4[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrderNo)]] : [],
|
|
27383
27407
|
tradeGoods: {
|
|
27384
27408
|
originDataSource: getGoodDetails({
|
|
27385
|
-
mode: isStrict
|
|
27409
|
+
mode: isStrict,
|
|
27410
|
+
isAllOrders: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type42 = typeMap$4[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.isShowSelectTradeGoods
|
|
27386
27411
|
}),
|
|
27387
27412
|
selectedGoodsChange: selectedGoodsChange
|
|
27388
27413
|
}
|
package/dist/index.js
CHANGED
|
@@ -8825,9 +8825,6 @@ var processBsExchangeGoods = function processBsExchangeGoods(getValue) {
|
|
|
8825
8825
|
var bsExchangeType = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeType")), !kmkfUtils.isNull(config === null || config === void 0 ? void 0 : config.initReason) ? Array.isArray(config.initReason) ? config.initReason : [config.initReason] : []);
|
|
8826
8826
|
var bsExchangeReturnGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeReturnGoods")), []);
|
|
8827
8827
|
var bsExchangeSwapOutGoods = jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsExchangeSwapOutGoods")), []);
|
|
8828
|
-
console.log('bsExchangeType', bsExchangeType);
|
|
8829
|
-
console.log('bsExchangeReturnGoods', bsExchangeReturnGoods);
|
|
8830
|
-
console.log('bsExchangeSwapOutGoods', bsExchangeSwapOutGoods);
|
|
8831
8828
|
//补发组装数据
|
|
8832
8829
|
if ((bsExchangeType === null || bsExchangeType === void 0 ? void 0 : bsExchangeType.length) && ['2', '4'].includes(bsExchangeType[0])) {
|
|
8833
8830
|
var maxLen = maxBy__default['default'](bsExchangeReturnGoods, function (t) {
|
|
@@ -21839,7 +21836,12 @@ var systemOrderNoMap = {
|
|
|
21839
21836
|
JST_GOODS: 'oId',
|
|
21840
21837
|
WLN_GOODS: 'tradeNo',
|
|
21841
21838
|
JY_GOODS: 'tradeNo',
|
|
21842
|
-
JY_REISSUE_GOODS: 'tradeNo'
|
|
21839
|
+
JY_REISSUE_GOODS: 'tradeNo',
|
|
21840
|
+
KM_REISSUE_GOODS: 'sid',
|
|
21841
|
+
JST_REISSUE_GOODS: 'oId',
|
|
21842
|
+
GY_REISSUE_GOODS: 'code',
|
|
21843
|
+
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
21844
|
+
WDT_REISSUE_GOODS: 'tradeNo'
|
|
21843
21845
|
};
|
|
21844
21846
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21845
21847
|
var columns = _ref.columns,
|
|
@@ -21849,14 +21851,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21849
21851
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21850
21852
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21851
21853
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21852
|
-
_ref$
|
|
21853
|
-
|
|
21854
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21855
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21854
21856
|
_ref$systemOrders = _ref.systemOrders,
|
|
21855
21857
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21856
21858
|
_ref$selectedSystemOr = _ref.selectedSystemOrders,
|
|
21859
|
+
selectedSystemOrders = _ref$selectedSystemOr === void 0 ? [] : _ref$selectedSystemOr,
|
|
21860
|
+
_ref$validSystemOrder = _ref.validSystemOrder,
|
|
21861
|
+
validSystemOrder = _ref$validSystemOrder === void 0 ? false : _ref$validSystemOrder,
|
|
21857
21862
|
_ref$type = _ref.type,
|
|
21858
21863
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21859
|
-
width = _ref.width
|
|
21864
|
+
width = _ref.width,
|
|
21865
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21866
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21860
21867
|
var _useState = React.useState(),
|
|
21861
21868
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21862
21869
|
selectSystemNo = _useState2[0],
|
|
@@ -21866,6 +21873,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21866
21873
|
tradeGoodsVisible = _useState4[0],
|
|
21867
21874
|
setTradeGoodsVisible = _useState4[1];
|
|
21868
21875
|
var openModal = function openModal() {
|
|
21876
|
+
if (validSystemOrder) {
|
|
21877
|
+
antd.message.warning('请选择补发系统单');
|
|
21878
|
+
return;
|
|
21879
|
+
}
|
|
21869
21880
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21870
21881
|
getDataSourceAsync().then(function () {
|
|
21871
21882
|
setTradeGoodsVisible(true);
|
|
@@ -21873,15 +21884,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21873
21884
|
} else {
|
|
21874
21885
|
setTradeGoodsVisible(true);
|
|
21875
21886
|
}
|
|
21876
|
-
//
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
// );
|
|
21881
|
-
// setSelectSystemNo(codeList || []);
|
|
21882
|
-
// }
|
|
21887
|
+
// 补发直接传入的是systemNo
|
|
21888
|
+
if (isShowSelect && isReissueType) {
|
|
21889
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21890
|
+
}
|
|
21883
21891
|
};
|
|
21884
|
-
|
|
21885
21892
|
var closeModal = function closeModal() {
|
|
21886
21893
|
return setTradeGoodsVisible(false);
|
|
21887
21894
|
};
|
|
@@ -21897,10 +21904,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21897
21904
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21898
21905
|
}));
|
|
21899
21906
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21900
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21901
|
-
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21902
|
-
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21903
|
-
}));
|
|
21904
21907
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21905
21908
|
};
|
|
21906
21909
|
var rowSelection = {
|
|
@@ -21925,7 +21928,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21925
21928
|
style: {
|
|
21926
21929
|
maxWidth: '1000px'
|
|
21927
21930
|
}
|
|
21928
|
-
},
|
|
21931
|
+
}, isShowSelect && /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21929
21932
|
style: {
|
|
21930
21933
|
marginBottom: '12px'
|
|
21931
21934
|
}
|
|
@@ -22029,13 +22032,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22029
22032
|
systemOrders = props.systemOrders,
|
|
22030
22033
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22031
22034
|
_props$templateDetail = props.templateDetail,
|
|
22032
|
-
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail
|
|
22035
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail,
|
|
22036
|
+
_props$hasSelectedSys = props.hasSelectedSystemOrder,
|
|
22037
|
+
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys;
|
|
22033
22038
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22034
22039
|
// 监听聚水潭退货商品
|
|
22035
22040
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
22036
22041
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22037
|
-
//
|
|
22038
|
-
var
|
|
22042
|
+
// 判断是否为是否展示系统单筛选项
|
|
22043
|
+
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
22044
|
+
var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
|
|
22039
22045
|
var refModal = React.useRef();
|
|
22040
22046
|
console.debug('表格数据', value);
|
|
22041
22047
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22311,6 +22317,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22311
22317
|
return params;
|
|
22312
22318
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22313
22319
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
22320
|
+
var validSystemOrder = React.useMemo(function () {
|
|
22321
|
+
return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
|
|
22322
|
+
}, [type, hasSelectedSystemOrder]);
|
|
22314
22323
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22315
22324
|
style: {
|
|
22316
22325
|
float: 'right'
|
|
@@ -22319,7 +22328,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22319
22328
|
checked: isStrict,
|
|
22320
22329
|
onChange: handleCheckboxChange
|
|
22321
22330
|
}, "\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, {
|
|
22322
|
-
|
|
22331
|
+
validSystemOrder: validSystemOrder,
|
|
22332
|
+
isShowSelect: isShowSelect,
|
|
22323
22333
|
uniqueKey: uniqueKey,
|
|
22324
22334
|
type: type,
|
|
22325
22335
|
columns: orderModalColumns,
|
|
@@ -22329,7 +22339,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22329
22339
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22330
22340
|
systemOrders: systemOrders,
|
|
22331
22341
|
selectedSystemOrders: selectedSystemOrders,
|
|
22332
|
-
width: width || 850
|
|
22342
|
+
width: width || 850,
|
|
22343
|
+
isReissueType: isReissueType
|
|
22333
22344
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
22334
22345
|
type: "link",
|
|
22335
22346
|
onClick: handleChangeGoods
|
|
@@ -25451,11 +25462,12 @@ var typeMap$1 = {
|
|
|
25451
25462
|
money: 'orderPrice',
|
|
25452
25463
|
share: 'sharePrice'
|
|
25453
25464
|
},
|
|
25454
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25465
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25466
|
+
isShowSelectTradeGoods: true
|
|
25455
25467
|
}
|
|
25456
25468
|
};
|
|
25457
25469
|
var wdtReissue = function wdtReissue(props) {
|
|
25458
|
-
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s6, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
25470
|
+
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s6, _typeMap$type28, _typeMap$type29, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s7, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
25459
25471
|
var value = props.value,
|
|
25460
25472
|
onChange = props.onChange,
|
|
25461
25473
|
_props$reasonList = props.reasonList,
|
|
@@ -25484,36 +25496,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25484
25496
|
}
|
|
25485
25497
|
return;
|
|
25486
25498
|
}, [value]);
|
|
25487
|
-
// useEffect(() => {
|
|
25488
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
25489
|
-
// if (systemOrderNo) {
|
|
25490
|
-
// if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
|
|
25491
|
-
// onChange?.({
|
|
25492
|
-
// ...value,
|
|
25493
|
-
// [typeMap[type]?.key]: getGoodDetails({
|
|
25494
|
-
// mode: isStrict
|
|
25495
|
-
// })
|
|
25496
|
-
// })
|
|
25497
|
-
// }
|
|
25498
|
-
// }
|
|
25499
|
-
// return;
|
|
25500
|
-
// }, [value?.[typeMap[type]?.systemOrderNo]]);
|
|
25501
|
-
// const getWdtOrderList = async (orderNo: string) => {
|
|
25502
|
-
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
25503
|
-
// const orders = data?.trades || [];
|
|
25504
|
-
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
25505
|
-
// return { billNo, billType, billTag }
|
|
25506
|
-
// });
|
|
25507
|
-
// onChange({
|
|
25508
|
-
// ...value,
|
|
25509
|
-
// [typeMap[type]?.systemOrder]: {
|
|
25510
|
-
// ...value[typeMap[type]?.systemOrder],
|
|
25511
|
-
// showOrderInfo,
|
|
25512
|
-
// orders,
|
|
25513
|
-
// },
|
|
25514
|
-
// });
|
|
25515
|
-
// })
|
|
25516
|
-
// };
|
|
25517
25499
|
var getOrderList = /*#__PURE__*/function () {
|
|
25518
25500
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25519
25501
|
var _typeMap$type5;
|
|
@@ -25573,17 +25555,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25573
25555
|
}))));
|
|
25574
25556
|
};
|
|
25575
25557
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25576
|
-
var _typeMap$type14, _typeMap$type15
|
|
25558
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25577
25559
|
var mode = _ref3.mode,
|
|
25578
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25560
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25561
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25562
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25579
25563
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrder];
|
|
25580
25564
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo];
|
|
25581
25565
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25582
25566
|
return order.tradeNo === systemOrderNo;
|
|
25583
25567
|
});
|
|
25584
|
-
var
|
|
25568
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
25569
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25570
|
+
var _order$goodDetails;
|
|
25571
|
+
return order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length;
|
|
25572
|
+
});
|
|
25573
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateWdtGoodsHandle([order]) : [];
|
|
25585
25574
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25586
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25575
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25587
25576
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25588
25577
|
}) : goodDetails;
|
|
25589
25578
|
};
|
|
@@ -25686,7 +25675,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25686
25675
|
type: type,
|
|
25687
25676
|
disabled: disabled,
|
|
25688
25677
|
canUpdateNumber: showChangeBtn,
|
|
25689
|
-
|
|
25678
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25679
|
+
// showChangeBtn={showChangeBtn}
|
|
25690
25680
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25691
25681
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
|
|
25692
25682
|
onChange: function onChange(val) {
|
|
@@ -25695,9 +25685,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25695
25685
|
onModeChange: handleModeChange,
|
|
25696
25686
|
showModeBtn: showModeBtn,
|
|
25697
25687
|
isStrict: isStrict,
|
|
25688
|
+
isShowSelectTradeGoods: typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.isShowSelectTradeGoods,
|
|
25689
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders,
|
|
25690
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type33 = typeMap$1[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrderNo)]] : [],
|
|
25698
25691
|
tradeGoods: {
|
|
25699
25692
|
originDataSource: getGoodDetails({
|
|
25700
|
-
mode: isStrict
|
|
25693
|
+
mode: isStrict,
|
|
25694
|
+
isAllOrders: typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type34 = typeMap$1[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.isShowSelectTradeGoods
|
|
25701
25695
|
}),
|
|
25702
25696
|
selectedGoodsChange: selectedGoodsChange
|
|
25703
25697
|
}
|
|
@@ -25721,7 +25715,8 @@ var typeMap$2 = {
|
|
|
25721
25715
|
outerOiIdKey: '',
|
|
25722
25716
|
goodDetailsKey: 'items',
|
|
25723
25717
|
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
25724
|
-
uniqueKey: 'uuid'
|
|
25718
|
+
uniqueKey: 'uuid',
|
|
25719
|
+
isShowSelectTradeGoods: true
|
|
25725
25720
|
},
|
|
25726
25721
|
JST_RETURN_GOODS: {
|
|
25727
25722
|
compType: '退货',
|
|
@@ -25760,7 +25755,8 @@ var typeMap$2 = {
|
|
|
25760
25755
|
oIdKey: 'billNo',
|
|
25761
25756
|
outerOiIdKey: '',
|
|
25762
25757
|
goodDetailsKey: 'subOrders',
|
|
25763
|
-
uniqueKey: 'id'
|
|
25758
|
+
uniqueKey: 'id',
|
|
25759
|
+
isShowSelectTradeGoods: true
|
|
25764
25760
|
},
|
|
25765
25761
|
JY_REISSUE_GOODS: {
|
|
25766
25762
|
compType: '补发',
|
|
@@ -25779,7 +25775,7 @@ var typeMap$2 = {
|
|
|
25779
25775
|
}
|
|
25780
25776
|
};
|
|
25781
25777
|
var PublicReissue = function PublicReissue(props) {
|
|
25782
|
-
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50,
|
|
25778
|
+
var _typeMap$type34, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _value$typeMap$type$s8, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _value$typeMap$type$s9, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54;
|
|
25783
25779
|
var value = props.value,
|
|
25784
25780
|
onChange = props.onChange,
|
|
25785
25781
|
_props$reasonList = props.reasonList,
|
|
@@ -26048,25 +26044,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26048
26044
|
type: type,
|
|
26049
26045
|
disabled: disabled,
|
|
26050
26046
|
canUpdateNumber: showChangeBtn,
|
|
26051
|
-
|
|
26052
|
-
|
|
26053
|
-
|
|
26047
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
26048
|
+
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
26049
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.alwaysShowChooseErpGoodsBtn,
|
|
26050
|
+
// showErpGoodsBtn={typeMap?.[type]?.showErpGoodsBtn}
|
|
26054
26051
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
26055
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26052
|
+
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.key)],
|
|
26056
26053
|
onChange: function onChange(val) {
|
|
26057
26054
|
return changeGoodHandle(val);
|
|
26058
26055
|
},
|
|
26059
26056
|
onModeChange: handleModeChange,
|
|
26060
26057
|
showModeBtn: false,
|
|
26061
26058
|
isStrict: isStrict,
|
|
26062
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26063
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
26059
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.isShowSelectTradeGoods,
|
|
26060
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
26061
|
+
selectedSystemOrders: showChangeBtn ? [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.systemOrderNo)]] : [],
|
|
26064
26062
|
tradeGoods: {
|
|
26065
26063
|
originDataSource: getGoodDetails({
|
|
26066
26064
|
mode: isStrict,
|
|
26067
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26065
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.isShowSelectTradeGoods
|
|
26068
26066
|
}),
|
|
26069
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26067
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.uniqueKey) || 'uuid',
|
|
26070
26068
|
selectedGoodsChange: selectedGoodsChange
|
|
26071
26069
|
}
|
|
26072
26070
|
})));
|
|
@@ -26854,11 +26852,12 @@ var typeMap$3 = {
|
|
|
26854
26852
|
typeName: 'bsE3ReissueType',
|
|
26855
26853
|
systemOrder: 'bsE3SystemOrder',
|
|
26856
26854
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26857
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26855
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26856
|
+
isShowSelectTradeGoods: true
|
|
26858
26857
|
}
|
|
26859
26858
|
};
|
|
26860
26859
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26861
|
-
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
26860
|
+
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29, _typeMap$type30, _value$typeMap$type$s7, _typeMap$type31, _typeMap$type32, _typeMap$type33;
|
|
26862
26861
|
var value = props.value,
|
|
26863
26862
|
onChange = props.onChange,
|
|
26864
26863
|
_props$reasonList = props.reasonList,
|
|
@@ -26960,17 +26959,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26960
26959
|
}))));
|
|
26961
26960
|
};
|
|
26962
26961
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26963
|
-
var _typeMap$type13, _typeMap$type14
|
|
26962
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26964
26963
|
var mode = _ref4.mode,
|
|
26965
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26964
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26965
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26966
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26966
26967
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
26967
26968
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
26968
26969
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26969
26970
|
return order.orderSn === systemOrderNo;
|
|
26970
26971
|
});
|
|
26971
|
-
var
|
|
26972
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
26973
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
26974
|
+
var _order$orderDetailGet;
|
|
26975
|
+
return order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length;
|
|
26976
|
+
});
|
|
26977
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateBsE3GoodsHandle([order], 'sharePrice') : [];
|
|
26972
26978
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26973
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26979
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26974
26980
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26975
26981
|
}) : goodDetails;
|
|
26976
26982
|
};
|
|
@@ -27071,7 +27077,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27071
27077
|
type: type,
|
|
27072
27078
|
disabled: disabled,
|
|
27073
27079
|
canUpdateNumber: showChangeBtn,
|
|
27074
|
-
|
|
27080
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27081
|
+
// showChangeBtn={showChangeBtn}
|
|
27075
27082
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27076
27083
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
27077
27084
|
onChange: function onChange(val) {
|
|
@@ -27080,9 +27087,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27080
27087
|
onModeChange: handleModeChange,
|
|
27081
27088
|
showModeBtn: false,
|
|
27082
27089
|
isStrict: isStrict,
|
|
27090
|
+
isShowSelectTradeGoods: typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.isShowSelectTradeGoods,
|
|
27091
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders,
|
|
27092
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)]] : [],
|
|
27083
27093
|
tradeGoods: {
|
|
27084
27094
|
originDataSource: getGoodDetails({
|
|
27085
|
-
mode: isStrict
|
|
27095
|
+
mode: isStrict,
|
|
27096
|
+
isAllOrders: typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type33 = typeMap$3[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.isShowSelectTradeGoods
|
|
27086
27097
|
}),
|
|
27087
27098
|
selectedGoodsChange: selectedGoodsChange
|
|
27088
27099
|
}
|
|
@@ -27111,11 +27122,12 @@ var typeMap$4 = {
|
|
|
27111
27122
|
money: 'orderPrice',
|
|
27112
27123
|
share: 'sharePrice'
|
|
27113
27124
|
},
|
|
27114
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27125
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27126
|
+
isShowSelectTradeGoods: true
|
|
27115
27127
|
}
|
|
27116
27128
|
};
|
|
27117
27129
|
var GyReissue = function GyReissue(props) {
|
|
27118
|
-
var _typeMap$
|
|
27130
|
+
var _typeMap$type32, _typeMap$type33, _typeMap$type34, _systemOrder$orders, _typeMap$type35, _value$typeMap$type$s9, _typeMap$type36, _typeMap$type37, _typeMap$type38, _typeMap$type39, _value$typeMap$type$s10, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
27119
27131
|
var value = props.value,
|
|
27120
27132
|
onChange = props.onChange,
|
|
27121
27133
|
_props$reasonList = props.reasonList,
|
|
@@ -27261,17 +27273,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27261
27273
|
}))));
|
|
27262
27274
|
};
|
|
27263
27275
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27264
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27276
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27265
27277
|
var mode = _ref7.mode,
|
|
27266
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27278
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27279
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27280
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27267
27281
|
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrder];
|
|
27268
27282
|
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo];
|
|
27269
27283
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27270
27284
|
return order.code === systemOrderNo;
|
|
27271
27285
|
});
|
|
27272
|
-
var
|
|
27286
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
27287
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
27288
|
+
var _order$details;
|
|
27289
|
+
return order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length;
|
|
27290
|
+
});
|
|
27291
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateGyGoodsHandle(orders) : [];
|
|
27273
27292
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27274
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27293
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27275
27294
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27276
27295
|
}) : goodDetails;
|
|
27277
27296
|
};
|
|
@@ -27308,25 +27327,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27308
27327
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27309
27328
|
};
|
|
27310
27329
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
27311
|
-
var _ref12, _typeMap$
|
|
27330
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27312
27331
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27313
27332
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27314
27333
|
// 原订单商品
|
|
27315
27334
|
var originTradeGoodList = getGoodDetails({
|
|
27316
|
-
mode: isStrict
|
|
27335
|
+
mode: isStrict,
|
|
27336
|
+
isAllOrders: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.isShowSelectTradeGoods
|
|
27317
27337
|
}) || [];
|
|
27318
27338
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27319
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27320
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27339
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)]) || [];
|
|
27340
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
27321
27341
|
return skuList.includes(item.uuid);
|
|
27322
27342
|
});
|
|
27323
27343
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27324
27344
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27325
27345
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27326
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27346
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)], isStrict]);
|
|
27327
27347
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27328
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27329
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27348
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder];
|
|
27349
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.systemOrderNo]);
|
|
27330
27350
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
27331
27351
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
27332
27352
|
gutter: 8,
|
|
@@ -27346,12 +27366,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27346
27366
|
},
|
|
27347
27367
|
disabled: disabled,
|
|
27348
27368
|
allowClear: false,
|
|
27349
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27369
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.systemOrderNo)],
|
|
27350
27370
|
onChange: function onChange(val) {
|
|
27351
27371
|
return changeSystemOrderHandle(val);
|
|
27352
27372
|
},
|
|
27353
27373
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27354
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
27374
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type36 = typeMap$4[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.showOrderInfo) || []).map(function (item) {
|
|
27355
27375
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
27356
27376
|
className: styles$6.systemNoDisabled,
|
|
27357
27377
|
key: item.billNo,
|
|
@@ -27375,7 +27395,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27375
27395
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27376
27396
|
allowClear: false,
|
|
27377
27397
|
options: reasonList,
|
|
27378
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27398
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type37 = typeMap$4[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.typeName)],
|
|
27379
27399
|
onChange: function onChange(val) {
|
|
27380
27400
|
return changeTypeHandle(val);
|
|
27381
27401
|
}
|
|
@@ -27385,19 +27405,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27385
27405
|
type: type,
|
|
27386
27406
|
disabled: disabled,
|
|
27387
27407
|
canUpdateNumber: showChangeBtn,
|
|
27388
|
-
|
|
27389
|
-
|
|
27390
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27408
|
+
// showChangeBtn={showChangeBtn}
|
|
27409
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27410
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27411
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27391
27412
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27392
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27413
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type38 = typeMap$4[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key)],
|
|
27393
27414
|
onChange: function onChange(val) {
|
|
27394
27415
|
return changeGoodHandle(val);
|
|
27395
27416
|
},
|
|
27396
27417
|
onModeChange: handleModeChange,
|
|
27397
27418
|
isStrict: isStrict,
|
|
27419
|
+
isShowSelectTradeGoods: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type39 = typeMap$4[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.isShowSelectTradeGoods,
|
|
27420
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s10 = value[(_typeMap$type40 = typeMap$4[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrder]) === null || _value$typeMap$type$s10 === void 0 ? void 0 : _value$typeMap$type$s10.orders,
|
|
27421
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type41 = typeMap$4[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrderNo)]] : [],
|
|
27398
27422
|
tradeGoods: {
|
|
27399
27423
|
originDataSource: getGoodDetails({
|
|
27400
|
-
mode: isStrict
|
|
27424
|
+
mode: isStrict,
|
|
27425
|
+
isAllOrders: typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type42 = typeMap$4[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.isShowSelectTradeGoods
|
|
27401
27426
|
}),
|
|
27402
27427
|
selectedGoodsChange: selectedGoodsChange
|
|
27403
27428
|
}
|
|
@@ -19,6 +19,7 @@ interface BsGoodsProps {
|
|
|
19
19
|
shopId: string | number;
|
|
20
20
|
maxLength: number;
|
|
21
21
|
showChangeBtn: boolean;
|
|
22
|
+
hasSelectedSystemOrder: boolean;
|
|
22
23
|
showErpGoodsBtn: boolean;
|
|
23
24
|
showModeBtn: boolean;
|
|
24
25
|
alwaysShowChooseErpGoodsBtn?: boolean;
|
|
@@ -56,12 +57,14 @@ type SelectTradeGoodsProps = {
|
|
|
56
57
|
uniqueKey?: string;
|
|
57
58
|
selectedRowKeys: Array<React.Key>;
|
|
58
59
|
onChangeSelectedKeys: (p: React.Key[]) => void;
|
|
59
|
-
|
|
60
|
+
isShowSelect?: boolean;
|
|
60
61
|
systemOrders?: any[];
|
|
61
62
|
selectedSystemOrders?: any[];
|
|
62
63
|
type?: string;
|
|
63
64
|
width?: number;
|
|
65
|
+
validSystemOrder?: boolean;
|
|
66
|
+
isReissueType?: boolean;
|
|
64
67
|
};
|
|
65
|
-
export declare const SelectTradeGoods: ({ columns, dataSource, getDataSourceAsync, selectedRowKeys, onChangeSelectedKeys, uniqueKey,
|
|
68
|
+
export declare const SelectTradeGoods: ({ columns, dataSource, getDataSourceAsync, selectedRowKeys, onChangeSelectedKeys, uniqueKey, isShowSelect, systemOrders, selectedSystemOrders, validSystemOrder, type, width, isReissueType, }: SelectTradeGoodsProps) => React.JSX.Element;
|
|
66
69
|
declare const GoodItem: (props: MakeRequired<Partial<BsGoodsProps>, 'useGoodsSourceFormat'>) => React.JSX.Element;
|
|
67
70
|
export default GoodItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.2.13-beta.
|
|
3
|
+
"version": "2.2.13-beta.91",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.87",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"ali-react-table": "2.6.1",
|
|
26
26
|
"bignumber.js": "^9.1.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "fafcb503a0efccb5d5f8219bea798faf6f392879"
|
|
70
70
|
}
|