@kmkf-fe-packages/basic-components 2.0.12-beta.3 → 2.0.14
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/README.md +1 -1
- package/dist/index.esm.js +171 -1172
- package/dist/index.js +169 -1171
- package/dist/src/bs/SystemOrder/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/package.json +4 -4
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +0 -25
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +0 -13
- package/dist/src/common/Reissue/index.d.ts +0 -3
- package/dist/src/constants/jst.d.ts +0 -3
- package/dist/src/jst/common/index.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -11020,7 +11020,7 @@ var typeInitValueMap = {
|
|
|
11020
11020
|
}]
|
|
11021
11021
|
};
|
|
11022
11022
|
var jstGoods = function jstGoods(props) {
|
|
11023
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8
|
|
11023
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
11024
11024
|
var _props$value = props.value,
|
|
11025
11025
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11026
11026
|
onChange = props.onChange,
|
|
@@ -11037,8 +11037,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11037
11037
|
changeIndex = _useState2[0],
|
|
11038
11038
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11039
11039
|
var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
|
|
11040
|
-
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'
|
|
11041
|
-
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11040
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11042
11041
|
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11043
11042
|
React.useEffect(function () {
|
|
11044
11043
|
//没有值塞个默认值
|
|
@@ -11050,7 +11049,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11050
11049
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11051
11050
|
setChangeIndex(0);
|
|
11052
11051
|
}
|
|
11053
|
-
},
|
|
11052
|
+
}, value);
|
|
11054
11053
|
var content = function content(item, index) {
|
|
11055
11054
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11056
11055
|
style: {
|
|
@@ -11078,14 +11077,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11078
11077
|
changeOrderInfo['sendId'] = option.value;
|
|
11079
11078
|
}
|
|
11080
11079
|
if (isSelectName && type === 'sendName') {
|
|
11081
|
-
|
|
11082
|
-
// 如果发货仓名称存的是id,将名称存入快照
|
|
11083
|
-
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11084
|
-
} else {
|
|
11085
|
-
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
11086
|
-
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
11087
|
-
changeOrderInfo['sendName'] = option.label;
|
|
11088
|
-
}
|
|
11080
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11089
11081
|
}
|
|
11090
11082
|
var newList = _toConsumableArray(value);
|
|
11091
11083
|
newList[changeIndex] = changeOrderInfo;
|
|
@@ -11185,7 +11177,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11185
11177
|
showSearch: true,
|
|
11186
11178
|
options: sendOptions,
|
|
11187
11179
|
filterOption: filterOption,
|
|
11188
|
-
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.
|
|
11180
|
+
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11189
11181
|
onChange: function onChange(value, option) {
|
|
11190
11182
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11191
11183
|
}
|
|
@@ -11195,14 +11187,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11195
11187
|
onChange: function onChange(e) {
|
|
11196
11188
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11197
11189
|
},
|
|
11198
|
-
value: (_value$
|
|
11190
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
11199
11191
|
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11200
11192
|
disabled: disabled,
|
|
11201
11193
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11202
11194
|
onChange: function onChange(e) {
|
|
11203
11195
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11204
11196
|
},
|
|
11205
|
-
value: (_value$
|
|
11197
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
11206
11198
|
})) : null) : null);
|
|
11207
11199
|
};
|
|
11208
11200
|
|
|
@@ -12172,363 +12164,9 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12172
12164
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
12173
12165
|
|
|
12174
12166
|
var getTableData$1 = function getTableData(_ref, formData) {
|
|
12175
|
-
var current = _ref.current,
|
|
12176
|
-
pageSize = _ref.pageSize;
|
|
12177
|
-
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12178
|
-
method: 'post',
|
|
12179
|
-
data: _objectSpread2({
|
|
12180
|
-
pageSize: pageSize,
|
|
12181
|
-
pageNo: current,
|
|
12182
|
-
platform: 'JST_ERP'
|
|
12183
|
-
}, formData)
|
|
12184
|
-
}).then(function (res) {
|
|
12185
|
-
var _res$data = res.data,
|
|
12186
|
-
_res$data$productSkuL = _res$data.productSkuList,
|
|
12187
|
-
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12188
|
-
_res$data$total = _res$data.total,
|
|
12189
|
-
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12190
|
-
var newProducts = productSkuList.map(function (item, index) {
|
|
12191
|
-
return _objectSpread2({}, item);
|
|
12192
|
-
});
|
|
12193
|
-
return {
|
|
12194
|
-
total: total,
|
|
12195
|
-
list: newProducts
|
|
12196
|
-
};
|
|
12197
|
-
});
|
|
12198
|
-
};
|
|
12199
|
-
var columns$2 = [{
|
|
12200
|
-
dataIndex: 'index',
|
|
12201
|
-
title: 'NO',
|
|
12202
|
-
render: function render(val, record, index) {
|
|
12203
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12204
|
-
style: {
|
|
12205
|
-
width: 25
|
|
12206
|
-
}
|
|
12207
|
-
}, index + 1);
|
|
12208
|
-
},
|
|
12209
|
-
width: 80
|
|
12210
|
-
}, {
|
|
12211
|
-
dataIndex: 'goodName',
|
|
12212
|
-
title: '商品名称',
|
|
12213
|
-
width: 250,
|
|
12214
|
-
ellipsis: true
|
|
12215
|
-
}, {
|
|
12216
|
-
dataIndex: 'goodNo',
|
|
12217
|
-
title: '商品编码',
|
|
12218
|
-
width: 200,
|
|
12219
|
-
ellipsis: true
|
|
12220
|
-
}, {
|
|
12221
|
-
dataIndex: 'styleCode',
|
|
12222
|
-
title: '款式编码',
|
|
12223
|
-
width: 200,
|
|
12224
|
-
ellipsis: true
|
|
12225
|
-
}, {
|
|
12226
|
-
dataIndex: 'propertiesValue',
|
|
12227
|
-
title: '规格值',
|
|
12228
|
-
width: 200,
|
|
12229
|
-
ellipsis: true
|
|
12230
|
-
}, {
|
|
12231
|
-
dataIndex: 'goodPicUrl',
|
|
12232
|
-
title: '商品图片',
|
|
12233
|
-
width: 100,
|
|
12234
|
-
render: function render(picUrl) {
|
|
12235
|
-
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
12236
|
-
style: {
|
|
12237
|
-
width: '40px',
|
|
12238
|
-
height: '40px',
|
|
12239
|
-
objectFit: 'contain'
|
|
12240
|
-
},
|
|
12241
|
-
src: picUrl
|
|
12242
|
-
});
|
|
12243
|
-
}
|
|
12244
|
-
}, {
|
|
12245
|
-
dataIndex: 'goodShortName',
|
|
12246
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12247
|
-
ellipsis: true,
|
|
12248
|
-
width: 250
|
|
12249
|
-
}, {
|
|
12250
|
-
dataIndex: 'brandName',
|
|
12251
|
-
title: '品牌名称',
|
|
12252
|
-
width: 200,
|
|
12253
|
-
ellipsis: true
|
|
12254
|
-
}, {
|
|
12255
|
-
dataIndex: 'retailPrice',
|
|
12256
|
-
title: "\u9500\u552E\u4EF7\u683C",
|
|
12257
|
-
ellipsis: true,
|
|
12258
|
-
width: 100,
|
|
12259
|
-
render: function render(price) {
|
|
12260
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12261
|
-
}
|
|
12262
|
-
}, {
|
|
12263
|
-
dataIndex: 'marketPrice',
|
|
12264
|
-
title: "\u5E02\u573A\u4EF7",
|
|
12265
|
-
ellipsis: true,
|
|
12266
|
-
width: 100,
|
|
12267
|
-
render: function render(price) {
|
|
12268
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12269
|
-
}
|
|
12270
|
-
}, {
|
|
12271
|
-
dataIndex: 'costPrice',
|
|
12272
|
-
title: "\u6210\u672C\u4EF7",
|
|
12273
|
-
ellipsis: true,
|
|
12274
|
-
width: 100,
|
|
12275
|
-
render: function render(price) {
|
|
12276
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12277
|
-
}
|
|
12278
|
-
}, {
|
|
12279
|
-
dataIndex: 'skuType',
|
|
12280
|
-
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12281
|
-
ellipsis: true,
|
|
12282
|
-
width: 100,
|
|
12283
|
-
render: function render() {
|
|
12284
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
12285
|
-
return {
|
|
12286
|
-
'combine': '组合装商品',
|
|
12287
|
-
'normal': '普通商品'
|
|
12288
|
-
}[type] || type;
|
|
12289
|
-
}
|
|
12290
|
-
}];
|
|
12291
|
-
var GoodList$1 = function GoodList(props, ref) {
|
|
12292
|
-
var _useState = React.useState([]),
|
|
12293
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12294
|
-
selectList = _useState2[0],
|
|
12295
|
-
setSelect = _useState2[1];
|
|
12296
|
-
var _useState3 = React.useState([]),
|
|
12297
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12298
|
-
selectIds = _useState4[0],
|
|
12299
|
-
setSelectIds = _useState4[1];
|
|
12300
|
-
React.useImperativeHandle(ref, function () {
|
|
12301
|
-
return {
|
|
12302
|
-
getSelectGoodList: function getSelectGoodList() {
|
|
12303
|
-
return selectList;
|
|
12304
|
-
}
|
|
12305
|
-
};
|
|
12306
|
-
});
|
|
12307
|
-
var _Form$useForm = antd.Form.useForm(),
|
|
12308
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12309
|
-
form = _Form$useForm2[0];
|
|
12310
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$1, {
|
|
12311
|
-
defaultPageSize: 10,
|
|
12312
|
-
form: form
|
|
12313
|
-
}),
|
|
12314
|
-
tableProps = _useAntdTable.tableProps,
|
|
12315
|
-
search = _useAntdTable.search,
|
|
12316
|
-
params = _useAntdTable.params;
|
|
12317
|
-
var submit = search.submit,
|
|
12318
|
-
reset = search.reset;
|
|
12319
|
-
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
12320
|
-
layout: "inline",
|
|
12321
|
-
form: form
|
|
12322
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12323
|
-
name: "goodName",
|
|
12324
|
-
style: {
|
|
12325
|
-
marginBottom: '12px'
|
|
12326
|
-
}
|
|
12327
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12328
|
-
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12329
|
-
allowClear: true,
|
|
12330
|
-
style: {
|
|
12331
|
-
width: 150
|
|
12332
|
-
}
|
|
12333
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12334
|
-
name: "goodNo",
|
|
12335
|
-
style: {
|
|
12336
|
-
marginBottom: '12px'
|
|
12337
|
-
}
|
|
12338
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12339
|
-
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12340
|
-
allowClear: true,
|
|
12341
|
-
style: {
|
|
12342
|
-
width: 150
|
|
12343
|
-
}
|
|
12344
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12345
|
-
name: "styleCode",
|
|
12346
|
-
style: {
|
|
12347
|
-
marginBottom: '12px'
|
|
12348
|
-
}
|
|
12349
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12350
|
-
placeholder: "\u6B3E\u5F0F\u7F16\u7801",
|
|
12351
|
-
allowClear: true,
|
|
12352
|
-
style: {
|
|
12353
|
-
width: 150
|
|
12354
|
-
}
|
|
12355
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12356
|
-
style: {
|
|
12357
|
-
marginBottom: '12px'
|
|
12358
|
-
}
|
|
12359
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12360
|
-
type: "primary",
|
|
12361
|
-
style: {
|
|
12362
|
-
marginRight: '8px'
|
|
12363
|
-
},
|
|
12364
|
-
onClick: submit
|
|
12365
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12366
|
-
onClick: reset
|
|
12367
|
-
}, "\u91CD\u7F6E")));
|
|
12368
|
-
var rowSelection = {
|
|
12369
|
-
selectedRowKeys: selectIds,
|
|
12370
|
-
fixed: true,
|
|
12371
|
-
onSelect: function onSelect(record, selected) {
|
|
12372
|
-
if (selected) {
|
|
12373
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
|
|
12374
|
-
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12375
|
-
} else {
|
|
12376
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12377
|
-
return t !== record.goodNo;
|
|
12378
|
-
}));
|
|
12379
|
-
setSelect(selectList.filter(function (t) {
|
|
12380
|
-
return t.goodNo !== record.goodNo;
|
|
12381
|
-
}));
|
|
12382
|
-
}
|
|
12383
|
-
},
|
|
12384
|
-
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12385
|
-
if (selected) {
|
|
12386
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12387
|
-
return t.goodNo;
|
|
12388
|
-
}))));
|
|
12389
|
-
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12390
|
-
} else {
|
|
12391
|
-
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
12392
|
-
return t.goodNo;
|
|
12393
|
-
})));
|
|
12394
|
-
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12395
|
-
return arrVal.goodNo !== othVal.goodNo;
|
|
12396
|
-
});
|
|
12397
|
-
setSelect(list);
|
|
12398
|
-
}
|
|
12399
|
-
},
|
|
12400
|
-
getCheckboxProps: function getCheckboxProps(record) {
|
|
12401
|
-
var options = {
|
|
12402
|
-
disabled: (props.selectedRows || []).map(function (row) {
|
|
12403
|
-
return row.goodNo || row.skuId;
|
|
12404
|
-
}).includes(record.goodNo || record.skuId),
|
|
12405
|
-
name: record.goodNo
|
|
12406
|
-
};
|
|
12407
|
-
return options;
|
|
12408
|
-
}
|
|
12409
|
-
};
|
|
12410
|
-
var showTable = function showTable() {
|
|
12411
|
-
var handleDelete = function handleDelete(record) {
|
|
12412
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12413
|
-
return t !== record.goodNo;
|
|
12414
|
-
}));
|
|
12415
|
-
setSelect(selectList.filter(function (t) {
|
|
12416
|
-
return t.goodNo !== record.goodNo;
|
|
12417
|
-
}));
|
|
12418
|
-
};
|
|
12419
|
-
var showColumns = [{
|
|
12420
|
-
dataIndex: '',
|
|
12421
|
-
title: "\u64CD\u4F5C",
|
|
12422
|
-
ellipsis: true,
|
|
12423
|
-
width: 100,
|
|
12424
|
-
render: function render(val, record) {
|
|
12425
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12426
|
-
type: "link",
|
|
12427
|
-
onClick: function onClick() {
|
|
12428
|
-
return handleDelete(record);
|
|
12429
|
-
}
|
|
12430
|
-
}, "\u5220\u9664");
|
|
12431
|
-
}
|
|
12432
|
-
}].concat(lodash.takeRight(columns$2, columns$2.length - 1));
|
|
12433
|
-
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12434
|
-
style: {
|
|
12435
|
-
width: '100%',
|
|
12436
|
-
maxWidth: '387px'
|
|
12437
|
-
}
|
|
12438
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12439
|
-
columns: showColumns,
|
|
12440
|
-
rowKey: 'goodNo',
|
|
12441
|
-
dataSource: selectList,
|
|
12442
|
-
scroll: {
|
|
12443
|
-
x: '100%',
|
|
12444
|
-
y: 250
|
|
12445
|
-
},
|
|
12446
|
-
pagination: {
|
|
12447
|
-
size: 'small',
|
|
12448
|
-
total: selectIds.length,
|
|
12449
|
-
pageSize: 10,
|
|
12450
|
-
showSizeChanger: false
|
|
12451
|
-
}
|
|
12452
|
-
})) : null;
|
|
12453
|
-
};
|
|
12454
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12455
|
-
style: {
|
|
12456
|
-
marginTop: '4px'
|
|
12457
|
-
}
|
|
12458
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12459
|
-
rowSelection: rowSelection,
|
|
12460
|
-
rowKey: "goodNo",
|
|
12461
|
-
columns: columns$2,
|
|
12462
|
-
scroll: {
|
|
12463
|
-
x: '100%',
|
|
12464
|
-
y: 250
|
|
12465
|
-
}
|
|
12466
|
-
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
12467
|
-
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12468
|
-
return triggerNode.parentElement;
|
|
12469
|
-
},
|
|
12470
|
-
content: showTable(),
|
|
12471
|
-
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12472
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12473
|
-
danger: true,
|
|
12474
|
-
type: "text"
|
|
12475
|
-
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12476
|
-
};
|
|
12477
|
-
var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$1);
|
|
12478
|
-
|
|
12479
|
-
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12480
|
-
React.useImperativeHandle(ref, function () {
|
|
12481
|
-
return {
|
|
12482
|
-
open: function open(shopCode) {
|
|
12483
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12484
|
-
setVisible(true);
|
|
12485
|
-
setSelectedRows(options.value || []);
|
|
12486
|
-
}
|
|
12487
|
-
};
|
|
12488
|
-
});
|
|
12489
|
-
var onSubmit = props.onSubmit,
|
|
12490
|
-
width = props.width;
|
|
12491
|
-
var _useState = React.useState(false),
|
|
12492
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12493
|
-
visible = _useState2[0],
|
|
12494
|
-
setVisible = _useState2[1];
|
|
12495
|
-
var _useState3 = React.useState([]),
|
|
12496
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12497
|
-
selectedRows = _useState4[0],
|
|
12498
|
-
setSelectedRows = _useState4[1];
|
|
12499
|
-
var gyGoodsListRef = React.useRef(null);
|
|
12500
|
-
var _onCancel = function onCancel() {
|
|
12501
|
-
setVisible(false);
|
|
12502
|
-
};
|
|
12503
|
-
var onOk = function onOk() {
|
|
12504
|
-
var _gyGoodsListRef$curre;
|
|
12505
|
-
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12506
|
-
onSubmit(selectedList);
|
|
12507
|
-
_onCancel();
|
|
12508
|
-
};
|
|
12509
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12510
|
-
title: '选择商品',
|
|
12511
|
-
okText: '确认',
|
|
12512
|
-
cancelText: '取消',
|
|
12513
|
-
visible: visible,
|
|
12514
|
-
width: width || 850,
|
|
12515
|
-
onCancel: function onCancel() {
|
|
12516
|
-
_onCancel();
|
|
12517
|
-
},
|
|
12518
|
-
onOk: onOk,
|
|
12519
|
-
wrapClassName: "goodModal"
|
|
12520
|
-
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
|
|
12521
|
-
ref: gyGoodsListRef,
|
|
12522
|
-
selectedRows: selectedRows
|
|
12523
|
-
})));
|
|
12524
|
-
};
|
|
12525
|
-
var JstGoodsModal = /*#__PURE__*/React.forwardRef(GyGoodsModal);
|
|
12526
|
-
|
|
12527
|
-
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12528
12167
|
var current = _ref.current,
|
|
12529
12168
|
pageSize = _ref.pageSize;
|
|
12530
12169
|
var data = {
|
|
12531
|
-
goodShortName: formData.goodShortName || null,
|
|
12532
12170
|
goodNo: formData.goodNo || null,
|
|
12533
12171
|
goodName: formData.goodName || null,
|
|
12534
12172
|
skuCode: formData.skuCode || null,
|
|
@@ -12558,7 +12196,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12558
12196
|
};
|
|
12559
12197
|
});
|
|
12560
12198
|
};
|
|
12561
|
-
var columns$
|
|
12199
|
+
var columns$2 = [{
|
|
12562
12200
|
dataIndex: 'index',
|
|
12563
12201
|
title: 'NO',
|
|
12564
12202
|
render: function render(val, record, index) {
|
|
@@ -12654,7 +12292,7 @@ var columns$3 = [{
|
|
|
12654
12292
|
ellipsis: true,
|
|
12655
12293
|
width: 100
|
|
12656
12294
|
}];
|
|
12657
|
-
var GoodList$
|
|
12295
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12658
12296
|
var _useState = React.useState([]),
|
|
12659
12297
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12660
12298
|
selectList = _useState2[0],
|
|
@@ -12673,7 +12311,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12673
12311
|
var _Form$useForm = antd.Form.useForm(),
|
|
12674
12312
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12675
12313
|
form = _Form$useForm2[0];
|
|
12676
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
12314
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$1, {
|
|
12677
12315
|
defaultPageSize: 10,
|
|
12678
12316
|
form: form
|
|
12679
12317
|
}),
|
|
@@ -12686,17 +12324,6 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12686
12324
|
layout: "inline",
|
|
12687
12325
|
form: form
|
|
12688
12326
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12689
|
-
name: "goodShortName",
|
|
12690
|
-
style: {
|
|
12691
|
-
marginBottom: '12px'
|
|
12692
|
-
}
|
|
12693
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12694
|
-
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12695
|
-
allowClear: true,
|
|
12696
|
-
style: {
|
|
12697
|
-
width: 150
|
|
12698
|
-
}
|
|
12699
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12700
12327
|
name: "goodNo",
|
|
12701
12328
|
style: {
|
|
12702
12329
|
marginBottom: '12px'
|
|
@@ -12808,7 +12435,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12808
12435
|
}
|
|
12809
12436
|
}, "\u5220\u9664");
|
|
12810
12437
|
}
|
|
12811
|
-
}].concat(lodash.takeRight(columns$
|
|
12438
|
+
}].concat(lodash.takeRight(columns$2, columns$2.length - 1));
|
|
12812
12439
|
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12813
12440
|
style: {
|
|
12814
12441
|
width: '100%',
|
|
@@ -12837,7 +12464,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12837
12464
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12838
12465
|
rowSelection: rowSelection,
|
|
12839
12466
|
rowKey: "specNo",
|
|
12840
|
-
columns: columns$
|
|
12467
|
+
columns: columns$2,
|
|
12841
12468
|
scroll: {
|
|
12842
12469
|
x: '100%',
|
|
12843
12470
|
y: 250
|
|
@@ -12853,7 +12480,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12853
12480
|
type: "text"
|
|
12854
12481
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12855
12482
|
};
|
|
12856
|
-
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$
|
|
12483
|
+
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$1);
|
|
12857
12484
|
|
|
12858
12485
|
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12859
12486
|
React.useImperativeHandle(ref, function () {
|
|
@@ -12896,7 +12523,7 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12896
12523
|
};
|
|
12897
12524
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12898
12525
|
|
|
12899
|
-
var getTableData$
|
|
12526
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12900
12527
|
var current = _ref.current,
|
|
12901
12528
|
pageSize = _ref.pageSize;
|
|
12902
12529
|
var data = {
|
|
@@ -12928,7 +12555,7 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
12928
12555
|
};
|
|
12929
12556
|
});
|
|
12930
12557
|
};
|
|
12931
|
-
var columns$
|
|
12558
|
+
var columns$3 = [{
|
|
12932
12559
|
dataIndex: 'index',
|
|
12933
12560
|
title: 'NO',
|
|
12934
12561
|
render: function render(val, record, index) {
|
|
@@ -12994,7 +12621,7 @@ var columns$4 = [{
|
|
|
12994
12621
|
ellipsis: true,
|
|
12995
12622
|
width: 100
|
|
12996
12623
|
}];
|
|
12997
|
-
var GoodList$
|
|
12624
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12998
12625
|
var _useState = React.useState([]),
|
|
12999
12626
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13000
12627
|
selectList = _useState2[0],
|
|
@@ -13013,7 +12640,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13013
12640
|
var _Form$useForm = antd.Form.useForm(),
|
|
13014
12641
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13015
12642
|
form = _Form$useForm2[0];
|
|
13016
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
12643
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$2, {
|
|
13017
12644
|
defaultPageSize: 10,
|
|
13018
12645
|
form: form
|
|
13019
12646
|
}),
|
|
@@ -13148,7 +12775,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13148
12775
|
}
|
|
13149
12776
|
}, "\u5220\u9664");
|
|
13150
12777
|
}
|
|
13151
|
-
}].concat(lodash.takeRight(columns$
|
|
12778
|
+
}].concat(lodash.takeRight(columns$3, columns$3.length - 1));
|
|
13152
12779
|
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13153
12780
|
style: {
|
|
13154
12781
|
width: '100%',
|
|
@@ -13177,7 +12804,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13177
12804
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
13178
12805
|
rowSelection: rowSelection,
|
|
13179
12806
|
rowKey: "specNo",
|
|
13180
|
-
columns: columns$
|
|
12807
|
+
columns: columns$3,
|
|
13181
12808
|
scroll: {
|
|
13182
12809
|
x: '100%',
|
|
13183
12810
|
y: 250
|
|
@@ -13193,9 +12820,9 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13193
12820
|
type: "text"
|
|
13194
12821
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
13195
12822
|
};
|
|
13196
|
-
var GyGoodsList
|
|
12823
|
+
var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$2);
|
|
13197
12824
|
|
|
13198
|
-
var GyGoodsModal
|
|
12825
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
13199
12826
|
React.useImperativeHandle(ref, function () {
|
|
13200
12827
|
return {
|
|
13201
12828
|
open: function open() {
|
|
@@ -13230,11 +12857,11 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13230
12857
|
},
|
|
13231
12858
|
onOk: onOk,
|
|
13232
12859
|
wrapClassName: "goodModal"
|
|
13233
|
-
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList
|
|
12860
|
+
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
|
|
13234
12861
|
ref: gyGoodsListRef
|
|
13235
12862
|
})));
|
|
13236
12863
|
};
|
|
13237
|
-
var GyGoodsModal$
|
|
12864
|
+
var GyGoodsModal$1 = /*#__PURE__*/React.forwardRef(GyGoodsModal);
|
|
13238
12865
|
|
|
13239
12866
|
var getColumns = function getColumns(_ref) {
|
|
13240
12867
|
var _ref$text = _ref.text,
|
|
@@ -14389,262 +14016,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14389
14016
|
};
|
|
14390
14017
|
|
|
14391
14018
|
var getColumns$5 = function getColumns(_ref) {
|
|
14392
|
-
var _ref$text = _ref.text,
|
|
14393
|
-
disabled = _ref.disabled,
|
|
14394
|
-
updateHandle = _ref.updateHandle;
|
|
14395
|
-
return {
|
|
14396
|
-
JST_GOODS: [{
|
|
14397
|
-
dataIndex: 'name',
|
|
14398
|
-
title: '商品名称',
|
|
14399
|
-
width: 150,
|
|
14400
|
-
ellipsis: true,
|
|
14401
|
-
align: 'center'
|
|
14402
|
-
}, {
|
|
14403
|
-
dataIndex: 'skuId',
|
|
14404
|
-
title: '商品编码',
|
|
14405
|
-
width: 150,
|
|
14406
|
-
ellipsis: true,
|
|
14407
|
-
align: 'center'
|
|
14408
|
-
}, {
|
|
14409
|
-
dataIndex: 'iId',
|
|
14410
|
-
title: '款式编码',
|
|
14411
|
-
width: 150,
|
|
14412
|
-
ellipsis: true,
|
|
14413
|
-
align: 'center'
|
|
14414
|
-
}, {
|
|
14415
|
-
dataIndex: 'pic',
|
|
14416
|
-
title: '商品图片',
|
|
14417
|
-
ellipsis: true,
|
|
14418
|
-
align: 'center',
|
|
14419
|
-
width: 100,
|
|
14420
|
-
render: function render(val) {
|
|
14421
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14422
|
-
width: 60,
|
|
14423
|
-
src: val
|
|
14424
|
-
});
|
|
14425
|
-
}
|
|
14426
|
-
}, {
|
|
14427
|
-
dataIndex: 'propertiesValue',
|
|
14428
|
-
title: '规格值',
|
|
14429
|
-
width: 150,
|
|
14430
|
-
ellipsis: true,
|
|
14431
|
-
align: 'center'
|
|
14432
|
-
}, {
|
|
14433
|
-
dataIndex: 'saleBasePrice',
|
|
14434
|
-
title: '原价',
|
|
14435
|
-
width: 150,
|
|
14436
|
-
ellipsis: true,
|
|
14437
|
-
align: 'center',
|
|
14438
|
-
render: function render(price) {
|
|
14439
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14440
|
-
}
|
|
14441
|
-
}, {
|
|
14442
|
-
dataIndex: 'salePrice',
|
|
14443
|
-
title: '单价',
|
|
14444
|
-
ellipsis: true,
|
|
14445
|
-
align: 'center',
|
|
14446
|
-
width: 120,
|
|
14447
|
-
render: function render(val, record, index) {
|
|
14448
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14449
|
-
style: {
|
|
14450
|
-
width: 70
|
|
14451
|
-
},
|
|
14452
|
-
value: val,
|
|
14453
|
-
min: 0,
|
|
14454
|
-
precision: 2,
|
|
14455
|
-
onChange: function onChange(num) {
|
|
14456
|
-
return updateHandle(num, index, 'salePrice');
|
|
14457
|
-
}
|
|
14458
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14459
|
-
}
|
|
14460
|
-
}, {
|
|
14461
|
-
dataIndex: 'qty',
|
|
14462
|
-
title: '数量',
|
|
14463
|
-
ellipsis: true,
|
|
14464
|
-
align: 'center',
|
|
14465
|
-
width: 100,
|
|
14466
|
-
render: function render(val, record, index) {
|
|
14467
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14468
|
-
style: {
|
|
14469
|
-
width: 70
|
|
14470
|
-
},
|
|
14471
|
-
value: val,
|
|
14472
|
-
min: 1,
|
|
14473
|
-
precision: 0,
|
|
14474
|
-
onChange: function onChange(num) {
|
|
14475
|
-
return updateHandle(num, index, 'qty');
|
|
14476
|
-
}
|
|
14477
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14478
|
-
}
|
|
14479
|
-
}, {
|
|
14480
|
-
dataIndex: 'saleAmount',
|
|
14481
|
-
title: '总金额',
|
|
14482
|
-
width: 150,
|
|
14483
|
-
ellipsis: true,
|
|
14484
|
-
align: 'center',
|
|
14485
|
-
render: function render(val, record, index) {
|
|
14486
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
14487
|
-
}
|
|
14488
|
-
}, {
|
|
14489
|
-
dataIndex: 'batchId',
|
|
14490
|
-
title: '批次号',
|
|
14491
|
-
width: 150,
|
|
14492
|
-
ellipsis: true,
|
|
14493
|
-
align: 'center'
|
|
14494
|
-
}, {
|
|
14495
|
-
dataIndex: 'isGift',
|
|
14496
|
-
title: '是否赠品',
|
|
14497
|
-
ellipsis: true,
|
|
14498
|
-
align: 'center',
|
|
14499
|
-
width: 100,
|
|
14500
|
-
render: function render(val, record, index) {
|
|
14501
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14502
|
-
value: val,
|
|
14503
|
-
onChange: function onChange(value) {
|
|
14504
|
-
updateHandle(value, index, 'isGift');
|
|
14505
|
-
},
|
|
14506
|
-
options: [{
|
|
14507
|
-
label: '是',
|
|
14508
|
-
value: true
|
|
14509
|
-
}, {
|
|
14510
|
-
label: '否',
|
|
14511
|
-
value: false
|
|
14512
|
-
}]
|
|
14513
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14514
|
-
}
|
|
14515
|
-
}, {
|
|
14516
|
-
dataIndex: 'outerOiId',
|
|
14517
|
-
title: '子订单号',
|
|
14518
|
-
width: 240,
|
|
14519
|
-
ellipsis: true,
|
|
14520
|
-
align: 'center'
|
|
14521
|
-
}],
|
|
14522
|
-
JST_REISSUE_GOODS: [{
|
|
14523
|
-
dataIndex: 'name',
|
|
14524
|
-
title: '商品名称',
|
|
14525
|
-
width: 150,
|
|
14526
|
-
ellipsis: true,
|
|
14527
|
-
align: 'center'
|
|
14528
|
-
}, {
|
|
14529
|
-
dataIndex: 'skuId',
|
|
14530
|
-
title: '商品编码',
|
|
14531
|
-
width: 150,
|
|
14532
|
-
ellipsis: true,
|
|
14533
|
-
align: 'center'
|
|
14534
|
-
}, {
|
|
14535
|
-
dataIndex: 'iId',
|
|
14536
|
-
title: '款式编码',
|
|
14537
|
-
width: 150,
|
|
14538
|
-
ellipsis: true,
|
|
14539
|
-
align: 'center'
|
|
14540
|
-
}, {
|
|
14541
|
-
dataIndex: 'pic',
|
|
14542
|
-
title: '商品图片',
|
|
14543
|
-
ellipsis: true,
|
|
14544
|
-
align: 'center',
|
|
14545
|
-
width: 100,
|
|
14546
|
-
render: function render(val) {
|
|
14547
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14548
|
-
width: 60,
|
|
14549
|
-
src: val
|
|
14550
|
-
});
|
|
14551
|
-
}
|
|
14552
|
-
}, {
|
|
14553
|
-
dataIndex: 'propertiesValue',
|
|
14554
|
-
title: '规格值',
|
|
14555
|
-
width: 150,
|
|
14556
|
-
ellipsis: true,
|
|
14557
|
-
align: 'center'
|
|
14558
|
-
}, {
|
|
14559
|
-
dataIndex: 'saleBasePrice',
|
|
14560
|
-
title: '原价',
|
|
14561
|
-
width: 150,
|
|
14562
|
-
ellipsis: true,
|
|
14563
|
-
align: 'center',
|
|
14564
|
-
render: function render(price) {
|
|
14565
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14566
|
-
}
|
|
14567
|
-
}, {
|
|
14568
|
-
dataIndex: 'salePrice',
|
|
14569
|
-
title: '单价',
|
|
14570
|
-
ellipsis: true,
|
|
14571
|
-
align: 'center',
|
|
14572
|
-
width: 120,
|
|
14573
|
-
render: function render(val, record, index) {
|
|
14574
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14575
|
-
style: {
|
|
14576
|
-
width: 70
|
|
14577
|
-
},
|
|
14578
|
-
value: val,
|
|
14579
|
-
min: 0,
|
|
14580
|
-
precision: 2,
|
|
14581
|
-
onChange: function onChange(num) {
|
|
14582
|
-
return updateHandle(num, index, 'salePrice');
|
|
14583
|
-
}
|
|
14584
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14585
|
-
}
|
|
14586
|
-
}, {
|
|
14587
|
-
dataIndex: 'qty',
|
|
14588
|
-
title: '数量',
|
|
14589
|
-
ellipsis: true,
|
|
14590
|
-
align: 'center',
|
|
14591
|
-
width: 100,
|
|
14592
|
-
render: function render(val, record, index) {
|
|
14593
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14594
|
-
style: {
|
|
14595
|
-
width: 70
|
|
14596
|
-
},
|
|
14597
|
-
value: val,
|
|
14598
|
-
min: 1,
|
|
14599
|
-
precision: 0,
|
|
14600
|
-
onChange: function onChange(num) {
|
|
14601
|
-
return updateHandle(num, index, 'qty');
|
|
14602
|
-
}
|
|
14603
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14604
|
-
}
|
|
14605
|
-
}, {
|
|
14606
|
-
dataIndex: 'isGift',
|
|
14607
|
-
title: '是否赠品',
|
|
14608
|
-
ellipsis: true,
|
|
14609
|
-
align: 'center',
|
|
14610
|
-
width: 100,
|
|
14611
|
-
render: function render(val, record, index) {
|
|
14612
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14613
|
-
value: val,
|
|
14614
|
-
onChange: function onChange(value) {
|
|
14615
|
-
updateHandle(value, index, 'isGift');
|
|
14616
|
-
},
|
|
14617
|
-
options: [{
|
|
14618
|
-
label: '是',
|
|
14619
|
-
value: true
|
|
14620
|
-
}, {
|
|
14621
|
-
label: '否',
|
|
14622
|
-
value: false
|
|
14623
|
-
}]
|
|
14624
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14625
|
-
}
|
|
14626
|
-
}, {
|
|
14627
|
-
dataIndex: 'remark',
|
|
14628
|
-
title: '备注',
|
|
14629
|
-
width: 150,
|
|
14630
|
-
ellipsis: true,
|
|
14631
|
-
align: 'center',
|
|
14632
|
-
render: function render(val, record, index) {
|
|
14633
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14634
|
-
style: {
|
|
14635
|
-
width: 70
|
|
14636
|
-
},
|
|
14637
|
-
value: val,
|
|
14638
|
-
onChange: function onChange(e) {
|
|
14639
|
-
return updateHandle(e.target.value, index, 'remark');
|
|
14640
|
-
}
|
|
14641
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14642
|
-
}
|
|
14643
|
-
}]
|
|
14644
|
-
};
|
|
14645
|
-
};
|
|
14646
|
-
|
|
14647
|
-
var getColumns$6 = function getColumns(_ref) {
|
|
14648
14019
|
var _ref$text = _ref.text,
|
|
14649
14020
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14650
14021
|
disabled = _ref.disabled,
|
|
@@ -14757,7 +14128,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14757
14128
|
disabled = _ref.disabled,
|
|
14758
14129
|
updateHandle = _ref.updateHandle,
|
|
14759
14130
|
updateDataHandle = _ref.updateDataHandle;
|
|
14760
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(
|
|
14131
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14761
14132
|
text: text,
|
|
14762
14133
|
disabled: disabled,
|
|
14763
14134
|
updateHandle: updateHandle
|
|
@@ -14778,12 +14149,8 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14778
14149
|
disabled: disabled,
|
|
14779
14150
|
updateHandle: updateHandle,
|
|
14780
14151
|
updateDataHandle: updateDataHandle
|
|
14781
|
-
})), getColumns$5({
|
|
14782
|
-
text: text,
|
|
14783
|
-
disabled: disabled,
|
|
14784
|
-
updateHandle: updateHandle
|
|
14785
14152
|
})), {}, {
|
|
14786
|
-
default: getColumns$
|
|
14153
|
+
default: getColumns$5({
|
|
14787
14154
|
text: text,
|
|
14788
14155
|
disabled: disabled,
|
|
14789
14156
|
updateHandle: updateHandle
|
|
@@ -14887,19 +14254,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14887
14254
|
});
|
|
14888
14255
|
};
|
|
14889
14256
|
|
|
14890
|
-
var GoodsModalMap = {
|
|
14891
|
-
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14892
|
-
'WDT_GOODS': WdtGoodsModal,
|
|
14893
|
-
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14894
|
-
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14895
|
-
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14896
|
-
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14897
|
-
'GY_GOODS': GyGoodsModal$2,
|
|
14898
|
-
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14899
|
-
'JST_GOODS': JstGoodsModal,
|
|
14900
|
-
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14901
|
-
'OTHER_GOODS': GoodsModal$2
|
|
14902
|
-
};
|
|
14903
14257
|
var MAIN_FIELD = 'uuid';
|
|
14904
14258
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14905
14259
|
var columns = _ref.columns,
|
|
@@ -14961,9 +14315,6 @@ var getButtonText = function getButtonText() {
|
|
|
14961
14315
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14962
14316
|
return '选择管易ERP商品';
|
|
14963
14317
|
}
|
|
14964
|
-
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14965
|
-
return '选择聚水潭ERP商品';
|
|
14966
|
-
}
|
|
14967
14318
|
return '选择商品';
|
|
14968
14319
|
};
|
|
14969
14320
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -15063,7 +14414,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15063
14414
|
};
|
|
15064
14415
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15065
14416
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15066
|
-
var
|
|
14417
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15067
14418
|
return function (type) {
|
|
15068
14419
|
var columns = [];
|
|
15069
14420
|
switch (type) {
|
|
@@ -15074,13 +14425,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15074
14425
|
case 'BS_GOODS':
|
|
15075
14426
|
case 'WLN_GOODS':
|
|
15076
14427
|
case 'GY_GOODS':
|
|
15077
|
-
case 'JST_GOODS':
|
|
15078
|
-
case 'JST_REISSUE_GOODS':
|
|
15079
14428
|
case 'GY_REISSUE_GOODS':
|
|
15080
14429
|
{
|
|
15081
14430
|
columns = getColumnsMap({
|
|
15082
14431
|
text: text,
|
|
15083
|
-
disabled: disabled
|
|
14432
|
+
disabled: disabled,
|
|
15084
14433
|
updateHandle: updateHandle,
|
|
15085
14434
|
updateDataHandle: updateDataHandle
|
|
15086
14435
|
})[type];
|
|
@@ -15089,25 +14438,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15089
14438
|
case 'WDT_REISSUE_GOODS':
|
|
15090
14439
|
{
|
|
15091
14440
|
columns = getWdtReissueGoodColumns({
|
|
15092
|
-
disabled: disabled
|
|
14441
|
+
disabled: disabled,
|
|
15093
14442
|
updateHandle: updateHandle,
|
|
15094
|
-
operate:
|
|
14443
|
+
operate: operate
|
|
15095
14444
|
});
|
|
15096
14445
|
}
|
|
15097
14446
|
break;
|
|
15098
14447
|
case 'BS_E3_REISSUE_GOODS':
|
|
15099
14448
|
{
|
|
15100
14449
|
columns = getBsE3ReissueGoodColumns({
|
|
15101
|
-
disabled: disabled
|
|
14450
|
+
disabled: disabled,
|
|
15102
14451
|
updateHandle: updateHandle,
|
|
15103
|
-
operate:
|
|
14452
|
+
operate: operate
|
|
15104
14453
|
});
|
|
15105
14454
|
}
|
|
15106
14455
|
break;
|
|
15107
14456
|
default:
|
|
15108
14457
|
columns = getColumnsMap({
|
|
15109
14458
|
text: text,
|
|
15110
|
-
disabled: disabled
|
|
14459
|
+
disabled: disabled,
|
|
15111
14460
|
updateHandle: updateHandle,
|
|
15112
14461
|
updateDataHandle: updateDataHandle
|
|
15113
14462
|
})['default'];
|
|
@@ -15170,10 +14519,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15170
14519
|
return columnList;
|
|
15171
14520
|
}, [showHeader, value, disabled]);
|
|
15172
14521
|
var orderColumns = React.useMemo(function () {
|
|
15173
|
-
var columns = COLUMNS_MAP('',
|
|
15174
|
-
operate: false,
|
|
15175
|
-
disabled: true
|
|
15176
|
-
})(type);
|
|
14522
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
15177
14523
|
return [{
|
|
15178
14524
|
dataIndex: '',
|
|
15179
14525
|
title: '序号',
|
|
@@ -15257,23 +14603,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15257
14603
|
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
15258
14604
|
});
|
|
15259
14605
|
});
|
|
15260
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15261
|
-
newList = list.map(function (item) {
|
|
15262
|
-
return {
|
|
15263
|
-
name: item.goodName,
|
|
15264
|
-
skuId: item.goodNo,
|
|
15265
|
-
iId: item.styleCode,
|
|
15266
|
-
pic: item.goodPicUrl,
|
|
15267
|
-
propertiesValue: item.propertiesValue,
|
|
15268
|
-
saleBasePrice: item.retailPrice,
|
|
15269
|
-
salePrice: item.retailPrice,
|
|
15270
|
-
remark: '',
|
|
15271
|
-
uuid: kmkfUtils.uuid(),
|
|
15272
|
-
canDelete: true,
|
|
15273
|
-
canEdit: true,
|
|
15274
|
-
qty: 1
|
|
15275
|
-
};
|
|
15276
|
-
});
|
|
15277
14606
|
} else {
|
|
15278
14607
|
newList = list.map(function (item) {
|
|
15279
14608
|
var goodsId = item.goodsId,
|
|
@@ -15309,9 +14638,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15309
14638
|
}));
|
|
15310
14639
|
};
|
|
15311
14640
|
var handleChangeGoods = function handleChangeGoods() {
|
|
15312
|
-
refModal.current.open(shopCode
|
|
15313
|
-
value: value
|
|
15314
|
-
});
|
|
14641
|
+
refModal.current.open(shopCode);
|
|
15315
14642
|
};
|
|
15316
14643
|
var rowSelection = {
|
|
15317
14644
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -15328,7 +14655,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15328
14655
|
}
|
|
15329
14656
|
return params;
|
|
15330
14657
|
}, [tableSelect, selectedRowKeys]);
|
|
15331
|
-
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15332
14658
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15333
14659
|
style: {
|
|
15334
14660
|
float: 'right'
|
|
@@ -15356,7 +14682,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15356
14682
|
locale: {
|
|
15357
14683
|
emptyText: '暂无数据'
|
|
15358
14684
|
}
|
|
15359
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
14685
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
14686
|
+
ref: refModal,
|
|
14687
|
+
onSubmit: onSubmit,
|
|
14688
|
+
width: width,
|
|
14689
|
+
shopList: shopList,
|
|
14690
|
+
shopId: shopId,
|
|
14691
|
+
maxLength: maxLength,
|
|
14692
|
+
companyKey: companyKey
|
|
14693
|
+
}) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(BsE3GoodsModal, {
|
|
14694
|
+
ref: refModal,
|
|
14695
|
+
onSubmit: onSubmit,
|
|
14696
|
+
width: width,
|
|
14697
|
+
shopList: shopList,
|
|
14698
|
+
shopId: shopId,
|
|
14699
|
+
maxLength: maxLength,
|
|
14700
|
+
companyKey: companyKey
|
|
14701
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(GyGoodsModal$1, {
|
|
14702
|
+
ref: refModal,
|
|
14703
|
+
onSubmit: onSubmit,
|
|
14704
|
+
width: width,
|
|
14705
|
+
shopList: shopList,
|
|
14706
|
+
shopId: shopId,
|
|
14707
|
+
maxLength: maxLength,
|
|
14708
|
+
companyKey: companyKey
|
|
14709
|
+
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
15360
14710
|
ref: refModal,
|
|
15361
14711
|
onSubmit: onSubmit,
|
|
15362
14712
|
width: width,
|
|
@@ -16088,60 +15438,27 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
16088
15438
|
// 延迟10秒清除,保证订单的时效性
|
|
16089
15439
|
setTimeout(function () {
|
|
16090
15440
|
singletonMap$2.delete(orderNo);
|
|
16091
|
-
}, 1000 * 10);
|
|
16092
|
-
} else {
|
|
16093
|
-
doReject(res);
|
|
16094
|
-
}
|
|
16095
|
-
}).catch(doReject);
|
|
16096
|
-
});
|
|
16097
|
-
singletonMap$2.set(orderNo, p);
|
|
16098
|
-
}
|
|
16099
|
-
return singletonMap$2.get(orderNo);
|
|
16100
|
-
};
|
|
16101
|
-
var gyUtils = {
|
|
16102
|
-
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16103
|
-
};
|
|
16104
|
-
|
|
16105
|
-
var singletonMap$3 = new Map();
|
|
16106
|
-
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16107
|
-
if (!singletonMap$3.has(orderNo)) {
|
|
16108
|
-
var p = new Promise(function (resolve, reject) {
|
|
16109
|
-
var doReject = function doReject(err) {
|
|
16110
|
-
// 清空掉错误的请求记录
|
|
16111
|
-
// singletonMap.delete(orderNo);
|
|
16112
|
-
reject(err);
|
|
16113
|
-
};
|
|
16114
|
-
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16115
|
-
method: 'post',
|
|
16116
|
-
data: {
|
|
16117
|
-
soId: orderNo
|
|
16118
|
-
}
|
|
16119
|
-
}).then(function (data) {
|
|
16120
|
-
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16121
|
-
data.data = kmkfUtils.filterJstOrders({
|
|
16122
|
-
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16123
|
-
}, orderNo);
|
|
16124
|
-
resolve(data.data);
|
|
15441
|
+
}, 1000 * 10);
|
|
16125
15442
|
} else {
|
|
16126
|
-
doReject(
|
|
15443
|
+
doReject(res);
|
|
16127
15444
|
}
|
|
16128
15445
|
}).catch(doReject);
|
|
16129
15446
|
});
|
|
16130
|
-
singletonMap$
|
|
15447
|
+
singletonMap$2.set(orderNo, p);
|
|
16131
15448
|
}
|
|
16132
|
-
return singletonMap$
|
|
15449
|
+
return singletonMap$2.get(orderNo);
|
|
16133
15450
|
};
|
|
16134
|
-
var
|
|
16135
|
-
|
|
15451
|
+
var gyUtils = {
|
|
15452
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16136
15453
|
};
|
|
16137
15454
|
|
|
16138
|
-
var singletonMap$
|
|
15455
|
+
var singletonMap$3 = new Map();
|
|
16139
15456
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
16140
|
-
if (!singletonMap$
|
|
15457
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16141
15458
|
var p = new Promise(function (resolve, reject) {
|
|
16142
15459
|
var doReject = function doReject(err) {
|
|
16143
15460
|
// 清空掉错误的请求记录
|
|
16144
|
-
singletonMap$
|
|
15461
|
+
singletonMap$3.delete(orderNo);
|
|
16145
15462
|
reject(err);
|
|
16146
15463
|
};
|
|
16147
15464
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -16167,16 +15484,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
16167
15484
|
}
|
|
16168
15485
|
// 延迟10秒清除,保证订单的时效性
|
|
16169
15486
|
setTimeout(function () {
|
|
16170
|
-
singletonMap$
|
|
15487
|
+
singletonMap$3.delete(orderNo);
|
|
16171
15488
|
}, 1000 * 10);
|
|
16172
15489
|
} else {
|
|
16173
15490
|
doReject(data);
|
|
16174
15491
|
}
|
|
16175
15492
|
}).catch(doReject);
|
|
16176
15493
|
});
|
|
16177
|
-
singletonMap$
|
|
15494
|
+
singletonMap$3.set(orderNo, p);
|
|
16178
15495
|
}
|
|
16179
|
-
return singletonMap$
|
|
15496
|
+
return singletonMap$3.get(orderNo);
|
|
16180
15497
|
};
|
|
16181
15498
|
var kmUtils = {
|
|
16182
15499
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -16189,8 +15506,7 @@ var columnsMap = {
|
|
|
16189
15506
|
WLN_SYSTEM_ORDER: kmkfUtils.WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
16190
15507
|
WDT_SYSTEM_ORDER: kmkfUtils.WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
16191
15508
|
BS_E3_SYSTEM_ORDER: kmkfUtils.BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
16192
|
-
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
16193
|
-
JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns
|
|
15509
|
+
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
16194
15510
|
};
|
|
16195
15511
|
var rowKeyMap = {
|
|
16196
15512
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -16198,8 +15514,7 @@ var rowKeyMap = {
|
|
|
16198
15514
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
16199
15515
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
16200
15516
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
16201
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16202
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
15517
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
16203
15518
|
};
|
|
16204
15519
|
var index$1 = (function (props) {
|
|
16205
15520
|
var value = props.value,
|
|
@@ -16224,8 +15539,6 @@ var index$1 = (function (props) {
|
|
|
16224
15539
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
16225
15540
|
console.log('触发gy--getGyOrderList--1');
|
|
16226
15541
|
getGyOrderList(value.orderNo);
|
|
16227
|
-
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16228
|
-
getJstOrderList(value.orderNo);
|
|
16229
15542
|
}
|
|
16230
15543
|
}
|
|
16231
15544
|
}, [value, type]);
|
|
@@ -16381,41 +15694,18 @@ var index$1 = (function (props) {
|
|
|
16381
15694
|
return _ref5.apply(this, arguments);
|
|
16382
15695
|
};
|
|
16383
15696
|
}();
|
|
16384
|
-
var
|
|
15697
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16385
15698
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
16386
15699
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
16387
15700
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16388
|
-
case 0:
|
|
16389
|
-
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16390
|
-
var trades = data || [];
|
|
16391
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16392
|
-
orders: trades,
|
|
16393
|
-
showOrderInfo: trades
|
|
16394
|
-
}));
|
|
16395
|
-
});
|
|
16396
|
-
onceRef.current = false;
|
|
16397
|
-
case 2:
|
|
16398
|
-
case "end":
|
|
16399
|
-
return _context5.stop();
|
|
16400
|
-
}
|
|
16401
|
-
}, _callee5);
|
|
16402
|
-
}));
|
|
16403
|
-
return function getJstOrderList(_x5) {
|
|
16404
|
-
return _ref6.apply(this, arguments);
|
|
16405
|
-
};
|
|
16406
|
-
}();
|
|
16407
|
-
var getKmOrderList = /*#__PURE__*/function () {
|
|
16408
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16409
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16410
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
16411
15701
|
case 0:
|
|
16412
15702
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
16413
15703
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16414
15704
|
orders: trades,
|
|
16415
|
-
showOrderInfo: trades.map(function (
|
|
16416
|
-
var billNo =
|
|
16417
|
-
billType =
|
|
16418
|
-
billTag =
|
|
15705
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
15706
|
+
var billNo = _ref7.billNo,
|
|
15707
|
+
billType = _ref7.billType,
|
|
15708
|
+
billTag = _ref7.billTag;
|
|
16419
15709
|
return {
|
|
16420
15710
|
billNo: billNo,
|
|
16421
15711
|
billType: billType,
|
|
@@ -16427,18 +15717,18 @@ var index$1 = (function (props) {
|
|
|
16427
15717
|
onceRef.current = false;
|
|
16428
15718
|
case 2:
|
|
16429
15719
|
case "end":
|
|
16430
|
-
return
|
|
15720
|
+
return _context5.stop();
|
|
16431
15721
|
}
|
|
16432
|
-
},
|
|
15722
|
+
}, _callee5);
|
|
16433
15723
|
}));
|
|
16434
|
-
return function getKmOrderList(
|
|
16435
|
-
return
|
|
15724
|
+
return function getKmOrderList(_x5) {
|
|
15725
|
+
return _ref6.apply(this, arguments);
|
|
16436
15726
|
};
|
|
16437
15727
|
}();
|
|
16438
15728
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
16439
|
-
var
|
|
16440
|
-
return _regeneratorRuntime().wrap(function
|
|
16441
|
-
while (1) switch (
|
|
15729
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15730
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15731
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
16442
15732
|
case 0:
|
|
16443
15733
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
16444
15734
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -16446,15 +15736,15 @@ var index$1 = (function (props) {
|
|
|
16446
15736
|
});
|
|
16447
15737
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16448
15738
|
orders: trades,
|
|
16449
|
-
showOrderInfo: trades.map(function (
|
|
16450
|
-
var billNo =
|
|
16451
|
-
billType =
|
|
16452
|
-
billTag =
|
|
16453
|
-
tradeTagName =
|
|
16454
|
-
deliveryState =
|
|
16455
|
-
vipCode =
|
|
16456
|
-
shopCode =
|
|
16457
|
-
rest = _objectWithoutProperties(
|
|
15739
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15740
|
+
var billNo = _ref9.billNo,
|
|
15741
|
+
billType = _ref9.billType,
|
|
15742
|
+
billTag = _ref9.billTag,
|
|
15743
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15744
|
+
deliveryState = _ref9.deliveryState,
|
|
15745
|
+
vipCode = _ref9.vipCode,
|
|
15746
|
+
shopCode = _ref9.shopCode,
|
|
15747
|
+
rest = _objectWithoutProperties(_ref9, _excluded$g);
|
|
16458
15748
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
16459
15749
|
billNo: billNo,
|
|
16460
15750
|
billType: billType,
|
|
@@ -16471,12 +15761,12 @@ var index$1 = (function (props) {
|
|
|
16471
15761
|
onceRef.current = false;
|
|
16472
15762
|
case 2:
|
|
16473
15763
|
case "end":
|
|
16474
|
-
return
|
|
15764
|
+
return _context6.stop();
|
|
16475
15765
|
}
|
|
16476
|
-
},
|
|
15766
|
+
}, _callee6);
|
|
16477
15767
|
}));
|
|
16478
|
-
return function getGyOrderList(
|
|
16479
|
-
return
|
|
15768
|
+
return function getGyOrderList(_x6) {
|
|
15769
|
+
return _ref8.apply(this, arguments);
|
|
16480
15770
|
};
|
|
16481
15771
|
}();
|
|
16482
15772
|
var rowSelection = {
|
|
@@ -16625,31 +15915,6 @@ var componentMap$1 = {
|
|
|
16625
15915
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16626
15916
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16627
15917
|
}
|
|
16628
|
-
},
|
|
16629
|
-
JST_GOODS: {
|
|
16630
|
-
type: 'jst',
|
|
16631
|
-
key: 'jstGoods',
|
|
16632
|
-
name: '聚水潭',
|
|
16633
|
-
orderNo: 'dealCode',
|
|
16634
|
-
goodDetailOrderNo: 'originalDealCode',
|
|
16635
|
-
eventNameMap: {
|
|
16636
|
-
// pubsub 事件
|
|
16637
|
-
type: 'jstType',
|
|
16638
|
-
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
16639
|
-
selectListReturn: 'jstSelectListReturn',
|
|
16640
|
-
selectList: 'jstSelectList',
|
|
16641
|
-
reissueSelectList: 'jstReissueSelectList',
|
|
16642
|
-
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16643
|
-
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16644
|
-
changeShopCode: 'jstChangeShopCode',
|
|
16645
|
-
reissueType: 'jstReissueType',
|
|
16646
|
-
returnType: 'jstReturnType',
|
|
16647
|
-
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16648
|
-
returnSelectList: 'jstReturnSelectList',
|
|
16649
|
-
deleteGood: 'jstDeleteGood',
|
|
16650
|
-
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16651
|
-
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16652
|
-
}
|
|
16653
15918
|
}
|
|
16654
15919
|
};
|
|
16655
15920
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17369,260 +16634,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17369
16634
|
})));
|
|
17370
16635
|
};
|
|
17371
16636
|
|
|
17372
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17373
|
-
var typeMap$2 = {
|
|
17374
|
-
JST_REISSUE_GOODS: {
|
|
17375
|
-
key: 'jstReissueGoods',
|
|
17376
|
-
typeName: 'jstReissueType',
|
|
17377
|
-
systemOrder: 'jstSystemOrder',
|
|
17378
|
-
systemOrderNo: 'jstSystemOrderNo',
|
|
17379
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17380
|
-
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17381
|
-
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17382
|
-
orderTypeKey: 'orderType',
|
|
17383
|
-
oIdKey: 'oId',
|
|
17384
|
-
outerOiIdKey: 'outerOiId',
|
|
17385
|
-
goodDetailsKey: 'items'
|
|
17386
|
-
}
|
|
17387
|
-
};
|
|
17388
|
-
var PublicReissue = function PublicReissue(props) {
|
|
17389
|
-
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17390
|
-
var value = props.value,
|
|
17391
|
-
onChange = props.onChange,
|
|
17392
|
-
_props$reasonList = props.reasonList,
|
|
17393
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17394
|
-
disabled = props.disabled,
|
|
17395
|
-
type = props.type,
|
|
17396
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
17397
|
-
var getOrderFlag = React.useRef(false);
|
|
17398
|
-
var _useState = React.useState(false),
|
|
17399
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17400
|
-
isStrict = _useState2[0],
|
|
17401
|
-
setIsStrict = _useState2[1];
|
|
17402
|
-
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17403
|
-
React.useEffect(function () {
|
|
17404
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17405
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
17406
|
-
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17407
|
-
getOrderFlag.current = true;
|
|
17408
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
17409
|
-
}
|
|
17410
|
-
return;
|
|
17411
|
-
}, [value]);
|
|
17412
|
-
var getOrderList = /*#__PURE__*/function () {
|
|
17413
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17414
|
-
var _typeMap$type4;
|
|
17415
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17416
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17417
|
-
case 0:
|
|
17418
|
-
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17419
|
-
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17420
|
-
var orders = data || [];
|
|
17421
|
-
var showOrderInfo = orders.map(function (orderItem) {
|
|
17422
|
-
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17423
|
-
});
|
|
17424
|
-
var typeObj = {};
|
|
17425
|
-
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrderNo];
|
|
17426
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrderBillType) {
|
|
17427
|
-
var _typeMap$type8, _typeMap$type9;
|
|
17428
|
-
var targetOrder = orders.find(function (oItem) {
|
|
17429
|
-
var _typeMap$type7;
|
|
17430
|
-
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17431
|
-
});
|
|
17432
|
-
typeObj[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.orderTypeKey];
|
|
17433
|
-
}
|
|
17434
|
-
onChange(_objectSpread2(_objectSpread2(_objectSpread2({}, value), typeObj), {}, _defineProperty({}, (_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.systemOrder]), {}, {
|
|
17435
|
-
showOrderInfo: showOrderInfo,
|
|
17436
|
-
orders: orders
|
|
17437
|
-
}))));
|
|
17438
|
-
});
|
|
17439
|
-
case 1:
|
|
17440
|
-
case "end":
|
|
17441
|
-
return _context.stop();
|
|
17442
|
-
}
|
|
17443
|
-
}, _callee);
|
|
17444
|
-
}));
|
|
17445
|
-
return function getOrderList(_x) {
|
|
17446
|
-
return _ref.apply(this, arguments);
|
|
17447
|
-
};
|
|
17448
|
-
}();
|
|
17449
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17450
|
-
var _typeMap$type12;
|
|
17451
|
-
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17452
|
-
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17453
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17454
|
-
var newValue = _objectSpread2({}, value);
|
|
17455
|
-
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17456
|
-
if (typeName === '1') {
|
|
17457
|
-
var _typeMap$type13;
|
|
17458
|
-
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17459
|
-
mode: isStrict
|
|
17460
|
-
});
|
|
17461
|
-
} else if (typeName === '2') {
|
|
17462
|
-
var _typeMap$type14;
|
|
17463
|
-
// 切换到非原单,清空列表
|
|
17464
|
-
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17465
|
-
}
|
|
17466
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17467
|
-
};
|
|
17468
|
-
var handleModeChange = function handleModeChange(mode) {
|
|
17469
|
-
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17470
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
17471
|
-
setIsStrict(mode);
|
|
17472
|
-
if (!isOriginalOrder) return;
|
|
17473
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
17474
|
-
mode: mode
|
|
17475
|
-
}))));
|
|
17476
|
-
};
|
|
17477
|
-
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17478
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17479
|
-
var mode = _ref3.mode,
|
|
17480
|
-
sysOrderNo = _ref3.sysOrderNo;
|
|
17481
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
17482
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
17483
|
-
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17484
|
-
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17485
|
-
});
|
|
17486
|
-
var goodDetails = (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) ? (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], true) : [];
|
|
17487
|
-
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17488
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
17489
|
-
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17490
|
-
}) : goodDetails;
|
|
17491
|
-
};
|
|
17492
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17493
|
-
var _typeMap$type20;
|
|
17494
|
-
var newValue = _objectSpread2({}, value);
|
|
17495
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = val || [];
|
|
17496
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17497
|
-
};
|
|
17498
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17499
|
-
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17500
|
-
var newValue = _objectSpread2({}, value);
|
|
17501
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
|
|
17502
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderBillType) {
|
|
17503
|
-
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17504
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
|
|
17505
|
-
var targetOrder = val && orders.find(function (oItem) {
|
|
17506
|
-
var _typeMap$type24;
|
|
17507
|
-
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17508
|
-
});
|
|
17509
|
-
newValue[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.orderTypeKey];
|
|
17510
|
-
}
|
|
17511
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
17512
|
-
var _typeMap$type28;
|
|
17513
|
-
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)] = [];
|
|
17514
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
17515
|
-
var _typeMap$type30;
|
|
17516
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)] = getGoodDetails({
|
|
17517
|
-
mode: isStrict,
|
|
17518
|
-
sysOrderNo: val
|
|
17519
|
-
});
|
|
17520
|
-
}
|
|
17521
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17522
|
-
};
|
|
17523
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
17524
|
-
var showChangeBtn = React.useMemo(function () {
|
|
17525
|
-
var _typeMap$type31;
|
|
17526
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17527
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17528
|
-
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
17529
|
-
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17530
|
-
var newValue = _objectSpread2({}, value);
|
|
17531
|
-
// 原订单商品
|
|
17532
|
-
var originTradeGoodList = getGoodDetails({
|
|
17533
|
-
mode: isStrict
|
|
17534
|
-
}) || [];
|
|
17535
|
-
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17536
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
|
|
17537
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17538
|
-
return skuList.includes(item.uuid);
|
|
17539
|
-
});
|
|
17540
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17541
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)], isStrict]);
|
|
17542
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17543
|
-
gutter: 8,
|
|
17544
|
-
wrap: true,
|
|
17545
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key) || "".concat(Date.now())
|
|
17546
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17547
|
-
className: "gutter-row",
|
|
17548
|
-
xs: {
|
|
17549
|
-
span: 11
|
|
17550
|
-
},
|
|
17551
|
-
sm: {
|
|
17552
|
-
span: 6
|
|
17553
|
-
}
|
|
17554
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
17555
|
-
style: {
|
|
17556
|
-
marginBottom: '8px'
|
|
17557
|
-
},
|
|
17558
|
-
disabled: disabled,
|
|
17559
|
-
allowClear: false,
|
|
17560
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.systemOrderNo)],
|
|
17561
|
-
onChange: function onChange(val) {
|
|
17562
|
-
return changeSystemOrderHandle(val);
|
|
17563
|
-
},
|
|
17564
|
-
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17565
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
|
|
17566
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17567
|
-
key: item[typeMap$2[type].oIdKey],
|
|
17568
|
-
value: item[typeMap$2[type].oIdKey],
|
|
17569
|
-
label: item[typeMap$2[type].oIdKey]
|
|
17570
|
-
}, item[typeMap$2[type].oIdKey]);
|
|
17571
|
-
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17572
|
-
className: "gutter-row",
|
|
17573
|
-
xs: {
|
|
17574
|
-
span: 11
|
|
17575
|
-
},
|
|
17576
|
-
sm: {
|
|
17577
|
-
span: 6
|
|
17578
|
-
}
|
|
17579
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
17580
|
-
style: {
|
|
17581
|
-
marginBottom: '8px'
|
|
17582
|
-
},
|
|
17583
|
-
disabled: disabled,
|
|
17584
|
-
allowClear: false,
|
|
17585
|
-
options: reasonList,
|
|
17586
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.typeName)],
|
|
17587
|
-
onChange: function onChange(val) {
|
|
17588
|
-
return changeTypeHandle(val);
|
|
17589
|
-
}
|
|
17590
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrderBillType) && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17591
|
-
className: "gutter-row",
|
|
17592
|
-
xs: {
|
|
17593
|
-
span: 11
|
|
17594
|
-
},
|
|
17595
|
-
sm: {
|
|
17596
|
-
span: 6
|
|
17597
|
-
}
|
|
17598
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
17599
|
-
value: 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.systemOrderBillType)],
|
|
17600
|
-
disabled: disabled,
|
|
17601
|
-
readOnly: true
|
|
17602
|
-
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17603
|
-
key: 'reissueGoods'
|
|
17604
|
-
}, other), {}, {
|
|
17605
|
-
type: type,
|
|
17606
|
-
disabled: disabled,
|
|
17607
|
-
canUpdateNumber: showChangeBtn,
|
|
17608
|
-
showChangeBtn: showChangeBtn,
|
|
17609
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17610
|
-
value: value === null || value === void 0 ? void 0 : value["".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)],
|
|
17611
|
-
onChange: function onChange(val) {
|
|
17612
|
-
return changeGoodHandle(val);
|
|
17613
|
-
},
|
|
17614
|
-
onModeChange: handleModeChange,
|
|
17615
|
-
showModeBtn: false,
|
|
17616
|
-
isStrict: isStrict,
|
|
17617
|
-
tradeGoods: {
|
|
17618
|
-
originDataSource: getGoodDetails({
|
|
17619
|
-
mode: isStrict
|
|
17620
|
-
}),
|
|
17621
|
-
selectedGoodsChange: selectedGoodsChange
|
|
17622
|
-
}
|
|
17623
|
-
})));
|
|
17624
|
-
};
|
|
17625
|
-
|
|
17626
16637
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
17627
16638
|
styleInject(css_248z$a);
|
|
17628
16639
|
|
|
@@ -18099,12 +17110,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
18099
17110
|
};
|
|
18100
17111
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
18101
17112
|
|
|
18102
|
-
var _excluded$
|
|
17113
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
18103
17114
|
function CommonStatus(props) {
|
|
18104
17115
|
var onChange = props.onChange,
|
|
18105
17116
|
value = props.value,
|
|
18106
17117
|
failValue = props.failValue,
|
|
18107
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17118
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
18108
17119
|
var changeHandle = function changeHandle(val) {
|
|
18109
17120
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
18110
17121
|
status: val,
|
|
@@ -18144,15 +17155,10 @@ var typeInitValueMap$1 = {
|
|
|
18144
17155
|
initValue: [{
|
|
18145
17156
|
billNo: ''
|
|
18146
17157
|
}]
|
|
18147
|
-
},
|
|
18148
|
-
5: {
|
|
18149
|
-
initValue: [{
|
|
18150
|
-
billNo: ''
|
|
18151
|
-
}]
|
|
18152
17158
|
}
|
|
18153
17159
|
};
|
|
18154
17160
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
18155
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4
|
|
17161
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18156
17162
|
var _props$value = props.value,
|
|
18157
17163
|
value = _props$value === void 0 ? [] : _props$value,
|
|
18158
17164
|
onChange = props.onChange,
|
|
@@ -18174,7 +17180,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18174
17180
|
maxHeight: '300px',
|
|
18175
17181
|
overflowY: 'auto'
|
|
18176
17182
|
}
|
|
18177
|
-
}, [1, 2, 3, 4
|
|
17183
|
+
}, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
18178
17184
|
};
|
|
18179
17185
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
18180
17186
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -18231,17 +17237,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18231
17237
|
return changeInputHandle(e.target.value, 'billNo');
|
|
18232
17238
|
},
|
|
18233
17239
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18234
|
-
})) : null, type === 5 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18235
|
-
disabled: disabled,
|
|
18236
|
-
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18237
|
-
onChange: function onChange(e) {
|
|
18238
|
-
return changeInputHandle(e.target.value, 'billNo');
|
|
18239
|
-
},
|
|
18240
|
-
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
18241
17240
|
})) : null) : null);
|
|
18242
17241
|
};
|
|
18243
17242
|
|
|
18244
|
-
var _excluded$
|
|
17243
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18245
17244
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
18246
17245
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18247
17246
|
var _props$value = props.value,
|
|
@@ -18251,7 +17250,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18251
17250
|
failValue = props.failValue,
|
|
18252
17251
|
_props$type = props.type,
|
|
18253
17252
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18254
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17253
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
18255
17254
|
var _useState = React.useState(0),
|
|
18256
17255
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18257
17256
|
changeIndex = _useState2[0],
|
|
@@ -18317,7 +17316,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18317
17316
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
18318
17317
|
};
|
|
18319
17318
|
|
|
18320
|
-
var _excluded$
|
|
17319
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18321
17320
|
var MsgStatus = function MsgStatus(props) {
|
|
18322
17321
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18323
17322
|
var _props$value = props.value,
|
|
@@ -18327,7 +17326,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18327
17326
|
failValue = props.failValue,
|
|
18328
17327
|
_props$type = props.type,
|
|
18329
17328
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18330
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17329
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
18331
17330
|
var _useState = React.useState(0),
|
|
18332
17331
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18333
17332
|
changeIndex = _useState2[0],
|
|
@@ -18358,7 +17357,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18358
17357
|
onClick: function onClick() {
|
|
18359
17358
|
return setChangeIndex(index);
|
|
18360
17359
|
}
|
|
18361
|
-
}, kmkfUtils.msgTypeCh[key]
|
|
17360
|
+
}, kmkfUtils.msgTypeCh[key], item.ruleName);
|
|
18362
17361
|
}))) : null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
18363
17362
|
showSearch: true,
|
|
18364
17363
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -18396,8 +17395,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
18396
17395
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
18397
17396
|
};
|
|
18398
17397
|
|
|
18399
|
-
var _excluded$
|
|
18400
|
-
var typeMap$
|
|
17398
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17399
|
+
var typeMap$2 = {
|
|
18401
17400
|
BS_E3_REISSUE_GOODS: {
|
|
18402
17401
|
key: 'bsE3ReissueGoods',
|
|
18403
17402
|
typeName: 'bsE3ReissueType',
|
|
@@ -18414,7 +17413,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18414
17413
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18415
17414
|
disabled = props.disabled,
|
|
18416
17415
|
type = props.type,
|
|
18417
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17416
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
18418
17417
|
var getOrderFlag = React.useRef(false);
|
|
18419
17418
|
var _useState = React.useState(false),
|
|
18420
17419
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18423,10 +17422,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18423
17422
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
18424
17423
|
React.useEffect(function () {
|
|
18425
17424
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18426
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17425
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
18427
17426
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18428
17427
|
getOrderFlag.current = true;
|
|
18429
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17428
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
18430
17429
|
}
|
|
18431
17430
|
return;
|
|
18432
17431
|
}, [value]);
|
|
@@ -18450,7 +17449,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18450
17449
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18451
17450
|
while (1) switch (_context.prev = _context.next) {
|
|
18452
17451
|
case 0:
|
|
18453
|
-
(_typeMap$type4 = typeMap$
|
|
17452
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18454
17453
|
var _typeMap$type5, _typeMap$type6;
|
|
18455
17454
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
18456
17455
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18459,7 +17458,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18459
17458
|
billNo: orderSn
|
|
18460
17459
|
};
|
|
18461
17460
|
});
|
|
18462
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17461
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
18463
17462
|
showOrderInfo: showOrderInfo,
|
|
18464
17463
|
orders: orders
|
|
18465
17464
|
}))));
|
|
@@ -18480,25 +17479,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18480
17479
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
18481
17480
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18482
17481
|
var newValue = _objectSpread2({}, value);
|
|
18483
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
17482
|
+
newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
18484
17483
|
if (typeName === '1') {
|
|
18485
17484
|
var _typeMap$type8;
|
|
18486
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17485
|
+
newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
18487
17486
|
mode: isStrict
|
|
18488
17487
|
});
|
|
18489
17488
|
} else if (typeName === '2') {
|
|
18490
17489
|
var _typeMap$type9;
|
|
18491
17490
|
// 切换到非原单,清空列表
|
|
18492
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17491
|
+
newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
18493
17492
|
}
|
|
18494
17493
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18495
17494
|
};
|
|
18496
17495
|
var handleModeChange = function handleModeChange(mode) {
|
|
18497
17496
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
18498
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$
|
|
17497
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
18499
17498
|
setIsStrict(mode);
|
|
18500
17499
|
if (!isOriginalOrder) return;
|
|
18501
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$
|
|
17500
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
|
|
18502
17501
|
mode: mode
|
|
18503
17502
|
}))));
|
|
18504
17503
|
};
|
|
@@ -18506,8 +17505,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18506
17505
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
18507
17506
|
var mode = _ref3.mode,
|
|
18508
17507
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18509
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
18510
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
17508
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
|
|
17509
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
|
|
18511
17510
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18512
17511
|
return order.orderSn === systemOrderNo;
|
|
18513
17512
|
});
|
|
@@ -18520,19 +17519,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18520
17519
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18521
17520
|
var _typeMap$type14;
|
|
18522
17521
|
var newValue = _objectSpread2({}, value);
|
|
18523
|
-
newValue["".concat(typeMap$
|
|
17522
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
|
|
18524
17523
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18525
17524
|
};
|
|
18526
17525
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18527
17526
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
18528
17527
|
var newValue = _objectSpread2({}, value);
|
|
18529
|
-
newValue["".concat(typeMap$
|
|
18530
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$
|
|
17528
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
|
|
17529
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
18531
17530
|
var _typeMap$type17;
|
|
18532
|
-
newValue["".concat(typeMap$
|
|
18533
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$
|
|
17531
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
|
|
17532
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18534
17533
|
var _typeMap$type19;
|
|
18535
|
-
newValue["".concat(typeMap$
|
|
17534
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
|
|
18536
17535
|
mode: isStrict,
|
|
18537
17536
|
sysOrderNo: val
|
|
18538
17537
|
});
|
|
@@ -18542,8 +17541,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18542
17541
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18543
17542
|
var showChangeBtn = React.useMemo(function () {
|
|
18544
17543
|
var _typeMap$type20;
|
|
18545
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
18546
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$
|
|
17544
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
17545
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
18547
17546
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18548
17547
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
18549
17548
|
var newValue = _objectSpread2({}, value);
|
|
@@ -18552,12 +17551,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18552
17551
|
mode: isStrict
|
|
18553
17552
|
}) || [];
|
|
18554
17553
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18555
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18556
|
-
newValue["".concat(typeMap$
|
|
17554
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
17555
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18557
17556
|
return skuList.includes(item.uuid);
|
|
18558
17557
|
});
|
|
18559
17558
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18560
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17559
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
18561
17560
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18562
17561
|
gutter: 8,
|
|
18563
17562
|
wrap: true,
|
|
@@ -18576,12 +17575,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18576
17575
|
},
|
|
18577
17576
|
disabled: disabled,
|
|
18578
17577
|
allowClear: false,
|
|
18579
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17578
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
18580
17579
|
onChange: function onChange(val) {
|
|
18581
17580
|
return changeSystemOrderHandle(val);
|
|
18582
17581
|
},
|
|
18583
17582
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18584
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$
|
|
17583
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18585
17584
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18586
17585
|
key: item.billNo,
|
|
18587
17586
|
value: item.billNo,
|
|
@@ -18602,7 +17601,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18602
17601
|
disabled: disabled,
|
|
18603
17602
|
allowClear: false,
|
|
18604
17603
|
options: reasonList,
|
|
18605
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17604
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
18606
17605
|
onChange: function onChange(val) {
|
|
18607
17606
|
return changeTypeHandle(val);
|
|
18608
17607
|
}
|
|
@@ -18614,7 +17613,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18614
17613
|
canUpdateNumber: showChangeBtn,
|
|
18615
17614
|
showChangeBtn: showChangeBtn,
|
|
18616
17615
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18617
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17616
|
+
value: value === null || value === void 0 ? void 0 : value["".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)],
|
|
18618
17617
|
onChange: function onChange(val) {
|
|
18619
17618
|
return changeGoodHandle(val);
|
|
18620
17619
|
},
|
|
@@ -18630,9 +17629,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18630
17629
|
})));
|
|
18631
17630
|
};
|
|
18632
17631
|
|
|
18633
|
-
var _excluded$
|
|
17632
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
18634
17633
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18635
|
-
var typeMap$
|
|
17634
|
+
var typeMap$3 = {
|
|
18636
17635
|
GY_REISSUE_GOODS: {
|
|
18637
17636
|
key: 'gyReissueGoods',
|
|
18638
17637
|
name: '管易',
|
|
@@ -18659,7 +17658,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18659
17658
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18660
17659
|
disabled = props.disabled,
|
|
18661
17660
|
type = props.type,
|
|
18662
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17661
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
18663
17662
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
|
|
18664
17663
|
var _order$platformCode;
|
|
18665
17664
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -18671,10 +17670,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18671
17670
|
setIsStrict = _useState2[1];
|
|
18672
17671
|
React.useEffect(function () {
|
|
18673
17672
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18674
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17673
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
18675
17674
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18676
17675
|
getOrderFlag.current = true;
|
|
18677
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17676
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
18678
17677
|
}
|
|
18679
17678
|
return;
|
|
18680
17679
|
}, [value]);
|
|
@@ -18684,7 +17683,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18684
17683
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18685
17684
|
while (1) switch (_context.prev = _context.next) {
|
|
18686
17685
|
case 0:
|
|
18687
|
-
(_typeMap$type4 = typeMap$
|
|
17686
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18688
17687
|
var _typeMap$type5, _typeMap$type6;
|
|
18689
17688
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
18690
17689
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18707,7 +17706,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18707
17706
|
shopCode: shopCode
|
|
18708
17707
|
});
|
|
18709
17708
|
});
|
|
18710
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17709
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
18711
17710
|
showOrderInfo: showOrderInfo,
|
|
18712
17711
|
orders: orders
|
|
18713
17712
|
}))));
|
|
@@ -18725,28 +17724,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
18725
17724
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
18726
17725
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
18727
17726
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
18728
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$
|
|
17727
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
18729
17728
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18730
17729
|
var newValue = _objectSpread2({}, value);
|
|
18731
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17730
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
18732
17731
|
if (typeName === '1') {
|
|
18733
17732
|
var _typeMap$type9;
|
|
18734
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17733
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
18735
17734
|
mode: isStrict
|
|
18736
17735
|
});
|
|
18737
17736
|
} else if (typeName === '2') {
|
|
18738
17737
|
var _typeMap$type10;
|
|
18739
17738
|
// 切换到非原单,清空列表
|
|
18740
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
17739
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
18741
17740
|
}
|
|
18742
17741
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18743
17742
|
};
|
|
18744
17743
|
var handleModeChange = function handleModeChange(mode) {
|
|
18745
17744
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
18746
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$
|
|
17745
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
18747
17746
|
setIsStrict(mode);
|
|
18748
17747
|
if (!isOriginalOrder) return;
|
|
18749
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$
|
|
17748
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
18750
17749
|
mode: mode
|
|
18751
17750
|
}))));
|
|
18752
17751
|
};
|
|
@@ -18754,8 +17753,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18754
17753
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
18755
17754
|
var mode = _ref3.mode,
|
|
18756
17755
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18757
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18758
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$
|
|
17756
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
17757
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
18759
17758
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18760
17759
|
return order.code === systemOrderNo;
|
|
18761
17760
|
});
|
|
@@ -18768,10 +17767,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18768
17767
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18769
17768
|
var _typeMap$type15;
|
|
18770
17769
|
var newValue = _objectSpread2({}, value);
|
|
18771
|
-
newValue["".concat(typeMap$
|
|
17770
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
18772
17771
|
var _typeMap$type16, _typeMap$type17;
|
|
18773
|
-
item["".concat(typeMap$
|
|
18774
|
-
item["".concat(typeMap$
|
|
17772
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
17773
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
18775
17774
|
return item;
|
|
18776
17775
|
});
|
|
18777
17776
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -18779,13 +17778,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
18779
17778
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18780
17779
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
18781
17780
|
var newValue = _objectSpread2({}, value);
|
|
18782
|
-
newValue["".concat(typeMap$
|
|
18783
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$
|
|
17781
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
17782
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18784
17783
|
var _typeMap$type20;
|
|
18785
|
-
newValue["".concat(typeMap$
|
|
18786
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$
|
|
17784
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
17785
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
18787
17786
|
var _typeMap$type22;
|
|
18788
|
-
newValue["".concat(typeMap$
|
|
17787
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
18789
17788
|
mode: isStrict,
|
|
18790
17789
|
sysOrderNo: val
|
|
18791
17790
|
});
|
|
@@ -18800,18 +17799,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
18800
17799
|
mode: isStrict
|
|
18801
17800
|
}) || [];
|
|
18802
17801
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18803
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18804
|
-
newValue["".concat(typeMap$
|
|
17802
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
17803
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18805
17804
|
return skuList.includes(item.uuid);
|
|
18806
17805
|
});
|
|
18807
|
-
console.log('商品发生变化', newValue["".concat(typeMap$
|
|
17806
|
+
console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
18808
17807
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18809
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17808
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
18810
17809
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18811
17810
|
var showChangeBtn = React.useMemo(function () {
|
|
18812
17811
|
var _typeMap$type27;
|
|
18813
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
18814
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$
|
|
17812
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17813
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
18815
17814
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18816
17815
|
gutter: 8,
|
|
18817
17816
|
wrap: true
|
|
@@ -18829,12 +17828,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18829
17828
|
},
|
|
18830
17829
|
disabled: disabled,
|
|
18831
17830
|
allowClear: false,
|
|
18832
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17831
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
18833
17832
|
onChange: function onChange(val) {
|
|
18834
17833
|
return changeSystemOrderHandle(val);
|
|
18835
17834
|
},
|
|
18836
17835
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18837
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$
|
|
17836
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18838
17837
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18839
17838
|
key: item.billNo,
|
|
18840
17839
|
value: item.billNo,
|
|
@@ -18855,7 +17854,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18855
17854
|
disabled: disabled,
|
|
18856
17855
|
allowClear: false,
|
|
18857
17856
|
options: reasonList,
|
|
18858
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17857
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
18859
17858
|
onChange: function onChange(val) {
|
|
18860
17859
|
return changeTypeHandle(val);
|
|
18861
17860
|
}
|
|
@@ -18867,7 +17866,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18867
17866
|
canUpdateNumber: showChangeBtn,
|
|
18868
17867
|
showChangeBtn: showChangeBtn,
|
|
18869
17868
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18870
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17869
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
18871
17870
|
onChange: function onChange(val) {
|
|
18872
17871
|
return changeGoodHandle(val);
|
|
18873
17872
|
},
|
|
@@ -18933,7 +17932,6 @@ exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
|
18933
17932
|
exports.MsgStatus = MsgStatus;
|
|
18934
17933
|
exports.ParseLogistics = ParseLogistics;
|
|
18935
17934
|
exports.Payment = Payment;
|
|
18936
|
-
exports.PublicReissue = PublicReissue;
|
|
18937
17935
|
exports.Remark = RemarkInput;
|
|
18938
17936
|
exports.ReturnLogistics = ExpressLogistics;
|
|
18939
17937
|
exports.ShopName = ShopNameSelect;
|