@kmkf-fe-packages/basic-components 2.0.11 → 2.0.12-beta.1
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 +1153 -167
- package/dist/index.js +1152 -165
- package/dist/src/bs/SystemOrder/index.d.ts +1 -0
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +13 -0
- package/dist/src/common/Reissue/index.d.ts +3 -0
- package/dist/src/constants/jst.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/jst/common/index.d.ts +3 -0
- package/package.json +4 -4
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, _value$changeIndex9;
|
|
11024
11024
|
var _props$value = props.value,
|
|
11025
11025
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11026
11026
|
onChange = props.onChange,
|
|
@@ -11037,7 +11037,8 @@ 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'].includes(platformType);
|
|
11040
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
11041
|
+
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11041
11042
|
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11042
11043
|
React.useEffect(function () {
|
|
11043
11044
|
//没有值塞个默认值
|
|
@@ -11049,7 +11050,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11049
11050
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11050
11051
|
setChangeIndex(0);
|
|
11051
11052
|
}
|
|
11052
|
-
}, value);
|
|
11053
|
+
}, [value]);
|
|
11053
11054
|
var content = function content(item, index) {
|
|
11054
11055
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11055
11056
|
style: {
|
|
@@ -11077,7 +11078,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11077
11078
|
changeOrderInfo['sendId'] = option.value;
|
|
11078
11079
|
}
|
|
11079
11080
|
if (isSelectName && type === 'sendName') {
|
|
11080
|
-
|
|
11081
|
+
if (isSendGoodSavedId) {
|
|
11082
|
+
// 如果发货仓名称存的是id,将名称存入快照
|
|
11083
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11084
|
+
} else {
|
|
11085
|
+
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
11086
|
+
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
11087
|
+
changeOrderInfo['sendName'] = option.label;
|
|
11088
|
+
}
|
|
11081
11089
|
}
|
|
11082
11090
|
var newList = _toConsumableArray(value);
|
|
11083
11091
|
newList[changeIndex] = changeOrderInfo;
|
|
@@ -11177,7 +11185,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11177
11185
|
showSearch: true,
|
|
11178
11186
|
options: sendOptions,
|
|
11179
11187
|
filterOption: filterOption,
|
|
11180
|
-
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11188
|
+
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendSnapshotId) || ((_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName) || null,
|
|
11181
11189
|
onChange: function onChange(value, option) {
|
|
11182
11190
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11183
11191
|
}
|
|
@@ -11187,14 +11195,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11187
11195
|
onChange: function onChange(e) {
|
|
11188
11196
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11189
11197
|
},
|
|
11190
|
-
value: (_value$
|
|
11198
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
11191
11199
|
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11192
11200
|
disabled: disabled,
|
|
11193
11201
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11194
11202
|
onChange: function onChange(e) {
|
|
11195
11203
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11196
11204
|
},
|
|
11197
|
-
value: (_value$
|
|
11205
|
+
value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
|
|
11198
11206
|
})) : null) : null);
|
|
11199
11207
|
};
|
|
11200
11208
|
|
|
@@ -12164,9 +12172,354 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12164
12172
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
12165
12173
|
|
|
12166
12174
|
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
|
+
}, {
|
|
12260
|
+
dataIndex: 'marketPrice',
|
|
12261
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12262
|
+
ellipsis: true,
|
|
12263
|
+
width: 100
|
|
12264
|
+
}, {
|
|
12265
|
+
dataIndex: 'costPrice',
|
|
12266
|
+
title: "\u6210\u672C\u4EF7",
|
|
12267
|
+
ellipsis: true,
|
|
12268
|
+
width: 100
|
|
12269
|
+
}, {
|
|
12270
|
+
dataIndex: 'skuType',
|
|
12271
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12272
|
+
ellipsis: true,
|
|
12273
|
+
width: 100,
|
|
12274
|
+
render: function render() {
|
|
12275
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
12276
|
+
return {
|
|
12277
|
+
'combine': '组合装商品',
|
|
12278
|
+
'normal': '普通商品'
|
|
12279
|
+
}[type] || type;
|
|
12280
|
+
}
|
|
12281
|
+
}];
|
|
12282
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12283
|
+
var _useState = React.useState([]),
|
|
12284
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12285
|
+
selectList = _useState2[0],
|
|
12286
|
+
setSelect = _useState2[1];
|
|
12287
|
+
var _useState3 = React.useState([]),
|
|
12288
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12289
|
+
selectIds = _useState4[0],
|
|
12290
|
+
setSelectIds = _useState4[1];
|
|
12291
|
+
React.useImperativeHandle(ref, function () {
|
|
12292
|
+
return {
|
|
12293
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12294
|
+
return selectList;
|
|
12295
|
+
}
|
|
12296
|
+
};
|
|
12297
|
+
});
|
|
12298
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
12299
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12300
|
+
form = _Form$useForm2[0];
|
|
12301
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$1, {
|
|
12302
|
+
defaultPageSize: 10,
|
|
12303
|
+
form: form
|
|
12304
|
+
}),
|
|
12305
|
+
tableProps = _useAntdTable.tableProps,
|
|
12306
|
+
search = _useAntdTable.search,
|
|
12307
|
+
params = _useAntdTable.params;
|
|
12308
|
+
var submit = search.submit,
|
|
12309
|
+
reset = search.reset;
|
|
12310
|
+
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
12311
|
+
layout: "inline",
|
|
12312
|
+
form: form
|
|
12313
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12314
|
+
name: "goodName",
|
|
12315
|
+
style: {
|
|
12316
|
+
marginBottom: '12px'
|
|
12317
|
+
}
|
|
12318
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12319
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12320
|
+
allowClear: true,
|
|
12321
|
+
style: {
|
|
12322
|
+
width: 150
|
|
12323
|
+
}
|
|
12324
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12325
|
+
name: "goodNo",
|
|
12326
|
+
style: {
|
|
12327
|
+
marginBottom: '12px'
|
|
12328
|
+
}
|
|
12329
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12330
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12331
|
+
allowClear: true,
|
|
12332
|
+
style: {
|
|
12333
|
+
width: 150
|
|
12334
|
+
}
|
|
12335
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12336
|
+
name: "styleCode",
|
|
12337
|
+
style: {
|
|
12338
|
+
marginBottom: '12px'
|
|
12339
|
+
}
|
|
12340
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12341
|
+
placeholder: "\u6B3E\u5F0F\u7F16\u7801",
|
|
12342
|
+
allowClear: true,
|
|
12343
|
+
style: {
|
|
12344
|
+
width: 150
|
|
12345
|
+
}
|
|
12346
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12347
|
+
style: {
|
|
12348
|
+
marginBottom: '12px'
|
|
12349
|
+
}
|
|
12350
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12351
|
+
type: "primary",
|
|
12352
|
+
style: {
|
|
12353
|
+
marginRight: '8px'
|
|
12354
|
+
},
|
|
12355
|
+
onClick: submit
|
|
12356
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12357
|
+
onClick: reset
|
|
12358
|
+
}, "\u91CD\u7F6E")));
|
|
12359
|
+
var rowSelection = {
|
|
12360
|
+
selectedRowKeys: selectIds,
|
|
12361
|
+
fixed: true,
|
|
12362
|
+
onSelect: function onSelect(record, selected) {
|
|
12363
|
+
if (selected) {
|
|
12364
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
|
|
12365
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12366
|
+
} else {
|
|
12367
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12368
|
+
return t !== record.goodNo;
|
|
12369
|
+
}));
|
|
12370
|
+
setSelect(selectList.filter(function (t) {
|
|
12371
|
+
return t.goodNo !== record.goodNo;
|
|
12372
|
+
}));
|
|
12373
|
+
}
|
|
12374
|
+
},
|
|
12375
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12376
|
+
if (selected) {
|
|
12377
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12378
|
+
return t.goodNo;
|
|
12379
|
+
}))));
|
|
12380
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12381
|
+
} else {
|
|
12382
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
12383
|
+
return t.goodNo;
|
|
12384
|
+
})));
|
|
12385
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12386
|
+
return arrVal.goodNo !== othVal.goodNo;
|
|
12387
|
+
});
|
|
12388
|
+
setSelect(list);
|
|
12389
|
+
}
|
|
12390
|
+
},
|
|
12391
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
12392
|
+
var options = {
|
|
12393
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
12394
|
+
return row.goodNo || row.skuId;
|
|
12395
|
+
}).includes(record.goodNo || record.skuId),
|
|
12396
|
+
name: record.goodNo
|
|
12397
|
+
};
|
|
12398
|
+
return options;
|
|
12399
|
+
}
|
|
12400
|
+
};
|
|
12401
|
+
var showTable = function showTable() {
|
|
12402
|
+
var handleDelete = function handleDelete(record) {
|
|
12403
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12404
|
+
return t !== record.goodNo;
|
|
12405
|
+
}));
|
|
12406
|
+
setSelect(selectList.filter(function (t) {
|
|
12407
|
+
return t.goodNo !== record.goodNo;
|
|
12408
|
+
}));
|
|
12409
|
+
};
|
|
12410
|
+
var showColumns = [{
|
|
12411
|
+
dataIndex: '',
|
|
12412
|
+
title: "\u64CD\u4F5C",
|
|
12413
|
+
ellipsis: true,
|
|
12414
|
+
width: 100,
|
|
12415
|
+
render: function render(val, record) {
|
|
12416
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12417
|
+
type: "link",
|
|
12418
|
+
onClick: function onClick() {
|
|
12419
|
+
return handleDelete(record);
|
|
12420
|
+
}
|
|
12421
|
+
}, "\u5220\u9664");
|
|
12422
|
+
}
|
|
12423
|
+
}].concat(lodash.takeRight(columns$2, columns$2.length - 1));
|
|
12424
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12425
|
+
style: {
|
|
12426
|
+
width: '100%',
|
|
12427
|
+
maxWidth: '387px'
|
|
12428
|
+
}
|
|
12429
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12430
|
+
columns: showColumns,
|
|
12431
|
+
rowKey: 'goodNo',
|
|
12432
|
+
dataSource: selectList,
|
|
12433
|
+
scroll: {
|
|
12434
|
+
x: '100%',
|
|
12435
|
+
y: 250
|
|
12436
|
+
},
|
|
12437
|
+
pagination: {
|
|
12438
|
+
size: 'small',
|
|
12439
|
+
total: selectIds.length,
|
|
12440
|
+
pageSize: 10,
|
|
12441
|
+
showSizeChanger: false
|
|
12442
|
+
}
|
|
12443
|
+
})) : null;
|
|
12444
|
+
};
|
|
12445
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12446
|
+
style: {
|
|
12447
|
+
marginTop: '4px'
|
|
12448
|
+
}
|
|
12449
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12450
|
+
rowSelection: rowSelection,
|
|
12451
|
+
rowKey: "goodNo",
|
|
12452
|
+
columns: columns$2,
|
|
12453
|
+
scroll: {
|
|
12454
|
+
x: '100%',
|
|
12455
|
+
y: 250
|
|
12456
|
+
}
|
|
12457
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
12458
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12459
|
+
return triggerNode.parentElement;
|
|
12460
|
+
},
|
|
12461
|
+
content: showTable(),
|
|
12462
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12463
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12464
|
+
danger: true,
|
|
12465
|
+
type: "text"
|
|
12466
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12467
|
+
};
|
|
12468
|
+
var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$1);
|
|
12469
|
+
|
|
12470
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12471
|
+
React.useImperativeHandle(ref, function () {
|
|
12472
|
+
return {
|
|
12473
|
+
open: function open(shopCode) {
|
|
12474
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12475
|
+
setVisible(true);
|
|
12476
|
+
setSelectedRows(options.value || []);
|
|
12477
|
+
}
|
|
12478
|
+
};
|
|
12479
|
+
});
|
|
12480
|
+
var onSubmit = props.onSubmit,
|
|
12481
|
+
width = props.width;
|
|
12482
|
+
var _useState = React.useState(false),
|
|
12483
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12484
|
+
visible = _useState2[0],
|
|
12485
|
+
setVisible = _useState2[1];
|
|
12486
|
+
var _useState3 = React.useState([]),
|
|
12487
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12488
|
+
selectedRows = _useState4[0],
|
|
12489
|
+
setSelectedRows = _useState4[1];
|
|
12490
|
+
var gyGoodsListRef = React.useRef(null);
|
|
12491
|
+
var _onCancel = function onCancel() {
|
|
12492
|
+
setVisible(false);
|
|
12493
|
+
};
|
|
12494
|
+
var onOk = function onOk() {
|
|
12495
|
+
var _gyGoodsListRef$curre;
|
|
12496
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12497
|
+
onSubmit(selectedList);
|
|
12498
|
+
_onCancel();
|
|
12499
|
+
};
|
|
12500
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12501
|
+
title: '选择商品',
|
|
12502
|
+
okText: '确认',
|
|
12503
|
+
cancelText: '取消',
|
|
12504
|
+
visible: visible,
|
|
12505
|
+
width: width || 850,
|
|
12506
|
+
onCancel: function onCancel() {
|
|
12507
|
+
_onCancel();
|
|
12508
|
+
},
|
|
12509
|
+
onOk: onOk,
|
|
12510
|
+
wrapClassName: "goodModal"
|
|
12511
|
+
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
|
|
12512
|
+
ref: gyGoodsListRef,
|
|
12513
|
+
selectedRows: selectedRows
|
|
12514
|
+
})));
|
|
12515
|
+
};
|
|
12516
|
+
var JstGoodsModal = /*#__PURE__*/React.forwardRef(GyGoodsModal);
|
|
12517
|
+
|
|
12518
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12167
12519
|
var current = _ref.current,
|
|
12168
12520
|
pageSize = _ref.pageSize;
|
|
12169
12521
|
var data = {
|
|
12522
|
+
goodShortName: formData.goodShortName || null,
|
|
12170
12523
|
goodNo: formData.goodNo || null,
|
|
12171
12524
|
goodName: formData.goodName || null,
|
|
12172
12525
|
skuCode: formData.skuCode || null,
|
|
@@ -12196,7 +12549,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12196
12549
|
};
|
|
12197
12550
|
});
|
|
12198
12551
|
};
|
|
12199
|
-
var columns$
|
|
12552
|
+
var columns$3 = [{
|
|
12200
12553
|
dataIndex: 'index',
|
|
12201
12554
|
title: 'NO',
|
|
12202
12555
|
render: function render(val, record, index) {
|
|
@@ -12292,7 +12645,7 @@ var columns$2 = [{
|
|
|
12292
12645
|
ellipsis: true,
|
|
12293
12646
|
width: 100
|
|
12294
12647
|
}];
|
|
12295
|
-
var GoodList$
|
|
12648
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12296
12649
|
var _useState = React.useState([]),
|
|
12297
12650
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12298
12651
|
selectList = _useState2[0],
|
|
@@ -12311,7 +12664,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12311
12664
|
var _Form$useForm = antd.Form.useForm(),
|
|
12312
12665
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12313
12666
|
form = _Form$useForm2[0];
|
|
12314
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
12667
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$2, {
|
|
12315
12668
|
defaultPageSize: 10,
|
|
12316
12669
|
form: form
|
|
12317
12670
|
}),
|
|
@@ -12324,6 +12677,17 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12324
12677
|
layout: "inline",
|
|
12325
12678
|
form: form
|
|
12326
12679
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12680
|
+
name: "goodShortName",
|
|
12681
|
+
style: {
|
|
12682
|
+
marginBottom: '12px'
|
|
12683
|
+
}
|
|
12684
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12685
|
+
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12686
|
+
allowClear: true,
|
|
12687
|
+
style: {
|
|
12688
|
+
width: 150
|
|
12689
|
+
}
|
|
12690
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12327
12691
|
name: "goodNo",
|
|
12328
12692
|
style: {
|
|
12329
12693
|
marginBottom: '12px'
|
|
@@ -12435,7 +12799,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12435
12799
|
}
|
|
12436
12800
|
}, "\u5220\u9664");
|
|
12437
12801
|
}
|
|
12438
|
-
}].concat(lodash.takeRight(columns$
|
|
12802
|
+
}].concat(lodash.takeRight(columns$3, columns$3.length - 1));
|
|
12439
12803
|
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12440
12804
|
style: {
|
|
12441
12805
|
width: '100%',
|
|
@@ -12464,7 +12828,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12464
12828
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12465
12829
|
rowSelection: rowSelection,
|
|
12466
12830
|
rowKey: "specNo",
|
|
12467
|
-
columns: columns$
|
|
12831
|
+
columns: columns$3,
|
|
12468
12832
|
scroll: {
|
|
12469
12833
|
x: '100%',
|
|
12470
12834
|
y: 250
|
|
@@ -12480,7 +12844,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12480
12844
|
type: "text"
|
|
12481
12845
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12482
12846
|
};
|
|
12483
|
-
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$
|
|
12847
|
+
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$2);
|
|
12484
12848
|
|
|
12485
12849
|
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12486
12850
|
React.useImperativeHandle(ref, function () {
|
|
@@ -12523,7 +12887,7 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12523
12887
|
};
|
|
12524
12888
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12525
12889
|
|
|
12526
|
-
var getTableData$
|
|
12890
|
+
var getTableData$3 = function getTableData(_ref, formData) {
|
|
12527
12891
|
var current = _ref.current,
|
|
12528
12892
|
pageSize = _ref.pageSize;
|
|
12529
12893
|
var data = {
|
|
@@ -12555,7 +12919,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12555
12919
|
};
|
|
12556
12920
|
});
|
|
12557
12921
|
};
|
|
12558
|
-
var columns$
|
|
12922
|
+
var columns$4 = [{
|
|
12559
12923
|
dataIndex: 'index',
|
|
12560
12924
|
title: 'NO',
|
|
12561
12925
|
render: function render(val, record, index) {
|
|
@@ -12621,7 +12985,7 @@ var columns$3 = [{
|
|
|
12621
12985
|
ellipsis: true,
|
|
12622
12986
|
width: 100
|
|
12623
12987
|
}];
|
|
12624
|
-
var GoodList$
|
|
12988
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
12625
12989
|
var _useState = React.useState([]),
|
|
12626
12990
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12627
12991
|
selectList = _useState2[0],
|
|
@@ -12640,7 +13004,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12640
13004
|
var _Form$useForm = antd.Form.useForm(),
|
|
12641
13005
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12642
13006
|
form = _Form$useForm2[0];
|
|
12643
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
13007
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
|
|
12644
13008
|
defaultPageSize: 10,
|
|
12645
13009
|
form: form
|
|
12646
13010
|
}),
|
|
@@ -12775,7 +13139,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12775
13139
|
}
|
|
12776
13140
|
}, "\u5220\u9664");
|
|
12777
13141
|
}
|
|
12778
|
-
}].concat(lodash.takeRight(columns$
|
|
13142
|
+
}].concat(lodash.takeRight(columns$4, columns$4.length - 1));
|
|
12779
13143
|
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12780
13144
|
style: {
|
|
12781
13145
|
width: '100%',
|
|
@@ -12804,7 +13168,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12804
13168
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12805
13169
|
rowSelection: rowSelection,
|
|
12806
13170
|
rowKey: "specNo",
|
|
12807
|
-
columns: columns$
|
|
13171
|
+
columns: columns$4,
|
|
12808
13172
|
scroll: {
|
|
12809
13173
|
x: '100%',
|
|
12810
13174
|
y: 250
|
|
@@ -12820,9 +13184,9 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12820
13184
|
type: "text"
|
|
12821
13185
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12822
13186
|
};
|
|
12823
|
-
var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$
|
|
13187
|
+
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$3);
|
|
12824
13188
|
|
|
12825
|
-
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
13189
|
+
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
12826
13190
|
React.useImperativeHandle(ref, function () {
|
|
12827
13191
|
return {
|
|
12828
13192
|
open: function open() {
|
|
@@ -12857,11 +13221,11 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
|
12857
13221
|
},
|
|
12858
13222
|
onOk: onOk,
|
|
12859
13223
|
wrapClassName: "goodModal"
|
|
12860
|
-
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
|
|
13224
|
+
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
|
|
12861
13225
|
ref: gyGoodsListRef
|
|
12862
13226
|
})));
|
|
12863
13227
|
};
|
|
12864
|
-
var GyGoodsModal$
|
|
13228
|
+
var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
|
|
12865
13229
|
|
|
12866
13230
|
var getColumns = function getColumns(_ref) {
|
|
12867
13231
|
var _ref$text = _ref.text,
|
|
@@ -14016,6 +14380,256 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14016
14380
|
};
|
|
14017
14381
|
|
|
14018
14382
|
var getColumns$5 = function getColumns(_ref) {
|
|
14383
|
+
var _ref$text = _ref.text,
|
|
14384
|
+
disabled = _ref.disabled,
|
|
14385
|
+
updateHandle = _ref.updateHandle;
|
|
14386
|
+
return {
|
|
14387
|
+
JST_GOODS: [{
|
|
14388
|
+
dataIndex: 'name',
|
|
14389
|
+
title: '商品名称',
|
|
14390
|
+
width: 150,
|
|
14391
|
+
ellipsis: true,
|
|
14392
|
+
align: 'center'
|
|
14393
|
+
}, {
|
|
14394
|
+
dataIndex: 'skuId',
|
|
14395
|
+
title: '商品编码',
|
|
14396
|
+
width: 150,
|
|
14397
|
+
ellipsis: true,
|
|
14398
|
+
align: 'center'
|
|
14399
|
+
}, {
|
|
14400
|
+
dataIndex: 'iId',
|
|
14401
|
+
title: '款式编码',
|
|
14402
|
+
width: 150,
|
|
14403
|
+
ellipsis: true,
|
|
14404
|
+
align: 'center'
|
|
14405
|
+
}, {
|
|
14406
|
+
dataIndex: 'pic',
|
|
14407
|
+
title: '商品图片',
|
|
14408
|
+
ellipsis: true,
|
|
14409
|
+
align: 'center',
|
|
14410
|
+
width: 100,
|
|
14411
|
+
render: function render(val) {
|
|
14412
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14413
|
+
width: 60,
|
|
14414
|
+
src: val
|
|
14415
|
+
});
|
|
14416
|
+
}
|
|
14417
|
+
}, {
|
|
14418
|
+
dataIndex: 'propertiesValue',
|
|
14419
|
+
title: '规格值',
|
|
14420
|
+
width: 150,
|
|
14421
|
+
ellipsis: true,
|
|
14422
|
+
align: 'center'
|
|
14423
|
+
}, {
|
|
14424
|
+
dataIndex: 'saleBasePrice',
|
|
14425
|
+
title: '原价',
|
|
14426
|
+
width: 150,
|
|
14427
|
+
ellipsis: true,
|
|
14428
|
+
align: 'center'
|
|
14429
|
+
}, {
|
|
14430
|
+
dataIndex: 'salePrice',
|
|
14431
|
+
title: '单价',
|
|
14432
|
+
ellipsis: true,
|
|
14433
|
+
align: 'center',
|
|
14434
|
+
width: 120,
|
|
14435
|
+
render: function render(val, record, index) {
|
|
14436
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14437
|
+
style: {
|
|
14438
|
+
width: 70
|
|
14439
|
+
},
|
|
14440
|
+
value: val,
|
|
14441
|
+
min: 0,
|
|
14442
|
+
precision: 2,
|
|
14443
|
+
onChange: function onChange(num) {
|
|
14444
|
+
return updateHandle(num, index, 'salePrice');
|
|
14445
|
+
}
|
|
14446
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14447
|
+
}
|
|
14448
|
+
}, {
|
|
14449
|
+
dataIndex: 'qty',
|
|
14450
|
+
title: '数量',
|
|
14451
|
+
ellipsis: true,
|
|
14452
|
+
align: 'center',
|
|
14453
|
+
width: 100,
|
|
14454
|
+
render: function render(val, record, index) {
|
|
14455
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14456
|
+
style: {
|
|
14457
|
+
width: 70
|
|
14458
|
+
},
|
|
14459
|
+
value: val,
|
|
14460
|
+
min: 1,
|
|
14461
|
+
precision: 0,
|
|
14462
|
+
onChange: function onChange(num) {
|
|
14463
|
+
return updateHandle(num, index, 'qty');
|
|
14464
|
+
}
|
|
14465
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14466
|
+
}
|
|
14467
|
+
}, {
|
|
14468
|
+
dataIndex: 'saleAmount',
|
|
14469
|
+
title: '总金额',
|
|
14470
|
+
width: 150,
|
|
14471
|
+
ellipsis: true,
|
|
14472
|
+
align: 'center',
|
|
14473
|
+
render: function render(val, record, index) {
|
|
14474
|
+
return (record.qty || 0) * (+record.salePrice || 0);
|
|
14475
|
+
}
|
|
14476
|
+
}, {
|
|
14477
|
+
dataIndex: 'batchId',
|
|
14478
|
+
title: '批次号',
|
|
14479
|
+
width: 150,
|
|
14480
|
+
ellipsis: true,
|
|
14481
|
+
align: 'center'
|
|
14482
|
+
}, {
|
|
14483
|
+
dataIndex: 'isGift',
|
|
14484
|
+
title: '是否赠品',
|
|
14485
|
+
ellipsis: true,
|
|
14486
|
+
align: 'center',
|
|
14487
|
+
width: 100,
|
|
14488
|
+
render: function render(val, record, index) {
|
|
14489
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14490
|
+
value: val,
|
|
14491
|
+
onChange: function onChange(value) {
|
|
14492
|
+
updateHandle(value, index, 'isGift');
|
|
14493
|
+
},
|
|
14494
|
+
options: [{
|
|
14495
|
+
label: '是',
|
|
14496
|
+
value: true
|
|
14497
|
+
}, {
|
|
14498
|
+
label: '否',
|
|
14499
|
+
value: false
|
|
14500
|
+
}]
|
|
14501
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14502
|
+
}
|
|
14503
|
+
}, {
|
|
14504
|
+
dataIndex: 'outerOiId',
|
|
14505
|
+
title: '子订单号',
|
|
14506
|
+
width: 150,
|
|
14507
|
+
ellipsis: true,
|
|
14508
|
+
align: 'center'
|
|
14509
|
+
}],
|
|
14510
|
+
JST_REISSUE_GOODS: [{
|
|
14511
|
+
dataIndex: 'name',
|
|
14512
|
+
title: '商品名称',
|
|
14513
|
+
width: 150,
|
|
14514
|
+
ellipsis: true,
|
|
14515
|
+
align: 'center'
|
|
14516
|
+
}, {
|
|
14517
|
+
dataIndex: 'skuId',
|
|
14518
|
+
title: '商品编码',
|
|
14519
|
+
width: 150,
|
|
14520
|
+
ellipsis: true,
|
|
14521
|
+
align: 'center'
|
|
14522
|
+
}, {
|
|
14523
|
+
dataIndex: 'iId',
|
|
14524
|
+
title: '款式编码',
|
|
14525
|
+
width: 150,
|
|
14526
|
+
ellipsis: true,
|
|
14527
|
+
align: 'center'
|
|
14528
|
+
}, {
|
|
14529
|
+
dataIndex: 'pic',
|
|
14530
|
+
title: '商品图片',
|
|
14531
|
+
ellipsis: true,
|
|
14532
|
+
align: 'center',
|
|
14533
|
+
width: 100,
|
|
14534
|
+
render: function render(val) {
|
|
14535
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14536
|
+
width: 60,
|
|
14537
|
+
src: val
|
|
14538
|
+
});
|
|
14539
|
+
}
|
|
14540
|
+
}, {
|
|
14541
|
+
dataIndex: 'propertiesValue',
|
|
14542
|
+
title: '规格值',
|
|
14543
|
+
width: 150,
|
|
14544
|
+
ellipsis: true,
|
|
14545
|
+
align: 'center'
|
|
14546
|
+
}, {
|
|
14547
|
+
dataIndex: 'saleBasePrice',
|
|
14548
|
+
title: '原价',
|
|
14549
|
+
width: 150,
|
|
14550
|
+
ellipsis: true,
|
|
14551
|
+
align: 'center'
|
|
14552
|
+
}, {
|
|
14553
|
+
dataIndex: 'salePrice',
|
|
14554
|
+
title: '单价',
|
|
14555
|
+
ellipsis: true,
|
|
14556
|
+
align: 'center',
|
|
14557
|
+
width: 120,
|
|
14558
|
+
render: function render(val, record, index) {
|
|
14559
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14560
|
+
style: {
|
|
14561
|
+
width: 70
|
|
14562
|
+
},
|
|
14563
|
+
value: val,
|
|
14564
|
+
min: 0,
|
|
14565
|
+
precision: 2,
|
|
14566
|
+
onChange: function onChange(num) {
|
|
14567
|
+
return updateHandle(num, index, 'salePrice');
|
|
14568
|
+
}
|
|
14569
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14570
|
+
}
|
|
14571
|
+
}, {
|
|
14572
|
+
dataIndex: 'qty',
|
|
14573
|
+
title: '数量',
|
|
14574
|
+
ellipsis: true,
|
|
14575
|
+
align: 'center',
|
|
14576
|
+
width: 100,
|
|
14577
|
+
render: function render(val, record, index) {
|
|
14578
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14579
|
+
style: {
|
|
14580
|
+
width: 70
|
|
14581
|
+
},
|
|
14582
|
+
value: val,
|
|
14583
|
+
min: 1,
|
|
14584
|
+
precision: 0,
|
|
14585
|
+
onChange: function onChange(num) {
|
|
14586
|
+
return updateHandle(num, index, 'qty');
|
|
14587
|
+
}
|
|
14588
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14589
|
+
}
|
|
14590
|
+
}, {
|
|
14591
|
+
dataIndex: 'isGift',
|
|
14592
|
+
title: '是否赠品',
|
|
14593
|
+
ellipsis: true,
|
|
14594
|
+
align: 'center',
|
|
14595
|
+
width: 100,
|
|
14596
|
+
render: function render(val, record, index) {
|
|
14597
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14598
|
+
value: val,
|
|
14599
|
+
onChange: function onChange(value) {
|
|
14600
|
+
updateHandle(value, index, 'isGift');
|
|
14601
|
+
},
|
|
14602
|
+
options: [{
|
|
14603
|
+
label: '是',
|
|
14604
|
+
value: true
|
|
14605
|
+
}, {
|
|
14606
|
+
label: '否',
|
|
14607
|
+
value: false
|
|
14608
|
+
}]
|
|
14609
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14610
|
+
}
|
|
14611
|
+
}, {
|
|
14612
|
+
dataIndex: 'remark',
|
|
14613
|
+
title: '备注',
|
|
14614
|
+
width: 150,
|
|
14615
|
+
ellipsis: true,
|
|
14616
|
+
align: 'center',
|
|
14617
|
+
render: function render(val, record, index) {
|
|
14618
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14619
|
+
style: {
|
|
14620
|
+
width: 70
|
|
14621
|
+
},
|
|
14622
|
+
value: val,
|
|
14623
|
+
onChange: function onChange(e) {
|
|
14624
|
+
return updateHandle(e.target.value, index, 'remark');
|
|
14625
|
+
}
|
|
14626
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14627
|
+
}
|
|
14628
|
+
}]
|
|
14629
|
+
};
|
|
14630
|
+
};
|
|
14631
|
+
|
|
14632
|
+
var getColumns$6 = function getColumns(_ref) {
|
|
14019
14633
|
var _ref$text = _ref.text,
|
|
14020
14634
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14021
14635
|
disabled = _ref.disabled,
|
|
@@ -14128,7 +14742,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14128
14742
|
disabled = _ref.disabled,
|
|
14129
14743
|
updateHandle = _ref.updateHandle,
|
|
14130
14744
|
updateDataHandle = _ref.updateDataHandle;
|
|
14131
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14745
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14132
14746
|
text: text,
|
|
14133
14747
|
disabled: disabled,
|
|
14134
14748
|
updateHandle: updateHandle
|
|
@@ -14149,8 +14763,12 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14149
14763
|
disabled: disabled,
|
|
14150
14764
|
updateHandle: updateHandle,
|
|
14151
14765
|
updateDataHandle: updateDataHandle
|
|
14766
|
+
})), getColumns$5({
|
|
14767
|
+
text: text,
|
|
14768
|
+
disabled: disabled,
|
|
14769
|
+
updateHandle: updateHandle
|
|
14152
14770
|
})), {}, {
|
|
14153
|
-
default: getColumns$
|
|
14771
|
+
default: getColumns$6({
|
|
14154
14772
|
text: text,
|
|
14155
14773
|
disabled: disabled,
|
|
14156
14774
|
updateHandle: updateHandle
|
|
@@ -14254,6 +14872,19 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14254
14872
|
});
|
|
14255
14873
|
};
|
|
14256
14874
|
|
|
14875
|
+
var GoodsModalMap = {
|
|
14876
|
+
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14877
|
+
'WDT_GOODS': WdtGoodsModal,
|
|
14878
|
+
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14879
|
+
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14880
|
+
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14881
|
+
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14882
|
+
'GY_GOODS': GyGoodsModal$2,
|
|
14883
|
+
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14884
|
+
'JST_GOODS': JstGoodsModal,
|
|
14885
|
+
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14886
|
+
'OTHER_GOODS': GoodsModal$2
|
|
14887
|
+
};
|
|
14257
14888
|
var MAIN_FIELD = 'uuid';
|
|
14258
14889
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14259
14890
|
var columns = _ref.columns,
|
|
@@ -14315,6 +14946,9 @@ var getButtonText = function getButtonText() {
|
|
|
14315
14946
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14316
14947
|
return '选择管易ERP商品';
|
|
14317
14948
|
}
|
|
14949
|
+
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14950
|
+
return '选择聚水潭ERP商品';
|
|
14951
|
+
}
|
|
14318
14952
|
return '选择商品';
|
|
14319
14953
|
};
|
|
14320
14954
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -14414,7 +15048,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14414
15048
|
};
|
|
14415
15049
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
14416
15050
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
14417
|
-
var
|
|
15051
|
+
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14418
15052
|
return function (type) {
|
|
14419
15053
|
var columns = [];
|
|
14420
15054
|
switch (type) {
|
|
@@ -14425,11 +15059,13 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14425
15059
|
case 'BS_GOODS':
|
|
14426
15060
|
case 'WLN_GOODS':
|
|
14427
15061
|
case 'GY_GOODS':
|
|
15062
|
+
case 'JST_GOODS':
|
|
15063
|
+
case 'JST_REISSUE_GOODS':
|
|
14428
15064
|
case 'GY_REISSUE_GOODS':
|
|
14429
15065
|
{
|
|
14430
15066
|
columns = getColumnsMap({
|
|
14431
15067
|
text: text,
|
|
14432
|
-
disabled: disabled,
|
|
15068
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14433
15069
|
updateHandle: updateHandle,
|
|
14434
15070
|
updateDataHandle: updateDataHandle
|
|
14435
15071
|
})[type];
|
|
@@ -14438,25 +15074,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14438
15074
|
case 'WDT_REISSUE_GOODS':
|
|
14439
15075
|
{
|
|
14440
15076
|
columns = getWdtReissueGoodColumns({
|
|
14441
|
-
disabled: disabled,
|
|
15077
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14442
15078
|
updateHandle: updateHandle,
|
|
14443
|
-
operate: operate
|
|
15079
|
+
operate: columnsOptions.operate
|
|
14444
15080
|
});
|
|
14445
15081
|
}
|
|
14446
15082
|
break;
|
|
14447
15083
|
case 'BS_E3_REISSUE_GOODS':
|
|
14448
15084
|
{
|
|
14449
15085
|
columns = getBsE3ReissueGoodColumns({
|
|
14450
|
-
disabled: disabled,
|
|
15086
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14451
15087
|
updateHandle: updateHandle,
|
|
14452
|
-
operate: operate
|
|
15088
|
+
operate: columnsOptions.operate
|
|
14453
15089
|
});
|
|
14454
15090
|
}
|
|
14455
15091
|
break;
|
|
14456
15092
|
default:
|
|
14457
15093
|
columns = getColumnsMap({
|
|
14458
15094
|
text: text,
|
|
14459
|
-
disabled: disabled,
|
|
15095
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14460
15096
|
updateHandle: updateHandle,
|
|
14461
15097
|
updateDataHandle: updateDataHandle
|
|
14462
15098
|
})['default'];
|
|
@@ -14519,7 +15155,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14519
15155
|
return columnList;
|
|
14520
15156
|
}, [showHeader, value, disabled]);
|
|
14521
15157
|
var orderColumns = React.useMemo(function () {
|
|
14522
|
-
var columns = COLUMNS_MAP('',
|
|
15158
|
+
var columns = COLUMNS_MAP('', {
|
|
15159
|
+
operate: false,
|
|
15160
|
+
disabled: true
|
|
15161
|
+
})(type);
|
|
14523
15162
|
return [{
|
|
14524
15163
|
dataIndex: '',
|
|
14525
15164
|
title: '序号',
|
|
@@ -14603,6 +15242,23 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14603
15242
|
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
14604
15243
|
});
|
|
14605
15244
|
});
|
|
15245
|
+
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15246
|
+
newList = list.map(function (item) {
|
|
15247
|
+
return {
|
|
15248
|
+
name: item.goodName,
|
|
15249
|
+
skuId: item.goodNo,
|
|
15250
|
+
iId: item.styleCode,
|
|
15251
|
+
pic: item.goodPicUrl,
|
|
15252
|
+
propertiesValue: item.propertiesValue,
|
|
15253
|
+
saleBasePrice: item.retailPrice,
|
|
15254
|
+
salePrice: item.retailPrice,
|
|
15255
|
+
remark: '',
|
|
15256
|
+
uuid: kmkfUtils.uuid(),
|
|
15257
|
+
canDelete: true,
|
|
15258
|
+
canEdit: true,
|
|
15259
|
+
qty: 1
|
|
15260
|
+
};
|
|
15261
|
+
});
|
|
14606
15262
|
} else {
|
|
14607
15263
|
newList = list.map(function (item) {
|
|
14608
15264
|
var goodsId = item.goodsId,
|
|
@@ -14638,7 +15294,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14638
15294
|
}));
|
|
14639
15295
|
};
|
|
14640
15296
|
var handleChangeGoods = function handleChangeGoods() {
|
|
14641
|
-
refModal.current.open(shopCode
|
|
15297
|
+
refModal.current.open(shopCode, {
|
|
15298
|
+
value: value
|
|
15299
|
+
});
|
|
14642
15300
|
};
|
|
14643
15301
|
var rowSelection = {
|
|
14644
15302
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -14655,6 +15313,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14655
15313
|
}
|
|
14656
15314
|
return params;
|
|
14657
15315
|
}, [tableSelect, selectedRowKeys]);
|
|
15316
|
+
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'];
|
|
14658
15317
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14659
15318
|
style: {
|
|
14660
15319
|
float: 'right'
|
|
@@ -14682,31 +15341,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14682
15341
|
locale: {
|
|
14683
15342
|
emptyText: '暂无数据'
|
|
14684
15343
|
}
|
|
14685
|
-
})),
|
|
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, {
|
|
15344
|
+
})), /*#__PURE__*/React__default['default'].createElement(TheGoodsModal, {
|
|
14710
15345
|
ref: refModal,
|
|
14711
15346
|
onSubmit: onSubmit,
|
|
14712
15347
|
width: width,
|
|
@@ -15438,25 +16073,58 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
15438
16073
|
singletonMap$2.delete(orderNo);
|
|
15439
16074
|
}, 1000 * 10);
|
|
15440
16075
|
} else {
|
|
15441
|
-
doReject(res);
|
|
16076
|
+
doReject(res);
|
|
16077
|
+
}
|
|
16078
|
+
}).catch(doReject);
|
|
16079
|
+
});
|
|
16080
|
+
singletonMap$2.set(orderNo, p);
|
|
16081
|
+
}
|
|
16082
|
+
return singletonMap$2.get(orderNo);
|
|
16083
|
+
};
|
|
16084
|
+
var gyUtils = {
|
|
16085
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16086
|
+
};
|
|
16087
|
+
|
|
16088
|
+
var singletonMap$3 = new Map();
|
|
16089
|
+
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16090
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16091
|
+
var p = new Promise(function (resolve, reject) {
|
|
16092
|
+
var doReject = function doReject(err) {
|
|
16093
|
+
// 清空掉错误的请求记录
|
|
16094
|
+
// singletonMap.delete(orderNo);
|
|
16095
|
+
reject(err);
|
|
16096
|
+
};
|
|
16097
|
+
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16098
|
+
method: 'post',
|
|
16099
|
+
data: {
|
|
16100
|
+
soId: orderNo
|
|
16101
|
+
}
|
|
16102
|
+
}).then(function (data) {
|
|
16103
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16104
|
+
data.data = kmkfUtils.filterJstOrders({
|
|
16105
|
+
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16106
|
+
}, orderNo);
|
|
16107
|
+
resolve(data.data);
|
|
16108
|
+
} else {
|
|
16109
|
+
doReject(data);
|
|
15442
16110
|
}
|
|
15443
16111
|
}).catch(doReject);
|
|
15444
16112
|
});
|
|
15445
|
-
singletonMap$
|
|
16113
|
+
singletonMap$3.set(orderNo, p);
|
|
15446
16114
|
}
|
|
15447
|
-
return singletonMap$
|
|
16115
|
+
return singletonMap$3.get(orderNo);
|
|
15448
16116
|
};
|
|
15449
|
-
var
|
|
15450
|
-
|
|
16117
|
+
var jstUtils = {
|
|
16118
|
+
getJstOrderListSingleton: getJstOrderListSingleton
|
|
15451
16119
|
};
|
|
15452
16120
|
|
|
15453
|
-
var singletonMap$
|
|
16121
|
+
var singletonMap$4 = new Map();
|
|
15454
16122
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
15455
|
-
if (!singletonMap$
|
|
16123
|
+
if (!singletonMap$4.has(orderNo)) {
|
|
15456
16124
|
var p = new Promise(function (resolve, reject) {
|
|
15457
16125
|
var doReject = function doReject(err) {
|
|
15458
16126
|
// 清空掉错误的请求记录
|
|
15459
|
-
singletonMap$
|
|
16127
|
+
singletonMap$4.delete(orderNo);
|
|
15460
16128
|
reject(err);
|
|
15461
16129
|
};
|
|
15462
16130
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -15482,16 +16150,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
15482
16150
|
}
|
|
15483
16151
|
// 延迟10秒清除,保证订单的时效性
|
|
15484
16152
|
setTimeout(function () {
|
|
15485
|
-
singletonMap$
|
|
16153
|
+
singletonMap$4.delete(orderNo);
|
|
15486
16154
|
}, 1000 * 10);
|
|
15487
16155
|
} else {
|
|
15488
16156
|
doReject(data);
|
|
15489
16157
|
}
|
|
15490
16158
|
}).catch(doReject);
|
|
15491
16159
|
});
|
|
15492
|
-
singletonMap$
|
|
16160
|
+
singletonMap$4.set(orderNo, p);
|
|
15493
16161
|
}
|
|
15494
|
-
return singletonMap$
|
|
16162
|
+
return singletonMap$4.get(orderNo);
|
|
15495
16163
|
};
|
|
15496
16164
|
var kmUtils = {
|
|
15497
16165
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -15503,7 +16171,8 @@ var columnsMap = {
|
|
|
15503
16171
|
WLN_SYSTEM_ORDER: kmkfUtils.WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
15504
16172
|
WDT_SYSTEM_ORDER: kmkfUtils.WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
15505
16173
|
BS_E3_SYSTEM_ORDER: kmkfUtils.BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
15506
|
-
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
16174
|
+
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns,
|
|
16175
|
+
JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns
|
|
15507
16176
|
};
|
|
15508
16177
|
var rowKeyMap = {
|
|
15509
16178
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -15511,7 +16180,8 @@ var rowKeyMap = {
|
|
|
15511
16180
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
15512
16181
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
15513
16182
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15514
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16183
|
+
GY_SYSTEM_ORDER: 'billNo',
|
|
16184
|
+
JST_SYSTEM_ORDER: 'oId'
|
|
15515
16185
|
};
|
|
15516
16186
|
var index$1 = (function (props) {
|
|
15517
16187
|
var value = props.value,
|
|
@@ -15536,6 +16206,8 @@ var index$1 = (function (props) {
|
|
|
15536
16206
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15537
16207
|
console.log('触发gy--getGyOrderList--1');
|
|
15538
16208
|
getGyOrderList(value.orderNo);
|
|
16209
|
+
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16210
|
+
getJstOrderList(value.orderNo);
|
|
15539
16211
|
}
|
|
15540
16212
|
}
|
|
15541
16213
|
}, [value, type]);
|
|
@@ -15691,18 +16363,41 @@ var index$1 = (function (props) {
|
|
|
15691
16363
|
return _ref5.apply(this, arguments);
|
|
15692
16364
|
};
|
|
15693
16365
|
}();
|
|
15694
|
-
var
|
|
16366
|
+
var getJstOrderList = /*#__PURE__*/function () {
|
|
15695
16367
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
15696
16368
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
15697
16369
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16370
|
+
case 0:
|
|
16371
|
+
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16372
|
+
var trades = data || [];
|
|
16373
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16374
|
+
orders: trades,
|
|
16375
|
+
showOrderInfo: trades
|
|
16376
|
+
}));
|
|
16377
|
+
});
|
|
16378
|
+
onceRef.current = false;
|
|
16379
|
+
case 2:
|
|
16380
|
+
case "end":
|
|
16381
|
+
return _context5.stop();
|
|
16382
|
+
}
|
|
16383
|
+
}, _callee5);
|
|
16384
|
+
}));
|
|
16385
|
+
return function getJstOrderList(_x5) {
|
|
16386
|
+
return _ref6.apply(this, arguments);
|
|
16387
|
+
};
|
|
16388
|
+
}();
|
|
16389
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16390
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16391
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16392
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15698
16393
|
case 0:
|
|
15699
16394
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
15700
16395
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15701
16396
|
orders: trades,
|
|
15702
|
-
showOrderInfo: trades.map(function (
|
|
15703
|
-
var billNo =
|
|
15704
|
-
billType =
|
|
15705
|
-
billTag =
|
|
16397
|
+
showOrderInfo: trades.map(function (_ref8) {
|
|
16398
|
+
var billNo = _ref8.billNo,
|
|
16399
|
+
billType = _ref8.billType,
|
|
16400
|
+
billTag = _ref8.billTag;
|
|
15706
16401
|
return {
|
|
15707
16402
|
billNo: billNo,
|
|
15708
16403
|
billType: billType,
|
|
@@ -15714,18 +16409,18 @@ var index$1 = (function (props) {
|
|
|
15714
16409
|
onceRef.current = false;
|
|
15715
16410
|
case 2:
|
|
15716
16411
|
case "end":
|
|
15717
|
-
return
|
|
16412
|
+
return _context6.stop();
|
|
15718
16413
|
}
|
|
15719
|
-
},
|
|
16414
|
+
}, _callee6);
|
|
15720
16415
|
}));
|
|
15721
|
-
return function getKmOrderList(
|
|
15722
|
-
return
|
|
16416
|
+
return function getKmOrderList(_x6) {
|
|
16417
|
+
return _ref7.apply(this, arguments);
|
|
15723
16418
|
};
|
|
15724
16419
|
}();
|
|
15725
16420
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
15726
|
-
var
|
|
15727
|
-
return _regeneratorRuntime().wrap(function
|
|
15728
|
-
while (1) switch (
|
|
16421
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(orderNo) {
|
|
16422
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
16423
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
15729
16424
|
case 0:
|
|
15730
16425
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15731
16426
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -15733,12 +16428,12 @@ var index$1 = (function (props) {
|
|
|
15733
16428
|
});
|
|
15734
16429
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15735
16430
|
orders: trades,
|
|
15736
|
-
showOrderInfo: trades.map(function (
|
|
15737
|
-
var billNo =
|
|
15738
|
-
billType =
|
|
15739
|
-
billTag =
|
|
15740
|
-
tradeTagName =
|
|
15741
|
-
deliveryState =
|
|
16431
|
+
showOrderInfo: trades.map(function (_ref10) {
|
|
16432
|
+
var billNo = _ref10.billNo,
|
|
16433
|
+
billType = _ref10.billType,
|
|
16434
|
+
billTag = _ref10.billTag,
|
|
16435
|
+
tradeTagName = _ref10.tradeTagName,
|
|
16436
|
+
deliveryState = _ref10.deliveryState;
|
|
15742
16437
|
return {
|
|
15743
16438
|
billNo: billNo,
|
|
15744
16439
|
billType: billType,
|
|
@@ -15753,12 +16448,12 @@ var index$1 = (function (props) {
|
|
|
15753
16448
|
onceRef.current = false;
|
|
15754
16449
|
case 2:
|
|
15755
16450
|
case "end":
|
|
15756
|
-
return
|
|
16451
|
+
return _context7.stop();
|
|
15757
16452
|
}
|
|
15758
|
-
},
|
|
16453
|
+
}, _callee7);
|
|
15759
16454
|
}));
|
|
15760
|
-
return function getGyOrderList(
|
|
15761
|
-
return
|
|
16455
|
+
return function getGyOrderList(_x7) {
|
|
16456
|
+
return _ref9.apply(this, arguments);
|
|
15762
16457
|
};
|
|
15763
16458
|
}();
|
|
15764
16459
|
var rowSelection = {
|
|
@@ -15907,6 +16602,31 @@ var componentMap$1 = {
|
|
|
15907
16602
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
15908
16603
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
15909
16604
|
}
|
|
16605
|
+
},
|
|
16606
|
+
JST_GOODS: {
|
|
16607
|
+
type: 'jst',
|
|
16608
|
+
key: 'jstGoods',
|
|
16609
|
+
name: '聚水潭',
|
|
16610
|
+
orderNo: 'dealCode',
|
|
16611
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
16612
|
+
eventNameMap: {
|
|
16613
|
+
// pubsub 事件
|
|
16614
|
+
type: 'jstType',
|
|
16615
|
+
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
16616
|
+
selectListReturn: 'jstSelectListReturn',
|
|
16617
|
+
selectList: 'jstSelectList',
|
|
16618
|
+
reissueSelectList: 'jstReissueSelectList',
|
|
16619
|
+
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16620
|
+
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16621
|
+
changeShopCode: 'jstChangeShopCode',
|
|
16622
|
+
reissueType: 'jstReissueType',
|
|
16623
|
+
returnType: 'jstReturnType',
|
|
16624
|
+
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16625
|
+
returnSelectList: 'jstReturnSelectList',
|
|
16626
|
+
deleteGood: 'jstDeleteGood',
|
|
16627
|
+
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16628
|
+
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16629
|
+
}
|
|
15910
16630
|
}
|
|
15911
16631
|
};
|
|
15912
16632
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -16626,6 +17346,260 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
16626
17346
|
})));
|
|
16627
17347
|
};
|
|
16628
17348
|
|
|
17349
|
+
var _excluded$h = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17350
|
+
var typeMap$2 = {
|
|
17351
|
+
JST_REISSUE_GOODS: {
|
|
17352
|
+
key: 'jstReissueGoods',
|
|
17353
|
+
typeName: 'jstReissueType',
|
|
17354
|
+
systemOrder: 'jstSystemOrder',
|
|
17355
|
+
systemOrderNo: 'jstSystemOrderNo',
|
|
17356
|
+
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17357
|
+
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17358
|
+
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17359
|
+
orderTypeKey: 'orderType',
|
|
17360
|
+
oIdKey: 'oId',
|
|
17361
|
+
outerOiIdKey: 'outerOiId',
|
|
17362
|
+
goodDetailsKey: 'items'
|
|
17363
|
+
}
|
|
17364
|
+
};
|
|
17365
|
+
var PublicReissue = function PublicReissue(props) {
|
|
17366
|
+
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17367
|
+
var value = props.value,
|
|
17368
|
+
onChange = props.onChange,
|
|
17369
|
+
_props$reasonList = props.reasonList,
|
|
17370
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17371
|
+
disabled = props.disabled,
|
|
17372
|
+
type = props.type,
|
|
17373
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
17374
|
+
var getOrderFlag = React.useRef(false);
|
|
17375
|
+
var _useState = React.useState(false),
|
|
17376
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17377
|
+
isStrict = _useState2[0],
|
|
17378
|
+
setIsStrict = _useState2[1];
|
|
17379
|
+
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17380
|
+
React.useEffect(function () {
|
|
17381
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17382
|
+
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)) {
|
|
17383
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17384
|
+
getOrderFlag.current = true;
|
|
17385
|
+
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);
|
|
17386
|
+
}
|
|
17387
|
+
return;
|
|
17388
|
+
}, [value]);
|
|
17389
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17390
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17391
|
+
var _typeMap$type4;
|
|
17392
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17393
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17394
|
+
case 0:
|
|
17395
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17396
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17397
|
+
var orders = data || [];
|
|
17398
|
+
var showOrderInfo = orders.map(function (orderItem) {
|
|
17399
|
+
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17400
|
+
});
|
|
17401
|
+
var typeObj = {};
|
|
17402
|
+
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];
|
|
17403
|
+
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) {
|
|
17404
|
+
var _typeMap$type8, _typeMap$type9;
|
|
17405
|
+
var targetOrder = orders.find(function (oItem) {
|
|
17406
|
+
var _typeMap$type7;
|
|
17407
|
+
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17408
|
+
});
|
|
17409
|
+
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];
|
|
17410
|
+
}
|
|
17411
|
+
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]), {}, {
|
|
17412
|
+
showOrderInfo: showOrderInfo,
|
|
17413
|
+
orders: orders
|
|
17414
|
+
}))));
|
|
17415
|
+
});
|
|
17416
|
+
case 1:
|
|
17417
|
+
case "end":
|
|
17418
|
+
return _context.stop();
|
|
17419
|
+
}
|
|
17420
|
+
}, _callee);
|
|
17421
|
+
}));
|
|
17422
|
+
return function getOrderList(_x) {
|
|
17423
|
+
return _ref.apply(this, arguments);
|
|
17424
|
+
};
|
|
17425
|
+
}();
|
|
17426
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17427
|
+
var _typeMap$type12;
|
|
17428
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17429
|
+
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17430
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17431
|
+
var newValue = _objectSpread2({}, value);
|
|
17432
|
+
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17433
|
+
if (typeName === '1') {
|
|
17434
|
+
var _typeMap$type13;
|
|
17435
|
+
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17436
|
+
mode: isStrict
|
|
17437
|
+
});
|
|
17438
|
+
} else if (typeName === '2') {
|
|
17439
|
+
var _typeMap$type14;
|
|
17440
|
+
// 切换到非原单,清空列表
|
|
17441
|
+
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17442
|
+
}
|
|
17443
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17444
|
+
};
|
|
17445
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17446
|
+
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17447
|
+
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';
|
|
17448
|
+
setIsStrict(mode);
|
|
17449
|
+
if (!isOriginalOrder) return;
|
|
17450
|
+
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({
|
|
17451
|
+
mode: mode
|
|
17452
|
+
}))));
|
|
17453
|
+
};
|
|
17454
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17455
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17456
|
+
var mode = _ref3.mode,
|
|
17457
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17458
|
+
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];
|
|
17459
|
+
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];
|
|
17460
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17461
|
+
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17462
|
+
});
|
|
17463
|
+
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) : [];
|
|
17464
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17465
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17466
|
+
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17467
|
+
}) : goodDetails;
|
|
17468
|
+
};
|
|
17469
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17470
|
+
var _typeMap$type20;
|
|
17471
|
+
var newValue = _objectSpread2({}, value);
|
|
17472
|
+
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 || [];
|
|
17473
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17474
|
+
};
|
|
17475
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17476
|
+
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17477
|
+
var newValue = _objectSpread2({}, value);
|
|
17478
|
+
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;
|
|
17479
|
+
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) {
|
|
17480
|
+
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17481
|
+
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) || [];
|
|
17482
|
+
var targetOrder = val && orders.find(function (oItem) {
|
|
17483
|
+
var _typeMap$type24;
|
|
17484
|
+
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17485
|
+
});
|
|
17486
|
+
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];
|
|
17487
|
+
}
|
|
17488
|
+
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])) {
|
|
17489
|
+
var _typeMap$type28;
|
|
17490
|
+
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)] = [];
|
|
17491
|
+
} 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])) {
|
|
17492
|
+
var _typeMap$type30;
|
|
17493
|
+
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({
|
|
17494
|
+
mode: isStrict,
|
|
17495
|
+
sysOrderNo: val
|
|
17496
|
+
});
|
|
17497
|
+
}
|
|
17498
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17499
|
+
};
|
|
17500
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17501
|
+
var showChangeBtn = React.useMemo(function () {
|
|
17502
|
+
var _typeMap$type31;
|
|
17503
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17504
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17505
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
17506
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17507
|
+
var newValue = _objectSpread2({}, value);
|
|
17508
|
+
// 原订单商品
|
|
17509
|
+
var originTradeGoodList = getGoodDetails({
|
|
17510
|
+
mode: isStrict
|
|
17511
|
+
}) || [];
|
|
17512
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17513
|
+
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)]) || [];
|
|
17514
|
+
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) {
|
|
17515
|
+
return skuList.includes(item.uuid);
|
|
17516
|
+
});
|
|
17517
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17518
|
+
}, [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]);
|
|
17519
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17520
|
+
gutter: 8,
|
|
17521
|
+
wrap: true,
|
|
17522
|
+
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())
|
|
17523
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17524
|
+
className: "gutter-row",
|
|
17525
|
+
xs: {
|
|
17526
|
+
span: 11
|
|
17527
|
+
},
|
|
17528
|
+
sm: {
|
|
17529
|
+
span: 6
|
|
17530
|
+
}
|
|
17531
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
17532
|
+
style: {
|
|
17533
|
+
marginBottom: '8px'
|
|
17534
|
+
},
|
|
17535
|
+
disabled: disabled,
|
|
17536
|
+
allowClear: false,
|
|
17537
|
+
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)],
|
|
17538
|
+
onChange: function onChange(val) {
|
|
17539
|
+
return changeSystemOrderHandle(val);
|
|
17540
|
+
},
|
|
17541
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17542
|
+
}, ((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) {
|
|
17543
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17544
|
+
key: item[typeMap$2[type].oIdKey],
|
|
17545
|
+
value: item[typeMap$2[type].oIdKey],
|
|
17546
|
+
label: item[typeMap$2[type].oIdKey]
|
|
17547
|
+
}, item[typeMap$2[type].oIdKey]);
|
|
17548
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17549
|
+
className: "gutter-row",
|
|
17550
|
+
xs: {
|
|
17551
|
+
span: 11
|
|
17552
|
+
},
|
|
17553
|
+
sm: {
|
|
17554
|
+
span: 6
|
|
17555
|
+
}
|
|
17556
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
17557
|
+
style: {
|
|
17558
|
+
marginBottom: '8px'
|
|
17559
|
+
},
|
|
17560
|
+
disabled: disabled,
|
|
17561
|
+
allowClear: false,
|
|
17562
|
+
options: reasonList,
|
|
17563
|
+
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)],
|
|
17564
|
+
onChange: function onChange(val) {
|
|
17565
|
+
return changeTypeHandle(val);
|
|
17566
|
+
}
|
|
17567
|
+
})), (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, {
|
|
17568
|
+
className: "gutter-row",
|
|
17569
|
+
xs: {
|
|
17570
|
+
span: 11
|
|
17571
|
+
},
|
|
17572
|
+
sm: {
|
|
17573
|
+
span: 6
|
|
17574
|
+
}
|
|
17575
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
17576
|
+
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)],
|
|
17577
|
+
disabled: disabled,
|
|
17578
|
+
readOnly: true
|
|
17579
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17580
|
+
key: 'reissueGoods'
|
|
17581
|
+
}, other), {}, {
|
|
17582
|
+
type: type,
|
|
17583
|
+
disabled: disabled,
|
|
17584
|
+
canUpdateNumber: showChangeBtn,
|
|
17585
|
+
showChangeBtn: showChangeBtn,
|
|
17586
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17587
|
+
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)],
|
|
17588
|
+
onChange: function onChange(val) {
|
|
17589
|
+
return changeGoodHandle(val);
|
|
17590
|
+
},
|
|
17591
|
+
onModeChange: handleModeChange,
|
|
17592
|
+
showModeBtn: false,
|
|
17593
|
+
isStrict: isStrict,
|
|
17594
|
+
tradeGoods: {
|
|
17595
|
+
originDataSource: getGoodDetails({
|
|
17596
|
+
mode: isStrict
|
|
17597
|
+
}),
|
|
17598
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17599
|
+
}
|
|
17600
|
+
})));
|
|
17601
|
+
};
|
|
17602
|
+
|
|
16629
17603
|
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";
|
|
16630
17604
|
styleInject(css_248z$a);
|
|
16631
17605
|
|
|
@@ -17102,12 +18076,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
17102
18076
|
};
|
|
17103
18077
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
17104
18078
|
|
|
17105
|
-
var _excluded$
|
|
18079
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
17106
18080
|
function CommonStatus(props) {
|
|
17107
18081
|
var onChange = props.onChange,
|
|
17108
18082
|
value = props.value,
|
|
17109
18083
|
failValue = props.failValue,
|
|
17110
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18084
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
17111
18085
|
var changeHandle = function changeHandle(val) {
|
|
17112
18086
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
17113
18087
|
status: val,
|
|
@@ -17147,10 +18121,15 @@ var typeInitValueMap$1 = {
|
|
|
17147
18121
|
initValue: [{
|
|
17148
18122
|
billNo: ''
|
|
17149
18123
|
}]
|
|
18124
|
+
},
|
|
18125
|
+
5: {
|
|
18126
|
+
initValue: [{
|
|
18127
|
+
billNo: ''
|
|
18128
|
+
}]
|
|
17150
18129
|
}
|
|
17151
18130
|
};
|
|
17152
18131
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
17153
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18132
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5;
|
|
17154
18133
|
var _props$value = props.value,
|
|
17155
18134
|
value = _props$value === void 0 ? [] : _props$value,
|
|
17156
18135
|
onChange = props.onChange,
|
|
@@ -17172,7 +18151,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
17172
18151
|
maxHeight: '300px',
|
|
17173
18152
|
overflowY: 'auto'
|
|
17174
18153
|
}
|
|
17175
|
-
}, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
18154
|
+
}, [1, 2, 3, 4, 5].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
17176
18155
|
};
|
|
17177
18156
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
17178
18157
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -17229,10 +18208,17 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
17229
18208
|
return changeInputHandle(e.target.value, 'billNo');
|
|
17230
18209
|
},
|
|
17231
18210
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18211
|
+
})) : null, type === 5 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18212
|
+
disabled: disabled,
|
|
18213
|
+
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18214
|
+
onChange: function onChange(e) {
|
|
18215
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
18216
|
+
},
|
|
18217
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
17232
18218
|
})) : null) : null);
|
|
17233
18219
|
};
|
|
17234
18220
|
|
|
17235
|
-
var _excluded$
|
|
18221
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
17236
18222
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
17237
18223
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
17238
18224
|
var _props$value = props.value,
|
|
@@ -17242,7 +18228,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
17242
18228
|
failValue = props.failValue,
|
|
17243
18229
|
_props$type = props.type,
|
|
17244
18230
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
17245
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18231
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
17246
18232
|
var _useState = React.useState(0),
|
|
17247
18233
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17248
18234
|
changeIndex = _useState2[0],
|
|
@@ -17308,7 +18294,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
17308
18294
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
17309
18295
|
};
|
|
17310
18296
|
|
|
17311
|
-
var _excluded$
|
|
18297
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
17312
18298
|
var MsgStatus = function MsgStatus(props) {
|
|
17313
18299
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
17314
18300
|
var _props$value = props.value,
|
|
@@ -17318,7 +18304,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
17318
18304
|
failValue = props.failValue,
|
|
17319
18305
|
_props$type = props.type,
|
|
17320
18306
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
17321
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18307
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
17322
18308
|
var _useState = React.useState(0),
|
|
17323
18309
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17324
18310
|
changeIndex = _useState2[0],
|
|
@@ -17349,7 +18335,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
17349
18335
|
onClick: function onClick() {
|
|
17350
18336
|
return setChangeIndex(index);
|
|
17351
18337
|
}
|
|
17352
|
-
}, kmkfUtils.msgTypeCh[key], item.ruleName);
|
|
18338
|
+
}, kmkfUtils.msgTypeCh[key] || key, item.ruleName);
|
|
17353
18339
|
}))) : 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), {}, {
|
|
17354
18340
|
showSearch: true,
|
|
17355
18341
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -17387,8 +18373,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
17387
18373
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
17388
18374
|
};
|
|
17389
18375
|
|
|
17390
|
-
var _excluded$
|
|
17391
|
-
var typeMap$
|
|
18376
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
18377
|
+
var typeMap$3 = {
|
|
17392
18378
|
BS_E3_REISSUE_GOODS: {
|
|
17393
18379
|
key: 'bsE3ReissueGoods',
|
|
17394
18380
|
typeName: 'bsE3ReissueType',
|
|
@@ -17405,7 +18391,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17405
18391
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17406
18392
|
disabled = props.disabled,
|
|
17407
18393
|
type = props.type,
|
|
17408
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18394
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17409
18395
|
var getOrderFlag = React.useRef(false);
|
|
17410
18396
|
var _useState = React.useState(false),
|
|
17411
18397
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17414,10 +18400,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17414
18400
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17415
18401
|
React.useEffect(function () {
|
|
17416
18402
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17417
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
18403
|
+
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)) {
|
|
17418
18404
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17419
18405
|
getOrderFlag.current = true;
|
|
17420
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
18406
|
+
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);
|
|
17421
18407
|
}
|
|
17422
18408
|
return;
|
|
17423
18409
|
}, [value]);
|
|
@@ -17441,7 +18427,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17441
18427
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17442
18428
|
while (1) switch (_context.prev = _context.next) {
|
|
17443
18429
|
case 0:
|
|
17444
|
-
(_typeMap$type4 = typeMap$
|
|
18430
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17445
18431
|
var _typeMap$type5, _typeMap$type6;
|
|
17446
18432
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
17447
18433
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -17450,7 +18436,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17450
18436
|
billNo: orderSn
|
|
17451
18437
|
};
|
|
17452
18438
|
});
|
|
17453
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
18439
|
+
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]), {}, {
|
|
17454
18440
|
showOrderInfo: showOrderInfo,
|
|
17455
18441
|
orders: orders
|
|
17456
18442
|
}))));
|
|
@@ -17471,25 +18457,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17471
18457
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17472
18458
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17473
18459
|
var newValue = _objectSpread2({}, value);
|
|
17474
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
18460
|
+
newValue[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
17475
18461
|
if (typeName === '1') {
|
|
17476
18462
|
var _typeMap$type8;
|
|
17477
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
18463
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
17478
18464
|
mode: isStrict
|
|
17479
18465
|
});
|
|
17480
18466
|
} else if (typeName === '2') {
|
|
17481
18467
|
var _typeMap$type9;
|
|
17482
18468
|
// 切换到非原单,清空列表
|
|
17483
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
18469
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
17484
18470
|
}
|
|
17485
18471
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17486
18472
|
};
|
|
17487
18473
|
var handleModeChange = function handleModeChange(mode) {
|
|
17488
18474
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
17489
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$
|
|
18475
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$3[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';
|
|
17490
18476
|
setIsStrict(mode);
|
|
17491
18477
|
if (!isOriginalOrder) return;
|
|
17492
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$
|
|
18478
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
|
|
17493
18479
|
mode: mode
|
|
17494
18480
|
}))));
|
|
17495
18481
|
};
|
|
@@ -17497,8 +18483,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17497
18483
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
17498
18484
|
var mode = _ref3.mode,
|
|
17499
18485
|
sysOrderNo = _ref3.sysOrderNo;
|
|
17500
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
17501
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18486
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
|
|
18487
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
|
|
17502
18488
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17503
18489
|
return order.orderSn === systemOrderNo;
|
|
17504
18490
|
});
|
|
@@ -17511,19 +18497,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17511
18497
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17512
18498
|
var _typeMap$type14;
|
|
17513
18499
|
var newValue = _objectSpread2({}, value);
|
|
17514
|
-
newValue["".concat(typeMap$
|
|
18500
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
|
|
17515
18501
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17516
18502
|
};
|
|
17517
18503
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17518
18504
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
17519
18505
|
var newValue = _objectSpread2({}, value);
|
|
17520
|
-
newValue["".concat(typeMap$
|
|
17521
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$
|
|
18506
|
+
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.systemOrderNo)] = val;
|
|
18507
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$3[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])) {
|
|
17522
18508
|
var _typeMap$type17;
|
|
17523
|
-
newValue["".concat(typeMap$
|
|
17524
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$
|
|
18509
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
|
|
18510
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$3[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])) {
|
|
17525
18511
|
var _typeMap$type19;
|
|
17526
|
-
newValue["".concat(typeMap$
|
|
18512
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
|
|
17527
18513
|
mode: isStrict,
|
|
17528
18514
|
sysOrderNo: val
|
|
17529
18515
|
});
|
|
@@ -17533,8 +18519,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17533
18519
|
//显示选择商品按钮 原单换不显示选择商品
|
|
17534
18520
|
var showChangeBtn = React.useMemo(function () {
|
|
17535
18521
|
var _typeMap$type20;
|
|
17536
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
17537
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$
|
|
18522
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
18523
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
17538
18524
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
17539
18525
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
17540
18526
|
var newValue = _objectSpread2({}, value);
|
|
@@ -17543,12 +18529,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17543
18529
|
mode: isStrict
|
|
17544
18530
|
}) || [];
|
|
17545
18531
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17546
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17547
|
-
newValue["".concat(typeMap$
|
|
18532
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".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)]) || [];
|
|
18533
|
+
newValue["".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)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17548
18534
|
return skuList.includes(item.uuid);
|
|
17549
18535
|
});
|
|
17550
18536
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17551
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18537
|
+
}, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
|
|
17552
18538
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17553
18539
|
gutter: 8,
|
|
17554
18540
|
wrap: true,
|
|
@@ -17567,12 +18553,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17567
18553
|
},
|
|
17568
18554
|
disabled: disabled,
|
|
17569
18555
|
allowClear: false,
|
|
17570
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18556
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
17571
18557
|
onChange: function onChange(val) {
|
|
17572
18558
|
return changeSystemOrderHandle(val);
|
|
17573
18559
|
},
|
|
17574
18560
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17575
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$
|
|
18561
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$3[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) {
|
|
17576
18562
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17577
18563
|
key: item.billNo,
|
|
17578
18564
|
value: item.billNo,
|
|
@@ -17593,7 +18579,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17593
18579
|
disabled: disabled,
|
|
17594
18580
|
allowClear: false,
|
|
17595
18581
|
options: reasonList,
|
|
17596
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18582
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
17597
18583
|
onChange: function onChange(val) {
|
|
17598
18584
|
return changeTypeHandle(val);
|
|
17599
18585
|
}
|
|
@@ -17605,7 +18591,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17605
18591
|
canUpdateNumber: showChangeBtn,
|
|
17606
18592
|
showChangeBtn: showChangeBtn,
|
|
17607
18593
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17608
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18594
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
17609
18595
|
onChange: function onChange(val) {
|
|
17610
18596
|
return changeGoodHandle(val);
|
|
17611
18597
|
},
|
|
@@ -17621,9 +18607,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17621
18607
|
})));
|
|
17622
18608
|
};
|
|
17623
18609
|
|
|
17624
|
-
var _excluded$
|
|
18610
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17625
18611
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17626
|
-
var typeMap$
|
|
18612
|
+
var typeMap$4 = {
|
|
17627
18613
|
GY_REISSUE_GOODS: {
|
|
17628
18614
|
key: 'gyReissueGoods',
|
|
17629
18615
|
name: '管易',
|
|
@@ -17650,7 +18636,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17650
18636
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17651
18637
|
disabled = props.disabled,
|
|
17652
18638
|
type = props.type,
|
|
17653
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18639
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
17654
18640
|
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) {
|
|
17655
18641
|
var _order$platformCode;
|
|
17656
18642
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -17662,10 +18648,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
17662
18648
|
setIsStrict = _useState2[1];
|
|
17663
18649
|
React.useEffect(function () {
|
|
17664
18650
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17665
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
18651
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[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$4[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)) {
|
|
17666
18652
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17667
18653
|
getOrderFlag.current = true;
|
|
17668
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
18654
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[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);
|
|
17669
18655
|
}
|
|
17670
18656
|
return;
|
|
17671
18657
|
}, [value]);
|
|
@@ -17675,7 +18661,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17675
18661
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17676
18662
|
while (1) switch (_context.prev = _context.next) {
|
|
17677
18663
|
case 0:
|
|
17678
|
-
(_typeMap$type4 = typeMap$
|
|
18664
|
+
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17679
18665
|
var _typeMap$type5, _typeMap$type6;
|
|
17680
18666
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17681
18667
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -17694,7 +18680,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17694
18680
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17695
18681
|
});
|
|
17696
18682
|
});
|
|
17697
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
18683
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
17698
18684
|
showOrderInfo: showOrderInfo,
|
|
17699
18685
|
orders: orders
|
|
17700
18686
|
}))));
|
|
@@ -17712,28 +18698,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
17712
18698
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17713
18699
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17714
18700
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17715
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$
|
|
18701
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$4[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;
|
|
17716
18702
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17717
18703
|
var newValue = _objectSpread2({}, value);
|
|
17718
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
18704
|
+
newValue[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17719
18705
|
if (typeName === '1') {
|
|
17720
18706
|
var _typeMap$type9;
|
|
17721
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
18707
|
+
newValue[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17722
18708
|
mode: isStrict
|
|
17723
18709
|
});
|
|
17724
18710
|
} else if (typeName === '2') {
|
|
17725
18711
|
var _typeMap$type10;
|
|
17726
18712
|
// 切换到非原单,清空列表
|
|
17727
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
18713
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17728
18714
|
}
|
|
17729
18715
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17730
18716
|
};
|
|
17731
18717
|
var handleModeChange = function handleModeChange(mode) {
|
|
17732
18718
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17733
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$
|
|
18719
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$4[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';
|
|
17734
18720
|
setIsStrict(mode);
|
|
17735
18721
|
if (!isOriginalOrder) return;
|
|
17736
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$
|
|
18722
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
17737
18723
|
mode: mode
|
|
17738
18724
|
}))));
|
|
17739
18725
|
};
|
|
@@ -17741,8 +18727,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
17741
18727
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17742
18728
|
var mode = _ref3.mode,
|
|
17743
18729
|
sysOrderNo = _ref3.sysOrderNo;
|
|
17744
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
17745
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$
|
|
18730
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
18731
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
17746
18732
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17747
18733
|
return order.code === systemOrderNo;
|
|
17748
18734
|
});
|
|
@@ -17755,10 +18741,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
17755
18741
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17756
18742
|
var _typeMap$type15;
|
|
17757
18743
|
var newValue = _objectSpread2({}, value);
|
|
17758
|
-
newValue["".concat(typeMap$
|
|
18744
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
17759
18745
|
var _typeMap$type16, _typeMap$type17;
|
|
17760
|
-
item["".concat(typeMap$
|
|
17761
|
-
item["".concat(typeMap$
|
|
18746
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
18747
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
17762
18748
|
return item;
|
|
17763
18749
|
});
|
|
17764
18750
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -17766,13 +18752,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
17766
18752
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17767
18753
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17768
18754
|
var newValue = _objectSpread2({}, value);
|
|
17769
|
-
newValue["".concat(typeMap$
|
|
17770
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$
|
|
18755
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
18756
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$4[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])) {
|
|
17771
18757
|
var _typeMap$type20;
|
|
17772
|
-
newValue["".concat(typeMap$
|
|
17773
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$
|
|
18758
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
18759
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[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])) {
|
|
17774
18760
|
var _typeMap$type22;
|
|
17775
|
-
newValue["".concat(typeMap$
|
|
18761
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
17776
18762
|
mode: isStrict,
|
|
17777
18763
|
sysOrderNo: val
|
|
17778
18764
|
});
|
|
@@ -17787,18 +18773,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
17787
18773
|
mode: isStrict
|
|
17788
18774
|
}) || [];
|
|
17789
18775
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17790
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17791
|
-
newValue["".concat(typeMap$
|
|
18776
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
18777
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[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) {
|
|
17792
18778
|
return skuList.includes(item.uuid);
|
|
17793
18779
|
});
|
|
17794
|
-
console.log('商品发生变化', newValue["".concat(typeMap$
|
|
18780
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
17795
18781
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17796
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18782
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
17797
18783
|
//显示选择商品按钮 原单换不显示选择商品
|
|
17798
18784
|
var showChangeBtn = React.useMemo(function () {
|
|
17799
18785
|
var _typeMap$type27;
|
|
17800
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
17801
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$
|
|
18786
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
18787
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17802
18788
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17803
18789
|
gutter: 8,
|
|
17804
18790
|
wrap: true
|
|
@@ -17816,12 +18802,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
17816
18802
|
},
|
|
17817
18803
|
disabled: disabled,
|
|
17818
18804
|
allowClear: false,
|
|
17819
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18805
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
17820
18806
|
onChange: function onChange(val) {
|
|
17821
18807
|
return changeSystemOrderHandle(val);
|
|
17822
18808
|
},
|
|
17823
18809
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17824
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$
|
|
18810
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$4[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) {
|
|
17825
18811
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17826
18812
|
key: item.billNo,
|
|
17827
18813
|
value: item.billNo,
|
|
@@ -17842,7 +18828,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17842
18828
|
disabled: disabled,
|
|
17843
18829
|
allowClear: false,
|
|
17844
18830
|
options: reasonList,
|
|
17845
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18831
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
17846
18832
|
onChange: function onChange(val) {
|
|
17847
18833
|
return changeTypeHandle(val);
|
|
17848
18834
|
}
|
|
@@ -17854,7 +18840,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17854
18840
|
canUpdateNumber: showChangeBtn,
|
|
17855
18841
|
showChangeBtn: showChangeBtn,
|
|
17856
18842
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17857
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18843
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
17858
18844
|
onChange: function onChange(val) {
|
|
17859
18845
|
return changeGoodHandle(val);
|
|
17860
18846
|
},
|
|
@@ -17920,6 +18906,7 @@ exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
|
17920
18906
|
exports.MsgStatus = MsgStatus;
|
|
17921
18907
|
exports.ParseLogistics = ParseLogistics;
|
|
17922
18908
|
exports.Payment = Payment;
|
|
18909
|
+
exports.PublicReissue = PublicReissue;
|
|
17923
18910
|
exports.Remark = RemarkInput;
|
|
17924
18911
|
exports.ReturnLogistics = ExpressLogistics;
|
|
17925
18912
|
exports.ShopName = ShopNameSelect;
|