@kmkf-fe-packages/basic-components 2.0.12-beta.3 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +171 -1172
- package/dist/index.js +169 -1171
- package/dist/src/bs/SystemOrder/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/package.json +4 -4
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +0 -25
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +0 -13
- package/dist/src/common/Reissue/index.d.ts +0 -3
- package/dist/src/constants/jst.d.ts +0 -3
- package/dist/src/jst/common/index.d.ts +0 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -11008,7 +11008,7 @@ var typeInitValueMap = {
|
|
|
11008
11008
|
}]
|
|
11009
11009
|
};
|
|
11010
11010
|
var jstGoods = function jstGoods(props) {
|
|
11011
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8
|
|
11011
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
11012
11012
|
var _props$value = props.value,
|
|
11013
11013
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11014
11014
|
onChange = props.onChange,
|
|
@@ -11025,8 +11025,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11025
11025
|
changeIndex = _useState2[0],
|
|
11026
11026
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11027
11027
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
11028
|
-
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'
|
|
11029
|
-
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11028
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11030
11029
|
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11031
11030
|
useEffect(function () {
|
|
11032
11031
|
//没有值塞个默认值
|
|
@@ -11038,7 +11037,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11038
11037
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11039
11038
|
setChangeIndex(0);
|
|
11040
11039
|
}
|
|
11041
|
-
},
|
|
11040
|
+
}, value);
|
|
11042
11041
|
var content = function content(item, index) {
|
|
11043
11042
|
return /*#__PURE__*/React.createElement("div", {
|
|
11044
11043
|
style: {
|
|
@@ -11066,14 +11065,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11066
11065
|
changeOrderInfo['sendId'] = option.value;
|
|
11067
11066
|
}
|
|
11068
11067
|
if (isSelectName && type === 'sendName') {
|
|
11069
|
-
|
|
11070
|
-
// 如果发货仓名称存的是id,将名称存入快照
|
|
11071
|
-
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11072
|
-
} else {
|
|
11073
|
-
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
11074
|
-
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
11075
|
-
changeOrderInfo['sendName'] = option.label;
|
|
11076
|
-
}
|
|
11068
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11077
11069
|
}
|
|
11078
11070
|
var newList = _toConsumableArray(value);
|
|
11079
11071
|
newList[changeIndex] = changeOrderInfo;
|
|
@@ -11173,7 +11165,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11173
11165
|
showSearch: true,
|
|
11174
11166
|
options: sendOptions,
|
|
11175
11167
|
filterOption: filterOption,
|
|
11176
|
-
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.
|
|
11168
|
+
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11177
11169
|
onChange: function onChange(value, option) {
|
|
11178
11170
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11179
11171
|
}
|
|
@@ -11183,14 +11175,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11183
11175
|
onChange: function onChange(e) {
|
|
11184
11176
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11185
11177
|
},
|
|
11186
|
-
value: (_value$
|
|
11178
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
11187
11179
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11188
11180
|
disabled: disabled,
|
|
11189
11181
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11190
11182
|
onChange: function onChange(e) {
|
|
11191
11183
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11192
11184
|
},
|
|
11193
|
-
value: (_value$
|
|
11185
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
11194
11186
|
})) : null) : null);
|
|
11195
11187
|
};
|
|
11196
11188
|
|
|
@@ -12160,363 +12152,9 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12160
12152
|
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
12161
12153
|
|
|
12162
12154
|
var getTableData$1 = function getTableData(_ref, formData) {
|
|
12163
|
-
var current = _ref.current,
|
|
12164
|
-
pageSize = _ref.pageSize;
|
|
12165
|
-
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12166
|
-
method: 'post',
|
|
12167
|
-
data: _objectSpread2({
|
|
12168
|
-
pageSize: pageSize,
|
|
12169
|
-
pageNo: current,
|
|
12170
|
-
platform: 'JST_ERP'
|
|
12171
|
-
}, formData)
|
|
12172
|
-
}).then(function (res) {
|
|
12173
|
-
var _res$data = res.data,
|
|
12174
|
-
_res$data$productSkuL = _res$data.productSkuList,
|
|
12175
|
-
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12176
|
-
_res$data$total = _res$data.total,
|
|
12177
|
-
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12178
|
-
var newProducts = productSkuList.map(function (item, index) {
|
|
12179
|
-
return _objectSpread2({}, item);
|
|
12180
|
-
});
|
|
12181
|
-
return {
|
|
12182
|
-
total: total,
|
|
12183
|
-
list: newProducts
|
|
12184
|
-
};
|
|
12185
|
-
});
|
|
12186
|
-
};
|
|
12187
|
-
var columns$2 = [{
|
|
12188
|
-
dataIndex: 'index',
|
|
12189
|
-
title: 'NO',
|
|
12190
|
-
render: function render(val, record, index) {
|
|
12191
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
12192
|
-
style: {
|
|
12193
|
-
width: 25
|
|
12194
|
-
}
|
|
12195
|
-
}, index + 1);
|
|
12196
|
-
},
|
|
12197
|
-
width: 80
|
|
12198
|
-
}, {
|
|
12199
|
-
dataIndex: 'goodName',
|
|
12200
|
-
title: '商品名称',
|
|
12201
|
-
width: 250,
|
|
12202
|
-
ellipsis: true
|
|
12203
|
-
}, {
|
|
12204
|
-
dataIndex: 'goodNo',
|
|
12205
|
-
title: '商品编码',
|
|
12206
|
-
width: 200,
|
|
12207
|
-
ellipsis: true
|
|
12208
|
-
}, {
|
|
12209
|
-
dataIndex: 'styleCode',
|
|
12210
|
-
title: '款式编码',
|
|
12211
|
-
width: 200,
|
|
12212
|
-
ellipsis: true
|
|
12213
|
-
}, {
|
|
12214
|
-
dataIndex: 'propertiesValue',
|
|
12215
|
-
title: '规格值',
|
|
12216
|
-
width: 200,
|
|
12217
|
-
ellipsis: true
|
|
12218
|
-
}, {
|
|
12219
|
-
dataIndex: 'goodPicUrl',
|
|
12220
|
-
title: '商品图片',
|
|
12221
|
-
width: 100,
|
|
12222
|
-
render: function render(picUrl) {
|
|
12223
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
12224
|
-
style: {
|
|
12225
|
-
width: '40px',
|
|
12226
|
-
height: '40px',
|
|
12227
|
-
objectFit: 'contain'
|
|
12228
|
-
},
|
|
12229
|
-
src: picUrl
|
|
12230
|
-
});
|
|
12231
|
-
}
|
|
12232
|
-
}, {
|
|
12233
|
-
dataIndex: 'goodShortName',
|
|
12234
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12235
|
-
ellipsis: true,
|
|
12236
|
-
width: 250
|
|
12237
|
-
}, {
|
|
12238
|
-
dataIndex: 'brandName',
|
|
12239
|
-
title: '品牌名称',
|
|
12240
|
-
width: 200,
|
|
12241
|
-
ellipsis: true
|
|
12242
|
-
}, {
|
|
12243
|
-
dataIndex: 'retailPrice',
|
|
12244
|
-
title: "\u9500\u552E\u4EF7\u683C",
|
|
12245
|
-
ellipsis: true,
|
|
12246
|
-
width: 100,
|
|
12247
|
-
render: function render(price) {
|
|
12248
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12249
|
-
}
|
|
12250
|
-
}, {
|
|
12251
|
-
dataIndex: 'marketPrice',
|
|
12252
|
-
title: "\u5E02\u573A\u4EF7",
|
|
12253
|
-
ellipsis: true,
|
|
12254
|
-
width: 100,
|
|
12255
|
-
render: function render(price) {
|
|
12256
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12257
|
-
}
|
|
12258
|
-
}, {
|
|
12259
|
-
dataIndex: 'costPrice',
|
|
12260
|
-
title: "\u6210\u672C\u4EF7",
|
|
12261
|
-
ellipsis: true,
|
|
12262
|
-
width: 100,
|
|
12263
|
-
render: function render(price) {
|
|
12264
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12265
|
-
}
|
|
12266
|
-
}, {
|
|
12267
|
-
dataIndex: 'skuType',
|
|
12268
|
-
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12269
|
-
ellipsis: true,
|
|
12270
|
-
width: 100,
|
|
12271
|
-
render: function render() {
|
|
12272
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
12273
|
-
return {
|
|
12274
|
-
'combine': '组合装商品',
|
|
12275
|
-
'normal': '普通商品'
|
|
12276
|
-
}[type] || type;
|
|
12277
|
-
}
|
|
12278
|
-
}];
|
|
12279
|
-
var GoodList$1 = function GoodList(props, ref) {
|
|
12280
|
-
var _useState = useState([]),
|
|
12281
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12282
|
-
selectList = _useState2[0],
|
|
12283
|
-
setSelect = _useState2[1];
|
|
12284
|
-
var _useState3 = useState([]),
|
|
12285
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12286
|
-
selectIds = _useState4[0],
|
|
12287
|
-
setSelectIds = _useState4[1];
|
|
12288
|
-
useImperativeHandle(ref, function () {
|
|
12289
|
-
return {
|
|
12290
|
-
getSelectGoodList: function getSelectGoodList() {
|
|
12291
|
-
return selectList;
|
|
12292
|
-
}
|
|
12293
|
-
};
|
|
12294
|
-
});
|
|
12295
|
-
var _Form$useForm = Form.useForm(),
|
|
12296
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12297
|
-
form = _Form$useForm2[0];
|
|
12298
|
-
var _useAntdTable = useAntdTable(getTableData$1, {
|
|
12299
|
-
defaultPageSize: 10,
|
|
12300
|
-
form: form
|
|
12301
|
-
}),
|
|
12302
|
-
tableProps = _useAntdTable.tableProps,
|
|
12303
|
-
search = _useAntdTable.search,
|
|
12304
|
-
params = _useAntdTable.params;
|
|
12305
|
-
var submit = search.submit,
|
|
12306
|
-
reset = search.reset;
|
|
12307
|
-
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12308
|
-
layout: "inline",
|
|
12309
|
-
form: form
|
|
12310
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12311
|
-
name: "goodName",
|
|
12312
|
-
style: {
|
|
12313
|
-
marginBottom: '12px'
|
|
12314
|
-
}
|
|
12315
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12316
|
-
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12317
|
-
allowClear: true,
|
|
12318
|
-
style: {
|
|
12319
|
-
width: 150
|
|
12320
|
-
}
|
|
12321
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12322
|
-
name: "goodNo",
|
|
12323
|
-
style: {
|
|
12324
|
-
marginBottom: '12px'
|
|
12325
|
-
}
|
|
12326
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12327
|
-
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12328
|
-
allowClear: true,
|
|
12329
|
-
style: {
|
|
12330
|
-
width: 150
|
|
12331
|
-
}
|
|
12332
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12333
|
-
name: "styleCode",
|
|
12334
|
-
style: {
|
|
12335
|
-
marginBottom: '12px'
|
|
12336
|
-
}
|
|
12337
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12338
|
-
placeholder: "\u6B3E\u5F0F\u7F16\u7801",
|
|
12339
|
-
allowClear: true,
|
|
12340
|
-
style: {
|
|
12341
|
-
width: 150
|
|
12342
|
-
}
|
|
12343
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12344
|
-
style: {
|
|
12345
|
-
marginBottom: '12px'
|
|
12346
|
-
}
|
|
12347
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
12348
|
-
type: "primary",
|
|
12349
|
-
style: {
|
|
12350
|
-
marginRight: '8px'
|
|
12351
|
-
},
|
|
12352
|
-
onClick: submit
|
|
12353
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12354
|
-
onClick: reset
|
|
12355
|
-
}, "\u91CD\u7F6E")));
|
|
12356
|
-
var rowSelection = {
|
|
12357
|
-
selectedRowKeys: selectIds,
|
|
12358
|
-
fixed: true,
|
|
12359
|
-
onSelect: function onSelect(record, selected) {
|
|
12360
|
-
if (selected) {
|
|
12361
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
|
|
12362
|
-
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12363
|
-
} else {
|
|
12364
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12365
|
-
return t !== record.goodNo;
|
|
12366
|
-
}));
|
|
12367
|
-
setSelect(selectList.filter(function (t) {
|
|
12368
|
-
return t.goodNo !== record.goodNo;
|
|
12369
|
-
}));
|
|
12370
|
-
}
|
|
12371
|
-
},
|
|
12372
|
-
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12373
|
-
if (selected) {
|
|
12374
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12375
|
-
return t.goodNo;
|
|
12376
|
-
}))));
|
|
12377
|
-
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12378
|
-
} else {
|
|
12379
|
-
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12380
|
-
return t.goodNo;
|
|
12381
|
-
})));
|
|
12382
|
-
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12383
|
-
return arrVal.goodNo !== othVal.goodNo;
|
|
12384
|
-
});
|
|
12385
|
-
setSelect(list);
|
|
12386
|
-
}
|
|
12387
|
-
},
|
|
12388
|
-
getCheckboxProps: function getCheckboxProps(record) {
|
|
12389
|
-
var options = {
|
|
12390
|
-
disabled: (props.selectedRows || []).map(function (row) {
|
|
12391
|
-
return row.goodNo || row.skuId;
|
|
12392
|
-
}).includes(record.goodNo || record.skuId),
|
|
12393
|
-
name: record.goodNo
|
|
12394
|
-
};
|
|
12395
|
-
return options;
|
|
12396
|
-
}
|
|
12397
|
-
};
|
|
12398
|
-
var showTable = function showTable() {
|
|
12399
|
-
var handleDelete = function handleDelete(record) {
|
|
12400
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12401
|
-
return t !== record.goodNo;
|
|
12402
|
-
}));
|
|
12403
|
-
setSelect(selectList.filter(function (t) {
|
|
12404
|
-
return t.goodNo !== record.goodNo;
|
|
12405
|
-
}));
|
|
12406
|
-
};
|
|
12407
|
-
var showColumns = [{
|
|
12408
|
-
dataIndex: '',
|
|
12409
|
-
title: "\u64CD\u4F5C",
|
|
12410
|
-
ellipsis: true,
|
|
12411
|
-
width: 100,
|
|
12412
|
-
render: function render(val, record) {
|
|
12413
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
12414
|
-
type: "link",
|
|
12415
|
-
onClick: function onClick() {
|
|
12416
|
-
return handleDelete(record);
|
|
12417
|
-
}
|
|
12418
|
-
}, "\u5220\u9664");
|
|
12419
|
-
}
|
|
12420
|
-
}].concat(takeRight(columns$2, columns$2.length - 1));
|
|
12421
|
-
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12422
|
-
style: {
|
|
12423
|
-
width: '100%',
|
|
12424
|
-
maxWidth: '387px'
|
|
12425
|
-
}
|
|
12426
|
-
}, /*#__PURE__*/React.createElement(Table, {
|
|
12427
|
-
columns: showColumns,
|
|
12428
|
-
rowKey: 'goodNo',
|
|
12429
|
-
dataSource: selectList,
|
|
12430
|
-
scroll: {
|
|
12431
|
-
x: '100%',
|
|
12432
|
-
y: 250
|
|
12433
|
-
},
|
|
12434
|
-
pagination: {
|
|
12435
|
-
size: 'small',
|
|
12436
|
-
total: selectIds.length,
|
|
12437
|
-
pageSize: 10,
|
|
12438
|
-
showSizeChanger: false
|
|
12439
|
-
}
|
|
12440
|
-
})) : null;
|
|
12441
|
-
};
|
|
12442
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12443
|
-
style: {
|
|
12444
|
-
marginTop: '4px'
|
|
12445
|
-
}
|
|
12446
|
-
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12447
|
-
rowSelection: rowSelection,
|
|
12448
|
-
rowKey: "goodNo",
|
|
12449
|
-
columns: columns$2,
|
|
12450
|
-
scroll: {
|
|
12451
|
-
x: '100%',
|
|
12452
|
-
y: 250
|
|
12453
|
-
}
|
|
12454
|
-
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12455
|
-
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12456
|
-
return triggerNode.parentElement;
|
|
12457
|
-
},
|
|
12458
|
-
content: showTable(),
|
|
12459
|
-
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12460
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
12461
|
-
danger: true,
|
|
12462
|
-
type: "text"
|
|
12463
|
-
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12464
|
-
};
|
|
12465
|
-
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$1);
|
|
12466
|
-
|
|
12467
|
-
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12468
|
-
useImperativeHandle(ref, function () {
|
|
12469
|
-
return {
|
|
12470
|
-
open: function open(shopCode) {
|
|
12471
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12472
|
-
setVisible(true);
|
|
12473
|
-
setSelectedRows(options.value || []);
|
|
12474
|
-
}
|
|
12475
|
-
};
|
|
12476
|
-
});
|
|
12477
|
-
var onSubmit = props.onSubmit,
|
|
12478
|
-
width = props.width;
|
|
12479
|
-
var _useState = useState(false),
|
|
12480
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12481
|
-
visible = _useState2[0],
|
|
12482
|
-
setVisible = _useState2[1];
|
|
12483
|
-
var _useState3 = useState([]),
|
|
12484
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12485
|
-
selectedRows = _useState4[0],
|
|
12486
|
-
setSelectedRows = _useState4[1];
|
|
12487
|
-
var gyGoodsListRef = useRef(null);
|
|
12488
|
-
var _onCancel = function onCancel() {
|
|
12489
|
-
setVisible(false);
|
|
12490
|
-
};
|
|
12491
|
-
var onOk = function onOk() {
|
|
12492
|
-
var _gyGoodsListRef$curre;
|
|
12493
|
-
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12494
|
-
onSubmit(selectedList);
|
|
12495
|
-
_onCancel();
|
|
12496
|
-
};
|
|
12497
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12498
|
-
title: '选择商品',
|
|
12499
|
-
okText: '确认',
|
|
12500
|
-
cancelText: '取消',
|
|
12501
|
-
visible: visible,
|
|
12502
|
-
width: width || 850,
|
|
12503
|
-
onCancel: function onCancel() {
|
|
12504
|
-
_onCancel();
|
|
12505
|
-
},
|
|
12506
|
-
onOk: onOk,
|
|
12507
|
-
wrapClassName: "goodModal"
|
|
12508
|
-
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
12509
|
-
ref: gyGoodsListRef,
|
|
12510
|
-
selectedRows: selectedRows
|
|
12511
|
-
})));
|
|
12512
|
-
};
|
|
12513
|
-
var JstGoodsModal = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
12514
|
-
|
|
12515
|
-
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12516
12155
|
var current = _ref.current,
|
|
12517
12156
|
pageSize = _ref.pageSize;
|
|
12518
12157
|
var data = {
|
|
12519
|
-
goodShortName: formData.goodShortName || null,
|
|
12520
12158
|
goodNo: formData.goodNo || null,
|
|
12521
12159
|
goodName: formData.goodName || null,
|
|
12522
12160
|
skuCode: formData.skuCode || null,
|
|
@@ -12546,7 +12184,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12546
12184
|
};
|
|
12547
12185
|
});
|
|
12548
12186
|
};
|
|
12549
|
-
var columns$
|
|
12187
|
+
var columns$2 = [{
|
|
12550
12188
|
dataIndex: 'index',
|
|
12551
12189
|
title: 'NO',
|
|
12552
12190
|
render: function render(val, record, index) {
|
|
@@ -12642,7 +12280,7 @@ var columns$3 = [{
|
|
|
12642
12280
|
ellipsis: true,
|
|
12643
12281
|
width: 100
|
|
12644
12282
|
}];
|
|
12645
|
-
var GoodList$
|
|
12283
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12646
12284
|
var _useState = useState([]),
|
|
12647
12285
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12648
12286
|
selectList = _useState2[0],
|
|
@@ -12661,7 +12299,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12661
12299
|
var _Form$useForm = Form.useForm(),
|
|
12662
12300
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12663
12301
|
form = _Form$useForm2[0];
|
|
12664
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
12302
|
+
var _useAntdTable = useAntdTable(getTableData$1, {
|
|
12665
12303
|
defaultPageSize: 10,
|
|
12666
12304
|
form: form
|
|
12667
12305
|
}),
|
|
@@ -12674,17 +12312,6 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12674
12312
|
layout: "inline",
|
|
12675
12313
|
form: form
|
|
12676
12314
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12677
|
-
name: "goodShortName",
|
|
12678
|
-
style: {
|
|
12679
|
-
marginBottom: '12px'
|
|
12680
|
-
}
|
|
12681
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12682
|
-
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12683
|
-
allowClear: true,
|
|
12684
|
-
style: {
|
|
12685
|
-
width: 150
|
|
12686
|
-
}
|
|
12687
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12688
12315
|
name: "goodNo",
|
|
12689
12316
|
style: {
|
|
12690
12317
|
marginBottom: '12px'
|
|
@@ -12796,7 +12423,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12796
12423
|
}
|
|
12797
12424
|
}, "\u5220\u9664");
|
|
12798
12425
|
}
|
|
12799
|
-
}].concat(takeRight(columns$
|
|
12426
|
+
}].concat(takeRight(columns$2, columns$2.length - 1));
|
|
12800
12427
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12801
12428
|
style: {
|
|
12802
12429
|
width: '100%',
|
|
@@ -12825,7 +12452,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12825
12452
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12826
12453
|
rowSelection: rowSelection,
|
|
12827
12454
|
rowKey: "specNo",
|
|
12828
|
-
columns: columns$
|
|
12455
|
+
columns: columns$2,
|
|
12829
12456
|
scroll: {
|
|
12830
12457
|
x: '100%',
|
|
12831
12458
|
y: 250
|
|
@@ -12841,7 +12468,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12841
12468
|
type: "text"
|
|
12842
12469
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12843
12470
|
};
|
|
12844
|
-
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$
|
|
12471
|
+
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
|
|
12845
12472
|
|
|
12846
12473
|
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12847
12474
|
useImperativeHandle(ref, function () {
|
|
@@ -12884,7 +12511,7 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12884
12511
|
};
|
|
12885
12512
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12886
12513
|
|
|
12887
|
-
var getTableData$
|
|
12514
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12888
12515
|
var current = _ref.current,
|
|
12889
12516
|
pageSize = _ref.pageSize;
|
|
12890
12517
|
var data = {
|
|
@@ -12916,7 +12543,7 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
12916
12543
|
};
|
|
12917
12544
|
});
|
|
12918
12545
|
};
|
|
12919
|
-
var columns$
|
|
12546
|
+
var columns$3 = [{
|
|
12920
12547
|
dataIndex: 'index',
|
|
12921
12548
|
title: 'NO',
|
|
12922
12549
|
render: function render(val, record, index) {
|
|
@@ -12982,7 +12609,7 @@ var columns$4 = [{
|
|
|
12982
12609
|
ellipsis: true,
|
|
12983
12610
|
width: 100
|
|
12984
12611
|
}];
|
|
12985
|
-
var GoodList$
|
|
12612
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12986
12613
|
var _useState = useState([]),
|
|
12987
12614
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12988
12615
|
selectList = _useState2[0],
|
|
@@ -13001,7 +12628,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13001
12628
|
var _Form$useForm = Form.useForm(),
|
|
13002
12629
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13003
12630
|
form = _Form$useForm2[0];
|
|
13004
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
12631
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
13005
12632
|
defaultPageSize: 10,
|
|
13006
12633
|
form: form
|
|
13007
12634
|
}),
|
|
@@ -13136,7 +12763,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13136
12763
|
}
|
|
13137
12764
|
}, "\u5220\u9664");
|
|
13138
12765
|
}
|
|
13139
|
-
}].concat(takeRight(columns$
|
|
12766
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
13140
12767
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
13141
12768
|
style: {
|
|
13142
12769
|
width: '100%',
|
|
@@ -13165,7 +12792,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13165
12792
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13166
12793
|
rowSelection: rowSelection,
|
|
13167
12794
|
rowKey: "specNo",
|
|
13168
|
-
columns: columns$
|
|
12795
|
+
columns: columns$3,
|
|
13169
12796
|
scroll: {
|
|
13170
12797
|
x: '100%',
|
|
13171
12798
|
y: 250
|
|
@@ -13181,9 +12808,9 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13181
12808
|
type: "text"
|
|
13182
12809
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13183
12810
|
};
|
|
13184
|
-
var GyGoodsList
|
|
12811
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
13185
12812
|
|
|
13186
|
-
var GyGoodsModal
|
|
12813
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
13187
12814
|
useImperativeHandle(ref, function () {
|
|
13188
12815
|
return {
|
|
13189
12816
|
open: function open() {
|
|
@@ -13218,11 +12845,11 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13218
12845
|
},
|
|
13219
12846
|
onOk: onOk,
|
|
13220
12847
|
wrapClassName: "goodModal"
|
|
13221
|
-
}, /*#__PURE__*/React.createElement(GyGoodsList
|
|
12848
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
13222
12849
|
ref: gyGoodsListRef
|
|
13223
12850
|
})));
|
|
13224
12851
|
};
|
|
13225
|
-
var GyGoodsModal$
|
|
12852
|
+
var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
13226
12853
|
|
|
13227
12854
|
var getColumns = function getColumns(_ref) {
|
|
13228
12855
|
var _ref$text = _ref.text,
|
|
@@ -14377,262 +14004,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14377
14004
|
};
|
|
14378
14005
|
|
|
14379
14006
|
var getColumns$5 = function getColumns(_ref) {
|
|
14380
|
-
var _ref$text = _ref.text,
|
|
14381
|
-
disabled = _ref.disabled,
|
|
14382
|
-
updateHandle = _ref.updateHandle;
|
|
14383
|
-
return {
|
|
14384
|
-
JST_GOODS: [{
|
|
14385
|
-
dataIndex: 'name',
|
|
14386
|
-
title: '商品名称',
|
|
14387
|
-
width: 150,
|
|
14388
|
-
ellipsis: true,
|
|
14389
|
-
align: 'center'
|
|
14390
|
-
}, {
|
|
14391
|
-
dataIndex: 'skuId',
|
|
14392
|
-
title: '商品编码',
|
|
14393
|
-
width: 150,
|
|
14394
|
-
ellipsis: true,
|
|
14395
|
-
align: 'center'
|
|
14396
|
-
}, {
|
|
14397
|
-
dataIndex: 'iId',
|
|
14398
|
-
title: '款式编码',
|
|
14399
|
-
width: 150,
|
|
14400
|
-
ellipsis: true,
|
|
14401
|
-
align: 'center'
|
|
14402
|
-
}, {
|
|
14403
|
-
dataIndex: 'pic',
|
|
14404
|
-
title: '商品图片',
|
|
14405
|
-
ellipsis: true,
|
|
14406
|
-
align: 'center',
|
|
14407
|
-
width: 100,
|
|
14408
|
-
render: function render(val) {
|
|
14409
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
14410
|
-
width: 60,
|
|
14411
|
-
src: val
|
|
14412
|
-
});
|
|
14413
|
-
}
|
|
14414
|
-
}, {
|
|
14415
|
-
dataIndex: 'propertiesValue',
|
|
14416
|
-
title: '规格值',
|
|
14417
|
-
width: 150,
|
|
14418
|
-
ellipsis: true,
|
|
14419
|
-
align: 'center'
|
|
14420
|
-
}, {
|
|
14421
|
-
dataIndex: 'saleBasePrice',
|
|
14422
|
-
title: '原价',
|
|
14423
|
-
width: 150,
|
|
14424
|
-
ellipsis: true,
|
|
14425
|
-
align: 'center',
|
|
14426
|
-
render: function render(price) {
|
|
14427
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14428
|
-
}
|
|
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.createElement(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.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
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.createElement(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.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.createElement(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.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14502
|
-
}
|
|
14503
|
-
}, {
|
|
14504
|
-
dataIndex: 'outerOiId',
|
|
14505
|
-
title: '子订单号',
|
|
14506
|
-
width: 240,
|
|
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.createElement(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
|
-
render: function render(price) {
|
|
14553
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14554
|
-
}
|
|
14555
|
-
}, {
|
|
14556
|
-
dataIndex: 'salePrice',
|
|
14557
|
-
title: '单价',
|
|
14558
|
-
ellipsis: true,
|
|
14559
|
-
align: 'center',
|
|
14560
|
-
width: 120,
|
|
14561
|
-
render: function render(val, record, index) {
|
|
14562
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14563
|
-
style: {
|
|
14564
|
-
width: 70
|
|
14565
|
-
},
|
|
14566
|
-
value: val,
|
|
14567
|
-
min: 0,
|
|
14568
|
-
precision: 2,
|
|
14569
|
-
onChange: function onChange(num) {
|
|
14570
|
-
return updateHandle(num, index, 'salePrice');
|
|
14571
|
-
}
|
|
14572
|
-
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14573
|
-
}
|
|
14574
|
-
}, {
|
|
14575
|
-
dataIndex: 'qty',
|
|
14576
|
-
title: '数量',
|
|
14577
|
-
ellipsis: true,
|
|
14578
|
-
align: 'center',
|
|
14579
|
-
width: 100,
|
|
14580
|
-
render: function render(val, record, index) {
|
|
14581
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14582
|
-
style: {
|
|
14583
|
-
width: 70
|
|
14584
|
-
},
|
|
14585
|
-
value: val,
|
|
14586
|
-
min: 1,
|
|
14587
|
-
precision: 0,
|
|
14588
|
-
onChange: function onChange(num) {
|
|
14589
|
-
return updateHandle(num, index, 'qty');
|
|
14590
|
-
}
|
|
14591
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14592
|
-
}
|
|
14593
|
-
}, {
|
|
14594
|
-
dataIndex: 'isGift',
|
|
14595
|
-
title: '是否赠品',
|
|
14596
|
-
ellipsis: true,
|
|
14597
|
-
align: 'center',
|
|
14598
|
-
width: 100,
|
|
14599
|
-
render: function render(val, record, index) {
|
|
14600
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14601
|
-
value: val,
|
|
14602
|
-
onChange: function onChange(value) {
|
|
14603
|
-
updateHandle(value, index, 'isGift');
|
|
14604
|
-
},
|
|
14605
|
-
options: [{
|
|
14606
|
-
label: '是',
|
|
14607
|
-
value: true
|
|
14608
|
-
}, {
|
|
14609
|
-
label: '否',
|
|
14610
|
-
value: false
|
|
14611
|
-
}]
|
|
14612
|
-
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14613
|
-
}
|
|
14614
|
-
}, {
|
|
14615
|
-
dataIndex: 'remark',
|
|
14616
|
-
title: '备注',
|
|
14617
|
-
width: 150,
|
|
14618
|
-
ellipsis: true,
|
|
14619
|
-
align: 'center',
|
|
14620
|
-
render: function render(val, record, index) {
|
|
14621
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
|
|
14622
|
-
style: {
|
|
14623
|
-
width: 70
|
|
14624
|
-
},
|
|
14625
|
-
value: val,
|
|
14626
|
-
onChange: function onChange(e) {
|
|
14627
|
-
return updateHandle(e.target.value, index, 'remark');
|
|
14628
|
-
}
|
|
14629
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14630
|
-
}
|
|
14631
|
-
}]
|
|
14632
|
-
};
|
|
14633
|
-
};
|
|
14634
|
-
|
|
14635
|
-
var getColumns$6 = function getColumns(_ref) {
|
|
14636
14007
|
var _ref$text = _ref.text,
|
|
14637
14008
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14638
14009
|
disabled = _ref.disabled,
|
|
@@ -14745,7 +14116,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14745
14116
|
disabled = _ref.disabled,
|
|
14746
14117
|
updateHandle = _ref.updateHandle,
|
|
14747
14118
|
updateDataHandle = _ref.updateDataHandle;
|
|
14748
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(
|
|
14119
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14749
14120
|
text: text,
|
|
14750
14121
|
disabled: disabled,
|
|
14751
14122
|
updateHandle: updateHandle
|
|
@@ -14766,12 +14137,8 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14766
14137
|
disabled: disabled,
|
|
14767
14138
|
updateHandle: updateHandle,
|
|
14768
14139
|
updateDataHandle: updateDataHandle
|
|
14769
|
-
})), getColumns$5({
|
|
14770
|
-
text: text,
|
|
14771
|
-
disabled: disabled,
|
|
14772
|
-
updateHandle: updateHandle
|
|
14773
14140
|
})), {}, {
|
|
14774
|
-
default: getColumns$
|
|
14141
|
+
default: getColumns$5({
|
|
14775
14142
|
text: text,
|
|
14776
14143
|
disabled: disabled,
|
|
14777
14144
|
updateHandle: updateHandle
|
|
@@ -14875,19 +14242,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14875
14242
|
});
|
|
14876
14243
|
};
|
|
14877
14244
|
|
|
14878
|
-
var GoodsModalMap = {
|
|
14879
|
-
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14880
|
-
'WDT_GOODS': WdtGoodsModal,
|
|
14881
|
-
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14882
|
-
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14883
|
-
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14884
|
-
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14885
|
-
'GY_GOODS': GyGoodsModal$2,
|
|
14886
|
-
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14887
|
-
'JST_GOODS': JstGoodsModal,
|
|
14888
|
-
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14889
|
-
'OTHER_GOODS': GoodsModal$2
|
|
14890
|
-
};
|
|
14891
14245
|
var MAIN_FIELD = 'uuid';
|
|
14892
14246
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14893
14247
|
var columns = _ref.columns,
|
|
@@ -14949,9 +14303,6 @@ var getButtonText = function getButtonText() {
|
|
|
14949
14303
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14950
14304
|
return '选择管易ERP商品';
|
|
14951
14305
|
}
|
|
14952
|
-
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14953
|
-
return '选择聚水潭ERP商品';
|
|
14954
|
-
}
|
|
14955
14306
|
return '选择商品';
|
|
14956
14307
|
};
|
|
14957
14308
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -15051,7 +14402,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15051
14402
|
};
|
|
15052
14403
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15053
14404
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15054
|
-
var
|
|
14405
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15055
14406
|
return function (type) {
|
|
15056
14407
|
var columns = [];
|
|
15057
14408
|
switch (type) {
|
|
@@ -15062,13 +14413,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15062
14413
|
case 'BS_GOODS':
|
|
15063
14414
|
case 'WLN_GOODS':
|
|
15064
14415
|
case 'GY_GOODS':
|
|
15065
|
-
case 'JST_GOODS':
|
|
15066
|
-
case 'JST_REISSUE_GOODS':
|
|
15067
14416
|
case 'GY_REISSUE_GOODS':
|
|
15068
14417
|
{
|
|
15069
14418
|
columns = getColumnsMap({
|
|
15070
14419
|
text: text,
|
|
15071
|
-
disabled: disabled
|
|
14420
|
+
disabled: disabled,
|
|
15072
14421
|
updateHandle: updateHandle,
|
|
15073
14422
|
updateDataHandle: updateDataHandle
|
|
15074
14423
|
})[type];
|
|
@@ -15077,25 +14426,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15077
14426
|
case 'WDT_REISSUE_GOODS':
|
|
15078
14427
|
{
|
|
15079
14428
|
columns = getWdtReissueGoodColumns({
|
|
15080
|
-
disabled: disabled
|
|
14429
|
+
disabled: disabled,
|
|
15081
14430
|
updateHandle: updateHandle,
|
|
15082
|
-
operate:
|
|
14431
|
+
operate: operate
|
|
15083
14432
|
});
|
|
15084
14433
|
}
|
|
15085
14434
|
break;
|
|
15086
14435
|
case 'BS_E3_REISSUE_GOODS':
|
|
15087
14436
|
{
|
|
15088
14437
|
columns = getBsE3ReissueGoodColumns({
|
|
15089
|
-
disabled: disabled
|
|
14438
|
+
disabled: disabled,
|
|
15090
14439
|
updateHandle: updateHandle,
|
|
15091
|
-
operate:
|
|
14440
|
+
operate: operate
|
|
15092
14441
|
});
|
|
15093
14442
|
}
|
|
15094
14443
|
break;
|
|
15095
14444
|
default:
|
|
15096
14445
|
columns = getColumnsMap({
|
|
15097
14446
|
text: text,
|
|
15098
|
-
disabled: disabled
|
|
14447
|
+
disabled: disabled,
|
|
15099
14448
|
updateHandle: updateHandle,
|
|
15100
14449
|
updateDataHandle: updateDataHandle
|
|
15101
14450
|
})['default'];
|
|
@@ -15158,10 +14507,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15158
14507
|
return columnList;
|
|
15159
14508
|
}, [showHeader, value, disabled]);
|
|
15160
14509
|
var orderColumns = useMemo(function () {
|
|
15161
|
-
var columns = COLUMNS_MAP('',
|
|
15162
|
-
operate: false,
|
|
15163
|
-
disabled: true
|
|
15164
|
-
})(type);
|
|
14510
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
15165
14511
|
return [{
|
|
15166
14512
|
dataIndex: '',
|
|
15167
14513
|
title: '序号',
|
|
@@ -15245,23 +14591,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15245
14591
|
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
15246
14592
|
});
|
|
15247
14593
|
});
|
|
15248
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15249
|
-
newList = list.map(function (item) {
|
|
15250
|
-
return {
|
|
15251
|
-
name: item.goodName,
|
|
15252
|
-
skuId: item.goodNo,
|
|
15253
|
-
iId: item.styleCode,
|
|
15254
|
-
pic: item.goodPicUrl,
|
|
15255
|
-
propertiesValue: item.propertiesValue,
|
|
15256
|
-
saleBasePrice: item.retailPrice,
|
|
15257
|
-
salePrice: item.retailPrice,
|
|
15258
|
-
remark: '',
|
|
15259
|
-
uuid: uuid(),
|
|
15260
|
-
canDelete: true,
|
|
15261
|
-
canEdit: true,
|
|
15262
|
-
qty: 1
|
|
15263
|
-
};
|
|
15264
|
-
});
|
|
15265
14594
|
} else {
|
|
15266
14595
|
newList = list.map(function (item) {
|
|
15267
14596
|
var goodsId = item.goodsId,
|
|
@@ -15297,9 +14626,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15297
14626
|
}));
|
|
15298
14627
|
};
|
|
15299
14628
|
var handleChangeGoods = function handleChangeGoods() {
|
|
15300
|
-
refModal.current.open(shopCode
|
|
15301
|
-
value: value
|
|
15302
|
-
});
|
|
14629
|
+
refModal.current.open(shopCode);
|
|
15303
14630
|
};
|
|
15304
14631
|
var rowSelection = {
|
|
15305
14632
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -15316,7 +14643,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15316
14643
|
}
|
|
15317
14644
|
return params;
|
|
15318
14645
|
}, [tableSelect, selectedRowKeys]);
|
|
15319
|
-
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15320
14646
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
|
|
15321
14647
|
style: {
|
|
15322
14648
|
float: 'right'
|
|
@@ -15344,7 +14670,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15344
14670
|
locale: {
|
|
15345
14671
|
emptyText: '暂无数据'
|
|
15346
14672
|
}
|
|
15347
|
-
})), /*#__PURE__*/React.createElement(
|
|
14673
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
14674
|
+
ref: refModal,
|
|
14675
|
+
onSubmit: onSubmit,
|
|
14676
|
+
width: width,
|
|
14677
|
+
shopList: shopList,
|
|
14678
|
+
shopId: shopId,
|
|
14679
|
+
maxLength: maxLength,
|
|
14680
|
+
companyKey: companyKey
|
|
14681
|
+
}) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
|
|
14682
|
+
ref: refModal,
|
|
14683
|
+
onSubmit: onSubmit,
|
|
14684
|
+
width: width,
|
|
14685
|
+
shopList: shopList,
|
|
14686
|
+
shopId: shopId,
|
|
14687
|
+
maxLength: maxLength,
|
|
14688
|
+
companyKey: companyKey
|
|
14689
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
|
|
14690
|
+
ref: refModal,
|
|
14691
|
+
onSubmit: onSubmit,
|
|
14692
|
+
width: width,
|
|
14693
|
+
shopList: shopList,
|
|
14694
|
+
shopId: shopId,
|
|
14695
|
+
maxLength: maxLength,
|
|
14696
|
+
companyKey: companyKey
|
|
14697
|
+
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
15348
14698
|
ref: refModal,
|
|
15349
14699
|
onSubmit: onSubmit,
|
|
15350
14700
|
width: width,
|
|
@@ -16076,60 +15426,27 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
16076
15426
|
// 延迟10秒清除,保证订单的时效性
|
|
16077
15427
|
setTimeout(function () {
|
|
16078
15428
|
singletonMap$2.delete(orderNo);
|
|
16079
|
-
}, 1000 * 10);
|
|
16080
|
-
} else {
|
|
16081
|
-
doReject(res);
|
|
16082
|
-
}
|
|
16083
|
-
}).catch(doReject);
|
|
16084
|
-
});
|
|
16085
|
-
singletonMap$2.set(orderNo, p);
|
|
16086
|
-
}
|
|
16087
|
-
return singletonMap$2.get(orderNo);
|
|
16088
|
-
};
|
|
16089
|
-
var gyUtils = {
|
|
16090
|
-
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16091
|
-
};
|
|
16092
|
-
|
|
16093
|
-
var singletonMap$3 = new Map();
|
|
16094
|
-
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16095
|
-
if (!singletonMap$3.has(orderNo)) {
|
|
16096
|
-
var p = new Promise(function (resolve, reject) {
|
|
16097
|
-
var doReject = function doReject(err) {
|
|
16098
|
-
// 清空掉错误的请求记录
|
|
16099
|
-
// singletonMap.delete(orderNo);
|
|
16100
|
-
reject(err);
|
|
16101
|
-
};
|
|
16102
|
-
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16103
|
-
method: 'post',
|
|
16104
|
-
data: {
|
|
16105
|
-
soId: orderNo
|
|
16106
|
-
}
|
|
16107
|
-
}).then(function (data) {
|
|
16108
|
-
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16109
|
-
data.data = filterJstOrders({
|
|
16110
|
-
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16111
|
-
}, orderNo);
|
|
16112
|
-
resolve(data.data);
|
|
15429
|
+
}, 1000 * 10);
|
|
16113
15430
|
} else {
|
|
16114
|
-
doReject(
|
|
15431
|
+
doReject(res);
|
|
16115
15432
|
}
|
|
16116
15433
|
}).catch(doReject);
|
|
16117
15434
|
});
|
|
16118
|
-
singletonMap$
|
|
15435
|
+
singletonMap$2.set(orderNo, p);
|
|
16119
15436
|
}
|
|
16120
|
-
return singletonMap$
|
|
15437
|
+
return singletonMap$2.get(orderNo);
|
|
16121
15438
|
};
|
|
16122
|
-
var
|
|
16123
|
-
|
|
15439
|
+
var gyUtils = {
|
|
15440
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16124
15441
|
};
|
|
16125
15442
|
|
|
16126
|
-
var singletonMap$
|
|
15443
|
+
var singletonMap$3 = new Map();
|
|
16127
15444
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
16128
|
-
if (!singletonMap$
|
|
15445
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16129
15446
|
var p = new Promise(function (resolve, reject) {
|
|
16130
15447
|
var doReject = function doReject(err) {
|
|
16131
15448
|
// 清空掉错误的请求记录
|
|
16132
|
-
singletonMap$
|
|
15449
|
+
singletonMap$3.delete(orderNo);
|
|
16133
15450
|
reject(err);
|
|
16134
15451
|
};
|
|
16135
15452
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -16155,16 +15472,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
16155
15472
|
}
|
|
16156
15473
|
// 延迟10秒清除,保证订单的时效性
|
|
16157
15474
|
setTimeout(function () {
|
|
16158
|
-
singletonMap$
|
|
15475
|
+
singletonMap$3.delete(orderNo);
|
|
16159
15476
|
}, 1000 * 10);
|
|
16160
15477
|
} else {
|
|
16161
15478
|
doReject(data);
|
|
16162
15479
|
}
|
|
16163
15480
|
}).catch(doReject);
|
|
16164
15481
|
});
|
|
16165
|
-
singletonMap$
|
|
15482
|
+
singletonMap$3.set(orderNo, p);
|
|
16166
15483
|
}
|
|
16167
|
-
return singletonMap$
|
|
15484
|
+
return singletonMap$3.get(orderNo);
|
|
16168
15485
|
};
|
|
16169
15486
|
var kmUtils = {
|
|
16170
15487
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -16177,8 +15494,7 @@ var columnsMap = {
|
|
|
16177
15494
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
16178
15495
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
16179
15496
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
16180
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16181
|
-
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
15497
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16182
15498
|
};
|
|
16183
15499
|
var rowKeyMap = {
|
|
16184
15500
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -16186,8 +15502,7 @@ var rowKeyMap = {
|
|
|
16186
15502
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
16187
15503
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
16188
15504
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
16189
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16190
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
15505
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
16191
15506
|
};
|
|
16192
15507
|
var index$1 = (function (props) {
|
|
16193
15508
|
var value = props.value,
|
|
@@ -16212,8 +15527,6 @@ var index$1 = (function (props) {
|
|
|
16212
15527
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
16213
15528
|
console.log('触发gy--getGyOrderList--1');
|
|
16214
15529
|
getGyOrderList(value.orderNo);
|
|
16215
|
-
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16216
|
-
getJstOrderList(value.orderNo);
|
|
16217
15530
|
}
|
|
16218
15531
|
}
|
|
16219
15532
|
}, [value, type]);
|
|
@@ -16369,41 +15682,18 @@ var index$1 = (function (props) {
|
|
|
16369
15682
|
return _ref5.apply(this, arguments);
|
|
16370
15683
|
};
|
|
16371
15684
|
}();
|
|
16372
|
-
var
|
|
15685
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16373
15686
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
16374
15687
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
16375
15688
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16376
|
-
case 0:
|
|
16377
|
-
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16378
|
-
var trades = data || [];
|
|
16379
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16380
|
-
orders: trades,
|
|
16381
|
-
showOrderInfo: trades
|
|
16382
|
-
}));
|
|
16383
|
-
});
|
|
16384
|
-
onceRef.current = false;
|
|
16385
|
-
case 2:
|
|
16386
|
-
case "end":
|
|
16387
|
-
return _context5.stop();
|
|
16388
|
-
}
|
|
16389
|
-
}, _callee5);
|
|
16390
|
-
}));
|
|
16391
|
-
return function getJstOrderList(_x5) {
|
|
16392
|
-
return _ref6.apply(this, arguments);
|
|
16393
|
-
};
|
|
16394
|
-
}();
|
|
16395
|
-
var getKmOrderList = /*#__PURE__*/function () {
|
|
16396
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16397
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16398
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
16399
15689
|
case 0:
|
|
16400
15690
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
16401
15691
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16402
15692
|
orders: trades,
|
|
16403
|
-
showOrderInfo: trades.map(function (
|
|
16404
|
-
var billNo =
|
|
16405
|
-
billType =
|
|
16406
|
-
billTag =
|
|
15693
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
15694
|
+
var billNo = _ref7.billNo,
|
|
15695
|
+
billType = _ref7.billType,
|
|
15696
|
+
billTag = _ref7.billTag;
|
|
16407
15697
|
return {
|
|
16408
15698
|
billNo: billNo,
|
|
16409
15699
|
billType: billType,
|
|
@@ -16415,18 +15705,18 @@ var index$1 = (function (props) {
|
|
|
16415
15705
|
onceRef.current = false;
|
|
16416
15706
|
case 2:
|
|
16417
15707
|
case "end":
|
|
16418
|
-
return
|
|
15708
|
+
return _context5.stop();
|
|
16419
15709
|
}
|
|
16420
|
-
},
|
|
15710
|
+
}, _callee5);
|
|
16421
15711
|
}));
|
|
16422
|
-
return function getKmOrderList(
|
|
16423
|
-
return
|
|
15712
|
+
return function getKmOrderList(_x5) {
|
|
15713
|
+
return _ref6.apply(this, arguments);
|
|
16424
15714
|
};
|
|
16425
15715
|
}();
|
|
16426
15716
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
16427
|
-
var
|
|
16428
|
-
return _regeneratorRuntime().wrap(function
|
|
16429
|
-
while (1) switch (
|
|
15717
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15718
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15719
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
16430
15720
|
case 0:
|
|
16431
15721
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
16432
15722
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -16434,15 +15724,15 @@ var index$1 = (function (props) {
|
|
|
16434
15724
|
});
|
|
16435
15725
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16436
15726
|
orders: trades,
|
|
16437
|
-
showOrderInfo: trades.map(function (
|
|
16438
|
-
var billNo =
|
|
16439
|
-
billType =
|
|
16440
|
-
billTag =
|
|
16441
|
-
tradeTagName =
|
|
16442
|
-
deliveryState =
|
|
16443
|
-
vipCode =
|
|
16444
|
-
shopCode =
|
|
16445
|
-
rest = _objectWithoutProperties(
|
|
15727
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15728
|
+
var billNo = _ref9.billNo,
|
|
15729
|
+
billType = _ref9.billType,
|
|
15730
|
+
billTag = _ref9.billTag,
|
|
15731
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15732
|
+
deliveryState = _ref9.deliveryState,
|
|
15733
|
+
vipCode = _ref9.vipCode,
|
|
15734
|
+
shopCode = _ref9.shopCode,
|
|
15735
|
+
rest = _objectWithoutProperties(_ref9, _excluded$g);
|
|
16446
15736
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
16447
15737
|
billNo: billNo,
|
|
16448
15738
|
billType: billType,
|
|
@@ -16459,12 +15749,12 @@ var index$1 = (function (props) {
|
|
|
16459
15749
|
onceRef.current = false;
|
|
16460
15750
|
case 2:
|
|
16461
15751
|
case "end":
|
|
16462
|
-
return
|
|
15752
|
+
return _context6.stop();
|
|
16463
15753
|
}
|
|
16464
|
-
},
|
|
15754
|
+
}, _callee6);
|
|
16465
15755
|
}));
|
|
16466
|
-
return function getGyOrderList(
|
|
16467
|
-
return
|
|
15756
|
+
return function getGyOrderList(_x6) {
|
|
15757
|
+
return _ref8.apply(this, arguments);
|
|
16468
15758
|
};
|
|
16469
15759
|
}();
|
|
16470
15760
|
var rowSelection = {
|
|
@@ -16613,31 +15903,6 @@ var componentMap$1 = {
|
|
|
16613
15903
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16614
15904
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16615
15905
|
}
|
|
16616
|
-
},
|
|
16617
|
-
JST_GOODS: {
|
|
16618
|
-
type: 'jst',
|
|
16619
|
-
key: 'jstGoods',
|
|
16620
|
-
name: '聚水潭',
|
|
16621
|
-
orderNo: 'dealCode',
|
|
16622
|
-
goodDetailOrderNo: 'originalDealCode',
|
|
16623
|
-
eventNameMap: {
|
|
16624
|
-
// pubsub 事件
|
|
16625
|
-
type: 'jstType',
|
|
16626
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
16627
|
-
selectListReturn: 'jstSelectListReturn',
|
|
16628
|
-
selectList: 'jstSelectList',
|
|
16629
|
-
reissueSelectList: 'jstReissueSelectList',
|
|
16630
|
-
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16631
|
-
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16632
|
-
changeShopCode: 'jstChangeShopCode',
|
|
16633
|
-
reissueType: 'jstReissueType',
|
|
16634
|
-
returnType: 'jstReturnType',
|
|
16635
|
-
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16636
|
-
returnSelectList: 'jstReturnSelectList',
|
|
16637
|
-
deleteGood: 'jstDeleteGood',
|
|
16638
|
-
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16639
|
-
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16640
|
-
}
|
|
16641
15906
|
}
|
|
16642
15907
|
};
|
|
16643
15908
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17357,260 +16622,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17357
16622
|
})));
|
|
17358
16623
|
};
|
|
17359
16624
|
|
|
17360
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17361
|
-
var typeMap$2 = {
|
|
17362
|
-
JST_REISSUE_GOODS: {
|
|
17363
|
-
key: 'jstReissueGoods',
|
|
17364
|
-
typeName: 'jstReissueType',
|
|
17365
|
-
systemOrder: 'jstSystemOrder',
|
|
17366
|
-
systemOrderNo: 'jstSystemOrderNo',
|
|
17367
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17368
|
-
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17369
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
17370
|
-
orderTypeKey: 'orderType',
|
|
17371
|
-
oIdKey: 'oId',
|
|
17372
|
-
outerOiIdKey: 'outerOiId',
|
|
17373
|
-
goodDetailsKey: 'items'
|
|
17374
|
-
}
|
|
17375
|
-
};
|
|
17376
|
-
var PublicReissue = function PublicReissue(props) {
|
|
17377
|
-
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17378
|
-
var value = props.value,
|
|
17379
|
-
onChange = props.onChange,
|
|
17380
|
-
_props$reasonList = props.reasonList,
|
|
17381
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17382
|
-
disabled = props.disabled,
|
|
17383
|
-
type = props.type,
|
|
17384
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
17385
|
-
var getOrderFlag = useRef(false);
|
|
17386
|
-
var _useState = useState(false),
|
|
17387
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17388
|
-
isStrict = _useState2[0],
|
|
17389
|
-
setIsStrict = _useState2[1];
|
|
17390
|
-
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17391
|
-
useEffect(function () {
|
|
17392
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17393
|
-
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)) {
|
|
17394
|
-
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17395
|
-
getOrderFlag.current = true;
|
|
17396
|
-
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);
|
|
17397
|
-
}
|
|
17398
|
-
return;
|
|
17399
|
-
}, [value]);
|
|
17400
|
-
var getOrderList = /*#__PURE__*/function () {
|
|
17401
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17402
|
-
var _typeMap$type4;
|
|
17403
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17404
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17405
|
-
case 0:
|
|
17406
|
-
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17407
|
-
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17408
|
-
var orders = data || [];
|
|
17409
|
-
var showOrderInfo = orders.map(function (orderItem) {
|
|
17410
|
-
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17411
|
-
});
|
|
17412
|
-
var typeObj = {};
|
|
17413
|
-
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];
|
|
17414
|
-
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) {
|
|
17415
|
-
var _typeMap$type8, _typeMap$type9;
|
|
17416
|
-
var targetOrder = orders.find(function (oItem) {
|
|
17417
|
-
var _typeMap$type7;
|
|
17418
|
-
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17419
|
-
});
|
|
17420
|
-
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];
|
|
17421
|
-
}
|
|
17422
|
-
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]), {}, {
|
|
17423
|
-
showOrderInfo: showOrderInfo,
|
|
17424
|
-
orders: orders
|
|
17425
|
-
}))));
|
|
17426
|
-
});
|
|
17427
|
-
case 1:
|
|
17428
|
-
case "end":
|
|
17429
|
-
return _context.stop();
|
|
17430
|
-
}
|
|
17431
|
-
}, _callee);
|
|
17432
|
-
}));
|
|
17433
|
-
return function getOrderList(_x) {
|
|
17434
|
-
return _ref.apply(this, arguments);
|
|
17435
|
-
};
|
|
17436
|
-
}();
|
|
17437
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17438
|
-
var _typeMap$type12;
|
|
17439
|
-
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17440
|
-
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17441
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17442
|
-
var newValue = _objectSpread2({}, value);
|
|
17443
|
-
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17444
|
-
if (typeName === '1') {
|
|
17445
|
-
var _typeMap$type13;
|
|
17446
|
-
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17447
|
-
mode: isStrict
|
|
17448
|
-
});
|
|
17449
|
-
} else if (typeName === '2') {
|
|
17450
|
-
var _typeMap$type14;
|
|
17451
|
-
// 切换到非原单,清空列表
|
|
17452
|
-
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17453
|
-
}
|
|
17454
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17455
|
-
};
|
|
17456
|
-
var handleModeChange = function handleModeChange(mode) {
|
|
17457
|
-
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17458
|
-
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';
|
|
17459
|
-
setIsStrict(mode);
|
|
17460
|
-
if (!isOriginalOrder) return;
|
|
17461
|
-
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({
|
|
17462
|
-
mode: mode
|
|
17463
|
-
}))));
|
|
17464
|
-
};
|
|
17465
|
-
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17466
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17467
|
-
var mode = _ref3.mode,
|
|
17468
|
-
sysOrderNo = _ref3.sysOrderNo;
|
|
17469
|
-
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];
|
|
17470
|
-
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];
|
|
17471
|
-
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17472
|
-
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17473
|
-
});
|
|
17474
|
-
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) : [];
|
|
17475
|
-
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17476
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
17477
|
-
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17478
|
-
}) : goodDetails;
|
|
17479
|
-
};
|
|
17480
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17481
|
-
var _typeMap$type20;
|
|
17482
|
-
var newValue = _objectSpread2({}, value);
|
|
17483
|
-
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 || [];
|
|
17484
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17485
|
-
};
|
|
17486
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17487
|
-
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17488
|
-
var newValue = _objectSpread2({}, value);
|
|
17489
|
-
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;
|
|
17490
|
-
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) {
|
|
17491
|
-
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17492
|
-
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) || [];
|
|
17493
|
-
var targetOrder = val && orders.find(function (oItem) {
|
|
17494
|
-
var _typeMap$type24;
|
|
17495
|
-
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17496
|
-
});
|
|
17497
|
-
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];
|
|
17498
|
-
}
|
|
17499
|
-
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])) {
|
|
17500
|
-
var _typeMap$type28;
|
|
17501
|
-
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)] = [];
|
|
17502
|
-
} 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])) {
|
|
17503
|
-
var _typeMap$type30;
|
|
17504
|
-
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({
|
|
17505
|
-
mode: isStrict,
|
|
17506
|
-
sysOrderNo: val
|
|
17507
|
-
});
|
|
17508
|
-
}
|
|
17509
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17510
|
-
};
|
|
17511
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
17512
|
-
var showChangeBtn = useMemo(function () {
|
|
17513
|
-
var _typeMap$type31;
|
|
17514
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17515
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17516
|
-
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17517
|
-
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17518
|
-
var newValue = _objectSpread2({}, value);
|
|
17519
|
-
// 原订单商品
|
|
17520
|
-
var originTradeGoodList = getGoodDetails({
|
|
17521
|
-
mode: isStrict
|
|
17522
|
-
}) || [];
|
|
17523
|
-
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17524
|
-
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)]) || [];
|
|
17525
|
-
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17526
|
-
return skuList.includes(item.uuid);
|
|
17527
|
-
});
|
|
17528
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17529
|
-
}, [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]);
|
|
17530
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17531
|
-
gutter: 8,
|
|
17532
|
-
wrap: true,
|
|
17533
|
-
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())
|
|
17534
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
17535
|
-
className: "gutter-row",
|
|
17536
|
-
xs: {
|
|
17537
|
-
span: 11
|
|
17538
|
-
},
|
|
17539
|
-
sm: {
|
|
17540
|
-
span: 6
|
|
17541
|
-
}
|
|
17542
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
17543
|
-
style: {
|
|
17544
|
-
marginBottom: '8px'
|
|
17545
|
-
},
|
|
17546
|
-
disabled: disabled,
|
|
17547
|
-
allowClear: false,
|
|
17548
|
-
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)],
|
|
17549
|
-
onChange: function onChange(val) {
|
|
17550
|
-
return changeSystemOrderHandle(val);
|
|
17551
|
-
},
|
|
17552
|
-
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17553
|
-
}, ((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) {
|
|
17554
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17555
|
-
key: item[typeMap$2[type].oIdKey],
|
|
17556
|
-
value: item[typeMap$2[type].oIdKey],
|
|
17557
|
-
label: item[typeMap$2[type].oIdKey]
|
|
17558
|
-
}, item[typeMap$2[type].oIdKey]);
|
|
17559
|
-
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17560
|
-
className: "gutter-row",
|
|
17561
|
-
xs: {
|
|
17562
|
-
span: 11
|
|
17563
|
-
},
|
|
17564
|
-
sm: {
|
|
17565
|
-
span: 6
|
|
17566
|
-
}
|
|
17567
|
-
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17568
|
-
style: {
|
|
17569
|
-
marginBottom: '8px'
|
|
17570
|
-
},
|
|
17571
|
-
disabled: disabled,
|
|
17572
|
-
allowClear: false,
|
|
17573
|
-
options: reasonList,
|
|
17574
|
-
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)],
|
|
17575
|
-
onChange: function onChange(val) {
|
|
17576
|
-
return changeTypeHandle(val);
|
|
17577
|
-
}
|
|
17578
|
-
})), (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.createElement(Col, {
|
|
17579
|
-
className: "gutter-row",
|
|
17580
|
-
xs: {
|
|
17581
|
-
span: 11
|
|
17582
|
-
},
|
|
17583
|
-
sm: {
|
|
17584
|
-
span: 6
|
|
17585
|
-
}
|
|
17586
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
17587
|
-
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)],
|
|
17588
|
-
disabled: disabled,
|
|
17589
|
-
readOnly: true
|
|
17590
|
-
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17591
|
-
key: 'reissueGoods'
|
|
17592
|
-
}, other), {}, {
|
|
17593
|
-
type: type,
|
|
17594
|
-
disabled: disabled,
|
|
17595
|
-
canUpdateNumber: showChangeBtn,
|
|
17596
|
-
showChangeBtn: showChangeBtn,
|
|
17597
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17598
|
-
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)],
|
|
17599
|
-
onChange: function onChange(val) {
|
|
17600
|
-
return changeGoodHandle(val);
|
|
17601
|
-
},
|
|
17602
|
-
onModeChange: handleModeChange,
|
|
17603
|
-
showModeBtn: false,
|
|
17604
|
-
isStrict: isStrict,
|
|
17605
|
-
tradeGoods: {
|
|
17606
|
-
originDataSource: getGoodDetails({
|
|
17607
|
-
mode: isStrict
|
|
17608
|
-
}),
|
|
17609
|
-
selectedGoodsChange: selectedGoodsChange
|
|
17610
|
-
}
|
|
17611
|
-
})));
|
|
17612
|
-
};
|
|
17613
|
-
|
|
17614
16625
|
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";
|
|
17615
16626
|
styleInject(css_248z$a);
|
|
17616
16627
|
|
|
@@ -18087,12 +17098,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
18087
17098
|
};
|
|
18088
17099
|
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
18089
17100
|
|
|
18090
|
-
var _excluded$
|
|
17101
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
18091
17102
|
function CommonStatus(props) {
|
|
18092
17103
|
var onChange = props.onChange,
|
|
18093
17104
|
value = props.value,
|
|
18094
17105
|
failValue = props.failValue,
|
|
18095
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17106
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
18096
17107
|
var changeHandle = function changeHandle(val) {
|
|
18097
17108
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
18098
17109
|
status: val,
|
|
@@ -18132,15 +17143,10 @@ var typeInitValueMap$1 = {
|
|
|
18132
17143
|
initValue: [{
|
|
18133
17144
|
billNo: ''
|
|
18134
17145
|
}]
|
|
18135
|
-
},
|
|
18136
|
-
5: {
|
|
18137
|
-
initValue: [{
|
|
18138
|
-
billNo: ''
|
|
18139
|
-
}]
|
|
18140
17146
|
}
|
|
18141
17147
|
};
|
|
18142
17148
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
18143
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4
|
|
17149
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18144
17150
|
var _props$value = props.value,
|
|
18145
17151
|
value = _props$value === void 0 ? [] : _props$value,
|
|
18146
17152
|
onChange = props.onChange,
|
|
@@ -18162,7 +17168,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18162
17168
|
maxHeight: '300px',
|
|
18163
17169
|
overflowY: 'auto'
|
|
18164
17170
|
}
|
|
18165
|
-
}, [1, 2, 3, 4
|
|
17171
|
+
}, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
18166
17172
|
};
|
|
18167
17173
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
18168
17174
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -18219,17 +17225,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18219
17225
|
return changeInputHandle(e.target.value, 'billNo');
|
|
18220
17226
|
},
|
|
18221
17227
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18222
|
-
})) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
18223
|
-
disabled: disabled,
|
|
18224
|
-
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18225
|
-
onChange: function onChange(e) {
|
|
18226
|
-
return changeInputHandle(e.target.value, 'billNo');
|
|
18227
|
-
},
|
|
18228
|
-
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
18229
17228
|
})) : null) : null);
|
|
18230
17229
|
};
|
|
18231
17230
|
|
|
18232
|
-
var _excluded$
|
|
17231
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18233
17232
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
18234
17233
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18235
17234
|
var _props$value = props.value,
|
|
@@ -18239,7 +17238,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18239
17238
|
failValue = props.failValue,
|
|
18240
17239
|
_props$type = props.type,
|
|
18241
17240
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18242
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17241
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
18243
17242
|
var _useState = useState(0),
|
|
18244
17243
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18245
17244
|
changeIndex = _useState2[0],
|
|
@@ -18305,7 +17304,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18305
17304
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
18306
17305
|
};
|
|
18307
17306
|
|
|
18308
|
-
var _excluded$
|
|
17307
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18309
17308
|
var MsgStatus = function MsgStatus(props) {
|
|
18310
17309
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18311
17310
|
var _props$value = props.value,
|
|
@@ -18315,7 +17314,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18315
17314
|
failValue = props.failValue,
|
|
18316
17315
|
_props$type = props.type,
|
|
18317
17316
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18318
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17317
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
18319
17318
|
var _useState = useState(0),
|
|
18320
17319
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18321
17320
|
changeIndex = _useState2[0],
|
|
@@ -18346,7 +17345,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18346
17345
|
onClick: function onClick() {
|
|
18347
17346
|
return setChangeIndex(index);
|
|
18348
17347
|
}
|
|
18349
|
-
}, msgTypeCh[key]
|
|
17348
|
+
}, msgTypeCh[key], item.ruleName);
|
|
18350
17349
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
18351
17350
|
showSearch: true,
|
|
18352
17351
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -18384,8 +17383,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
18384
17383
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
18385
17384
|
};
|
|
18386
17385
|
|
|
18387
|
-
var _excluded$
|
|
18388
|
-
var typeMap$
|
|
17386
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17387
|
+
var typeMap$2 = {
|
|
18389
17388
|
BS_E3_REISSUE_GOODS: {
|
|
18390
17389
|
key: 'bsE3ReissueGoods',
|
|
18391
17390
|
typeName: 'bsE3ReissueType',
|
|
@@ -18402,7 +17401,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18402
17401
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18403
17402
|
disabled = props.disabled,
|
|
18404
17403
|
type = props.type,
|
|
18405
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17404
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
18406
17405
|
var getOrderFlag = useRef(false);
|
|
18407
17406
|
var _useState = useState(false),
|
|
18408
17407
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18411,10 +17410,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18411
17410
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
18412
17411
|
useEffect(function () {
|
|
18413
17412
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18414
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17413
|
+
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)) {
|
|
18415
17414
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18416
17415
|
getOrderFlag.current = true;
|
|
18417
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17416
|
+
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);
|
|
18418
17417
|
}
|
|
18419
17418
|
return;
|
|
18420
17419
|
}, [value]);
|
|
@@ -18438,7 +17437,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18438
17437
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18439
17438
|
while (1) switch (_context.prev = _context.next) {
|
|
18440
17439
|
case 0:
|
|
18441
|
-
(_typeMap$type4 = typeMap$
|
|
17440
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18442
17441
|
var _typeMap$type5, _typeMap$type6;
|
|
18443
17442
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
18444
17443
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18447,7 +17446,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18447
17446
|
billNo: orderSn
|
|
18448
17447
|
};
|
|
18449
17448
|
});
|
|
18450
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17449
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
18451
17450
|
showOrderInfo: showOrderInfo,
|
|
18452
17451
|
orders: orders
|
|
18453
17452
|
}))));
|
|
@@ -18468,25 +17467,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18468
17467
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
18469
17468
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18470
17469
|
var newValue = _objectSpread2({}, value);
|
|
18471
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
17470
|
+
newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
18472
17471
|
if (typeName === '1') {
|
|
18473
17472
|
var _typeMap$type8;
|
|
18474
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17473
|
+
newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
18475
17474
|
mode: isStrict
|
|
18476
17475
|
});
|
|
18477
17476
|
} else if (typeName === '2') {
|
|
18478
17477
|
var _typeMap$type9;
|
|
18479
17478
|
// 切换到非原单,清空列表
|
|
18480
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17479
|
+
newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
18481
17480
|
}
|
|
18482
17481
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18483
17482
|
};
|
|
18484
17483
|
var handleModeChange = function handleModeChange(mode) {
|
|
18485
17484
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
18486
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$
|
|
17485
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
18487
17486
|
setIsStrict(mode);
|
|
18488
17487
|
if (!isOriginalOrder) return;
|
|
18489
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$
|
|
17488
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
|
|
18490
17489
|
mode: mode
|
|
18491
17490
|
}))));
|
|
18492
17491
|
};
|
|
@@ -18494,8 +17493,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18494
17493
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
18495
17494
|
var mode = _ref3.mode,
|
|
18496
17495
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18497
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
18498
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
17496
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
|
|
17497
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
|
|
18499
17498
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18500
17499
|
return order.orderSn === systemOrderNo;
|
|
18501
17500
|
});
|
|
@@ -18508,19 +17507,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18508
17507
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18509
17508
|
var _typeMap$type14;
|
|
18510
17509
|
var newValue = _objectSpread2({}, value);
|
|
18511
|
-
newValue["".concat(typeMap$
|
|
17510
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
|
|
18512
17511
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18513
17512
|
};
|
|
18514
17513
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18515
17514
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
18516
17515
|
var newValue = _objectSpread2({}, value);
|
|
18517
|
-
newValue["".concat(typeMap$
|
|
18518
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$
|
|
17516
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
|
|
17517
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
18519
17518
|
var _typeMap$type17;
|
|
18520
|
-
newValue["".concat(typeMap$
|
|
18521
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$
|
|
17519
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
|
|
17520
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18522
17521
|
var _typeMap$type19;
|
|
18523
|
-
newValue["".concat(typeMap$
|
|
17522
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
|
|
18524
17523
|
mode: isStrict,
|
|
18525
17524
|
sysOrderNo: val
|
|
18526
17525
|
});
|
|
@@ -18530,8 +17529,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18530
17529
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18531
17530
|
var showChangeBtn = useMemo(function () {
|
|
18532
17531
|
var _typeMap$type20;
|
|
18533
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
18534
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$
|
|
17532
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
17533
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
18535
17534
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18536
17535
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
18537
17536
|
var newValue = _objectSpread2({}, value);
|
|
@@ -18540,12 +17539,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18540
17539
|
mode: isStrict
|
|
18541
17540
|
}) || [];
|
|
18542
17541
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18543
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18544
|
-
newValue["".concat(typeMap$
|
|
17542
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
17543
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18545
17544
|
return skuList.includes(item.uuid);
|
|
18546
17545
|
});
|
|
18547
17546
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18548
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17547
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
18549
17548
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18550
17549
|
gutter: 8,
|
|
18551
17550
|
wrap: true,
|
|
@@ -18564,12 +17563,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18564
17563
|
},
|
|
18565
17564
|
disabled: disabled,
|
|
18566
17565
|
allowClear: false,
|
|
18567
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17566
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
18568
17567
|
onChange: function onChange(val) {
|
|
18569
17568
|
return changeSystemOrderHandle(val);
|
|
18570
17569
|
},
|
|
18571
17570
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18572
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$
|
|
17571
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18573
17572
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18574
17573
|
key: item.billNo,
|
|
18575
17574
|
value: item.billNo,
|
|
@@ -18590,7 +17589,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18590
17589
|
disabled: disabled,
|
|
18591
17590
|
allowClear: false,
|
|
18592
17591
|
options: reasonList,
|
|
18593
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17592
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
18594
17593
|
onChange: function onChange(val) {
|
|
18595
17594
|
return changeTypeHandle(val);
|
|
18596
17595
|
}
|
|
@@ -18602,7 +17601,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18602
17601
|
canUpdateNumber: showChangeBtn,
|
|
18603
17602
|
showChangeBtn: showChangeBtn,
|
|
18604
17603
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18605
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17604
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
18606
17605
|
onChange: function onChange(val) {
|
|
18607
17606
|
return changeGoodHandle(val);
|
|
18608
17607
|
},
|
|
@@ -18618,9 +17617,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18618
17617
|
})));
|
|
18619
17618
|
};
|
|
18620
17619
|
|
|
18621
|
-
var _excluded$
|
|
17620
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
18622
17621
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18623
|
-
var typeMap$
|
|
17622
|
+
var typeMap$3 = {
|
|
18624
17623
|
GY_REISSUE_GOODS: {
|
|
18625
17624
|
key: 'gyReissueGoods',
|
|
18626
17625
|
name: '管易',
|
|
@@ -18647,7 +17646,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18647
17646
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18648
17647
|
disabled = props.disabled,
|
|
18649
17648
|
type = props.type,
|
|
18650
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17649
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
18651
17650
|
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) {
|
|
18652
17651
|
var _order$platformCode;
|
|
18653
17652
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -18659,10 +17658,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18659
17658
|
setIsStrict = _useState2[1];
|
|
18660
17659
|
useEffect(function () {
|
|
18661
17660
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18662
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17661
|
+
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)) {
|
|
18663
17662
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18664
17663
|
getOrderFlag.current = true;
|
|
18665
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17664
|
+
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);
|
|
18666
17665
|
}
|
|
18667
17666
|
return;
|
|
18668
17667
|
}, [value]);
|
|
@@ -18672,7 +17671,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18672
17671
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18673
17672
|
while (1) switch (_context.prev = _context.next) {
|
|
18674
17673
|
case 0:
|
|
18675
|
-
(_typeMap$type4 = typeMap$
|
|
17674
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18676
17675
|
var _typeMap$type5, _typeMap$type6;
|
|
18677
17676
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
18678
17677
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18695,7 +17694,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18695
17694
|
shopCode: shopCode
|
|
18696
17695
|
});
|
|
18697
17696
|
});
|
|
18698
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17697
|
+
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]), {}, {
|
|
18699
17698
|
showOrderInfo: showOrderInfo,
|
|
18700
17699
|
orders: orders
|
|
18701
17700
|
}))));
|
|
@@ -18713,28 +17712,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
18713
17712
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
18714
17713
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
18715
17714
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
18716
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$
|
|
17715
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
18717
17716
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18718
17717
|
var newValue = _objectSpread2({}, value);
|
|
18719
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17718
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
18720
17719
|
if (typeName === '1') {
|
|
18721
17720
|
var _typeMap$type9;
|
|
18722
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17721
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
18723
17722
|
mode: isStrict
|
|
18724
17723
|
});
|
|
18725
17724
|
} else if (typeName === '2') {
|
|
18726
17725
|
var _typeMap$type10;
|
|
18727
17726
|
// 切换到非原单,清空列表
|
|
18728
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
17727
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
18729
17728
|
}
|
|
18730
17729
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18731
17730
|
};
|
|
18732
17731
|
var handleModeChange = function handleModeChange(mode) {
|
|
18733
17732
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
18734
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$
|
|
17733
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
18735
17734
|
setIsStrict(mode);
|
|
18736
17735
|
if (!isOriginalOrder) return;
|
|
18737
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$
|
|
17736
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
18738
17737
|
mode: mode
|
|
18739
17738
|
}))));
|
|
18740
17739
|
};
|
|
@@ -18742,8 +17741,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18742
17741
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
18743
17742
|
var mode = _ref3.mode,
|
|
18744
17743
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18745
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18746
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$
|
|
17744
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
17745
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
18747
17746
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18748
17747
|
return order.code === systemOrderNo;
|
|
18749
17748
|
});
|
|
@@ -18756,10 +17755,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18756
17755
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18757
17756
|
var _typeMap$type15;
|
|
18758
17757
|
var newValue = _objectSpread2({}, value);
|
|
18759
|
-
newValue["".concat(typeMap$
|
|
17758
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
18760
17759
|
var _typeMap$type16, _typeMap$type17;
|
|
18761
|
-
item["".concat(typeMap$
|
|
18762
|
-
item["".concat(typeMap$
|
|
17760
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
17761
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
18763
17762
|
return item;
|
|
18764
17763
|
});
|
|
18765
17764
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -18767,13 +17766,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
18767
17766
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18768
17767
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
18769
17768
|
var newValue = _objectSpread2({}, value);
|
|
18770
|
-
newValue["".concat(typeMap$
|
|
18771
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$
|
|
17769
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
17770
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18772
17771
|
var _typeMap$type20;
|
|
18773
|
-
newValue["".concat(typeMap$
|
|
18774
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$
|
|
17772
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
17773
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
18775
17774
|
var _typeMap$type22;
|
|
18776
|
-
newValue["".concat(typeMap$
|
|
17775
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
18777
17776
|
mode: isStrict,
|
|
18778
17777
|
sysOrderNo: val
|
|
18779
17778
|
});
|
|
@@ -18788,18 +17787,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
18788
17787
|
mode: isStrict
|
|
18789
17788
|
}) || [];
|
|
18790
17789
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18791
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18792
|
-
newValue["".concat(typeMap$
|
|
17790
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
17791
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18793
17792
|
return skuList.includes(item.uuid);
|
|
18794
17793
|
});
|
|
18795
|
-
console.log('商品发生变化', newValue["".concat(typeMap$
|
|
17794
|
+
console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
18796
17795
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18797
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17796
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
18798
17797
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18799
17798
|
var showChangeBtn = useMemo(function () {
|
|
18800
17799
|
var _typeMap$type27;
|
|
18801
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
18802
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$
|
|
17800
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17801
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
18803
17802
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18804
17803
|
gutter: 8,
|
|
18805
17804
|
wrap: true
|
|
@@ -18817,12 +17816,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18817
17816
|
},
|
|
18818
17817
|
disabled: disabled,
|
|
18819
17818
|
allowClear: false,
|
|
18820
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17819
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
18821
17820
|
onChange: function onChange(val) {
|
|
18822
17821
|
return changeSystemOrderHandle(val);
|
|
18823
17822
|
},
|
|
18824
17823
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18825
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$
|
|
17824
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18826
17825
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18827
17826
|
key: item.billNo,
|
|
18828
17827
|
value: item.billNo,
|
|
@@ -18843,7 +17842,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18843
17842
|
disabled: disabled,
|
|
18844
17843
|
allowClear: false,
|
|
18845
17844
|
options: reasonList,
|
|
18846
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17845
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
18847
17846
|
onChange: function onChange(val) {
|
|
18848
17847
|
return changeTypeHandle(val);
|
|
18849
17848
|
}
|
|
@@ -18855,7 +17854,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18855
17854
|
canUpdateNumber: showChangeBtn,
|
|
18856
17855
|
showChangeBtn: showChangeBtn,
|
|
18857
17856
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18858
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17857
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
18859
17858
|
onChange: function onChange(val) {
|
|
18860
17859
|
return changeGoodHandle(val);
|
|
18861
17860
|
},
|
|
@@ -18871,4 +17870,4 @@ var GyReissue = function GyReissue(props) {
|
|
|
18871
17870
|
})));
|
|
18872
17871
|
};
|
|
18873
17872
|
|
|
18874
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment,
|
|
17873
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
|