@kmkf-fe-packages/basic-components 2.9.0 → 2.9.1-beta.0
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
CHANGED
|
@@ -9349,7 +9349,8 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
|
|
|
9349
9349
|
},
|
|
9350
9350
|
jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
|
|
9351
9351
|
jstReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnGoods")), []),
|
|
9352
|
-
jstSystemOrderBillType:
|
|
9352
|
+
// jstSystemOrderBillType:
|
|
9353
|
+
// getValue(`${nex.uniqueKey}_jstSystemOrderBillType`) || '',
|
|
9353
9354
|
shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
|
|
9354
9355
|
jstSystemOrderNo: getValue("".concat(nex.uniqueKey, "_jstSystemOrderNo"))
|
|
9355
9356
|
});
|
|
@@ -11656,7 +11657,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
11656
11657
|
key: item.value
|
|
11657
11658
|
}, item.label);
|
|
11658
11659
|
})), /*#__PURE__*/React.createElement(Search, {
|
|
11659
|
-
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '
|
|
11660
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝标题' : '商品ID' : '宝贝标题',
|
|
11660
11661
|
// enterButton="搜索"
|
|
11661
11662
|
className: "search",
|
|
11662
11663
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -13310,13 +13311,26 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13310
13311
|
var changeHandle = function changeHandle(val, type) {
|
|
13311
13312
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
13312
13313
|
if (type === 'interceptCompany') {
|
|
13314
|
+
var _props$interceptTypeD, _defaultInterceptType;
|
|
13313
13315
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
13314
13316
|
return item.value === val;
|
|
13315
13317
|
});
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13318
|
+
// 优先使用配置的默认值
|
|
13319
|
+
var defaultInterceptType;
|
|
13320
|
+
var configuredDefault = (_props$interceptTypeD = props.interceptTypeDefaults) === null || _props$interceptTypeD === void 0 ? void 0 : _props$interceptTypeD[val];
|
|
13321
|
+
if (configuredDefault) {
|
|
13322
|
+
// 使用配置的默认值
|
|
13323
|
+
defaultInterceptType = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
13324
|
+
return item.value === configuredDefault;
|
|
13325
|
+
});
|
|
13326
|
+
}
|
|
13327
|
+
// 如果没有配置默认值,使用原有的 isDefault 逻辑
|
|
13328
|
+
if (!defaultInterceptType) {
|
|
13329
|
+
defaultInterceptType = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
13330
|
+
var _item$config4;
|
|
13331
|
+
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
13332
|
+
});
|
|
13333
|
+
}
|
|
13320
13334
|
// const demoList = [
|
|
13321
13335
|
// {
|
|
13322
13336
|
// city: 330100,
|
|
@@ -13340,7 +13354,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13340
13354
|
});
|
|
13341
13355
|
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
13342
13356
|
interceptCompany: val,
|
|
13343
|
-
interceptType:
|
|
13357
|
+
interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
|
|
13344
13358
|
interceptSenderMobile: undefined,
|
|
13345
13359
|
interceptAddress: [],
|
|
13346
13360
|
interceptDetail: undefined,
|
|
@@ -13637,7 +13651,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
13637
13651
|
disabled = props.disabled,
|
|
13638
13652
|
onChange = props.onChange,
|
|
13639
13653
|
isEditing = props.isEditing,
|
|
13640
|
-
effects = props.effects
|
|
13654
|
+
effects = props.effects,
|
|
13655
|
+
interceptTypeDefaults = props.interceptTypeDefaults;
|
|
13641
13656
|
var _useState = useState(0),
|
|
13642
13657
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13643
13658
|
changeIndex = _useState2[0],
|
|
@@ -13683,7 +13698,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
13683
13698
|
onJumpPage: effects === null || effects === void 0 ? void 0 : effects.onJumpPage,
|
|
13684
13699
|
onChange: function onChange(val) {
|
|
13685
13700
|
return handleChange(val, index);
|
|
13686
|
-
}
|
|
13701
|
+
},
|
|
13702
|
+
interceptTypeDefaults: interceptTypeDefaults
|
|
13687
13703
|
}) : null;
|
|
13688
13704
|
}) : null);
|
|
13689
13705
|
};
|
|
@@ -16278,30 +16294,33 @@ var GoodList = function GoodList(props, ref) {
|
|
|
16278
16294
|
selectedRowKeys: selectIds,
|
|
16279
16295
|
fixed: true,
|
|
16280
16296
|
onSelect: function onSelect(record, selected) {
|
|
16297
|
+
var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
|
|
16281
16298
|
if (selected) {
|
|
16282
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [
|
|
16299
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [uniqueKey]));
|
|
16283
16300
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
16284
16301
|
} else {
|
|
16285
16302
|
setSelectIds(selectIds.filter(function (t) {
|
|
16286
|
-
return t !==
|
|
16303
|
+
return t !== uniqueKey;
|
|
16287
16304
|
}));
|
|
16288
16305
|
setSelect(selectList.filter(function (t) {
|
|
16289
|
-
return t.specNo !==
|
|
16306
|
+
return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
|
|
16290
16307
|
}));
|
|
16291
16308
|
}
|
|
16292
16309
|
},
|
|
16293
16310
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
16294
16311
|
if (selected) {
|
|
16295
|
-
|
|
16296
|
-
return t.specNo;
|
|
16297
|
-
})
|
|
16312
|
+
var changeKeys = changeRows.map(function (t) {
|
|
16313
|
+
return "".concat(t.goodNo, "-").concat(t.specNo);
|
|
16314
|
+
});
|
|
16315
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeKeys)));
|
|
16298
16316
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
16299
16317
|
} else {
|
|
16300
|
-
|
|
16301
|
-
return t.specNo;
|
|
16302
|
-
})
|
|
16318
|
+
var _changeKeys = changeRows.map(function (t) {
|
|
16319
|
+
return "".concat(t.goodNo, "-").concat(t.specNo);
|
|
16320
|
+
});
|
|
16321
|
+
setSelectIds(difference(selectIds, _changeKeys));
|
|
16303
16322
|
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
16304
|
-
return arrVal.specNo !== othVal.specNo;
|
|
16323
|
+
return "".concat(arrVal.goodNo, "-").concat(arrVal.specNo) !== "".concat(othVal.goodNo, "-").concat(othVal.specNo);
|
|
16305
16324
|
});
|
|
16306
16325
|
setSelect(list);
|
|
16307
16326
|
}
|
|
@@ -16309,11 +16328,12 @@ var GoodList = function GoodList(props, ref) {
|
|
|
16309
16328
|
};
|
|
16310
16329
|
var showTable = function showTable() {
|
|
16311
16330
|
var handleDelete = function handleDelete(record) {
|
|
16331
|
+
var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
|
|
16312
16332
|
setSelectIds(selectIds.filter(function (t) {
|
|
16313
|
-
return t !==
|
|
16333
|
+
return t !== uniqueKey;
|
|
16314
16334
|
}));
|
|
16315
16335
|
setSelect(selectList.filter(function (t) {
|
|
16316
|
-
return t.specNo !==
|
|
16336
|
+
return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
|
|
16317
16337
|
}));
|
|
16318
16338
|
};
|
|
16319
16339
|
var showColumns = [{
|
|
@@ -16337,7 +16357,9 @@ var GoodList = function GoodList(props, ref) {
|
|
|
16337
16357
|
}
|
|
16338
16358
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
16339
16359
|
columns: showColumns,
|
|
16340
|
-
rowKey:
|
|
16360
|
+
rowKey: function rowKey(record) {
|
|
16361
|
+
return "".concat(record.goodNo, "-").concat(record.specNo);
|
|
16362
|
+
},
|
|
16341
16363
|
dataSource: selectList,
|
|
16342
16364
|
scroll: {
|
|
16343
16365
|
x: '100%',
|
|
@@ -16367,7 +16389,9 @@ var GoodList = function GoodList(props, ref) {
|
|
|
16367
16389
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
|
|
16368
16390
|
className: "GoodModalColumns",
|
|
16369
16391
|
rowSelection: rowSelection,
|
|
16370
|
-
rowKey:
|
|
16392
|
+
rowKey: function rowKey(record) {
|
|
16393
|
+
return "".concat(record.goodNo, "-").concat(record.specNo);
|
|
16394
|
+
},
|
|
16371
16395
|
columns: columns,
|
|
16372
16396
|
scroll: {
|
|
16373
16397
|
x: '100%',
|
|
@@ -22190,7 +22214,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22190
22214
|
min: 0,
|
|
22191
22215
|
precision: 2,
|
|
22192
22216
|
onChange: function onChange(num) {
|
|
22193
|
-
|
|
22217
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
22218
|
+
if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
|
|
22194
22219
|
}
|
|
22195
22220
|
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
|
|
22196
22221
|
}
|
|
@@ -22220,16 +22245,39 @@ var getColumns$5 = function getColumns() {
|
|
|
22220
22245
|
min: 1,
|
|
22221
22246
|
precision: 0,
|
|
22222
22247
|
onChange: function onChange(num) {
|
|
22223
|
-
|
|
22248
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
22249
|
+
if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
|
|
22224
22250
|
}
|
|
22225
22251
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22226
22252
|
}
|
|
22227
22253
|
}, {
|
|
22228
22254
|
dataIndex: 'saleAmount',
|
|
22229
22255
|
title: '总金额',
|
|
22230
|
-
|
|
22231
|
-
var
|
|
22232
|
-
|
|
22256
|
+
validator: function validator(_rule, value) {
|
|
22257
|
+
var goodsName = '';
|
|
22258
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
22259
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
|
|
22260
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22261
|
+
if (res) {
|
|
22262
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22263
|
+
}
|
|
22264
|
+
return res;
|
|
22265
|
+
})) {
|
|
22266
|
+
return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22267
|
+
}
|
|
22268
|
+
},
|
|
22269
|
+
render: function render(val, record, index) {
|
|
22270
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22271
|
+
style: {
|
|
22272
|
+
width: 130
|
|
22273
|
+
},
|
|
22274
|
+
value: val,
|
|
22275
|
+
min: 0,
|
|
22276
|
+
precision: 2,
|
|
22277
|
+
onChange: function onChange(num) {
|
|
22278
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
|
|
22279
|
+
}
|
|
22280
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22233
22281
|
}
|
|
22234
22282
|
}, {
|
|
22235
22283
|
dataIndex: 'batchId',
|
|
@@ -22310,6 +22358,19 @@ var getColumns$5 = function getColumns() {
|
|
|
22310
22358
|
dataIndex: 'salePrice',
|
|
22311
22359
|
title: '单价',
|
|
22312
22360
|
width: 120,
|
|
22361
|
+
validator: function validator(_rule, value) {
|
|
22362
|
+
var goodsName = '';
|
|
22363
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22364
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
22365
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22366
|
+
if (res) {
|
|
22367
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22368
|
+
}
|
|
22369
|
+
return res;
|
|
22370
|
+
})) {
|
|
22371
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22372
|
+
}
|
|
22373
|
+
},
|
|
22313
22374
|
render: function render(val, record, index) {
|
|
22314
22375
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22315
22376
|
style: {
|
|
@@ -22319,7 +22380,8 @@ var getColumns$5 = function getColumns() {
|
|
|
22319
22380
|
min: 0,
|
|
22320
22381
|
precision: 2,
|
|
22321
22382
|
onChange: function onChange(num) {
|
|
22322
|
-
|
|
22383
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
22384
|
+
if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
|
|
22323
22385
|
}
|
|
22324
22386
|
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
|
|
22325
22387
|
}
|
|
@@ -22327,6 +22389,19 @@ var getColumns$5 = function getColumns() {
|
|
|
22327
22389
|
dataIndex: 'qty',
|
|
22328
22390
|
title: '数量',
|
|
22329
22391
|
width: 100,
|
|
22392
|
+
validator: function validator(_rule, value) {
|
|
22393
|
+
var goodsName = '';
|
|
22394
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22395
|
+
var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
22396
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
22397
|
+
if (res) {
|
|
22398
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22399
|
+
}
|
|
22400
|
+
return res;
|
|
22401
|
+
})) {
|
|
22402
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
22403
|
+
}
|
|
22404
|
+
},
|
|
22330
22405
|
render: function render(val, record, index) {
|
|
22331
22406
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22332
22407
|
style: {
|
|
@@ -22336,16 +22411,39 @@ var getColumns$5 = function getColumns() {
|
|
|
22336
22411
|
min: 1,
|
|
22337
22412
|
precision: 0,
|
|
22338
22413
|
onChange: function onChange(num) {
|
|
22339
|
-
|
|
22414
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
22415
|
+
if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
|
|
22340
22416
|
}
|
|
22341
22417
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
22342
22418
|
}
|
|
22343
22419
|
}, {
|
|
22344
22420
|
dataIndex: 'saleAmount',
|
|
22345
22421
|
title: '总金额',
|
|
22346
|
-
|
|
22347
|
-
var
|
|
22348
|
-
|
|
22422
|
+
validator: function validator(_rule, value) {
|
|
22423
|
+
var goodsName = '';
|
|
22424
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
22425
|
+
var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
|
|
22426
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
22427
|
+
if (res) {
|
|
22428
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
22429
|
+
}
|
|
22430
|
+
return res;
|
|
22431
|
+
})) {
|
|
22432
|
+
return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
22433
|
+
}
|
|
22434
|
+
},
|
|
22435
|
+
render: function render(val, record, index) {
|
|
22436
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
22437
|
+
style: {
|
|
22438
|
+
width: 130
|
|
22439
|
+
},
|
|
22440
|
+
value: val,
|
|
22441
|
+
min: 0,
|
|
22442
|
+
precision: 2,
|
|
22443
|
+
onChange: function onChange(num) {
|
|
22444
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
|
|
22445
|
+
}
|
|
22446
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
22349
22447
|
}
|
|
22350
22448
|
}, {
|
|
22351
22449
|
dataIndex: 'isGift',
|
|
@@ -24955,6 +25053,8 @@ var systemOrderNoMap = {
|
|
|
24955
25053
|
KM_RETURN_GOODS: 'sid',
|
|
24956
25054
|
KM_EXCHANGE_GOODS: 'sid',
|
|
24957
25055
|
JST_REISSUE_GOODS: 'oId',
|
|
25056
|
+
JST_RETURN_GOODS: 'oId',
|
|
25057
|
+
JST_EXCHANGE_GOODS: 'oId',
|
|
24958
25058
|
GY_REISSUE_GOODS: 'code',
|
|
24959
25059
|
BS_E3_REISSUE_GOODS: 'orderSn',
|
|
24960
25060
|
WDT_REISSUE_GOODS: 'tradeNo'
|
|
@@ -25266,10 +25366,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25266
25366
|
var canDelete = ['JST_AFTERSALE_GOODS'].includes(type);
|
|
25267
25367
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
25268
25368
|
// 监听聚水潭退货商品
|
|
25269
|
-
|
|
25270
|
-
|
|
25369
|
+
// const jstReturnGoods = Form?.useWatch('3979edfd6d', form);
|
|
25370
|
+
// const isShowSelectTradeGoods =
|
|
25371
|
+
// type !== 'JST_EXCHANGE_GOODS' || jstReturnGoods?.jstSystemOrderNo;
|
|
25271
25372
|
// 判断是否为是否展示系统单筛选项
|
|
25272
|
-
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;
|
|
25373
|
+
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;
|
|
25273
25374
|
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;
|
|
25274
25375
|
var refModal = useRef();
|
|
25275
25376
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -25562,7 +25663,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
25562
25663
|
}, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
|
|
25563
25664
|
checked: isStrict,
|
|
25564
25665
|
onChange: handleCheckboxChange
|
|
25565
|
-
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) &&
|
|
25666
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
|
|
25566
25667
|
isReloadSelectTable: isReloadSelectTable,
|
|
25567
25668
|
validSystemOrderFn: validSystemOrderFn,
|
|
25568
25669
|
validSystemOrder: validSystemOrder,
|
|
@@ -29111,10 +29212,11 @@ var componentMap$4 = {
|
|
|
29111
29212
|
systemOrderNo: 'jstSystemOrderNo',
|
|
29112
29213
|
oIdKey: 'oId',
|
|
29113
29214
|
goodDetailsKey: 'items',
|
|
29114
|
-
skuIdKey: 'skuId',
|
|
29115
29215
|
outerOiIdKey: '',
|
|
29116
29216
|
name: '聚水潭',
|
|
29117
29217
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
29218
|
+
isShowSelectTradeGoods: true,
|
|
29219
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
29118
29220
|
eventNameMap: {
|
|
29119
29221
|
// pubsub 事件
|
|
29120
29222
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -29132,7 +29234,7 @@ var componentMap$4 = {
|
|
|
29132
29234
|
systemOrderNo: 'kmSystemOrderNo',
|
|
29133
29235
|
oIdKey: 'billNo',
|
|
29134
29236
|
goodDetailsKey: 'subOrders',
|
|
29135
|
-
|
|
29237
|
+
uniqueKey: 'skuId',
|
|
29136
29238
|
outerOiIdKey: '',
|
|
29137
29239
|
name: '快麦',
|
|
29138
29240
|
updateGoodsHandle: updateKmGoodsHandle,
|
|
@@ -29180,7 +29282,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29180
29282
|
disabled = props.disabled,
|
|
29181
29283
|
compType = props.type,
|
|
29182
29284
|
form = props.form;
|
|
29183
|
-
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.
|
|
29285
|
+
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';
|
|
29184
29286
|
var valueRef = useRef({});
|
|
29185
29287
|
// PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
|
|
29186
29288
|
var _useState = useState(false),
|
|
@@ -29191,6 +29293,10 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29191
29293
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
29192
29294
|
originDataSource = _useState4[0],
|
|
29193
29295
|
setOriginDataSource = _useState4[1];
|
|
29296
|
+
var _useState5 = useState([]),
|
|
29297
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29298
|
+
orders = _useState6[0],
|
|
29299
|
+
setOrders = _useState6[1];
|
|
29194
29300
|
useEffect(function () {
|
|
29195
29301
|
var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
29196
29302
|
if (disabled) return;
|
|
@@ -29250,11 +29356,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29250
29356
|
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) {
|
|
29251
29357
|
return skuList.includes(item[uniqueKey]);
|
|
29252
29358
|
});
|
|
29253
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29359
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(JSON.parse(JSON.stringify(newValue)));
|
|
29254
29360
|
}, [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]);
|
|
29255
29361
|
var getGoodDetails = function getGoodDetails(_ref) {
|
|
29256
|
-
var _componentMap$compTyp5, _componentMap$compTyp6,
|
|
29257
|
-
var
|
|
29362
|
+
var _componentMap$compTyp5, _componentMap$compTyp6, _componentMap$compTyp7, _componentMap$compTyp8;
|
|
29363
|
+
var _ref$isAllOrders = _ref.isAllOrders,
|
|
29364
|
+
isAllOrders = _ref$isAllOrders === void 0 ? false : _ref$isAllOrders,
|
|
29365
|
+
returnGoodsValue = _ref.returnGoodsValue,
|
|
29258
29366
|
mode = _ref.mode,
|
|
29259
29367
|
sysOrderNo = _ref.sysOrderNo;
|
|
29260
29368
|
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];
|
|
@@ -29262,9 +29370,17 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29262
29370
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
29263
29371
|
return order[componentMap$4[compType].oIdKey] === systemOrderNo;
|
|
29264
29372
|
});
|
|
29265
|
-
var
|
|
29373
|
+
var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : order ? [order] : [];
|
|
29374
|
+
setOrders(orders);
|
|
29375
|
+
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
29376
|
+
var _order$componentMap$c;
|
|
29377
|
+
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;
|
|
29378
|
+
});
|
|
29379
|
+
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, {
|
|
29266
29380
|
canEdit: true
|
|
29267
|
-
}) : [])
|
|
29381
|
+
})) : (_componentMap$compTyp8 = componentMap$4[compType]) === null || _componentMap$compTyp8 === void 0 ? void 0 : _componentMap$compTyp8.updateGoodsHandle(orders, {
|
|
29382
|
+
canEdit: true
|
|
29383
|
+
}) : [];
|
|
29268
29384
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
29269
29385
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
29270
29386
|
return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
|
|
@@ -29273,9 +29389,11 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29273
29389
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
29274
29390
|
return new Promise(function (resolve) {
|
|
29275
29391
|
pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
|
|
29392
|
+
var _componentMap$compTyp9;
|
|
29276
29393
|
resolve(data);
|
|
29277
29394
|
setOriginDataSource(getGoodDetails({
|
|
29278
29395
|
returnGoodsValue: data,
|
|
29396
|
+
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,
|
|
29279
29397
|
mode: isStrict
|
|
29280
29398
|
}));
|
|
29281
29399
|
});
|
|
@@ -29286,7 +29404,8 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29286
29404
|
key: componentMap$4[compType].type
|
|
29287
29405
|
}, props), {}, {
|
|
29288
29406
|
validSystemOrderFn: function validSystemOrderFn() {
|
|
29289
|
-
|
|
29407
|
+
var _componentMap$compTyp10, _componentMap$compTyp11;
|
|
29408
|
+
return (_componentMap$compTyp10 = (_componentMap$compTyp11 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.call(_componentMap$compTyp11, form);
|
|
29290
29409
|
},
|
|
29291
29410
|
isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
|
|
29292
29411
|
disabled: disabled,
|
|
@@ -29295,6 +29414,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
29295
29414
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
29296
29415
|
value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
|
|
29297
29416
|
otherOperations: copyGoods(),
|
|
29417
|
+
systemOrders: orders,
|
|
29298
29418
|
tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
|
|
29299
29419
|
uniqueKey: uniqueKey,
|
|
29300
29420
|
originDataSource: originDataSource,
|
|
@@ -29589,7 +29709,7 @@ var typeMap$2 = {
|
|
|
29589
29709
|
typeName: 'jstReturnType',
|
|
29590
29710
|
systemOrder: 'jstSystemOrder',
|
|
29591
29711
|
systemOrderNo: 'jstSystemOrderNo',
|
|
29592
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
29712
|
+
// systemOrderBillType: 'jstSystemOrderBillType',
|
|
29593
29713
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
29594
29714
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
29595
29715
|
alwaysShowChooseErpGoodsBtn: true,
|
|
@@ -29599,6 +29719,8 @@ var typeMap$2 = {
|
|
|
29599
29719
|
goodDetailsKey: 'items',
|
|
29600
29720
|
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
29601
29721
|
uniqueKey: 'uuid',
|
|
29722
|
+
hideSelectSysOrderId: true,
|
|
29723
|
+
isShowSelectTradeGoods: true,
|
|
29602
29724
|
eventNameMap: {
|
|
29603
29725
|
// pubsub 事件
|
|
29604
29726
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -29702,7 +29824,7 @@ var typeMap$2 = {
|
|
|
29702
29824
|
}
|
|
29703
29825
|
};
|
|
29704
29826
|
var PublicReissue = function PublicReissue(props) {
|
|
29705
|
-
var _typeMap$type, _typeMap$type2, _typeMap$
|
|
29827
|
+
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;
|
|
29706
29828
|
var value = props.value,
|
|
29707
29829
|
onChange = props.onChange,
|
|
29708
29830
|
_props$reasonList = props.reasonList,
|
|
@@ -29802,23 +29924,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29802
29924
|
var newValue = _objectSpread2({}, value);
|
|
29803
29925
|
newValue[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName] = val;
|
|
29804
29926
|
if (typeName === '1') {
|
|
29805
|
-
var _typeMap$type16;
|
|
29927
|
+
var _typeMap$type16, _typeMap$type17;
|
|
29806
29928
|
newValue[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key] = getGoodDetails({
|
|
29807
|
-
mode: isStrict
|
|
29929
|
+
mode: isStrict,
|
|
29930
|
+
// 如果没有选择系统单,拿平台单下所有商品
|
|
29931
|
+
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
|
|
29808
29932
|
});
|
|
29809
29933
|
} else if (typeName === '2') {
|
|
29810
|
-
var _typeMap$
|
|
29934
|
+
var _typeMap$type18;
|
|
29811
29935
|
// 切换到非原单,清空列表
|
|
29812
|
-
newValue[(_typeMap$
|
|
29936
|
+
newValue[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key] = [];
|
|
29813
29937
|
}
|
|
29814
29938
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29815
29939
|
};
|
|
29816
29940
|
var handleModeChange = function handleModeChange(mode) {
|
|
29817
|
-
var _value$typeMap$type$t, _typeMap$
|
|
29818
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
29941
|
+
var _value$typeMap$type$t, _typeMap$type19, _typeMap$type20;
|
|
29942
|
+
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';
|
|
29819
29943
|
setIsStrict(mode);
|
|
29820
29944
|
if (!isOriginalOrder) return;
|
|
29821
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
29945
|
+
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({
|
|
29822
29946
|
mode: mode
|
|
29823
29947
|
}))));
|
|
29824
29948
|
};
|
|
@@ -29835,7 +29959,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29835
29959
|
});
|
|
29836
29960
|
}
|
|
29837
29961
|
return map;
|
|
29838
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29962
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key]]);
|
|
29839
29963
|
// 用于跟踪已经处理过的 sysItemId,避免重复处理
|
|
29840
29964
|
var processedSysItemIdsRef = useRef(new Set());
|
|
29841
29965
|
useEffect(function () {
|
|
@@ -29907,13 +30031,13 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29907
30031
|
}
|
|
29908
30032
|
}, [sysItemIdMap]);
|
|
29909
30033
|
var getGoodDetails = function getGoodDetails(_ref5) {
|
|
29910
|
-
var _typeMap$
|
|
30034
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$s6, _typeMap$type24, _typeMap$type25, _typeMap$type26, _typeMap$type27;
|
|
29911
30035
|
var mode = _ref5.mode,
|
|
29912
30036
|
sysOrderNo = _ref5.sysOrderNo,
|
|
29913
30037
|
_ref5$isAllOrders = _ref5.isAllOrders,
|
|
29914
30038
|
isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
|
|
29915
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
29916
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
30039
|
+
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];
|
|
30040
|
+
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];
|
|
29917
30041
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
29918
30042
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
29919
30043
|
});
|
|
@@ -29940,12 +30064,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29940
30064
|
canEdit: true
|
|
29941
30065
|
};
|
|
29942
30066
|
}
|
|
29943
|
-
var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
30067
|
+
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] : [];
|
|
29944
30068
|
var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
|
|
29945
30069
|
var _order$typeMap$type$g;
|
|
29946
30070
|
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;
|
|
29947
30071
|
});
|
|
29948
|
-
var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$
|
|
30072
|
+
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) : [];
|
|
29949
30073
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
29950
30074
|
var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
|
|
29951
30075
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
@@ -29953,30 +30077,30 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29953
30077
|
return list;
|
|
29954
30078
|
};
|
|
29955
30079
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
29956
|
-
var _typeMap$
|
|
30080
|
+
var _typeMap$type28;
|
|
29957
30081
|
var newValue = _objectSpread2({}, value);
|
|
29958
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30082
|
+
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 || [];
|
|
29959
30083
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
29960
30084
|
};
|
|
29961
30085
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
29962
|
-
var _typeMap$
|
|
30086
|
+
var _typeMap$type29, _typeMap$type30, _value$typeMap$type$t2, _typeMap$type35, _value$typeMap$type$t3, _typeMap$type37;
|
|
29963
30087
|
var newValue = _objectSpread2({}, value);
|
|
29964
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29965
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29966
|
-
var _value$typeMap$type$s7, _typeMap$
|
|
29967
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$
|
|
30088
|
+
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;
|
|
30089
|
+
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) {
|
|
30090
|
+
var _value$typeMap$type$s7, _typeMap$type31, _typeMap$type33, _typeMap$type34;
|
|
30091
|
+
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) || [];
|
|
29968
30092
|
var targetOrder = val && orders.find(function (oItem) {
|
|
29969
|
-
var _typeMap$
|
|
29970
|
-
return oItem[(_typeMap$
|
|
30093
|
+
var _typeMap$type32;
|
|
30094
|
+
return oItem[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.oIdKey] === val;
|
|
29971
30095
|
});
|
|
29972
|
-
newValue[(_typeMap$
|
|
29973
|
-
}
|
|
29974
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
29975
|
-
var _typeMap$
|
|
29976
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29977
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
29978
|
-
var _typeMap$
|
|
29979
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30096
|
+
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];
|
|
30097
|
+
}
|
|
30098
|
+
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])) {
|
|
30099
|
+
var _typeMap$type36;
|
|
30100
|
+
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)] = [];
|
|
30101
|
+
} 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])) {
|
|
30102
|
+
var _typeMap$type38;
|
|
30103
|
+
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({
|
|
29980
30104
|
mode: isStrict,
|
|
29981
30105
|
sysOrderNo: val
|
|
29982
30106
|
});
|
|
@@ -29984,28 +30108,28 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
29984
30108
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
29985
30109
|
};
|
|
29986
30110
|
//显示选择商品按钮
|
|
29987
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
30111
|
+
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]);
|
|
29988
30112
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
29989
|
-
var _typeMap$
|
|
30113
|
+
var _typeMap$type40, _typeMap$type41, _typeMap$type42, _uniqBy, _typeMap$type43;
|
|
29990
30114
|
var newValue = _objectSpread2({}, value);
|
|
29991
30115
|
// 原订单商品
|
|
29992
30116
|
var originTradeGoodList = getGoodDetails({
|
|
29993
30117
|
mode: isStrict,
|
|
29994
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30118
|
+
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
|
|
29995
30119
|
}) || [];
|
|
29996
30120
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
29997
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29998
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
29999
|
-
var _typeMap$
|
|
30000
|
-
return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30121
|
+
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)]) || [];
|
|
30122
|
+
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) {
|
|
30123
|
+
var _typeMap$type44;
|
|
30124
|
+
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']);
|
|
30001
30125
|
});
|
|
30002
30126
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
30003
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30127
|
+
}, [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]);
|
|
30004
30128
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
30005
30129
|
gutter: 8,
|
|
30006
30130
|
wrap: true,
|
|
30007
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30008
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
30131
|
+
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())
|
|
30132
|
+
}, !(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, {
|
|
30009
30133
|
className: "gutter-row",
|
|
30010
30134
|
xs: {
|
|
30011
30135
|
span: 11
|
|
@@ -30020,12 +30144,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30020
30144
|
},
|
|
30021
30145
|
disabled: disabled,
|
|
30022
30146
|
allowClear: false,
|
|
30023
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30147
|
+
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)],
|
|
30024
30148
|
onChange: function onChange(val) {
|
|
30025
30149
|
return changeSystemOrderHandle(val);
|
|
30026
30150
|
},
|
|
30027
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30028
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$
|
|
30151
|
+
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")
|
|
30152
|
+
}, ((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) {
|
|
30029
30153
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
30030
30154
|
key: item[typeMap$2[type].oIdKey],
|
|
30031
30155
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -30047,11 +30171,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30047
30171
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
30048
30172
|
allowClear: false,
|
|
30049
30173
|
options: reasonList,
|
|
30050
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30174
|
+
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)],
|
|
30051
30175
|
onChange: function onChange(val) {
|
|
30052
30176
|
return changeTypeHandle(val);
|
|
30053
30177
|
}
|
|
30054
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30178
|
+
})), (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, {
|
|
30055
30179
|
className: "gutter-row",
|
|
30056
30180
|
xs: {
|
|
30057
30181
|
span: 11
|
|
@@ -30060,7 +30184,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30060
30184
|
span: 6
|
|
30061
30185
|
}
|
|
30062
30186
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
30063
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30187
|
+
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)],
|
|
30064
30188
|
disabled: disabled,
|
|
30065
30189
|
readOnly: true
|
|
30066
30190
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -30071,25 +30195,25 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
30071
30195
|
canUpdateNumber: showChangeBtn,
|
|
30072
30196
|
hasSelectedSystemOrder: showChangeBtn,
|
|
30073
30197
|
// showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
|
|
30074
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30075
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30198
|
+
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,
|
|
30199
|
+
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,
|
|
30076
30200
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
30077
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30201
|
+
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)],
|
|
30078
30202
|
onChange: function onChange(val) {
|
|
30079
30203
|
return changeGoodHandle(val);
|
|
30080
30204
|
},
|
|
30081
30205
|
onModeChange: handleModeChange,
|
|
30082
30206
|
showModeBtn: showModeBtn,
|
|
30083
30207
|
isStrict: isStrict,
|
|
30084
|
-
isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30085
|
-
systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$
|
|
30086
|
-
selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30208
|
+
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,
|
|
30209
|
+
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,
|
|
30210
|
+
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)]] : [],
|
|
30087
30211
|
tradeGoods: {
|
|
30088
30212
|
originDataSource: getGoodDetails({
|
|
30089
30213
|
mode: isStrict,
|
|
30090
|
-
isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30214
|
+
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
|
|
30091
30215
|
}),
|
|
30092
|
-
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
30216
|
+
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',
|
|
30093
30217
|
selectedGoodsChange: selectedGoodsChange
|
|
30094
30218
|
}
|
|
30095
30219
|
})));
|
|
@@ -30457,7 +30581,7 @@ var GoodsModal$5 = function GoodsModal(props) {
|
|
|
30457
30581
|
key: item.value
|
|
30458
30582
|
}, item.label);
|
|
30459
30583
|
})), /*#__PURE__*/React.createElement(Search$1, {
|
|
30460
|
-
placeholder: "\u5B9D\u8D1D\
|
|
30584
|
+
placeholder: "\u5B9D\u8D1D\u6807\u9898",
|
|
30461
30585
|
allowClear: true,
|
|
30462
30586
|
enterButton: "\u641C\u7D22",
|
|
30463
30587
|
style: {
|
|
@@ -32,6 +32,7 @@ interface LogisticsInterceptionProps {
|
|
|
32
32
|
showReason?: boolean;
|
|
33
33
|
onJumpPage?: (val: any) => void;
|
|
34
34
|
preCreateAndNotModified?: boolean;
|
|
35
|
+
interceptTypeDefaults?: Record<string, string>;
|
|
35
36
|
}
|
|
36
37
|
declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => React.JSX.Element;
|
|
37
38
|
export default LogisticsInterception;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.9.0",
|
|
3
|
+
"version": "2.9.1-beta.0",
|
|
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.9.0",
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.9.1-beta.0",
|
|
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": "4b97a6cd35615a0cd1a8a51fe41b4a213d42fbcd"
|
|
70
70
|
}
|