@kmkf-fe-packages/basic-components 2.10.2 → 2.10.4
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 +236 -92
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -867,10 +867,21 @@ var ApaasUpload = function ApaasUpload(_ref) {
|
|
|
867
867
|
});
|
|
868
868
|
};
|
|
869
869
|
}, [pasteDefaultStates]);
|
|
870
|
+
// 阻止浏览器默认拖拽行为(防止外部图片拖入时覆盖整个页面)
|
|
871
|
+
var handleDragOver = function handleDragOver(e) {
|
|
872
|
+
e.preventDefault();
|
|
873
|
+
e.stopPropagation();
|
|
874
|
+
};
|
|
875
|
+
var handleDrop = function handleDrop(e) {
|
|
876
|
+
e.preventDefault();
|
|
877
|
+
e.stopPropagation();
|
|
878
|
+
};
|
|
870
879
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
|
|
871
880
|
className: styles.tips
|
|
872
881
|
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u5F20\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
|
|
873
|
-
className: styles.imageBox
|
|
882
|
+
className: styles.imageBox,
|
|
883
|
+
onDragOver: handleDragOver,
|
|
884
|
+
onDrop: handleDrop
|
|
874
885
|
}, !disabled && /*#__PURE__*/React.createElement("div", {
|
|
875
886
|
className: styles.imagePaste
|
|
876
887
|
}, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -1221,12 +1232,23 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
1221
1232
|
taskCompleted: !uploading
|
|
1222
1233
|
};
|
|
1223
1234
|
}, [uploading]);
|
|
1235
|
+
// 阻止浏览器默认拖拽行为(防止外部图片拖入时覆盖整个页面)
|
|
1236
|
+
var handleDragOver = function handleDragOver(e) {
|
|
1237
|
+
e.preventDefault();
|
|
1238
|
+
e.stopPropagation();
|
|
1239
|
+
};
|
|
1240
|
+
var handleDrop = function handleDrop(e) {
|
|
1241
|
+
e.preventDefault();
|
|
1242
|
+
e.stopPropagation();
|
|
1243
|
+
};
|
|
1224
1244
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
1225
1245
|
spinning: uploading
|
|
1226
1246
|
}, /*#__PURE__*/React.createElement("p", {
|
|
1227
1247
|
className: styles$1.tips
|
|
1228
1248
|
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u5F20\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
|
|
1229
|
-
className: styles$1.imageBox
|
|
1249
|
+
className: styles$1.imageBox,
|
|
1250
|
+
onDragOver: handleDragOver,
|
|
1251
|
+
onDrop: handleDrop
|
|
1230
1252
|
}, !disabled && /*#__PURE__*/React.createElement("div", {
|
|
1231
1253
|
className: styles$1.imagePaste
|
|
1232
1254
|
}, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -1527,12 +1549,23 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
|
|
|
1527
1549
|
taskCompleted: !uploading
|
|
1528
1550
|
};
|
|
1529
1551
|
}, [uploading]);
|
|
1552
|
+
// 阻止浏览器默认拖拽行为(防止外部图片拖入时覆盖整个页面)
|
|
1553
|
+
var handleDragOver = function handleDragOver(e) {
|
|
1554
|
+
e.preventDefault();
|
|
1555
|
+
e.stopPropagation();
|
|
1556
|
+
};
|
|
1557
|
+
var handleDrop = function handleDrop(e) {
|
|
1558
|
+
e.preventDefault();
|
|
1559
|
+
e.stopPropagation();
|
|
1560
|
+
};
|
|
1530
1561
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
1531
1562
|
spinning: uploading
|
|
1532
1563
|
}, /*#__PURE__*/React.createElement("p", {
|
|
1533
1564
|
className: styles$2.tips
|
|
1534
1565
|
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u5F20\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
|
|
1535
|
-
className: styles$2.imageProBox
|
|
1566
|
+
className: styles$2.imageProBox,
|
|
1567
|
+
onDragOver: handleDragOver,
|
|
1568
|
+
onDrop: handleDrop
|
|
1536
1569
|
}, !disabled && /*#__PURE__*/React.createElement("div", {
|
|
1537
1570
|
className: styles$2.imageProPaste
|
|
1538
1571
|
}, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -7502,12 +7535,23 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
|
|
|
7502
7535
|
setFileName('');
|
|
7503
7536
|
setVisible(false);
|
|
7504
7537
|
};
|
|
7538
|
+
// 阻止浏览器默认拖拽行为(防止外部图片拖入时覆盖整个页面)
|
|
7539
|
+
var handleDragOver = function handleDragOver(e) {
|
|
7540
|
+
e.preventDefault();
|
|
7541
|
+
e.stopPropagation();
|
|
7542
|
+
};
|
|
7543
|
+
var handleDrop = function handleDrop(e) {
|
|
7544
|
+
e.preventDefault();
|
|
7545
|
+
e.stopPropagation();
|
|
7546
|
+
};
|
|
7505
7547
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
7506
7548
|
spinning: uploading
|
|
7507
7549
|
}, /*#__PURE__*/React.createElement("p", {
|
|
7508
7550
|
className: styles$3.tips
|
|
7509
7551
|
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
|
|
7510
|
-
className: styles$3.imageBox
|
|
7552
|
+
className: styles$3.imageBox,
|
|
7553
|
+
onDragOver: handleDragOver,
|
|
7554
|
+
onDrop: handleDrop
|
|
7511
7555
|
}, !disabled && /*#__PURE__*/React.createElement("div", {
|
|
7512
7556
|
className: styles$3.imagePaste
|
|
7513
7557
|
}, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -9349,7 +9393,8 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
|
|
|
9349
9393
|
},
|
|
9350
9394
|
jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9351
9395
|
jstReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnGoods")), []),
|
|
9352
|
-
jstSystemOrderBillType:
|
|
9396
|
+
// jstSystemOrderBillType:
|
|
9397
|
+
// getValue(`${nex.uniqueKey}_jstSystemOrderBillType`) || '',
|
|
9353
9398
|
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9354
9399
|
jstSystemOrderNo: getValue("".concat(nex.uniqueKey, "_jstSystemOrderNo"))
|
|
9355
9400
|
});
|
|
@@ -15015,12 +15060,8 @@ var jstColumns = [{
|
|
|
15015
15060
|
title: '商品图片',
|
|
15016
15061
|
width: 100,
|
|
15017
15062
|
render: function render(picUrl) {
|
|
15018
|
-
return /*#__PURE__*/React.createElement(
|
|
15019
|
-
|
|
15020
|
-
width: '30px',
|
|
15021
|
-
height: '30px',
|
|
15022
|
-
objectFit: 'contain'
|
|
15023
|
-
},
|
|
15063
|
+
return /*#__PURE__*/React.createElement(ApaasImage, {
|
|
15064
|
+
width: 30,
|
|
15024
15065
|
src: picUrl
|
|
15025
15066
|
});
|
|
15026
15067
|
}
|
|
@@ -22075,7 +22116,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22075
22116
|
min: 0,
|
|
22076
22117
|
precision: 2,
|
|
22077
22118
|
onChange: function onChange(num) {
|
|
22078
|
-
|
|
22119
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
22120
|
+
if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
|
|
22079
22121
|
}
|
|
22080
22122
|
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
|
|
22081
22123
|
}
|
|
@@ -22107,7 +22149,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22107
22149
|
min: 1,
|
|
22108
22150
|
precision: 0,
|
|
22109
22151
|
onChange: function onChange(num) {
|
|
22110
|
-
|
|
22152
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
22153
|
+
if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
|
|
22111
22154
|
}
|
|
22112
22155
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22113
22156
|
}
|
|
@@ -22208,7 +22251,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22208
22251
|
min: 0,
|
|
22209
22252
|
precision: 2,
|
|
22210
22253
|
onChange: function onChange(num) {
|
|
22211
|
-
|
|
22254
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
22255
|
+
if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
|
|
22212
22256
|
}
|
|
22213
22257
|
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
|
|
22214
22258
|
}
|
|
@@ -22238,16 +22282,39 @@ var getColumns$5 = function getColumns() {
|
|
|
22238
22282
|
min: 1,
|
|
22239
22283
|
precision: 0,
|
|
22240
22284
|
onChange: function onChange(num) {
|
|
22241
|
-
|
|
22285
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
22286
|
+
if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
|
|
22242
22287
|
}
|
|
22243
22288
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22244
22289
|
}
|
|
22245
22290
|
}, {
|
|
22246
22291
|
dataIndex: 'saleAmount',
|
|
22247
22292
|
title: '总金额',
|
|
22248
|
-
|
|
22249
|
-
var
|
|
22250
|
-
|
|
22293
|
+
validator: function validator(_rule, value) {
|
|
22294
|
+
var goodsName = '';
|
|
22295
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
22296
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
|
|
22297
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22298
|
+
if (res) {
|
|
22299
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22300
|
+
}
|
|
22301
|
+
return res;
|
|
22302
|
+
})) {
|
|
22303
|
+
return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22304
|
+
}
|
|
22305
|
+
},
|
|
22306
|
+
render: function render(val, record, index) {
|
|
22307
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22308
|
+
style: {
|
|
22309
|
+
width: 130
|
|
22310
|
+
},
|
|
22311
|
+
value: val,
|
|
22312
|
+
min: 0,
|
|
22313
|
+
precision: 2,
|
|
22314
|
+
onChange: function onChange(num) {
|
|
22315
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
|
|
22316
|
+
}
|
|
22317
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22251
22318
|
}
|
|
22252
22319
|
}, {
|
|
22253
22320
|
dataIndex: 'batchId',
|
|
@@ -22328,6 +22395,19 @@ var getColumns$5 = function getColumns() {
|
|
|
22328
22395
|
dataIndex: 'salePrice',
|
|
22329
22396
|
title: '单价',
|
|
22330
22397
|
width: 120,
|
|
22398
|
+
validator: function validator(_rule, value) {
|
|
22399
|
+
var goodsName = '';
|
|
22400
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22401
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
22402
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22403
|
+
if (res) {
|
|
22404
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22405
|
+
}
|
|
22406
|
+
return res;
|
|
22407
|
+
})) {
|
|
22408
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22409
|
+
}
|
|
22410
|
+
},
|
|
22331
22411
|
render: function render(val, record, index) {
|
|
22332
22412
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22333
22413
|
style: {
|
|
@@ -22337,7 +22417,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22337
22417
|
min: 0,
|
|
22338
22418
|
precision: 2,
|
|
22339
22419
|
onChange: function onChange(num) {
|
|
22340
|
-
|
|
22420
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
22421
|
+
if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
|
|
22341
22422
|
}
|
|
22342
22423
|
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
|
|
22343
22424
|
}
|
|
@@ -22345,6 +22426,19 @@ var getColumns$5 = function getColumns() {
|
|
|
22345
22426
|
dataIndex: 'qty',
|
|
22346
22427
|
title: '数量',
|
|
22347
22428
|
width: 100,
|
|
22429
|
+
validator: function validator(_rule, value) {
|
|
22430
|
+
var goodsName = '';
|
|
22431
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22432
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
22433
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
22434
|
+
if (res) {
|
|
22435
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22436
|
+
}
|
|
22437
|
+
return res;
|
|
22438
|
+
})) {
|
|
22439
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22440
|
+
}
|
|
22441
|
+
},
|
|
22348
22442
|
render: function render(val, record, index) {
|
|
22349
22443
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22350
22444
|
style: {
|
|
@@ -22354,16 +22448,39 @@ var getColumns$5 = function getColumns() {
|
|
|
22354
22448
|
min: 1,
|
|
22355
22449
|
precision: 0,
|
|
22356
22450
|
onChange: function onChange(num) {
|
|
22357
|
-
|
|
22451
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
22452
|
+
if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
|
|
22358
22453
|
}
|
|
22359
22454
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22360
22455
|
}
|
|
22361
22456
|
}, {
|
|
22362
22457
|
dataIndex: 'saleAmount',
|
|
22363
22458
|
title: '总金额',
|
|
22364
|
-
|
|
22365
|
-
var
|
|
22366
|
-
|
|
22459
|
+
validator: function validator(_rule, value) {
|
|
22460
|
+
var goodsName = '';
|
|
22461
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22462
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
|
|
22463
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22464
|
+
if (res) {
|
|
22465
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22466
|
+
}
|
|
22467
|
+
return res;
|
|
22468
|
+
})) {
|
|
22469
|
+
return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22470
|
+
}
|
|
22471
|
+
},
|
|
22472
|
+
render: function render(val, record, index) {
|
|
22473
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22474
|
+
style: {
|
|
22475
|
+
width: 130
|
|
22476
|
+
},
|
|
22477
|
+
value: val,
|
|
22478
|
+
min: 0,
|
|
22479
|
+
precision: 2,
|
|
22480
|
+
onChange: function onChange(num) {
|
|
22481
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
|
|
22482
|
+
}
|
|
22483
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22367
22484
|
}
|
|
22368
22485
|
}, {
|
|
22369
22486
|
dataIndex: 'isGift',
|
|
@@ -24973,6 +25090,8 @@ var systemOrderNoMap = {
|
|
|
24973
25090
|
KM_RETURN_GOODS: 'sid',
|
|
24974
25091
|
KM_EXCHANGE_GOODS: 'sid',
|
|
24975
25092
|
JST_REISSUE_GOODS: 'oId',
|
|
25093
|
+
JST_RETURN_GOODS: 'oId',
|
|
25094
|
+
JST_EXCHANGE_GOODS: 'oId',
|
|
24976
25095
|
GY_REISSUE_GOODS: 'code',
|
|
24977
25096
|
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
24978
25097
|
WDT_REISSUE_GOODS: 'tradeNo'
|
|
@@ -25284,10 +25403,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25284
25403
|
var canDelete = ['JST_AFTERSALE_GOODS'].includes(type);
|
|
25285
25404
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
25286
25405
|
// 监听聚水潭退货商品
|
|
25287
|
-
|
|
25288
|
-
|
|
25406
|
+
// const jstReturnGoods = Form?.useWatch('3979edfd6d', form);
|
|
25407
|
+
// const isShowSelectTradeGoods =
|
|
25408
|
+
// type !== 'JST_EXCHANGE_GOODS' || jstReturnGoods?.jstSystemOrderNo;
|
|
25289
25409
|
// 判断是否为是否展示系统单筛选项
|
|
25290
|
-
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
25410
|
+
var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
|
|
25291
25411
|
var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS'].includes(type) || false;
|
|
25292
25412
|
var refModal = useRef();
|
|
25293
25413
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -25580,7 +25700,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25580
25700
|
}, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
|
|
25581
25701
|
checked: isStrict,
|
|
25582
25702
|
onChange: handleCheckboxChange
|
|
25583
|
-
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) &&
|
|
25703
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
|
|
25584
25704
|
isReloadSelectTable: isReloadSelectTable,
|
|
25585
25705
|
validSystemOrderFn: validSystemOrderFn,
|
|
25586
25706
|
validSystemOrder: validSystemOrder,
|
|
@@ -29129,10 +29249,11 @@ var componentMap$4 = {
|
|
|
29129
29249
|
systemOrderNo: 'jstSystemOrderNo',
|
|
29130
29250
|
oIdKey: 'oId',
|
|
29131
29251
|
goodDetailsKey: 'items',
|
|
29132
|
-
skuIdKey: 'skuId',
|
|
29133
29252
|
outerOiIdKey: '',
|
|
29134
29253
|
name: '聚水潭',
|
|
29135
29254
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
29255
|
+
isShowSelectTradeGoods: true,
|
|
29256
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
29136
29257
|
eventNameMap: {
|
|
29137
29258
|
// pubsub 事件
|
|
29138
29259
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -29150,7 +29271,7 @@ var componentMap$4 = {
|
|
|
29150
29271
|
systemOrderNo: 'kmSystemOrderNo',
|
|
29151
29272
|
oIdKey: 'billNo',
|
|
29152
29273
|
goodDetailsKey: 'subOrders',
|
|
29153
|
-
|
|
29274
|
+
uniqueKey: 'skuId',
|
|
29154
29275
|
outerOiIdKey: '',
|
|
29155
29276
|
name: '快麦',
|
|
29156
29277
|
updateGoodsHandle: updateKmGoodsHandle,
|
|
@@ -29198,7 +29319,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29198
29319
|
disabled = props.disabled,
|
|
29199
29320
|
compType = props.type,
|
|
29200
29321
|
form = props.form;
|
|
29201
|
-
var uniqueKey = (componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$4[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.
|
|
29322
|
+
var uniqueKey = (componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$4[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.uniqueKey) || 'uuid';
|
|
29202
29323
|
var valueRef = useRef({});
|
|
29203
29324
|
// PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
|
|
29204
29325
|
var _useState = useState(false),
|
|
@@ -29209,6 +29330,10 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29209
29330
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
29210
29331
|
originDataSource = _useState4[0],
|
|
29211
29332
|
setOriginDataSource = _useState4[1];
|
|
29333
|
+
var _useState5 = useState([]),
|
|
29334
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29335
|
+
orders = _useState6[0],
|
|
29336
|
+
setOrders = _useState6[1];
|
|
29212
29337
|
useEffect(function () {
|
|
29213
29338
|
var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
29214
29339
|
if (disabled) return;
|
|
@@ -29268,11 +29393,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29268
29393
|
newValue[componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$4[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.valueKey] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
29269
29394
|
return skuList.includes(item[uniqueKey]);
|
|
29270
29395
|
});
|
|
29271
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29396
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(JSON.parse(JSON.stringify(newValue)));
|
|
29272
29397
|
}, [value === null || value === void 0 ? void 0 : value[componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$4[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.valueKey], isStrict, originDataSource]);
|
|
29273
29398
|
var getGoodDetails = function getGoodDetails(_ref) {
|
|
29274
|
-
var _componentMap$compTyp5, _componentMap$compTyp6,
|
|
29275
|
-
var
|
|
29399
|
+
var _componentMap$compTyp5, _componentMap$compTyp6, _componentMap$compTyp7, _componentMap$compTyp8;
|
|
29400
|
+
var _ref$isAllOrders = _ref.isAllOrders,
|
|
29401
|
+
isAllOrders = _ref$isAllOrders === void 0 ? false : _ref$isAllOrders,
|
|
29402
|
+
returnGoodsValue = _ref.returnGoodsValue,
|
|
29276
29403
|
mode = _ref.mode,
|
|
29277
29404
|
sysOrderNo = _ref.sysOrderNo;
|
|
29278
29405
|
var systemOrder = returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp5 = componentMap$4[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.systemOrder];
|
|
@@ -29280,9 +29407,17 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29280
29407
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
29281
29408
|
return order[componentMap$4[compType].oIdKey] === systemOrderNo;
|
|
29282
29409
|
});
|
|
29283
|
-
var
|
|
29410
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : order ? [order] : [];
|
|
29411
|
+
setOrders(orders);
|
|
29412
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
29413
|
+
var _order$componentMap$c;
|
|
29414
|
+
return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$4[compType].goodDetailsKey]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.length;
|
|
29415
|
+
});
|
|
29416
|
+
var goodDetails = hasGoodDetails ? componentMap$4[compType].mergeIdenticalGoods ? componentMap$4[compType].mergeIdenticalGoods((_componentMap$compTyp7 = componentMap$4[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.updateGoodsHandle(orders, {
|
|
29417
|
+
canEdit: true
|
|
29418
|
+
})) : (_componentMap$compTyp8 = componentMap$4[compType]) === null || _componentMap$compTyp8 === void 0 ? void 0 : _componentMap$compTyp8.updateGoodsHandle(orders, {
|
|
29284
29419
|
canEdit: true
|
|
29285
|
-
}) : []
|
|
29420
|
+
}) : [];
|
|
29286
29421
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
29287
29422
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
29288
29423
|
return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
|
|
@@ -29291,9 +29426,11 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29291
29426
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
29292
29427
|
return new Promise(function (resolve) {
|
|
29293
29428
|
pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
|
|
29429
|
+
var _componentMap$compTyp9;
|
|
29294
29430
|
resolve(data);
|
|
29295
29431
|
setOriginDataSource(getGoodDetails({
|
|
29296
29432
|
returnGoodsValue: data,
|
|
29433
|
+
isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp9 = componentMap$4[compType]) === null || _componentMap$compTyp9 === void 0 ? void 0 : _componentMap$compTyp9.isShowSelectTradeGoods,
|
|
29297
29434
|
mode: isStrict
|
|
29298
29435
|
}));
|
|
29299
29436
|
});
|
|
@@ -29304,7 +29441,8 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29304
29441
|
key: componentMap$4[compType].type
|
|
29305
29442
|
}, props), {}, {
|
|
29306
29443
|
validSystemOrderFn: function validSystemOrderFn() {
|
|
29307
|
-
|
|
29444
|
+
var _componentMap$compTyp10, _componentMap$compTyp11;
|
|
29445
|
+
return (_componentMap$compTyp10 = (_componentMap$compTyp11 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.call(_componentMap$compTyp11, form);
|
|
29308
29446
|
},
|
|
29309
29447
|
isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
|
|
29310
29448
|
disabled: disabled,
|
|
@@ -29313,6 +29451,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29313
29451
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
29314
29452
|
value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
|
|
29315
29453
|
otherOperations: copyGoods(),
|
|
29454
|
+
systemOrders: orders,
|
|
29316
29455
|
tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
|
|
29317
29456
|
uniqueKey: uniqueKey,
|
|
29318
29457
|
originDataSource: originDataSource,
|
|
@@ -29607,7 +29746,7 @@ var typeMap$2 = {
|
|
|
29607
29746
|
typeName: 'jstReturnType',
|
|
29608
29747
|
systemOrder: 'jstSystemOrder',
|
|
29609
29748
|
systemOrderNo: 'jstSystemOrderNo',
|
|
29610
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
29749
|
+
// systemOrderBillType: 'jstSystemOrderBillType',
|
|
29611
29750
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
29612
29751
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
29613
29752
|
alwaysShowChooseErpGoodsBtn: true,
|
|
@@ -29617,6 +29756,8 @@ var typeMap$2 = {
|
|
|
29617
29756
|
goodDetailsKey: 'items',
|
|
29618
29757
|
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
29619
29758
|
uniqueKey: 'uuid',
|
|
29759
|
+
hideSelectSysOrderId: true,
|
|
29760
|
+
isShowSelectTradeGoods: true,
|
|
29620
29761
|
eventNameMap: {
|
|
29621
29762
|
// pubsub 事件
|
|
29622
29763
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -29720,7 +29861,7 @@ var typeMap$2 = {
|
|
|
29720
29861
|
}
|
|
29721
29862
|
};
|
|
29722
29863
|
var PublicReissue = function PublicReissue(props) {
|
|
29723
|
-
var _typeMap$type, _typeMap$type2, _typeMap$
|
|
29864
|
+
var _typeMap$type, _typeMap$type2, _typeMap$type21, _typeMap$type39, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _value$typeMap$type$s8, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54, _typeMap$type55, _typeMap$type56, _typeMap$type57, _value$typeMap$type$s9, _typeMap$type58, _typeMap$type59, _typeMap$type60, _typeMap$type61;
|
|
29724
29865
|
var value = props.value,
|
|
29725
29866
|
onChange = props.onChange,
|
|
29726
29867
|
_props$reasonList = props.reasonList,
|
|
@@ -29820,23 +29961,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29820
29961
|
var newValue = _objectSpread2({}, value);
|
|
29821
29962
|
newValue[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName] = val;
|
|
29822
29963
|
if (typeName === '1') {
|
|
29823
|
-
var _typeMap$type16;
|
|
29964
|
+
var _typeMap$type16, _typeMap$type17;
|
|
29824
29965
|
newValue[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key] = getGoodDetails({
|
|
29825
|
-
mode: isStrict
|
|
29966
|
+
mode: isStrict,
|
|
29967
|
+
// 如果没有选择系统单,拿平台单下所有商品
|
|
29968
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.hideSelectSysOrderId
|
|
29826
29969
|
});
|
|
29827
29970
|
} else if (typeName === '2') {
|
|
29828
|
-
var _typeMap$
|
|
29971
|
+
var _typeMap$type18;
|
|
29829
29972
|
// 切换到非原单,清空列表
|
|
29830
|
-
newValue[(_typeMap$
|
|
29973
|
+
newValue[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key] = [];
|
|
29831
29974
|
}
|
|
29832
29975
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29833
29976
|
};
|
|
29834
29977
|
var handleModeChange = function handleModeChange(mode) {
|
|
29835
|
-
var _value$typeMap$type$t, _typeMap$
|
|
29836
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
29978
|
+
var _value$typeMap$type$t, _typeMap$type19, _typeMap$type20;
|
|
29979
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
29837
29980
|
setIsStrict(mode);
|
|
29838
29981
|
if (!isOriginalOrder) return;
|
|
29839
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
29982
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key, getGoodDetails({
|
|
29840
29983
|
mode: mode
|
|
29841
29984
|
}))));
|
|
29842
29985
|
};
|
|
@@ -29853,7 +29996,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29853
29996
|
});
|
|
29854
29997
|
}
|
|
29855
29998
|
return map;
|
|
29856
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29999
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key]]);
|
|
29857
30000
|
// 用于跟踪已经处理过的 sysItemId,避免重复处理
|
|
29858
30001
|
var processedSysItemIdsRef = useRef(new Set());
|
|
29859
30002
|
useEffect(function () {
|
|
@@ -29925,13 +30068,13 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29925
30068
|
}
|
|
29926
30069
|
}, [sysItemIdMap]);
|
|
29927
30070
|
var getGoodDetails = function getGoodDetails(_ref5) {
|
|
29928
|
-
var _typeMap$
|
|
30071
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$s6, _typeMap$type24, _typeMap$type25, _typeMap$type26, _typeMap$type27;
|
|
29929
30072
|
var mode = _ref5.mode,
|
|
29930
30073
|
sysOrderNo = _ref5.sysOrderNo,
|
|
29931
30074
|
_ref5$isAllOrders = _ref5.isAllOrders,
|
|
29932
30075
|
isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
|
|
29933
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29934
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
30076
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
30077
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
29935
30078
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
29936
30079
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
29937
30080
|
});
|
|
@@ -29951,6 +30094,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29951
30094
|
};
|
|
29952
30095
|
} else if (['JKY_REISSUE_GOODS'].includes(type)) {
|
|
29953
30096
|
orderRest = {
|
|
30097
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
29954
30098
|
canEdit: true
|
|
29955
30099
|
};
|
|
29956
30100
|
} else if (['WLN_REISSUE_GOODS'].includes(type)) {
|
|
@@ -29958,12 +30102,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29958
30102
|
canEdit: true
|
|
29959
30103
|
};
|
|
29960
30104
|
}
|
|
29961
|
-
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
30105
|
+
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
|
|
29962
30106
|
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
29963
30107
|
var _order$typeMap$type$g;
|
|
29964
30108
|
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;
|
|
29965
30109
|
});
|
|
29966
|
-
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$
|
|
30110
|
+
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.isSelectTradeGoodsMerge)) && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.updateGoodsHandle(orders, orderRest, type)) : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.updateGoodsHandle(orders, orderRest, type) : [];
|
|
29967
30111
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
29968
30112
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
29969
30113
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -29971,30 +30115,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29971
30115
|
return list;
|
|
29972
30116
|
};
|
|
29973
30117
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
29974
|
-
var _typeMap$
|
|
30118
|
+
var _typeMap$type28;
|
|
29975
30119
|
var newValue = _objectSpread2({}, value);
|
|
29976
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30120
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = val || [];
|
|
29977
30121
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29978
30122
|
};
|
|
29979
30123
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
29980
|
-
var _typeMap$
|
|
30124
|
+
var _typeMap$type29, _typeMap$type30, _value$typeMap$type$t2, _typeMap$type35, _value$typeMap$type$t3, _typeMap$type37;
|
|
29981
30125
|
var newValue = _objectSpread2({}, value);
|
|
29982
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29983
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29984
|
-
var _value$typeMap$type$s7, _typeMap$
|
|
29985
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$
|
|
30126
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)] = val;
|
|
30127
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderBillType) {
|
|
30128
|
+
var _value$typeMap$type$s7, _typeMap$type31, _typeMap$type33, _typeMap$type34;
|
|
30129
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type31 = typeMap$2[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) || [];
|
|
29986
30130
|
var targetOrder = val && orders.find(function (oItem) {
|
|
29987
|
-
var _typeMap$
|
|
29988
|
-
return oItem[(_typeMap$
|
|
30131
|
+
var _typeMap$type32;
|
|
30132
|
+
return oItem[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.oIdKey] === val;
|
|
29989
30133
|
});
|
|
29990
|
-
newValue[(_typeMap$
|
|
29991
|
-
}
|
|
29992
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
29993
|
-
var _typeMap$
|
|
29994
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29995
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
29996
|
-
var _typeMap$
|
|
29997
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30134
|
+
newValue[(_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.orderTypeKey];
|
|
30135
|
+
}
|
|
30136
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
30137
|
+
var _typeMap$type36;
|
|
30138
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key)] = [];
|
|
30139
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
30140
|
+
var _typeMap$type38;
|
|
30141
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key)] = getGoodDetails({
|
|
29998
30142
|
mode: isStrict,
|
|
29999
30143
|
sysOrderNo: val
|
|
30000
30144
|
});
|
|
@@ -30002,28 +30146,28 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30002
30146
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
30003
30147
|
};
|
|
30004
30148
|
//显示选择商品按钮
|
|
30005
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
30149
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo]);
|
|
30006
30150
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
30007
|
-
var _typeMap$
|
|
30151
|
+
var _typeMap$type40, _typeMap$type41, _typeMap$type42, _uniqBy, _typeMap$type43;
|
|
30008
30152
|
var newValue = _objectSpread2({}, value);
|
|
30009
30153
|
// 原订单商品
|
|
30010
30154
|
var originTradeGoodList = getGoodDetails({
|
|
30011
30155
|
mode: isStrict,
|
|
30012
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30156
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.isShowSelectTradeGoods
|
|
30013
30157
|
}) || [];
|
|
30014
30158
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
30015
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30016
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30017
|
-
var _typeMap$
|
|
30018
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30159
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key)]) || [];
|
|
30160
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
30161
|
+
var _typeMap$type44;
|
|
30162
|
+
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.uniqueKey) || 'uuid']);
|
|
30019
30163
|
});
|
|
30020
30164
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
30021
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30165
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.key)], value, isStrict]);
|
|
30022
30166
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
30023
30167
|
gutter: 8,
|
|
30024
30168
|
wrap: true,
|
|
30025
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30026
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
30169
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.key) || "".concat(Date.now())
|
|
30170
|
+
}, !(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.hideSelectSysOrderId) && /*#__PURE__*/React.createElement(Col, {
|
|
30027
30171
|
className: "gutter-row",
|
|
30028
30172
|
xs: {
|
|
30029
30173
|
span: 11
|
|
@@ -30038,12 +30182,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30038
30182
|
},
|
|
30039
30183
|
disabled: disabled,
|
|
30040
30184
|
allowClear: false,
|
|
30041
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30185
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.systemOrderNo)],
|
|
30042
30186
|
onChange: function onChange(val) {
|
|
30043
30187
|
return changeSystemOrderHandle(val);
|
|
30044
30188
|
},
|
|
30045
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30046
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$
|
|
30189
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
30190
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
|
|
30047
30191
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
30048
30192
|
key: item[typeMap$2[type].oIdKey],
|
|
30049
30193
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -30065,11 +30209,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30065
30209
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
30066
30210
|
allowClear: false,
|
|
30067
30211
|
options: reasonList,
|
|
30068
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30212
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.typeName)],
|
|
30069
30213
|
onChange: function onChange(val) {
|
|
30070
30214
|
return changeTypeHandle(val);
|
|
30071
30215
|
}
|
|
30072
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30216
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
|
|
30073
30217
|
className: "gutter-row",
|
|
30074
30218
|
xs: {
|
|
30075
30219
|
span: 11
|
|
@@ -30078,7 +30222,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30078
30222
|
span: 6
|
|
30079
30223
|
}
|
|
30080
30224
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
30081
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30225
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrderBillType)],
|
|
30082
30226
|
disabled: disabled,
|
|
30083
30227
|
readOnly: true
|
|
30084
30228
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -30089,25 +30233,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30089
30233
|
canUpdateNumber: showChangeBtn,
|
|
30090
30234
|
hasSelectedSystemOrder: showChangeBtn,
|
|
30091
30235
|
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
30092
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30093
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30236
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.alwaysShowChooseErpGoodsBtn,
|
|
30237
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.showErpGoodsBtn,
|
|
30094
30238
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
30095
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30239
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.key)],
|
|
30096
30240
|
onChange: function onChange(val) {
|
|
30097
30241
|
return changeGoodHandle(val);
|
|
30098
30242
|
},
|
|
30099
30243
|
onModeChange: handleModeChange,
|
|
30100
30244
|
showModeBtn: showModeBtn,
|
|
30101
30245
|
isStrict: isStrict,
|
|
30102
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30103
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
30104
|
-
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30246
|
+
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.isShowSelectTradeGoods,
|
|
30247
|
+
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type58 = typeMap$2[type]) === null || _typeMap$type58 === void 0 ? void 0 : _typeMap$type58.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
|
|
30248
|
+
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type59 = typeMap$2[type]) === null || _typeMap$type59 === void 0 ? void 0 : _typeMap$type59.systemOrderNo)]] : [],
|
|
30105
30249
|
tradeGoods: {
|
|
30106
30250
|
originDataSource: getGoodDetails({
|
|
30107
30251
|
mode: isStrict,
|
|
30108
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30252
|
+
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type60 = typeMap$2[type]) === null || _typeMap$type60 === void 0 ? void 0 : _typeMap$type60.isShowSelectTradeGoods
|
|
30109
30253
|
}),
|
|
30110
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30254
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type61 = typeMap$2[type]) === null || _typeMap$type61 === void 0 ? void 0 : _typeMap$type61.uniqueKey) || 'uuid',
|
|
30111
30255
|
selectedGoodsChange: selectedGoodsChange
|
|
30112
30256
|
}
|
|
30113
30257
|
})));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.4",
|
|
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.10.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.4",
|
|
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": "545af3d105d59a2b0b8f92cb0dd8804f4e5631f6"
|
|
70
70
|
}
|