@kmkf-fe-packages/basic-components 2.2.13-beta.87 → 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 -100
- package/dist/index.js +128 -100
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -21821,7 +21821,12 @@ var systemOrderNoMap = {
|
|
|
21821
21821
|
JST_GOODS: 'oId',
|
|
21822
21822
|
WLN_GOODS: 'tradeNo',
|
|
21823
21823
|
JY_GOODS: 'tradeNo',
|
|
21824
|
-
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'
|
|
21825
21830
|
};
|
|
21826
21831
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21827
21832
|
var columns = _ref.columns,
|
|
@@ -21831,14 +21836,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21831
21836
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21832
21837
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21833
21838
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21834
|
-
_ref$
|
|
21835
|
-
|
|
21839
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21840
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21836
21841
|
_ref$systemOrders = _ref.systemOrders,
|
|
21837
21842
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21838
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,
|
|
21839
21847
|
_ref$type = _ref.type,
|
|
21840
21848
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21841
|
-
width = _ref.width
|
|
21849
|
+
width = _ref.width,
|
|
21850
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21851
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21842
21852
|
var _useState = useState(),
|
|
21843
21853
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21844
21854
|
selectSystemNo = _useState2[0],
|
|
@@ -21848,6 +21858,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21848
21858
|
tradeGoodsVisible = _useState4[0],
|
|
21849
21859
|
setTradeGoodsVisible = _useState4[1];
|
|
21850
21860
|
var openModal = function openModal() {
|
|
21861
|
+
if (validSystemOrder) {
|
|
21862
|
+
message.warning('请选择补发系统单');
|
|
21863
|
+
return;
|
|
21864
|
+
}
|
|
21851
21865
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21852
21866
|
getDataSourceAsync().then(function () {
|
|
21853
21867
|
setTradeGoodsVisible(true);
|
|
@@ -21855,15 +21869,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21855
21869
|
} else {
|
|
21856
21870
|
setTradeGoodsVisible(true);
|
|
21857
21871
|
}
|
|
21858
|
-
//
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
// );
|
|
21863
|
-
// setSelectSystemNo(codeList || []);
|
|
21864
|
-
// }
|
|
21872
|
+
// 补发直接传入的是systemNo
|
|
21873
|
+
if (isShowSelect && isReissueType) {
|
|
21874
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21875
|
+
}
|
|
21865
21876
|
};
|
|
21866
|
-
|
|
21867
21877
|
var closeModal = function closeModal() {
|
|
21868
21878
|
return setTradeGoodsVisible(false);
|
|
21869
21879
|
};
|
|
@@ -21879,10 +21889,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21879
21889
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21880
21890
|
}));
|
|
21881
21891
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21882
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21883
|
-
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21884
|
-
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21885
|
-
}));
|
|
21886
21892
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21887
21893
|
};
|
|
21888
21894
|
var rowSelection = {
|
|
@@ -21907,7 +21913,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21907
21913
|
style: {
|
|
21908
21914
|
maxWidth: '1000px'
|
|
21909
21915
|
}
|
|
21910
|
-
},
|
|
21916
|
+
}, isShowSelect && /*#__PURE__*/React.createElement(Row, {
|
|
21911
21917
|
style: {
|
|
21912
21918
|
marginBottom: '12px'
|
|
21913
21919
|
}
|
|
@@ -22011,13 +22017,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22011
22017
|
systemOrders = props.systemOrders,
|
|
22012
22018
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22013
22019
|
_props$templateDetail = props.templateDetail,
|
|
22014
|
-
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;
|
|
22015
22023
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22016
22024
|
// 监听聚水潭退货商品
|
|
22017
22025
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
22018
22026
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22019
|
-
//
|
|
22020
|
-
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;
|
|
22021
22030
|
var refModal = useRef();
|
|
22022
22031
|
console.debug('表格数据', value);
|
|
22023
22032
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22293,6 +22302,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22293
22302
|
return params;
|
|
22294
22303
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22295
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]);
|
|
22296
22308
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
22297
22309
|
style: {
|
|
22298
22310
|
float: 'right'
|
|
@@ -22301,7 +22313,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22301
22313
|
checked: isStrict,
|
|
22302
22314
|
onChange: handleCheckboxChange
|
|
22303
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, {
|
|
22304
|
-
|
|
22316
|
+
validSystemOrder: validSystemOrder,
|
|
22317
|
+
isShowSelect: isShowSelect,
|
|
22305
22318
|
uniqueKey: uniqueKey,
|
|
22306
22319
|
type: type,
|
|
22307
22320
|
columns: orderModalColumns,
|
|
@@ -22311,7 +22324,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22311
22324
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22312
22325
|
systemOrders: systemOrders,
|
|
22313
22326
|
selectedSystemOrders: selectedSystemOrders,
|
|
22314
|
-
width: width || 850
|
|
22327
|
+
width: width || 850,
|
|
22328
|
+
isReissueType: isReissueType
|
|
22315
22329
|
}), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
|
|
22316
22330
|
type: "link",
|
|
22317
22331
|
onClick: handleChangeGoods
|
|
@@ -25433,11 +25447,12 @@ var typeMap$1 = {
|
|
|
25433
25447
|
money: 'orderPrice',
|
|
25434
25448
|
share: 'sharePrice'
|
|
25435
25449
|
},
|
|
25436
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25450
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25451
|
+
isShowSelectTradeGoods: true
|
|
25437
25452
|
}
|
|
25438
25453
|
};
|
|
25439
25454
|
var wdtReissue = function wdtReissue(props) {
|
|
25440
|
-
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;
|
|
25441
25456
|
var value = props.value,
|
|
25442
25457
|
onChange = props.onChange,
|
|
25443
25458
|
_props$reasonList = props.reasonList,
|
|
@@ -25466,36 +25481,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25466
25481
|
}
|
|
25467
25482
|
return;
|
|
25468
25483
|
}, [value]);
|
|
25469
|
-
// useEffect(() => {
|
|
25470
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
25471
|
-
// if (systemOrderNo) {
|
|
25472
|
-
// if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
|
|
25473
|
-
// onChange?.({
|
|
25474
|
-
// ...value,
|
|
25475
|
-
// [typeMap[type]?.key]: getGoodDetails({
|
|
25476
|
-
// mode: isStrict
|
|
25477
|
-
// })
|
|
25478
|
-
// })
|
|
25479
|
-
// }
|
|
25480
|
-
// }
|
|
25481
|
-
// return;
|
|
25482
|
-
// }, [value?.[typeMap[type]?.systemOrderNo]]);
|
|
25483
|
-
// const getWdtOrderList = async (orderNo: string) => {
|
|
25484
|
-
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
25485
|
-
// const orders = data?.trades || [];
|
|
25486
|
-
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
25487
|
-
// return { billNo, billType, billTag }
|
|
25488
|
-
// });
|
|
25489
|
-
// onChange({
|
|
25490
|
-
// ...value,
|
|
25491
|
-
// [typeMap[type]?.systemOrder]: {
|
|
25492
|
-
// ...value[typeMap[type]?.systemOrder],
|
|
25493
|
-
// showOrderInfo,
|
|
25494
|
-
// orders,
|
|
25495
|
-
// },
|
|
25496
|
-
// });
|
|
25497
|
-
// })
|
|
25498
|
-
// };
|
|
25499
25484
|
var getOrderList = /*#__PURE__*/function () {
|
|
25500
25485
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25501
25486
|
var _typeMap$type5;
|
|
@@ -25555,17 +25540,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25555
25540
|
}))));
|
|
25556
25541
|
};
|
|
25557
25542
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25558
|
-
var _typeMap$type14, _typeMap$type15
|
|
25543
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25559
25544
|
var mode = _ref3.mode,
|
|
25560
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25545
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25546
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25547
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25561
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];
|
|
25562
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];
|
|
25563
25550
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25564
25551
|
return order.tradeNo === systemOrderNo;
|
|
25565
25552
|
});
|
|
25566
|
-
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]) : [];
|
|
25567
25559
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25568
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25560
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25569
25561
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25570
25562
|
}) : goodDetails;
|
|
25571
25563
|
};
|
|
@@ -25668,7 +25660,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25668
25660
|
type: type,
|
|
25669
25661
|
disabled: disabled,
|
|
25670
25662
|
canUpdateNumber: showChangeBtn,
|
|
25671
|
-
|
|
25663
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25664
|
+
// showChangeBtn={showChangeBtn}
|
|
25672
25665
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25673
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)],
|
|
25674
25667
|
onChange: function onChange(val) {
|
|
@@ -25677,9 +25670,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25677
25670
|
onModeChange: handleModeChange,
|
|
25678
25671
|
showModeBtn: showModeBtn,
|
|
25679
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)]] : [],
|
|
25680
25676
|
tradeGoods: {
|
|
25681
25677
|
originDataSource: getGoodDetails({
|
|
25682
|
-
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
|
|
25683
25680
|
}),
|
|
25684
25681
|
selectedGoodsChange: selectedGoodsChange
|
|
25685
25682
|
}
|
|
@@ -25703,7 +25700,8 @@ var typeMap$2 = {
|
|
|
25703
25700
|
outerOiIdKey: '',
|
|
25704
25701
|
goodDetailsKey: 'items',
|
|
25705
25702
|
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
25706
|
-
uniqueKey: 'uuid'
|
|
25703
|
+
uniqueKey: 'uuid',
|
|
25704
|
+
isShowSelectTradeGoods: true
|
|
25707
25705
|
},
|
|
25708
25706
|
JST_RETURN_GOODS: {
|
|
25709
25707
|
compType: '退货',
|
|
@@ -25742,7 +25740,8 @@ var typeMap$2 = {
|
|
|
25742
25740
|
oIdKey: 'billNo',
|
|
25743
25741
|
outerOiIdKey: '',
|
|
25744
25742
|
goodDetailsKey: 'subOrders',
|
|
25745
|
-
uniqueKey: 'id'
|
|
25743
|
+
uniqueKey: 'id',
|
|
25744
|
+
isShowSelectTradeGoods: true
|
|
25746
25745
|
},
|
|
25747
25746
|
JY_REISSUE_GOODS: {
|
|
25748
25747
|
compType: '补发',
|
|
@@ -25761,7 +25760,7 @@ var typeMap$2 = {
|
|
|
25761
25760
|
}
|
|
25762
25761
|
};
|
|
25763
25762
|
var PublicReissue = function PublicReissue(props) {
|
|
25764
|
-
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;
|
|
25765
25764
|
var value = props.value,
|
|
25766
25765
|
onChange = props.onChange,
|
|
25767
25766
|
_props$reasonList = props.reasonList,
|
|
@@ -26030,25 +26029,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26030
26029
|
type: type,
|
|
26031
26030
|
disabled: disabled,
|
|
26032
26031
|
canUpdateNumber: showChangeBtn,
|
|
26033
|
-
|
|
26034
|
-
|
|
26035
|
-
|
|
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}
|
|
26036
26036
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
26037
|
-
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)],
|
|
26038
26038
|
onChange: function onChange(val) {
|
|
26039
26039
|
return changeGoodHandle(val);
|
|
26040
26040
|
},
|
|
26041
26041
|
onModeChange: handleModeChange,
|
|
26042
26042
|
showModeBtn: false,
|
|
26043
26043
|
isStrict: isStrict,
|
|
26044
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26045
|
-
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)]] : [],
|
|
26046
26047
|
tradeGoods: {
|
|
26047
26048
|
originDataSource: getGoodDetails({
|
|
26048
26049
|
mode: isStrict,
|
|
26049
|
-
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
|
|
26050
26051
|
}),
|
|
26051
|
-
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',
|
|
26052
26053
|
selectedGoodsChange: selectedGoodsChange
|
|
26053
26054
|
}
|
|
26054
26055
|
})));
|
|
@@ -26836,11 +26837,12 @@ var typeMap$3 = {
|
|
|
26836
26837
|
typeName: 'bsE3ReissueType',
|
|
26837
26838
|
systemOrder: 'bsE3SystemOrder',
|
|
26838
26839
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26839
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26840
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26841
|
+
isShowSelectTradeGoods: true
|
|
26840
26842
|
}
|
|
26841
26843
|
};
|
|
26842
26844
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26843
|
-
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;
|
|
26844
26846
|
var value = props.value,
|
|
26845
26847
|
onChange = props.onChange,
|
|
26846
26848
|
_props$reasonList = props.reasonList,
|
|
@@ -26942,17 +26944,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26942
26944
|
}))));
|
|
26943
26945
|
};
|
|
26944
26946
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26945
|
-
var _typeMap$type13, _typeMap$type14
|
|
26947
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26946
26948
|
var mode = _ref4.mode,
|
|
26947
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26949
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26950
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26951
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26948
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];
|
|
26949
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];
|
|
26950
26954
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26951
26955
|
return order.orderSn === systemOrderNo;
|
|
26952
26956
|
});
|
|
26953
|
-
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') : [];
|
|
26954
26963
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26955
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26964
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26956
26965
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26957
26966
|
}) : goodDetails;
|
|
26958
26967
|
};
|
|
@@ -27053,7 +27062,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27053
27062
|
type: type,
|
|
27054
27063
|
disabled: disabled,
|
|
27055
27064
|
canUpdateNumber: showChangeBtn,
|
|
27056
|
-
|
|
27065
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27066
|
+
// showChangeBtn={showChangeBtn}
|
|
27057
27067
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27058
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)],
|
|
27059
27069
|
onChange: function onChange(val) {
|
|
@@ -27062,9 +27072,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27062
27072
|
onModeChange: handleModeChange,
|
|
27063
27073
|
showModeBtn: false,
|
|
27064
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)]] : [],
|
|
27065
27078
|
tradeGoods: {
|
|
27066
27079
|
originDataSource: getGoodDetails({
|
|
27067
|
-
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
|
|
27068
27082
|
}),
|
|
27069
27083
|
selectedGoodsChange: selectedGoodsChange
|
|
27070
27084
|
}
|
|
@@ -27093,11 +27107,12 @@ var typeMap$4 = {
|
|
|
27093
27107
|
money: 'orderPrice',
|
|
27094
27108
|
share: 'sharePrice'
|
|
27095
27109
|
},
|
|
27096
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27110
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27111
|
+
isShowSelectTradeGoods: true
|
|
27097
27112
|
}
|
|
27098
27113
|
};
|
|
27099
27114
|
var GyReissue = function GyReissue(props) {
|
|
27100
|
-
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;
|
|
27101
27116
|
var value = props.value,
|
|
27102
27117
|
onChange = props.onChange,
|
|
27103
27118
|
_props$reasonList = props.reasonList,
|
|
@@ -27243,17 +27258,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27243
27258
|
}))));
|
|
27244
27259
|
};
|
|
27245
27260
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27246
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27261
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27247
27262
|
var mode = _ref7.mode,
|
|
27248
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27263
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27264
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27265
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27249
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];
|
|
27250
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];
|
|
27251
27268
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27252
27269
|
return order.code === systemOrderNo;
|
|
27253
27270
|
});
|
|
27254
|
-
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) : [];
|
|
27255
27277
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27256
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27278
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27257
27279
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27258
27280
|
}) : goodDetails;
|
|
27259
27281
|
};
|
|
@@ -27290,25 +27312,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27290
27312
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27291
27313
|
};
|
|
27292
27314
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
27293
|
-
var _ref12, _typeMap$
|
|
27315
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27294
27316
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27295
27317
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27296
27318
|
// 原订单商品
|
|
27297
27319
|
var originTradeGoodList = getGoodDetails({
|
|
27298
|
-
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
|
|
27299
27322
|
}) || [];
|
|
27300
27323
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27301
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27302
|
-
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) {
|
|
27303
27326
|
return skuList.includes(item.uuid);
|
|
27304
27327
|
});
|
|
27305
27328
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27306
27329
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27307
27330
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27308
|
-
}, [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]);
|
|
27309
27332
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27310
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27311
|
-
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]);
|
|
27312
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);
|
|
27313
27336
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
27314
27337
|
gutter: 8,
|
|
@@ -27328,12 +27351,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27328
27351
|
},
|
|
27329
27352
|
disabled: disabled,
|
|
27330
27353
|
allowClear: false,
|
|
27331
|
-
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)],
|
|
27332
27355
|
onChange: function onChange(val) {
|
|
27333
27356
|
return changeSystemOrderHandle(val);
|
|
27334
27357
|
},
|
|
27335
27358
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27336
|
-
}, ((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) {
|
|
27337
27360
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
27338
27361
|
className: styles$6.systemNoDisabled,
|
|
27339
27362
|
key: item.billNo,
|
|
@@ -27357,7 +27380,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27357
27380
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27358
27381
|
allowClear: false,
|
|
27359
27382
|
options: reasonList,
|
|
27360
|
-
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)],
|
|
27361
27384
|
onChange: function onChange(val) {
|
|
27362
27385
|
return changeTypeHandle(val);
|
|
27363
27386
|
}
|
|
@@ -27367,19 +27390,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27367
27390
|
type: type,
|
|
27368
27391
|
disabled: disabled,
|
|
27369
27392
|
canUpdateNumber: showChangeBtn,
|
|
27370
|
-
|
|
27371
|
-
|
|
27372
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27393
|
+
// showChangeBtn={showChangeBtn}
|
|
27394
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27395
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27396
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27373
27397
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27374
|
-
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)],
|
|
27375
27399
|
onChange: function onChange(val) {
|
|
27376
27400
|
return changeGoodHandle(val);
|
|
27377
27401
|
},
|
|
27378
27402
|
onModeChange: handleModeChange,
|
|
27379
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)]] : [],
|
|
27380
27407
|
tradeGoods: {
|
|
27381
27408
|
originDataSource: getGoodDetails({
|
|
27382
|
-
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
|
|
27383
27411
|
}),
|
|
27384
27412
|
selectedGoodsChange: selectedGoodsChange
|
|
27385
27413
|
}
|
package/dist/index.js
CHANGED
|
@@ -21836,7 +21836,12 @@ var systemOrderNoMap = {
|
|
|
21836
21836
|
JST_GOODS: 'oId',
|
|
21837
21837
|
WLN_GOODS: 'tradeNo',
|
|
21838
21838
|
JY_GOODS: 'tradeNo',
|
|
21839
|
-
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'
|
|
21840
21845
|
};
|
|
21841
21846
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21842
21847
|
var columns = _ref.columns,
|
|
@@ -21846,14 +21851,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21846
21851
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21847
21852
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21848
21853
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21849
|
-
_ref$
|
|
21850
|
-
|
|
21854
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21855
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21851
21856
|
_ref$systemOrders = _ref.systemOrders,
|
|
21852
21857
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21853
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,
|
|
21854
21862
|
_ref$type = _ref.type,
|
|
21855
21863
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21856
|
-
width = _ref.width
|
|
21864
|
+
width = _ref.width,
|
|
21865
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21866
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21857
21867
|
var _useState = React.useState(),
|
|
21858
21868
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21859
21869
|
selectSystemNo = _useState2[0],
|
|
@@ -21863,6 +21873,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21863
21873
|
tradeGoodsVisible = _useState4[0],
|
|
21864
21874
|
setTradeGoodsVisible = _useState4[1];
|
|
21865
21875
|
var openModal = function openModal() {
|
|
21876
|
+
if (validSystemOrder) {
|
|
21877
|
+
antd.message.warning('请选择补发系统单');
|
|
21878
|
+
return;
|
|
21879
|
+
}
|
|
21866
21880
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21867
21881
|
getDataSourceAsync().then(function () {
|
|
21868
21882
|
setTradeGoodsVisible(true);
|
|
@@ -21870,15 +21884,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21870
21884
|
} else {
|
|
21871
21885
|
setTradeGoodsVisible(true);
|
|
21872
21886
|
}
|
|
21873
|
-
//
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
|
|
21877
|
-
// );
|
|
21878
|
-
// setSelectSystemNo(codeList || []);
|
|
21879
|
-
// }
|
|
21887
|
+
// 补发直接传入的是systemNo
|
|
21888
|
+
if (isShowSelect && isReissueType) {
|
|
21889
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21890
|
+
}
|
|
21880
21891
|
};
|
|
21881
|
-
|
|
21882
21892
|
var closeModal = function closeModal() {
|
|
21883
21893
|
return setTradeGoodsVisible(false);
|
|
21884
21894
|
};
|
|
@@ -21894,10 +21904,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21894
21904
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21895
21905
|
}));
|
|
21896
21906
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21897
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21898
|
-
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21899
|
-
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21900
|
-
}));
|
|
21901
21907
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21902
21908
|
};
|
|
21903
21909
|
var rowSelection = {
|
|
@@ -21922,7 +21928,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21922
21928
|
style: {
|
|
21923
21929
|
maxWidth: '1000px'
|
|
21924
21930
|
}
|
|
21925
|
-
},
|
|
21931
|
+
}, isShowSelect && /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21926
21932
|
style: {
|
|
21927
21933
|
marginBottom: '12px'
|
|
21928
21934
|
}
|
|
@@ -22026,13 +22032,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22026
22032
|
systemOrders = props.systemOrders,
|
|
22027
22033
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22028
22034
|
_props$templateDetail = props.templateDetail,
|
|
22029
|
-
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;
|
|
22030
22038
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22031
22039
|
// 监听聚水潭退货商品
|
|
22032
22040
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
22033
22041
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22034
|
-
//
|
|
22035
|
-
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;
|
|
22036
22045
|
var refModal = React.useRef();
|
|
22037
22046
|
console.debug('表格数据', value);
|
|
22038
22047
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22308,6 +22317,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22308
22317
|
return params;
|
|
22309
22318
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22310
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]);
|
|
22311
22323
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22312
22324
|
style: {
|
|
22313
22325
|
float: 'right'
|
|
@@ -22316,7 +22328,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22316
22328
|
checked: isStrict,
|
|
22317
22329
|
onChange: handleCheckboxChange
|
|
22318
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, {
|
|
22319
|
-
|
|
22331
|
+
validSystemOrder: validSystemOrder,
|
|
22332
|
+
isShowSelect: isShowSelect,
|
|
22320
22333
|
uniqueKey: uniqueKey,
|
|
22321
22334
|
type: type,
|
|
22322
22335
|
columns: orderModalColumns,
|
|
@@ -22326,7 +22339,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22326
22339
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22327
22340
|
systemOrders: systemOrders,
|
|
22328
22341
|
selectedSystemOrders: selectedSystemOrders,
|
|
22329
|
-
width: width || 850
|
|
22342
|
+
width: width || 850,
|
|
22343
|
+
isReissueType: isReissueType
|
|
22330
22344
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
22331
22345
|
type: "link",
|
|
22332
22346
|
onClick: handleChangeGoods
|
|
@@ -25448,11 +25462,12 @@ var typeMap$1 = {
|
|
|
25448
25462
|
money: 'orderPrice',
|
|
25449
25463
|
share: 'sharePrice'
|
|
25450
25464
|
},
|
|
25451
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25465
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25466
|
+
isShowSelectTradeGoods: true
|
|
25452
25467
|
}
|
|
25453
25468
|
};
|
|
25454
25469
|
var wdtReissue = function wdtReissue(props) {
|
|
25455
|
-
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;
|
|
25456
25471
|
var value = props.value,
|
|
25457
25472
|
onChange = props.onChange,
|
|
25458
25473
|
_props$reasonList = props.reasonList,
|
|
@@ -25481,36 +25496,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25481
25496
|
}
|
|
25482
25497
|
return;
|
|
25483
25498
|
}, [value]);
|
|
25484
|
-
// useEffect(() => {
|
|
25485
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
25486
|
-
// if (systemOrderNo) {
|
|
25487
|
-
// if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
|
|
25488
|
-
// onChange?.({
|
|
25489
|
-
// ...value,
|
|
25490
|
-
// [typeMap[type]?.key]: getGoodDetails({
|
|
25491
|
-
// mode: isStrict
|
|
25492
|
-
// })
|
|
25493
|
-
// })
|
|
25494
|
-
// }
|
|
25495
|
-
// }
|
|
25496
|
-
// return;
|
|
25497
|
-
// }, [value?.[typeMap[type]?.systemOrderNo]]);
|
|
25498
|
-
// const getWdtOrderList = async (orderNo: string) => {
|
|
25499
|
-
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
25500
|
-
// const orders = data?.trades || [];
|
|
25501
|
-
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
25502
|
-
// return { billNo, billType, billTag }
|
|
25503
|
-
// });
|
|
25504
|
-
// onChange({
|
|
25505
|
-
// ...value,
|
|
25506
|
-
// [typeMap[type]?.systemOrder]: {
|
|
25507
|
-
// ...value[typeMap[type]?.systemOrder],
|
|
25508
|
-
// showOrderInfo,
|
|
25509
|
-
// orders,
|
|
25510
|
-
// },
|
|
25511
|
-
// });
|
|
25512
|
-
// })
|
|
25513
|
-
// };
|
|
25514
25499
|
var getOrderList = /*#__PURE__*/function () {
|
|
25515
25500
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25516
25501
|
var _typeMap$type5;
|
|
@@ -25570,17 +25555,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25570
25555
|
}))));
|
|
25571
25556
|
};
|
|
25572
25557
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25573
|
-
var _typeMap$type14, _typeMap$type15
|
|
25558
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25574
25559
|
var mode = _ref3.mode,
|
|
25575
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25560
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25561
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25562
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25576
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];
|
|
25577
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];
|
|
25578
25565
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25579
25566
|
return order.tradeNo === systemOrderNo;
|
|
25580
25567
|
});
|
|
25581
|
-
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]) : [];
|
|
25582
25574
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25583
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25575
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25584
25576
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25585
25577
|
}) : goodDetails;
|
|
25586
25578
|
};
|
|
@@ -25683,7 +25675,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25683
25675
|
type: type,
|
|
25684
25676
|
disabled: disabled,
|
|
25685
25677
|
canUpdateNumber: showChangeBtn,
|
|
25686
|
-
|
|
25678
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25679
|
+
// showChangeBtn={showChangeBtn}
|
|
25687
25680
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25688
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)],
|
|
25689
25682
|
onChange: function onChange(val) {
|
|
@@ -25692,9 +25685,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25692
25685
|
onModeChange: handleModeChange,
|
|
25693
25686
|
showModeBtn: showModeBtn,
|
|
25694
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)]] : [],
|
|
25695
25691
|
tradeGoods: {
|
|
25696
25692
|
originDataSource: getGoodDetails({
|
|
25697
|
-
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
|
|
25698
25695
|
}),
|
|
25699
25696
|
selectedGoodsChange: selectedGoodsChange
|
|
25700
25697
|
}
|
|
@@ -25718,7 +25715,8 @@ var typeMap$2 = {
|
|
|
25718
25715
|
outerOiIdKey: '',
|
|
25719
25716
|
goodDetailsKey: 'items',
|
|
25720
25717
|
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
25721
|
-
uniqueKey: 'uuid'
|
|
25718
|
+
uniqueKey: 'uuid',
|
|
25719
|
+
isShowSelectTradeGoods: true
|
|
25722
25720
|
},
|
|
25723
25721
|
JST_RETURN_GOODS: {
|
|
25724
25722
|
compType: '退货',
|
|
@@ -25757,7 +25755,8 @@ var typeMap$2 = {
|
|
|
25757
25755
|
oIdKey: 'billNo',
|
|
25758
25756
|
outerOiIdKey: '',
|
|
25759
25757
|
goodDetailsKey: 'subOrders',
|
|
25760
|
-
uniqueKey: 'id'
|
|
25758
|
+
uniqueKey: 'id',
|
|
25759
|
+
isShowSelectTradeGoods: true
|
|
25761
25760
|
},
|
|
25762
25761
|
JY_REISSUE_GOODS: {
|
|
25763
25762
|
compType: '补发',
|
|
@@ -25776,7 +25775,7 @@ var typeMap$2 = {
|
|
|
25776
25775
|
}
|
|
25777
25776
|
};
|
|
25778
25777
|
var PublicReissue = function PublicReissue(props) {
|
|
25779
|
-
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;
|
|
25780
25779
|
var value = props.value,
|
|
25781
25780
|
onChange = props.onChange,
|
|
25782
25781
|
_props$reasonList = props.reasonList,
|
|
@@ -26045,25 +26044,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26045
26044
|
type: type,
|
|
26046
26045
|
disabled: disabled,
|
|
26047
26046
|
canUpdateNumber: showChangeBtn,
|
|
26048
|
-
|
|
26049
|
-
|
|
26050
|
-
|
|
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}
|
|
26051
26051
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
26052
|
-
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)],
|
|
26053
26053
|
onChange: function onChange(val) {
|
|
26054
26054
|
return changeGoodHandle(val);
|
|
26055
26055
|
},
|
|
26056
26056
|
onModeChange: handleModeChange,
|
|
26057
26057
|
showModeBtn: false,
|
|
26058
26058
|
isStrict: isStrict,
|
|
26059
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26060
|
-
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)]] : [],
|
|
26061
26062
|
tradeGoods: {
|
|
26062
26063
|
originDataSource: getGoodDetails({
|
|
26063
26064
|
mode: isStrict,
|
|
26064
|
-
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
|
|
26065
26066
|
}),
|
|
26066
|
-
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',
|
|
26067
26068
|
selectedGoodsChange: selectedGoodsChange
|
|
26068
26069
|
}
|
|
26069
26070
|
})));
|
|
@@ -26851,11 +26852,12 @@ var typeMap$3 = {
|
|
|
26851
26852
|
typeName: 'bsE3ReissueType',
|
|
26852
26853
|
systemOrder: 'bsE3SystemOrder',
|
|
26853
26854
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26854
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26855
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26856
|
+
isShowSelectTradeGoods: true
|
|
26855
26857
|
}
|
|
26856
26858
|
};
|
|
26857
26859
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26858
|
-
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;
|
|
26859
26861
|
var value = props.value,
|
|
26860
26862
|
onChange = props.onChange,
|
|
26861
26863
|
_props$reasonList = props.reasonList,
|
|
@@ -26957,17 +26959,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26957
26959
|
}))));
|
|
26958
26960
|
};
|
|
26959
26961
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26960
|
-
var _typeMap$type13, _typeMap$type14
|
|
26962
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26961
26963
|
var mode = _ref4.mode,
|
|
26962
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26964
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26965
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26966
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26963
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];
|
|
26964
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];
|
|
26965
26969
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26966
26970
|
return order.orderSn === systemOrderNo;
|
|
26967
26971
|
});
|
|
26968
|
-
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') : [];
|
|
26969
26978
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26970
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26979
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26971
26980
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26972
26981
|
}) : goodDetails;
|
|
26973
26982
|
};
|
|
@@ -27068,7 +27077,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27068
27077
|
type: type,
|
|
27069
27078
|
disabled: disabled,
|
|
27070
27079
|
canUpdateNumber: showChangeBtn,
|
|
27071
|
-
|
|
27080
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27081
|
+
// showChangeBtn={showChangeBtn}
|
|
27072
27082
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27073
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)],
|
|
27074
27084
|
onChange: function onChange(val) {
|
|
@@ -27077,9 +27087,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27077
27087
|
onModeChange: handleModeChange,
|
|
27078
27088
|
showModeBtn: false,
|
|
27079
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)]] : [],
|
|
27080
27093
|
tradeGoods: {
|
|
27081
27094
|
originDataSource: getGoodDetails({
|
|
27082
|
-
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
|
|
27083
27097
|
}),
|
|
27084
27098
|
selectedGoodsChange: selectedGoodsChange
|
|
27085
27099
|
}
|
|
@@ -27108,11 +27122,12 @@ var typeMap$4 = {
|
|
|
27108
27122
|
money: 'orderPrice',
|
|
27109
27123
|
share: 'sharePrice'
|
|
27110
27124
|
},
|
|
27111
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27125
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27126
|
+
isShowSelectTradeGoods: true
|
|
27112
27127
|
}
|
|
27113
27128
|
};
|
|
27114
27129
|
var GyReissue = function GyReissue(props) {
|
|
27115
|
-
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;
|
|
27116
27131
|
var value = props.value,
|
|
27117
27132
|
onChange = props.onChange,
|
|
27118
27133
|
_props$reasonList = props.reasonList,
|
|
@@ -27258,17 +27273,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27258
27273
|
}))));
|
|
27259
27274
|
};
|
|
27260
27275
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27261
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27276
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27262
27277
|
var mode = _ref7.mode,
|
|
27263
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27278
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27279
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27280
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27264
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];
|
|
27265
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];
|
|
27266
27283
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27267
27284
|
return order.code === systemOrderNo;
|
|
27268
27285
|
});
|
|
27269
|
-
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) : [];
|
|
27270
27292
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27271
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27293
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27272
27294
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27273
27295
|
}) : goodDetails;
|
|
27274
27296
|
};
|
|
@@ -27305,25 +27327,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27305
27327
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27306
27328
|
};
|
|
27307
27329
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
27308
|
-
var _ref12, _typeMap$
|
|
27330
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27309
27331
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27310
27332
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27311
27333
|
// 原订单商品
|
|
27312
27334
|
var originTradeGoodList = getGoodDetails({
|
|
27313
|
-
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
|
|
27314
27337
|
}) || [];
|
|
27315
27338
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27316
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27317
|
-
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) {
|
|
27318
27341
|
return skuList.includes(item.uuid);
|
|
27319
27342
|
});
|
|
27320
27343
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27321
27344
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27322
27345
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27323
|
-
}, [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]);
|
|
27324
27347
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27325
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27326
|
-
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]);
|
|
27327
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);
|
|
27328
27351
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
27329
27352
|
gutter: 8,
|
|
@@ -27343,12 +27366,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27343
27366
|
},
|
|
27344
27367
|
disabled: disabled,
|
|
27345
27368
|
allowClear: false,
|
|
27346
|
-
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)],
|
|
27347
27370
|
onChange: function onChange(val) {
|
|
27348
27371
|
return changeSystemOrderHandle(val);
|
|
27349
27372
|
},
|
|
27350
27373
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27351
|
-
}, ((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) {
|
|
27352
27375
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
27353
27376
|
className: styles$6.systemNoDisabled,
|
|
27354
27377
|
key: item.billNo,
|
|
@@ -27372,7 +27395,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27372
27395
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27373
27396
|
allowClear: false,
|
|
27374
27397
|
options: reasonList,
|
|
27375
|
-
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)],
|
|
27376
27399
|
onChange: function onChange(val) {
|
|
27377
27400
|
return changeTypeHandle(val);
|
|
27378
27401
|
}
|
|
@@ -27382,19 +27405,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27382
27405
|
type: type,
|
|
27383
27406
|
disabled: disabled,
|
|
27384
27407
|
canUpdateNumber: showChangeBtn,
|
|
27385
|
-
|
|
27386
|
-
|
|
27387
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27408
|
+
// showChangeBtn={showChangeBtn}
|
|
27409
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27410
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27411
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27388
27412
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27389
|
-
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)],
|
|
27390
27414
|
onChange: function onChange(val) {
|
|
27391
27415
|
return changeGoodHandle(val);
|
|
27392
27416
|
},
|
|
27393
27417
|
onModeChange: handleModeChange,
|
|
27394
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)]] : [],
|
|
27395
27422
|
tradeGoods: {
|
|
27396
27423
|
originDataSource: getGoodDetails({
|
|
27397
|
-
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
|
|
27398
27426
|
}),
|
|
27399
27427
|
selectedGoodsChange: selectedGoodsChange
|
|
27400
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",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "fafcb503a0efccb5d5f8219bea798faf6f392879"
|
|
70
70
|
}
|