@kmkf-fe-packages/basic-components 2.0.12-beta.2 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +443 -1432
- package/dist/index.js +441 -1431
- package/dist/src/bs/SystemOrder/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/package.json +4 -4
- package/dist/src/bs/component/model/JstGoodsModal/GoodsList.d.ts +0 -25
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +0 -13
- package/dist/src/common/Reissue/index.d.ts +0 -3
- package/dist/src/constants/jst.d.ts +0 -3
- package/dist/src/jst/common/index.d.ts +0 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -11008,7 +11008,7 @@ var typeInitValueMap = {
|
|
|
11008
11008
|
}]
|
|
11009
11009
|
};
|
|
11010
11010
|
var jstGoods = function jstGoods(props) {
|
|
11011
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8
|
|
11011
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
11012
11012
|
var _props$value = props.value,
|
|
11013
11013
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11014
11014
|
onChange = props.onChange,
|
|
@@ -11025,8 +11025,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11025
11025
|
changeIndex = _useState2[0],
|
|
11026
11026
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11027
11027
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
11028
|
-
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'
|
|
11029
|
-
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11028
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11030
11029
|
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11031
11030
|
useEffect(function () {
|
|
11032
11031
|
//没有值塞个默认值
|
|
@@ -11038,7 +11037,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11038
11037
|
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11039
11038
|
setChangeIndex(0);
|
|
11040
11039
|
}
|
|
11041
|
-
},
|
|
11040
|
+
}, value);
|
|
11042
11041
|
var content = function content(item, index) {
|
|
11043
11042
|
return /*#__PURE__*/React.createElement("div", {
|
|
11044
11043
|
style: {
|
|
@@ -11066,14 +11065,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11066
11065
|
changeOrderInfo['sendId'] = option.value;
|
|
11067
11066
|
}
|
|
11068
11067
|
if (isSelectName && type === 'sendName') {
|
|
11069
|
-
|
|
11070
|
-
// 如果发货仓名称存的是id,将名称存入快照
|
|
11071
|
-
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11072
|
-
} else {
|
|
11073
|
-
// 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
|
|
11074
|
-
changeOrderInfo['sendSnapshotId'] = option.value;
|
|
11075
|
-
changeOrderInfo['sendName'] = option.label;
|
|
11076
|
-
}
|
|
11068
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11077
11069
|
}
|
|
11078
11070
|
var newList = _toConsumableArray(value);
|
|
11079
11071
|
newList[changeIndex] = changeOrderInfo;
|
|
@@ -11173,7 +11165,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11173
11165
|
showSearch: true,
|
|
11174
11166
|
options: sendOptions,
|
|
11175
11167
|
filterOption: filterOption,
|
|
11176
|
-
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.
|
|
11168
|
+
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11177
11169
|
onChange: function onChange(value, option) {
|
|
11178
11170
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11179
11171
|
}
|
|
@@ -11183,14 +11175,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11183
11175
|
onChange: function onChange(e) {
|
|
11184
11176
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11185
11177
|
},
|
|
11186
|
-
value: (_value$
|
|
11178
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
11187
11179
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11188
11180
|
disabled: disabled,
|
|
11189
11181
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11190
11182
|
onChange: function onChange(e) {
|
|
11191
11183
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11192
11184
|
},
|
|
11193
|
-
value: (_value$
|
|
11185
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
11194
11186
|
})) : null) : null);
|
|
11195
11187
|
};
|
|
11196
11188
|
|
|
@@ -12162,13 +12154,19 @@ var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
|
12162
12154
|
var getTableData$1 = function getTableData(_ref, formData) {
|
|
12163
12155
|
var current = _ref.current,
|
|
12164
12156
|
pageSize = _ref.pageSize;
|
|
12157
|
+
var data = {
|
|
12158
|
+
goodNo: formData.goodNo || null,
|
|
12159
|
+
goodName: formData.goodName || null,
|
|
12160
|
+
skuCode: formData.skuCode || null,
|
|
12161
|
+
skuId: formData.skuId || null
|
|
12162
|
+
};
|
|
12165
12163
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12166
12164
|
method: 'post',
|
|
12167
12165
|
data: _objectSpread2({
|
|
12168
12166
|
pageSize: pageSize,
|
|
12169
12167
|
pageNo: current,
|
|
12170
|
-
platform: '
|
|
12171
|
-
},
|
|
12168
|
+
platform: 'BS_E3_ERP'
|
|
12169
|
+
}, data)
|
|
12172
12170
|
}).then(function (res) {
|
|
12173
12171
|
var _res$data = res.data,
|
|
12174
12172
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -12176,7 +12174,9 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12176
12174
|
_res$data$total = _res$data.total,
|
|
12177
12175
|
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12178
12176
|
var newProducts = productSkuList.map(function (item, index) {
|
|
12179
|
-
return _objectSpread2({}, item)
|
|
12177
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12178
|
+
index: index + 1
|
|
12179
|
+
});
|
|
12180
12180
|
});
|
|
12181
12181
|
return {
|
|
12182
12182
|
total: total,
|
|
@@ -12195,86 +12195,90 @@ var columns$2 = [{
|
|
|
12195
12195
|
}, index + 1);
|
|
12196
12196
|
},
|
|
12197
12197
|
width: 80
|
|
12198
|
+
}, {
|
|
12199
|
+
dataIndex: 'specNo',
|
|
12200
|
+
title: "SKU",
|
|
12201
|
+
ellipsis: true,
|
|
12202
|
+
width: 200
|
|
12203
|
+
}, {
|
|
12204
|
+
dataIndex: 'specId',
|
|
12205
|
+
title: "SKU ID",
|
|
12206
|
+
ellipsis: true,
|
|
12207
|
+
width: 80
|
|
12198
12208
|
}, {
|
|
12199
12209
|
dataIndex: 'goodName',
|
|
12200
|
-
title:
|
|
12201
|
-
|
|
12202
|
-
|
|
12210
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12211
|
+
ellipsis: true,
|
|
12212
|
+
width: 250
|
|
12203
12213
|
}, {
|
|
12214
|
+
dataIndex: 'goodShortName',
|
|
12215
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12216
|
+
ellipsis: true,
|
|
12217
|
+
width: 250
|
|
12218
|
+
},
|
|
12219
|
+
// {
|
|
12220
|
+
// dataIndex: 'goodPicUrl',
|
|
12221
|
+
// title: `商品图片`,
|
|
12222
|
+
// ellipsis: true,
|
|
12223
|
+
// width: 100,
|
|
12224
|
+
// render: (picUrl: string) => {
|
|
12225
|
+
// return (
|
|
12226
|
+
// <img
|
|
12227
|
+
// style={{
|
|
12228
|
+
// width: '40px',
|
|
12229
|
+
// height: '40px',
|
|
12230
|
+
// objectFit: 'contain',
|
|
12231
|
+
// }}
|
|
12232
|
+
// src={picUrl}
|
|
12233
|
+
// ></img>
|
|
12234
|
+
// );
|
|
12235
|
+
// },
|
|
12236
|
+
// },
|
|
12237
|
+
{
|
|
12204
12238
|
dataIndex: 'goodNo',
|
|
12205
|
-
title:
|
|
12206
|
-
|
|
12207
|
-
|
|
12239
|
+
title: "\u8D27\u53F7",
|
|
12240
|
+
ellipsis: true,
|
|
12241
|
+
width: 150
|
|
12208
12242
|
}, {
|
|
12209
|
-
dataIndex: '
|
|
12210
|
-
title:
|
|
12211
|
-
|
|
12212
|
-
|
|
12243
|
+
dataIndex: 'goodId',
|
|
12244
|
+
title: "\u8D27\u53F7ID",
|
|
12245
|
+
ellipsis: true,
|
|
12246
|
+
width: 100
|
|
12213
12247
|
}, {
|
|
12214
|
-
dataIndex: '
|
|
12215
|
-
title:
|
|
12216
|
-
|
|
12217
|
-
|
|
12248
|
+
dataIndex: 'colorName',
|
|
12249
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12250
|
+
ellipsis: true,
|
|
12251
|
+
width: 100
|
|
12218
12252
|
}, {
|
|
12219
|
-
dataIndex: '
|
|
12220
|
-
title:
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
12224
|
-
style: {
|
|
12225
|
-
width: '40px',
|
|
12226
|
-
height: '40px',
|
|
12227
|
-
objectFit: 'contain'
|
|
12228
|
-
},
|
|
12229
|
-
src: picUrl
|
|
12230
|
-
});
|
|
12231
|
-
}
|
|
12253
|
+
dataIndex: 'colorCode',
|
|
12254
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12255
|
+
ellipsis: true,
|
|
12256
|
+
width: 100
|
|
12232
12257
|
}, {
|
|
12233
|
-
dataIndex: '
|
|
12234
|
-
title: "\
|
|
12258
|
+
dataIndex: 'sizeName',
|
|
12259
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12235
12260
|
ellipsis: true,
|
|
12236
|
-
width:
|
|
12261
|
+
width: 100
|
|
12237
12262
|
}, {
|
|
12238
|
-
dataIndex: '
|
|
12239
|
-
title:
|
|
12240
|
-
|
|
12241
|
-
|
|
12263
|
+
dataIndex: 'sizeCode',
|
|
12264
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12265
|
+
ellipsis: true,
|
|
12266
|
+
width: 100
|
|
12242
12267
|
}, {
|
|
12243
|
-
dataIndex: '
|
|
12244
|
-
title: "\
|
|
12268
|
+
dataIndex: 'brandName',
|
|
12269
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12245
12270
|
ellipsis: true,
|
|
12246
|
-
width: 100
|
|
12247
|
-
render: function render(price) {
|
|
12248
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12249
|
-
}
|
|
12271
|
+
width: 100
|
|
12250
12272
|
}, {
|
|
12251
12273
|
dataIndex: 'marketPrice',
|
|
12252
12274
|
title: "\u5E02\u573A\u4EF7",
|
|
12253
12275
|
ellipsis: true,
|
|
12254
|
-
width: 100
|
|
12255
|
-
render: function render(price) {
|
|
12256
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12257
|
-
}
|
|
12258
|
-
}, {
|
|
12259
|
-
dataIndex: 'costPrice',
|
|
12260
|
-
title: "\u6210\u672C\u4EF7",
|
|
12261
|
-
ellipsis: true,
|
|
12262
|
-
width: 100,
|
|
12263
|
-
render: function render(price) {
|
|
12264
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
12265
|
-
}
|
|
12276
|
+
width: 100
|
|
12266
12277
|
}, {
|
|
12267
|
-
dataIndex: '
|
|
12268
|
-
title: "\
|
|
12278
|
+
dataIndex: 'retailPrice',
|
|
12279
|
+
title: "\u552E\u4EF7",
|
|
12269
12280
|
ellipsis: true,
|
|
12270
|
-
width: 100
|
|
12271
|
-
render: function render() {
|
|
12272
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
12273
|
-
return {
|
|
12274
|
-
'combine': '组合装商品',
|
|
12275
|
-
'normal': '普通商品'
|
|
12276
|
-
}[type] || type;
|
|
12277
|
-
}
|
|
12281
|
+
width: 100
|
|
12278
12282
|
}];
|
|
12279
12283
|
var GoodList$1 = function GoodList(props, ref) {
|
|
12280
12284
|
var _useState = useState([]),
|
|
@@ -12308,6 +12312,17 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12308
12312
|
layout: "inline",
|
|
12309
12313
|
form: form
|
|
12310
12314
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12315
|
+
name: "goodNo",
|
|
12316
|
+
style: {
|
|
12317
|
+
marginBottom: '12px'
|
|
12318
|
+
}
|
|
12319
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12320
|
+
placeholder: "\u5546\u54C1\u8D27\u53F7",
|
|
12321
|
+
allowClear: true,
|
|
12322
|
+
style: {
|
|
12323
|
+
width: 150
|
|
12324
|
+
}
|
|
12325
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12311
12326
|
name: "goodName",
|
|
12312
12327
|
style: {
|
|
12313
12328
|
marginBottom: '12px'
|
|
@@ -12319,23 +12334,23 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12319
12334
|
width: 150
|
|
12320
12335
|
}
|
|
12321
12336
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12322
|
-
name: "
|
|
12337
|
+
name: "skuCode",
|
|
12323
12338
|
style: {
|
|
12324
12339
|
marginBottom: '12px'
|
|
12325
12340
|
}
|
|
12326
12341
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
12327
|
-
placeholder: "
|
|
12342
|
+
placeholder: "SKU",
|
|
12328
12343
|
allowClear: true,
|
|
12329
12344
|
style: {
|
|
12330
12345
|
width: 150
|
|
12331
12346
|
}
|
|
12332
12347
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12333
|
-
name: "
|
|
12348
|
+
name: "skuId",
|
|
12334
12349
|
style: {
|
|
12335
12350
|
marginBottom: '12px'
|
|
12336
12351
|
}
|
|
12337
12352
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
12338
|
-
placeholder: "
|
|
12353
|
+
placeholder: "SKU ID",
|
|
12339
12354
|
allowClear: true,
|
|
12340
12355
|
style: {
|
|
12341
12356
|
width: 150
|
|
@@ -12358,50 +12373,41 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12358
12373
|
fixed: true,
|
|
12359
12374
|
onSelect: function onSelect(record, selected) {
|
|
12360
12375
|
if (selected) {
|
|
12361
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record.
|
|
12376
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12362
12377
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12363
12378
|
} else {
|
|
12364
12379
|
setSelectIds(selectIds.filter(function (t) {
|
|
12365
|
-
return t !== record.
|
|
12380
|
+
return t !== record.specNo;
|
|
12366
12381
|
}));
|
|
12367
12382
|
setSelect(selectList.filter(function (t) {
|
|
12368
|
-
return t.
|
|
12383
|
+
return t.specNo !== record.specNo;
|
|
12369
12384
|
}));
|
|
12370
12385
|
}
|
|
12371
12386
|
},
|
|
12372
12387
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12373
12388
|
if (selected) {
|
|
12374
12389
|
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12375
|
-
return t.
|
|
12390
|
+
return t.specNo;
|
|
12376
12391
|
}))));
|
|
12377
12392
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12378
12393
|
} else {
|
|
12379
12394
|
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12380
|
-
return t.
|
|
12395
|
+
return t.specNo;
|
|
12381
12396
|
})));
|
|
12382
12397
|
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12383
|
-
return arrVal.
|
|
12398
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12384
12399
|
});
|
|
12385
12400
|
setSelect(list);
|
|
12386
12401
|
}
|
|
12387
|
-
},
|
|
12388
|
-
getCheckboxProps: function getCheckboxProps(record) {
|
|
12389
|
-
var options = {
|
|
12390
|
-
disabled: (props.selectedRows || []).map(function (row) {
|
|
12391
|
-
return row.goodNo || row.skuId;
|
|
12392
|
-
}).includes(record.goodNo || record.skuId),
|
|
12393
|
-
name: record.goodNo
|
|
12394
|
-
};
|
|
12395
|
-
return options;
|
|
12396
12402
|
}
|
|
12397
12403
|
};
|
|
12398
12404
|
var showTable = function showTable() {
|
|
12399
12405
|
var handleDelete = function handleDelete(record) {
|
|
12400
12406
|
setSelectIds(selectIds.filter(function (t) {
|
|
12401
|
-
return t !== record.
|
|
12407
|
+
return t !== record.specNo;
|
|
12402
12408
|
}));
|
|
12403
12409
|
setSelect(selectList.filter(function (t) {
|
|
12404
|
-
return t.
|
|
12410
|
+
return t.specNo !== record.specNo;
|
|
12405
12411
|
}));
|
|
12406
12412
|
};
|
|
12407
12413
|
var showColumns = [{
|
|
@@ -12425,7 +12431,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12425
12431
|
}
|
|
12426
12432
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
12427
12433
|
columns: showColumns,
|
|
12428
|
-
rowKey: '
|
|
12434
|
+
rowKey: 'specNo',
|
|
12429
12435
|
dataSource: selectList,
|
|
12430
12436
|
scroll: {
|
|
12431
12437
|
x: '100%',
|
|
@@ -12445,7 +12451,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12445
12451
|
}
|
|
12446
12452
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12447
12453
|
rowSelection: rowSelection,
|
|
12448
|
-
rowKey: "
|
|
12454
|
+
rowKey: "specNo",
|
|
12449
12455
|
columns: columns$2,
|
|
12450
12456
|
scroll: {
|
|
12451
12457
|
x: '100%',
|
|
@@ -12462,15 +12468,13 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12462
12468
|
type: "text"
|
|
12463
12469
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12464
12470
|
};
|
|
12465
|
-
var
|
|
12471
|
+
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
|
|
12466
12472
|
|
|
12467
|
-
var
|
|
12473
|
+
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12468
12474
|
useImperativeHandle(ref, function () {
|
|
12469
12475
|
return {
|
|
12470
|
-
open: function open(
|
|
12471
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12476
|
+
open: function open() {
|
|
12472
12477
|
setVisible(true);
|
|
12473
|
-
setSelectedRows(options.value || []);
|
|
12474
12478
|
}
|
|
12475
12479
|
};
|
|
12476
12480
|
});
|
|
@@ -12480,17 +12484,13 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
|
12480
12484
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12481
12485
|
visible = _useState2[0],
|
|
12482
12486
|
setVisible = _useState2[1];
|
|
12483
|
-
var
|
|
12484
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12485
|
-
selectedRows = _useState4[0],
|
|
12486
|
-
setSelectedRows = _useState4[1];
|
|
12487
|
-
var gyGoodsListRef = useRef(null);
|
|
12487
|
+
var bsE3GoodListRef = useRef(null);
|
|
12488
12488
|
var _onCancel = function onCancel() {
|
|
12489
12489
|
setVisible(false);
|
|
12490
12490
|
};
|
|
12491
12491
|
var onOk = function onOk() {
|
|
12492
|
-
var
|
|
12493
|
-
var selectedList = ((
|
|
12492
|
+
var _bsE3GoodListRef$curr;
|
|
12493
|
+
var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
|
|
12494
12494
|
onSubmit(selectedList);
|
|
12495
12495
|
_onCancel();
|
|
12496
12496
|
};
|
|
@@ -12505,29 +12505,28 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
|
12505
12505
|
},
|
|
12506
12506
|
onOk: onOk,
|
|
12507
12507
|
wrapClassName: "goodModal"
|
|
12508
|
-
}, /*#__PURE__*/React.createElement(
|
|
12509
|
-
ref:
|
|
12510
|
-
selectedRows: selectedRows
|
|
12508
|
+
}, /*#__PURE__*/React.createElement(BsE3GoodList, {
|
|
12509
|
+
ref: bsE3GoodListRef
|
|
12511
12510
|
})));
|
|
12512
12511
|
};
|
|
12513
|
-
var
|
|
12512
|
+
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12514
12513
|
|
|
12515
12514
|
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12516
12515
|
var current = _ref.current,
|
|
12517
12516
|
pageSize = _ref.pageSize;
|
|
12518
12517
|
var data = {
|
|
12519
12518
|
goodShortName: formData.goodShortName || null,
|
|
12520
|
-
|
|
12521
|
-
goodName: formData.goodName || null,
|
|
12519
|
+
skuName: formData.skuName || null,
|
|
12522
12520
|
skuCode: formData.skuCode || null,
|
|
12523
|
-
|
|
12521
|
+
goodName: formData.goodName || null,
|
|
12522
|
+
goodNo: formData.goodNo || null
|
|
12524
12523
|
};
|
|
12525
12524
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12526
12525
|
method: 'post',
|
|
12527
12526
|
data: _objectSpread2({
|
|
12528
12527
|
pageSize: pageSize,
|
|
12529
12528
|
pageNo: current,
|
|
12530
|
-
platform: '
|
|
12529
|
+
platform: 'GY_ERP'
|
|
12531
12530
|
}, data)
|
|
12532
12531
|
}).then(function (res) {
|
|
12533
12532
|
var _res$data = res.data,
|
|
@@ -12536,9 +12535,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12536
12535
|
_res$data$total = _res$data.total,
|
|
12537
12536
|
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12538
12537
|
var newProducts = productSkuList.map(function (item, index) {
|
|
12539
|
-
return _objectSpread2(
|
|
12540
|
-
index: index + 1
|
|
12541
|
-
});
|
|
12538
|
+
return _objectSpread2({}, item);
|
|
12542
12539
|
});
|
|
12543
12540
|
return {
|
|
12544
12541
|
total: total,
|
|
@@ -12558,414 +12555,44 @@ var columns$3 = [{
|
|
|
12558
12555
|
},
|
|
12559
12556
|
width: 80
|
|
12560
12557
|
}, {
|
|
12561
|
-
dataIndex: '
|
|
12562
|
-
title:
|
|
12563
|
-
|
|
12564
|
-
|
|
12558
|
+
dataIndex: 'specName',
|
|
12559
|
+
title: 'SKU名称',
|
|
12560
|
+
width: 250,
|
|
12561
|
+
ellipsis: true
|
|
12565
12562
|
}, {
|
|
12566
|
-
dataIndex: '
|
|
12567
|
-
title:
|
|
12568
|
-
|
|
12569
|
-
|
|
12563
|
+
dataIndex: 'specNo',
|
|
12564
|
+
title: 'SKU编码',
|
|
12565
|
+
width: 200,
|
|
12566
|
+
ellipsis: true
|
|
12570
12567
|
}, {
|
|
12571
12568
|
dataIndex: 'goodName',
|
|
12572
|
-
title:
|
|
12573
|
-
|
|
12574
|
-
|
|
12569
|
+
title: '商品名称',
|
|
12570
|
+
width: 250,
|
|
12571
|
+
ellipsis: true
|
|
12575
12572
|
}, {
|
|
12576
12573
|
dataIndex: 'goodShortName',
|
|
12577
12574
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12578
12575
|
ellipsis: true,
|
|
12579
12576
|
width: 250
|
|
12580
|
-
},
|
|
12581
|
-
// {
|
|
12582
|
-
// dataIndex: 'goodPicUrl',
|
|
12583
|
-
// title: `商品图片`,
|
|
12584
|
-
// ellipsis: true,
|
|
12585
|
-
// width: 100,
|
|
12586
|
-
// render: (picUrl: string) => {
|
|
12587
|
-
// return (
|
|
12588
|
-
// <img
|
|
12589
|
-
// style={{
|
|
12590
|
-
// width: '40px',
|
|
12591
|
-
// height: '40px',
|
|
12592
|
-
// objectFit: 'contain',
|
|
12593
|
-
// }}
|
|
12594
|
-
// src={picUrl}
|
|
12595
|
-
// ></img>
|
|
12596
|
-
// );
|
|
12597
|
-
// },
|
|
12598
|
-
// },
|
|
12599
|
-
{
|
|
12577
|
+
}, {
|
|
12600
12578
|
dataIndex: 'goodNo',
|
|
12601
|
-
title:
|
|
12602
|
-
|
|
12603
|
-
|
|
12579
|
+
title: '商品编码',
|
|
12580
|
+
width: 200,
|
|
12581
|
+
ellipsis: true
|
|
12604
12582
|
}, {
|
|
12605
|
-
dataIndex: '
|
|
12606
|
-
title:
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
},
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
width: 100
|
|
12619
|
-
}, {
|
|
12620
|
-
dataIndex: 'sizeName',
|
|
12621
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12622
|
-
ellipsis: true,
|
|
12623
|
-
width: 100
|
|
12624
|
-
}, {
|
|
12625
|
-
dataIndex: 'sizeCode',
|
|
12626
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12627
|
-
ellipsis: true,
|
|
12628
|
-
width: 100
|
|
12629
|
-
}, {
|
|
12630
|
-
dataIndex: 'brandName',
|
|
12631
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
12632
|
-
ellipsis: true,
|
|
12633
|
-
width: 100
|
|
12634
|
-
}, {
|
|
12635
|
-
dataIndex: 'marketPrice',
|
|
12636
|
-
title: "\u5E02\u573A\u4EF7",
|
|
12637
|
-
ellipsis: true,
|
|
12638
|
-
width: 100
|
|
12639
|
-
}, {
|
|
12640
|
-
dataIndex: 'retailPrice',
|
|
12641
|
-
title: "\u552E\u4EF7",
|
|
12642
|
-
ellipsis: true,
|
|
12643
|
-
width: 100
|
|
12644
|
-
}];
|
|
12645
|
-
var GoodList$2 = function GoodList(props, ref) {
|
|
12646
|
-
var _useState = useState([]),
|
|
12647
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12648
|
-
selectList = _useState2[0],
|
|
12649
|
-
setSelect = _useState2[1];
|
|
12650
|
-
var _useState3 = useState([]),
|
|
12651
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
12652
|
-
selectIds = _useState4[0],
|
|
12653
|
-
setSelectIds = _useState4[1];
|
|
12654
|
-
useImperativeHandle(ref, function () {
|
|
12655
|
-
return {
|
|
12656
|
-
getSelectGoodList: function getSelectGoodList() {
|
|
12657
|
-
return selectList;
|
|
12658
|
-
}
|
|
12659
|
-
};
|
|
12660
|
-
});
|
|
12661
|
-
var _Form$useForm = Form.useForm(),
|
|
12662
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12663
|
-
form = _Form$useForm2[0];
|
|
12664
|
-
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
12665
|
-
defaultPageSize: 10,
|
|
12666
|
-
form: form
|
|
12667
|
-
}),
|
|
12668
|
-
tableProps = _useAntdTable.tableProps,
|
|
12669
|
-
search = _useAntdTable.search,
|
|
12670
|
-
params = _useAntdTable.params;
|
|
12671
|
-
var submit = search.submit,
|
|
12672
|
-
reset = search.reset;
|
|
12673
|
-
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12674
|
-
layout: "inline",
|
|
12675
|
-
form: form
|
|
12676
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12677
|
-
name: "goodShortName",
|
|
12678
|
-
style: {
|
|
12679
|
-
marginBottom: '12px'
|
|
12680
|
-
}
|
|
12681
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12682
|
-
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12683
|
-
allowClear: true,
|
|
12684
|
-
style: {
|
|
12685
|
-
width: 150
|
|
12686
|
-
}
|
|
12687
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12688
|
-
name: "goodNo",
|
|
12689
|
-
style: {
|
|
12690
|
-
marginBottom: '12px'
|
|
12691
|
-
}
|
|
12692
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12693
|
-
placeholder: "\u5546\u54C1\u8D27\u53F7",
|
|
12694
|
-
allowClear: true,
|
|
12695
|
-
style: {
|
|
12696
|
-
width: 150
|
|
12697
|
-
}
|
|
12698
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12699
|
-
name: "goodName",
|
|
12700
|
-
style: {
|
|
12701
|
-
marginBottom: '12px'
|
|
12702
|
-
}
|
|
12703
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12704
|
-
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12705
|
-
allowClear: true,
|
|
12706
|
-
style: {
|
|
12707
|
-
width: 150
|
|
12708
|
-
}
|
|
12709
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12710
|
-
name: "skuCode",
|
|
12711
|
-
style: {
|
|
12712
|
-
marginBottom: '12px'
|
|
12713
|
-
}
|
|
12714
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12715
|
-
placeholder: "SKU",
|
|
12716
|
-
allowClear: true,
|
|
12717
|
-
style: {
|
|
12718
|
-
width: 150
|
|
12719
|
-
}
|
|
12720
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12721
|
-
name: "skuId",
|
|
12722
|
-
style: {
|
|
12723
|
-
marginBottom: '12px'
|
|
12724
|
-
}
|
|
12725
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
12726
|
-
placeholder: "SKU ID",
|
|
12727
|
-
allowClear: true,
|
|
12728
|
-
style: {
|
|
12729
|
-
width: 150
|
|
12730
|
-
}
|
|
12731
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12732
|
-
style: {
|
|
12733
|
-
marginBottom: '12px'
|
|
12734
|
-
}
|
|
12735
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
12736
|
-
type: "primary",
|
|
12737
|
-
style: {
|
|
12738
|
-
marginRight: '8px'
|
|
12739
|
-
},
|
|
12740
|
-
onClick: submit
|
|
12741
|
-
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12742
|
-
onClick: reset
|
|
12743
|
-
}, "\u91CD\u7F6E")));
|
|
12744
|
-
var rowSelection = {
|
|
12745
|
-
selectedRowKeys: selectIds,
|
|
12746
|
-
fixed: true,
|
|
12747
|
-
onSelect: function onSelect(record, selected) {
|
|
12748
|
-
if (selected) {
|
|
12749
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12750
|
-
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12751
|
-
} else {
|
|
12752
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12753
|
-
return t !== record.specNo;
|
|
12754
|
-
}));
|
|
12755
|
-
setSelect(selectList.filter(function (t) {
|
|
12756
|
-
return t.specNo !== record.specNo;
|
|
12757
|
-
}));
|
|
12758
|
-
}
|
|
12759
|
-
},
|
|
12760
|
-
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12761
|
-
if (selected) {
|
|
12762
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12763
|
-
return t.specNo;
|
|
12764
|
-
}))));
|
|
12765
|
-
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12766
|
-
} else {
|
|
12767
|
-
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12768
|
-
return t.specNo;
|
|
12769
|
-
})));
|
|
12770
|
-
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12771
|
-
return arrVal.specNo !== othVal.specNo;
|
|
12772
|
-
});
|
|
12773
|
-
setSelect(list);
|
|
12774
|
-
}
|
|
12775
|
-
}
|
|
12776
|
-
};
|
|
12777
|
-
var showTable = function showTable() {
|
|
12778
|
-
var handleDelete = function handleDelete(record) {
|
|
12779
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
12780
|
-
return t !== record.specNo;
|
|
12781
|
-
}));
|
|
12782
|
-
setSelect(selectList.filter(function (t) {
|
|
12783
|
-
return t.specNo !== record.specNo;
|
|
12784
|
-
}));
|
|
12785
|
-
};
|
|
12786
|
-
var showColumns = [{
|
|
12787
|
-
dataIndex: '',
|
|
12788
|
-
title: "\u64CD\u4F5C",
|
|
12789
|
-
ellipsis: true,
|
|
12790
|
-
width: 100,
|
|
12791
|
-
render: function render(val, record) {
|
|
12792
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
12793
|
-
type: "link",
|
|
12794
|
-
onClick: function onClick() {
|
|
12795
|
-
return handleDelete(record);
|
|
12796
|
-
}
|
|
12797
|
-
}, "\u5220\u9664");
|
|
12798
|
-
}
|
|
12799
|
-
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
12800
|
-
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12801
|
-
style: {
|
|
12802
|
-
width: '100%',
|
|
12803
|
-
maxWidth: '387px'
|
|
12804
|
-
}
|
|
12805
|
-
}, /*#__PURE__*/React.createElement(Table, {
|
|
12806
|
-
columns: showColumns,
|
|
12807
|
-
rowKey: 'specNo',
|
|
12808
|
-
dataSource: selectList,
|
|
12809
|
-
scroll: {
|
|
12810
|
-
x: '100%',
|
|
12811
|
-
y: 250
|
|
12812
|
-
},
|
|
12813
|
-
pagination: {
|
|
12814
|
-
size: 'small',
|
|
12815
|
-
total: selectIds.length,
|
|
12816
|
-
pageSize: 10,
|
|
12817
|
-
showSizeChanger: false
|
|
12818
|
-
}
|
|
12819
|
-
})) : null;
|
|
12820
|
-
};
|
|
12821
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12822
|
-
style: {
|
|
12823
|
-
marginTop: '4px'
|
|
12824
|
-
}
|
|
12825
|
-
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12826
|
-
rowSelection: rowSelection,
|
|
12827
|
-
rowKey: "specNo",
|
|
12828
|
-
columns: columns$3,
|
|
12829
|
-
scroll: {
|
|
12830
|
-
x: '100%',
|
|
12831
|
-
y: 250
|
|
12832
|
-
}
|
|
12833
|
-
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12834
|
-
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12835
|
-
return triggerNode.parentElement;
|
|
12836
|
-
},
|
|
12837
|
-
content: showTable(),
|
|
12838
|
-
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12839
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
12840
|
-
danger: true,
|
|
12841
|
-
type: "text"
|
|
12842
|
-
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12843
|
-
};
|
|
12844
|
-
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
12845
|
-
|
|
12846
|
-
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12847
|
-
useImperativeHandle(ref, function () {
|
|
12848
|
-
return {
|
|
12849
|
-
open: function open() {
|
|
12850
|
-
setVisible(true);
|
|
12851
|
-
}
|
|
12852
|
-
};
|
|
12853
|
-
});
|
|
12854
|
-
var onSubmit = props.onSubmit,
|
|
12855
|
-
width = props.width;
|
|
12856
|
-
var _useState = useState(false),
|
|
12857
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12858
|
-
visible = _useState2[0],
|
|
12859
|
-
setVisible = _useState2[1];
|
|
12860
|
-
var bsE3GoodListRef = useRef(null);
|
|
12861
|
-
var _onCancel = function onCancel() {
|
|
12862
|
-
setVisible(false);
|
|
12863
|
-
};
|
|
12864
|
-
var onOk = function onOk() {
|
|
12865
|
-
var _bsE3GoodListRef$curr;
|
|
12866
|
-
var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
|
|
12867
|
-
onSubmit(selectedList);
|
|
12868
|
-
_onCancel();
|
|
12869
|
-
};
|
|
12870
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12871
|
-
title: '选择商品',
|
|
12872
|
-
okText: '确认',
|
|
12873
|
-
cancelText: '取消',
|
|
12874
|
-
visible: visible,
|
|
12875
|
-
width: width || 850,
|
|
12876
|
-
onCancel: function onCancel() {
|
|
12877
|
-
_onCancel();
|
|
12878
|
-
},
|
|
12879
|
-
onOk: onOk,
|
|
12880
|
-
wrapClassName: "goodModal"
|
|
12881
|
-
}, /*#__PURE__*/React.createElement(BsE3GoodList, {
|
|
12882
|
-
ref: bsE3GoodListRef
|
|
12883
|
-
})));
|
|
12884
|
-
};
|
|
12885
|
-
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12886
|
-
|
|
12887
|
-
var getTableData$3 = function getTableData(_ref, formData) {
|
|
12888
|
-
var current = _ref.current,
|
|
12889
|
-
pageSize = _ref.pageSize;
|
|
12890
|
-
var data = {
|
|
12891
|
-
goodShortName: formData.goodShortName || null,
|
|
12892
|
-
skuName: formData.skuName || null,
|
|
12893
|
-
skuCode: formData.skuCode || null,
|
|
12894
|
-
goodName: formData.goodName || null,
|
|
12895
|
-
goodNo: formData.goodNo || null
|
|
12896
|
-
};
|
|
12897
|
-
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12898
|
-
method: 'post',
|
|
12899
|
-
data: _objectSpread2({
|
|
12900
|
-
pageSize: pageSize,
|
|
12901
|
-
pageNo: current,
|
|
12902
|
-
platform: 'GY_ERP'
|
|
12903
|
-
}, data)
|
|
12904
|
-
}).then(function (res) {
|
|
12905
|
-
var _res$data = res.data,
|
|
12906
|
-
_res$data$productSkuL = _res$data.productSkuList,
|
|
12907
|
-
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12908
|
-
_res$data$total = _res$data.total,
|
|
12909
|
-
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12910
|
-
var newProducts = productSkuList.map(function (item, index) {
|
|
12911
|
-
return _objectSpread2({}, item);
|
|
12912
|
-
});
|
|
12913
|
-
return {
|
|
12914
|
-
total: total,
|
|
12915
|
-
list: newProducts
|
|
12916
|
-
};
|
|
12917
|
-
});
|
|
12918
|
-
};
|
|
12919
|
-
var columns$4 = [{
|
|
12920
|
-
dataIndex: 'index',
|
|
12921
|
-
title: 'NO',
|
|
12922
|
-
render: function render(val, record, index) {
|
|
12923
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
12924
|
-
style: {
|
|
12925
|
-
width: 25
|
|
12926
|
-
}
|
|
12927
|
-
}, index + 1);
|
|
12928
|
-
},
|
|
12929
|
-
width: 80
|
|
12930
|
-
}, {
|
|
12931
|
-
dataIndex: 'specName',
|
|
12932
|
-
title: 'SKU名称',
|
|
12933
|
-
width: 250,
|
|
12934
|
-
ellipsis: true
|
|
12935
|
-
}, {
|
|
12936
|
-
dataIndex: 'specNo',
|
|
12937
|
-
title: 'SKU编码',
|
|
12938
|
-
width: 200,
|
|
12939
|
-
ellipsis: true
|
|
12940
|
-
}, {
|
|
12941
|
-
dataIndex: 'goodName',
|
|
12942
|
-
title: '商品名称',
|
|
12943
|
-
width: 250,
|
|
12944
|
-
ellipsis: true
|
|
12945
|
-
}, {
|
|
12946
|
-
dataIndex: 'goodShortName',
|
|
12947
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12948
|
-
ellipsis: true,
|
|
12949
|
-
width: 250
|
|
12950
|
-
}, {
|
|
12951
|
-
dataIndex: 'goodNo',
|
|
12952
|
-
title: '商品编码',
|
|
12953
|
-
width: 200,
|
|
12954
|
-
ellipsis: true
|
|
12955
|
-
}, {
|
|
12956
|
-
dataIndex: 'goodPicUrl',
|
|
12957
|
-
title: '商品图片',
|
|
12958
|
-
width: 100,
|
|
12959
|
-
render: function render(picUrl) {
|
|
12960
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
12961
|
-
style: {
|
|
12962
|
-
width: '40px',
|
|
12963
|
-
height: '40px',
|
|
12964
|
-
objectFit: 'contain'
|
|
12965
|
-
},
|
|
12966
|
-
src: picUrl
|
|
12967
|
-
});
|
|
12968
|
-
}
|
|
12583
|
+
dataIndex: 'goodPicUrl',
|
|
12584
|
+
title: '商品图片',
|
|
12585
|
+
width: 100,
|
|
12586
|
+
render: function render(picUrl) {
|
|
12587
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
12588
|
+
style: {
|
|
12589
|
+
width: '40px',
|
|
12590
|
+
height: '40px',
|
|
12591
|
+
objectFit: 'contain'
|
|
12592
|
+
},
|
|
12593
|
+
src: picUrl
|
|
12594
|
+
});
|
|
12595
|
+
}
|
|
12969
12596
|
}, {
|
|
12970
12597
|
dataIndex: 'brandName',
|
|
12971
12598
|
title: '品牌名称',
|
|
@@ -12982,7 +12609,7 @@ var columns$4 = [{
|
|
|
12982
12609
|
ellipsis: true,
|
|
12983
12610
|
width: 100
|
|
12984
12611
|
}];
|
|
12985
|
-
var GoodList$
|
|
12612
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12986
12613
|
var _useState = useState([]),
|
|
12987
12614
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12988
12615
|
selectList = _useState2[0],
|
|
@@ -13001,7 +12628,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13001
12628
|
var _Form$useForm = Form.useForm(),
|
|
13002
12629
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13003
12630
|
form = _Form$useForm2[0];
|
|
13004
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
12631
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
13005
12632
|
defaultPageSize: 10,
|
|
13006
12633
|
form: form
|
|
13007
12634
|
}),
|
|
@@ -13136,7 +12763,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13136
12763
|
}
|
|
13137
12764
|
}, "\u5220\u9664");
|
|
13138
12765
|
}
|
|
13139
|
-
}].concat(takeRight(columns$
|
|
12766
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
13140
12767
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
13141
12768
|
style: {
|
|
13142
12769
|
width: '100%',
|
|
@@ -13165,7 +12792,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13165
12792
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13166
12793
|
rowSelection: rowSelection,
|
|
13167
12794
|
rowKey: "specNo",
|
|
13168
|
-
columns: columns$
|
|
12795
|
+
columns: columns$3,
|
|
13169
12796
|
scroll: {
|
|
13170
12797
|
x: '100%',
|
|
13171
12798
|
y: 250
|
|
@@ -13181,9 +12808,9 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13181
12808
|
type: "text"
|
|
13182
12809
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13183
12810
|
};
|
|
13184
|
-
var GyGoodsList
|
|
12811
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
13185
12812
|
|
|
13186
|
-
var GyGoodsModal
|
|
12813
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
13187
12814
|
useImperativeHandle(ref, function () {
|
|
13188
12815
|
return {
|
|
13189
12816
|
open: function open() {
|
|
@@ -13218,11 +12845,11 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13218
12845
|
},
|
|
13219
12846
|
onOk: onOk,
|
|
13220
12847
|
wrapClassName: "goodModal"
|
|
13221
|
-
}, /*#__PURE__*/React.createElement(GyGoodsList
|
|
12848
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
13222
12849
|
ref: gyGoodsListRef
|
|
13223
12850
|
})));
|
|
13224
12851
|
};
|
|
13225
|
-
var GyGoodsModal$
|
|
12852
|
+
var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
13226
12853
|
|
|
13227
12854
|
var getColumns = function getColumns(_ref) {
|
|
13228
12855
|
var _ref$text = _ref.text,
|
|
@@ -14172,284 +13799,10 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14172
13799
|
title: "SKU\u7F16\u7801",
|
|
14173
13800
|
align: 'center',
|
|
14174
13801
|
ellipsis: true,
|
|
14175
|
-
width: 150
|
|
14176
|
-
}, {
|
|
14177
|
-
dataIndex: 'qty',
|
|
14178
|
-
title: "\u6570\u91CF",
|
|
14179
|
-
width: 100,
|
|
14180
|
-
render: function render(val, record, index) {
|
|
14181
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14182
|
-
style: {
|
|
14183
|
-
width: 70
|
|
14184
|
-
},
|
|
14185
|
-
value: val,
|
|
14186
|
-
min: 1,
|
|
14187
|
-
precision: 0,
|
|
14188
|
-
onChange: function onChange(num) {
|
|
14189
|
-
updateDataHandle({
|
|
14190
|
-
qty: num,
|
|
14191
|
-
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
14192
|
-
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
14193
|
-
}, index);
|
|
14194
|
-
}
|
|
14195
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14196
|
-
}
|
|
14197
|
-
}, {
|
|
14198
|
-
dataIndex: 'price',
|
|
14199
|
-
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
14200
|
-
width: 150,
|
|
14201
|
-
render: function render(val, record, index) {
|
|
14202
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14203
|
-
style: {
|
|
14204
|
-
width: 130
|
|
14205
|
-
},
|
|
14206
|
-
value: val,
|
|
14207
|
-
min: 0,
|
|
14208
|
-
precision: 2,
|
|
14209
|
-
onChange: function onChange(num) {
|
|
14210
|
-
updateDataHandle({
|
|
14211
|
-
price: num,
|
|
14212
|
-
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
14213
|
-
}, index);
|
|
14214
|
-
}
|
|
14215
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14216
|
-
}
|
|
14217
|
-
}, {
|
|
14218
|
-
dataIndex: 'amount',
|
|
14219
|
-
title: "\u5B9E\u9645\u91D1\u989D",
|
|
14220
|
-
width: 150
|
|
14221
|
-
}, {
|
|
14222
|
-
dataIndex: 'originPrice',
|
|
14223
|
-
title: "\u6807\u51C6\u5355\u4EF7",
|
|
14224
|
-
width: 150
|
|
14225
|
-
}, {
|
|
14226
|
-
dataIndex: 'originAmount',
|
|
14227
|
-
title: "\u6807\u51C6\u91D1\u989D",
|
|
14228
|
-
width: 150
|
|
14229
|
-
}, {
|
|
14230
|
-
dataIndex: 'discountFee',
|
|
14231
|
-
title: "\u8BA9\u5229\u91D1\u989D",
|
|
14232
|
-
width: 150
|
|
14233
|
-
}, {
|
|
14234
|
-
dataIndex: 'amountAfter',
|
|
14235
|
-
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
14236
|
-
width: 150
|
|
14237
|
-
}, {
|
|
14238
|
-
dataIndex: 'cancel',
|
|
14239
|
-
title: "\u662F\u5426\u53D6\u6D88",
|
|
14240
|
-
width: 150,
|
|
14241
|
-
render: function render(val) {
|
|
14242
|
-
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14243
|
-
}
|
|
14244
|
-
}, {
|
|
14245
|
-
dataIndex: 'isGift',
|
|
14246
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
14247
|
-
width: 150,
|
|
14248
|
-
render: function render(val, record, index) {
|
|
14249
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14250
|
-
value: val,
|
|
14251
|
-
onChange: function onChange(value) {
|
|
14252
|
-
updateHandle(value, index, 'isGift');
|
|
14253
|
-
},
|
|
14254
|
-
options: [{
|
|
14255
|
-
label: '是',
|
|
14256
|
-
value: 1
|
|
14257
|
-
}, {
|
|
14258
|
-
label: '否',
|
|
14259
|
-
value: 0
|
|
14260
|
-
}]
|
|
14261
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14262
|
-
}
|
|
14263
|
-
}, {
|
|
14264
|
-
dataIndex: 'skuNote',
|
|
14265
|
-
title: "\u5546\u54C1\u5907\u6CE8",
|
|
14266
|
-
width: 150
|
|
14267
|
-
}].map(function (item) {
|
|
14268
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14269
|
-
align: 'center',
|
|
14270
|
-
ellipsis: true
|
|
14271
|
-
});
|
|
14272
|
-
}),
|
|
14273
|
-
//管易补发商品信息
|
|
14274
|
-
GY_REISSUE_GOODS: [{
|
|
14275
|
-
dataIndex: 'goodName',
|
|
14276
|
-
title: "\u5546\u54C1\u540D\u79F0",
|
|
14277
|
-
width: 150
|
|
14278
|
-
}, {
|
|
14279
|
-
dataIndex: 'goodShortName',
|
|
14280
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
14281
|
-
width: 150
|
|
14282
|
-
}, {
|
|
14283
|
-
dataIndex: 'goodNo',
|
|
14284
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
14285
|
-
width: 200
|
|
14286
|
-
}, {
|
|
14287
|
-
dataIndex: 'specName',
|
|
14288
|
-
title: "SKU\u540D\u79F0",
|
|
14289
|
-
align: 'center',
|
|
14290
|
-
ellipsis: true,
|
|
14291
|
-
width: 250
|
|
14292
|
-
}, {
|
|
14293
|
-
dataIndex: 'specNo',
|
|
14294
|
-
title: "SKU\u7F16\u7801",
|
|
14295
|
-
align: 'center',
|
|
14296
|
-
ellipsis: true,
|
|
14297
|
-
width: 150
|
|
14298
|
-
}, {
|
|
14299
|
-
dataIndex: 'qty',
|
|
14300
|
-
title: "\u6570\u91CF",
|
|
14301
|
-
width: 100,
|
|
14302
|
-
render: function render(val, record, index) {
|
|
14303
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14304
|
-
style: {
|
|
14305
|
-
width: 70
|
|
14306
|
-
},
|
|
14307
|
-
value: val,
|
|
14308
|
-
min: 1,
|
|
14309
|
-
precision: 0,
|
|
14310
|
-
onChange: function onChange(num) {
|
|
14311
|
-
updateDataHandle({
|
|
14312
|
-
qty: num,
|
|
14313
|
-
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
14314
|
-
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
14315
|
-
}, index);
|
|
14316
|
-
}
|
|
14317
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14318
|
-
}
|
|
14319
|
-
}, {
|
|
14320
|
-
dataIndex: 'price',
|
|
14321
|
-
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
14322
|
-
width: 150,
|
|
14323
|
-
render: function render(val, record, index) {
|
|
14324
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14325
|
-
style: {
|
|
14326
|
-
width: 130
|
|
14327
|
-
},
|
|
14328
|
-
value: val,
|
|
14329
|
-
min: 0,
|
|
14330
|
-
precision: 2,
|
|
14331
|
-
onChange: function onChange(num) {
|
|
14332
|
-
updateDataHandle({
|
|
14333
|
-
price: num,
|
|
14334
|
-
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
14335
|
-
}, index);
|
|
14336
|
-
}
|
|
14337
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14338
|
-
}
|
|
14339
|
-
}, {
|
|
14340
|
-
dataIndex: 'amount',
|
|
14341
|
-
title: "\u5B9E\u9645\u91D1\u989D",
|
|
14342
|
-
width: 150
|
|
14343
|
-
}, {
|
|
14344
|
-
dataIndex: 'originPrice',
|
|
14345
|
-
title: "\u6807\u51C6\u5355\u4EF7",
|
|
14346
|
-
width: 150
|
|
14347
|
-
}, {
|
|
14348
|
-
dataIndex: 'originAmount',
|
|
14349
|
-
title: "\u6807\u51C6\u91D1\u989D",
|
|
14350
|
-
width: 150
|
|
14351
|
-
}, {
|
|
14352
|
-
dataIndex: 'isGift',
|
|
14353
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
14354
|
-
width: 150,
|
|
14355
|
-
render: function render(val, record, index) {
|
|
14356
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14357
|
-
value: val,
|
|
14358
|
-
onChange: function onChange(value) {
|
|
14359
|
-
updateHandle(value, index, 'isGift');
|
|
14360
|
-
},
|
|
14361
|
-
options: [{
|
|
14362
|
-
label: '是',
|
|
14363
|
-
value: 1
|
|
14364
|
-
}, {
|
|
14365
|
-
label: '否',
|
|
14366
|
-
value: 0
|
|
14367
|
-
}]
|
|
14368
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14369
|
-
}
|
|
14370
|
-
}].map(function (item) {
|
|
14371
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14372
|
-
align: 'center',
|
|
14373
|
-
ellipsis: true
|
|
14374
|
-
});
|
|
14375
|
-
})
|
|
14376
|
-
};
|
|
14377
|
-
};
|
|
14378
|
-
|
|
14379
|
-
var getColumns$5 = function getColumns(_ref) {
|
|
14380
|
-
var _ref$text = _ref.text,
|
|
14381
|
-
disabled = _ref.disabled,
|
|
14382
|
-
updateHandle = _ref.updateHandle;
|
|
14383
|
-
return {
|
|
14384
|
-
JST_GOODS: [{
|
|
14385
|
-
dataIndex: 'name',
|
|
14386
|
-
title: '商品名称',
|
|
14387
|
-
width: 150,
|
|
14388
|
-
ellipsis: true,
|
|
14389
|
-
align: 'center'
|
|
14390
|
-
}, {
|
|
14391
|
-
dataIndex: 'skuId',
|
|
14392
|
-
title: '商品编码',
|
|
14393
|
-
width: 150,
|
|
14394
|
-
ellipsis: true,
|
|
14395
|
-
align: 'center'
|
|
14396
|
-
}, {
|
|
14397
|
-
dataIndex: 'iId',
|
|
14398
|
-
title: '款式编码',
|
|
14399
|
-
width: 150,
|
|
14400
|
-
ellipsis: true,
|
|
14401
|
-
align: 'center'
|
|
14402
|
-
}, {
|
|
14403
|
-
dataIndex: 'pic',
|
|
14404
|
-
title: '商品图片',
|
|
14405
|
-
ellipsis: true,
|
|
14406
|
-
align: 'center',
|
|
14407
|
-
width: 100,
|
|
14408
|
-
render: function render(val) {
|
|
14409
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
14410
|
-
width: 60,
|
|
14411
|
-
src: val
|
|
14412
|
-
});
|
|
14413
|
-
}
|
|
14414
|
-
}, {
|
|
14415
|
-
dataIndex: 'propertiesValue',
|
|
14416
|
-
title: '规格值',
|
|
14417
|
-
width: 150,
|
|
14418
|
-
ellipsis: true,
|
|
14419
|
-
align: 'center'
|
|
14420
|
-
}, {
|
|
14421
|
-
dataIndex: 'saleBasePrice',
|
|
14422
|
-
title: '原价',
|
|
14423
|
-
width: 150,
|
|
14424
|
-
ellipsis: true,
|
|
14425
|
-
align: 'center',
|
|
14426
|
-
render: function render(price) {
|
|
14427
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14428
|
-
}
|
|
14429
|
-
}, {
|
|
14430
|
-
dataIndex: 'salePrice',
|
|
14431
|
-
title: '单价',
|
|
14432
|
-
ellipsis: true,
|
|
14433
|
-
align: 'center',
|
|
14434
|
-
width: 120,
|
|
14435
|
-
render: function render(val, record, index) {
|
|
14436
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14437
|
-
style: {
|
|
14438
|
-
width: 70
|
|
14439
|
-
},
|
|
14440
|
-
value: val,
|
|
14441
|
-
min: 0,
|
|
14442
|
-
precision: 2,
|
|
14443
|
-
onChange: function onChange(num) {
|
|
14444
|
-
return updateHandle(num, index, 'salePrice');
|
|
14445
|
-
}
|
|
14446
|
-
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
14447
|
-
}
|
|
13802
|
+
width: 150
|
|
14448
13803
|
}, {
|
|
14449
13804
|
dataIndex: 'qty',
|
|
14450
|
-
title:
|
|
14451
|
-
ellipsis: true,
|
|
14452
|
-
align: 'center',
|
|
13805
|
+
title: "\u6570\u91CF",
|
|
14453
13806
|
width: 100,
|
|
14454
13807
|
render: function render(val, record, index) {
|
|
14455
13808
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
@@ -14460,31 +13813,65 @@ var getColumns$5 = function getColumns(_ref) {
|
|
|
14460
13813
|
min: 1,
|
|
14461
13814
|
precision: 0,
|
|
14462
13815
|
onChange: function onChange(num) {
|
|
14463
|
-
|
|
13816
|
+
updateDataHandle({
|
|
13817
|
+
qty: num,
|
|
13818
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13819
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13820
|
+
}, index);
|
|
14464
13821
|
}
|
|
14465
13822
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14466
13823
|
}
|
|
14467
13824
|
}, {
|
|
14468
|
-
dataIndex: '
|
|
14469
|
-
title:
|
|
13825
|
+
dataIndex: 'price',
|
|
13826
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
14470
13827
|
width: 150,
|
|
14471
|
-
ellipsis: true,
|
|
14472
|
-
align: 'center',
|
|
14473
13828
|
render: function render(val, record, index) {
|
|
14474
|
-
return
|
|
13829
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13830
|
+
style: {
|
|
13831
|
+
width: 130
|
|
13832
|
+
},
|
|
13833
|
+
value: val,
|
|
13834
|
+
min: 0,
|
|
13835
|
+
precision: 2,
|
|
13836
|
+
onChange: function onChange(num) {
|
|
13837
|
+
updateDataHandle({
|
|
13838
|
+
price: num,
|
|
13839
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13840
|
+
}, index);
|
|
13841
|
+
}
|
|
13842
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14475
13843
|
}
|
|
14476
13844
|
}, {
|
|
14477
|
-
dataIndex: '
|
|
14478
|
-
title:
|
|
13845
|
+
dataIndex: 'amount',
|
|
13846
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13847
|
+
width: 150
|
|
13848
|
+
}, {
|
|
13849
|
+
dataIndex: 'originPrice',
|
|
13850
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13851
|
+
width: 150
|
|
13852
|
+
}, {
|
|
13853
|
+
dataIndex: 'originAmount',
|
|
13854
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13855
|
+
width: 150
|
|
13856
|
+
}, {
|
|
13857
|
+
dataIndex: 'discountFee',
|
|
13858
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
13859
|
+
width: 150
|
|
13860
|
+
}, {
|
|
13861
|
+
dataIndex: 'amountAfter',
|
|
13862
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
13863
|
+
width: 150
|
|
13864
|
+
}, {
|
|
13865
|
+
dataIndex: 'cancel',
|
|
13866
|
+
title: "\u662F\u5426\u53D6\u6D88",
|
|
14479
13867
|
width: 150,
|
|
14480
|
-
|
|
14481
|
-
|
|
13868
|
+
render: function render(val) {
|
|
13869
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13870
|
+
}
|
|
14482
13871
|
}, {
|
|
14483
13872
|
dataIndex: 'isGift',
|
|
14484
|
-
title:
|
|
14485
|
-
|
|
14486
|
-
align: 'center',
|
|
14487
|
-
width: 100,
|
|
13873
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13874
|
+
width: 150,
|
|
14488
13875
|
render: function render(val, record, index) {
|
|
14489
13876
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14490
13877
|
value: val,
|
|
@@ -14493,109 +13880,105 @@ var getColumns$5 = function getColumns(_ref) {
|
|
|
14493
13880
|
},
|
|
14494
13881
|
options: [{
|
|
14495
13882
|
label: '是',
|
|
14496
|
-
value:
|
|
13883
|
+
value: 1
|
|
14497
13884
|
}, {
|
|
14498
13885
|
label: '否',
|
|
14499
|
-
value:
|
|
13886
|
+
value: 0
|
|
14500
13887
|
}]
|
|
14501
|
-
}) : /*#__PURE__*/React.createElement("span", null,
|
|
13888
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14502
13889
|
}
|
|
14503
13890
|
}, {
|
|
14504
|
-
dataIndex: '
|
|
14505
|
-
title:
|
|
14506
|
-
width:
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
13891
|
+
dataIndex: 'skuNote',
|
|
13892
|
+
title: "\u5546\u54C1\u5907\u6CE8",
|
|
13893
|
+
width: 150
|
|
13894
|
+
}].map(function (item) {
|
|
13895
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13896
|
+
align: 'center',
|
|
13897
|
+
ellipsis: true
|
|
13898
|
+
});
|
|
13899
|
+
}),
|
|
13900
|
+
//管易补发商品信息
|
|
13901
|
+
GY_REISSUE_GOODS: [{
|
|
13902
|
+
dataIndex: 'goodName',
|
|
13903
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13904
|
+
width: 150
|
|
14516
13905
|
}, {
|
|
14517
|
-
dataIndex: '
|
|
14518
|
-
title:
|
|
14519
|
-
width: 150
|
|
14520
|
-
ellipsis: true,
|
|
14521
|
-
align: 'center'
|
|
13906
|
+
dataIndex: 'goodShortName',
|
|
13907
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13908
|
+
width: 150
|
|
14522
13909
|
}, {
|
|
14523
|
-
dataIndex: '
|
|
14524
|
-
title:
|
|
14525
|
-
width:
|
|
14526
|
-
ellipsis: true,
|
|
14527
|
-
align: 'center'
|
|
13910
|
+
dataIndex: 'goodNo',
|
|
13911
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13912
|
+
width: 200
|
|
14528
13913
|
}, {
|
|
14529
|
-
dataIndex: '
|
|
14530
|
-
title:
|
|
14531
|
-
ellipsis: true,
|
|
13914
|
+
dataIndex: 'specName',
|
|
13915
|
+
title: "SKU\u540D\u79F0",
|
|
14532
13916
|
align: 'center',
|
|
14533
|
-
width: 100,
|
|
14534
|
-
render: function render(val) {
|
|
14535
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
14536
|
-
width: 60,
|
|
14537
|
-
src: val
|
|
14538
|
-
});
|
|
14539
|
-
}
|
|
14540
|
-
}, {
|
|
14541
|
-
dataIndex: 'propertiesValue',
|
|
14542
|
-
title: '规格值',
|
|
14543
|
-
width: 150,
|
|
14544
13917
|
ellipsis: true,
|
|
14545
|
-
|
|
13918
|
+
width: 250
|
|
14546
13919
|
}, {
|
|
14547
|
-
dataIndex: '
|
|
14548
|
-
title:
|
|
14549
|
-
width: 150,
|
|
14550
|
-
ellipsis: true,
|
|
13920
|
+
dataIndex: 'specNo',
|
|
13921
|
+
title: "SKU\u7F16\u7801",
|
|
14551
13922
|
align: 'center',
|
|
14552
|
-
render: function render(price) {
|
|
14553
|
-
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
14554
|
-
}
|
|
14555
|
-
}, {
|
|
14556
|
-
dataIndex: 'salePrice',
|
|
14557
|
-
title: '单价',
|
|
14558
13923
|
ellipsis: true,
|
|
14559
|
-
|
|
14560
|
-
|
|
13924
|
+
width: 150
|
|
13925
|
+
}, {
|
|
13926
|
+
dataIndex: 'qty',
|
|
13927
|
+
title: "\u6570\u91CF",
|
|
13928
|
+
width: 100,
|
|
14561
13929
|
render: function render(val, record, index) {
|
|
14562
13930
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14563
13931
|
style: {
|
|
14564
13932
|
width: 70
|
|
14565
13933
|
},
|
|
14566
13934
|
value: val,
|
|
14567
|
-
min:
|
|
14568
|
-
precision:
|
|
13935
|
+
min: 1,
|
|
13936
|
+
precision: 0,
|
|
14569
13937
|
onChange: function onChange(num) {
|
|
14570
|
-
|
|
13938
|
+
updateDataHandle({
|
|
13939
|
+
qty: num,
|
|
13940
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13941
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13942
|
+
}, index);
|
|
14571
13943
|
}
|
|
14572
|
-
}) : /*#__PURE__*/React.createElement("span", null, val
|
|
13944
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14573
13945
|
}
|
|
14574
13946
|
}, {
|
|
14575
|
-
dataIndex: '
|
|
14576
|
-
title:
|
|
14577
|
-
|
|
14578
|
-
align: 'center',
|
|
14579
|
-
width: 100,
|
|
13947
|
+
dataIndex: 'price',
|
|
13948
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13949
|
+
width: 150,
|
|
14580
13950
|
render: function render(val, record, index) {
|
|
14581
13951
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14582
13952
|
style: {
|
|
14583
|
-
width:
|
|
13953
|
+
width: 130
|
|
14584
13954
|
},
|
|
14585
13955
|
value: val,
|
|
14586
|
-
min:
|
|
14587
|
-
precision:
|
|
13956
|
+
min: 0,
|
|
13957
|
+
precision: 2,
|
|
14588
13958
|
onChange: function onChange(num) {
|
|
14589
|
-
|
|
13959
|
+
updateDataHandle({
|
|
13960
|
+
price: num,
|
|
13961
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13962
|
+
}, index);
|
|
14590
13963
|
}
|
|
14591
13964
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14592
13965
|
}
|
|
13966
|
+
}, {
|
|
13967
|
+
dataIndex: 'amount',
|
|
13968
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13969
|
+
width: 150
|
|
13970
|
+
}, {
|
|
13971
|
+
dataIndex: 'originPrice',
|
|
13972
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13973
|
+
width: 150
|
|
13974
|
+
}, {
|
|
13975
|
+
dataIndex: 'originAmount',
|
|
13976
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13977
|
+
width: 150
|
|
14593
13978
|
}, {
|
|
14594
13979
|
dataIndex: 'isGift',
|
|
14595
|
-
title:
|
|
14596
|
-
|
|
14597
|
-
align: 'center',
|
|
14598
|
-
width: 100,
|
|
13980
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13981
|
+
width: 150,
|
|
14599
13982
|
render: function render(val, record, index) {
|
|
14600
13983
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14601
13984
|
value: val,
|
|
@@ -14604,35 +13987,23 @@ var getColumns$5 = function getColumns(_ref) {
|
|
|
14604
13987
|
},
|
|
14605
13988
|
options: [{
|
|
14606
13989
|
label: '是',
|
|
14607
|
-
value:
|
|
13990
|
+
value: 1
|
|
14608
13991
|
}, {
|
|
14609
13992
|
label: '否',
|
|
14610
|
-
value:
|
|
13993
|
+
value: 0
|
|
14611
13994
|
}]
|
|
14612
|
-
}) : /*#__PURE__*/React.createElement("span", null,
|
|
14613
|
-
}
|
|
14614
|
-
}, {
|
|
14615
|
-
dataIndex: 'remark',
|
|
14616
|
-
title: '备注',
|
|
14617
|
-
width: 150,
|
|
14618
|
-
ellipsis: true,
|
|
14619
|
-
align: 'center',
|
|
14620
|
-
render: function render(val, record, index) {
|
|
14621
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
|
|
14622
|
-
style: {
|
|
14623
|
-
width: 70
|
|
14624
|
-
},
|
|
14625
|
-
value: val,
|
|
14626
|
-
onChange: function onChange(e) {
|
|
14627
|
-
return updateHandle(e.target.value, index, 'remark');
|
|
14628
|
-
}
|
|
14629
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13995
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14630
13996
|
}
|
|
14631
|
-
}]
|
|
13997
|
+
}].map(function (item) {
|
|
13998
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13999
|
+
align: 'center',
|
|
14000
|
+
ellipsis: true
|
|
14001
|
+
});
|
|
14002
|
+
})
|
|
14632
14003
|
};
|
|
14633
14004
|
};
|
|
14634
14005
|
|
|
14635
|
-
var getColumns$
|
|
14006
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
14636
14007
|
var _ref$text = _ref.text,
|
|
14637
14008
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14638
14009
|
disabled = _ref.disabled,
|
|
@@ -14745,7 +14116,7 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14745
14116
|
disabled = _ref.disabled,
|
|
14746
14117
|
updateHandle = _ref.updateHandle,
|
|
14747
14118
|
updateDataHandle = _ref.updateDataHandle;
|
|
14748
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(
|
|
14119
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14749
14120
|
text: text,
|
|
14750
14121
|
disabled: disabled,
|
|
14751
14122
|
updateHandle: updateHandle
|
|
@@ -14766,12 +14137,8 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
14766
14137
|
disabled: disabled,
|
|
14767
14138
|
updateHandle: updateHandle,
|
|
14768
14139
|
updateDataHandle: updateDataHandle
|
|
14769
|
-
})), getColumns$5({
|
|
14770
|
-
text: text,
|
|
14771
|
-
disabled: disabled,
|
|
14772
|
-
updateHandle: updateHandle
|
|
14773
14140
|
})), {}, {
|
|
14774
|
-
default: getColumns$
|
|
14141
|
+
default: getColumns$5({
|
|
14775
14142
|
text: text,
|
|
14776
14143
|
disabled: disabled,
|
|
14777
14144
|
updateHandle: updateHandle
|
|
@@ -14875,19 +14242,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
14875
14242
|
});
|
|
14876
14243
|
};
|
|
14877
14244
|
|
|
14878
|
-
var GoodsModalMap = {
|
|
14879
|
-
'WDT_REISSUE_GOODS': WdtGoodsModal,
|
|
14880
|
-
'WDT_GOODS': WdtGoodsModal,
|
|
14881
|
-
'WDT_EXCHANGE_GOODS': WdtGoodsModal,
|
|
14882
|
-
'BS_E3_REISSUE_GOODS': BsE3GoodsModal,
|
|
14883
|
-
'BS_E3_GOODS': BsE3GoodsModal,
|
|
14884
|
-
'BS_E3_EXCHANGE_GOODS': BsE3GoodsModal,
|
|
14885
|
-
'GY_GOODS': GyGoodsModal$2,
|
|
14886
|
-
'GY_REISSUE_GOODS': GyGoodsModal$2,
|
|
14887
|
-
'JST_GOODS': JstGoodsModal,
|
|
14888
|
-
'JST_REISSUE_GOODS': JstGoodsModal,
|
|
14889
|
-
'OTHER_GOODS': GoodsModal$2
|
|
14890
|
-
};
|
|
14891
14245
|
var MAIN_FIELD = 'uuid';
|
|
14892
14246
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
14893
14247
|
var columns = _ref.columns,
|
|
@@ -14949,9 +14303,6 @@ var getButtonText = function getButtonText() {
|
|
|
14949
14303
|
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14950
14304
|
return '选择管易ERP商品';
|
|
14951
14305
|
}
|
|
14952
|
-
if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
14953
|
-
return '选择聚水潭ERP商品';
|
|
14954
|
-
}
|
|
14955
14306
|
return '选择商品';
|
|
14956
14307
|
};
|
|
14957
14308
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -15051,7 +14402,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15051
14402
|
};
|
|
15052
14403
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15053
14404
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15054
|
-
var
|
|
14405
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15055
14406
|
return function (type) {
|
|
15056
14407
|
var columns = [];
|
|
15057
14408
|
switch (type) {
|
|
@@ -15062,13 +14413,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15062
14413
|
case 'BS_GOODS':
|
|
15063
14414
|
case 'WLN_GOODS':
|
|
15064
14415
|
case 'GY_GOODS':
|
|
15065
|
-
case 'JST_GOODS':
|
|
15066
|
-
case 'JST_REISSUE_GOODS':
|
|
15067
14416
|
case 'GY_REISSUE_GOODS':
|
|
15068
14417
|
{
|
|
15069
14418
|
columns = getColumnsMap({
|
|
15070
14419
|
text: text,
|
|
15071
|
-
disabled: disabled
|
|
14420
|
+
disabled: disabled,
|
|
15072
14421
|
updateHandle: updateHandle,
|
|
15073
14422
|
updateDataHandle: updateDataHandle
|
|
15074
14423
|
})[type];
|
|
@@ -15077,25 +14426,25 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15077
14426
|
case 'WDT_REISSUE_GOODS':
|
|
15078
14427
|
{
|
|
15079
14428
|
columns = getWdtReissueGoodColumns({
|
|
15080
|
-
disabled: disabled
|
|
14429
|
+
disabled: disabled,
|
|
15081
14430
|
updateHandle: updateHandle,
|
|
15082
|
-
operate:
|
|
14431
|
+
operate: operate
|
|
15083
14432
|
});
|
|
15084
14433
|
}
|
|
15085
14434
|
break;
|
|
15086
14435
|
case 'BS_E3_REISSUE_GOODS':
|
|
15087
14436
|
{
|
|
15088
14437
|
columns = getBsE3ReissueGoodColumns({
|
|
15089
|
-
disabled: disabled
|
|
14438
|
+
disabled: disabled,
|
|
15090
14439
|
updateHandle: updateHandle,
|
|
15091
|
-
operate:
|
|
14440
|
+
operate: operate
|
|
15092
14441
|
});
|
|
15093
14442
|
}
|
|
15094
14443
|
break;
|
|
15095
14444
|
default:
|
|
15096
14445
|
columns = getColumnsMap({
|
|
15097
14446
|
text: text,
|
|
15098
|
-
disabled: disabled
|
|
14447
|
+
disabled: disabled,
|
|
15099
14448
|
updateHandle: updateHandle,
|
|
15100
14449
|
updateDataHandle: updateDataHandle
|
|
15101
14450
|
})['default'];
|
|
@@ -15158,10 +14507,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15158
14507
|
return columnList;
|
|
15159
14508
|
}, [showHeader, value, disabled]);
|
|
15160
14509
|
var orderColumns = useMemo(function () {
|
|
15161
|
-
var columns = COLUMNS_MAP('',
|
|
15162
|
-
operate: false,
|
|
15163
|
-
disabled: true
|
|
15164
|
-
})(type);
|
|
14510
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
15165
14511
|
return [{
|
|
15166
14512
|
dataIndex: '',
|
|
15167
14513
|
title: '序号',
|
|
@@ -15245,23 +14591,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15245
14591
|
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
15246
14592
|
});
|
|
15247
14593
|
});
|
|
15248
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS'].includes(type)) {
|
|
15249
|
-
newList = list.map(function (item) {
|
|
15250
|
-
return {
|
|
15251
|
-
name: item.goodName,
|
|
15252
|
-
skuId: item.goodNo,
|
|
15253
|
-
iId: item.styleCode,
|
|
15254
|
-
pic: item.goodPicUrl,
|
|
15255
|
-
propertiesValue: item.propertiesValue,
|
|
15256
|
-
saleBasePrice: item.retailPrice,
|
|
15257
|
-
salePrice: item.retailPrice,
|
|
15258
|
-
remark: '',
|
|
15259
|
-
uuid: uuid(),
|
|
15260
|
-
canDelete: true,
|
|
15261
|
-
canEdit: true,
|
|
15262
|
-
qty: 1
|
|
15263
|
-
};
|
|
15264
|
-
});
|
|
15265
14594
|
} else {
|
|
15266
14595
|
newList = list.map(function (item) {
|
|
15267
14596
|
var goodsId = item.goodsId,
|
|
@@ -15297,9 +14626,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15297
14626
|
}));
|
|
15298
14627
|
};
|
|
15299
14628
|
var handleChangeGoods = function handleChangeGoods() {
|
|
15300
|
-
refModal.current.open(shopCode
|
|
15301
|
-
value: value
|
|
15302
|
-
});
|
|
14629
|
+
refModal.current.open(shopCode);
|
|
15303
14630
|
};
|
|
15304
14631
|
var rowSelection = {
|
|
15305
14632
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -15316,7 +14643,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15316
14643
|
}
|
|
15317
14644
|
return params;
|
|
15318
14645
|
}, [tableSelect, selectedRowKeys]);
|
|
15319
|
-
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'];
|
|
15320
14646
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
|
|
15321
14647
|
style: {
|
|
15322
14648
|
float: 'right'
|
|
@@ -15344,7 +14670,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15344
14670
|
locale: {
|
|
15345
14671
|
emptyText: '暂无数据'
|
|
15346
14672
|
}
|
|
15347
|
-
})), /*#__PURE__*/React.createElement(
|
|
14673
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
14674
|
+
ref: refModal,
|
|
14675
|
+
onSubmit: onSubmit,
|
|
14676
|
+
width: width,
|
|
14677
|
+
shopList: shopList,
|
|
14678
|
+
shopId: shopId,
|
|
14679
|
+
maxLength: maxLength,
|
|
14680
|
+
companyKey: companyKey
|
|
14681
|
+
}) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
|
|
14682
|
+
ref: refModal,
|
|
14683
|
+
onSubmit: onSubmit,
|
|
14684
|
+
width: width,
|
|
14685
|
+
shopList: shopList,
|
|
14686
|
+
shopId: shopId,
|
|
14687
|
+
maxLength: maxLength,
|
|
14688
|
+
companyKey: companyKey
|
|
14689
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
|
|
14690
|
+
ref: refModal,
|
|
14691
|
+
onSubmit: onSubmit,
|
|
14692
|
+
width: width,
|
|
14693
|
+
shopList: shopList,
|
|
14694
|
+
shopId: shopId,
|
|
14695
|
+
maxLength: maxLength,
|
|
14696
|
+
companyKey: companyKey
|
|
14697
|
+
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
15348
14698
|
ref: refModal,
|
|
15349
14699
|
onSubmit: onSubmit,
|
|
15350
14700
|
width: width,
|
|
@@ -16066,68 +15416,37 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
16066
15416
|
billTag: item.tagName,
|
|
16067
15417
|
tradeTagName: item.tradeTagName,
|
|
16068
15418
|
deliveryState: item.deliveryState,
|
|
15419
|
+
vipCode: item.vipCode,
|
|
15420
|
+
shopCode: item.shopCode,
|
|
16069
15421
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
16070
15422
|
});
|
|
16071
15423
|
});
|
|
16072
|
-
}
|
|
16073
|
-
resolve(res.data);
|
|
16074
|
-
// 延迟10秒清除,保证订单的时效性
|
|
16075
|
-
setTimeout(function () {
|
|
16076
|
-
singletonMap$2.delete(orderNo);
|
|
16077
|
-
}, 1000 * 10);
|
|
16078
|
-
} else {
|
|
16079
|
-
doReject(res);
|
|
16080
|
-
}
|
|
16081
|
-
}).catch(doReject);
|
|
16082
|
-
});
|
|
16083
|
-
singletonMap$2.set(orderNo, p);
|
|
16084
|
-
}
|
|
16085
|
-
return singletonMap$2.get(orderNo);
|
|
16086
|
-
};
|
|
16087
|
-
var gyUtils = {
|
|
16088
|
-
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16089
|
-
};
|
|
16090
|
-
|
|
16091
|
-
var singletonMap$3 = new Map();
|
|
16092
|
-
var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
16093
|
-
if (!singletonMap$3.has(orderNo)) {
|
|
16094
|
-
var p = new Promise(function (resolve, reject) {
|
|
16095
|
-
var doReject = function doReject(err) {
|
|
16096
|
-
// 清空掉错误的请求记录
|
|
16097
|
-
// singletonMap.delete(orderNo);
|
|
16098
|
-
reject(err);
|
|
16099
|
-
};
|
|
16100
|
-
extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
|
|
16101
|
-
method: 'post',
|
|
16102
|
-
data: {
|
|
16103
|
-
soId: orderNo
|
|
16104
|
-
}
|
|
16105
|
-
}).then(function (data) {
|
|
16106
|
-
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
16107
|
-
data.data = filterJstOrders({
|
|
16108
|
-
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
16109
|
-
}, orderNo);
|
|
16110
|
-
resolve(data.data);
|
|
15424
|
+
}
|
|
15425
|
+
resolve(res.data);
|
|
15426
|
+
// 延迟10秒清除,保证订单的时效性
|
|
15427
|
+
setTimeout(function () {
|
|
15428
|
+
singletonMap$2.delete(orderNo);
|
|
15429
|
+
}, 1000 * 10);
|
|
16111
15430
|
} else {
|
|
16112
|
-
doReject(
|
|
15431
|
+
doReject(res);
|
|
16113
15432
|
}
|
|
16114
15433
|
}).catch(doReject);
|
|
16115
15434
|
});
|
|
16116
|
-
singletonMap$
|
|
15435
|
+
singletonMap$2.set(orderNo, p);
|
|
16117
15436
|
}
|
|
16118
|
-
return singletonMap$
|
|
15437
|
+
return singletonMap$2.get(orderNo);
|
|
16119
15438
|
};
|
|
16120
|
-
var
|
|
16121
|
-
|
|
15439
|
+
var gyUtils = {
|
|
15440
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
16122
15441
|
};
|
|
16123
15442
|
|
|
16124
|
-
var singletonMap$
|
|
15443
|
+
var singletonMap$3 = new Map();
|
|
16125
15444
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
16126
|
-
if (!singletonMap$
|
|
15445
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
16127
15446
|
var p = new Promise(function (resolve, reject) {
|
|
16128
15447
|
var doReject = function doReject(err) {
|
|
16129
15448
|
// 清空掉错误的请求记录
|
|
16130
|
-
singletonMap$
|
|
15449
|
+
singletonMap$3.delete(orderNo);
|
|
16131
15450
|
reject(err);
|
|
16132
15451
|
};
|
|
16133
15452
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -16153,29 +15472,29 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
16153
15472
|
}
|
|
16154
15473
|
// 延迟10秒清除,保证订单的时效性
|
|
16155
15474
|
setTimeout(function () {
|
|
16156
|
-
singletonMap$
|
|
15475
|
+
singletonMap$3.delete(orderNo);
|
|
16157
15476
|
}, 1000 * 10);
|
|
16158
15477
|
} else {
|
|
16159
15478
|
doReject(data);
|
|
16160
15479
|
}
|
|
16161
15480
|
}).catch(doReject);
|
|
16162
15481
|
});
|
|
16163
|
-
singletonMap$
|
|
15482
|
+
singletonMap$3.set(orderNo, p);
|
|
16164
15483
|
}
|
|
16165
|
-
return singletonMap$
|
|
15484
|
+
return singletonMap$3.get(orderNo);
|
|
16166
15485
|
};
|
|
16167
15486
|
var kmUtils = {
|
|
16168
15487
|
getOrderListSingleton: getOrderListSingleton
|
|
16169
15488
|
};
|
|
16170
15489
|
|
|
15490
|
+
var _excluded$g = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
16171
15491
|
var columnsMap = {
|
|
16172
15492
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
16173
15493
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
16174
15494
|
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
16175
15495
|
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
16176
15496
|
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
16177
|
-
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16178
|
-
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
15497
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
16179
15498
|
};
|
|
16180
15499
|
var rowKeyMap = {
|
|
16181
15500
|
BS_SYSTEM_ORDER: 'billNo',
|
|
@@ -16183,8 +15502,7 @@ var rowKeyMap = {
|
|
|
16183
15502
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
16184
15503
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
16185
15504
|
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
16186
|
-
GY_SYSTEM_ORDER: 'billNo'
|
|
16187
|
-
JST_SYSTEM_ORDER: 'oId'
|
|
15505
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
16188
15506
|
};
|
|
16189
15507
|
var index$1 = (function (props) {
|
|
16190
15508
|
var value = props.value,
|
|
@@ -16209,8 +15527,6 @@ var index$1 = (function (props) {
|
|
|
16209
15527
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
16210
15528
|
console.log('触发gy--getGyOrderList--1');
|
|
16211
15529
|
getGyOrderList(value.orderNo);
|
|
16212
|
-
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
16213
|
-
getJstOrderList(value.orderNo);
|
|
16214
15530
|
}
|
|
16215
15531
|
}
|
|
16216
15532
|
}, [value, type]);
|
|
@@ -16366,41 +15682,18 @@ var index$1 = (function (props) {
|
|
|
16366
15682
|
return _ref5.apply(this, arguments);
|
|
16367
15683
|
};
|
|
16368
15684
|
}();
|
|
16369
|
-
var
|
|
15685
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
16370
15686
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
16371
15687
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
16372
15688
|
while (1) switch (_context5.prev = _context5.next) {
|
|
16373
|
-
case 0:
|
|
16374
|
-
jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
|
|
16375
|
-
var trades = data || [];
|
|
16376
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16377
|
-
orders: trades,
|
|
16378
|
-
showOrderInfo: trades
|
|
16379
|
-
}));
|
|
16380
|
-
});
|
|
16381
|
-
onceRef.current = false;
|
|
16382
|
-
case 2:
|
|
16383
|
-
case "end":
|
|
16384
|
-
return _context5.stop();
|
|
16385
|
-
}
|
|
16386
|
-
}, _callee5);
|
|
16387
|
-
}));
|
|
16388
|
-
return function getJstOrderList(_x5) {
|
|
16389
|
-
return _ref6.apply(this, arguments);
|
|
16390
|
-
};
|
|
16391
|
-
}();
|
|
16392
|
-
var getKmOrderList = /*#__PURE__*/function () {
|
|
16393
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
16394
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
16395
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
16396
15689
|
case 0:
|
|
16397
15690
|
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
16398
15691
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16399
15692
|
orders: trades,
|
|
16400
|
-
showOrderInfo: trades.map(function (
|
|
16401
|
-
var billNo =
|
|
16402
|
-
billType =
|
|
16403
|
-
billTag =
|
|
15693
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
15694
|
+
var billNo = _ref7.billNo,
|
|
15695
|
+
billType = _ref7.billType,
|
|
15696
|
+
billTag = _ref7.billTag;
|
|
16404
15697
|
return {
|
|
16405
15698
|
billNo: billNo,
|
|
16406
15699
|
billType: billType,
|
|
@@ -16412,18 +15705,18 @@ var index$1 = (function (props) {
|
|
|
16412
15705
|
onceRef.current = false;
|
|
16413
15706
|
case 2:
|
|
16414
15707
|
case "end":
|
|
16415
|
-
return
|
|
15708
|
+
return _context5.stop();
|
|
16416
15709
|
}
|
|
16417
|
-
},
|
|
15710
|
+
}, _callee5);
|
|
16418
15711
|
}));
|
|
16419
|
-
return function getKmOrderList(
|
|
16420
|
-
return
|
|
15712
|
+
return function getKmOrderList(_x5) {
|
|
15713
|
+
return _ref6.apply(this, arguments);
|
|
16421
15714
|
};
|
|
16422
15715
|
}();
|
|
16423
15716
|
var getGyOrderList = /*#__PURE__*/function () {
|
|
16424
|
-
var
|
|
16425
|
-
return _regeneratorRuntime().wrap(function
|
|
16426
|
-
while (1) switch (
|
|
15717
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15718
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15719
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
16427
15720
|
case 0:
|
|
16428
15721
|
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
16429
15722
|
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
@@ -16431,32 +15724,37 @@ var index$1 = (function (props) {
|
|
|
16431
15724
|
});
|
|
16432
15725
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
16433
15726
|
orders: trades,
|
|
16434
|
-
showOrderInfo: trades.map(function (
|
|
16435
|
-
var billNo =
|
|
16436
|
-
billType =
|
|
16437
|
-
billTag =
|
|
16438
|
-
tradeTagName =
|
|
16439
|
-
deliveryState =
|
|
16440
|
-
|
|
15727
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15728
|
+
var billNo = _ref9.billNo,
|
|
15729
|
+
billType = _ref9.billType,
|
|
15730
|
+
billTag = _ref9.billTag,
|
|
15731
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15732
|
+
deliveryState = _ref9.deliveryState,
|
|
15733
|
+
vipCode = _ref9.vipCode,
|
|
15734
|
+
shopCode = _ref9.shopCode,
|
|
15735
|
+
rest = _objectWithoutProperties(_ref9, _excluded$g);
|
|
15736
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
16441
15737
|
billNo: billNo,
|
|
16442
15738
|
billType: billType,
|
|
16443
15739
|
billTag: billTag,
|
|
16444
15740
|
tradeTagName: tradeTagName,
|
|
16445
15741
|
deliveryState: deliveryState,
|
|
16446
|
-
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
16447
|
-
|
|
15742
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
15743
|
+
vipCode: vipCode,
|
|
15744
|
+
shopCode: shopCode
|
|
15745
|
+
});
|
|
16448
15746
|
})
|
|
16449
15747
|
}));
|
|
16450
15748
|
});
|
|
16451
15749
|
onceRef.current = false;
|
|
16452
15750
|
case 2:
|
|
16453
15751
|
case "end":
|
|
16454
|
-
return
|
|
15752
|
+
return _context6.stop();
|
|
16455
15753
|
}
|
|
16456
|
-
},
|
|
15754
|
+
}, _callee6);
|
|
16457
15755
|
}));
|
|
16458
|
-
return function getGyOrderList(
|
|
16459
|
-
return
|
|
15756
|
+
return function getGyOrderList(_x6) {
|
|
15757
|
+
return _ref8.apply(this, arguments);
|
|
16460
15758
|
};
|
|
16461
15759
|
}();
|
|
16462
15760
|
var rowSelection = {
|
|
@@ -16605,31 +15903,6 @@ var componentMap$1 = {
|
|
|
16605
15903
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16606
15904
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16607
15905
|
}
|
|
16608
|
-
},
|
|
16609
|
-
JST_GOODS: {
|
|
16610
|
-
type: 'jst',
|
|
16611
|
-
key: 'jstGoods',
|
|
16612
|
-
name: '聚水潭',
|
|
16613
|
-
orderNo: 'dealCode',
|
|
16614
|
-
goodDetailOrderNo: 'originalDealCode',
|
|
16615
|
-
eventNameMap: {
|
|
16616
|
-
// pubsub 事件
|
|
16617
|
-
type: 'jstType',
|
|
16618
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
16619
|
-
selectListReturn: 'jstSelectListReturn',
|
|
16620
|
-
selectList: 'jstSelectList',
|
|
16621
|
-
reissueSelectList: 'jstReissueSelectList',
|
|
16622
|
-
reissueSelectListReturn: 'jstReissueSelectListReturn',
|
|
16623
|
-
reissueDeleteGood: 'jstReissueDeleteGood',
|
|
16624
|
-
changeShopCode: 'jstChangeShopCode',
|
|
16625
|
-
reissueType: 'jstReissueType',
|
|
16626
|
-
returnType: 'jstReturnType',
|
|
16627
|
-
returnSelectListReturn: 'jstReturnSelectListReturn',
|
|
16628
|
-
returnSelectList: 'jstReturnSelectList',
|
|
16629
|
-
deleteGood: 'jstDeleteGood',
|
|
16630
|
-
returnDeleteGood: 'jstReturnDeleteGood',
|
|
16631
|
-
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
16632
|
-
}
|
|
16633
15906
|
}
|
|
16634
15907
|
};
|
|
16635
15908
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17077,7 +16350,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
17077
16350
|
})));
|
|
17078
16351
|
};
|
|
17079
16352
|
|
|
17080
|
-
var _excluded$
|
|
16353
|
+
var _excluded$h = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17081
16354
|
var typeMap$1 = {
|
|
17082
16355
|
WDT_REISSUE_GOODS: {
|
|
17083
16356
|
key: 'wdtReissueGoods',
|
|
@@ -17105,7 +16378,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17105
16378
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17106
16379
|
disabled = props.disabled,
|
|
17107
16380
|
type = props.type,
|
|
17108
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
16381
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
17109
16382
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
17110
16383
|
var _order$srcTid;
|
|
17111
16384
|
return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
|
|
@@ -17349,260 +16622,6 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
17349
16622
|
})));
|
|
17350
16623
|
};
|
|
17351
16624
|
|
|
17352
|
-
var _excluded$h = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
17353
|
-
var typeMap$2 = {
|
|
17354
|
-
JST_REISSUE_GOODS: {
|
|
17355
|
-
key: 'jstReissueGoods',
|
|
17356
|
-
typeName: 'jstReissueType',
|
|
17357
|
-
systemOrder: 'jstSystemOrder',
|
|
17358
|
-
systemOrderNo: 'jstSystemOrderNo',
|
|
17359
|
-
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17360
|
-
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17361
|
-
updateGoodsHandle: updateJstGoodsHandle,
|
|
17362
|
-
orderTypeKey: 'orderType',
|
|
17363
|
-
oIdKey: 'oId',
|
|
17364
|
-
outerOiIdKey: 'outerOiId',
|
|
17365
|
-
goodDetailsKey: 'items'
|
|
17366
|
-
}
|
|
17367
|
-
};
|
|
17368
|
-
var PublicReissue = function PublicReissue(props) {
|
|
17369
|
-
var _typeMap$type32, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42;
|
|
17370
|
-
var value = props.value,
|
|
17371
|
-
onChange = props.onChange,
|
|
17372
|
-
_props$reasonList = props.reasonList,
|
|
17373
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17374
|
-
disabled = props.disabled,
|
|
17375
|
-
type = props.type,
|
|
17376
|
-
other = _objectWithoutProperties(props, _excluded$h);
|
|
17377
|
-
var getOrderFlag = useRef(false);
|
|
17378
|
-
var _useState = useState(false),
|
|
17379
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17380
|
-
isStrict = _useState2[0],
|
|
17381
|
-
setIsStrict = _useState2[1];
|
|
17382
|
-
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
17383
|
-
useEffect(function () {
|
|
17384
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17385
|
-
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)) {
|
|
17386
|
-
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17387
|
-
getOrderFlag.current = true;
|
|
17388
|
-
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);
|
|
17389
|
-
}
|
|
17390
|
-
return;
|
|
17391
|
-
}, [value]);
|
|
17392
|
-
var getOrderList = /*#__PURE__*/function () {
|
|
17393
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17394
|
-
var _typeMap$type4;
|
|
17395
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17396
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17397
|
-
case 0:
|
|
17398
|
-
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17399
|
-
var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
|
|
17400
|
-
var orders = data || [];
|
|
17401
|
-
var showOrderInfo = orders.map(function (orderItem) {
|
|
17402
|
-
return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
|
|
17403
|
-
});
|
|
17404
|
-
var typeObj = {};
|
|
17405
|
-
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];
|
|
17406
|
-
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) {
|
|
17407
|
-
var _typeMap$type8, _typeMap$type9;
|
|
17408
|
-
var targetOrder = orders.find(function (oItem) {
|
|
17409
|
-
var _typeMap$type7;
|
|
17410
|
-
return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
|
|
17411
|
-
});
|
|
17412
|
-
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];
|
|
17413
|
-
}
|
|
17414
|
-
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]), {}, {
|
|
17415
|
-
showOrderInfo: showOrderInfo,
|
|
17416
|
-
orders: orders
|
|
17417
|
-
}))));
|
|
17418
|
-
});
|
|
17419
|
-
case 1:
|
|
17420
|
-
case "end":
|
|
17421
|
-
return _context.stop();
|
|
17422
|
-
}
|
|
17423
|
-
}, _callee);
|
|
17424
|
-
}));
|
|
17425
|
-
return function getOrderList(_x) {
|
|
17426
|
-
return _ref.apply(this, arguments);
|
|
17427
|
-
};
|
|
17428
|
-
}();
|
|
17429
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17430
|
-
var _typeMap$type12;
|
|
17431
|
-
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17432
|
-
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
17433
|
-
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17434
|
-
var newValue = _objectSpread2({}, value);
|
|
17435
|
-
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
17436
|
-
if (typeName === '1') {
|
|
17437
|
-
var _typeMap$type13;
|
|
17438
|
-
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
17439
|
-
mode: isStrict
|
|
17440
|
-
});
|
|
17441
|
-
} else if (typeName === '2') {
|
|
17442
|
-
var _typeMap$type14;
|
|
17443
|
-
// 切换到非原单,清空列表
|
|
17444
|
-
newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
17445
|
-
}
|
|
17446
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17447
|
-
};
|
|
17448
|
-
var handleModeChange = function handleModeChange(mode) {
|
|
17449
|
-
var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
|
|
17450
|
-
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';
|
|
17451
|
-
setIsStrict(mode);
|
|
17452
|
-
if (!isOriginalOrder) return;
|
|
17453
|
-
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({
|
|
17454
|
-
mode: mode
|
|
17455
|
-
}))));
|
|
17456
|
-
};
|
|
17457
|
-
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17458
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
17459
|
-
var mode = _ref3.mode,
|
|
17460
|
-
sysOrderNo = _ref3.sysOrderNo;
|
|
17461
|
-
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];
|
|
17462
|
-
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];
|
|
17463
|
-
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17464
|
-
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
17465
|
-
});
|
|
17466
|
-
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) : [];
|
|
17467
|
-
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17468
|
-
return mode ? goodDetails.filter(function (goodItem) {
|
|
17469
|
-
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
17470
|
-
}) : goodDetails;
|
|
17471
|
-
};
|
|
17472
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17473
|
-
var _typeMap$type20;
|
|
17474
|
-
var newValue = _objectSpread2({}, value);
|
|
17475
|
-
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 || [];
|
|
17476
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17477
|
-
};
|
|
17478
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17479
|
-
var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
|
|
17480
|
-
var newValue = _objectSpread2({}, value);
|
|
17481
|
-
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;
|
|
17482
|
-
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) {
|
|
17483
|
-
var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
|
|
17484
|
-
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) || [];
|
|
17485
|
-
var targetOrder = val && orders.find(function (oItem) {
|
|
17486
|
-
var _typeMap$type24;
|
|
17487
|
-
return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
|
|
17488
|
-
});
|
|
17489
|
-
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];
|
|
17490
|
-
}
|
|
17491
|
-
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])) {
|
|
17492
|
-
var _typeMap$type28;
|
|
17493
|
-
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)] = [];
|
|
17494
|
-
} 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])) {
|
|
17495
|
-
var _typeMap$type30;
|
|
17496
|
-
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({
|
|
17497
|
-
mode: isStrict,
|
|
17498
|
-
sysOrderNo: val
|
|
17499
|
-
});
|
|
17500
|
-
}
|
|
17501
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17502
|
-
};
|
|
17503
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
17504
|
-
var showChangeBtn = useMemo(function () {
|
|
17505
|
-
var _typeMap$type31;
|
|
17506
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
17507
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]]);
|
|
17508
|
-
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17509
|
-
var _typeMap$type33, _typeMap$type34, _uniqBy;
|
|
17510
|
-
var newValue = _objectSpread2({}, value);
|
|
17511
|
-
// 原订单商品
|
|
17512
|
-
var originTradeGoodList = getGoodDetails({
|
|
17513
|
-
mode: isStrict
|
|
17514
|
-
}) || [];
|
|
17515
|
-
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17516
|
-
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)]) || [];
|
|
17517
|
-
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) {
|
|
17518
|
-
return skuList.includes(item.uuid);
|
|
17519
|
-
});
|
|
17520
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17521
|
-
}, [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]);
|
|
17522
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17523
|
-
gutter: 8,
|
|
17524
|
-
wrap: true,
|
|
17525
|
-
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())
|
|
17526
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
17527
|
-
className: "gutter-row",
|
|
17528
|
-
xs: {
|
|
17529
|
-
span: 11
|
|
17530
|
-
},
|
|
17531
|
-
sm: {
|
|
17532
|
-
span: 6
|
|
17533
|
-
}
|
|
17534
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
17535
|
-
style: {
|
|
17536
|
-
marginBottom: '8px'
|
|
17537
|
-
},
|
|
17538
|
-
disabled: disabled,
|
|
17539
|
-
allowClear: false,
|
|
17540
|
-
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)],
|
|
17541
|
-
onChange: function onChange(val) {
|
|
17542
|
-
return changeSystemOrderHandle(val);
|
|
17543
|
-
},
|
|
17544
|
-
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17545
|
-
}, ((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) {
|
|
17546
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17547
|
-
key: item[typeMap$2[type].oIdKey],
|
|
17548
|
-
value: item[typeMap$2[type].oIdKey],
|
|
17549
|
-
label: item[typeMap$2[type].oIdKey]
|
|
17550
|
-
}, item[typeMap$2[type].oIdKey]);
|
|
17551
|
-
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17552
|
-
className: "gutter-row",
|
|
17553
|
-
xs: {
|
|
17554
|
-
span: 11
|
|
17555
|
-
},
|
|
17556
|
-
sm: {
|
|
17557
|
-
span: 6
|
|
17558
|
-
}
|
|
17559
|
-
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17560
|
-
style: {
|
|
17561
|
-
marginBottom: '8px'
|
|
17562
|
-
},
|
|
17563
|
-
disabled: disabled,
|
|
17564
|
-
allowClear: false,
|
|
17565
|
-
options: reasonList,
|
|
17566
|
-
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)],
|
|
17567
|
-
onChange: function onChange(val) {
|
|
17568
|
-
return changeTypeHandle(val);
|
|
17569
|
-
}
|
|
17570
|
-
})), (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, {
|
|
17571
|
-
className: "gutter-row",
|
|
17572
|
-
xs: {
|
|
17573
|
-
span: 11
|
|
17574
|
-
},
|
|
17575
|
-
sm: {
|
|
17576
|
-
span: 6
|
|
17577
|
-
}
|
|
17578
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
17579
|
-
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)],
|
|
17580
|
-
disabled: disabled,
|
|
17581
|
-
readOnly: true
|
|
17582
|
-
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17583
|
-
key: 'reissueGoods'
|
|
17584
|
-
}, other), {}, {
|
|
17585
|
-
type: type,
|
|
17586
|
-
disabled: disabled,
|
|
17587
|
-
canUpdateNumber: showChangeBtn,
|
|
17588
|
-
showChangeBtn: showChangeBtn,
|
|
17589
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17590
|
-
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)],
|
|
17591
|
-
onChange: function onChange(val) {
|
|
17592
|
-
return changeGoodHandle(val);
|
|
17593
|
-
},
|
|
17594
|
-
onModeChange: handleModeChange,
|
|
17595
|
-
showModeBtn: false,
|
|
17596
|
-
isStrict: isStrict,
|
|
17597
|
-
tradeGoods: {
|
|
17598
|
-
originDataSource: getGoodDetails({
|
|
17599
|
-
mode: isStrict
|
|
17600
|
-
}),
|
|
17601
|
-
selectedGoodsChange: selectedGoodsChange
|
|
17602
|
-
}
|
|
17603
|
-
})));
|
|
17604
|
-
};
|
|
17605
|
-
|
|
17606
16625
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
17607
16626
|
styleInject(css_248z$a);
|
|
17608
16627
|
|
|
@@ -18124,15 +17143,10 @@ var typeInitValueMap$1 = {
|
|
|
18124
17143
|
initValue: [{
|
|
18125
17144
|
billNo: ''
|
|
18126
17145
|
}]
|
|
18127
|
-
},
|
|
18128
|
-
5: {
|
|
18129
|
-
initValue: [{
|
|
18130
|
-
billNo: ''
|
|
18131
|
-
}]
|
|
18132
17146
|
}
|
|
18133
17147
|
};
|
|
18134
17148
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
18135
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4
|
|
17149
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
18136
17150
|
var _props$value = props.value,
|
|
18137
17151
|
value = _props$value === void 0 ? [] : _props$value,
|
|
18138
17152
|
onChange = props.onChange,
|
|
@@ -18154,7 +17168,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18154
17168
|
maxHeight: '300px',
|
|
18155
17169
|
overflowY: 'auto'
|
|
18156
17170
|
}
|
|
18157
|
-
}, [1, 2, 3, 4
|
|
17171
|
+
}, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
18158
17172
|
};
|
|
18159
17173
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
18160
17174
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
@@ -18211,13 +17225,6 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
18211
17225
|
return changeInputHandle(e.target.value, 'billNo');
|
|
18212
17226
|
},
|
|
18213
17227
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
18214
|
-
})) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
18215
|
-
disabled: disabled,
|
|
18216
|
-
placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
|
|
18217
|
-
onChange: function onChange(e) {
|
|
18218
|
-
return changeInputHandle(e.target.value, 'billNo');
|
|
18219
|
-
},
|
|
18220
|
-
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
18221
17228
|
})) : null) : null);
|
|
18222
17229
|
};
|
|
18223
17230
|
|
|
@@ -18338,7 +17345,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18338
17345
|
onClick: function onClick() {
|
|
18339
17346
|
return setChangeIndex(index);
|
|
18340
17347
|
}
|
|
18341
|
-
}, msgTypeCh[key]
|
|
17348
|
+
}, msgTypeCh[key], item.ruleName);
|
|
18342
17349
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
18343
17350
|
showSearch: true,
|
|
18344
17351
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -18377,7 +17384,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
18377
17384
|
};
|
|
18378
17385
|
|
|
18379
17386
|
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
18380
|
-
var typeMap$
|
|
17387
|
+
var typeMap$2 = {
|
|
18381
17388
|
BS_E3_REISSUE_GOODS: {
|
|
18382
17389
|
key: 'bsE3ReissueGoods',
|
|
18383
17390
|
typeName: 'bsE3ReissueType',
|
|
@@ -18403,10 +17410,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18403
17410
|
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
18404
17411
|
useEffect(function () {
|
|
18405
17412
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18406
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17413
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
18407
17414
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18408
17415
|
getOrderFlag.current = true;
|
|
18409
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17416
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
18410
17417
|
}
|
|
18411
17418
|
return;
|
|
18412
17419
|
}, [value]);
|
|
@@ -18430,7 +17437,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18430
17437
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18431
17438
|
while (1) switch (_context.prev = _context.next) {
|
|
18432
17439
|
case 0:
|
|
18433
|
-
(_typeMap$type4 = typeMap$
|
|
17440
|
+
(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18434
17441
|
var _typeMap$type5, _typeMap$type6;
|
|
18435
17442
|
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
18436
17443
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18439,7 +17446,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18439
17446
|
billNo: orderSn
|
|
18440
17447
|
};
|
|
18441
17448
|
});
|
|
18442
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17449
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
18443
17450
|
showOrderInfo: showOrderInfo,
|
|
18444
17451
|
orders: orders
|
|
18445
17452
|
}))));
|
|
@@ -18460,25 +17467,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18460
17467
|
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
18461
17468
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18462
17469
|
var newValue = _objectSpread2({}, value);
|
|
18463
|
-
newValue[(_typeMap$type7 = typeMap$
|
|
17470
|
+
newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
|
|
18464
17471
|
if (typeName === '1') {
|
|
18465
17472
|
var _typeMap$type8;
|
|
18466
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17473
|
+
newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
|
|
18467
17474
|
mode: isStrict
|
|
18468
17475
|
});
|
|
18469
17476
|
} else if (typeName === '2') {
|
|
18470
17477
|
var _typeMap$type9;
|
|
18471
17478
|
// 切换到非原单,清空列表
|
|
18472
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17479
|
+
newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
|
|
18473
17480
|
}
|
|
18474
17481
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18475
17482
|
};
|
|
18476
17483
|
var handleModeChange = function handleModeChange(mode) {
|
|
18477
17484
|
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
18478
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$
|
|
17485
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
|
|
18479
17486
|
setIsStrict(mode);
|
|
18480
17487
|
if (!isOriginalOrder) return;
|
|
18481
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$
|
|
17488
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
|
|
18482
17489
|
mode: mode
|
|
18483
17490
|
}))));
|
|
18484
17491
|
};
|
|
@@ -18486,8 +17493,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18486
17493
|
var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
|
|
18487
17494
|
var mode = _ref3.mode,
|
|
18488
17495
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18489
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$
|
|
18490
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
17496
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
|
|
17497
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
|
|
18491
17498
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18492
17499
|
return order.orderSn === systemOrderNo;
|
|
18493
17500
|
});
|
|
@@ -18500,19 +17507,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18500
17507
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18501
17508
|
var _typeMap$type14;
|
|
18502
17509
|
var newValue = _objectSpread2({}, value);
|
|
18503
|
-
newValue["".concat(typeMap$
|
|
17510
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
|
|
18504
17511
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18505
17512
|
};
|
|
18506
17513
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18507
17514
|
var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
|
|
18508
17515
|
var newValue = _objectSpread2({}, value);
|
|
18509
|
-
newValue["".concat(typeMap$
|
|
18510
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$
|
|
17516
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
|
|
17517
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
18511
17518
|
var _typeMap$type17;
|
|
18512
|
-
newValue["".concat(typeMap$
|
|
18513
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$
|
|
17519
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
|
|
17520
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18514
17521
|
var _typeMap$type19;
|
|
18515
|
-
newValue["".concat(typeMap$
|
|
17522
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
|
|
18516
17523
|
mode: isStrict,
|
|
18517
17524
|
sysOrderNo: val
|
|
18518
17525
|
});
|
|
@@ -18522,8 +17529,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18522
17529
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18523
17530
|
var showChangeBtn = useMemo(function () {
|
|
18524
17531
|
var _typeMap$type20;
|
|
18525
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$
|
|
18526
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$
|
|
17532
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
17533
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
18527
17534
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18528
17535
|
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
18529
17536
|
var newValue = _objectSpread2({}, value);
|
|
@@ -18532,12 +17539,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18532
17539
|
mode: isStrict
|
|
18533
17540
|
}) || [];
|
|
18534
17541
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18535
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18536
|
-
newValue["".concat(typeMap$
|
|
17542
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
17543
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18537
17544
|
return skuList.includes(item.uuid);
|
|
18538
17545
|
});
|
|
18539
17546
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18540
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17547
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
18541
17548
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18542
17549
|
gutter: 8,
|
|
18543
17550
|
wrap: true,
|
|
@@ -18556,12 +17563,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18556
17563
|
},
|
|
18557
17564
|
disabled: disabled,
|
|
18558
17565
|
allowClear: false,
|
|
18559
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17566
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
18560
17567
|
onChange: function onChange(val) {
|
|
18561
17568
|
return changeSystemOrderHandle(val);
|
|
18562
17569
|
},
|
|
18563
17570
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18564
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$
|
|
17571
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18565
17572
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18566
17573
|
key: item.billNo,
|
|
18567
17574
|
value: item.billNo,
|
|
@@ -18582,7 +17589,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18582
17589
|
disabled: disabled,
|
|
18583
17590
|
allowClear: false,
|
|
18584
17591
|
options: reasonList,
|
|
18585
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17592
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
18586
17593
|
onChange: function onChange(val) {
|
|
18587
17594
|
return changeTypeHandle(val);
|
|
18588
17595
|
}
|
|
@@ -18594,7 +17601,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18594
17601
|
canUpdateNumber: showChangeBtn,
|
|
18595
17602
|
showChangeBtn: showChangeBtn,
|
|
18596
17603
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18597
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17604
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
18598
17605
|
onChange: function onChange(val) {
|
|
18599
17606
|
return changeGoodHandle(val);
|
|
18600
17607
|
},
|
|
@@ -18611,8 +17618,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
18611
17618
|
};
|
|
18612
17619
|
|
|
18613
17620
|
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
18614
|
-
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
18615
|
-
var typeMap$
|
|
17621
|
+
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
17622
|
+
var typeMap$3 = {
|
|
18616
17623
|
GY_REISSUE_GOODS: {
|
|
18617
17624
|
key: 'gyReissueGoods',
|
|
18618
17625
|
name: '管易',
|
|
@@ -18651,10 +17658,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18651
17658
|
setIsStrict = _useState2[1];
|
|
18652
17659
|
useEffect(function () {
|
|
18653
17660
|
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
18654
|
-
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$
|
|
17661
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
18655
17662
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
18656
17663
|
getOrderFlag.current = true;
|
|
18657
|
-
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$
|
|
17664
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
18658
17665
|
}
|
|
18659
17666
|
return;
|
|
18660
17667
|
}, [value]);
|
|
@@ -18664,7 +17671,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18664
17671
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18665
17672
|
while (1) switch (_context.prev = _context.next) {
|
|
18666
17673
|
case 0:
|
|
18667
|
-
(_typeMap$type4 = typeMap$
|
|
17674
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
18668
17675
|
var _typeMap$type5, _typeMap$type6;
|
|
18669
17676
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
18670
17677
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
@@ -18673,6 +17680,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18673
17680
|
billTag = _ref2.billTag,
|
|
18674
17681
|
tradeTagName = _ref2.tradeTagName,
|
|
18675
17682
|
deliveryState = _ref2.deliveryState,
|
|
17683
|
+
vipCode = _ref2.vipCode,
|
|
17684
|
+
shopCode = _ref2.shopCode,
|
|
18676
17685
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
18677
17686
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
18678
17687
|
billNo: billNo,
|
|
@@ -18680,10 +17689,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18680
17689
|
billTag: billTag,
|
|
18681
17690
|
tradeTagName: tradeTagName,
|
|
18682
17691
|
deliveryState: deliveryState,
|
|
18683
|
-
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17692
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17693
|
+
vipCode: vipCode,
|
|
17694
|
+
shopCode: shopCode
|
|
18684
17695
|
});
|
|
18685
17696
|
});
|
|
18686
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$
|
|
17697
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
18687
17698
|
showOrderInfo: showOrderInfo,
|
|
18688
17699
|
orders: orders
|
|
18689
17700
|
}))));
|
|
@@ -18701,28 +17712,28 @@ var GyReissue = function GyReissue(props) {
|
|
|
18701
17712
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
18702
17713
|
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
18703
17714
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
18704
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$
|
|
17715
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
18705
17716
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
18706
17717
|
var newValue = _objectSpread2({}, value);
|
|
18707
|
-
newValue[(_typeMap$type8 = typeMap$
|
|
17718
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
18708
17719
|
if (typeName === '1') {
|
|
18709
17720
|
var _typeMap$type9;
|
|
18710
|
-
newValue[(_typeMap$type9 = typeMap$
|
|
17721
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
18711
17722
|
mode: isStrict
|
|
18712
17723
|
});
|
|
18713
17724
|
} else if (typeName === '2') {
|
|
18714
17725
|
var _typeMap$type10;
|
|
18715
17726
|
// 切换到非原单,清空列表
|
|
18716
|
-
newValue[(_typeMap$type10 = typeMap$
|
|
17727
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
18717
17728
|
}
|
|
18718
17729
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18719
17730
|
};
|
|
18720
17731
|
var handleModeChange = function handleModeChange(mode) {
|
|
18721
17732
|
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
18722
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$
|
|
17733
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
18723
17734
|
setIsStrict(mode);
|
|
18724
17735
|
if (!isOriginalOrder) return;
|
|
18725
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$
|
|
17736
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
18726
17737
|
mode: mode
|
|
18727
17738
|
}))));
|
|
18728
17739
|
};
|
|
@@ -18730,8 +17741,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
18730
17741
|
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
18731
17742
|
var mode = _ref3.mode,
|
|
18732
17743
|
sysOrderNo = _ref3.sysOrderNo;
|
|
18733
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$
|
|
18734
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$
|
|
17744
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
17745
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
18735
17746
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18736
17747
|
return order.code === systemOrderNo;
|
|
18737
17748
|
});
|
|
@@ -18744,10 +17755,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
18744
17755
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18745
17756
|
var _typeMap$type15;
|
|
18746
17757
|
var newValue = _objectSpread2({}, value);
|
|
18747
|
-
newValue["".concat(typeMap$
|
|
17758
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
18748
17759
|
var _typeMap$type16, _typeMap$type17;
|
|
18749
|
-
item["".concat(typeMap$
|
|
18750
|
-
item["".concat(typeMap$
|
|
17760
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
17761
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
18751
17762
|
return item;
|
|
18752
17763
|
});
|
|
18753
17764
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -18755,13 +17766,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
18755
17766
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18756
17767
|
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
18757
17768
|
var newValue = _objectSpread2({}, value);
|
|
18758
|
-
newValue["".concat(typeMap$
|
|
18759
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$
|
|
17769
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
17770
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
18760
17771
|
var _typeMap$type20;
|
|
18761
|
-
newValue["".concat(typeMap$
|
|
18762
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$
|
|
17772
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
17773
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
18763
17774
|
var _typeMap$type22;
|
|
18764
|
-
newValue["".concat(typeMap$
|
|
17775
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
18765
17776
|
mode: isStrict,
|
|
18766
17777
|
sysOrderNo: val
|
|
18767
17778
|
});
|
|
@@ -18776,18 +17787,18 @@ var GyReissue = function GyReissue(props) {
|
|
|
18776
17787
|
mode: isStrict
|
|
18777
17788
|
}) || [];
|
|
18778
17789
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18779
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
18780
|
-
newValue["".concat(typeMap$
|
|
17790
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
17791
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18781
17792
|
return skuList.includes(item.uuid);
|
|
18782
17793
|
});
|
|
18783
|
-
console.log('商品发生变化', newValue["".concat(typeMap$
|
|
17794
|
+
console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
18784
17795
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18785
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17796
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
18786
17797
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18787
17798
|
var showChangeBtn = useMemo(function () {
|
|
18788
17799
|
var _typeMap$type27;
|
|
18789
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$
|
|
18790
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$
|
|
17800
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17801
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
18791
17802
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18792
17803
|
gutter: 8,
|
|
18793
17804
|
wrap: true
|
|
@@ -18805,12 +17816,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
18805
17816
|
},
|
|
18806
17817
|
disabled: disabled,
|
|
18807
17818
|
allowClear: false,
|
|
18808
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17819
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
18809
17820
|
onChange: function onChange(val) {
|
|
18810
17821
|
return changeSystemOrderHandle(val);
|
|
18811
17822
|
},
|
|
18812
17823
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18813
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$
|
|
17824
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18814
17825
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18815
17826
|
key: item.billNo,
|
|
18816
17827
|
value: item.billNo,
|
|
@@ -18831,7 +17842,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18831
17842
|
disabled: disabled,
|
|
18832
17843
|
allowClear: false,
|
|
18833
17844
|
options: reasonList,
|
|
18834
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17845
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
18835
17846
|
onChange: function onChange(val) {
|
|
18836
17847
|
return changeTypeHandle(val);
|
|
18837
17848
|
}
|
|
@@ -18843,7 +17854,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
18843
17854
|
canUpdateNumber: showChangeBtn,
|
|
18844
17855
|
showChangeBtn: showChangeBtn,
|
|
18845
17856
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18846
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$
|
|
17857
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
18847
17858
|
onChange: function onChange(val) {
|
|
18848
17859
|
return changeGoodHandle(val);
|
|
18849
17860
|
},
|
|
@@ -18859,4 +17870,4 @@ var GyReissue = function GyReissue(props) {
|
|
|
18859
17870
|
})));
|
|
18860
17871
|
};
|
|
18861
17872
|
|
|
18862
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment,
|
|
17873
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
|