@kmkf-fe-packages/basic-components 2.0.11 → 2.0.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +1153 -167
- package/dist/index.js +1152 -165
- package/dist/src/bs/SystemOrder/index.d.ts +1 -0
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +13 -0
- package/dist/src/common/Reissue/index.d.ts +3 -0
- package/dist/src/constants/jst.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/jst/common/index.d.ts +3 -0
- package/package.json +4 -4
package/dist/index.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, 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';
|
|
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, filterJstOrders, 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, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, 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, _value$changeIndex9;
|
|
11012
11012
|
var _props$value = props.value,
|
|
11013
11013
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11014
11014
|
onChange = props.onChange,
|
|
@@ -11025,7 +11025,8 @@ 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'].includes(platformType);
|
|
11028
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
11029
|
+
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11029
11030
|
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11030
11031
|
useEffect(function () {
|
|
11031
11032
|
//没有值塞个默认值
|
|
@@ -11037,7 +11038,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11037
11038
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11038
11039
|
setChangeIndex(0);
|
|
11039
11040
|
}
|
|
11040
|
-
}, value);
|
|
11041
|
+
}, [value]);
|
|
11041
11042
|
var content = function content(item, index) {
|
|
11042
11043
|
return /*#__PURE__*/React.createElement("div", {
|
|
11043
11044
|
style: {
|
|
@@ -11065,7 +11066,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11065
11066
|
changeOrderInfo['sendId'] = option.value;
|
|
11066
11067
|
}
|
|
11067
11068
|
if (isSelectName && type === 'sendName') {
|
|
11068
|
-
|
|
11069
|
+
if (isSendGoodSavedId) {
|
|
11070
|
+
// 如果发货仓名称存的是id,将名称存入快照
|
|
11071
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11072
|
+
} else {
|
|
11073
|
+
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
11074
|
+
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
11075
|
+
changeOrderInfo['sendName'] = option.label;
|
|
11076
|
+
}
|
|
11069
11077
|
}
|
|
11070
11078
|
var newList = _toConsumableArray(value);
|
|
11071
11079
|
newList[changeIndex] = changeOrderInfo;
|
|
@@ -11165,7 +11173,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11165
11173
|
showSearch: true,
|
|
11166
11174
|
options: sendOptions,
|
|
11167
11175
|
filterOption: filterOption,
|
|
11168
|
-
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11176
|
+
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendSnapshotId) || ((_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName) || null,
|
|
11169
11177
|
onChange: function onChange(value, option) {
|
|
11170
11178
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11171
11179
|
}
|
|
@@ -11175,14 +11183,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11175
11183
|
onChange: function onChange(e) {
|
|
11176
11184
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11177
11185
|
},
|
|
11178
|
-
value: (_value$
|
|
11186
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
11179
11187
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11180
11188
|
disabled: disabled,
|
|
11181
11189
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11182
11190
|
onChange: function onChange(e) {
|
|
11183
11191
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11184
11192
|
},
|
|
11185
|
-
value: (_value$
|
|
11193
|
+
value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
|
|
11186
11194
|
})) : null) : null);
|
|
11187
11195
|
};
|
|
11188
11196
|
|
|
@@ -12152,9 +12160,354 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12152
12160
|
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
12153
12161
|
|
|
12154
12162
|
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
|
+
}, {
|
|
12248
|
+
dataIndex: 'marketPrice',
|
|
12249
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12250
|
+
ellipsis: true,
|
|
12251
|
+
width: 100
|
|
12252
|
+
}, {
|
|
12253
|
+
dataIndex: 'costPrice',
|
|
12254
|
+
title: "\u6210\u672C\u4EF7",
|
|
12255
|
+
ellipsis: true,
|
|
12256
|
+
width: 100
|
|
12257
|
+
}, {
|
|
12258
|
+
dataIndex: 'skuType',
|
|
12259
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12260
|
+
ellipsis: true,
|
|
12261
|
+
width: 100,
|
|
12262
|
+
render: function render() {
|
|
12263
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
12264
|
+
return {
|
|
12265
|
+
'combine': '组合装商品',
|
|
12266
|
+
'normal': '普通商品'
|
|
12267
|
+
}[type] || type;
|
|
12268
|
+
}
|
|
12269
|
+
}];
|
|
12270
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12271
|
+
var _useState = useState([]),
|
|
12272
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12273
|
+
selectList = _useState2[0],
|
|
12274
|
+
setSelect = _useState2[1];
|
|
12275
|
+
var _useState3 = useState([]),
|
|
12276
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12277
|
+
selectIds = _useState4[0],
|
|
12278
|
+
setSelectIds = _useState4[1];
|
|
12279
|
+
useImperativeHandle(ref, function () {
|
|
12280
|
+
return {
|
|
12281
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12282
|
+
return selectList;
|
|
12283
|
+
}
|
|
12284
|
+
};
|
|
12285
|
+
});
|
|
12286
|
+
var _Form$useForm = Form.useForm(),
|
|
12287
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12288
|
+
form = _Form$useForm2[0];
|
|
12289
|
+
var _useAntdTable = useAntdTable(getTableData$1, {
|
|
12290
|
+
defaultPageSize: 10,
|
|
12291
|
+
form: form
|
|
12292
|
+
}),
|
|
12293
|
+
tableProps = _useAntdTable.tableProps,
|
|
12294
|
+
search = _useAntdTable.search,
|
|
12295
|
+
params = _useAntdTable.params;
|
|
12296
|
+
var submit = search.submit,
|
|
12297
|
+
reset = search.reset;
|
|
12298
|
+
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12299
|
+
layout: "inline",
|
|
12300
|
+
form: form
|
|
12301
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12302
|
+
name: "goodName",
|
|
12303
|
+
style: {
|
|
12304
|
+
marginBottom: '12px'
|
|
12305
|
+
}
|
|
12306
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12307
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12308
|
+
allowClear: true,
|
|
12309
|
+
style: {
|
|
12310
|
+
width: 150
|
|
12311
|
+
}
|
|
12312
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12313
|
+
name: "goodNo",
|
|
12314
|
+
style: {
|
|
12315
|
+
marginBottom: '12px'
|
|
12316
|
+
}
|
|
12317
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12318
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12319
|
+
allowClear: true,
|
|
12320
|
+
style: {
|
|
12321
|
+
width: 150
|
|
12322
|
+
}
|
|
12323
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12324
|
+
name: "styleCode",
|
|
12325
|
+
style: {
|
|
12326
|
+
marginBottom: '12px'
|
|
12327
|
+
}
|
|
12328
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12329
|
+
placeholder: "\u6B3E\u5F0F\u7F16\u7801",
|
|
12330
|
+
allowClear: true,
|
|
12331
|
+
style: {
|
|
12332
|
+
width: 150
|
|
12333
|
+
}
|
|
12334
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12335
|
+
style: {
|
|
12336
|
+
marginBottom: '12px'
|
|
12337
|
+
}
|
|
12338
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12339
|
+
type: "primary",
|
|
12340
|
+
style: {
|
|
12341
|
+
marginRight: '8px'
|
|
12342
|
+
},
|
|
12343
|
+
onClick: submit
|
|
12344
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12345
|
+
onClick: reset
|
|
12346
|
+
}, "\u91CD\u7F6E")));
|
|
12347
|
+
var rowSelection = {
|
|
12348
|
+
selectedRowKeys: selectIds,
|
|
12349
|
+
fixed: true,
|
|
12350
|
+
onSelect: function onSelect(record, selected) {
|
|
12351
|
+
if (selected) {
|
|
12352
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
|
|
12353
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12354
|
+
} else {
|
|
12355
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12356
|
+
return t !== record.goodNo;
|
|
12357
|
+
}));
|
|
12358
|
+
setSelect(selectList.filter(function (t) {
|
|
12359
|
+
return t.goodNo !== record.goodNo;
|
|
12360
|
+
}));
|
|
12361
|
+
}
|
|
12362
|
+
},
|
|
12363
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12364
|
+
if (selected) {
|
|
12365
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12366
|
+
return t.goodNo;
|
|
12367
|
+
}))));
|
|
12368
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12369
|
+
} else {
|
|
12370
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12371
|
+
return t.goodNo;
|
|
12372
|
+
})));
|
|
12373
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12374
|
+
return arrVal.goodNo !== othVal.goodNo;
|
|
12375
|
+
});
|
|
12376
|
+
setSelect(list);
|
|
12377
|
+
}
|
|
12378
|
+
},
|
|
12379
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
12380
|
+
var options = {
|
|
12381
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
12382
|
+
return row.goodNo || row.skuId;
|
|
12383
|
+
}).includes(record.goodNo || record.skuId),
|
|
12384
|
+
name: record.goodNo
|
|
12385
|
+
};
|
|
12386
|
+
return options;
|
|
12387
|
+
}
|
|
12388
|
+
};
|
|
12389
|
+
var showTable = function showTable() {
|
|
12390
|
+
var handleDelete = function handleDelete(record) {
|
|
12391
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12392
|
+
return t !== record.goodNo;
|
|
12393
|
+
}));
|
|
12394
|
+
setSelect(selectList.filter(function (t) {
|
|
12395
|
+
return t.goodNo !== record.goodNo;
|
|
12396
|
+
}));
|
|
12397
|
+
};
|
|
12398
|
+
var showColumns = [{
|
|
12399
|
+
dataIndex: '',
|
|
12400
|
+
title: "\u64CD\u4F5C",
|
|
12401
|
+
ellipsis: true,
|
|
12402
|
+
width: 100,
|
|
12403
|
+
render: function render(val, record) {
|
|
12404
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
12405
|
+
type: "link",
|
|
12406
|
+
onClick: function onClick() {
|
|
12407
|
+
return handleDelete(record);
|
|
12408
|
+
}
|
|
12409
|
+
}, "\u5220\u9664");
|
|
12410
|
+
}
|
|
12411
|
+
}].concat(takeRight(columns$2, columns$2.length - 1));
|
|
12412
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12413
|
+
style: {
|
|
12414
|
+
width: '100%',
|
|
12415
|
+
maxWidth: '387px'
|
|
12416
|
+
}
|
|
12417
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
12418
|
+
columns: showColumns,
|
|
12419
|
+
rowKey: 'goodNo',
|
|
12420
|
+
dataSource: selectList,
|
|
12421
|
+
scroll: {
|
|
12422
|
+
x: '100%',
|
|
12423
|
+
y: 250
|
|
12424
|
+
},
|
|
12425
|
+
pagination: {
|
|
12426
|
+
size: 'small',
|
|
12427
|
+
total: selectIds.length,
|
|
12428
|
+
pageSize: 10,
|
|
12429
|
+
showSizeChanger: false
|
|
12430
|
+
}
|
|
12431
|
+
})) : null;
|
|
12432
|
+
};
|
|
12433
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12434
|
+
style: {
|
|
12435
|
+
marginTop: '4px'
|
|
12436
|
+
}
|
|
12437
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12438
|
+
rowSelection: rowSelection,
|
|
12439
|
+
rowKey: "goodNo",
|
|
12440
|
+
columns: columns$2,
|
|
12441
|
+
scroll: {
|
|
12442
|
+
x: '100%',
|
|
12443
|
+
y: 250
|
|
12444
|
+
}
|
|
12445
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12446
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12447
|
+
return triggerNode.parentElement;
|
|
12448
|
+
},
|
|
12449
|
+
content: showTable(),
|
|
12450
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12451
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12452
|
+
danger: true,
|
|
12453
|
+
type: "text"
|
|
12454
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12455
|
+
};
|
|
12456
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$1);
|
|
12457
|
+
|
|
12458
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12459
|
+
useImperativeHandle(ref, function () {
|
|
12460
|
+
return {
|
|
12461
|
+
open: function open(shopCode) {
|
|
12462
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12463
|
+
setVisible(true);
|
|
12464
|
+
setSelectedRows(options.value || []);
|
|
12465
|
+
}
|
|
12466
|
+
};
|
|
12467
|
+
});
|
|
12468
|
+
var onSubmit = props.onSubmit,
|
|
12469
|
+
width = props.width;
|
|
12470
|
+
var _useState = useState(false),
|
|
12471
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12472
|
+
visible = _useState2[0],
|
|
12473
|
+
setVisible = _useState2[1];
|
|
12474
|
+
var _useState3 = useState([]),
|
|
12475
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12476
|
+
selectedRows = _useState4[0],
|
|
12477
|
+
setSelectedRows = _useState4[1];
|
|
12478
|
+
var gyGoodsListRef = useRef(null);
|
|
12479
|
+
var _onCancel = function onCancel() {
|
|
12480
|
+
setVisible(false);
|
|
12481
|
+
};
|
|
12482
|
+
var onOk = function onOk() {
|
|
12483
|
+
var _gyGoodsListRef$curre;
|
|
12484
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12485
|
+
onSubmit(selectedList);
|
|
12486
|
+
_onCancel();
|
|
12487
|
+
};
|
|
12488
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12489
|
+
title: '选择商品',
|
|
12490
|
+
okText: '确认',
|
|
12491
|
+
cancelText: '取消',
|
|
12492
|
+
visible: visible,
|
|
12493
|
+
width: width || 850,
|
|
12494
|
+
onCancel: function onCancel() {
|
|
12495
|
+
_onCancel();
|
|
12496
|
+
},
|
|
12497
|
+
onOk: onOk,
|
|
12498
|
+
wrapClassName: "goodModal"
|
|
12499
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
12500
|
+
ref: gyGoodsListRef,
|
|
12501
|
+
selectedRows: selectedRows
|
|
12502
|
+
})));
|
|
12503
|
+
};
|
|
12504
|
+
var JstGoodsModal = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
12505
|
+
|
|
12506
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12155
12507
|
var current = _ref.current,
|
|
12156
12508
|
pageSize = _ref.pageSize;
|
|
12157
12509
|
var data = {
|
|
12510
|
+
goodShortName: formData.goodShortName || null,
|
|
12158
12511
|
goodNo: formData.goodNo || null,
|
|
12159
12512
|
goodName: formData.goodName || null,
|
|
12160
12513
|
skuCode: formData.skuCode || null,
|
|
@@ -12184,7 +12537,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12184
12537
|
};
|
|
12185
12538
|
});
|
|
12186
12539
|
};
|
|
12187
|
-
var columns$
|
|
12540
|
+
var columns$3 = [{
|
|
12188
12541
|
dataIndex: 'index',
|
|
12189
12542
|
title: 'NO',
|
|
12190
12543
|
render: function render(val, record, index) {
|
|
@@ -12280,7 +12633,7 @@ var columns$2 = [{
|
|
|
12280
12633
|
ellipsis: true,
|
|
12281
12634
|
width: 100
|
|
12282
12635
|
}];
|
|
12283
|
-
var GoodList$
|
|
12636
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12284
12637
|
var _useState = useState([]),
|
|
12285
12638
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12286
12639
|
selectList = _useState2[0],
|
|
@@ -12299,7 +12652,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12299
12652
|
var _Form$useForm = Form.useForm(),
|
|
12300
12653
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12301
12654
|
form = _Form$useForm2[0];
|
|
12302
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
12655
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
12303
12656
|
defaultPageSize: 10,
|
|
12304
12657
|
form: form
|
|
12305
12658
|
}),
|
|
@@ -12312,6 +12665,17 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12312
12665
|
layout: "inline",
|
|
12313
12666
|
form: form
|
|
12314
12667
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12668
|
+
name: "goodShortName",
|
|
12669
|
+
style: {
|
|
12670
|
+
marginBottom: '12px'
|
|
12671
|
+
}
|
|
12672
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12673
|
+
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12674
|
+
allowClear: true,
|
|
12675
|
+
style: {
|
|
12676
|
+
width: 150
|
|
12677
|
+
}
|
|
12678
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12315
12679
|
name: "goodNo",
|
|
12316
12680
|
style: {
|
|
12317
12681
|
marginBottom: '12px'
|
|
@@ -12423,7 +12787,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12423
12787
|
}
|
|
12424
12788
|
}, "\u5220\u9664");
|
|
12425
12789
|
}
|
|
12426
|
-
}].concat(takeRight(columns$
|
|
12790
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
12427
12791
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12428
12792
|
style: {
|
|
12429
12793
|
width: '100%',
|
|
@@ -12452,7 +12816,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12452
12816
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12453
12817
|
rowSelection: rowSelection,
|
|
12454
12818
|
rowKey: "specNo",
|
|
12455
|
-
columns: columns$
|
|
12819
|
+
columns: columns$3,
|
|
12456
12820
|
scroll: {
|
|
12457
12821
|
x: '100%',
|
|
12458
12822
|
y: 250
|
|
@@ -12468,7 +12832,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12468
12832
|
type: "text"
|
|
12469
12833
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12470
12834
|
};
|
|
12471
|
-
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$
|
|
12835
|
+
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
12472
12836
|
|
|
12473
12837
|
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12474
12838
|
useImperativeHandle(ref, function () {
|
|
@@ -12511,7 +12875,7 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12511
12875
|
};
|
|
12512
12876
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12513
12877
|
|
|
12514
|
-
var getTableData$
|
|
12878
|
+
var getTableData$3 = function getTableData(_ref, formData) {
|
|
12515
12879
|
var current = _ref.current,
|
|
12516
12880
|
pageSize = _ref.pageSize;
|
|
12517
12881
|
var data = {
|
|
@@ -12543,7 +12907,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12543
12907
|
};
|
|
12544
12908
|
});
|
|
12545
12909
|
};
|
|
12546
|
-
var columns$
|
|
12910
|
+
var columns$4 = [{
|
|
12547
12911
|
dataIndex: 'index',
|
|
12548
12912
|
title: 'NO',
|
|
12549
12913
|
render: function render(val, record, index) {
|
|
@@ -12609,7 +12973,7 @@ var columns$3 = [{
|
|
|
12609
12973
|
ellipsis: true,
|
|
12610
12974
|
width: 100
|
|
12611
12975
|
}];
|
|
12612
|
-
var GoodList$
|
|
12976
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
12613
12977
|
var _useState = useState([]),
|
|
12614
12978
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12615
12979
|
selectList = _useState2[0],
|
|
@@ -12628,7 +12992,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12628
12992
|
var _Form$useForm = Form.useForm(),
|
|
12629
12993
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12630
12994
|
form = _Form$useForm2[0];
|
|
12631
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
12995
|
+
var _useAntdTable = useAntdTable(getTableData$3, {
|
|
12632
12996
|
defaultPageSize: 10,
|
|
12633
12997
|
form: form
|
|
12634
12998
|
}),
|
|
@@ -12763,7 +13127,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12763
13127
|
}
|
|
12764
13128
|
}, "\u5220\u9664");
|
|
12765
13129
|
}
|
|
12766
|
-
}].concat(takeRight(columns$
|
|
13130
|
+
}].concat(takeRight(columns$4, columns$4.length - 1));
|
|
12767
13131
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12768
13132
|
style: {
|
|
12769
13133
|
width: '100%',
|
|
@@ -12792,7 +13156,7 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12792
13156
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12793
13157
|
rowSelection: rowSelection,
|
|
12794
13158
|
rowKey: "specNo",
|
|
12795
|
-
columns: columns$
|
|
13159
|
+
columns: columns$4,
|
|
12796
13160
|
scroll: {
|
|
12797
13161
|
x: '100%',
|
|
12798
13162
|
y: 250
|
|
@@ -12808,9 +13172,9 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12808
13172
|
type: "text"
|
|
12809
13173
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12810
13174
|
};
|
|
12811
|
-
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$
|
|
13175
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$3);
|
|
12812
13176
|
|
|
12813
|
-
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
13177
|
+
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
12814
13178
|
useImperativeHandle(ref, function () {
|
|
12815
13179
|
return {
|
|
12816
13180
|
open: function open() {
|
|
@@ -12845,11 +13209,11 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
|
12845
13209
|
},
|
|
12846
13210
|
onOk: onOk,
|
|
12847
13211
|
wrapClassName: "goodModal"
|
|
12848
|
-
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
13212
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList$1, {
|
|
12849
13213
|
ref: gyGoodsListRef
|
|
12850
13214
|
})));
|
|
12851
13215
|
};
|
|
12852
|
-
var GyGoodsModal$
|
|
13216
|
+
var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
|
|
12853
13217
|
|
|
12854
13218
|
var getColumns = function getColumns(_ref) {
|
|
12855
13219
|
var _ref$text = _ref.text,
|
|
@@ -14004,6 +14368,256 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14004
14368
|
};
|
|
14005
14369
|
|
|
14006
14370
|
var getColumns$5 = function getColumns(_ref) {
|
|
14371
|
+
var _ref$text = _ref.text,
|
|
14372
|
+
disabled = _ref.disabled,
|
|
14373
|
+
updateHandle = _ref.updateHandle;
|
|
14374
|
+
return {
|
|
14375
|
+
JST_GOODS: [{
|
|
14376
|
+
dataIndex: 'name',
|
|
14377
|
+
title: '商品名称',
|
|
14378
|
+
width: 150,
|
|
14379
|
+
ellipsis: true,
|
|
14380
|
+
align: 'center'
|
|
14381
|
+
}, {
|
|
14382
|
+
dataIndex: 'skuId',
|
|
14383
|
+
title: '商品编码',
|
|
14384
|
+
width: 150,
|
|
14385
|
+
ellipsis: true,
|
|
14386
|
+
align: 'center'
|
|
14387
|
+
}, {
|
|
14388
|
+
dataIndex: 'iId',
|
|
14389
|
+
title: '款式编码',
|
|
14390
|
+
width: 150,
|
|
14391
|
+
ellipsis: true,
|
|
14392
|
+
align: 'center'
|
|
14393
|
+
}, {
|
|
14394
|
+
dataIndex: 'pic',
|
|
14395
|
+
title: '商品图片',
|
|
14396
|
+
ellipsis: true,
|
|
14397
|
+
align: 'center',
|
|
14398
|
+
width: 100,
|
|
14399
|
+
render: function render(val) {
|
|
14400
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
14401
|
+
width: 60,
|
|
14402
|
+
src: val
|
|
14403
|
+
});
|
|
14404
|
+
}
|
|
14405
|
+
}, {
|
|
14406
|
+
dataIndex: 'propertiesValue',
|
|
14407
|
+
title: '规格值',
|
|
14408
|
+
width: 150,
|
|
14409
|
+
ellipsis: true,
|
|
14410
|
+
align: 'center'
|
|
14411
|
+
}, {
|
|
14412
|
+
dataIndex: 'saleBasePrice',
|
|
14413
|
+
title: '原价',
|
|
14414
|
+
width: 150,
|
|
14415
|
+
ellipsis: true,
|
|
14416
|
+
align: 'center'
|
|
14417
|
+
}, {
|
|
14418
|
+
dataIndex: 'salePrice',
|
|
14419
|
+
title: '单价',
|
|
14420
|
+
ellipsis: true,
|
|
14421
|
+
align: 'center',
|
|
14422
|
+
width: 120,
|
|
14423
|
+
render: function render(val, record, index) {
|
|
14424
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14425
|
+
style: {
|
|
14426
|
+
width: 70
|
|
14427
|
+
},
|
|
14428
|
+
value: val,
|
|
14429
|
+
min: 0,
|
|
14430
|
+
precision: 2,
|
|
14431
|
+
onChange: function onChange(num) {
|
|
14432
|
+
return updateHandle(num, index, 'salePrice');
|
|
14433
|
+
}
|
|
14434
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14435
|
+
}
|
|
14436
|
+
}, {
|
|
14437
|
+
dataIndex: 'qty',
|
|
14438
|
+
title: '数量',
|
|
14439
|
+
ellipsis: true,
|
|
14440
|
+
align: 'center',
|
|
14441
|
+
width: 100,
|
|
14442
|
+
render: function render(val, record, index) {
|
|
14443
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14444
|
+
style: {
|
|
14445
|
+
width: 70
|
|
14446
|
+
},
|
|
14447
|
+
value: val,
|
|
14448
|
+
min: 1,
|
|
14449
|
+
precision: 0,
|
|
14450
|
+
onChange: function onChange(num) {
|
|
14451
|
+
return updateHandle(num, index, 'qty');
|
|
14452
|
+
}
|
|
14453
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14454
|
+
}
|
|
14455
|
+
}, {
|
|
14456
|
+
dataIndex: 'saleAmount',
|
|
14457
|
+
title: '总金额',
|
|
14458
|
+
width: 150,
|
|
14459
|
+
ellipsis: true,
|
|
14460
|
+
align: 'center',
|
|
14461
|
+
render: function render(val, record, index) {
|
|
14462
|
+
return (record.qty || 0) * (+record.salePrice || 0);
|
|
14463
|
+
}
|
|
14464
|
+
}, {
|
|
14465
|
+
dataIndex: 'batchId',
|
|
14466
|
+
title: '批次号',
|
|
14467
|
+
width: 150,
|
|
14468
|
+
ellipsis: true,
|
|
14469
|
+
align: 'center'
|
|
14470
|
+
}, {
|
|
14471
|
+
dataIndex: 'isGift',
|
|
14472
|
+
title: '是否赠品',
|
|
14473
|
+
ellipsis: true,
|
|
14474
|
+
align: 'center',
|
|
14475
|
+
width: 100,
|
|
14476
|
+
render: function render(val, record, index) {
|
|
14477
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14478
|
+
value: val,
|
|
14479
|
+
onChange: function onChange(value) {
|
|
14480
|
+
updateHandle(value, index, 'isGift');
|
|
14481
|
+
},
|
|
14482
|
+
options: [{
|
|
14483
|
+
label: '是',
|
|
14484
|
+
value: true
|
|
14485
|
+
}, {
|
|
14486
|
+
label: '否',
|
|
14487
|
+
value: false
|
|
14488
|
+
}]
|
|
14489
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14490
|
+
}
|
|
14491
|
+
}, {
|
|
14492
|
+
dataIndex: 'outerOiId',
|
|
14493
|
+
title: '子订单号',
|
|
14494
|
+
width: 150,
|
|
14495
|
+
ellipsis: true,
|
|
14496
|
+
align: 'center'
|
|
14497
|
+
}],
|
|
14498
|
+
JST_REISSUE_GOODS: [{
|
|
14499
|
+
dataIndex: 'name',
|
|
14500
|
+
title: '商品名称',
|
|
14501
|
+
width: 150,
|
|
14502
|
+
ellipsis: true,
|
|
14503
|
+
align: 'center'
|
|
14504
|
+
}, {
|
|
14505
|
+
dataIndex: 'skuId',
|
|
14506
|
+
title: '商品编码',
|
|
14507
|
+
width: 150,
|
|
14508
|
+
ellipsis: true,
|
|
14509
|
+
align: 'center'
|
|
14510
|
+
}, {
|
|
14511
|
+
dataIndex: 'iId',
|
|
14512
|
+
title: '款式编码',
|
|
14513
|
+
width: 150,
|
|
14514
|
+
ellipsis: true,
|
|
14515
|
+
align: 'center'
|
|
14516
|
+
}, {
|
|
14517
|
+
dataIndex: 'pic',
|
|
14518
|
+
title: '商品图片',
|
|
14519
|
+
ellipsis: true,
|
|
14520
|
+
align: 'center',
|
|
14521
|
+
width: 100,
|
|
14522
|
+
render: function render(val) {
|
|
14523
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
14524
|
+
width: 60,
|
|
14525
|
+
src: val
|
|
14526
|
+
});
|
|
14527
|
+
}
|
|
14528
|
+
}, {
|
|
14529
|
+
dataIndex: 'propertiesValue',
|
|
14530
|
+
title: '规格值',
|
|
14531
|
+
width: 150,
|
|
14532
|
+
ellipsis: true,
|
|
14533
|
+
align: 'center'
|
|
14534
|
+
}, {
|
|
14535
|
+
dataIndex: 'saleBasePrice',
|
|
14536
|
+
title: '原价',
|
|
14537
|
+
width: 150,
|
|
14538
|
+
ellipsis: true,
|
|
14539
|
+
align: 'center'
|
|
14540
|
+
}, {
|
|
14541
|
+
dataIndex: 'salePrice',
|
|
14542
|
+
title: '单价',
|
|
14543
|
+
ellipsis: true,
|
|
14544
|
+
align: 'center',
|
|
14545
|
+
width: 120,
|
|
14546
|
+
render: function render(val, record, index) {
|
|
14547
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14548
|
+
style: {
|
|
14549
|
+
width: 70
|
|
14550
|
+
},
|
|
14551
|
+
value: val,
|
|
14552
|
+
min: 0,
|
|
14553
|
+
precision: 2,
|
|
14554
|
+
onChange: function onChange(num) {
|
|
14555
|
+
return updateHandle(num, index, 'salePrice');
|
|
14556
|
+
}
|
|
14557
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14558
|
+
}
|
|
14559
|
+
}, {
|
|
14560
|
+
dataIndex: 'qty',
|
|
14561
|
+
title: '数量',
|
|
14562
|
+
ellipsis: true,
|
|
14563
|
+
align: 'center',
|
|
14564
|
+
width: 100,
|
|
14565
|
+
render: function render(val, record, index) {
|
|
14566
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14567
|
+
style: {
|
|
14568
|
+
width: 70
|
|
14569
|
+
},
|
|
14570
|
+
value: val,
|
|
14571
|
+
min: 1,
|
|
14572
|
+
precision: 0,
|
|
14573
|
+
onChange: function onChange(num) {
|
|
14574
|
+
return updateHandle(num, index, 'qty');
|
|
14575
|
+
}
|
|
14576
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14577
|
+
}
|
|
14578
|
+
}, {
|
|
14579
|
+
dataIndex: 'isGift',
|
|
14580
|
+
title: '是否赠品',
|
|
14581
|
+
ellipsis: true,
|
|
14582
|
+
align: 'center',
|
|
14583
|
+
width: 100,
|
|
14584
|
+
render: function render(val, record, index) {
|
|
14585
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14586
|
+
value: val,
|
|
14587
|
+
onChange: function onChange(value) {
|
|
14588
|
+
updateHandle(value, index, 'isGift');
|
|
14589
|
+
},
|
|
14590
|
+
options: [{
|
|
14591
|
+
label: '是',
|
|
14592
|
+
value: true
|
|
14593
|
+
}, {
|
|
14594
|
+
label: '否',
|
|
14595
|
+
value: false
|
|
14596
|
+
}]
|
|
14597
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
14598
|
+
}
|
|
14599
|
+
}, {
|
|
14600
|
+
dataIndex: 'remark',
|
|
14601
|
+
title: '备注',
|
|
14602
|
+
width: 150,
|
|
14603
|
+
ellipsis: true,
|
|
14604
|
+
align: 'center',
|
|
14605
|
+
render: function render(val, record, index) {
|
|
14606
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
|
|
14607
|
+
style: {
|
|
14608
|
+
width: 70
|
|
14609
|
+
},
|
|
14610
|
+
value: val,
|
|
14611
|
+
onChange: function onChange(e) {
|
|
14612
|
+
return updateHandle(e.target.value, index, 'remark');
|
|
14613
|
+
}
|
|
14614
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14615
|
+
}
|
|
14616
|
+
}]
|
|
14617
|
+
};
|
|
14618
|
+
};
|
|
14619
|
+
|
|
14620
|
+
var getColumns$6 = function getColumns(_ref) {
|
|
14007
14621
|
var _ref$text = _ref.text,
|
|
14008
14622
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14009
14623
|
disabled = _ref.disabled,
|
|
@@ -14116,7 +14730,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14116
14730
|
disabled = _ref.disabled,
|
|
14117
14731
|
updateHandle = _ref.updateHandle,
|
|
14118
14732
|
updateDataHandle = _ref.updateDataHandle;
|
|
14119
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14733
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14120
14734
|
text: text,
|
|
14121
14735
|
disabled: disabled,
|
|
14122
14736
|
updateHandle: updateHandle
|
|
@@ -14137,8 +14751,12 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14137
14751
|
disabled: disabled,
|
|
14138
14752
|
updateHandle: updateHandle,
|
|
14139
14753
|
updateDataHandle: updateDataHandle
|
|
14754
|
+
})), getColumns$5({
|
|
14755
|
+
text: text,
|
|
14756
|
+
disabled: disabled,
|
|
14757
|
+
updateHandle: updateHandle
|
|
14140
14758
|
})), {}, {
|
|
14141
|
-
default: getColumns$
|
|
14759
|
+
default: getColumns$6({
|
|
14142
14760
|
text: text,
|
|
14143
14761
|
disabled: disabled,
|
|
14144
14762
|
updateHandle: updateHandle
|
|
@@ -14242,6 +14860,19 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14242
14860
|
});
|
|
14243
14861
|
};
|
|
14244
14862
|
|
|
14863
|
+
var GoodsModalMap = {
|
|
14864
|
+
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14865
|
+
'WDT_GOODS': WdtGoodsModal,
|
|
14866
|
+
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14867
|
+
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14868
|
+
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14869
|
+
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14870
|
+
'GY_GOODS': GyGoodsModal$2,
|
|
14871
|
+
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14872
|
+
'JST_GOODS': JstGoodsModal,
|
|
14873
|
+
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14874
|
+
'OTHER_GOODS': GoodsModal$2
|
|
14875
|
+
};
|
|
14245
14876
|
var MAIN_FIELD = 'uuid';
|
|
14246
14877
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14247
14878
|
var columns = _ref.columns,
|
|
@@ -14303,6 +14934,9 @@ var getButtonText = function getButtonText() {
|
|
|
14303
14934
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14304
14935
|
return '选择管易ERP商品';
|
|
14305
14936
|
}
|
|
14937
|
+
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14938
|
+
return '选择聚水潭ERP商品';
|
|
14939
|
+
}
|
|
14306
14940
|
return '选择商品';
|
|
14307
14941
|
};
|
|
14308
14942
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -14402,7 +15036,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14402
15036
|
};
|
|
14403
15037
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
14404
15038
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
14405
|
-
var
|
|
15039
|
+
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14406
15040
|
return function (type) {
|
|
14407
15041
|
var columns = [];
|
|
14408
15042
|
switch (type) {
|
|
@@ -14413,11 +15047,13 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14413
15047
|
case 'BS_GOODS':
|
|
14414
15048
|
case 'WLN_GOODS':
|
|
14415
15049
|
case 'GY_GOODS':
|
|
15050
|
+
case 'JST_GOODS':
|
|
15051
|
+
case 'JST_REISSUE_GOODS':
|
|
14416
15052
|
case 'GY_REISSUE_GOODS':
|
|
14417
15053
|
{
|
|
14418
15054
|
columns = getColumnsMap({
|
|
14419
15055
|
text: text,
|
|
14420
|
-
disabled: disabled,
|
|
15056
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14421
15057
|
updateHandle: updateHandle,
|
|
14422
15058
|
updateDataHandle: updateDataHandle
|
|
14423
15059
|
})[type];
|
|
@@ -14426,25 +15062,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14426
15062
|
case 'WDT_REISSUE_GOODS':
|
|
14427
15063
|
{
|
|
14428
15064
|
columns = getWdtReissueGoodColumns({
|
|
14429
|
-
disabled: disabled,
|
|
15065
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14430
15066
|
updateHandle: updateHandle,
|
|
14431
|
-
operate: operate
|
|
15067
|
+
operate: columnsOptions.operate
|
|
14432
15068
|
});
|
|
14433
15069
|
}
|
|
14434
15070
|
break;
|
|
14435
15071
|
case 'BS_E3_REISSUE_GOODS':
|
|
14436
15072
|
{
|
|
14437
15073
|
columns = getBsE3ReissueGoodColumns({
|
|
14438
|
-
disabled: disabled,
|
|
15074
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14439
15075
|
updateHandle: updateHandle,
|
|
14440
|
-
operate: operate
|
|
15076
|
+
operate: columnsOptions.operate
|
|
14441
15077
|
});
|
|
14442
15078
|
}
|
|
14443
15079
|
break;
|
|
14444
15080
|
default:
|
|
14445
15081
|
columns = getColumnsMap({
|
|
14446
15082
|
text: text,
|
|
14447
|
-
disabled: disabled,
|
|
15083
|
+
disabled: disabled || columnsOptions.disabled,
|
|
14448
15084
|
updateHandle: updateHandle,
|
|
14449
15085
|
updateDataHandle: updateDataHandle
|
|
14450
15086
|
})['default'];
|
|
@@ -14507,7 +15143,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14507
15143
|
return columnList;
|
|
14508
15144
|
}, [showHeader, value, disabled]);
|
|
14509
15145
|
var orderColumns = useMemo(function () {
|
|
14510
|
-
var columns = COLUMNS_MAP('',
|
|
15146
|
+
var columns = COLUMNS_MAP('', {
|
|
15147
|
+
operate: false,
|
|
15148
|
+
disabled: true
|
|
15149
|
+
})(type);
|
|
14511
15150
|
return [{
|
|
14512
15151
|
dataIndex: '',
|
|
14513
15152
|
title: '序号',
|
|
@@ -14591,6 +15230,23 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14591
15230
|
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
14592
15231
|
});
|
|
14593
15232
|
});
|
|
15233
|
+
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15234
|
+
newList = list.map(function (item) {
|
|
15235
|
+
return {
|
|
15236
|
+
name: item.goodName,
|
|
15237
|
+
skuId: item.goodNo,
|
|
15238
|
+
iId: item.styleCode,
|
|
15239
|
+
pic: item.goodPicUrl,
|
|
15240
|
+
propertiesValue: item.propertiesValue,
|
|
15241
|
+
saleBasePrice: item.retailPrice,
|
|
15242
|
+
salePrice: item.retailPrice,
|
|
15243
|
+
remark: '',
|
|
15244
|
+
uuid: uuid(),
|
|
15245
|
+
canDelete: true,
|
|
15246
|
+
canEdit: true,
|
|
15247
|
+
qty: 1
|
|
15248
|
+
};
|
|
15249
|
+
});
|
|
14594
15250
|
} else {
|
|
14595
15251
|
newList = list.map(function (item) {
|
|
14596
15252
|
var goodsId = item.goodsId,
|
|
@@ -14626,7 +15282,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14626
15282
|
}));
|
|
14627
15283
|
};
|
|
14628
15284
|
var handleChangeGoods = function handleChangeGoods() {
|
|
14629
|
-
refModal.current.open(shopCode
|
|
15285
|
+
refModal.current.open(shopCode, {
|
|
15286
|
+
value: value
|
|
15287
|
+
});
|
|
14630
15288
|
};
|
|
14631
15289
|
var rowSelection = {
|
|
14632
15290
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -14643,6 +15301,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14643
15301
|
}
|
|
14644
15302
|
return params;
|
|
14645
15303
|
}, [tableSelect, selectedRowKeys]);
|
|
15304
|
+
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'];
|
|
14646
15305
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
|
|
14647
15306
|
style: {
|
|
14648
15307
|
float: 'right'
|
|
@@ -14670,31 +15329,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14670
15329
|
locale: {
|
|
14671
15330
|
emptyText: '暂无数据'
|
|
14672
15331
|
}
|
|
14673
|
-
})),
|
|
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, {
|
|
15332
|
+
})), /*#__PURE__*/React.createElement(TheGoodsModal, {
|
|
14698
15333
|
ref: refModal,
|
|
14699
15334
|
onSubmit: onSubmit,
|
|
14700
15335
|
width: width,
|
|
@@ -15426,25 +16061,58 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
15426
16061
|
singletonMap$2.delete(orderNo);
|
|
15427
16062
|
}, 1000 * 10);
|
|
15428
16063
|
} else {
|
|
15429
|
-
doReject(res);
|
|
16064
|
+
doReject(res);
|
|
16065
|
+
}
|
|
16066
|
+
}).catch(doReject);
|
|
16067
|
+
});
|
|
16068
|
+
singletonMap$2.set(orderNo, p);
|
|
16069
|
+
}
|
|
16070
|
+
return singletonMap$2.get(orderNo);
|
|
16071
|
+
};
|
|
16072
|
+
var gyUtils = {
|
|
16073
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16074
|
+
};
|
|
16075
|
+
|
|
16076
|
+
var singletonMap$3 = new Map();
|
|
16077
|
+
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16078
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16079
|
+
var p = new Promise(function (resolve, reject) {
|
|
16080
|
+
var doReject = function doReject(err) {
|
|
16081
|
+
// 清空掉错误的请求记录
|
|
16082
|
+
// singletonMap.delete(orderNo);
|
|
16083
|
+
reject(err);
|
|
16084
|
+
};
|
|
16085
|
+
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16086
|
+
method: 'post',
|
|
16087
|
+
data: {
|
|
16088
|
+
soId: orderNo
|
|
16089
|
+
}
|
|
16090
|
+
}).then(function (data) {
|
|
16091
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16092
|
+
data.data = filterJstOrders({
|
|
16093
|
+
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16094
|
+
}, orderNo);
|
|
16095
|
+
resolve(data.data);
|
|
16096
|
+
} else {
|
|
16097
|
+
doReject(data);
|
|
15430
16098
|
}
|
|
15431
16099
|
}).catch(doReject);
|
|
15432
16100
|
});
|
|
15433
|
-
singletonMap$
|
|
16101
|
+
singletonMap$3.set(orderNo, p);
|
|
15434
16102
|
}
|
|
15435
|
-
return singletonMap$
|
|
16103
|
+
return singletonMap$3.get(orderNo);
|
|
15436
16104
|
};
|
|
15437
|
-
var
|
|
15438
|
-
|
|
16105
|
+
var jstUtils = {
|
|
16106
|
+
getJstOrderListSingleton: getJstOrderListSingleton
|
|
15439
16107
|
};
|
|
15440
16108
|
|
|
15441
|
-
var singletonMap$
|
|
16109
|
+
var singletonMap$4 = new Map();
|
|
15442
16110
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
15443
|
-
if (!singletonMap$
|
|
16111
|
+
if (!singletonMap$4.has(orderNo)) {
|
|
15444
16112
|
var p = new Promise(function (resolve, reject) {
|
|
15445
16113
|
var doReject = function doReject(err) {
|
|
15446
16114
|
// 清空掉错误的请求记录
|
|
15447
|
-
singletonMap$
|
|
16115
|
+
singletonMap$4.delete(orderNo);
|
|
15448
16116
|
reject(err);
|
|
15449
16117
|
};
|
|
15450
16118
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -15470,16 +16138,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
15470
16138
|
}
|
|
15471
16139
|
// 延迟10秒清除,保证订单的时效性
|
|
15472
16140
|
setTimeout(function () {
|
|
15473
|
-
singletonMap$
|
|
16141
|
+
singletonMap$4.delete(orderNo);
|
|
15474
16142
|
}, 1000 * 10);
|
|
15475
16143
|
} else {
|
|
15476
16144
|
doReject(data);
|
|
15477
16145
|
}
|
|
15478
16146
|
}).catch(doReject);
|
|
15479
16147
|
});
|
|
15480
|
-
singletonMap$
|
|
16148
|
+
singletonMap$4.set(orderNo, p);
|
|
15481
16149
|
}
|
|
15482
|
-
return singletonMap$
|
|
16150
|
+
return singletonMap$4.get(orderNo);
|
|
15483
16151
|
};
|
|
15484
16152
|
var kmUtils = {
|
|
15485
16153
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -15491,7 +16159,8 @@ var columnsMap = {
|
|
|
15491
16159
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
15492
16160
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
15493
16161
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
15494
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16162
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns,
|
|
16163
|
+
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
15495
16164
|
};
|
|
15496
16165
|
var rowKeyMap = {
|
|
15497
16166
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -15499,7 +16168,8 @@ var rowKeyMap = {
|
|
|
15499
16168
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
15500
16169
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
15501
16170
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15502
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16171
|
+
GY_SYSTEM_ORDER: 'billNo',
|
|
16172
|
+
JST_SYSTEM_ORDER: 'oId'
|
|
15503
16173
|
};
|
|
15504
16174
|
var index$1 = (function (props) {
|
|
15505
16175
|
var value = props.value,
|
|
@@ -15524,6 +16194,8 @@ var index$1 = (function (props) {
|
|
|
15524
16194
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15525
16195
|
console.log('触发gy--getGyOrderList--1');
|
|
15526
16196
|
getGyOrderList(value.orderNo);
|
|
16197
|
+
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16198
|
+
getJstOrderList(value.orderNo);
|
|
15527
16199
|
}
|
|
15528
16200
|
}
|
|
15529
16201
|
}, [value, type]);
|
|
@@ -15679,18 +16351,41 @@ var index$1 = (function (props) {
|
|
|
15679
16351
|
return _ref5.apply(this, arguments);
|
|
15680
16352
|
};
|
|
15681
16353
|
}();
|
|
15682
|
-
var
|
|
16354
|
+
var getJstOrderList = /*#__PURE__*/function () {
|
|
15683
16355
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
15684
16356
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
15685
16357
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16358
|
+
case 0:
|
|
16359
|
+
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16360
|
+
var trades = data || [];
|
|
16361
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16362
|
+
orders: trades,
|
|
16363
|
+
showOrderInfo: trades
|
|
16364
|
+
}));
|
|
16365
|
+
});
|
|
16366
|
+
onceRef.current = false;
|
|
16367
|
+
case 2:
|
|
16368
|
+
case "end":
|
|
16369
|
+
return _context5.stop();
|
|
16370
|
+
}
|
|
16371
|
+
}, _callee5);
|
|
16372
|
+
}));
|
|
16373
|
+
return function getJstOrderList(_x5) {
|
|
16374
|
+
return _ref6.apply(this, arguments);
|
|
16375
|
+
};
|
|
16376
|
+
}();
|
|
16377
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16378
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16379
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16380
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15686
16381
|
case 0:
|
|
15687
16382
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
15688
16383
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15689
16384
|
orders: trades,
|
|
15690
|
-
showOrderInfo: trades.map(function (
|
|
15691
|
-
var billNo =
|
|
15692
|
-
billType =
|
|
15693
|
-
billTag =
|
|
16385
|
+
showOrderInfo: trades.map(function (_ref8) {
|
|
16386
|
+
var billNo = _ref8.billNo,
|
|
16387
|
+
billType = _ref8.billType,
|
|
16388
|
+
billTag = _ref8.billTag;
|
|
15694
16389
|
return {
|
|
15695
16390
|
billNo: billNo,
|
|
15696
16391
|
billType: billType,
|
|
@@ -15702,18 +16397,18 @@ var index$1 = (function (props) {
|
|
|
15702
16397
|
onceRef.current = false;
|
|
15703
16398
|
case 2:
|
|
15704
16399
|
case "end":
|
|
15705
|
-
return
|
|
16400
|
+
return _context6.stop();
|
|
15706
16401
|
}
|
|
15707
|
-
},
|
|
16402
|
+
}, _callee6);
|
|
15708
16403
|
}));
|
|
15709
|
-
return function getKmOrderList(
|
|
15710
|
-
return
|
|
16404
|
+
return function getKmOrderList(_x6) {
|
|
16405
|
+
return _ref7.apply(this, arguments);
|
|
15711
16406
|
};
|
|
15712
16407
|
}();
|
|
15713
16408
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
15714
|
-
var
|
|
15715
|
-
return _regeneratorRuntime().wrap(function
|
|
15716
|
-
while (1) switch (
|
|
16409
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(orderNo) {
|
|
16410
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
16411
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
15717
16412
|
case 0:
|
|
15718
16413
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15719
16414
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -15721,12 +16416,12 @@ var index$1 = (function (props) {
|
|
|
15721
16416
|
});
|
|
15722
16417
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15723
16418
|
orders: trades,
|
|
15724
|
-
showOrderInfo: trades.map(function (
|
|
15725
|
-
var billNo =
|
|
15726
|
-
billType =
|
|
15727
|
-
billTag =
|
|
15728
|
-
tradeTagName =
|
|
15729
|
-
deliveryState =
|
|
16419
|
+
showOrderInfo: trades.map(function (_ref10) {
|
|
16420
|
+
var billNo = _ref10.billNo,
|
|
16421
|
+
billType = _ref10.billType,
|
|
16422
|
+
billTag = _ref10.billTag,
|
|
16423
|
+
tradeTagName = _ref10.tradeTagName,
|
|
16424
|
+
deliveryState = _ref10.deliveryState;
|
|
15730
16425
|
return {
|
|
15731
16426
|
billNo: billNo,
|
|
15732
16427
|
billType: billType,
|
|
@@ -15741,12 +16436,12 @@ var index$1 = (function (props) {
|
|
|
15741
16436
|
onceRef.current = false;
|
|
15742
16437
|
case 2:
|
|
15743
16438
|
case "end":
|
|
15744
|
-
return
|
|
16439
|
+
return _context7.stop();
|
|
15745
16440
|
}
|
|
15746
|
-
},
|
|
16441
|
+
}, _callee7);
|
|
15747
16442
|
}));
|
|
15748
|
-
return function getGyOrderList(
|
|
15749
|
-
return
|
|
16443
|
+
return function getGyOrderList(_x7) {
|
|
16444
|
+
return _ref9.apply(this, arguments);
|
|
15750
16445
|
};
|
|
15751
16446
|
}();
|
|
15752
16447
|
var rowSelection = {
|
|
@@ -15895,6 +16590,31 @@ var componentMap$1 = {
|
|
|
15895
16590
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
15896
16591
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
15897
16592
|
}
|
|
16593
|
+
},
|
|
16594
|
+
JST_GOODS: {
|
|
16595
|
+
type: 'jst',
|
|
16596
|
+
key: 'jstGoods',
|
|
16597
|
+
name: '聚水潭',
|
|
16598
|
+
orderNo: 'dealCode',
|
|
16599
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
16600
|
+
eventNameMap: {
|
|
16601
|
+
// pubsub 事件
|
|
16602
|
+
type: 'jstType',
|
|
16603
|
+
updateGoodsHandle: updateJstGoodsHandle,
|
|
16604
|
+
selectListReturn: 'jstSelectListReturn',
|
|
16605
|
+
selectList: 'jstSelectList',
|
|
16606
|
+
reissueSelectList: 'jstReissueSelectList',
|
|
16607
|
+
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16608
|
+
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16609
|
+
changeShopCode: 'jstChangeShopCode',
|
|
16610
|
+
reissueType: 'jstReissueType',
|
|
16611
|
+
returnType: 'jstReturnType',
|
|
16612
|
+
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16613
|
+
returnSelectList: 'jstReturnSelectList',
|
|
16614
|
+
deleteGood: 'jstDeleteGood',
|
|
16615
|
+
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16616
|
+
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16617
|
+
}
|
|
15898
16618
|
}
|
|
15899
16619
|
};
|
|
15900
16620
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -16614,6 +17334,260 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
16614
17334
|
})));
|
|
16615
17335
|
};
|
|
16616
17336
|
|
|
17337
|
+
var _excluded$h = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17338
|
+
var typeMap$2 = {
|
|
17339
|
+
JST_REISSUE_GOODS: {
|
|
17340
|
+
key: 'jstReissueGoods',
|
|
17341
|
+
typeName: 'jstReissueType',
|
|
17342
|
+
systemOrder: 'jstSystemOrder',
|
|
17343
|
+
systemOrderNo: 'jstSystemOrderNo',
|
|
17344
|
+
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17345
|
+
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17346
|
+
updateGoodsHandle: updateJstGoodsHandle,
|
|
17347
|
+
orderTypeKey: 'orderType',
|
|
17348
|
+
oIdKey: 'oId',
|
|
17349
|
+
outerOiIdKey: 'outerOiId',
|
|
17350
|
+
goodDetailsKey: 'items'
|
|
17351
|
+
}
|
|
17352
|
+
};
|
|
17353
|
+
var PublicReissue = function PublicReissue(props) {
|
|
17354
|
+
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17355
|
+
var value = props.value,
|
|
17356
|
+
onChange = props.onChange,
|
|
17357
|
+
_props$reasonList = props.reasonList,
|
|
17358
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17359
|
+
disabled = props.disabled,
|
|
17360
|
+
type = props.type,
|
|
17361
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
17362
|
+
var getOrderFlag = useRef(false);
|
|
17363
|
+
var _useState = useState(false),
|
|
17364
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17365
|
+
isStrict = _useState2[0],
|
|
17366
|
+
setIsStrict = _useState2[1];
|
|
17367
|
+
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17368
|
+
useEffect(function () {
|
|
17369
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17370
|
+
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)) {
|
|
17371
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17372
|
+
getOrderFlag.current = true;
|
|
17373
|
+
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);
|
|
17374
|
+
}
|
|
17375
|
+
return;
|
|
17376
|
+
}, [value]);
|
|
17377
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17378
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17379
|
+
var _typeMap$type4;
|
|
17380
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17381
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17382
|
+
case 0:
|
|
17383
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17384
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17385
|
+
var orders = data || [];
|
|
17386
|
+
var showOrderInfo = orders.map(function (orderItem) {
|
|
17387
|
+
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17388
|
+
});
|
|
17389
|
+
var typeObj = {};
|
|
17390
|
+
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];
|
|
17391
|
+
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) {
|
|
17392
|
+
var _typeMap$type8, _typeMap$type9;
|
|
17393
|
+
var targetOrder = orders.find(function (oItem) {
|
|
17394
|
+
var _typeMap$type7;
|
|
17395
|
+
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17396
|
+
});
|
|
17397
|
+
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];
|
|
17398
|
+
}
|
|
17399
|
+
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]), {}, {
|
|
17400
|
+
showOrderInfo: showOrderInfo,
|
|
17401
|
+
orders: orders
|
|
17402
|
+
}))));
|
|
17403
|
+
});
|
|
17404
|
+
case 1:
|
|
17405
|
+
case "end":
|
|
17406
|
+
return _context.stop();
|
|
17407
|
+
}
|
|
17408
|
+
}, _callee);
|
|
17409
|
+
}));
|
|
17410
|
+
return function getOrderList(_x) {
|
|
17411
|
+
return _ref.apply(this, arguments);
|
|
17412
|
+
};
|
|
17413
|
+
}();
|
|
17414
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17415
|
+
var _typeMap$type12;
|
|
17416
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17417
|
+
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17418
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17419
|
+
var newValue = _objectSpread2({}, value);
|
|
17420
|
+
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17421
|
+
if (typeName === '1') {
|
|
17422
|
+
var _typeMap$type13;
|
|
17423
|
+
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17424
|
+
mode: isStrict
|
|
17425
|
+
});
|
|
17426
|
+
} else if (typeName === '2') {
|
|
17427
|
+
var _typeMap$type14;
|
|
17428
|
+
// 切换到非原单,清空列表
|
|
17429
|
+
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17430
|
+
}
|
|
17431
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17432
|
+
};
|
|
17433
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17434
|
+
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17435
|
+
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';
|
|
17436
|
+
setIsStrict(mode);
|
|
17437
|
+
if (!isOriginalOrder) return;
|
|
17438
|
+
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({
|
|
17439
|
+
mode: mode
|
|
17440
|
+
}))));
|
|
17441
|
+
};
|
|
17442
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17443
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17444
|
+
var mode = _ref3.mode,
|
|
17445
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17446
|
+
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];
|
|
17447
|
+
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];
|
|
17448
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17449
|
+
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17450
|
+
});
|
|
17451
|
+
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) : [];
|
|
17452
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17453
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17454
|
+
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17455
|
+
}) : goodDetails;
|
|
17456
|
+
};
|
|
17457
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17458
|
+
var _typeMap$type20;
|
|
17459
|
+
var newValue = _objectSpread2({}, value);
|
|
17460
|
+
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 || [];
|
|
17461
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17462
|
+
};
|
|
17463
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17464
|
+
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17465
|
+
var newValue = _objectSpread2({}, value);
|
|
17466
|
+
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;
|
|
17467
|
+
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) {
|
|
17468
|
+
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17469
|
+
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) || [];
|
|
17470
|
+
var targetOrder = val && orders.find(function (oItem) {
|
|
17471
|
+
var _typeMap$type24;
|
|
17472
|
+
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17473
|
+
});
|
|
17474
|
+
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];
|
|
17475
|
+
}
|
|
17476
|
+
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])) {
|
|
17477
|
+
var _typeMap$type28;
|
|
17478
|
+
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)] = [];
|
|
17479
|
+
} 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])) {
|
|
17480
|
+
var _typeMap$type30;
|
|
17481
|
+
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({
|
|
17482
|
+
mode: isStrict,
|
|
17483
|
+
sysOrderNo: val
|
|
17484
|
+
});
|
|
17485
|
+
}
|
|
17486
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17487
|
+
};
|
|
17488
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17489
|
+
var showChangeBtn = useMemo(function () {
|
|
17490
|
+
var _typeMap$type31;
|
|
17491
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17492
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17493
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17494
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17495
|
+
var newValue = _objectSpread2({}, value);
|
|
17496
|
+
// 原订单商品
|
|
17497
|
+
var originTradeGoodList = getGoodDetails({
|
|
17498
|
+
mode: isStrict
|
|
17499
|
+
}) || [];
|
|
17500
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17501
|
+
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)]) || [];
|
|
17502
|
+
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) {
|
|
17503
|
+
return skuList.includes(item.uuid);
|
|
17504
|
+
});
|
|
17505
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17506
|
+
}, [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]);
|
|
17507
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17508
|
+
gutter: 8,
|
|
17509
|
+
wrap: true,
|
|
17510
|
+
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())
|
|
17511
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
17512
|
+
className: "gutter-row",
|
|
17513
|
+
xs: {
|
|
17514
|
+
span: 11
|
|
17515
|
+
},
|
|
17516
|
+
sm: {
|
|
17517
|
+
span: 6
|
|
17518
|
+
}
|
|
17519
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
17520
|
+
style: {
|
|
17521
|
+
marginBottom: '8px'
|
|
17522
|
+
},
|
|
17523
|
+
disabled: disabled,
|
|
17524
|
+
allowClear: false,
|
|
17525
|
+
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)],
|
|
17526
|
+
onChange: function onChange(val) {
|
|
17527
|
+
return changeSystemOrderHandle(val);
|
|
17528
|
+
},
|
|
17529
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17530
|
+
}, ((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) {
|
|
17531
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17532
|
+
key: item[typeMap$2[type].oIdKey],
|
|
17533
|
+
value: item[typeMap$2[type].oIdKey],
|
|
17534
|
+
label: item[typeMap$2[type].oIdKey]
|
|
17535
|
+
}, item[typeMap$2[type].oIdKey]);
|
|
17536
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17537
|
+
className: "gutter-row",
|
|
17538
|
+
xs: {
|
|
17539
|
+
span: 11
|
|
17540
|
+
},
|
|
17541
|
+
sm: {
|
|
17542
|
+
span: 6
|
|
17543
|
+
}
|
|
17544
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17545
|
+
style: {
|
|
17546
|
+
marginBottom: '8px'
|
|
17547
|
+
},
|
|
17548
|
+
disabled: disabled,
|
|
17549
|
+
allowClear: false,
|
|
17550
|
+
options: reasonList,
|
|
17551
|
+
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)],
|
|
17552
|
+
onChange: function onChange(val) {
|
|
17553
|
+
return changeTypeHandle(val);
|
|
17554
|
+
}
|
|
17555
|
+
})), (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, {
|
|
17556
|
+
className: "gutter-row",
|
|
17557
|
+
xs: {
|
|
17558
|
+
span: 11
|
|
17559
|
+
},
|
|
17560
|
+
sm: {
|
|
17561
|
+
span: 6
|
|
17562
|
+
}
|
|
17563
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
17564
|
+
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)],
|
|
17565
|
+
disabled: disabled,
|
|
17566
|
+
readOnly: true
|
|
17567
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17568
|
+
key: 'reissueGoods'
|
|
17569
|
+
}, other), {}, {
|
|
17570
|
+
type: type,
|
|
17571
|
+
disabled: disabled,
|
|
17572
|
+
canUpdateNumber: showChangeBtn,
|
|
17573
|
+
showChangeBtn: showChangeBtn,
|
|
17574
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17575
|
+
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)],
|
|
17576
|
+
onChange: function onChange(val) {
|
|
17577
|
+
return changeGoodHandle(val);
|
|
17578
|
+
},
|
|
17579
|
+
onModeChange: handleModeChange,
|
|
17580
|
+
showModeBtn: false,
|
|
17581
|
+
isStrict: isStrict,
|
|
17582
|
+
tradeGoods: {
|
|
17583
|
+
originDataSource: getGoodDetails({
|
|
17584
|
+
mode: isStrict
|
|
17585
|
+
}),
|
|
17586
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17587
|
+
}
|
|
17588
|
+
})));
|
|
17589
|
+
};
|
|
17590
|
+
|
|
16617
17591
|
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";
|
|
16618
17592
|
styleInject(css_248z$a);
|
|
16619
17593
|
|
|
@@ -17090,12 +18064,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
17090
18064
|
};
|
|
17091
18065
|
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
17092
18066
|
|
|
17093
|
-
var _excluded$
|
|
18067
|
+
var _excluded$i = ["onChange", "value", "failValue"];
|
|
17094
18068
|
function CommonStatus(props) {
|
|
17095
18069
|
var onChange = props.onChange,
|
|
17096
18070
|
value = props.value,
|
|
17097
18071
|
failValue = props.failValue,
|
|
17098
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18072
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
17099
18073
|
var changeHandle = function changeHandle(val) {
|
|
17100
18074
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
17101
18075
|
status: val,
|
|
@@ -17135,10 +18109,15 @@ var typeInitValueMap$1 = {
|
|
|
17135
18109
|
initValue: [{
|
|
17136
18110
|
billNo: ''
|
|
17137
18111
|
}]
|
|
18112
|
+
},
|
|
18113
|
+
5: {
|
|
18114
|
+
initValue: [{
|
|
18115
|
+
billNo: ''
|
|
18116
|
+
}]
|
|
17138
18117
|
}
|
|
17139
18118
|
};
|
|
17140
18119
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
17141
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18120
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5;
|
|
17142
18121
|
var _props$value = props.value,
|
|
17143
18122
|
value = _props$value === void 0 ? [] : _props$value,
|
|
17144
18123
|
onChange = props.onChange,
|
|
@@ -17160,7 +18139,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
17160
18139
|
maxHeight: '300px',
|
|
17161
18140
|
overflowY: 'auto'
|
|
17162
18141
|
}
|
|
17163
|
-
}, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
18142
|
+
}, [1, 2, 3, 4, 5].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
17164
18143
|
};
|
|
17165
18144
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
17166
18145
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -17217,10 +18196,17 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
17217
18196
|
return changeInputHandle(e.target.value, 'billNo');
|
|
17218
18197
|
},
|
|
17219
18198
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18199
|
+
})) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
18200
|
+
disabled: disabled,
|
|
18201
|
+
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18202
|
+
onChange: function onChange(e) {
|
|
18203
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
18204
|
+
},
|
|
18205
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
17220
18206
|
})) : null) : null);
|
|
17221
18207
|
};
|
|
17222
18208
|
|
|
17223
|
-
var _excluded$
|
|
18209
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
17224
18210
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
17225
18211
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
17226
18212
|
var _props$value = props.value,
|
|
@@ -17230,7 +18216,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
17230
18216
|
failValue = props.failValue,
|
|
17231
18217
|
_props$type = props.type,
|
|
17232
18218
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
17233
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18219
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
17234
18220
|
var _useState = useState(0),
|
|
17235
18221
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17236
18222
|
changeIndex = _useState2[0],
|
|
@@ -17296,7 +18282,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
17296
18282
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
17297
18283
|
};
|
|
17298
18284
|
|
|
17299
|
-
var _excluded$
|
|
18285
|
+
var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
|
|
17300
18286
|
var MsgStatus = function MsgStatus(props) {
|
|
17301
18287
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
17302
18288
|
var _props$value = props.value,
|
|
@@ -17306,7 +18292,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
17306
18292
|
failValue = props.failValue,
|
|
17307
18293
|
_props$type = props.type,
|
|
17308
18294
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
17309
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18295
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
17310
18296
|
var _useState = useState(0),
|
|
17311
18297
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17312
18298
|
changeIndex = _useState2[0],
|
|
@@ -17337,7 +18323,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
17337
18323
|
onClick: function onClick() {
|
|
17338
18324
|
return setChangeIndex(index);
|
|
17339
18325
|
}
|
|
17340
|
-
}, msgTypeCh[key], item.ruleName);
|
|
18326
|
+
}, msgTypeCh[key] || key, item.ruleName);
|
|
17341
18327
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
17342
18328
|
showSearch: true,
|
|
17343
18329
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -17375,8 +18361,8 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
17375
18361
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
17376
18362
|
};
|
|
17377
18363
|
|
|
17378
|
-
var _excluded$
|
|
17379
|
-
var typeMap$
|
|
18364
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
18365
|
+
var typeMap$3 = {
|
|
17380
18366
|
BS_E3_REISSUE_GOODS: {
|
|
17381
18367
|
key: 'bsE3ReissueGoods',
|
|
17382
18368
|
typeName: 'bsE3ReissueType',
|
|
@@ -17393,7 +18379,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17393
18379
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17394
18380
|
disabled = props.disabled,
|
|
17395
18381
|
type = props.type,
|
|
17396
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18382
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17397
18383
|
var getOrderFlag = useRef(false);
|
|
17398
18384
|
var _useState = useState(false),
|
|
17399
18385
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17402,10 +18388,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17402
18388
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17403
18389
|
useEffect(function () {
|
|
17404
18390
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17405
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
18391
|
+
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)) {
|
|
17406
18392
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17407
18393
|
getOrderFlag.current = true;
|
|
17408
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
18394
|
+
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);
|
|
17409
18395
|
}
|
|
17410
18396
|
return;
|
|
17411
18397
|
}, [value]);
|
|
@@ -17429,7 +18415,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17429
18415
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17430
18416
|
while (1) switch (_context.prev = _context.next) {
|
|
17431
18417
|
case 0:
|
|
17432
|
-
(_typeMap$type4 = typeMap$
|
|
18418
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17433
18419
|
var _typeMap$type5, _typeMap$type6;
|
|
17434
18420
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
17435
18421
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -17438,7 +18424,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17438
18424
|
billNo: orderSn
|
|
17439
18425
|
};
|
|
17440
18426
|
});
|
|
17441
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
18427
|
+
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]), {}, {
|
|
17442
18428
|
showOrderInfo: showOrderInfo,
|
|
17443
18429
|
orders: orders
|
|
17444
18430
|
}))));
|
|
@@ -17459,25 +18445,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17459
18445
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17460
18446
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17461
18447
|
var newValue = _objectSpread2({}, value);
|
|
17462
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
18448
|
+
newValue[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
17463
18449
|
if (typeName === '1') {
|
|
17464
18450
|
var _typeMap$type8;
|
|
17465
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
18451
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
17466
18452
|
mode: isStrict
|
|
17467
18453
|
});
|
|
17468
18454
|
} else if (typeName === '2') {
|
|
17469
18455
|
var _typeMap$type9;
|
|
17470
18456
|
// 切换到非原单,清空列表
|
|
17471
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
18457
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
17472
18458
|
}
|
|
17473
18459
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17474
18460
|
};
|
|
17475
18461
|
var handleModeChange = function handleModeChange(mode) {
|
|
17476
18462
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
17477
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$
|
|
18463
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
17478
18464
|
setIsStrict(mode);
|
|
17479
18465
|
if (!isOriginalOrder) return;
|
|
17480
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$
|
|
18466
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
|
|
17481
18467
|
mode: mode
|
|
17482
18468
|
}))));
|
|
17483
18469
|
};
|
|
@@ -17485,8 +18471,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17485
18471
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
17486
18472
|
var mode = _ref3.mode,
|
|
17487
18473
|
sysOrderNo = _ref3.sysOrderNo;
|
|
17488
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
17489
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18474
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
|
|
18475
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
|
|
17490
18476
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17491
18477
|
return order.orderSn === systemOrderNo;
|
|
17492
18478
|
});
|
|
@@ -17499,19 +18485,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17499
18485
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17500
18486
|
var _typeMap$type14;
|
|
17501
18487
|
var newValue = _objectSpread2({}, value);
|
|
17502
|
-
newValue["".concat(typeMap$
|
|
18488
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
|
|
17503
18489
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17504
18490
|
};
|
|
17505
18491
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17506
18492
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
17507
18493
|
var newValue = _objectSpread2({}, value);
|
|
17508
|
-
newValue["".concat(typeMap$
|
|
17509
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$
|
|
18494
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
|
|
18495
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
17510
18496
|
var _typeMap$type17;
|
|
17511
|
-
newValue["".concat(typeMap$
|
|
17512
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$
|
|
18497
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
|
|
18498
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
17513
18499
|
var _typeMap$type19;
|
|
17514
|
-
newValue["".concat(typeMap$
|
|
18500
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
|
|
17515
18501
|
mode: isStrict,
|
|
17516
18502
|
sysOrderNo: val
|
|
17517
18503
|
});
|
|
@@ -17521,8 +18507,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17521
18507
|
//显示选择商品按钮 原单换不显示选择商品
|
|
17522
18508
|
var showChangeBtn = useMemo(function () {
|
|
17523
18509
|
var _typeMap$type20;
|
|
17524
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
17525
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$
|
|
18510
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
18511
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
17526
18512
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17527
18513
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
17528
18514
|
var newValue = _objectSpread2({}, value);
|
|
@@ -17531,12 +18517,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17531
18517
|
mode: isStrict
|
|
17532
18518
|
}) || [];
|
|
17533
18519
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17534
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17535
|
-
newValue["".concat(typeMap$
|
|
18520
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
18521
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17536
18522
|
return skuList.includes(item.uuid);
|
|
17537
18523
|
});
|
|
17538
18524
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17539
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18525
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
17540
18526
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17541
18527
|
gutter: 8,
|
|
17542
18528
|
wrap: true,
|
|
@@ -17555,12 +18541,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17555
18541
|
},
|
|
17556
18542
|
disabled: disabled,
|
|
17557
18543
|
allowClear: false,
|
|
17558
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18544
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
17559
18545
|
onChange: function onChange(val) {
|
|
17560
18546
|
return changeSystemOrderHandle(val);
|
|
17561
18547
|
},
|
|
17562
18548
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17563
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$
|
|
18549
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
17564
18550
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17565
18551
|
key: item.billNo,
|
|
17566
18552
|
value: item.billNo,
|
|
@@ -17581,7 +18567,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17581
18567
|
disabled: disabled,
|
|
17582
18568
|
allowClear: false,
|
|
17583
18569
|
options: reasonList,
|
|
17584
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18570
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
17585
18571
|
onChange: function onChange(val) {
|
|
17586
18572
|
return changeTypeHandle(val);
|
|
17587
18573
|
}
|
|
@@ -17593,7 +18579,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17593
18579
|
canUpdateNumber: showChangeBtn,
|
|
17594
18580
|
showChangeBtn: showChangeBtn,
|
|
17595
18581
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17596
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18582
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
17597
18583
|
onChange: function onChange(val) {
|
|
17598
18584
|
return changeGoodHandle(val);
|
|
17599
18585
|
},
|
|
@@ -17609,9 +18595,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
17609
18595
|
})));
|
|
17610
18596
|
};
|
|
17611
18597
|
|
|
17612
|
-
var _excluded$
|
|
18598
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17613
18599
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17614
|
-
var typeMap$
|
|
18600
|
+
var typeMap$4 = {
|
|
17615
18601
|
GY_REISSUE_GOODS: {
|
|
17616
18602
|
key: 'gyReissueGoods',
|
|
17617
18603
|
name: '管易',
|
|
@@ -17638,7 +18624,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17638
18624
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17639
18625
|
disabled = props.disabled,
|
|
17640
18626
|
type = props.type,
|
|
17641
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
18627
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
17642
18628
|
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) {
|
|
17643
18629
|
var _order$platformCode;
|
|
17644
18630
|
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
@@ -17650,10 +18636,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
17650
18636
|
setIsStrict = _useState2[1];
|
|
17651
18637
|
useEffect(function () {
|
|
17652
18638
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17653
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
18639
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
17654
18640
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17655
18641
|
getOrderFlag.current = true;
|
|
17656
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
18642
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
17657
18643
|
}
|
|
17658
18644
|
return;
|
|
17659
18645
|
}, [value]);
|
|
@@ -17663,7 +18649,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17663
18649
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17664
18650
|
while (1) switch (_context.prev = _context.next) {
|
|
17665
18651
|
case 0:
|
|
17666
|
-
(_typeMap$type4 = typeMap$
|
|
18652
|
+
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17667
18653
|
var _typeMap$type5, _typeMap$type6;
|
|
17668
18654
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17669
18655
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -17682,7 +18668,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17682
18668
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17683
18669
|
});
|
|
17684
18670
|
});
|
|
17685
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
18671
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
17686
18672
|
showOrderInfo: showOrderInfo,
|
|
17687
18673
|
orders: orders
|
|
17688
18674
|
}))));
|
|
@@ -17700,28 +18686,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
17700
18686
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17701
18687
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17702
18688
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17703
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$
|
|
18689
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
17704
18690
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17705
18691
|
var newValue = _objectSpread2({}, value);
|
|
17706
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
18692
|
+
newValue[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17707
18693
|
if (typeName === '1') {
|
|
17708
18694
|
var _typeMap$type9;
|
|
17709
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
18695
|
+
newValue[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17710
18696
|
mode: isStrict
|
|
17711
18697
|
});
|
|
17712
18698
|
} else if (typeName === '2') {
|
|
17713
18699
|
var _typeMap$type10;
|
|
17714
18700
|
// 切换到非原单,清空列表
|
|
17715
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
18701
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17716
18702
|
}
|
|
17717
18703
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17718
18704
|
};
|
|
17719
18705
|
var handleModeChange = function handleModeChange(mode) {
|
|
17720
18706
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17721
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$
|
|
18707
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
17722
18708
|
setIsStrict(mode);
|
|
17723
18709
|
if (!isOriginalOrder) return;
|
|
17724
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$
|
|
18710
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
17725
18711
|
mode: mode
|
|
17726
18712
|
}))));
|
|
17727
18713
|
};
|
|
@@ -17729,8 +18715,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
17729
18715
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17730
18716
|
var mode = _ref3.mode,
|
|
17731
18717
|
sysOrderNo = _ref3.sysOrderNo;
|
|
17732
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
17733
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$
|
|
18718
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
18719
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
17734
18720
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17735
18721
|
return order.code === systemOrderNo;
|
|
17736
18722
|
});
|
|
@@ -17743,10 +18729,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
17743
18729
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17744
18730
|
var _typeMap$type15;
|
|
17745
18731
|
var newValue = _objectSpread2({}, value);
|
|
17746
|
-
newValue["".concat(typeMap$
|
|
18732
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
17747
18733
|
var _typeMap$type16, _typeMap$type17;
|
|
17748
|
-
item["".concat(typeMap$
|
|
17749
|
-
item["".concat(typeMap$
|
|
18734
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
18735
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
17750
18736
|
return item;
|
|
17751
18737
|
});
|
|
17752
18738
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -17754,13 +18740,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
17754
18740
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17755
18741
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17756
18742
|
var newValue = _objectSpread2({}, value);
|
|
17757
|
-
newValue["".concat(typeMap$
|
|
17758
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$
|
|
18743
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
18744
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
17759
18745
|
var _typeMap$type20;
|
|
17760
|
-
newValue["".concat(typeMap$
|
|
17761
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$
|
|
18746
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
18747
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
17762
18748
|
var _typeMap$type22;
|
|
17763
|
-
newValue["".concat(typeMap$
|
|
18749
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
17764
18750
|
mode: isStrict,
|
|
17765
18751
|
sysOrderNo: val
|
|
17766
18752
|
});
|
|
@@ -17775,18 +18761,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
17775
18761
|
mode: isStrict
|
|
17776
18762
|
}) || [];
|
|
17777
18763
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17778
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17779
|
-
newValue["".concat(typeMap$
|
|
18764
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
18765
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17780
18766
|
return skuList.includes(item.uuid);
|
|
17781
18767
|
});
|
|
17782
|
-
console.log('商品发生变化', newValue["".concat(typeMap$
|
|
18768
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
17783
18769
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17784
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18770
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
17785
18771
|
//显示选择商品按钮 原单换不显示选择商品
|
|
17786
18772
|
var showChangeBtn = useMemo(function () {
|
|
17787
18773
|
var _typeMap$type27;
|
|
17788
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
17789
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$
|
|
18774
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
18775
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17790
18776
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17791
18777
|
gutter: 8,
|
|
17792
18778
|
wrap: true
|
|
@@ -17804,12 +18790,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
17804
18790
|
},
|
|
17805
18791
|
disabled: disabled,
|
|
17806
18792
|
allowClear: false,
|
|
17807
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18793
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
17808
18794
|
onChange: function onChange(val) {
|
|
17809
18795
|
return changeSystemOrderHandle(val);
|
|
17810
18796
|
},
|
|
17811
18797
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17812
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$
|
|
18798
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
17813
18799
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17814
18800
|
key: item.billNo,
|
|
17815
18801
|
value: item.billNo,
|
|
@@ -17830,7 +18816,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17830
18816
|
disabled: disabled,
|
|
17831
18817
|
allowClear: false,
|
|
17832
18818
|
options: reasonList,
|
|
17833
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18819
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
17834
18820
|
onChange: function onChange(val) {
|
|
17835
18821
|
return changeTypeHandle(val);
|
|
17836
18822
|
}
|
|
@@ -17842,7 +18828,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
17842
18828
|
canUpdateNumber: showChangeBtn,
|
|
17843
18829
|
showChangeBtn: showChangeBtn,
|
|
17844
18830
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17845
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18831
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
17846
18832
|
onChange: function onChange(val) {
|
|
17847
18833
|
return changeGoodHandle(val);
|
|
17848
18834
|
},
|
|
@@ -17858,4 +18844,4 @@ var GyReissue = function GyReissue(props) {
|
|
|
17858
18844
|
})));
|
|
17859
18845
|
};
|
|
17860
18846
|
|
|
17861
|
-
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 };
|
|
18847
|
+
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, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
|