@kmkf-fe-packages/basic-components 2.0.12-beta.8 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +172 -1174
- package/dist/index.js +170 -1174
- package/dist/src/bs/SystemOrder/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -2
- package/package.json +4 -4
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +0 -25
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +0 -13
- package/dist/src/common/Reissue/index.d.ts +0 -3
- package/dist/src/constants/index.d.ts +0 -1
- package/dist/src/constants/jst.d.ts +0 -3
- package/dist/src/jst/common/index.d.ts +0 -3
package/dist/index.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,
|
|
@@ -14376,264 +14003,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14376
14003
|
};
|
|
14377
14004
|
};
|
|
14378
14005
|
|
|
14379
|
-
var getColumns$5 = function getColumns() {
|
|
14380
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
14381
|
-
_ref$text = _ref.text,
|
|
14382
|
-
disabled = _ref.disabled,
|
|
14383
|
-
updateHandle = _ref.updateHandle;
|
|
14384
|
-
return {
|
|
14385
|
-
JST_GOODS: [{
|
|
14386
|
-
dataIndex: 'name',
|
|
14387
|
-
title: '商品名称',
|
|
14388
|
-
width: 150,
|
|
14389
|
-
ellipsis: true,
|
|
14390
|
-
align: 'center'
|
|
14391
|
-
}, {
|
|
14392
|
-
dataIndex: 'skuId',
|
|
14393
|
-
title: '商品编码',
|
|
14394
|
-
width: 150,
|
|
14395
|
-
ellipsis: true,
|
|
14396
|
-
align: 'center'
|
|
14397
|
-
}, {
|
|
14398
|
-
dataIndex: 'iId',
|
|
14399
|
-
title: '款式编码',
|
|
14400
|
-
width: 150,
|
|
14401
|
-
ellipsis: true,
|
|
14402
|
-
align: 'center'
|
|
14403
|
-
}, {
|
|
14404
|
-
dataIndex: 'pic',
|
|
14405
|
-
title: '商品图片',
|
|
14406
|
-
ellipsis: true,
|
|
14407
|
-
align: 'center',
|
|
14408
|
-
width: 100,
|
|
14409
|
-
render: function render(val) {
|
|
14410
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
14411
|
-
width: 60,
|
|
14412
|
-
src: val
|
|
14413
|
-
});
|
|
14414
|
-
}
|
|
14415
|
-
}, {
|
|
14416
|
-
dataIndex: 'propertiesValue',
|
|
14417
|
-
title: '规格值',
|
|
14418
|
-
width: 150,
|
|
14419
|
-
ellipsis: true,
|
|
14420
|
-
align: 'center'
|
|
14421
|
-
}, {
|
|
14422
|
-
dataIndex: 'saleBasePrice',
|
|
14423
|
-
title: '原价',
|
|
14424
|
-
width: 150,
|
|
14425
|
-
ellipsis: true,
|
|
14426
|
-
align: 'center',
|
|
14427
|
-
render: function render(price) {
|
|
14428
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14429
|
-
}
|
|
14430
|
-
}, {
|
|
14431
|
-
dataIndex: 'salePrice',
|
|
14432
|
-
title: '单价',
|
|
14433
|
-
ellipsis: true,
|
|
14434
|
-
align: 'center',
|
|
14435
|
-
width: 120,
|
|
14436
|
-
render: function render(val, record, index) {
|
|
14437
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14438
|
-
style: {
|
|
14439
|
-
width: 70
|
|
14440
|
-
},
|
|
14441
|
-
value: val,
|
|
14442
|
-
min: 0,
|
|
14443
|
-
precision: 2,
|
|
14444
|
-
onChange: function onChange(num) {
|
|
14445
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
14446
|
-
}
|
|
14447
|
-
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14448
|
-
}
|
|
14449
|
-
}, {
|
|
14450
|
-
dataIndex: 'qty',
|
|
14451
|
-
title: '数量',
|
|
14452
|
-
ellipsis: true,
|
|
14453
|
-
align: 'center',
|
|
14454
|
-
width: 100,
|
|
14455
|
-
render: function render(val, record, index) {
|
|
14456
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14457
|
-
style: {
|
|
14458
|
-
width: 70
|
|
14459
|
-
},
|
|
14460
|
-
value: val,
|
|
14461
|
-
min: 1,
|
|
14462
|
-
precision: 0,
|
|
14463
|
-
onChange: function onChange(num) {
|
|
14464
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
14465
|
-
}
|
|
14466
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14467
|
-
}
|
|
14468
|
-
}, {
|
|
14469
|
-
dataIndex: 'saleAmount',
|
|
14470
|
-
title: '总金额',
|
|
14471
|
-
width: 150,
|
|
14472
|
-
ellipsis: true,
|
|
14473
|
-
align: 'center',
|
|
14474
|
-
render: function render(val, record, index) {
|
|
14475
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
14476
|
-
}
|
|
14477
|
-
}, {
|
|
14478
|
-
dataIndex: 'batchId',
|
|
14479
|
-
title: '批次号',
|
|
14480
|
-
width: 150,
|
|
14481
|
-
ellipsis: true,
|
|
14482
|
-
align: 'center'
|
|
14483
|
-
}, {
|
|
14484
|
-
dataIndex: 'isGift',
|
|
14485
|
-
title: '是否赠品',
|
|
14486
|
-
ellipsis: true,
|
|
14487
|
-
align: 'center',
|
|
14488
|
-
width: 100,
|
|
14489
|
-
render: function render(val, record, index) {
|
|
14490
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14491
|
-
value: val,
|
|
14492
|
-
onChange: function onChange(value) {
|
|
14493
|
-
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
14494
|
-
},
|
|
14495
|
-
options: [{
|
|
14496
|
-
label: '是',
|
|
14497
|
-
value: true
|
|
14498
|
-
}, {
|
|
14499
|
-
label: '否',
|
|
14500
|
-
value: false
|
|
14501
|
-
}]
|
|
14502
|
-
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14503
|
-
}
|
|
14504
|
-
}, {
|
|
14505
|
-
dataIndex: 'outerOiId',
|
|
14506
|
-
title: '子订单号',
|
|
14507
|
-
width: 240,
|
|
14508
|
-
ellipsis: true,
|
|
14509
|
-
align: 'center'
|
|
14510
|
-
}],
|
|
14511
|
-
JST_REISSUE_GOODS: [{
|
|
14512
|
-
dataIndex: 'name',
|
|
14513
|
-
title: '商品名称',
|
|
14514
|
-
width: 150,
|
|
14515
|
-
ellipsis: true,
|
|
14516
|
-
align: 'center'
|
|
14517
|
-
}, {
|
|
14518
|
-
dataIndex: 'skuId',
|
|
14519
|
-
title: '商品编码',
|
|
14520
|
-
width: 150,
|
|
14521
|
-
ellipsis: true,
|
|
14522
|
-
align: 'center'
|
|
14523
|
-
}, {
|
|
14524
|
-
dataIndex: 'iId',
|
|
14525
|
-
title: '款式编码',
|
|
14526
|
-
width: 150,
|
|
14527
|
-
ellipsis: true,
|
|
14528
|
-
align: 'center'
|
|
14529
|
-
}, {
|
|
14530
|
-
dataIndex: 'pic',
|
|
14531
|
-
title: '商品图片',
|
|
14532
|
-
ellipsis: true,
|
|
14533
|
-
align: 'center',
|
|
14534
|
-
width: 100,
|
|
14535
|
-
render: function render(val) {
|
|
14536
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
14537
|
-
width: 60,
|
|
14538
|
-
src: val
|
|
14539
|
-
});
|
|
14540
|
-
}
|
|
14541
|
-
}, {
|
|
14542
|
-
dataIndex: 'propertiesValue',
|
|
14543
|
-
title: '规格值',
|
|
14544
|
-
width: 150,
|
|
14545
|
-
ellipsis: true,
|
|
14546
|
-
align: 'center'
|
|
14547
|
-
}, {
|
|
14548
|
-
dataIndex: 'saleBasePrice',
|
|
14549
|
-
title: '原价',
|
|
14550
|
-
width: 150,
|
|
14551
|
-
ellipsis: true,
|
|
14552
|
-
align: 'center',
|
|
14553
|
-
render: function render(price) {
|
|
14554
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14555
|
-
}
|
|
14556
|
-
}, {
|
|
14557
|
-
dataIndex: 'salePrice',
|
|
14558
|
-
title: '单价',
|
|
14559
|
-
ellipsis: true,
|
|
14560
|
-
align: 'center',
|
|
14561
|
-
width: 120,
|
|
14562
|
-
render: function render(val, record, index) {
|
|
14563
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14564
|
-
style: {
|
|
14565
|
-
width: 70
|
|
14566
|
-
},
|
|
14567
|
-
value: val,
|
|
14568
|
-
min: 0,
|
|
14569
|
-
precision: 2,
|
|
14570
|
-
onChange: function onChange(num) {
|
|
14571
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
14572
|
-
}
|
|
14573
|
-
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14574
|
-
}
|
|
14575
|
-
}, {
|
|
14576
|
-
dataIndex: 'qty',
|
|
14577
|
-
title: '数量',
|
|
14578
|
-
ellipsis: true,
|
|
14579
|
-
align: 'center',
|
|
14580
|
-
width: 100,
|
|
14581
|
-
render: function render(val, record, index) {
|
|
14582
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14583
|
-
style: {
|
|
14584
|
-
width: 70
|
|
14585
|
-
},
|
|
14586
|
-
value: val,
|
|
14587
|
-
min: 1,
|
|
14588
|
-
precision: 0,
|
|
14589
|
-
onChange: function onChange(num) {
|
|
14590
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
14591
|
-
}
|
|
14592
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14593
|
-
}
|
|
14594
|
-
}, {
|
|
14595
|
-
dataIndex: 'isGift',
|
|
14596
|
-
title: '是否赠品',
|
|
14597
|
-
ellipsis: true,
|
|
14598
|
-
align: 'center',
|
|
14599
|
-
width: 100,
|
|
14600
|
-
render: function render(val, record, index) {
|
|
14601
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14602
|
-
value: val,
|
|
14603
|
-
onChange: function onChange(value) {
|
|
14604
|
-
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
14605
|
-
},
|
|
14606
|
-
options: [{
|
|
14607
|
-
label: '是',
|
|
14608
|
-
value: true
|
|
14609
|
-
}, {
|
|
14610
|
-
label: '否',
|
|
14611
|
-
value: false
|
|
14612
|
-
}]
|
|
14613
|
-
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14614
|
-
}
|
|
14615
|
-
}, {
|
|
14616
|
-
dataIndex: 'remark',
|
|
14617
|
-
title: '备注',
|
|
14618
|
-
width: 150,
|
|
14619
|
-
ellipsis: true,
|
|
14620
|
-
align: 'center',
|
|
14621
|
-
render: function render(val, record, index) {
|
|
14622
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
|
|
14623
|
-
style: {
|
|
14624
|
-
width: 70
|
|
14625
|
-
},
|
|
14626
|
-
value: val,
|
|
14627
|
-
onChange: function onChange(e) {
|
|
14628
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
|
|
14629
|
-
}
|
|
14630
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14631
|
-
}
|
|
14632
|
-
}]
|
|
14633
|
-
};
|
|
14634
|
-
};
|
|
14635
|
-
|
|
14636
|
-
var getColumns$6 = function getColumns(_ref) {
|
|
14006
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
14637
14007
|
var _ref$text = _ref.text,
|
|
14638
14008
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14639
14009
|
disabled = _ref.disabled,
|
|
@@ -14746,7 +14116,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14746
14116
|
disabled = _ref.disabled,
|
|
14747
14117
|
updateHandle = _ref.updateHandle,
|
|
14748
14118
|
updateDataHandle = _ref.updateDataHandle;
|
|
14749
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(
|
|
14119
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14750
14120
|
text: text,
|
|
14751
14121
|
disabled: disabled,
|
|
14752
14122
|
updateHandle: updateHandle
|
|
@@ -14767,12 +14137,8 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14767
14137
|
disabled: disabled,
|
|
14768
14138
|
updateHandle: updateHandle,
|
|
14769
14139
|
updateDataHandle: updateDataHandle
|
|
14770
|
-
})), getColumns$5({
|
|
14771
|
-
text: text,
|
|
14772
|
-
disabled: disabled,
|
|
14773
|
-
updateHandle: updateHandle
|
|
14774
14140
|
})), {}, {
|
|
14775
|
-
default: getColumns$
|
|
14141
|
+
default: getColumns$5({
|
|
14776
14142
|
text: text,
|
|
14777
14143
|
disabled: disabled,
|
|
14778
14144
|
updateHandle: updateHandle
|
|
@@ -14876,19 +14242,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14876
14242
|
});
|
|
14877
14243
|
};
|
|
14878
14244
|
|
|
14879
|
-
var GoodsModalMap = {
|
|
14880
|
-
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14881
|
-
'WDT_GOODS': WdtGoodsModal,
|
|
14882
|
-
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14883
|
-
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14884
|
-
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14885
|
-
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14886
|
-
'GY_GOODS': GyGoodsModal$2,
|
|
14887
|
-
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14888
|
-
'JST_GOODS': JstGoodsModal,
|
|
14889
|
-
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14890
|
-
'OTHER_GOODS': GoodsModal$2
|
|
14891
|
-
};
|
|
14892
14245
|
var MAIN_FIELD = 'uuid';
|
|
14893
14246
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14894
14247
|
var columns = _ref.columns,
|
|
@@ -14950,9 +14303,6 @@ var getButtonText = function getButtonText() {
|
|
|
14950
14303
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14951
14304
|
return '选择管易ERP商品';
|
|
14952
14305
|
}
|
|
14953
|
-
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14954
|
-
return '选择聚水潭ERP商品';
|
|
14955
|
-
}
|
|
14956
14306
|
return '选择商品';
|
|
14957
14307
|
};
|
|
14958
14308
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -15052,7 +14402,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15052
14402
|
};
|
|
15053
14403
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15054
14404
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15055
|
-
var
|
|
14405
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15056
14406
|
return function (type) {
|
|
15057
14407
|
var columns = [];
|
|
15058
14408
|
switch (type) {
|
|
@@ -15063,13 +14413,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15063
14413
|
case 'BS_GOODS':
|
|
15064
14414
|
case 'WLN_GOODS':
|
|
15065
14415
|
case 'GY_GOODS':
|
|
15066
|
-
case 'JST_GOODS':
|
|
15067
|
-
case 'JST_REISSUE_GOODS':
|
|
15068
14416
|
case 'GY_REISSUE_GOODS':
|
|
15069
14417
|
{
|
|
15070
14418
|
columns = getColumnsMap({
|
|
15071
14419
|
text: text,
|
|
15072
|
-
disabled: disabled
|
|
14420
|
+
disabled: disabled,
|
|
15073
14421
|
updateHandle: updateHandle,
|
|
15074
14422
|
updateDataHandle: updateDataHandle
|
|
15075
14423
|
})[type];
|
|
@@ -15078,25 +14426,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15078
14426
|
case 'WDT_REISSUE_GOODS':
|
|
15079
14427
|
{
|
|
15080
14428
|
columns = getWdtReissueGoodColumns({
|
|
15081
|
-
disabled: disabled
|
|
14429
|
+
disabled: disabled,
|
|
15082
14430
|
updateHandle: updateHandle,
|
|
15083
|
-
operate:
|
|
14431
|
+
operate: operate
|
|
15084
14432
|
});
|
|
15085
14433
|
}
|
|
15086
14434
|
break;
|
|
15087
14435
|
case 'BS_E3_REISSUE_GOODS':
|
|
15088
14436
|
{
|
|
15089
14437
|
columns = getBsE3ReissueGoodColumns({
|
|
15090
|
-
disabled: disabled
|
|
14438
|
+
disabled: disabled,
|
|
15091
14439
|
updateHandle: updateHandle,
|
|
15092
|
-
operate:
|
|
14440
|
+
operate: operate
|
|
15093
14441
|
});
|
|
15094
14442
|
}
|
|
15095
14443
|
break;
|
|
15096
14444
|
default:
|
|
15097
14445
|
columns = getColumnsMap({
|
|
15098
14446
|
text: text,
|
|
15099
|
-
disabled: disabled
|
|
14447
|
+
disabled: disabled,
|
|
15100
14448
|
updateHandle: updateHandle,
|
|
15101
14449
|
updateDataHandle: updateDataHandle
|
|
15102
14450
|
})['default'];
|
|
@@ -15159,10 +14507,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15159
14507
|
return columnList;
|
|
15160
14508
|
}, [showHeader, value, disabled]);
|
|
15161
14509
|
var orderColumns = useMemo(function () {
|
|
15162
|
-
var columns = COLUMNS_MAP('',
|
|
15163
|
-
operate: false,
|
|
15164
|
-
disabled: true
|
|
15165
|
-
})(type);
|
|
14510
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
15166
14511
|
return [{
|
|
15167
14512
|
dataIndex: '',
|
|
15168
14513
|
title: '序号',
|
|
@@ -15246,23 +14591,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15246
14591
|
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
15247
14592
|
});
|
|
15248
14593
|
});
|
|
15249
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15250
|
-
newList = list.map(function (item) {
|
|
15251
|
-
return {
|
|
15252
|
-
name: item.goodName,
|
|
15253
|
-
skuId: item.goodNo,
|
|
15254
|
-
iId: item.styleCode,
|
|
15255
|
-
pic: item.goodPicUrl,
|
|
15256
|
-
propertiesValue: item.propertiesValue,
|
|
15257
|
-
saleBasePrice: item.retailPrice,
|
|
15258
|
-
salePrice: item.retailPrice,
|
|
15259
|
-
remark: '',
|
|
15260
|
-
uuid: uuid(),
|
|
15261
|
-
canDelete: true,
|
|
15262
|
-
canEdit: true,
|
|
15263
|
-
qty: 1
|
|
15264
|
-
};
|
|
15265
|
-
});
|
|
15266
14594
|
} else {
|
|
15267
14595
|
newList = list.map(function (item) {
|
|
15268
14596
|
var goodsId = item.goodsId,
|
|
@@ -15298,9 +14626,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15298
14626
|
}));
|
|
15299
14627
|
};
|
|
15300
14628
|
var handleChangeGoods = function handleChangeGoods() {
|
|
15301
|
-
refModal.current.open(shopCode
|
|
15302
|
-
value: value
|
|
15303
|
-
});
|
|
14629
|
+
refModal.current.open(shopCode);
|
|
15304
14630
|
};
|
|
15305
14631
|
var rowSelection = {
|
|
15306
14632
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -15317,7 +14643,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15317
14643
|
}
|
|
15318
14644
|
return params;
|
|
15319
14645
|
}, [tableSelect, selectedRowKeys]);
|
|
15320
|
-
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15321
14646
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
|
|
15322
14647
|
style: {
|
|
15323
14648
|
float: 'right'
|
|
@@ -15345,7 +14670,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15345
14670
|
locale: {
|
|
15346
14671
|
emptyText: '暂无数据'
|
|
15347
14672
|
}
|
|
15348
|
-
})), /*#__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, {
|
|
15349
14698
|
ref: refModal,
|
|
15350
14699
|
onSubmit: onSubmit,
|
|
15351
14700
|
width: width,
|
|
@@ -16077,60 +15426,27 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
16077
15426
|
// 延迟10秒清除,保证订单的时效性
|
|
16078
15427
|
setTimeout(function () {
|
|
16079
15428
|
singletonMap$2.delete(orderNo);
|
|
16080
|
-
}, 1000 * 10);
|
|
16081
|
-
} else {
|
|
16082
|
-
doReject(res);
|
|
16083
|
-
}
|
|
16084
|
-
}).catch(doReject);
|
|
16085
|
-
});
|
|
16086
|
-
singletonMap$2.set(orderNo, p);
|
|
16087
|
-
}
|
|
16088
|
-
return singletonMap$2.get(orderNo);
|
|
16089
|
-
};
|
|
16090
|
-
var gyUtils = {
|
|
16091
|
-
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16092
|
-
};
|
|
16093
|
-
|
|
16094
|
-
var singletonMap$3 = new Map();
|
|
16095
|
-
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16096
|
-
if (!singletonMap$3.has(orderNo)) {
|
|
16097
|
-
var p = new Promise(function (resolve, reject) {
|
|
16098
|
-
var doReject = function doReject(err) {
|
|
16099
|
-
// 清空掉错误的请求记录
|
|
16100
|
-
// singletonMap.delete(orderNo);
|
|
16101
|
-
reject(err);
|
|
16102
|
-
};
|
|
16103
|
-
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16104
|
-
method: 'post',
|
|
16105
|
-
data: {
|
|
16106
|
-
soId: orderNo
|
|
16107
|
-
}
|
|
16108
|
-
}).then(function (data) {
|
|
16109
|
-
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16110
|
-
data.data = filterJstOrders({
|
|
16111
|
-
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16112
|
-
}, orderNo);
|
|
16113
|
-
resolve(data.data);
|
|
15429
|
+
}, 1000 * 10);
|
|
16114
15430
|
} else {
|
|
16115
|
-
doReject(
|
|
15431
|
+
doReject(res);
|
|
16116
15432
|
}
|
|
16117
15433
|
}).catch(doReject);
|
|
16118
15434
|
});
|
|
16119
|
-
singletonMap$
|
|
15435
|
+
singletonMap$2.set(orderNo, p);
|
|
16120
15436
|
}
|
|
16121
|
-
return singletonMap$
|
|
15437
|
+
return singletonMap$2.get(orderNo);
|
|
16122
15438
|
};
|
|
16123
|
-
var
|
|
16124
|
-
|
|
15439
|
+
var gyUtils = {
|
|
15440
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16125
15441
|
};
|
|
16126
15442
|
|
|
16127
|
-
var singletonMap$
|
|
15443
|
+
var singletonMap$3 = new Map();
|
|
16128
15444
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
16129
|
-
if (!singletonMap$
|
|
15445
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16130
15446
|
var p = new Promise(function (resolve, reject) {
|
|
16131
15447
|
var doReject = function doReject(err) {
|
|
16132
15448
|
// 清空掉错误的请求记录
|
|
16133
|
-
singletonMap$
|
|
15449
|
+
singletonMap$3.delete(orderNo);
|
|
16134
15450
|
reject(err);
|
|
16135
15451
|
};
|
|
16136
15452
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -16156,16 +15472,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
16156
15472
|
}
|
|
16157
15473
|
// 延迟10秒清除,保证订单的时效性
|
|
16158
15474
|
setTimeout(function () {
|
|
16159
|
-
singletonMap$
|
|
15475
|
+
singletonMap$3.delete(orderNo);
|
|
16160
15476
|
}, 1000 * 10);
|
|
16161
15477
|
} else {
|
|
16162
15478
|
doReject(data);
|
|
16163
15479
|
}
|
|
16164
15480
|
}).catch(doReject);
|
|
16165
15481
|
});
|
|
16166
|
-
singletonMap$
|
|
15482
|
+
singletonMap$3.set(orderNo, p);
|
|
16167
15483
|
}
|
|
16168
|
-
return singletonMap$
|
|
15484
|
+
return singletonMap$3.get(orderNo);
|
|
16169
15485
|
};
|
|
16170
15486
|
var kmUtils = {
|
|
16171
15487
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -16178,8 +15494,7 @@ var columnsMap = {
|
|
|
16178
15494
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
16179
15495
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
16180
15496
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
16181
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16182
|
-
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
15497
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16183
15498
|
};
|
|
16184
15499
|
var rowKeyMap = {
|
|
16185
15500
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -16187,8 +15502,7 @@ var rowKeyMap = {
|
|
|
16187
15502
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
16188
15503
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
16189
15504
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
16190
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16191
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
15505
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
16192
15506
|
};
|
|
16193
15507
|
var index$1 = (function (props) {
|
|
16194
15508
|
var value = props.value,
|
|
@@ -16213,8 +15527,6 @@ var index$1 = (function (props) {
|
|
|
16213
15527
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
16214
15528
|
console.log('触发gy--getGyOrderList--1');
|
|
16215
15529
|
getGyOrderList(value.orderNo);
|
|
16216
|
-
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16217
|
-
getJstOrderList(value.orderNo);
|
|
16218
15530
|
}
|
|
16219
15531
|
}
|
|
16220
15532
|
}, [value, type]);
|
|
@@ -16370,41 +15682,18 @@ var index$1 = (function (props) {
|
|
|
16370
15682
|
return _ref5.apply(this, arguments);
|
|
16371
15683
|
};
|
|
16372
15684
|
}();
|
|
16373
|
-
var
|
|
15685
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16374
15686
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
16375
15687
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
16376
15688
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16377
|
-
case 0:
|
|
16378
|
-
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16379
|
-
var trades = data || [];
|
|
16380
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16381
|
-
orders: trades,
|
|
16382
|
-
showOrderInfo: trades
|
|
16383
|
-
}));
|
|
16384
|
-
});
|
|
16385
|
-
onceRef.current = false;
|
|
16386
|
-
case 2:
|
|
16387
|
-
case "end":
|
|
16388
|
-
return _context5.stop();
|
|
16389
|
-
}
|
|
16390
|
-
}, _callee5);
|
|
16391
|
-
}));
|
|
16392
|
-
return function getJstOrderList(_x5) {
|
|
16393
|
-
return _ref6.apply(this, arguments);
|
|
16394
|
-
};
|
|
16395
|
-
}();
|
|
16396
|
-
var getKmOrderList = /*#__PURE__*/function () {
|
|
16397
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16398
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16399
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
16400
15689
|
case 0:
|
|
16401
15690
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
16402
15691
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16403
15692
|
orders: trades,
|
|
16404
|
-
showOrderInfo: trades.map(function (
|
|
16405
|
-
var billNo =
|
|
16406
|
-
billType =
|
|
16407
|
-
billTag =
|
|
15693
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
15694
|
+
var billNo = _ref7.billNo,
|
|
15695
|
+
billType = _ref7.billType,
|
|
15696
|
+
billTag = _ref7.billTag;
|
|
16408
15697
|
return {
|
|
16409
15698
|
billNo: billNo,
|
|
16410
15699
|
billType: billType,
|
|
@@ -16416,18 +15705,18 @@ var index$1 = (function (props) {
|
|
|
16416
15705
|
onceRef.current = false;
|
|
16417
15706
|
case 2:
|
|
16418
15707
|
case "end":
|
|
16419
|
-
return
|
|
15708
|
+
return _context5.stop();
|
|
16420
15709
|
}
|
|
16421
|
-
},
|
|
15710
|
+
}, _callee5);
|
|
16422
15711
|
}));
|
|
16423
|
-
return function getKmOrderList(
|
|
16424
|
-
return
|
|
15712
|
+
return function getKmOrderList(_x5) {
|
|
15713
|
+
return _ref6.apply(this, arguments);
|
|
16425
15714
|
};
|
|
16426
15715
|
}();
|
|
16427
15716
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
16428
|
-
var
|
|
16429
|
-
return _regeneratorRuntime().wrap(function
|
|
16430
|
-
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) {
|
|
16431
15720
|
case 0:
|
|
16432
15721
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
16433
15722
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -16435,15 +15724,15 @@ var index$1 = (function (props) {
|
|
|
16435
15724
|
});
|
|
16436
15725
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16437
15726
|
orders: trades,
|
|
16438
|
-
showOrderInfo: trades.map(function (
|
|
16439
|
-
var billNo =
|
|
16440
|
-
billType =
|
|
16441
|
-
billTag =
|
|
16442
|
-
tradeTagName =
|
|
16443
|
-
deliveryState =
|
|
16444
|
-
vipCode =
|
|
16445
|
-
shopCode =
|
|
16446
|
-
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);
|
|
16447
15736
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
16448
15737
|
billNo: billNo,
|
|
16449
15738
|
billType: billType,
|
|
@@ -16460,12 +15749,12 @@ var index$1 = (function (props) {
|
|
|
16460
15749
|
onceRef.current = false;
|
|
16461
15750
|
case 2:
|
|
16462
15751
|
case "end":
|
|
16463
|
-
return
|
|
15752
|
+
return _context6.stop();
|
|
16464
15753
|
}
|
|
16465
|
-
},
|
|
15754
|
+
}, _callee6);
|
|
16466
15755
|
}));
|
|
16467
|
-
return function getGyOrderList(
|
|
16468
|
-
return
|
|
15756
|
+
return function getGyOrderList(_x6) {
|
|
15757
|
+
return _ref8.apply(this, arguments);
|
|
16469
15758
|
};
|
|
16470
15759
|
}();
|
|
16471
15760
|
var rowSelection = {
|
|
@@ -16614,31 +15903,6 @@ var componentMap$1 = {
|
|
|
16614
15903
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16615
15904
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16616
15905
|
}
|
|
16617
|
-
},
|
|
16618
|
-
JST_GOODS: {
|
|
16619
|
-
type: 'jst',
|
|
16620
|
-
key: 'jstGoods',
|
|
16621
|
-
name: '聚水潭',
|
|
16622
|
-
orderNo: 'dealCode',
|
|
16623
|
-
goodDetailOrderNo: 'originalDealCode',
|
|
16624
|
-
eventNameMap: {
|
|
16625
|
-
// pubsub 事件
|
|
16626
|
-
type: 'jstType',
|
|
16627
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
16628
|
-
selectListReturn: 'jstSelectListReturn',
|
|
16629
|
-
selectList: 'jstSelectList',
|
|
16630
|
-
reissueSelectList: 'jstReissueSelectList',
|
|
16631
|
-
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16632
|
-
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16633
|
-
changeShopCode: 'jstChangeShopCode',
|
|
16634
|
-
reissueType: 'jstReissueType',
|
|
16635
|
-
returnType: 'jstReturnType',
|
|
16636
|
-
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16637
|
-
returnSelectList: 'jstReturnSelectList',
|
|
16638
|
-
deleteGood: 'jstDeleteGood',
|
|
16639
|
-
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16640
|
-
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16641
|
-
}
|
|
16642
15906
|
}
|
|
16643
15907
|
};
|
|
16644
15908
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17358,260 +16622,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17358
16622
|
})));
|
|
17359
16623
|
};
|
|
17360
16624
|
|
|
17361
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17362
|
-
var typeMap$2 = {
|
|
17363
|
-
JST_REISSUE_GOODS: {
|
|
17364
|
-
key: 'jstReissueGoods',
|
|
17365
|
-
typeName: 'jstReissueType',
|
|
17366
|
-
systemOrder: 'jstSystemOrder',
|
|
17367
|
-
systemOrderNo: 'jstSystemOrderNo',
|
|
17368
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17369
|
-
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17370
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
17371
|
-
orderTypeKey: 'orderType',
|
|
17372
|
-
oIdKey: 'oId',
|
|
17373
|
-
outerOiIdKey: 'outerOiId',
|
|
17374
|
-
goodDetailsKey: 'items'
|
|
17375
|
-
}
|
|
17376
|
-
};
|
|
17377
|
-
var PublicReissue = function PublicReissue(props) {
|
|
17378
|
-
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17379
|
-
var value = props.value,
|
|
17380
|
-
onChange = props.onChange,
|
|
17381
|
-
_props$reasonList = props.reasonList,
|
|
17382
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17383
|
-
disabled = props.disabled,
|
|
17384
|
-
type = props.type,
|
|
17385
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
17386
|
-
var getOrderFlag = useRef(false);
|
|
17387
|
-
var _useState = useState(false),
|
|
17388
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17389
|
-
isStrict = _useState2[0],
|
|
17390
|
-
setIsStrict = _useState2[1];
|
|
17391
|
-
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17392
|
-
useEffect(function () {
|
|
17393
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17394
|
-
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)) {
|
|
17395
|
-
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17396
|
-
getOrderFlag.current = true;
|
|
17397
|
-
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);
|
|
17398
|
-
}
|
|
17399
|
-
return;
|
|
17400
|
-
}, [value]);
|
|
17401
|
-
var getOrderList = /*#__PURE__*/function () {
|
|
17402
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17403
|
-
var _typeMap$type4;
|
|
17404
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17405
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17406
|
-
case 0:
|
|
17407
|
-
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17408
|
-
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17409
|
-
var orders = data || [];
|
|
17410
|
-
var showOrderInfo = orders.map(function (orderItem) {
|
|
17411
|
-
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17412
|
-
});
|
|
17413
|
-
var typeObj = {};
|
|
17414
|
-
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];
|
|
17415
|
-
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) {
|
|
17416
|
-
var _typeMap$type8, _typeMap$type9;
|
|
17417
|
-
var targetOrder = orders.find(function (oItem) {
|
|
17418
|
-
var _typeMap$type7;
|
|
17419
|
-
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17420
|
-
});
|
|
17421
|
-
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];
|
|
17422
|
-
}
|
|
17423
|
-
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]), {}, {
|
|
17424
|
-
showOrderInfo: showOrderInfo,
|
|
17425
|
-
orders: orders
|
|
17426
|
-
}))));
|
|
17427
|
-
});
|
|
17428
|
-
case 1:
|
|
17429
|
-
case "end":
|
|
17430
|
-
return _context.stop();
|
|
17431
|
-
}
|
|
17432
|
-
}, _callee);
|
|
17433
|
-
}));
|
|
17434
|
-
return function getOrderList(_x) {
|
|
17435
|
-
return _ref.apply(this, arguments);
|
|
17436
|
-
};
|
|
17437
|
-
}();
|
|
17438
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17439
|
-
var _typeMap$type12;
|
|
17440
|
-
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17441
|
-
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17442
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17443
|
-
var newValue = _objectSpread2({}, value);
|
|
17444
|
-
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17445
|
-
if (typeName === '1') {
|
|
17446
|
-
var _typeMap$type13;
|
|
17447
|
-
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17448
|
-
mode: isStrict
|
|
17449
|
-
});
|
|
17450
|
-
} else if (typeName === '2') {
|
|
17451
|
-
var _typeMap$type14;
|
|
17452
|
-
// 切换到非原单,清空列表
|
|
17453
|
-
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17454
|
-
}
|
|
17455
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17456
|
-
};
|
|
17457
|
-
var handleModeChange = function handleModeChange(mode) {
|
|
17458
|
-
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17459
|
-
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';
|
|
17460
|
-
setIsStrict(mode);
|
|
17461
|
-
if (!isOriginalOrder) return;
|
|
17462
|
-
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({
|
|
17463
|
-
mode: mode
|
|
17464
|
-
}))));
|
|
17465
|
-
};
|
|
17466
|
-
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17467
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17468
|
-
var mode = _ref3.mode,
|
|
17469
|
-
sysOrderNo = _ref3.sysOrderNo;
|
|
17470
|
-
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];
|
|
17471
|
-
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];
|
|
17472
|
-
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17473
|
-
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17474
|
-
});
|
|
17475
|
-
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) : [];
|
|
17476
|
-
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17477
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
17478
|
-
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17479
|
-
}) : goodDetails;
|
|
17480
|
-
};
|
|
17481
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17482
|
-
var _typeMap$type20;
|
|
17483
|
-
var newValue = _objectSpread2({}, value);
|
|
17484
|
-
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 || [];
|
|
17485
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17486
|
-
};
|
|
17487
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17488
|
-
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17489
|
-
var newValue = _objectSpread2({}, value);
|
|
17490
|
-
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;
|
|
17491
|
-
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) {
|
|
17492
|
-
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17493
|
-
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) || [];
|
|
17494
|
-
var targetOrder = val && orders.find(function (oItem) {
|
|
17495
|
-
var _typeMap$type24;
|
|
17496
|
-
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17497
|
-
});
|
|
17498
|
-
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];
|
|
17499
|
-
}
|
|
17500
|
-
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])) {
|
|
17501
|
-
var _typeMap$type28;
|
|
17502
|
-
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)] = [];
|
|
17503
|
-
} 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])) {
|
|
17504
|
-
var _typeMap$type30;
|
|
17505
|
-
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({
|
|
17506
|
-
mode: isStrict,
|
|
17507
|
-
sysOrderNo: val
|
|
17508
|
-
});
|
|
17509
|
-
}
|
|
17510
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17511
|
-
};
|
|
17512
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
17513
|
-
var showChangeBtn = useMemo(function () {
|
|
17514
|
-
var _typeMap$type31;
|
|
17515
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17516
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17517
|
-
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17518
|
-
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17519
|
-
var newValue = _objectSpread2({}, value);
|
|
17520
|
-
// 原订单商品
|
|
17521
|
-
var originTradeGoodList = getGoodDetails({
|
|
17522
|
-
mode: isStrict
|
|
17523
|
-
}) || [];
|
|
17524
|
-
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17525
|
-
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)]) || [];
|
|
17526
|
-
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) {
|
|
17527
|
-
return skuList.includes(item.uuid);
|
|
17528
|
-
});
|
|
17529
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17530
|
-
}, [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]);
|
|
17531
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17532
|
-
gutter: 8,
|
|
17533
|
-
wrap: true,
|
|
17534
|
-
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())
|
|
17535
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
17536
|
-
className: "gutter-row",
|
|
17537
|
-
xs: {
|
|
17538
|
-
span: 11
|
|
17539
|
-
},
|
|
17540
|
-
sm: {
|
|
17541
|
-
span: 6
|
|
17542
|
-
}
|
|
17543
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
17544
|
-
style: {
|
|
17545
|
-
marginBottom: '8px'
|
|
17546
|
-
},
|
|
17547
|
-
disabled: disabled,
|
|
17548
|
-
allowClear: false,
|
|
17549
|
-
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)],
|
|
17550
|
-
onChange: function onChange(val) {
|
|
17551
|
-
return changeSystemOrderHandle(val);
|
|
17552
|
-
},
|
|
17553
|
-
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17554
|
-
}, ((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) {
|
|
17555
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17556
|
-
key: item[typeMap$2[type].oIdKey],
|
|
17557
|
-
value: item[typeMap$2[type].oIdKey],
|
|
17558
|
-
label: item[typeMap$2[type].oIdKey]
|
|
17559
|
-
}, item[typeMap$2[type].oIdKey]);
|
|
17560
|
-
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17561
|
-
className: "gutter-row",
|
|
17562
|
-
xs: {
|
|
17563
|
-
span: 11
|
|
17564
|
-
},
|
|
17565
|
-
sm: {
|
|
17566
|
-
span: 6
|
|
17567
|
-
}
|
|
17568
|
-
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17569
|
-
style: {
|
|
17570
|
-
marginBottom: '8px'
|
|
17571
|
-
},
|
|
17572
|
-
disabled: disabled,
|
|
17573
|
-
allowClear: false,
|
|
17574
|
-
options: reasonList,
|
|
17575
|
-
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)],
|
|
17576
|
-
onChange: function onChange(val) {
|
|
17577
|
-
return changeTypeHandle(val);
|
|
17578
|
-
}
|
|
17579
|
-
})), (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, {
|
|
17580
|
-
className: "gutter-row",
|
|
17581
|
-
xs: {
|
|
17582
|
-
span: 11
|
|
17583
|
-
},
|
|
17584
|
-
sm: {
|
|
17585
|
-
span: 6
|
|
17586
|
-
}
|
|
17587
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
17588
|
-
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)],
|
|
17589
|
-
disabled: disabled,
|
|
17590
|
-
readOnly: true
|
|
17591
|
-
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17592
|
-
key: 'reissueGoods'
|
|
17593
|
-
}, other), {}, {
|
|
17594
|
-
type: type,
|
|
17595
|
-
disabled: disabled,
|
|
17596
|
-
canUpdateNumber: showChangeBtn,
|
|
17597
|
-
showChangeBtn: showChangeBtn,
|
|
17598
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17599
|
-
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)],
|
|
17600
|
-
onChange: function onChange(val) {
|
|
17601
|
-
return changeGoodHandle(val);
|
|
17602
|
-
},
|
|
17603
|
-
onModeChange: handleModeChange,
|
|
17604
|
-
showModeBtn: false,
|
|
17605
|
-
isStrict: isStrict,
|
|
17606
|
-
tradeGoods: {
|
|
17607
|
-
originDataSource: getGoodDetails({
|
|
17608
|
-
mode: isStrict
|
|
17609
|
-
}),
|
|
17610
|
-
selectedGoodsChange: selectedGoodsChange
|
|
17611
|
-
}
|
|
17612
|
-
})));
|
|
17613
|
-
};
|
|
17614
|
-
|
|
17615
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";
|
|
17616
16626
|
styleInject(css_248z$a);
|
|
17617
16627
|
|
|
@@ -18088,12 +17098,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
18088
17098
|
};
|
|
18089
17099
|
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
18090
17100
|
|
|
18091
|
-
var _excluded$
|
|
17101
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
18092
17102
|
function CommonStatus(props) {
|
|
18093
17103
|
var onChange = props.onChange,
|
|
18094
17104
|
value = props.value,
|
|
18095
17105
|
failValue = props.failValue,
|
|
18096
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17106
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
18097
17107
|
var changeHandle = function changeHandle(val) {
|
|
18098
17108
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
18099
17109
|
status: val,
|
|
@@ -18133,15 +17143,10 @@ var typeInitValueMap$1 = {
|
|
|
18133
17143
|
initValue: [{
|
|
18134
17144
|
billNo: ''
|
|
18135
17145
|
}]
|
|
18136
|
-
},
|
|
18137
|
-
5: {
|
|
18138
|
-
initValue: [{
|
|
18139
|
-
billNo: ''
|
|
18140
|
-
}]
|
|
18141
17146
|
}
|
|
18142
17147
|
};
|
|
18143
17148
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
18144
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4
|
|
17149
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18145
17150
|
var _props$value = props.value,
|
|
18146
17151
|
value = _props$value === void 0 ? [] : _props$value,
|
|
18147
17152
|
onChange = props.onChange,
|
|
@@ -18163,7 +17168,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18163
17168
|
maxHeight: '300px',
|
|
18164
17169
|
overflowY: 'auto'
|
|
18165
17170
|
}
|
|
18166
|
-
}, [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);
|
|
18167
17172
|
};
|
|
18168
17173
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
18169
17174
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -18220,17 +17225,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18220
17225
|
return changeInputHandle(e.target.value, 'billNo');
|
|
18221
17226
|
},
|
|
18222
17227
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18223
|
-
})) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
18224
|
-
disabled: disabled,
|
|
18225
|
-
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18226
|
-
onChange: function onChange(e) {
|
|
18227
|
-
return changeInputHandle(e.target.value, 'billNo');
|
|
18228
|
-
},
|
|
18229
|
-
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
18230
17228
|
})) : null) : null);
|
|
18231
17229
|
};
|
|
18232
17230
|
|
|
18233
|
-
var _excluded$
|
|
17231
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18234
17232
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
18235
17233
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18236
17234
|
var _props$value = props.value,
|
|
@@ -18240,7 +17238,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18240
17238
|
failValue = props.failValue,
|
|
18241
17239
|
_props$type = props.type,
|
|
18242
17240
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18243
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17241
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
18244
17242
|
var _useState = useState(0),
|
|
18245
17243
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18246
17244
|
changeIndex = _useState2[0],
|
|
@@ -18306,7 +17304,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
18306
17304
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
18307
17305
|
};
|
|
18308
17306
|
|
|
18309
|
-
var _excluded$
|
|
17307
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
18310
17308
|
var MsgStatus = function MsgStatus(props) {
|
|
18311
17309
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
18312
17310
|
var _props$value = props.value,
|
|
@@ -18316,7 +17314,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18316
17314
|
failValue = props.failValue,
|
|
18317
17315
|
_props$type = props.type,
|
|
18318
17316
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
18319
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17317
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
18320
17318
|
var _useState = useState(0),
|
|
18321
17319
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18322
17320
|
changeIndex = _useState2[0],
|
|
@@ -18347,7 +17345,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18347
17345
|
onClick: function onClick() {
|
|
18348
17346
|
return setChangeIndex(index);
|
|
18349
17347
|
}
|
|
18350
|
-
}, msgTypeCh[key]
|
|
17348
|
+
}, msgTypeCh[key], item.ruleName);
|
|
18351
17349
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
18352
17350
|
showSearch: true,
|
|
18353
17351
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -18385,8 +17383,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
18385
17383
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
18386
17384
|
};
|
|
18387
17385
|
|
|
18388
|
-
var _excluded$
|
|
18389
|
-
var typeMap$
|
|
17386
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17387
|
+
var typeMap$2 = {
|
|
18390
17388
|
BS_E3_REISSUE_GOODS: {
|
|
18391
17389
|
key: 'bsE3ReissueGoods',
|
|
18392
17390
|
typeName: 'bsE3ReissueType',
|
|
@@ -18403,7 +17401,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18403
17401
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18404
17402
|
disabled = props.disabled,
|
|
18405
17403
|
type = props.type,
|
|
18406
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17404
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
18407
17405
|
var getOrderFlag = useRef(false);
|
|
18408
17406
|
var _useState = useState(false),
|
|
18409
17407
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18412,10 +17410,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18412
17410
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
18413
17411
|
useEffect(function () {
|
|
18414
17412
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18415
|
-
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)) {
|
|
18416
17414
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18417
17415
|
getOrderFlag.current = true;
|
|
18418
|
-
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);
|
|
18419
17417
|
}
|
|
18420
17418
|
return;
|
|
18421
17419
|
}, [value]);
|
|
@@ -18439,7 +17437,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18439
17437
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18440
17438
|
while (1) switch (_context.prev = _context.next) {
|
|
18441
17439
|
case 0:
|
|
18442
|
-
(_typeMap$type4 = typeMap$
|
|
17440
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18443
17441
|
var _typeMap$type5, _typeMap$type6;
|
|
18444
17442
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
18445
17443
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18448,7 +17446,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18448
17446
|
billNo: orderSn
|
|
18449
17447
|
};
|
|
18450
17448
|
});
|
|
18451
|
-
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]), {}, {
|
|
18452
17450
|
showOrderInfo: showOrderInfo,
|
|
18453
17451
|
orders: orders
|
|
18454
17452
|
}))));
|
|
@@ -18469,25 +17467,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18469
17467
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
18470
17468
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18471
17469
|
var newValue = _objectSpread2({}, value);
|
|
18472
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
17470
|
+
newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
18473
17471
|
if (typeName === '1') {
|
|
18474
17472
|
var _typeMap$type8;
|
|
18475
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17473
|
+
newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
18476
17474
|
mode: isStrict
|
|
18477
17475
|
});
|
|
18478
17476
|
} else if (typeName === '2') {
|
|
18479
17477
|
var _typeMap$type9;
|
|
18480
17478
|
// 切换到非原单,清空列表
|
|
18481
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17479
|
+
newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
18482
17480
|
}
|
|
18483
17481
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18484
17482
|
};
|
|
18485
17483
|
var handleModeChange = function handleModeChange(mode) {
|
|
18486
17484
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
18487
|
-
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';
|
|
18488
17486
|
setIsStrict(mode);
|
|
18489
17487
|
if (!isOriginalOrder) return;
|
|
18490
|
-
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({
|
|
18491
17489
|
mode: mode
|
|
18492
17490
|
}))));
|
|
18493
17491
|
};
|
|
@@ -18495,8 +17493,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18495
17493
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
18496
17494
|
var mode = _ref3.mode,
|
|
18497
17495
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18498
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
18499
|
-
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];
|
|
18500
17498
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18501
17499
|
return order.orderSn === systemOrderNo;
|
|
18502
17500
|
});
|
|
@@ -18509,19 +17507,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18509
17507
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18510
17508
|
var _typeMap$type14;
|
|
18511
17509
|
var newValue = _objectSpread2({}, value);
|
|
18512
|
-
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 || [];
|
|
18513
17511
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18514
17512
|
};
|
|
18515
17513
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18516
17514
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
18517
17515
|
var newValue = _objectSpread2({}, value);
|
|
18518
|
-
newValue["".concat(typeMap$
|
|
18519
|
-
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])) {
|
|
18520
17518
|
var _typeMap$type17;
|
|
18521
|
-
newValue["".concat(typeMap$
|
|
18522
|
-
} 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])) {
|
|
18523
17521
|
var _typeMap$type19;
|
|
18524
|
-
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({
|
|
18525
17523
|
mode: isStrict,
|
|
18526
17524
|
sysOrderNo: val
|
|
18527
17525
|
});
|
|
@@ -18531,8 +17529,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18531
17529
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18532
17530
|
var showChangeBtn = useMemo(function () {
|
|
18533
17531
|
var _typeMap$type20;
|
|
18534
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
18535
|
-
}, [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]]);
|
|
18536
17534
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18537
17535
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
18538
17536
|
var newValue = _objectSpread2({}, value);
|
|
@@ -18541,12 +17539,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18541
17539
|
mode: isStrict
|
|
18542
17540
|
}) || [];
|
|
18543
17541
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18544
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18545
|
-
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) {
|
|
18546
17544
|
return skuList.includes(item.uuid);
|
|
18547
17545
|
});
|
|
18548
17546
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18549
|
-
}, [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]);
|
|
18550
17548
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18551
17549
|
gutter: 8,
|
|
18552
17550
|
wrap: true,
|
|
@@ -18565,12 +17563,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18565
17563
|
},
|
|
18566
17564
|
disabled: disabled,
|
|
18567
17565
|
allowClear: false,
|
|
18568
|
-
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)],
|
|
18569
17567
|
onChange: function onChange(val) {
|
|
18570
17568
|
return changeSystemOrderHandle(val);
|
|
18571
17569
|
},
|
|
18572
17570
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18573
|
-
}, ((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) {
|
|
18574
17572
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18575
17573
|
key: item.billNo,
|
|
18576
17574
|
value: item.billNo,
|
|
@@ -18591,7 +17589,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18591
17589
|
disabled: disabled,
|
|
18592
17590
|
allowClear: false,
|
|
18593
17591
|
options: reasonList,
|
|
18594
|
-
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)],
|
|
18595
17593
|
onChange: function onChange(val) {
|
|
18596
17594
|
return changeTypeHandle(val);
|
|
18597
17595
|
}
|
|
@@ -18603,7 +17601,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18603
17601
|
canUpdateNumber: showChangeBtn,
|
|
18604
17602
|
showChangeBtn: showChangeBtn,
|
|
18605
17603
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18606
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17604
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
18607
17605
|
onChange: function onChange(val) {
|
|
18608
17606
|
return changeGoodHandle(val);
|
|
18609
17607
|
},
|
|
@@ -18619,9 +17617,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18619
17617
|
})));
|
|
18620
17618
|
};
|
|
18621
17619
|
|
|
18622
|
-
var _excluded$
|
|
17620
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
18623
17621
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18624
|
-
var typeMap$
|
|
17622
|
+
var typeMap$3 = {
|
|
18625
17623
|
GY_REISSUE_GOODS: {
|
|
18626
17624
|
key: 'gyReissueGoods',
|
|
18627
17625
|
name: '管易',
|
|
@@ -18648,7 +17646,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18648
17646
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18649
17647
|
disabled = props.disabled,
|
|
18650
17648
|
type = props.type,
|
|
18651
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
17649
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
18652
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) {
|
|
18653
17651
|
var _order$platformCode;
|
|
18654
17652
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -18660,10 +17658,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18660
17658
|
setIsStrict = _useState2[1];
|
|
18661
17659
|
useEffect(function () {
|
|
18662
17660
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18663
|
-
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)) {
|
|
18664
17662
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18665
17663
|
getOrderFlag.current = true;
|
|
18666
|
-
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);
|
|
18667
17665
|
}
|
|
18668
17666
|
return;
|
|
18669
17667
|
}, [value]);
|
|
@@ -18673,7 +17671,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18673
17671
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18674
17672
|
while (1) switch (_context.prev = _context.next) {
|
|
18675
17673
|
case 0:
|
|
18676
|
-
(_typeMap$type4 = typeMap$
|
|
17674
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18677
17675
|
var _typeMap$type5, _typeMap$type6;
|
|
18678
17676
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
18679
17677
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18696,7 +17694,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18696
17694
|
shopCode: shopCode
|
|
18697
17695
|
});
|
|
18698
17696
|
});
|
|
18699
|
-
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]), {}, {
|
|
18700
17698
|
showOrderInfo: showOrderInfo,
|
|
18701
17699
|
orders: orders
|
|
18702
17700
|
}))));
|
|
@@ -18714,28 +17712,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
18714
17712
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
18715
17713
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
18716
17714
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
18717
|
-
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;
|
|
18718
17716
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18719
17717
|
var newValue = _objectSpread2({}, value);
|
|
18720
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17718
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
18721
17719
|
if (typeName === '1') {
|
|
18722
17720
|
var _typeMap$type9;
|
|
18723
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17721
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
18724
17722
|
mode: isStrict
|
|
18725
17723
|
});
|
|
18726
17724
|
} else if (typeName === '2') {
|
|
18727
17725
|
var _typeMap$type10;
|
|
18728
17726
|
// 切换到非原单,清空列表
|
|
18729
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
17727
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
18730
17728
|
}
|
|
18731
17729
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18732
17730
|
};
|
|
18733
17731
|
var handleModeChange = function handleModeChange(mode) {
|
|
18734
17732
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
18735
|
-
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';
|
|
18736
17734
|
setIsStrict(mode);
|
|
18737
17735
|
if (!isOriginalOrder) return;
|
|
18738
|
-
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({
|
|
18739
17737
|
mode: mode
|
|
18740
17738
|
}))));
|
|
18741
17739
|
};
|
|
@@ -18743,8 +17741,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18743
17741
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
18744
17742
|
var mode = _ref3.mode,
|
|
18745
17743
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18746
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18747
|
-
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];
|
|
18748
17746
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18749
17747
|
return order.code === systemOrderNo;
|
|
18750
17748
|
});
|
|
@@ -18757,10 +17755,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18757
17755
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18758
17756
|
var _typeMap$type15;
|
|
18759
17757
|
var newValue = _objectSpread2({}, value);
|
|
18760
|
-
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) {
|
|
18761
17759
|
var _typeMap$type16, _typeMap$type17;
|
|
18762
|
-
item["".concat(typeMap$
|
|
18763
|
-
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;
|
|
18764
17762
|
return item;
|
|
18765
17763
|
});
|
|
18766
17764
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -18768,13 +17766,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
18768
17766
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18769
17767
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
18770
17768
|
var newValue = _objectSpread2({}, value);
|
|
18771
|
-
newValue["".concat(typeMap$
|
|
18772
|
-
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])) {
|
|
18773
17771
|
var _typeMap$type20;
|
|
18774
|
-
newValue["".concat(typeMap$
|
|
18775
|
-
} 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])) {
|
|
18776
17774
|
var _typeMap$type22;
|
|
18777
|
-
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({
|
|
18778
17776
|
mode: isStrict,
|
|
18779
17777
|
sysOrderNo: val
|
|
18780
17778
|
});
|
|
@@ -18789,18 +17787,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
18789
17787
|
mode: isStrict
|
|
18790
17788
|
}) || [];
|
|
18791
17789
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18792
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18793
|
-
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) {
|
|
18794
17792
|
return skuList.includes(item.uuid);
|
|
18795
17793
|
});
|
|
18796
|
-
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)]);
|
|
18797
17795
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18798
|
-
}, [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]);
|
|
18799
17797
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18800
17798
|
var showChangeBtn = useMemo(function () {
|
|
18801
17799
|
var _typeMap$type27;
|
|
18802
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
18803
|
-
}, [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]]);
|
|
18804
17802
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18805
17803
|
gutter: 8,
|
|
18806
17804
|
wrap: true
|
|
@@ -18818,12 +17816,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18818
17816
|
},
|
|
18819
17817
|
disabled: disabled,
|
|
18820
17818
|
allowClear: false,
|
|
18821
|
-
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)],
|
|
18822
17820
|
onChange: function onChange(val) {
|
|
18823
17821
|
return changeSystemOrderHandle(val);
|
|
18824
17822
|
},
|
|
18825
17823
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18826
|
-
}, ((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) {
|
|
18827
17825
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18828
17826
|
key: item.billNo,
|
|
18829
17827
|
value: item.billNo,
|
|
@@ -18844,7 +17842,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18844
17842
|
disabled: disabled,
|
|
18845
17843
|
allowClear: false,
|
|
18846
17844
|
options: reasonList,
|
|
18847
|
-
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)],
|
|
18848
17846
|
onChange: function onChange(val) {
|
|
18849
17847
|
return changeTypeHandle(val);
|
|
18850
17848
|
}
|
|
@@ -18856,7 +17854,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18856
17854
|
canUpdateNumber: showChangeBtn,
|
|
18857
17855
|
showChangeBtn: showChangeBtn,
|
|
18858
17856
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18859
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17857
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
18860
17858
|
onChange: function onChange(val) {
|
|
18861
17859
|
return changeGoodHandle(val);
|
|
18862
17860
|
},
|
|
@@ -18872,4 +17870,4 @@ var GyReissue = function GyReissue(props) {
|
|
|
18872
17870
|
})));
|
|
18873
17871
|
};
|
|
18874
17872
|
|
|
18875
|
-
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 };
|