@kmkf-fe-packages/basic-components 2.2.29 → 2.2.31
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 +142 -111
- package/dist/index.js +142 -111
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -12885,6 +12885,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
12885
12885
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
|
|
12886
12886
|
})) === null || _find3 === void 0 ? void 0 : (_find3$config = _find3.config) === null || _find3$config === void 0 ? void 0 : _find3$config.showSenderMobile;
|
|
12887
12887
|
}, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
12888
|
+
var senderMobileLabel = useMemo(function () {
|
|
12889
|
+
return (value === null || value === void 0 ? void 0 : value.interceptCompany) === 'ZTO' ? '发件人/收件人手机号' : '发件人手机号';
|
|
12890
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
12888
12891
|
var showKcode = useMemo(function () {
|
|
12889
12892
|
var isShow = false;
|
|
12890
12893
|
if (value === null || value === void 0 ? void 0 : value.interceptCompany) {
|
|
@@ -13119,14 +13122,14 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13119
13122
|
return option.label.includes(input);
|
|
13120
13123
|
}
|
|
13121
13124
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
13122
|
-
label:
|
|
13125
|
+
label: senderMobileLabel,
|
|
13123
13126
|
// required={true}
|
|
13124
13127
|
key: 'interceptSenderMobile',
|
|
13125
13128
|
hidden: !showSenderMobile
|
|
13126
13129
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
13127
13130
|
value: value === null || value === void 0 ? void 0 : value.interceptSenderMobile,
|
|
13128
13131
|
disabled: disabled || isEdit,
|
|
13129
|
-
placeholder:
|
|
13132
|
+
placeholder: senderMobileLabel,
|
|
13130
13133
|
onChange: function onChange(e) {
|
|
13131
13134
|
return changeHandle(e.target.value, 'interceptSenderMobile');
|
|
13132
13135
|
}
|
|
@@ -13347,7 +13350,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13347
13350
|
if (disabled) {
|
|
13348
13351
|
return;
|
|
13349
13352
|
}
|
|
13350
|
-
if (
|
|
13353
|
+
if (['SF', 'ZTO'].includes(newCompany) && !(newCompany && trajectoryCode && trajectoryPhone)) {
|
|
13351
13354
|
return;
|
|
13352
13355
|
} else if (!(newCompany && trajectoryCode)) {
|
|
13353
13356
|
return;
|
|
@@ -13428,13 +13431,13 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13428
13431
|
});
|
|
13429
13432
|
};
|
|
13430
13433
|
//sf手机号
|
|
13431
|
-
var LogisticsPhone = function LogisticsPhone() {
|
|
13434
|
+
var LogisticsPhone = function LogisticsPhone(company) {
|
|
13432
13435
|
return /*#__PURE__*/React.createElement(Input, {
|
|
13433
13436
|
disabled: disabled,
|
|
13434
13437
|
style: {
|
|
13435
13438
|
marginTop: '8px'
|
|
13436
13439
|
},
|
|
13437
|
-
placeholder:
|
|
13440
|
+
placeholder: company === 'ZTO' ? '发件人/收件人手机号' : '手机号',
|
|
13438
13441
|
onChange: function onChange(e) {
|
|
13439
13442
|
return handleInputChange(e, 'trajectoryPhone');
|
|
13440
13443
|
},
|
|
@@ -13483,7 +13486,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13483
13486
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
13484
13487
|
});
|
|
13485
13488
|
};
|
|
13486
|
-
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) ===
|
|
13489
|
+
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), ['SF', 'ZTO'].includes(value === null || value === void 0 ? void 0 : value.trajectoryCompany) ? LogisticsPhone(value === null || value === void 0 ? void 0 : value.trajectoryCompany) : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
13487
13490
|
};
|
|
13488
13491
|
|
|
13489
13492
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -13533,7 +13536,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13533
13536
|
initValue = _ref.initValue, value = _ref.value;
|
|
13534
13537
|
hasSnapshot = showField && showField.includes('snapshot');
|
|
13535
13538
|
initList = initValue.map(function (item) {
|
|
13536
|
-
if (item.trajectoryCompany
|
|
13539
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13537
13540
|
return {
|
|
13538
13541
|
trajectoryCompany: item.trajectoryCompany,
|
|
13539
13542
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -13547,7 +13550,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13547
13550
|
}
|
|
13548
13551
|
});
|
|
13549
13552
|
valueList = value.map(function (item) {
|
|
13550
|
-
if (item.trajectoryCompany
|
|
13553
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13551
13554
|
return {
|
|
13552
13555
|
trajectoryCompany: item.trajectoryCompany,
|
|
13553
13556
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -13561,7 +13564,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13561
13564
|
}
|
|
13562
13565
|
});
|
|
13563
13566
|
changeList = changeValue.map(function (item) {
|
|
13564
|
-
if (item.trajectoryCompany
|
|
13567
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13565
13568
|
return {
|
|
13566
13569
|
trajectoryCompany: item.trajectoryCompany,
|
|
13567
13570
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -21809,7 +21812,12 @@ var systemOrderNoMap = {
|
|
|
21809
21812
|
JST_GOODS: 'oId',
|
|
21810
21813
|
WLN_GOODS: 'tradeNo',
|
|
21811
21814
|
JY_GOODS: 'tradeNo',
|
|
21812
|
-
JY_REISSUE_GOODS: 'tradeNo'
|
|
21815
|
+
JY_REISSUE_GOODS: 'tradeNo',
|
|
21816
|
+
KM_REISSUE_GOODS: 'sid',
|
|
21817
|
+
JST_REISSUE_GOODS: 'oId',
|
|
21818
|
+
GY_REISSUE_GOODS: 'code',
|
|
21819
|
+
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
21820
|
+
WDT_REISSUE_GOODS: 'tradeNo'
|
|
21813
21821
|
};
|
|
21814
21822
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21815
21823
|
var columns = _ref.columns,
|
|
@@ -21819,14 +21827,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21819
21827
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21820
21828
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21821
21829
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21822
|
-
_ref$
|
|
21823
|
-
|
|
21830
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21831
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21824
21832
|
_ref$systemOrders = _ref.systemOrders,
|
|
21825
21833
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21826
21834
|
_ref$selectedSystemOr = _ref.selectedSystemOrders,
|
|
21835
|
+
selectedSystemOrders = _ref$selectedSystemOr === void 0 ? [] : _ref$selectedSystemOr,
|
|
21836
|
+
_ref$validSystemOrder = _ref.validSystemOrder,
|
|
21837
|
+
validSystemOrder = _ref$validSystemOrder === void 0 ? false : _ref$validSystemOrder,
|
|
21827
21838
|
_ref$type = _ref.type,
|
|
21828
21839
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21829
|
-
width = _ref.width
|
|
21840
|
+
width = _ref.width,
|
|
21841
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21842
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21830
21843
|
var _useState = useState(),
|
|
21831
21844
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21832
21845
|
selectSystemNo = _useState2[0],
|
|
@@ -21836,6 +21849,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21836
21849
|
tradeGoodsVisible = _useState4[0],
|
|
21837
21850
|
setTradeGoodsVisible = _useState4[1];
|
|
21838
21851
|
var openModal = function openModal() {
|
|
21852
|
+
if (validSystemOrder) {
|
|
21853
|
+
message.warning('请选择补发系统单');
|
|
21854
|
+
return;
|
|
21855
|
+
}
|
|
21839
21856
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21840
21857
|
getDataSourceAsync().then(function () {
|
|
21841
21858
|
setTradeGoodsVisible(true);
|
|
@@ -21843,15 +21860,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21843
21860
|
} else {
|
|
21844
21861
|
setTradeGoodsVisible(true);
|
|
21845
21862
|
}
|
|
21846
|
-
//
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
// );
|
|
21851
|
-
// setSelectSystemNo(codeList || []);
|
|
21852
|
-
// }
|
|
21863
|
+
// 补发直接传入的是systemNo
|
|
21864
|
+
if (isShowSelect && isReissueType) {
|
|
21865
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21866
|
+
}
|
|
21853
21867
|
};
|
|
21854
|
-
|
|
21855
21868
|
var closeModal = function closeModal() {
|
|
21856
21869
|
return setTradeGoodsVisible(false);
|
|
21857
21870
|
};
|
|
@@ -21867,10 +21880,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21867
21880
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21868
21881
|
}));
|
|
21869
21882
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
21870
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
21871
|
-
console.log('filterDataSource', filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
21872
|
-
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21873
|
-
}));
|
|
21874
21883
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21875
21884
|
};
|
|
21876
21885
|
var rowSelection = {
|
|
@@ -21895,9 +21904,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21895
21904
|
style: {
|
|
21896
21905
|
maxWidth: '1000px'
|
|
21897
21906
|
}
|
|
21898
|
-
},
|
|
21907
|
+
}, isShowSelect && /*#__PURE__*/React.createElement(Row, {
|
|
21899
21908
|
style: {
|
|
21900
|
-
marginBottom: '
|
|
21909
|
+
marginBottom: '20px'
|
|
21901
21910
|
}
|
|
21902
21911
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
21903
21912
|
span: 12
|
|
@@ -21999,13 +22008,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
21999
22008
|
systemOrders = props.systemOrders,
|
|
22000
22009
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22001
22010
|
_props$templateDetail = props.templateDetail,
|
|
22002
|
-
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail
|
|
22011
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail,
|
|
22012
|
+
_props$hasSelectedSys = props.hasSelectedSystemOrder,
|
|
22013
|
+
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys;
|
|
22003
22014
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22004
22015
|
// 监听聚水潭退货商品
|
|
22005
22016
|
var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
|
|
22006
22017
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22007
|
-
//
|
|
22008
|
-
var
|
|
22018
|
+
// 判断是否为是否展示系统单筛选项
|
|
22019
|
+
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;
|
|
22020
|
+
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;
|
|
22009
22021
|
var refModal = useRef();
|
|
22010
22022
|
console.debug('表格数据', value);
|
|
22011
22023
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22281,6 +22293,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22281
22293
|
return params;
|
|
22282
22294
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22283
22295
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
22296
|
+
var validSystemOrder = useMemo(function () {
|
|
22297
|
+
return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
|
|
22298
|
+
}, [type, hasSelectedSystemOrder]);
|
|
22284
22299
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
22285
22300
|
style: {
|
|
22286
22301
|
float: 'right'
|
|
@@ -22289,7 +22304,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22289
22304
|
checked: isStrict,
|
|
22290
22305
|
onChange: handleCheckboxChange
|
|
22291
22306
|
}, "\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, {
|
|
22292
|
-
|
|
22307
|
+
validSystemOrder: validSystemOrder,
|
|
22308
|
+
isShowSelect: isShowSelect,
|
|
22293
22309
|
uniqueKey: uniqueKey,
|
|
22294
22310
|
type: type,
|
|
22295
22311
|
columns: orderModalColumns,
|
|
@@ -22299,7 +22315,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22299
22315
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22300
22316
|
systemOrders: systemOrders,
|
|
22301
22317
|
selectedSystemOrders: selectedSystemOrders,
|
|
22302
|
-
width: width || 850
|
|
22318
|
+
width: width || 850,
|
|
22319
|
+
isReissueType: isReissueType
|
|
22303
22320
|
}), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
|
|
22304
22321
|
type: "link",
|
|
22305
22322
|
onClick: handleChangeGoods
|
|
@@ -25421,11 +25438,12 @@ var typeMap$1 = {
|
|
|
25421
25438
|
money: 'orderPrice',
|
|
25422
25439
|
share: 'sharePrice'
|
|
25423
25440
|
},
|
|
25424
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25441
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25442
|
+
isShowSelectTradeGoods: true
|
|
25425
25443
|
}
|
|
25426
25444
|
};
|
|
25427
25445
|
var wdtReissue = function wdtReissue(props) {
|
|
25428
|
-
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s6, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
25446
|
+
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;
|
|
25429
25447
|
var value = props.value,
|
|
25430
25448
|
onChange = props.onChange,
|
|
25431
25449
|
_props$reasonList = props.reasonList,
|
|
@@ -25454,36 +25472,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25454
25472
|
}
|
|
25455
25473
|
return;
|
|
25456
25474
|
}, [value]);
|
|
25457
|
-
// useEffect(() => {
|
|
25458
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
25459
|
-
// if (systemOrderNo) {
|
|
25460
|
-
// if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
|
|
25461
|
-
// onChange?.({
|
|
25462
|
-
// ...value,
|
|
25463
|
-
// [typeMap[type]?.key]: getGoodDetails({
|
|
25464
|
-
// mode: isStrict
|
|
25465
|
-
// })
|
|
25466
|
-
// })
|
|
25467
|
-
// }
|
|
25468
|
-
// }
|
|
25469
|
-
// return;
|
|
25470
|
-
// }, [value?.[typeMap[type]?.systemOrderNo]]);
|
|
25471
|
-
// const getWdtOrderList = async (orderNo: string) => {
|
|
25472
|
-
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
25473
|
-
// const orders = data?.trades || [];
|
|
25474
|
-
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
25475
|
-
// return { billNo, billType, billTag }
|
|
25476
|
-
// });
|
|
25477
|
-
// onChange({
|
|
25478
|
-
// ...value,
|
|
25479
|
-
// [typeMap[type]?.systemOrder]: {
|
|
25480
|
-
// ...value[typeMap[type]?.systemOrder],
|
|
25481
|
-
// showOrderInfo,
|
|
25482
|
-
// orders,
|
|
25483
|
-
// },
|
|
25484
|
-
// });
|
|
25485
|
-
// })
|
|
25486
|
-
// };
|
|
25487
25475
|
var getOrderList = /*#__PURE__*/function () {
|
|
25488
25476
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25489
25477
|
var _typeMap$type5;
|
|
@@ -25543,17 +25531,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25543
25531
|
}))));
|
|
25544
25532
|
};
|
|
25545
25533
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25546
|
-
var _typeMap$type14, _typeMap$type15
|
|
25534
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25547
25535
|
var mode = _ref3.mode,
|
|
25548
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25536
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25537
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25538
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25549
25539
|
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];
|
|
25550
25540
|
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];
|
|
25551
25541
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25552
25542
|
return order.tradeNo === systemOrderNo;
|
|
25553
25543
|
});
|
|
25554
|
-
var
|
|
25544
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
25545
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25546
|
+
var _order$goodDetails;
|
|
25547
|
+
return order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length;
|
|
25548
|
+
});
|
|
25549
|
+
var goodDetails = hasGoodDetails ? updateWdtGoodsHandle([order]) : [];
|
|
25555
25550
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25556
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25551
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25557
25552
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25558
25553
|
}) : goodDetails;
|
|
25559
25554
|
};
|
|
@@ -25656,7 +25651,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25656
25651
|
type: type,
|
|
25657
25652
|
disabled: disabled,
|
|
25658
25653
|
canUpdateNumber: showChangeBtn,
|
|
25659
|
-
|
|
25654
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25655
|
+
// showChangeBtn={showChangeBtn}
|
|
25660
25656
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25661
25657
|
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)],
|
|
25662
25658
|
onChange: function onChange(val) {
|
|
@@ -25665,9 +25661,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25665
25661
|
onModeChange: handleModeChange,
|
|
25666
25662
|
showModeBtn: showModeBtn,
|
|
25667
25663
|
isStrict: isStrict,
|
|
25664
|
+
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,
|
|
25665
|
+
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,
|
|
25666
|
+
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)]] : [],
|
|
25668
25667
|
tradeGoods: {
|
|
25669
25668
|
originDataSource: getGoodDetails({
|
|
25670
|
-
mode: isStrict
|
|
25669
|
+
mode: isStrict,
|
|
25670
|
+
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
|
|
25671
25671
|
}),
|
|
25672
25672
|
selectedGoodsChange: selectedGoodsChange
|
|
25673
25673
|
}
|
|
@@ -25691,7 +25691,8 @@ var typeMap$2 = {
|
|
|
25691
25691
|
outerOiIdKey: '',
|
|
25692
25692
|
goodDetailsKey: 'items',
|
|
25693
25693
|
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
25694
|
-
uniqueKey: 'uuid'
|
|
25694
|
+
uniqueKey: 'uuid',
|
|
25695
|
+
isShowSelectTradeGoods: true
|
|
25695
25696
|
},
|
|
25696
25697
|
JST_RETURN_GOODS: {
|
|
25697
25698
|
compType: '退货',
|
|
@@ -25730,7 +25731,8 @@ var typeMap$2 = {
|
|
|
25730
25731
|
oIdKey: 'billNo',
|
|
25731
25732
|
outerOiIdKey: '',
|
|
25732
25733
|
goodDetailsKey: 'subOrders',
|
|
25733
|
-
uniqueKey: 'id'
|
|
25734
|
+
uniqueKey: 'id',
|
|
25735
|
+
isShowSelectTradeGoods: true
|
|
25734
25736
|
},
|
|
25735
25737
|
JY_REISSUE_GOODS: {
|
|
25736
25738
|
compType: '补发',
|
|
@@ -25749,7 +25751,7 @@ var typeMap$2 = {
|
|
|
25749
25751
|
}
|
|
25750
25752
|
};
|
|
25751
25753
|
var PublicReissue = function PublicReissue(props) {
|
|
25752
|
-
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,
|
|
25754
|
+
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;
|
|
25753
25755
|
var value = props.value,
|
|
25754
25756
|
onChange = props.onChange,
|
|
25755
25757
|
_props$reasonList = props.reasonList,
|
|
@@ -25894,7 +25896,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25894
25896
|
var _order$typeMap$type$g;
|
|
25895
25897
|
return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
|
|
25896
25898
|
});
|
|
25897
|
-
var goodDetails = hasGoodDetails ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25899
|
+
var goodDetails = hasGoodDetails ? !isAllOrders && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25898
25900
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25899
25901
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25900
25902
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -26018,25 +26020,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26018
26020
|
type: type,
|
|
26019
26021
|
disabled: disabled,
|
|
26020
26022
|
canUpdateNumber: showChangeBtn,
|
|
26021
|
-
|
|
26022
|
-
|
|
26023
|
-
|
|
26023
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
26024
|
+
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
26025
|
+
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,
|
|
26026
|
+
// showErpGoodsBtn={typeMap?.[type]?.showErpGoodsBtn}
|
|
26024
26027
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
26025
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26028
|
+
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)],
|
|
26026
26029
|
onChange: function onChange(val) {
|
|
26027
26030
|
return changeGoodHandle(val);
|
|
26028
26031
|
},
|
|
26029
26032
|
onModeChange: handleModeChange,
|
|
26030
26033
|
showModeBtn: false,
|
|
26031
26034
|
isStrict: isStrict,
|
|
26032
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26033
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
26035
|
+
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,
|
|
26036
|
+
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,
|
|
26037
|
+
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)]] : [],
|
|
26034
26038
|
tradeGoods: {
|
|
26035
26039
|
originDataSource: getGoodDetails({
|
|
26036
26040
|
mode: isStrict,
|
|
26037
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26041
|
+
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
|
|
26038
26042
|
}),
|
|
26039
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26043
|
+
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',
|
|
26040
26044
|
selectedGoodsChange: selectedGoodsChange
|
|
26041
26045
|
}
|
|
26042
26046
|
})));
|
|
@@ -26824,11 +26828,12 @@ var typeMap$3 = {
|
|
|
26824
26828
|
typeName: 'bsE3ReissueType',
|
|
26825
26829
|
systemOrder: 'bsE3SystemOrder',
|
|
26826
26830
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26827
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26831
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26832
|
+
isShowSelectTradeGoods: true
|
|
26828
26833
|
}
|
|
26829
26834
|
};
|
|
26830
26835
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26831
|
-
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
26836
|
+
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;
|
|
26832
26837
|
var value = props.value,
|
|
26833
26838
|
onChange = props.onChange,
|
|
26834
26839
|
_props$reasonList = props.reasonList,
|
|
@@ -26930,17 +26935,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26930
26935
|
}))));
|
|
26931
26936
|
};
|
|
26932
26937
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26933
|
-
var _typeMap$type13, _typeMap$type14
|
|
26938
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26934
26939
|
var mode = _ref4.mode,
|
|
26935
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26940
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26941
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26942
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26936
26943
|
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];
|
|
26937
26944
|
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];
|
|
26938
26945
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26939
26946
|
return order.orderSn === systemOrderNo;
|
|
26940
26947
|
});
|
|
26941
|
-
var
|
|
26948
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
26949
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
26950
|
+
var _order$orderDetailGet;
|
|
26951
|
+
return order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length;
|
|
26952
|
+
});
|
|
26953
|
+
var goodDetails = hasGoodDetails ? updateBsE3GoodsHandle([order], 'sharePrice') : [];
|
|
26942
26954
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26943
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26955
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26944
26956
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26945
26957
|
}) : goodDetails;
|
|
26946
26958
|
};
|
|
@@ -27041,7 +27053,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27041
27053
|
type: type,
|
|
27042
27054
|
disabled: disabled,
|
|
27043
27055
|
canUpdateNumber: showChangeBtn,
|
|
27044
|
-
|
|
27056
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27057
|
+
// showChangeBtn={showChangeBtn}
|
|
27045
27058
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27046
27059
|
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)],
|
|
27047
27060
|
onChange: function onChange(val) {
|
|
@@ -27050,9 +27063,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27050
27063
|
onModeChange: handleModeChange,
|
|
27051
27064
|
showModeBtn: false,
|
|
27052
27065
|
isStrict: isStrict,
|
|
27066
|
+
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,
|
|
27067
|
+
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,
|
|
27068
|
+
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)]] : [],
|
|
27053
27069
|
tradeGoods: {
|
|
27054
27070
|
originDataSource: getGoodDetails({
|
|
27055
|
-
mode: isStrict
|
|
27071
|
+
mode: isStrict,
|
|
27072
|
+
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
|
|
27056
27073
|
}),
|
|
27057
27074
|
selectedGoodsChange: selectedGoodsChange
|
|
27058
27075
|
}
|
|
@@ -27081,11 +27098,12 @@ var typeMap$4 = {
|
|
|
27081
27098
|
money: 'orderPrice',
|
|
27082
27099
|
share: 'sharePrice'
|
|
27083
27100
|
},
|
|
27084
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27101
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27102
|
+
isShowSelectTradeGoods: true
|
|
27085
27103
|
}
|
|
27086
27104
|
};
|
|
27087
27105
|
var GyReissue = function GyReissue(props) {
|
|
27088
|
-
var _typeMap$
|
|
27106
|
+
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;
|
|
27089
27107
|
var value = props.value,
|
|
27090
27108
|
onChange = props.onChange,
|
|
27091
27109
|
_props$reasonList = props.reasonList,
|
|
@@ -27231,17 +27249,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27231
27249
|
}))));
|
|
27232
27250
|
};
|
|
27233
27251
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27234
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27252
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27235
27253
|
var mode = _ref7.mode,
|
|
27236
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27254
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27255
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27256
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27237
27257
|
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];
|
|
27238
27258
|
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];
|
|
27239
27259
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27240
27260
|
return order.code === systemOrderNo;
|
|
27241
27261
|
});
|
|
27242
|
-
var
|
|
27262
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
27263
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
27264
|
+
var _order$details;
|
|
27265
|
+
return order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length;
|
|
27266
|
+
});
|
|
27267
|
+
var goodDetails = hasGoodDetails ? updateGyGoodsHandle(orders) : [];
|
|
27243
27268
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27244
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27269
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27245
27270
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27246
27271
|
}) : goodDetails;
|
|
27247
27272
|
};
|
|
@@ -27278,25 +27303,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27278
27303
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27279
27304
|
};
|
|
27280
27305
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
27281
|
-
var _ref12, _typeMap$
|
|
27306
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27282
27307
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27283
27308
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27284
27309
|
// 原订单商品
|
|
27285
27310
|
var originTradeGoodList = getGoodDetails({
|
|
27286
|
-
mode: isStrict
|
|
27311
|
+
mode: isStrict,
|
|
27312
|
+
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
|
|
27287
27313
|
}) || [];
|
|
27288
27314
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
27289
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27290
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27315
|
+
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)]) || [];
|
|
27316
|
+
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) {
|
|
27291
27317
|
return skuList.includes(item.uuid);
|
|
27292
27318
|
});
|
|
27293
27319
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27294
27320
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27295
27321
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27296
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27322
|
+
}, [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]);
|
|
27297
27323
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27298
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27299
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27324
|
+
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];
|
|
27325
|
+
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]);
|
|
27300
27326
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
27301
27327
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
27302
27328
|
gutter: 8,
|
|
@@ -27316,12 +27342,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27316
27342
|
},
|
|
27317
27343
|
disabled: disabled,
|
|
27318
27344
|
allowClear: false,
|
|
27319
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27345
|
+
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)],
|
|
27320
27346
|
onChange: function onChange(val) {
|
|
27321
27347
|
return changeSystemOrderHandle(val);
|
|
27322
27348
|
},
|
|
27323
27349
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27324
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
27350
|
+
}, ((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) {
|
|
27325
27351
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
27326
27352
|
className: styles$6.systemNoDisabled,
|
|
27327
27353
|
key: item.billNo,
|
|
@@ -27345,7 +27371,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27345
27371
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27346
27372
|
allowClear: false,
|
|
27347
27373
|
options: reasonList,
|
|
27348
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27374
|
+
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)],
|
|
27349
27375
|
onChange: function onChange(val) {
|
|
27350
27376
|
return changeTypeHandle(val);
|
|
27351
27377
|
}
|
|
@@ -27355,19 +27381,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27355
27381
|
type: type,
|
|
27356
27382
|
disabled: disabled,
|
|
27357
27383
|
canUpdateNumber: showChangeBtn,
|
|
27358
|
-
|
|
27359
|
-
|
|
27360
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27384
|
+
// showChangeBtn={showChangeBtn}
|
|
27385
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27386
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27387
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27361
27388
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27362
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27389
|
+
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)],
|
|
27363
27390
|
onChange: function onChange(val) {
|
|
27364
27391
|
return changeGoodHandle(val);
|
|
27365
27392
|
},
|
|
27366
27393
|
onModeChange: handleModeChange,
|
|
27367
27394
|
isStrict: isStrict,
|
|
27395
|
+
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,
|
|
27396
|
+
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,
|
|
27397
|
+
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)]] : [],
|
|
27368
27398
|
tradeGoods: {
|
|
27369
27399
|
originDataSource: getGoodDetails({
|
|
27370
|
-
mode: isStrict
|
|
27400
|
+
mode: isStrict,
|
|
27401
|
+
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
|
|
27371
27402
|
}),
|
|
27372
27403
|
selectedGoodsChange: selectedGoodsChange
|
|
27373
27404
|
}
|
package/dist/index.js
CHANGED
|
@@ -12900,6 +12900,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
12900
12900
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
|
|
12901
12901
|
})) === null || _find3 === void 0 ? void 0 : (_find3$config = _find3.config) === null || _find3$config === void 0 ? void 0 : _find3$config.showSenderMobile;
|
|
12902
12902
|
}, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
12903
|
+
var senderMobileLabel = React.useMemo(function () {
|
|
12904
|
+
return (value === null || value === void 0 ? void 0 : value.interceptCompany) === 'ZTO' ? '发件人/收件人手机号' : '发件人手机号';
|
|
12905
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
12903
12906
|
var showKcode = React.useMemo(function () {
|
|
12904
12907
|
var isShow = false;
|
|
12905
12908
|
if (value === null || value === void 0 ? void 0 : value.interceptCompany) {
|
|
@@ -13134,14 +13137,14 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13134
13137
|
return option.label.includes(input);
|
|
13135
13138
|
}
|
|
13136
13139
|
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
13137
|
-
label:
|
|
13140
|
+
label: senderMobileLabel,
|
|
13138
13141
|
// required={true}
|
|
13139
13142
|
key: 'interceptSenderMobile',
|
|
13140
13143
|
hidden: !showSenderMobile
|
|
13141
13144
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13142
13145
|
value: value === null || value === void 0 ? void 0 : value.interceptSenderMobile,
|
|
13143
13146
|
disabled: disabled || isEdit,
|
|
13144
|
-
placeholder:
|
|
13147
|
+
placeholder: senderMobileLabel,
|
|
13145
13148
|
onChange: function onChange(e) {
|
|
13146
13149
|
return changeHandle(e.target.value, 'interceptSenderMobile');
|
|
13147
13150
|
}
|
|
@@ -13362,7 +13365,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13362
13365
|
if (disabled) {
|
|
13363
13366
|
return;
|
|
13364
13367
|
}
|
|
13365
|
-
if (
|
|
13368
|
+
if (['SF', 'ZTO'].includes(newCompany) && !(newCompany && trajectoryCode && trajectoryPhone)) {
|
|
13366
13369
|
return;
|
|
13367
13370
|
} else if (!(newCompany && trajectoryCode)) {
|
|
13368
13371
|
return;
|
|
@@ -13443,13 +13446,13 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13443
13446
|
});
|
|
13444
13447
|
};
|
|
13445
13448
|
//sf手机号
|
|
13446
|
-
var LogisticsPhone = function LogisticsPhone() {
|
|
13449
|
+
var LogisticsPhone = function LogisticsPhone(company) {
|
|
13447
13450
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13448
13451
|
disabled: disabled,
|
|
13449
13452
|
style: {
|
|
13450
13453
|
marginTop: '8px'
|
|
13451
13454
|
},
|
|
13452
|
-
placeholder:
|
|
13455
|
+
placeholder: company === 'ZTO' ? '发件人/收件人手机号' : '手机号',
|
|
13453
13456
|
onChange: function onChange(e) {
|
|
13454
13457
|
return handleInputChange(e, 'trajectoryPhone');
|
|
13455
13458
|
},
|
|
@@ -13498,7 +13501,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
13498
13501
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
13499
13502
|
});
|
|
13500
13503
|
};
|
|
13501
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) ===
|
|
13504
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), ['SF', 'ZTO'].includes(value === null || value === void 0 ? void 0 : value.trajectoryCompany) ? LogisticsPhone(value === null || value === void 0 ? void 0 : value.trajectoryCompany) : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
13502
13505
|
};
|
|
13503
13506
|
|
|
13504
13507
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -13548,7 +13551,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13548
13551
|
initValue = _ref.initValue, value = _ref.value;
|
|
13549
13552
|
hasSnapshot = showField && showField.includes('snapshot');
|
|
13550
13553
|
initList = initValue.map(function (item) {
|
|
13551
|
-
if (item.trajectoryCompany
|
|
13554
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13552
13555
|
return {
|
|
13553
13556
|
trajectoryCompany: item.trajectoryCompany,
|
|
13554
13557
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -13562,7 +13565,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13562
13565
|
}
|
|
13563
13566
|
});
|
|
13564
13567
|
valueList = value.map(function (item) {
|
|
13565
|
-
if (item.trajectoryCompany
|
|
13568
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13566
13569
|
return {
|
|
13567
13570
|
trajectoryCompany: item.trajectoryCompany,
|
|
13568
13571
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -13576,7 +13579,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
13576
13579
|
}
|
|
13577
13580
|
});
|
|
13578
13581
|
changeList = changeValue.map(function (item) {
|
|
13579
|
-
if (item.trajectoryCompany
|
|
13582
|
+
if (['SF', 'ZTO'].includes(item.trajectoryCompany)) {
|
|
13580
13583
|
return {
|
|
13581
13584
|
trajectoryCompany: item.trajectoryCompany,
|
|
13582
13585
|
trajectoryCode: item.trajectoryCode,
|
|
@@ -21824,7 +21827,12 @@ var systemOrderNoMap = {
|
|
|
21824
21827
|
JST_GOODS: 'oId',
|
|
21825
21828
|
WLN_GOODS: 'tradeNo',
|
|
21826
21829
|
JY_GOODS: 'tradeNo',
|
|
21827
|
-
JY_REISSUE_GOODS: 'tradeNo'
|
|
21830
|
+
JY_REISSUE_GOODS: 'tradeNo',
|
|
21831
|
+
KM_REISSUE_GOODS: 'sid',
|
|
21832
|
+
JST_REISSUE_GOODS: 'oId',
|
|
21833
|
+
GY_REISSUE_GOODS: 'code',
|
|
21834
|
+
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
21835
|
+
WDT_REISSUE_GOODS: 'tradeNo'
|
|
21828
21836
|
};
|
|
21829
21837
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
21830
21838
|
var columns = _ref.columns,
|
|
@@ -21834,14 +21842,19 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21834
21842
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
21835
21843
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
21836
21844
|
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
21837
|
-
_ref$
|
|
21838
|
-
|
|
21845
|
+
_ref$isShowSelect = _ref.isShowSelect,
|
|
21846
|
+
isShowSelect = _ref$isShowSelect === void 0 ? false : _ref$isShowSelect,
|
|
21839
21847
|
_ref$systemOrders = _ref.systemOrders,
|
|
21840
21848
|
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
21841
21849
|
_ref$selectedSystemOr = _ref.selectedSystemOrders,
|
|
21850
|
+
selectedSystemOrders = _ref$selectedSystemOr === void 0 ? [] : _ref$selectedSystemOr,
|
|
21851
|
+
_ref$validSystemOrder = _ref.validSystemOrder,
|
|
21852
|
+
validSystemOrder = _ref$validSystemOrder === void 0 ? false : _ref$validSystemOrder,
|
|
21842
21853
|
_ref$type = _ref.type,
|
|
21843
21854
|
type = _ref$type === void 0 ? '' : _ref$type,
|
|
21844
|
-
width = _ref.width
|
|
21855
|
+
width = _ref.width,
|
|
21856
|
+
_ref$isReissueType = _ref.isReissueType,
|
|
21857
|
+
isReissueType = _ref$isReissueType === void 0 ? false : _ref$isReissueType;
|
|
21845
21858
|
var _useState = React.useState(),
|
|
21846
21859
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21847
21860
|
selectSystemNo = _useState2[0],
|
|
@@ -21851,6 +21864,10 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21851
21864
|
tradeGoodsVisible = _useState4[0],
|
|
21852
21865
|
setTradeGoodsVisible = _useState4[1];
|
|
21853
21866
|
var openModal = function openModal() {
|
|
21867
|
+
if (validSystemOrder) {
|
|
21868
|
+
antd.message.warning('请选择补发系统单');
|
|
21869
|
+
return;
|
|
21870
|
+
}
|
|
21854
21871
|
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
21855
21872
|
getDataSourceAsync().then(function () {
|
|
21856
21873
|
setTradeGoodsVisible(true);
|
|
@@ -21858,15 +21875,11 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21858
21875
|
} else {
|
|
21859
21876
|
setTradeGoodsVisible(true);
|
|
21860
21877
|
}
|
|
21861
|
-
//
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
// );
|
|
21866
|
-
// setSelectSystemNo(codeList || []);
|
|
21867
|
-
// }
|
|
21878
|
+
// 补发直接传入的是systemNo
|
|
21879
|
+
if (isShowSelect && isReissueType) {
|
|
21880
|
+
setSelectSystemNo(selectedSystemOrders || []);
|
|
21881
|
+
}
|
|
21868
21882
|
};
|
|
21869
|
-
|
|
21870
21883
|
var closeModal = function closeModal() {
|
|
21871
21884
|
return setTradeGoodsVisible(false);
|
|
21872
21885
|
};
|
|
@@ -21882,10 +21895,6 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21882
21895
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
21883
21896
|
}));
|
|
21884
21897
|
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
21898
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
21890
21899
|
};
|
|
21891
21900
|
var rowSelection = {
|
|
@@ -21910,9 +21919,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
21910
21919
|
style: {
|
|
21911
21920
|
maxWidth: '1000px'
|
|
21912
21921
|
}
|
|
21913
|
-
},
|
|
21922
|
+
}, isShowSelect && /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21914
21923
|
style: {
|
|
21915
|
-
marginBottom: '
|
|
21924
|
+
marginBottom: '20px'
|
|
21916
21925
|
}
|
|
21917
21926
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
21918
21927
|
span: 12
|
|
@@ -22014,13 +22023,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22014
22023
|
systemOrders = props.systemOrders,
|
|
22015
22024
|
selectedSystemOrders = props.selectedSystemOrders,
|
|
22016
22025
|
_props$templateDetail = props.templateDetail,
|
|
22017
|
-
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail
|
|
22026
|
+
templateDetail = _props$templateDetail === void 0 ? {} : _props$templateDetail,
|
|
22027
|
+
_props$hasSelectedSys = props.hasSelectedSystemOrder,
|
|
22028
|
+
hasSelectedSystemOrder = _props$hasSelectedSys === void 0 ? false : _props$hasSelectedSys;
|
|
22018
22029
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
22019
22030
|
// 监听聚水潭退货商品
|
|
22020
22031
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
22021
22032
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
22022
|
-
//
|
|
22023
|
-
var
|
|
22033
|
+
// 判断是否为是否展示系统单筛选项
|
|
22034
|
+
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;
|
|
22035
|
+
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
22036
|
var refModal = React.useRef();
|
|
22025
22037
|
console.debug('表格数据', value);
|
|
22026
22038
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -22296,6 +22308,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22296
22308
|
return params;
|
|
22297
22309
|
}, [tableSelect, selectedRowKeys, value]);
|
|
22298
22310
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
22311
|
+
var validSystemOrder = React.useMemo(function () {
|
|
22312
|
+
return ['GY_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'KM_REISSUE_GOODS'].includes(type) && !hasSelectedSystemOrder;
|
|
22313
|
+
}, [type, hasSelectedSystemOrder]);
|
|
22299
22314
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22300
22315
|
style: {
|
|
22301
22316
|
float: 'right'
|
|
@@ -22304,7 +22319,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22304
22319
|
checked: isStrict,
|
|
22305
22320
|
onChange: handleCheckboxChange
|
|
22306
22321
|
}, "\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, {
|
|
22307
|
-
|
|
22322
|
+
validSystemOrder: validSystemOrder,
|
|
22323
|
+
isShowSelect: isShowSelect,
|
|
22308
22324
|
uniqueKey: uniqueKey,
|
|
22309
22325
|
type: type,
|
|
22310
22326
|
columns: orderModalColumns,
|
|
@@ -22314,7 +22330,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
22314
22330
|
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
22315
22331
|
systemOrders: systemOrders,
|
|
22316
22332
|
selectedSystemOrders: selectedSystemOrders,
|
|
22317
|
-
width: width || 850
|
|
22333
|
+
width: width || 850,
|
|
22334
|
+
isReissueType: isReissueType
|
|
22318
22335
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
22319
22336
|
type: "link",
|
|
22320
22337
|
onClick: handleChangeGoods
|
|
@@ -25436,11 +25453,12 @@ var typeMap$1 = {
|
|
|
25436
25453
|
money: 'orderPrice',
|
|
25437
25454
|
share: 'sharePrice'
|
|
25438
25455
|
},
|
|
25439
|
-
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
25456
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton,
|
|
25457
|
+
isShowSelectTradeGoods: true
|
|
25440
25458
|
}
|
|
25441
25459
|
};
|
|
25442
25460
|
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;
|
|
25461
|
+
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
25462
|
var value = props.value,
|
|
25445
25463
|
onChange = props.onChange,
|
|
25446
25464
|
_props$reasonList = props.reasonList,
|
|
@@ -25469,36 +25487,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25469
25487
|
}
|
|
25470
25488
|
return;
|
|
25471
25489
|
}, [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
25490
|
var getOrderList = /*#__PURE__*/function () {
|
|
25503
25491
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
25504
25492
|
var _typeMap$type5;
|
|
@@ -25558,17 +25546,24 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25558
25546
|
}))));
|
|
25559
25547
|
};
|
|
25560
25548
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
25561
|
-
var _typeMap$type14, _typeMap$type15
|
|
25549
|
+
var _typeMap$type14, _typeMap$type15;
|
|
25562
25550
|
var mode = _ref3.mode,
|
|
25563
|
-
sysOrderNo = _ref3.sysOrderNo
|
|
25551
|
+
sysOrderNo = _ref3.sysOrderNo,
|
|
25552
|
+
_ref3$isAllOrders = _ref3.isAllOrders,
|
|
25553
|
+
isAllOrders = _ref3$isAllOrders === void 0 ? false : _ref3$isAllOrders;
|
|
25564
25554
|
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
25555
|
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
25556
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
25567
25557
|
return order.tradeNo === systemOrderNo;
|
|
25568
25558
|
});
|
|
25569
|
-
var
|
|
25559
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
25560
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
25561
|
+
var _order$goodDetails;
|
|
25562
|
+
return order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length;
|
|
25563
|
+
});
|
|
25564
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateWdtGoodsHandle([order]) : [];
|
|
25570
25565
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25571
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
25566
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25572
25567
|
return !orderNo || goodItem.srcTid === orderNo;
|
|
25573
25568
|
}) : goodDetails;
|
|
25574
25569
|
};
|
|
@@ -25671,7 +25666,8 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25671
25666
|
type: type,
|
|
25672
25667
|
disabled: disabled,
|
|
25673
25668
|
canUpdateNumber: showChangeBtn,
|
|
25674
|
-
|
|
25669
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
25670
|
+
// showChangeBtn={showChangeBtn}
|
|
25675
25671
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
25676
25672
|
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
25673
|
onChange: function onChange(val) {
|
|
@@ -25680,9 +25676,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
25680
25676
|
onModeChange: handleModeChange,
|
|
25681
25677
|
showModeBtn: showModeBtn,
|
|
25682
25678
|
isStrict: isStrict,
|
|
25679
|
+
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,
|
|
25680
|
+
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,
|
|
25681
|
+
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
25682
|
tradeGoods: {
|
|
25684
25683
|
originDataSource: getGoodDetails({
|
|
25685
|
-
mode: isStrict
|
|
25684
|
+
mode: isStrict,
|
|
25685
|
+
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
25686
|
}),
|
|
25687
25687
|
selectedGoodsChange: selectedGoodsChange
|
|
25688
25688
|
}
|
|
@@ -25706,7 +25706,8 @@ var typeMap$2 = {
|
|
|
25706
25706
|
outerOiIdKey: '',
|
|
25707
25707
|
goodDetailsKey: 'items',
|
|
25708
25708
|
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
25709
|
-
uniqueKey: 'uuid'
|
|
25709
|
+
uniqueKey: 'uuid',
|
|
25710
|
+
isShowSelectTradeGoods: true
|
|
25710
25711
|
},
|
|
25711
25712
|
JST_RETURN_GOODS: {
|
|
25712
25713
|
compType: '退货',
|
|
@@ -25745,7 +25746,8 @@ var typeMap$2 = {
|
|
|
25745
25746
|
oIdKey: 'billNo',
|
|
25746
25747
|
outerOiIdKey: '',
|
|
25747
25748
|
goodDetailsKey: 'subOrders',
|
|
25748
|
-
uniqueKey: 'id'
|
|
25749
|
+
uniqueKey: 'id',
|
|
25750
|
+
isShowSelectTradeGoods: true
|
|
25749
25751
|
},
|
|
25750
25752
|
JY_REISSUE_GOODS: {
|
|
25751
25753
|
compType: '补发',
|
|
@@ -25764,7 +25766,7 @@ var typeMap$2 = {
|
|
|
25764
25766
|
}
|
|
25765
25767
|
};
|
|
25766
25768
|
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,
|
|
25769
|
+
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
25770
|
var value = props.value,
|
|
25769
25771
|
onChange = props.onChange,
|
|
25770
25772
|
_props$reasonList = props.reasonList,
|
|
@@ -25909,7 +25911,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
25909
25911
|
var _order$typeMap$type$g;
|
|
25910
25912
|
return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
|
|
25911
25913
|
});
|
|
25912
|
-
var goodDetails = hasGoodDetails ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25914
|
+
var goodDetails = hasGoodDetails ? !isAllOrders && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.updateGoodsHandle(orders, orderRest)) : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.updateGoodsHandle(orders, orderRest) : [];
|
|
25913
25915
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
25914
25916
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
25915
25917
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -26033,25 +26035,27 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
26033
26035
|
type: type,
|
|
26034
26036
|
disabled: disabled,
|
|
26035
26037
|
canUpdateNumber: showChangeBtn,
|
|
26036
|
-
|
|
26037
|
-
|
|
26038
|
-
|
|
26038
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
26039
|
+
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
26040
|
+
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,
|
|
26041
|
+
// showErpGoodsBtn={typeMap?.[type]?.showErpGoodsBtn}
|
|
26039
26042
|
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$
|
|
26043
|
+
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
26044
|
onChange: function onChange(val) {
|
|
26042
26045
|
return changeGoodHandle(val);
|
|
26043
26046
|
},
|
|
26044
26047
|
onModeChange: handleModeChange,
|
|
26045
26048
|
showModeBtn: false,
|
|
26046
26049
|
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$
|
|
26050
|
+
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,
|
|
26051
|
+
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,
|
|
26052
|
+
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
26053
|
tradeGoods: {
|
|
26050
26054
|
originDataSource: getGoodDetails({
|
|
26051
26055
|
mode: isStrict,
|
|
26052
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26056
|
+
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
26057
|
}),
|
|
26054
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
26058
|
+
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
26059
|
selectedGoodsChange: selectedGoodsChange
|
|
26056
26060
|
}
|
|
26057
26061
|
})));
|
|
@@ -26839,11 +26843,12 @@ var typeMap$3 = {
|
|
|
26839
26843
|
typeName: 'bsE3ReissueType',
|
|
26840
26844
|
systemOrder: 'bsE3SystemOrder',
|
|
26841
26845
|
systemOrderNo: 'bsE3SystemOrderNo',
|
|
26842
|
-
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
26846
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton,
|
|
26847
|
+
isShowSelectTradeGoods: true
|
|
26843
26848
|
}
|
|
26844
26849
|
};
|
|
26845
26850
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
26846
|
-
var _typeMap$type22, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s6, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
26851
|
+
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
26852
|
var value = props.value,
|
|
26848
26853
|
onChange = props.onChange,
|
|
26849
26854
|
_props$reasonList = props.reasonList,
|
|
@@ -26945,17 +26950,24 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
26945
26950
|
}))));
|
|
26946
26951
|
};
|
|
26947
26952
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
26948
|
-
var _typeMap$type13, _typeMap$type14
|
|
26953
|
+
var _typeMap$type13, _typeMap$type14;
|
|
26949
26954
|
var mode = _ref4.mode,
|
|
26950
|
-
sysOrderNo = _ref4.sysOrderNo
|
|
26955
|
+
sysOrderNo = _ref4.sysOrderNo,
|
|
26956
|
+
_ref4$isAllOrders = _ref4.isAllOrders,
|
|
26957
|
+
isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
|
|
26951
26958
|
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
26959
|
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
26960
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
26954
26961
|
return order.orderSn === systemOrderNo;
|
|
26955
26962
|
});
|
|
26956
|
-
var
|
|
26963
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
26964
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
26965
|
+
var _order$orderDetailGet;
|
|
26966
|
+
return order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length;
|
|
26967
|
+
});
|
|
26968
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateBsE3GoodsHandle([order], 'sharePrice') : [];
|
|
26957
26969
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
26958
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
26970
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
26959
26971
|
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
26960
26972
|
}) : goodDetails;
|
|
26961
26973
|
};
|
|
@@ -27056,7 +27068,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27056
27068
|
type: type,
|
|
27057
27069
|
disabled: disabled,
|
|
27058
27070
|
canUpdateNumber: showChangeBtn,
|
|
27059
|
-
|
|
27071
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27072
|
+
// showChangeBtn={showChangeBtn}
|
|
27060
27073
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
27061
27074
|
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
27075
|
onChange: function onChange(val) {
|
|
@@ -27065,9 +27078,13 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
27065
27078
|
onModeChange: handleModeChange,
|
|
27066
27079
|
showModeBtn: false,
|
|
27067
27080
|
isStrict: isStrict,
|
|
27081
|
+
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,
|
|
27082
|
+
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,
|
|
27083
|
+
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
27084
|
tradeGoods: {
|
|
27069
27085
|
originDataSource: getGoodDetails({
|
|
27070
|
-
mode: isStrict
|
|
27086
|
+
mode: isStrict,
|
|
27087
|
+
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
27088
|
}),
|
|
27072
27089
|
selectedGoodsChange: selectedGoodsChange
|
|
27073
27090
|
}
|
|
@@ -27096,11 +27113,12 @@ var typeMap$4 = {
|
|
|
27096
27113
|
money: 'orderPrice',
|
|
27097
27114
|
share: 'sharePrice'
|
|
27098
27115
|
},
|
|
27099
|
-
getOrderList: gyUtils.getGyOrderListSingleton
|
|
27116
|
+
getOrderList: gyUtils.getGyOrderListSingleton,
|
|
27117
|
+
isShowSelectTradeGoods: true
|
|
27100
27118
|
}
|
|
27101
27119
|
};
|
|
27102
27120
|
var GyReissue = function GyReissue(props) {
|
|
27103
|
-
var _typeMap$
|
|
27121
|
+
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
27122
|
var value = props.value,
|
|
27105
27123
|
onChange = props.onChange,
|
|
27106
27124
|
_props$reasonList = props.reasonList,
|
|
@@ -27246,17 +27264,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27246
27264
|
}))));
|
|
27247
27265
|
};
|
|
27248
27266
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
27249
|
-
var _ref8, _typeMap$type19, _ref9, _typeMap$type20
|
|
27267
|
+
var _ref8, _typeMap$type19, _ref9, _typeMap$type20;
|
|
27250
27268
|
var mode = _ref7.mode,
|
|
27251
|
-
sysOrderNo = _ref7.sysOrderNo
|
|
27269
|
+
sysOrderNo = _ref7.sysOrderNo,
|
|
27270
|
+
_ref7$isAllOrders = _ref7.isAllOrders,
|
|
27271
|
+
isAllOrders = _ref7$isAllOrders === void 0 ? false : _ref7$isAllOrders;
|
|
27252
27272
|
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
27273
|
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
27274
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
27255
27275
|
return order.code === systemOrderNo;
|
|
27256
27276
|
});
|
|
27257
|
-
var
|
|
27277
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : [order];
|
|
27278
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
27279
|
+
var _order$details;
|
|
27280
|
+
return order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length;
|
|
27281
|
+
});
|
|
27282
|
+
var goodDetails = hasGoodDetails ? kmkfUtils.updateGyGoodsHandle(orders) : [];
|
|
27258
27283
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
27259
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
27284
|
+
return mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
27260
27285
|
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
27261
27286
|
}) : goodDetails;
|
|
27262
27287
|
};
|
|
@@ -27293,25 +27318,26 @@ var GyReissue = function GyReissue(props) {
|
|
|
27293
27318
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27294
27319
|
};
|
|
27295
27320
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
27296
|
-
var _ref12, _typeMap$
|
|
27321
|
+
var _typeMap$type29, _ref12, _typeMap$type30, _typeMap$type31, _uniqBy;
|
|
27297
27322
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
27298
27323
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
27299
27324
|
// 原订单商品
|
|
27300
27325
|
var originTradeGoodList = getGoodDetails({
|
|
27301
|
-
mode: isStrict
|
|
27326
|
+
mode: isStrict,
|
|
27327
|
+
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
27328
|
}) || [];
|
|
27303
27329
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
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$
|
|
27330
|
+
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)]) || [];
|
|
27331
|
+
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) {
|
|
27306
27332
|
return skuList.includes(item.uuid);
|
|
27307
27333
|
});
|
|
27308
27334
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
27309
27335
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
27310
27336
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
27311
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27337
|
+
}, [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
27338
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
27313
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27314
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
27339
|
+
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];
|
|
27340
|
+
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
27341
|
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
27342
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
27317
27343
|
gutter: 8,
|
|
@@ -27331,12 +27357,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
27331
27357
|
},
|
|
27332
27358
|
disabled: disabled,
|
|
27333
27359
|
allowClear: false,
|
|
27334
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27360
|
+
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
27361
|
onChange: function onChange(val) {
|
|
27336
27362
|
return changeSystemOrderHandle(val);
|
|
27337
27363
|
},
|
|
27338
27364
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
27339
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
27365
|
+
}, ((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
27366
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
27341
27367
|
className: styles$6.systemNoDisabled,
|
|
27342
27368
|
key: item.billNo,
|
|
@@ -27360,7 +27386,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
27360
27386
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
27361
27387
|
allowClear: false,
|
|
27362
27388
|
options: reasonList,
|
|
27363
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
27389
|
+
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
27390
|
onChange: function onChange(val) {
|
|
27365
27391
|
return changeTypeHandle(val);
|
|
27366
27392
|
}
|
|
@@ -27370,19 +27396,24 @@ var GyReissue = function GyReissue(props) {
|
|
|
27370
27396
|
type: type,
|
|
27371
27397
|
disabled: disabled,
|
|
27372
27398
|
canUpdateNumber: showChangeBtn,
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
alwaysShowChooseErpGoodsBtn:
|
|
27399
|
+
// showChangeBtn={showChangeBtn}
|
|
27400
|
+
// showErpGoodsBtn={showErpGoodsBtn}
|
|
27401
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
27402
|
+
hasSelectedSystemOrder: showChangeBtn,
|
|
27376
27403
|
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$
|
|
27404
|
+
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
27405
|
onChange: function onChange(val) {
|
|
27379
27406
|
return changeGoodHandle(val);
|
|
27380
27407
|
},
|
|
27381
27408
|
onModeChange: handleModeChange,
|
|
27382
27409
|
isStrict: isStrict,
|
|
27410
|
+
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,
|
|
27411
|
+
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,
|
|
27412
|
+
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
27413
|
tradeGoods: {
|
|
27384
27414
|
originDataSource: getGoodDetails({
|
|
27385
|
-
mode: isStrict
|
|
27415
|
+
mode: isStrict,
|
|
27416
|
+
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
27417
|
}),
|
|
27387
27418
|
selectedGoodsChange: selectedGoodsChange
|
|
27388
27419
|
}
|
|
@@ -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.
|
|
3
|
+
"version": "2.2.31",
|
|
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.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.30",
|
|
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": "c47de88a6fd7ea054dde5fdb58a9d70b029fb77f"
|
|
70
70
|
}
|