@kmkf-fe-packages/basic-components 2.0.12-beta.8 → 2.0.15
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 +172 -1174
- package/dist/index.js +170 -1174
- package/dist/src/bs/SystemOrder/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -2
- 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/index.d.ts +0 -1
- 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,
|
|
@@ -14388,264 +14015,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14388
14015
|
};
|
|
14389
14016
|
};
|
|
14390
14017
|
|
|
14391
|
-
var getColumns$5 = function getColumns() {
|
|
14392
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
14393
|
-
_ref$text = _ref.text,
|
|
14394
|
-
disabled = _ref.disabled,
|
|
14395
|
-
updateHandle = _ref.updateHandle;
|
|
14396
|
-
return {
|
|
14397
|
-
JST_GOODS: [{
|
|
14398
|
-
dataIndex: 'name',
|
|
14399
|
-
title: '商品名称',
|
|
14400
|
-
width: 150,
|
|
14401
|
-
ellipsis: true,
|
|
14402
|
-
align: 'center'
|
|
14403
|
-
}, {
|
|
14404
|
-
dataIndex: 'skuId',
|
|
14405
|
-
title: '商品编码',
|
|
14406
|
-
width: 150,
|
|
14407
|
-
ellipsis: true,
|
|
14408
|
-
align: 'center'
|
|
14409
|
-
}, {
|
|
14410
|
-
dataIndex: 'iId',
|
|
14411
|
-
title: '款式编码',
|
|
14412
|
-
width: 150,
|
|
14413
|
-
ellipsis: true,
|
|
14414
|
-
align: 'center'
|
|
14415
|
-
}, {
|
|
14416
|
-
dataIndex: 'pic',
|
|
14417
|
-
title: '商品图片',
|
|
14418
|
-
ellipsis: true,
|
|
14419
|
-
align: 'center',
|
|
14420
|
-
width: 100,
|
|
14421
|
-
render: function render(val) {
|
|
14422
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14423
|
-
width: 60,
|
|
14424
|
-
src: val
|
|
14425
|
-
});
|
|
14426
|
-
}
|
|
14427
|
-
}, {
|
|
14428
|
-
dataIndex: 'propertiesValue',
|
|
14429
|
-
title: '规格值',
|
|
14430
|
-
width: 150,
|
|
14431
|
-
ellipsis: true,
|
|
14432
|
-
align: 'center'
|
|
14433
|
-
}, {
|
|
14434
|
-
dataIndex: 'saleBasePrice',
|
|
14435
|
-
title: '原价',
|
|
14436
|
-
width: 150,
|
|
14437
|
-
ellipsis: true,
|
|
14438
|
-
align: 'center',
|
|
14439
|
-
render: function render(price) {
|
|
14440
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14441
|
-
}
|
|
14442
|
-
}, {
|
|
14443
|
-
dataIndex: 'salePrice',
|
|
14444
|
-
title: '单价',
|
|
14445
|
-
ellipsis: true,
|
|
14446
|
-
align: 'center',
|
|
14447
|
-
width: 120,
|
|
14448
|
-
render: function render(val, record, index) {
|
|
14449
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14450
|
-
style: {
|
|
14451
|
-
width: 70
|
|
14452
|
-
},
|
|
14453
|
-
value: val,
|
|
14454
|
-
min: 0,
|
|
14455
|
-
precision: 2,
|
|
14456
|
-
onChange: function onChange(num) {
|
|
14457
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
14458
|
-
}
|
|
14459
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14460
|
-
}
|
|
14461
|
-
}, {
|
|
14462
|
-
dataIndex: 'qty',
|
|
14463
|
-
title: '数量',
|
|
14464
|
-
ellipsis: true,
|
|
14465
|
-
align: 'center',
|
|
14466
|
-
width: 100,
|
|
14467
|
-
render: function render(val, record, index) {
|
|
14468
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14469
|
-
style: {
|
|
14470
|
-
width: 70
|
|
14471
|
-
},
|
|
14472
|
-
value: val,
|
|
14473
|
-
min: 1,
|
|
14474
|
-
precision: 0,
|
|
14475
|
-
onChange: function onChange(num) {
|
|
14476
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
14477
|
-
}
|
|
14478
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14479
|
-
}
|
|
14480
|
-
}, {
|
|
14481
|
-
dataIndex: 'saleAmount',
|
|
14482
|
-
title: '总金额',
|
|
14483
|
-
width: 150,
|
|
14484
|
-
ellipsis: true,
|
|
14485
|
-
align: 'center',
|
|
14486
|
-
render: function render(val, record, index) {
|
|
14487
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
14488
|
-
}
|
|
14489
|
-
}, {
|
|
14490
|
-
dataIndex: 'batchId',
|
|
14491
|
-
title: '批次号',
|
|
14492
|
-
width: 150,
|
|
14493
|
-
ellipsis: true,
|
|
14494
|
-
align: 'center'
|
|
14495
|
-
}, {
|
|
14496
|
-
dataIndex: 'isGift',
|
|
14497
|
-
title: '是否赠品',
|
|
14498
|
-
ellipsis: true,
|
|
14499
|
-
align: 'center',
|
|
14500
|
-
width: 100,
|
|
14501
|
-
render: function render(val, record, index) {
|
|
14502
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14503
|
-
value: val,
|
|
14504
|
-
onChange: function onChange(value) {
|
|
14505
|
-
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
14506
|
-
},
|
|
14507
|
-
options: [{
|
|
14508
|
-
label: '是',
|
|
14509
|
-
value: true
|
|
14510
|
-
}, {
|
|
14511
|
-
label: '否',
|
|
14512
|
-
value: false
|
|
14513
|
-
}]
|
|
14514
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14515
|
-
}
|
|
14516
|
-
}, {
|
|
14517
|
-
dataIndex: 'outerOiId',
|
|
14518
|
-
title: '子订单号',
|
|
14519
|
-
width: 240,
|
|
14520
|
-
ellipsis: true,
|
|
14521
|
-
align: 'center'
|
|
14522
|
-
}],
|
|
14523
|
-
JST_REISSUE_GOODS: [{
|
|
14524
|
-
dataIndex: 'name',
|
|
14525
|
-
title: '商品名称',
|
|
14526
|
-
width: 150,
|
|
14527
|
-
ellipsis: true,
|
|
14528
|
-
align: 'center'
|
|
14529
|
-
}, {
|
|
14530
|
-
dataIndex: 'skuId',
|
|
14531
|
-
title: '商品编码',
|
|
14532
|
-
width: 150,
|
|
14533
|
-
ellipsis: true,
|
|
14534
|
-
align: 'center'
|
|
14535
|
-
}, {
|
|
14536
|
-
dataIndex: 'iId',
|
|
14537
|
-
title: '款式编码',
|
|
14538
|
-
width: 150,
|
|
14539
|
-
ellipsis: true,
|
|
14540
|
-
align: 'center'
|
|
14541
|
-
}, {
|
|
14542
|
-
dataIndex: 'pic',
|
|
14543
|
-
title: '商品图片',
|
|
14544
|
-
ellipsis: true,
|
|
14545
|
-
align: 'center',
|
|
14546
|
-
width: 100,
|
|
14547
|
-
render: function render(val) {
|
|
14548
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14549
|
-
width: 60,
|
|
14550
|
-
src: val
|
|
14551
|
-
});
|
|
14552
|
-
}
|
|
14553
|
-
}, {
|
|
14554
|
-
dataIndex: 'propertiesValue',
|
|
14555
|
-
title: '规格值',
|
|
14556
|
-
width: 150,
|
|
14557
|
-
ellipsis: true,
|
|
14558
|
-
align: 'center'
|
|
14559
|
-
}, {
|
|
14560
|
-
dataIndex: 'saleBasePrice',
|
|
14561
|
-
title: '原价',
|
|
14562
|
-
width: 150,
|
|
14563
|
-
ellipsis: true,
|
|
14564
|
-
align: 'center',
|
|
14565
|
-
render: function render(price) {
|
|
14566
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14567
|
-
}
|
|
14568
|
-
}, {
|
|
14569
|
-
dataIndex: 'salePrice',
|
|
14570
|
-
title: '单价',
|
|
14571
|
-
ellipsis: true,
|
|
14572
|
-
align: 'center',
|
|
14573
|
-
width: 120,
|
|
14574
|
-
render: function render(val, record, index) {
|
|
14575
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14576
|
-
style: {
|
|
14577
|
-
width: 70
|
|
14578
|
-
},
|
|
14579
|
-
value: val,
|
|
14580
|
-
min: 0,
|
|
14581
|
-
precision: 2,
|
|
14582
|
-
onChange: function onChange(num) {
|
|
14583
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
14584
|
-
}
|
|
14585
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14586
|
-
}
|
|
14587
|
-
}, {
|
|
14588
|
-
dataIndex: 'qty',
|
|
14589
|
-
title: '数量',
|
|
14590
|
-
ellipsis: true,
|
|
14591
|
-
align: 'center',
|
|
14592
|
-
width: 100,
|
|
14593
|
-
render: function render(val, record, index) {
|
|
14594
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14595
|
-
style: {
|
|
14596
|
-
width: 70
|
|
14597
|
-
},
|
|
14598
|
-
value: val,
|
|
14599
|
-
min: 1,
|
|
14600
|
-
precision: 0,
|
|
14601
|
-
onChange: function onChange(num) {
|
|
14602
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
14603
|
-
}
|
|
14604
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14605
|
-
}
|
|
14606
|
-
}, {
|
|
14607
|
-
dataIndex: 'isGift',
|
|
14608
|
-
title: '是否赠品',
|
|
14609
|
-
ellipsis: true,
|
|
14610
|
-
align: 'center',
|
|
14611
|
-
width: 100,
|
|
14612
|
-
render: function render(val, record, index) {
|
|
14613
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14614
|
-
value: val,
|
|
14615
|
-
onChange: function onChange(value) {
|
|
14616
|
-
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
14617
|
-
},
|
|
14618
|
-
options: [{
|
|
14619
|
-
label: '是',
|
|
14620
|
-
value: true
|
|
14621
|
-
}, {
|
|
14622
|
-
label: '否',
|
|
14623
|
-
value: false
|
|
14624
|
-
}]
|
|
14625
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14626
|
-
}
|
|
14627
|
-
}, {
|
|
14628
|
-
dataIndex: 'remark',
|
|
14629
|
-
title: '备注',
|
|
14630
|
-
width: 150,
|
|
14631
|
-
ellipsis: true,
|
|
14632
|
-
align: 'center',
|
|
14633
|
-
render: function render(val, record, index) {
|
|
14634
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14635
|
-
style: {
|
|
14636
|
-
width: 70
|
|
14637
|
-
},
|
|
14638
|
-
value: val,
|
|
14639
|
-
onChange: function onChange(e) {
|
|
14640
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
|
|
14641
|
-
}
|
|
14642
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14643
|
-
}
|
|
14644
|
-
}]
|
|
14645
|
-
};
|
|
14646
|
-
};
|
|
14647
|
-
|
|
14648
|
-
var getColumns$6 = function getColumns(_ref) {
|
|
14018
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
14649
14019
|
var _ref$text = _ref.text,
|
|
14650
14020
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14651
14021
|
disabled = _ref.disabled,
|
|
@@ -14758,7 +14128,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14758
14128
|
disabled = _ref.disabled,
|
|
14759
14129
|
updateHandle = _ref.updateHandle,
|
|
14760
14130
|
updateDataHandle = _ref.updateDataHandle;
|
|
14761
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(
|
|
14131
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14762
14132
|
text: text,
|
|
14763
14133
|
disabled: disabled,
|
|
14764
14134
|
updateHandle: updateHandle
|
|
@@ -14779,12 +14149,8 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14779
14149
|
disabled: disabled,
|
|
14780
14150
|
updateHandle: updateHandle,
|
|
14781
14151
|
updateDataHandle: updateDataHandle
|
|
14782
|
-
})), getColumns$5({
|
|
14783
|
-
text: text,
|
|
14784
|
-
disabled: disabled,
|
|
14785
|
-
updateHandle: updateHandle
|
|
14786
14152
|
})), {}, {
|
|
14787
|
-
default: getColumns$
|
|
14153
|
+
default: getColumns$5({
|
|
14788
14154
|
text: text,
|
|
14789
14155
|
disabled: disabled,
|
|
14790
14156
|
updateHandle: updateHandle
|
|
@@ -14888,19 +14254,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14888
14254
|
});
|
|
14889
14255
|
};
|
|
14890
14256
|
|
|
14891
|
-
var GoodsModalMap = {
|
|
14892
|
-
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14893
|
-
'WDT_GOODS': WdtGoodsModal,
|
|
14894
|
-
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14895
|
-
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14896
|
-
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14897
|
-
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14898
|
-
'GY_GOODS': GyGoodsModal$2,
|
|
14899
|
-
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14900
|
-
'JST_GOODS': JstGoodsModal,
|
|
14901
|
-
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14902
|
-
'OTHER_GOODS': GoodsModal$2
|
|
14903
|
-
};
|
|
14904
14257
|
var MAIN_FIELD = 'uuid';
|
|
14905
14258
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14906
14259
|
var columns = _ref.columns,
|
|
@@ -14962,9 +14315,6 @@ var getButtonText = function getButtonText() {
|
|
|
14962
14315
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14963
14316
|
return '选择管易ERP商品';
|
|
14964
14317
|
}
|
|
14965
|
-
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14966
|
-
return '选择聚水潭ERP商品';
|
|
14967
|
-
}
|
|
14968
14318
|
return '选择商品';
|
|
14969
14319
|
};
|
|
14970
14320
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -15064,7 +14414,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15064
14414
|
};
|
|
15065
14415
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15066
14416
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15067
|
-
var
|
|
14417
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15068
14418
|
return function (type) {
|
|
15069
14419
|
var columns = [];
|
|
15070
14420
|
switch (type) {
|
|
@@ -15075,13 +14425,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15075
14425
|
case 'BS_GOODS':
|
|
15076
14426
|
case 'WLN_GOODS':
|
|
15077
14427
|
case 'GY_GOODS':
|
|
15078
|
-
case 'JST_GOODS':
|
|
15079
|
-
case 'JST_REISSUE_GOODS':
|
|
15080
14428
|
case 'GY_REISSUE_GOODS':
|
|
15081
14429
|
{
|
|
15082
14430
|
columns = getColumnsMap({
|
|
15083
14431
|
text: text,
|
|
15084
|
-
disabled: disabled
|
|
14432
|
+
disabled: disabled,
|
|
15085
14433
|
updateHandle: updateHandle,
|
|
15086
14434
|
updateDataHandle: updateDataHandle
|
|
15087
14435
|
})[type];
|
|
@@ -15090,25 +14438,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15090
14438
|
case 'WDT_REISSUE_GOODS':
|
|
15091
14439
|
{
|
|
15092
14440
|
columns = getWdtReissueGoodColumns({
|
|
15093
|
-
disabled: disabled
|
|
14441
|
+
disabled: disabled,
|
|
15094
14442
|
updateHandle: updateHandle,
|
|
15095
|
-
operate:
|
|
14443
|
+
operate: operate
|
|
15096
14444
|
});
|
|
15097
14445
|
}
|
|
15098
14446
|
break;
|
|
15099
14447
|
case 'BS_E3_REISSUE_GOODS':
|
|
15100
14448
|
{
|
|
15101
14449
|
columns = getBsE3ReissueGoodColumns({
|
|
15102
|
-
disabled: disabled
|
|
14450
|
+
disabled: disabled,
|
|
15103
14451
|
updateHandle: updateHandle,
|
|
15104
|
-
operate:
|
|
14452
|
+
operate: operate
|
|
15105
14453
|
});
|
|
15106
14454
|
}
|
|
15107
14455
|
break;
|
|
15108
14456
|
default:
|
|
15109
14457
|
columns = getColumnsMap({
|
|
15110
14458
|
text: text,
|
|
15111
|
-
disabled: disabled
|
|
14459
|
+
disabled: disabled,
|
|
15112
14460
|
updateHandle: updateHandle,
|
|
15113
14461
|
updateDataHandle: updateDataHandle
|
|
15114
14462
|
})['default'];
|
|
@@ -15171,10 +14519,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15171
14519
|
return columnList;
|
|
15172
14520
|
}, [showHeader, value, disabled]);
|
|
15173
14521
|
var orderColumns = React.useMemo(function () {
|
|
15174
|
-
var columns = COLUMNS_MAP('',
|
|
15175
|
-
operate: false,
|
|
15176
|
-
disabled: true
|
|
15177
|
-
})(type);
|
|
14522
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
15178
14523
|
return [{
|
|
15179
14524
|
dataIndex: '',
|
|
15180
14525
|
title: '序号',
|
|
@@ -15258,23 +14603,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15258
14603
|
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
15259
14604
|
});
|
|
15260
14605
|
});
|
|
15261
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15262
|
-
newList = list.map(function (item) {
|
|
15263
|
-
return {
|
|
15264
|
-
name: item.goodName,
|
|
15265
|
-
skuId: item.goodNo,
|
|
15266
|
-
iId: item.styleCode,
|
|
15267
|
-
pic: item.goodPicUrl,
|
|
15268
|
-
propertiesValue: item.propertiesValue,
|
|
15269
|
-
saleBasePrice: item.retailPrice,
|
|
15270
|
-
salePrice: item.retailPrice,
|
|
15271
|
-
remark: '',
|
|
15272
|
-
uuid: kmkfUtils.uuid(),
|
|
15273
|
-
canDelete: true,
|
|
15274
|
-
canEdit: true,
|
|
15275
|
-
qty: 1
|
|
15276
|
-
};
|
|
15277
|
-
});
|
|
15278
14606
|
} else {
|
|
15279
14607
|
newList = list.map(function (item) {
|
|
15280
14608
|
var goodsId = item.goodsId,
|
|
@@ -15310,9 +14638,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15310
14638
|
}));
|
|
15311
14639
|
};
|
|
15312
14640
|
var handleChangeGoods = function handleChangeGoods() {
|
|
15313
|
-
refModal.current.open(shopCode
|
|
15314
|
-
value: value
|
|
15315
|
-
});
|
|
14641
|
+
refModal.current.open(shopCode);
|
|
15316
14642
|
};
|
|
15317
14643
|
var rowSelection = {
|
|
15318
14644
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -15329,7 +14655,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15329
14655
|
}
|
|
15330
14656
|
return params;
|
|
15331
14657
|
}, [tableSelect, selectedRowKeys]);
|
|
15332
|
-
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15333
14658
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15334
14659
|
style: {
|
|
15335
14660
|
float: 'right'
|
|
@@ -15357,7 +14682,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15357
14682
|
locale: {
|
|
15358
14683
|
emptyText: '暂无数据'
|
|
15359
14684
|
}
|
|
15360
|
-
})), /*#__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, {
|
|
15361
14710
|
ref: refModal,
|
|
15362
14711
|
onSubmit: onSubmit,
|
|
15363
14712
|
width: width,
|
|
@@ -16089,60 +15438,27 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
16089
15438
|
// 延迟10秒清除,保证订单的时效性
|
|
16090
15439
|
setTimeout(function () {
|
|
16091
15440
|
singletonMap$2.delete(orderNo);
|
|
16092
|
-
}, 1000 * 10);
|
|
16093
|
-
} else {
|
|
16094
|
-
doReject(res);
|
|
16095
|
-
}
|
|
16096
|
-
}).catch(doReject);
|
|
16097
|
-
});
|
|
16098
|
-
singletonMap$2.set(orderNo, p);
|
|
16099
|
-
}
|
|
16100
|
-
return singletonMap$2.get(orderNo);
|
|
16101
|
-
};
|
|
16102
|
-
var gyUtils = {
|
|
16103
|
-
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16104
|
-
};
|
|
16105
|
-
|
|
16106
|
-
var singletonMap$3 = new Map();
|
|
16107
|
-
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16108
|
-
if (!singletonMap$3.has(orderNo)) {
|
|
16109
|
-
var p = new Promise(function (resolve, reject) {
|
|
16110
|
-
var doReject = function doReject(err) {
|
|
16111
|
-
// 清空掉错误的请求记录
|
|
16112
|
-
// singletonMap.delete(orderNo);
|
|
16113
|
-
reject(err);
|
|
16114
|
-
};
|
|
16115
|
-
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16116
|
-
method: 'post',
|
|
16117
|
-
data: {
|
|
16118
|
-
soId: orderNo
|
|
16119
|
-
}
|
|
16120
|
-
}).then(function (data) {
|
|
16121
|
-
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16122
|
-
data.data = kmkfUtils.filterJstOrders({
|
|
16123
|
-
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16124
|
-
}, orderNo);
|
|
16125
|
-
resolve(data.data);
|
|
15441
|
+
}, 1000 * 10);
|
|
16126
15442
|
} else {
|
|
16127
|
-
doReject(
|
|
15443
|
+
doReject(res);
|
|
16128
15444
|
}
|
|
16129
15445
|
}).catch(doReject);
|
|
16130
15446
|
});
|
|
16131
|
-
singletonMap$
|
|
15447
|
+
singletonMap$2.set(orderNo, p);
|
|
16132
15448
|
}
|
|
16133
|
-
return singletonMap$
|
|
15449
|
+
return singletonMap$2.get(orderNo);
|
|
16134
15450
|
};
|
|
16135
|
-
var
|
|
16136
|
-
|
|
15451
|
+
var gyUtils = {
|
|
15452
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16137
15453
|
};
|
|
16138
15454
|
|
|
16139
|
-
var singletonMap$
|
|
15455
|
+
var singletonMap$3 = new Map();
|
|
16140
15456
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
16141
|
-
if (!singletonMap$
|
|
15457
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16142
15458
|
var p = new Promise(function (resolve, reject) {
|
|
16143
15459
|
var doReject = function doReject(err) {
|
|
16144
15460
|
// 清空掉错误的请求记录
|
|
16145
|
-
singletonMap$
|
|
15461
|
+
singletonMap$3.delete(orderNo);
|
|
16146
15462
|
reject(err);
|
|
16147
15463
|
};
|
|
16148
15464
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -16168,16 +15484,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
16168
15484
|
}
|
|
16169
15485
|
// 延迟10秒清除,保证订单的时效性
|
|
16170
15486
|
setTimeout(function () {
|
|
16171
|
-
singletonMap$
|
|
15487
|
+
singletonMap$3.delete(orderNo);
|
|
16172
15488
|
}, 1000 * 10);
|
|
16173
15489
|
} else {
|
|
16174
15490
|
doReject(data);
|
|
16175
15491
|
}
|
|
16176
15492
|
}).catch(doReject);
|
|
16177
15493
|
});
|
|
16178
|
-
singletonMap$
|
|
15494
|
+
singletonMap$3.set(orderNo, p);
|
|
16179
15495
|
}
|
|
16180
|
-
return singletonMap$
|
|
15496
|
+
return singletonMap$3.get(orderNo);
|
|
16181
15497
|
};
|
|
16182
15498
|
var kmUtils = {
|
|
16183
15499
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -16190,8 +15506,7 @@ var columnsMap = {
|
|
|
16190
15506
|
WLN_SYSTEM_ORDER: kmkfUtils.WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
16191
15507
|
WDT_SYSTEM_ORDER: kmkfUtils.WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
16192
15508
|
BS_E3_SYSTEM_ORDER: kmkfUtils.BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
16193
|
-
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
16194
|
-
JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns
|
|
15509
|
+
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
16195
15510
|
};
|
|
16196
15511
|
var rowKeyMap = {
|
|
16197
15512
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -16199,8 +15514,7 @@ var rowKeyMap = {
|
|
|
16199
15514
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
16200
15515
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
16201
15516
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
16202
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16203
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
15517
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
16204
15518
|
};
|
|
16205
15519
|
var index$1 = (function (props) {
|
|
16206
15520
|
var value = props.value,
|
|
@@ -16225,8 +15539,6 @@ var index$1 = (function (props) {
|
|
|
16225
15539
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
16226
15540
|
console.log('触发gy--getGyOrderList--1');
|
|
16227
15541
|
getGyOrderList(value.orderNo);
|
|
16228
|
-
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16229
|
-
getJstOrderList(value.orderNo);
|
|
16230
15542
|
}
|
|
16231
15543
|
}
|
|
16232
15544
|
}, [value, type]);
|
|
@@ -16382,41 +15694,18 @@ var index$1 = (function (props) {
|
|
|
16382
15694
|
return _ref5.apply(this, arguments);
|
|
16383
15695
|
};
|
|
16384
15696
|
}();
|
|
16385
|
-
var
|
|
15697
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16386
15698
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
16387
15699
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
16388
15700
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16389
|
-
case 0:
|
|
16390
|
-
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16391
|
-
var trades = data || [];
|
|
16392
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16393
|
-
orders: trades,
|
|
16394
|
-
showOrderInfo: trades
|
|
16395
|
-
}));
|
|
16396
|
-
});
|
|
16397
|
-
onceRef.current = false;
|
|
16398
|
-
case 2:
|
|
16399
|
-
case "end":
|
|
16400
|
-
return _context5.stop();
|
|
16401
|
-
}
|
|
16402
|
-
}, _callee5);
|
|
16403
|
-
}));
|
|
16404
|
-
return function getJstOrderList(_x5) {
|
|
16405
|
-
return _ref6.apply(this, arguments);
|
|
16406
|
-
};
|
|
16407
|
-
}();
|
|
16408
|
-
var getKmOrderList = /*#__PURE__*/function () {
|
|
16409
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16410
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16411
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
16412
15701
|
case 0:
|
|
16413
15702
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
16414
15703
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16415
15704
|
orders: trades,
|
|
16416
|
-
showOrderInfo: trades.map(function (
|
|
16417
|
-
var billNo =
|
|
16418
|
-
billType =
|
|
16419
|
-
billTag =
|
|
15705
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
15706
|
+
var billNo = _ref7.billNo,
|
|
15707
|
+
billType = _ref7.billType,
|
|
15708
|
+
billTag = _ref7.billTag;
|
|
16420
15709
|
return {
|
|
16421
15710
|
billNo: billNo,
|
|
16422
15711
|
billType: billType,
|
|
@@ -16428,18 +15717,18 @@ var index$1 = (function (props) {
|
|
|
16428
15717
|
onceRef.current = false;
|
|
16429
15718
|
case 2:
|
|
16430
15719
|
case "end":
|
|
16431
|
-
return
|
|
15720
|
+
return _context5.stop();
|
|
16432
15721
|
}
|
|
16433
|
-
},
|
|
15722
|
+
}, _callee5);
|
|
16434
15723
|
}));
|
|
16435
|
-
return function getKmOrderList(
|
|
16436
|
-
return
|
|
15724
|
+
return function getKmOrderList(_x5) {
|
|
15725
|
+
return _ref6.apply(this, arguments);
|
|
16437
15726
|
};
|
|
16438
15727
|
}();
|
|
16439
15728
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
16440
|
-
var
|
|
16441
|
-
return _regeneratorRuntime().wrap(function
|
|
16442
|
-
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) {
|
|
16443
15732
|
case 0:
|
|
16444
15733
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
16445
15734
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -16447,15 +15736,15 @@ var index$1 = (function (props) {
|
|
|
16447
15736
|
});
|
|
16448
15737
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16449
15738
|
orders: trades,
|
|
16450
|
-
showOrderInfo: trades.map(function (
|
|
16451
|
-
var billNo =
|
|
16452
|
-
billType =
|
|
16453
|
-
billTag =
|
|
16454
|
-
tradeTagName =
|
|
16455
|
-
deliveryState =
|
|
16456
|
-
vipCode =
|
|
16457
|
-
shopCode =
|
|
16458
|
-
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);
|
|
16459
15748
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
16460
15749
|
billNo: billNo,
|
|
16461
15750
|
billType: billType,
|
|
@@ -16472,12 +15761,12 @@ var index$1 = (function (props) {
|
|
|
16472
15761
|
onceRef.current = false;
|
|
16473
15762
|
case 2:
|
|
16474
15763
|
case "end":
|
|
16475
|
-
return
|
|
15764
|
+
return _context6.stop();
|
|
16476
15765
|
}
|
|
16477
|
-
},
|
|
15766
|
+
}, _callee6);
|
|
16478
15767
|
}));
|
|
16479
|
-
return function getGyOrderList(
|
|
16480
|
-
return
|
|
15768
|
+
return function getGyOrderList(_x6) {
|
|
15769
|
+
return _ref8.apply(this, arguments);
|
|
16481
15770
|
};
|
|
16482
15771
|
}();
|
|
16483
15772
|
var rowSelection = {
|
|
@@ -16626,31 +15915,6 @@ var componentMap$1 = {
|
|
|
16626
15915
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16627
15916
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16628
15917
|
}
|
|
16629
|
-
},
|
|
16630
|
-
JST_GOODS: {
|
|
16631
|
-
type: 'jst',
|
|
16632
|
-
key: 'jstGoods',
|
|
16633
|
-
name: '聚水潭',
|
|
16634
|
-
orderNo: 'dealCode',
|
|
16635
|
-
goodDetailOrderNo: 'originalDealCode',
|
|
16636
|
-
eventNameMap: {
|
|
16637
|
-
// pubsub 事件
|
|
16638
|
-
type: 'jstType',
|
|
16639
|
-
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
16640
|
-
selectListReturn: 'jstSelectListReturn',
|
|
16641
|
-
selectList: 'jstSelectList',
|
|
16642
|
-
reissueSelectList: 'jstReissueSelectList',
|
|
16643
|
-
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16644
|
-
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16645
|
-
changeShopCode: 'jstChangeShopCode',
|
|
16646
|
-
reissueType: 'jstReissueType',
|
|
16647
|
-
returnType: 'jstReturnType',
|
|
16648
|
-
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16649
|
-
returnSelectList: 'jstReturnSelectList',
|
|
16650
|
-
deleteGood: 'jstDeleteGood',
|
|
16651
|
-
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16652
|
-
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16653
|
-
}
|
|
16654
15918
|
}
|
|
16655
15919
|
};
|
|
16656
15920
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17370,260 +16634,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17370
16634
|
})));
|
|
17371
16635
|
};
|
|
17372
16636
|
|
|
17373
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17374
|
-
var typeMap$2 = {
|
|
17375
|
-
JST_REISSUE_GOODS: {
|
|
17376
|
-
key: 'jstReissueGoods',
|
|
17377
|
-
typeName: 'jstReissueType',
|
|
17378
|
-
systemOrder: 'jstSystemOrder',
|
|
17379
|
-
systemOrderNo: 'jstSystemOrderNo',
|
|
17380
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17381
|
-
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17382
|
-
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17383
|
-
orderTypeKey: 'orderType',
|
|
17384
|
-
oIdKey: 'oId',
|
|
17385
|
-
outerOiIdKey: 'outerOiId',
|
|
17386
|
-
goodDetailsKey: 'items'
|
|
17387
|
-
}
|
|
17388
|
-
};
|
|
17389
|
-
var PublicReissue = function PublicReissue(props) {
|
|
17390
|
-
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17391
|
-
var value = props.value,
|
|
17392
|
-
onChange = props.onChange,
|
|
17393
|
-
_props$reasonList = props.reasonList,
|
|
17394
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17395
|
-
disabled = props.disabled,
|
|
17396
|
-
type = props.type,
|
|
17397
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
17398
|
-
var getOrderFlag = React.useRef(false);
|
|
17399
|
-
var _useState = React.useState(false),
|
|
17400
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17401
|
-
isStrict = _useState2[0],
|
|
17402
|
-
setIsStrict = _useState2[1];
|
|
17403
|
-
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17404
|
-
React.useEffect(function () {
|
|
17405
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17406
|
-
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)) {
|
|
17407
|
-
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17408
|
-
getOrderFlag.current = true;
|
|
17409
|
-
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);
|
|
17410
|
-
}
|
|
17411
|
-
return;
|
|
17412
|
-
}, [value]);
|
|
17413
|
-
var getOrderList = /*#__PURE__*/function () {
|
|
17414
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17415
|
-
var _typeMap$type4;
|
|
17416
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17417
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17418
|
-
case 0:
|
|
17419
|
-
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17420
|
-
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17421
|
-
var orders = data || [];
|
|
17422
|
-
var showOrderInfo = orders.map(function (orderItem) {
|
|
17423
|
-
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17424
|
-
});
|
|
17425
|
-
var typeObj = {};
|
|
17426
|
-
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];
|
|
17427
|
-
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) {
|
|
17428
|
-
var _typeMap$type8, _typeMap$type9;
|
|
17429
|
-
var targetOrder = orders.find(function (oItem) {
|
|
17430
|
-
var _typeMap$type7;
|
|
17431
|
-
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17432
|
-
});
|
|
17433
|
-
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];
|
|
17434
|
-
}
|
|
17435
|
-
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]), {}, {
|
|
17436
|
-
showOrderInfo: showOrderInfo,
|
|
17437
|
-
orders: orders
|
|
17438
|
-
}))));
|
|
17439
|
-
});
|
|
17440
|
-
case 1:
|
|
17441
|
-
case "end":
|
|
17442
|
-
return _context.stop();
|
|
17443
|
-
}
|
|
17444
|
-
}, _callee);
|
|
17445
|
-
}));
|
|
17446
|
-
return function getOrderList(_x) {
|
|
17447
|
-
return _ref.apply(this, arguments);
|
|
17448
|
-
};
|
|
17449
|
-
}();
|
|
17450
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17451
|
-
var _typeMap$type12;
|
|
17452
|
-
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17453
|
-
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17454
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17455
|
-
var newValue = _objectSpread2({}, value);
|
|
17456
|
-
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17457
|
-
if (typeName === '1') {
|
|
17458
|
-
var _typeMap$type13;
|
|
17459
|
-
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17460
|
-
mode: isStrict
|
|
17461
|
-
});
|
|
17462
|
-
} else if (typeName === '2') {
|
|
17463
|
-
var _typeMap$type14;
|
|
17464
|
-
// 切换到非原单,清空列表
|
|
17465
|
-
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17466
|
-
}
|
|
17467
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17468
|
-
};
|
|
17469
|
-
var handleModeChange = function handleModeChange(mode) {
|
|
17470
|
-
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17471
|
-
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';
|
|
17472
|
-
setIsStrict(mode);
|
|
17473
|
-
if (!isOriginalOrder) return;
|
|
17474
|
-
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({
|
|
17475
|
-
mode: mode
|
|
17476
|
-
}))));
|
|
17477
|
-
};
|
|
17478
|
-
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17479
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17480
|
-
var mode = _ref3.mode,
|
|
17481
|
-
sysOrderNo = _ref3.sysOrderNo;
|
|
17482
|
-
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];
|
|
17483
|
-
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];
|
|
17484
|
-
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17485
|
-
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17486
|
-
});
|
|
17487
|
-
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) : [];
|
|
17488
|
-
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17489
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
17490
|
-
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17491
|
-
}) : goodDetails;
|
|
17492
|
-
};
|
|
17493
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17494
|
-
var _typeMap$type20;
|
|
17495
|
-
var newValue = _objectSpread2({}, value);
|
|
17496
|
-
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 || [];
|
|
17497
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17498
|
-
};
|
|
17499
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17500
|
-
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17501
|
-
var newValue = _objectSpread2({}, value);
|
|
17502
|
-
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;
|
|
17503
|
-
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) {
|
|
17504
|
-
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17505
|
-
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) || [];
|
|
17506
|
-
var targetOrder = val && orders.find(function (oItem) {
|
|
17507
|
-
var _typeMap$type24;
|
|
17508
|
-
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17509
|
-
});
|
|
17510
|
-
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];
|
|
17511
|
-
}
|
|
17512
|
-
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])) {
|
|
17513
|
-
var _typeMap$type28;
|
|
17514
|
-
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)] = [];
|
|
17515
|
-
} 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])) {
|
|
17516
|
-
var _typeMap$type30;
|
|
17517
|
-
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({
|
|
17518
|
-
mode: isStrict,
|
|
17519
|
-
sysOrderNo: val
|
|
17520
|
-
});
|
|
17521
|
-
}
|
|
17522
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17523
|
-
};
|
|
17524
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
17525
|
-
var showChangeBtn = React.useMemo(function () {
|
|
17526
|
-
var _typeMap$type31;
|
|
17527
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17528
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17529
|
-
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
17530
|
-
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17531
|
-
var newValue = _objectSpread2({}, value);
|
|
17532
|
-
// 原订单商品
|
|
17533
|
-
var originTradeGoodList = getGoodDetails({
|
|
17534
|
-
mode: isStrict
|
|
17535
|
-
}) || [];
|
|
17536
|
-
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17537
|
-
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)]) || [];
|
|
17538
|
-
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) {
|
|
17539
|
-
return skuList.includes(item.uuid);
|
|
17540
|
-
});
|
|
17541
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17542
|
-
}, [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]);
|
|
17543
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17544
|
-
gutter: 8,
|
|
17545
|
-
wrap: true,
|
|
17546
|
-
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())
|
|
17547
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17548
|
-
className: "gutter-row",
|
|
17549
|
-
xs: {
|
|
17550
|
-
span: 11
|
|
17551
|
-
},
|
|
17552
|
-
sm: {
|
|
17553
|
-
span: 6
|
|
17554
|
-
}
|
|
17555
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
17556
|
-
style: {
|
|
17557
|
-
marginBottom: '8px'
|
|
17558
|
-
},
|
|
17559
|
-
disabled: disabled,
|
|
17560
|
-
allowClear: false,
|
|
17561
|
-
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)],
|
|
17562
|
-
onChange: function onChange(val) {
|
|
17563
|
-
return changeSystemOrderHandle(val);
|
|
17564
|
-
},
|
|
17565
|
-
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17566
|
-
}, ((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) {
|
|
17567
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17568
|
-
key: item[typeMap$2[type].oIdKey],
|
|
17569
|
-
value: item[typeMap$2[type].oIdKey],
|
|
17570
|
-
label: item[typeMap$2[type].oIdKey]
|
|
17571
|
-
}, item[typeMap$2[type].oIdKey]);
|
|
17572
|
-
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17573
|
-
className: "gutter-row",
|
|
17574
|
-
xs: {
|
|
17575
|
-
span: 11
|
|
17576
|
-
},
|
|
17577
|
-
sm: {
|
|
17578
|
-
span: 6
|
|
17579
|
-
}
|
|
17580
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
17581
|
-
style: {
|
|
17582
|
-
marginBottom: '8px'
|
|
17583
|
-
},
|
|
17584
|
-
disabled: disabled,
|
|
17585
|
-
allowClear: false,
|
|
17586
|
-
options: reasonList,
|
|
17587
|
-
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)],
|
|
17588
|
-
onChange: function onChange(val) {
|
|
17589
|
-
return changeTypeHandle(val);
|
|
17590
|
-
}
|
|
17591
|
-
})), (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, {
|
|
17592
|
-
className: "gutter-row",
|
|
17593
|
-
xs: {
|
|
17594
|
-
span: 11
|
|
17595
|
-
},
|
|
17596
|
-
sm: {
|
|
17597
|
-
span: 6
|
|
17598
|
-
}
|
|
17599
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
17600
|
-
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)],
|
|
17601
|
-
disabled: disabled,
|
|
17602
|
-
readOnly: true
|
|
17603
|
-
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17604
|
-
key: 'reissueGoods'
|
|
17605
|
-
}, other), {}, {
|
|
17606
|
-
type: type,
|
|
17607
|
-
disabled: disabled,
|
|
17608
|
-
canUpdateNumber: showChangeBtn,
|
|
17609
|
-
showChangeBtn: showChangeBtn,
|
|
17610
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17611
|
-
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)],
|
|
17612
|
-
onChange: function onChange(val) {
|
|
17613
|
-
return changeGoodHandle(val);
|
|
17614
|
-
},
|
|
17615
|
-
onModeChange: handleModeChange,
|
|
17616
|
-
showModeBtn: false,
|
|
17617
|
-
isStrict: isStrict,
|
|
17618
|
-
tradeGoods: {
|
|
17619
|
-
originDataSource: getGoodDetails({
|
|
17620
|
-
mode: isStrict
|
|
17621
|
-
}),
|
|
17622
|
-
selectedGoodsChange: selectedGoodsChange
|
|
17623
|
-
}
|
|
17624
|
-
})));
|
|
17625
|
-
};
|
|
17626
|
-
|
|
17627
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";
|
|
17628
16638
|
styleInject(css_248z$a);
|
|
17629
16639
|
|
|
@@ -18100,12 +17110,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
18100
17110
|
};
|
|
18101
17111
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
18102
17112
|
|
|
18103
|
-
var _excluded$
|
|
17113
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
18104
17114
|
function CommonStatus(props) {
|
|
18105
17115
|
var onChange = props.onChange,
|
|
18106
17116
|
value = props.value,
|
|
18107
17117
|
failValue = props.failValue,
|
|
18108
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17118
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
18109
17119
|
var changeHandle = function changeHandle(val) {
|
|
18110
17120
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
18111
17121
|
status: val,
|
|
@@ -18145,15 +17155,10 @@ var typeInitValueMap$1 = {
|
|
|
18145
17155
|
initValue: [{
|
|
18146
17156
|
billNo: ''
|
|
18147
17157
|
}]
|
|
18148
|
-
},
|
|
18149
|
-
5: {
|
|
18150
|
-
initValue: [{
|
|
18151
|
-
billNo: ''
|
|
18152
|
-
}]
|
|
18153
17158
|
}
|
|
18154
17159
|
};
|
|
18155
17160
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
18156
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4
|
|
17161
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18157
17162
|
var _props$value = props.value,
|
|
18158
17163
|
value = _props$value === void 0 ? [] : _props$value,
|
|
18159
17164
|
onChange = props.onChange,
|
|
@@ -18175,7 +17180,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18175
17180
|
maxHeight: '300px',
|
|
18176
17181
|
overflowY: 'auto'
|
|
18177
17182
|
}
|
|
18178
|
-
}, [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);
|
|
18179
17184
|
};
|
|
18180
17185
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
18181
17186
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -18232,17 +17237,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18232
17237
|
return changeInputHandle(e.target.value, 'billNo');
|
|
18233
17238
|
},
|
|
18234
17239
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18235
|
-
})) : null, type === 5 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18236
|
-
disabled: disabled,
|
|
18237
|
-
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18238
|
-
onChange: function onChange(e) {
|
|
18239
|
-
return changeInputHandle(e.target.value, 'billNo');
|
|
18240
|
-
},
|
|
18241
|
-
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
18242
17240
|
})) : null) : null);
|
|
18243
17241
|
};
|
|
18244
17242
|
|
|
18245
|
-
var _excluded$
|
|
17243
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18246
17244
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
18247
17245
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18248
17246
|
var _props$value = props.value,
|
|
@@ -18252,7 +17250,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18252
17250
|
failValue = props.failValue,
|
|
18253
17251
|
_props$type = props.type,
|
|
18254
17252
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18255
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17253
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
18256
17254
|
var _useState = React.useState(0),
|
|
18257
17255
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18258
17256
|
changeIndex = _useState2[0],
|
|
@@ -18318,7 +17316,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18318
17316
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
18319
17317
|
};
|
|
18320
17318
|
|
|
18321
|
-
var _excluded$
|
|
17319
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18322
17320
|
var MsgStatus = function MsgStatus(props) {
|
|
18323
17321
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18324
17322
|
var _props$value = props.value,
|
|
@@ -18328,7 +17326,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18328
17326
|
failValue = props.failValue,
|
|
18329
17327
|
_props$type = props.type,
|
|
18330
17328
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18331
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17329
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
18332
17330
|
var _useState = React.useState(0),
|
|
18333
17331
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18334
17332
|
changeIndex = _useState2[0],
|
|
@@ -18359,7 +17357,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18359
17357
|
onClick: function onClick() {
|
|
18360
17358
|
return setChangeIndex(index);
|
|
18361
17359
|
}
|
|
18362
|
-
}, kmkfUtils.msgTypeCh[key]
|
|
17360
|
+
}, kmkfUtils.msgTypeCh[key], item.ruleName);
|
|
18363
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), {}, {
|
|
18364
17362
|
showSearch: true,
|
|
18365
17363
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -18397,8 +17395,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
18397
17395
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
18398
17396
|
};
|
|
18399
17397
|
|
|
18400
|
-
var _excluded$
|
|
18401
|
-
var typeMap$
|
|
17398
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17399
|
+
var typeMap$2 = {
|
|
18402
17400
|
BS_E3_REISSUE_GOODS: {
|
|
18403
17401
|
key: 'bsE3ReissueGoods',
|
|
18404
17402
|
typeName: 'bsE3ReissueType',
|
|
@@ -18415,7 +17413,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18415
17413
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18416
17414
|
disabled = props.disabled,
|
|
18417
17415
|
type = props.type,
|
|
18418
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17416
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
18419
17417
|
var getOrderFlag = React.useRef(false);
|
|
18420
17418
|
var _useState = React.useState(false),
|
|
18421
17419
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18424,10 +17422,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18424
17422
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
18425
17423
|
React.useEffect(function () {
|
|
18426
17424
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18427
|
-
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)) {
|
|
18428
17426
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18429
17427
|
getOrderFlag.current = true;
|
|
18430
|
-
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);
|
|
18431
17429
|
}
|
|
18432
17430
|
return;
|
|
18433
17431
|
}, [value]);
|
|
@@ -18451,7 +17449,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18451
17449
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18452
17450
|
while (1) switch (_context.prev = _context.next) {
|
|
18453
17451
|
case 0:
|
|
18454
|
-
(_typeMap$type4 = typeMap$
|
|
17452
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18455
17453
|
var _typeMap$type5, _typeMap$type6;
|
|
18456
17454
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
18457
17455
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18460,7 +17458,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18460
17458
|
billNo: orderSn
|
|
18461
17459
|
};
|
|
18462
17460
|
});
|
|
18463
|
-
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]), {}, {
|
|
18464
17462
|
showOrderInfo: showOrderInfo,
|
|
18465
17463
|
orders: orders
|
|
18466
17464
|
}))));
|
|
@@ -18481,25 +17479,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18481
17479
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
18482
17480
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18483
17481
|
var newValue = _objectSpread2({}, value);
|
|
18484
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
17482
|
+
newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
18485
17483
|
if (typeName === '1') {
|
|
18486
17484
|
var _typeMap$type8;
|
|
18487
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17485
|
+
newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
18488
17486
|
mode: isStrict
|
|
18489
17487
|
});
|
|
18490
17488
|
} else if (typeName === '2') {
|
|
18491
17489
|
var _typeMap$type9;
|
|
18492
17490
|
// 切换到非原单,清空列表
|
|
18493
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17491
|
+
newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
18494
17492
|
}
|
|
18495
17493
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18496
17494
|
};
|
|
18497
17495
|
var handleModeChange = function handleModeChange(mode) {
|
|
18498
17496
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
18499
|
-
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';
|
|
18500
17498
|
setIsStrict(mode);
|
|
18501
17499
|
if (!isOriginalOrder) return;
|
|
18502
|
-
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({
|
|
18503
17501
|
mode: mode
|
|
18504
17502
|
}))));
|
|
18505
17503
|
};
|
|
@@ -18507,8 +17505,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18507
17505
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
18508
17506
|
var mode = _ref3.mode,
|
|
18509
17507
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18510
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
18511
|
-
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];
|
|
18512
17510
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18513
17511
|
return order.orderSn === systemOrderNo;
|
|
18514
17512
|
});
|
|
@@ -18521,19 +17519,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18521
17519
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18522
17520
|
var _typeMap$type14;
|
|
18523
17521
|
var newValue = _objectSpread2({}, value);
|
|
18524
|
-
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 || [];
|
|
18525
17523
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18526
17524
|
};
|
|
18527
17525
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18528
17526
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
18529
17527
|
var newValue = _objectSpread2({}, value);
|
|
18530
|
-
newValue["".concat(typeMap$
|
|
18531
|
-
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])) {
|
|
18532
17530
|
var _typeMap$type17;
|
|
18533
|
-
newValue["".concat(typeMap$
|
|
18534
|
-
} 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])) {
|
|
18535
17533
|
var _typeMap$type19;
|
|
18536
|
-
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({
|
|
18537
17535
|
mode: isStrict,
|
|
18538
17536
|
sysOrderNo: val
|
|
18539
17537
|
});
|
|
@@ -18543,8 +17541,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18543
17541
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18544
17542
|
var showChangeBtn = React.useMemo(function () {
|
|
18545
17543
|
var _typeMap$type20;
|
|
18546
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
18547
|
-
}, [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]]);
|
|
18548
17546
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18549
17547
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
18550
17548
|
var newValue = _objectSpread2({}, value);
|
|
@@ -18553,12 +17551,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18553
17551
|
mode: isStrict
|
|
18554
17552
|
}) || [];
|
|
18555
17553
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18556
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18557
|
-
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) {
|
|
18558
17556
|
return skuList.includes(item.uuid);
|
|
18559
17557
|
});
|
|
18560
17558
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18561
|
-
}, [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]);
|
|
18562
17560
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18563
17561
|
gutter: 8,
|
|
18564
17562
|
wrap: true,
|
|
@@ -18577,12 +17575,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18577
17575
|
},
|
|
18578
17576
|
disabled: disabled,
|
|
18579
17577
|
allowClear: false,
|
|
18580
|
-
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)],
|
|
18581
17579
|
onChange: function onChange(val) {
|
|
18582
17580
|
return changeSystemOrderHandle(val);
|
|
18583
17581
|
},
|
|
18584
17582
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18585
|
-
}, ((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) {
|
|
18586
17584
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18587
17585
|
key: item.billNo,
|
|
18588
17586
|
value: item.billNo,
|
|
@@ -18603,7 +17601,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18603
17601
|
disabled: disabled,
|
|
18604
17602
|
allowClear: false,
|
|
18605
17603
|
options: reasonList,
|
|
18606
|
-
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)],
|
|
18607
17605
|
onChange: function onChange(val) {
|
|
18608
17606
|
return changeTypeHandle(val);
|
|
18609
17607
|
}
|
|
@@ -18615,7 +17613,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18615
17613
|
canUpdateNumber: showChangeBtn,
|
|
18616
17614
|
showChangeBtn: showChangeBtn,
|
|
18617
17615
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18618
|
-
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)],
|
|
18619
17617
|
onChange: function onChange(val) {
|
|
18620
17618
|
return changeGoodHandle(val);
|
|
18621
17619
|
},
|
|
@@ -18631,9 +17629,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18631
17629
|
})));
|
|
18632
17630
|
};
|
|
18633
17631
|
|
|
18634
|
-
var _excluded$
|
|
17632
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
18635
17633
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18636
|
-
var typeMap$
|
|
17634
|
+
var typeMap$3 = {
|
|
18637
17635
|
GY_REISSUE_GOODS: {
|
|
18638
17636
|
key: 'gyReissueGoods',
|
|
18639
17637
|
name: '管易',
|
|
@@ -18660,7 +17658,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18660
17658
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18661
17659
|
disabled = props.disabled,
|
|
18662
17660
|
type = props.type,
|
|
18663
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17661
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
18664
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) {
|
|
18665
17663
|
var _order$platformCode;
|
|
18666
17664
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -18672,10 +17670,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18672
17670
|
setIsStrict = _useState2[1];
|
|
18673
17671
|
React.useEffect(function () {
|
|
18674
17672
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18675
|
-
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)) {
|
|
18676
17674
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18677
17675
|
getOrderFlag.current = true;
|
|
18678
|
-
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);
|
|
18679
17677
|
}
|
|
18680
17678
|
return;
|
|
18681
17679
|
}, [value]);
|
|
@@ -18685,7 +17683,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18685
17683
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18686
17684
|
while (1) switch (_context.prev = _context.next) {
|
|
18687
17685
|
case 0:
|
|
18688
|
-
(_typeMap$type4 = typeMap$
|
|
17686
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18689
17687
|
var _typeMap$type5, _typeMap$type6;
|
|
18690
17688
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
18691
17689
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18708,7 +17706,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18708
17706
|
shopCode: shopCode
|
|
18709
17707
|
});
|
|
18710
17708
|
});
|
|
18711
|
-
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]), {}, {
|
|
18712
17710
|
showOrderInfo: showOrderInfo,
|
|
18713
17711
|
orders: orders
|
|
18714
17712
|
}))));
|
|
@@ -18726,28 +17724,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
18726
17724
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
18727
17725
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
18728
17726
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
18729
|
-
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;
|
|
18730
17728
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18731
17729
|
var newValue = _objectSpread2({}, value);
|
|
18732
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17730
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
18733
17731
|
if (typeName === '1') {
|
|
18734
17732
|
var _typeMap$type9;
|
|
18735
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17733
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
18736
17734
|
mode: isStrict
|
|
18737
17735
|
});
|
|
18738
17736
|
} else if (typeName === '2') {
|
|
18739
17737
|
var _typeMap$type10;
|
|
18740
17738
|
// 切换到非原单,清空列表
|
|
18741
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
17739
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
18742
17740
|
}
|
|
18743
17741
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18744
17742
|
};
|
|
18745
17743
|
var handleModeChange = function handleModeChange(mode) {
|
|
18746
17744
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
18747
|
-
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';
|
|
18748
17746
|
setIsStrict(mode);
|
|
18749
17747
|
if (!isOriginalOrder) return;
|
|
18750
|
-
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({
|
|
18751
17749
|
mode: mode
|
|
18752
17750
|
}))));
|
|
18753
17751
|
};
|
|
@@ -18755,8 +17753,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18755
17753
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
18756
17754
|
var mode = _ref3.mode,
|
|
18757
17755
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18758
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18759
|
-
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];
|
|
18760
17758
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18761
17759
|
return order.code === systemOrderNo;
|
|
18762
17760
|
});
|
|
@@ -18769,10 +17767,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18769
17767
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18770
17768
|
var _typeMap$type15;
|
|
18771
17769
|
var newValue = _objectSpread2({}, value);
|
|
18772
|
-
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) {
|
|
18773
17771
|
var _typeMap$type16, _typeMap$type17;
|
|
18774
|
-
item["".concat(typeMap$
|
|
18775
|
-
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;
|
|
18776
17774
|
return item;
|
|
18777
17775
|
});
|
|
18778
17776
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -18780,13 +17778,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
18780
17778
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18781
17779
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
18782
17780
|
var newValue = _objectSpread2({}, value);
|
|
18783
|
-
newValue["".concat(typeMap$
|
|
18784
|
-
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])) {
|
|
18785
17783
|
var _typeMap$type20;
|
|
18786
|
-
newValue["".concat(typeMap$
|
|
18787
|
-
} 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])) {
|
|
18788
17786
|
var _typeMap$type22;
|
|
18789
|
-
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({
|
|
18790
17788
|
mode: isStrict,
|
|
18791
17789
|
sysOrderNo: val
|
|
18792
17790
|
});
|
|
@@ -18801,18 +17799,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
18801
17799
|
mode: isStrict
|
|
18802
17800
|
}) || [];
|
|
18803
17801
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18804
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18805
|
-
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) {
|
|
18806
17804
|
return skuList.includes(item.uuid);
|
|
18807
17805
|
});
|
|
18808
|
-
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)]);
|
|
18809
17807
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18810
|
-
}, [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]);
|
|
18811
17809
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18812
17810
|
var showChangeBtn = React.useMemo(function () {
|
|
18813
17811
|
var _typeMap$type27;
|
|
18814
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
18815
|
-
}, [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]]);
|
|
18816
17814
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18817
17815
|
gutter: 8,
|
|
18818
17816
|
wrap: true
|
|
@@ -18830,12 +17828,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18830
17828
|
},
|
|
18831
17829
|
disabled: disabled,
|
|
18832
17830
|
allowClear: false,
|
|
18833
|
-
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)],
|
|
18834
17832
|
onChange: function onChange(val) {
|
|
18835
17833
|
return changeSystemOrderHandle(val);
|
|
18836
17834
|
},
|
|
18837
17835
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18838
|
-
}, ((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) {
|
|
18839
17837
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18840
17838
|
key: item.billNo,
|
|
18841
17839
|
value: item.billNo,
|
|
@@ -18856,7 +17854,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18856
17854
|
disabled: disabled,
|
|
18857
17855
|
allowClear: false,
|
|
18858
17856
|
options: reasonList,
|
|
18859
|
-
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)],
|
|
18860
17858
|
onChange: function onChange(val) {
|
|
18861
17859
|
return changeTypeHandle(val);
|
|
18862
17860
|
}
|
|
@@ -18868,7 +17866,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18868
17866
|
canUpdateNumber: showChangeBtn,
|
|
18869
17867
|
showChangeBtn: showChangeBtn,
|
|
18870
17868
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18871
|
-
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)],
|
|
18872
17870
|
onChange: function onChange(val) {
|
|
18873
17871
|
return changeGoodHandle(val);
|
|
18874
17872
|
},
|
|
@@ -18934,7 +17932,6 @@ exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
|
18934
17932
|
exports.MsgStatus = MsgStatus;
|
|
18935
17933
|
exports.ParseLogistics = ParseLogistics;
|
|
18936
17934
|
exports.Payment = Payment;
|
|
18937
|
-
exports.PublicReissue = PublicReissue;
|
|
18938
17935
|
exports.Remark = RemarkInput;
|
|
18939
17936
|
exports.ReturnLogistics = ExpressLogistics;
|
|
18940
17937
|
exports.ShopName = ShopNameSelect;
|
|
@@ -18948,4 +17945,3 @@ exports.WdtGoodList = WdtGoodList;
|
|
|
18948
17945
|
exports.WdtReissue = wdtReissue;
|
|
18949
17946
|
exports.WlnGoods = WlnGoods;
|
|
18950
17947
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
18951
|
-
exports.getJstColumns = getColumns$5;
|