@kmkf-fe-packages/basic-components 1.19.10 → 1.20.0
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/dist/index.esm.js +637 -184
- package/dist/index.js +635 -181
- package/dist/src/bs/component/GoodItem/bsE3ReissueGoodsColumns.d.ts +29 -0
- package/dist/src/bs/component/GoodItem/index.d.ts +4 -0
- package/dist/src/bs/component/model/BsE3GoodList.d.ts +4 -0
- package/dist/src/e3/Reissue/index.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ 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, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP,
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject } from 'lodash';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -12083,9 +12083,9 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12083
12083
|
var current = _ref.current,
|
|
12084
12084
|
pageSize = _ref.pageSize;
|
|
12085
12085
|
var data = {
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12086
|
+
goodNo: formData.goodNo || null,
|
|
12087
|
+
goodName: formData.goodName || null,
|
|
12088
|
+
skuCode: formData.skuCode || null,
|
|
12089
12089
|
skuId: formData.skuId || null
|
|
12090
12090
|
};
|
|
12091
12091
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
@@ -12093,7 +12093,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12093
12093
|
data: _objectSpread2({
|
|
12094
12094
|
pageSize: pageSize,
|
|
12095
12095
|
pageNo: current,
|
|
12096
|
-
platform: '
|
|
12096
|
+
platform: 'BS_E3_ERP'
|
|
12097
12097
|
}, data)
|
|
12098
12098
|
}).then(function (res) {
|
|
12099
12099
|
var _res$data = res.data,
|
|
@@ -12122,127 +12122,91 @@ var columns$2 = [{
|
|
|
12122
12122
|
}
|
|
12123
12123
|
}, index + 1);
|
|
12124
12124
|
},
|
|
12125
|
-
width:
|
|
12125
|
+
width: 80
|
|
12126
12126
|
}, {
|
|
12127
|
-
dataIndex: '
|
|
12127
|
+
dataIndex: 'specNo',
|
|
12128
12128
|
title: "SKU",
|
|
12129
12129
|
ellipsis: true,
|
|
12130
|
-
width:
|
|
12130
|
+
width: 200
|
|
12131
12131
|
}, {
|
|
12132
|
-
dataIndex: '
|
|
12132
|
+
dataIndex: 'specId',
|
|
12133
12133
|
title: "SKU ID",
|
|
12134
12134
|
ellipsis: true,
|
|
12135
|
-
width:
|
|
12135
|
+
width: 80
|
|
12136
12136
|
}, {
|
|
12137
|
-
dataIndex: '
|
|
12137
|
+
dataIndex: 'goodName',
|
|
12138
12138
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
12139
12139
|
ellipsis: true,
|
|
12140
|
-
width:
|
|
12140
|
+
width: 250
|
|
12141
12141
|
}, {
|
|
12142
|
-
dataIndex: '
|
|
12142
|
+
dataIndex: 'goodShortName',
|
|
12143
12143
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12144
12144
|
ellipsis: true,
|
|
12145
|
-
width:
|
|
12146
|
-
},
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12145
|
+
width: 250
|
|
12146
|
+
},
|
|
12147
|
+
// {
|
|
12148
|
+
// dataIndex: 'goodPicUrl',
|
|
12149
|
+
// title: `商品图片`,
|
|
12150
|
+
// ellipsis: true,
|
|
12151
|
+
// width: 100,
|
|
12152
|
+
// render: (picUrl: string) => {
|
|
12153
|
+
// return (
|
|
12154
|
+
// <img
|
|
12155
|
+
// style={{
|
|
12156
|
+
// width: '40px',
|
|
12157
|
+
// height: '40px',
|
|
12158
|
+
// objectFit: 'contain',
|
|
12159
|
+
// }}
|
|
12160
|
+
// src={picUrl}
|
|
12161
|
+
// ></img>
|
|
12162
|
+
// );
|
|
12163
|
+
// },
|
|
12164
|
+
// },
|
|
12165
|
+
{
|
|
12166
|
+
dataIndex: 'goodNo',
|
|
12163
12167
|
title: "\u8D27\u53F7",
|
|
12164
12168
|
ellipsis: true,
|
|
12165
|
-
width:
|
|
12169
|
+
width: 150
|
|
12166
12170
|
}, {
|
|
12167
|
-
dataIndex: '
|
|
12171
|
+
dataIndex: 'goodId',
|
|
12168
12172
|
title: "\u8D27\u53F7ID",
|
|
12169
12173
|
ellipsis: true,
|
|
12170
|
-
width:
|
|
12174
|
+
width: 100
|
|
12171
12175
|
}, {
|
|
12172
12176
|
dataIndex: 'colorName',
|
|
12173
12177
|
title: "\u989C\u8272\u540D\u79F0",
|
|
12174
12178
|
ellipsis: true,
|
|
12175
|
-
width:
|
|
12179
|
+
width: 100
|
|
12176
12180
|
}, {
|
|
12177
12181
|
dataIndex: 'colorCode',
|
|
12178
12182
|
title: "\u989C\u8272\u4EE3\u7801",
|
|
12179
12183
|
ellipsis: true,
|
|
12180
|
-
width:
|
|
12184
|
+
width: 100
|
|
12181
12185
|
}, {
|
|
12182
12186
|
dataIndex: 'sizeName',
|
|
12183
12187
|
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12184
12188
|
ellipsis: true,
|
|
12185
|
-
width:
|
|
12189
|
+
width: 100
|
|
12186
12190
|
}, {
|
|
12187
12191
|
dataIndex: 'sizeCode',
|
|
12188
12192
|
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12189
12193
|
ellipsis: true,
|
|
12190
|
-
width:
|
|
12194
|
+
width: 100
|
|
12191
12195
|
}, {
|
|
12192
12196
|
dataIndex: 'brandName',
|
|
12193
12197
|
title: "\u54C1\u724C\u540D\u79F0",
|
|
12194
12198
|
ellipsis: true,
|
|
12195
|
-
width:
|
|
12196
|
-
}, {
|
|
12197
|
-
dataIndex: 'goodsNumber',
|
|
12198
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12199
|
-
ellipsis: true,
|
|
12200
|
-
width: 70
|
|
12201
|
-
}, {
|
|
12202
|
-
dataIndex: 'goodsPrice',
|
|
12203
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12204
|
-
ellipsis: true,
|
|
12205
|
-
width: 70
|
|
12206
|
-
}, {
|
|
12207
|
-
dataIndex: 'shopPrice',
|
|
12208
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12209
|
-
ellipsis: true,
|
|
12210
|
-
width: 70
|
|
12211
|
-
}, {
|
|
12212
|
-
dataIndex: 'sharePrice',
|
|
12213
|
-
title: "\u5206\u644A\u4EF7",
|
|
12214
|
-
ellipsis: true,
|
|
12215
|
-
width: 70
|
|
12216
|
-
}, {
|
|
12217
|
-
dataIndex: 'sharePayment',
|
|
12218
|
-
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
12219
|
-
ellipsis: true,
|
|
12220
|
-
width: 70
|
|
12221
|
-
}, {
|
|
12222
|
-
dataIndex: 'payment',
|
|
12223
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
12224
|
-
ellipsis: true,
|
|
12225
|
-
width: 70
|
|
12226
|
-
}, {
|
|
12227
|
-
dataIndex: 'tcSku',
|
|
12228
|
-
title: "\u5957\u9910SKU",
|
|
12229
|
-
ellipsis: true,
|
|
12230
|
-
width: 70
|
|
12231
|
-
}, {
|
|
12232
|
-
dataIndex: 'tcGoodsNumber',
|
|
12233
|
-
title: "\u5957\u9910\u5957\u6570",
|
|
12234
|
-
ellipsis: true,
|
|
12235
|
-
width: 70
|
|
12199
|
+
width: 100
|
|
12236
12200
|
}, {
|
|
12237
|
-
dataIndex: '
|
|
12238
|
-
title: "\
|
|
12201
|
+
dataIndex: 'marketPrice',
|
|
12202
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12239
12203
|
ellipsis: true,
|
|
12240
|
-
width:
|
|
12204
|
+
width: 100
|
|
12241
12205
|
}, {
|
|
12242
|
-
dataIndex: '
|
|
12243
|
-
title: "\
|
|
12206
|
+
dataIndex: 'retailPrice',
|
|
12207
|
+
title: "\u552E\u4EF7",
|
|
12244
12208
|
ellipsis: true,
|
|
12245
|
-
width:
|
|
12209
|
+
width: 100
|
|
12246
12210
|
}];
|
|
12247
12211
|
var GoodList$1 = function GoodList(props, ref) {
|
|
12248
12212
|
var _useState = useState([]),
|
|
@@ -12276,7 +12240,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12276
12240
|
layout: "inline",
|
|
12277
12241
|
form: form
|
|
12278
12242
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12279
|
-
name: "
|
|
12243
|
+
name: "goodNo",
|
|
12280
12244
|
style: {
|
|
12281
12245
|
marginBottom: '12px'
|
|
12282
12246
|
}
|
|
@@ -12287,7 +12251,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12287
12251
|
width: 150
|
|
12288
12252
|
}
|
|
12289
12253
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12290
|
-
name: "
|
|
12254
|
+
name: "goodName",
|
|
12291
12255
|
style: {
|
|
12292
12256
|
marginBottom: '12px'
|
|
12293
12257
|
}
|
|
@@ -12298,7 +12262,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12298
12262
|
width: 150
|
|
12299
12263
|
}
|
|
12300
12264
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12301
|
-
name: "
|
|
12265
|
+
name: "skuCode",
|
|
12302
12266
|
style: {
|
|
12303
12267
|
marginBottom: '12px'
|
|
12304
12268
|
}
|
|
@@ -12415,7 +12379,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12415
12379
|
}
|
|
12416
12380
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12417
12381
|
rowSelection: rowSelection,
|
|
12418
|
-
rowKey: "
|
|
12382
|
+
rowKey: "specNo",
|
|
12419
12383
|
columns: columns$2,
|
|
12420
12384
|
scroll: {
|
|
12421
12385
|
x: '100%',
|
|
@@ -12475,15 +12439,197 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12475
12439
|
};
|
|
12476
12440
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12477
12441
|
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12442
|
+
var columns$3 = [{
|
|
12443
|
+
dataIndex: 'sku',
|
|
12444
|
+
title: "SKU",
|
|
12445
|
+
width: 150
|
|
12446
|
+
}, {
|
|
12447
|
+
dataIndex: 'skuId',
|
|
12448
|
+
title: "SKU ID",
|
|
12449
|
+
width: 150
|
|
12450
|
+
}, {
|
|
12451
|
+
dataIndex: 'goodsName',
|
|
12452
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12453
|
+
width: 150
|
|
12454
|
+
}, {
|
|
12455
|
+
dataIndex: 'goodsShortName',
|
|
12456
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12457
|
+
width: 150
|
|
12458
|
+
}, {
|
|
12459
|
+
dataIndex: 'picPath',
|
|
12460
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12461
|
+
width: 150
|
|
12462
|
+
}, {
|
|
12463
|
+
dataIndex: 'goodsSn',
|
|
12464
|
+
title: "\u8D27\u53F7",
|
|
12465
|
+
width: 150
|
|
12466
|
+
}, {
|
|
12467
|
+
dataIndex: 'goodsId',
|
|
12468
|
+
title: "\u8D27\u53F7ID",
|
|
12469
|
+
width: 150
|
|
12470
|
+
}, {
|
|
12471
|
+
dataIndex: 'colorName',
|
|
12472
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12473
|
+
width: 150
|
|
12474
|
+
}, {
|
|
12475
|
+
dataIndex: 'colorCode',
|
|
12476
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12477
|
+
width: 150
|
|
12478
|
+
}, {
|
|
12479
|
+
dataIndex: 'sizeName',
|
|
12480
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12481
|
+
width: 150
|
|
12482
|
+
}, {
|
|
12483
|
+
dataIndex: 'sizeCode',
|
|
12484
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12485
|
+
width: 150
|
|
12486
|
+
}, {
|
|
12487
|
+
dataIndex: 'brandName',
|
|
12488
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12489
|
+
width: 150
|
|
12490
|
+
}, {
|
|
12491
|
+
dataIndex: 'goodsNumber',
|
|
12492
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12493
|
+
width: 150
|
|
12494
|
+
}, {
|
|
12495
|
+
dataIndex: 'goodsPrice',
|
|
12496
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12497
|
+
width: 150
|
|
12498
|
+
}, {
|
|
12499
|
+
dataIndex: 'shopPrice',
|
|
12500
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12501
|
+
width: 150
|
|
12502
|
+
}, {
|
|
12503
|
+
dataIndex: 'isGift',
|
|
12504
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12505
|
+
width: 150,
|
|
12506
|
+
render: function render(val) {
|
|
12507
|
+
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12508
|
+
}
|
|
12509
|
+
}];
|
|
12510
|
+
var renderFieldMap = {
|
|
12511
|
+
goodsNumber: function goodsNumber(_ref) {
|
|
12512
|
+
var disabled = _ref.disabled,
|
|
12513
|
+
updateHandle = _ref.updateHandle;
|
|
12514
|
+
return function (val, record, index) {
|
|
12515
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12516
|
+
style: {
|
|
12517
|
+
width: 70
|
|
12518
|
+
},
|
|
12519
|
+
value: val,
|
|
12520
|
+
min: 1,
|
|
12521
|
+
precision: 0,
|
|
12522
|
+
onChange: function onChange(num) {
|
|
12523
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12524
|
+
}
|
|
12525
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12526
|
+
};
|
|
12527
|
+
},
|
|
12528
|
+
goodsPrice: function goodsPrice(_ref2) {
|
|
12529
|
+
var disabled = _ref2.disabled,
|
|
12530
|
+
updateHandle = _ref2.updateHandle;
|
|
12531
|
+
return function (val, record, index) {
|
|
12532
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12533
|
+
style: {
|
|
12534
|
+
width: 70
|
|
12535
|
+
},
|
|
12536
|
+
value: val,
|
|
12537
|
+
min: 0,
|
|
12538
|
+
onChange: function onChange(value) {
|
|
12539
|
+
return updateHandle(value, index, 'goodsPrice');
|
|
12540
|
+
}
|
|
12541
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12542
|
+
};
|
|
12543
|
+
},
|
|
12544
|
+
isGift: function isGift(_ref3) {
|
|
12545
|
+
var disabled = _ref3.disabled,
|
|
12546
|
+
updateHandle = _ref3.updateHandle;
|
|
12547
|
+
return function (val, record, index) {
|
|
12548
|
+
var options = [{
|
|
12549
|
+
label: '是',
|
|
12550
|
+
value: 1
|
|
12551
|
+
}, {
|
|
12552
|
+
label: '否',
|
|
12553
|
+
value: 0
|
|
12554
|
+
}];
|
|
12555
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
12556
|
+
style: {
|
|
12557
|
+
width: 70
|
|
12558
|
+
},
|
|
12559
|
+
options: options,
|
|
12560
|
+
value: val,
|
|
12561
|
+
onChange: function onChange(value) {
|
|
12562
|
+
return updateHandle(value, index, 'isGift');
|
|
12563
|
+
},
|
|
12564
|
+
getPopupContainer: function getPopupContainer() {
|
|
12565
|
+
return document.getElementById('bsE3ReissueGoods');
|
|
12566
|
+
}
|
|
12567
|
+
}) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12568
|
+
};
|
|
12569
|
+
}
|
|
12570
|
+
};
|
|
12571
|
+
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
12572
|
+
var disabled = _ref4.disabled,
|
|
12573
|
+
updateHandle = _ref4.updateHandle,
|
|
12574
|
+
operate = _ref4.operate;
|
|
12575
|
+
return columns$3.map(function (item) {
|
|
12576
|
+
var newItem = _objectSpread2({
|
|
12577
|
+
align: 'center',
|
|
12578
|
+
ellipsis: true
|
|
12579
|
+
}, item);
|
|
12580
|
+
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
12581
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12582
|
+
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
12583
|
+
disabled: disabled,
|
|
12584
|
+
updateHandle: updateHandle
|
|
12585
|
+
})
|
|
12586
|
+
});
|
|
12587
|
+
}
|
|
12588
|
+
return newItem;
|
|
12589
|
+
});
|
|
12590
|
+
};
|
|
12591
|
+
|
|
12592
|
+
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12593
|
+
var columns = _ref.columns,
|
|
12594
|
+
dataSource = _ref.dataSource,
|
|
12595
|
+
selectedRowKeys = _ref.selectedRowKeys,
|
|
12596
|
+
onChangeSelectedKeys = _ref.onChangeSelectedKeys;
|
|
12597
|
+
var _useState = useState(false),
|
|
12598
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12599
|
+
tradeGoodsVisible = _useState2[0],
|
|
12600
|
+
setTradeGoodsVisible = _useState2[1];
|
|
12601
|
+
var openModal = function openModal() {
|
|
12602
|
+
return setTradeGoodsVisible(true);
|
|
12603
|
+
};
|
|
12604
|
+
var closeModal = function closeModal() {
|
|
12605
|
+
return setTradeGoodsVisible(false);
|
|
12606
|
+
};
|
|
12607
|
+
var rowSelection = {
|
|
12608
|
+
selectedRowKeys: selectedRowKeys,
|
|
12609
|
+
onChange: onChangeSelectedKeys
|
|
12610
|
+
};
|
|
12611
|
+
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12612
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
12613
|
+
type: "link",
|
|
12614
|
+
onClick: openModal
|
|
12615
|
+
}, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
|
|
12616
|
+
title: "\u8BA2\u5355\u5546\u54C1",
|
|
12617
|
+
visible: tradeGoodsVisible,
|
|
12618
|
+
footer: null,
|
|
12619
|
+
onCancel: closeModal
|
|
12620
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
12621
|
+
rowKey: "sku",
|
|
12622
|
+
rowSelection: rowSelection,
|
|
12623
|
+
columns: columns,
|
|
12624
|
+
dataSource: dataSource,
|
|
12625
|
+
pagination: false,
|
|
12626
|
+
scroll: {
|
|
12627
|
+
x: 500,
|
|
12628
|
+
y: 500
|
|
12629
|
+
}
|
|
12630
|
+
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12631
|
+
};
|
|
12485
12632
|
var GoodItem$1 = function GoodItem(props) {
|
|
12486
|
-
var _ref;
|
|
12487
12633
|
var _props$value = props.value,
|
|
12488
12634
|
value = _props$value === void 0 ? [] : _props$value,
|
|
12489
12635
|
type = props.type,
|
|
@@ -12517,8 +12663,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12517
12663
|
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
12518
12664
|
onSelect = props.onSelect,
|
|
12519
12665
|
onDelete = props.onDelete,
|
|
12520
|
-
onModeChange = props.onModeChange
|
|
12666
|
+
onModeChange = props.onModeChange,
|
|
12667
|
+
tradeGoods = props.tradeGoods;
|
|
12521
12668
|
var refModal = useRef();
|
|
12669
|
+
console.debug('表格数据', value);
|
|
12522
12670
|
var handleDelete = function handleDelete(record, index) {
|
|
12523
12671
|
onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
|
|
12524
12672
|
var newList = _toConsumableArray(value).filter(function (item, i) {
|
|
@@ -12526,13 +12674,19 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12526
12674
|
});
|
|
12527
12675
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
|
|
12528
12676
|
};
|
|
12529
|
-
var
|
|
12530
|
-
|
|
12531
|
-
selectedRowKeys =
|
|
12532
|
-
setSelectedRowKeys =
|
|
12677
|
+
var _useState3 = useState([]),
|
|
12678
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12679
|
+
selectedRowKeys = _useState4[0],
|
|
12680
|
+
setSelectedRowKeys = _useState4[1];
|
|
12533
12681
|
useEffect(function () {
|
|
12534
12682
|
setSelectedRowKeys([]);
|
|
12535
12683
|
}, [tableSelect, selectType]);
|
|
12684
|
+
// TODO: 商品订单中以选中商品
|
|
12685
|
+
var selectedGoods = useMemo(function () {
|
|
12686
|
+
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12687
|
+
return v.sku;
|
|
12688
|
+
});
|
|
12689
|
+
}, [value]);
|
|
12536
12690
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
12537
12691
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
12538
12692
|
value[index][columnType] = val;
|
|
@@ -12566,6 +12720,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12566
12720
|
};
|
|
12567
12721
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12568
12722
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12723
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12569
12724
|
return function (type) {
|
|
12570
12725
|
var columns = [];
|
|
12571
12726
|
switch (type) {
|
|
@@ -13059,10 +13214,22 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13059
13214
|
title: "\u662F\u5426\u8D60\u54C1",
|
|
13060
13215
|
align: 'center',
|
|
13061
13216
|
ellipsis: true,
|
|
13062
|
-
width: 100
|
|
13217
|
+
width: 100,
|
|
13218
|
+
render: function render(val) {
|
|
13219
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13220
|
+
}
|
|
13063
13221
|
}];
|
|
13064
13222
|
}
|
|
13065
13223
|
break;
|
|
13224
|
+
case 'BS_E3_REISSUE_GOODS':
|
|
13225
|
+
{
|
|
13226
|
+
columns = getBsE3ReissueGoodColumns({
|
|
13227
|
+
disabled: disabled,
|
|
13228
|
+
updateHandle: updateHandle,
|
|
13229
|
+
operate: operate
|
|
13230
|
+
});
|
|
13231
|
+
}
|
|
13232
|
+
break;
|
|
13066
13233
|
default:
|
|
13067
13234
|
columns = [{
|
|
13068
13235
|
dataIndex: 'mark',
|
|
@@ -13202,6 +13369,19 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13202
13369
|
}
|
|
13203
13370
|
return columnList;
|
|
13204
13371
|
}, [showHeader, value, disabled]);
|
|
13372
|
+
var orderColumns = useMemo(function () {
|
|
13373
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
13374
|
+
return [{
|
|
13375
|
+
dataIndex: '',
|
|
13376
|
+
title: '序号',
|
|
13377
|
+
align: 'center',
|
|
13378
|
+
ellipsis: true,
|
|
13379
|
+
width: 50,
|
|
13380
|
+
render: function render(val, record, index) {
|
|
13381
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
13382
|
+
}
|
|
13383
|
+
}].concat(_toConsumableArray(columns));
|
|
13384
|
+
}, []);
|
|
13205
13385
|
var onSubmit = function onSubmit(list) {
|
|
13206
13386
|
var newList = [];
|
|
13207
13387
|
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -13220,12 +13400,36 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13220
13400
|
});
|
|
13221
13401
|
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
13222
13402
|
newList = list.map(function (item) {
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13403
|
+
var specNo = item.specNo,
|
|
13404
|
+
specId = item.specId,
|
|
13405
|
+
goodName = item.goodName,
|
|
13406
|
+
goodShortName = item.goodShortName,
|
|
13407
|
+
goodPicUrl = item.goodPicUrl,
|
|
13408
|
+
goodNo = item.goodNo,
|
|
13409
|
+
goodId = item.goodId,
|
|
13410
|
+
retailPrice = item.retailPrice;
|
|
13411
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13412
|
+
sku: specNo,
|
|
13413
|
+
skuId: specId,
|
|
13414
|
+
goodsName: goodName,
|
|
13415
|
+
goodsShortName: goodShortName,
|
|
13416
|
+
picPath: goodPicUrl,
|
|
13417
|
+
goodsSn: goodNo,
|
|
13418
|
+
goodsId: goodId,
|
|
13419
|
+
goodsPrice: retailPrice,
|
|
13420
|
+
shopPrice: retailPrice,
|
|
13421
|
+
sharePayment: '',
|
|
13422
|
+
sharePrice: '',
|
|
13423
|
+
payment: '',
|
|
13424
|
+
tcSku: '',
|
|
13425
|
+
tcGoodsNumber: '',
|
|
13426
|
+
taoCanSingleSl: '',
|
|
13427
|
+
isGift: '',
|
|
13428
|
+
uuid: uuid(),
|
|
13429
|
+
canDelete: true,
|
|
13430
|
+
goodsNumber: 1,
|
|
13431
|
+
canUpdateNumber: canUpdateNumber
|
|
13432
|
+
});
|
|
13229
13433
|
});
|
|
13230
13434
|
} else {
|
|
13231
13435
|
newList = list.map(function (item) {
|
|
@@ -13286,10 +13490,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13286
13490
|
}, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
|
|
13287
13491
|
checked: isStrict,
|
|
13288
13492
|
onChange: handleCheckboxChange
|
|
13289
|
-
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !(
|
|
13493
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
|
|
13494
|
+
columns: orderColumns,
|
|
13495
|
+
dataSource: tradeGoods.originDataSource,
|
|
13496
|
+
selectedRowKeys: selectedGoods,
|
|
13497
|
+
onChangeSelectedKeys: tradeGoods.selectedGoodsChange
|
|
13498
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
13290
13499
|
type: "link",
|
|
13291
13500
|
onClick: handleChangeGoods
|
|
13292
|
-
},
|
|
13501
|
+
}, ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? '选择百胜ERP商品' : '选择商品'), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13293
13502
|
columns: newColumns,
|
|
13294
13503
|
dataSource: value,
|
|
13295
13504
|
rowKey: 'uuid',
|
|
@@ -13998,25 +14207,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
13998
14207
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
13999
14208
|
var _data$data, _data$data$orderList;
|
|
14000
14209
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
|
|
14001
|
-
|
|
14002
|
-
data.data.orderList = (_filterBsE3Orders = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
|
|
14003
|
-
var isSplit = item.isSplit,
|
|
14004
|
-
isSplitNew = item.isSplitNew,
|
|
14005
|
-
isCopy = item.isCopy,
|
|
14006
|
-
isExchangeOrder = item.isExchangeOrder,
|
|
14007
|
-
isCombineNew = item.isCombineNew,
|
|
14008
|
-
isCombine = item.isCombine,
|
|
14009
|
-
orderStatus = item.orderStatus;
|
|
14010
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14011
|
-
orderStatus: BS_E3_ORDER_STATUS_MAP[orderStatus],
|
|
14012
|
-
isSplit: BS_E3_BOOLEAN_STATUS_MAP[isSplit],
|
|
14013
|
-
isSplitNew: BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
|
|
14014
|
-
isExchangeOrder: BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
|
|
14015
|
-
isCopy: BS_E3_BOOLEAN_STATUS_MAP[isCopy],
|
|
14016
|
-
isCombineNew: BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
|
|
14017
|
-
isCombine: BS_E3_BOOLEAN_STATUS_MAP[isCombine]
|
|
14018
|
-
});
|
|
14019
|
-
});
|
|
14210
|
+
data.data.orderList = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
|
|
14020
14211
|
}
|
|
14021
14212
|
resolve(data.data);
|
|
14022
14213
|
} else {
|
|
@@ -14081,37 +14272,58 @@ var columnsMap = {
|
|
|
14081
14272
|
title: '订单状态',
|
|
14082
14273
|
dataIndex: 'orderStatus',
|
|
14083
14274
|
width: 100,
|
|
14084
|
-
ellipsis: true
|
|
14275
|
+
ellipsis: true,
|
|
14276
|
+
render: function render(val) {
|
|
14277
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
|
|
14278
|
+
}
|
|
14085
14279
|
}, {
|
|
14086
14280
|
title: '是否被拆分',
|
|
14087
14281
|
dataIndex: 'isSplit',
|
|
14088
|
-
width:
|
|
14089
|
-
ellipsis: true
|
|
14282
|
+
width: 100,
|
|
14283
|
+
ellipsis: true,
|
|
14284
|
+
render: function render(val) {
|
|
14285
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14286
|
+
}
|
|
14090
14287
|
}, {
|
|
14091
14288
|
title: '是否拆分子单',
|
|
14092
14289
|
dataIndex: 'isSplitNew',
|
|
14093
|
-
width:
|
|
14094
|
-
ellipsis: true
|
|
14290
|
+
width: 100,
|
|
14291
|
+
ellipsis: true,
|
|
14292
|
+
render: function render(val) {
|
|
14293
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14294
|
+
}
|
|
14095
14295
|
}, {
|
|
14096
14296
|
title: '是否被合并',
|
|
14097
14297
|
dataIndex: 'isCombine',
|
|
14098
|
-
width:
|
|
14099
|
-
ellipsis: true
|
|
14298
|
+
width: 100,
|
|
14299
|
+
ellipsis: true,
|
|
14300
|
+
render: function render(val) {
|
|
14301
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14302
|
+
}
|
|
14100
14303
|
}, {
|
|
14101
14304
|
title: '是否合并新单',
|
|
14102
14305
|
dataIndex: 'isCombineNew',
|
|
14103
|
-
width:
|
|
14104
|
-
ellipsis: true
|
|
14306
|
+
width: 100,
|
|
14307
|
+
ellipsis: true,
|
|
14308
|
+
render: function render(val) {
|
|
14309
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14310
|
+
}
|
|
14105
14311
|
}, {
|
|
14106
14312
|
title: '是否复制单',
|
|
14107
14313
|
dataIndex: 'isCopy',
|
|
14108
|
-
width:
|
|
14109
|
-
ellipsis: true
|
|
14314
|
+
width: 100,
|
|
14315
|
+
ellipsis: true,
|
|
14316
|
+
render: function render(val) {
|
|
14317
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14318
|
+
}
|
|
14110
14319
|
}, {
|
|
14111
14320
|
title: '是否换货单',
|
|
14112
14321
|
dataIndex: 'isExchangeOrder',
|
|
14113
|
-
width:
|
|
14114
|
-
ellipsis: true
|
|
14322
|
+
width: 100,
|
|
14323
|
+
ellipsis: true,
|
|
14324
|
+
render: function render(val) {
|
|
14325
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14326
|
+
}
|
|
14115
14327
|
}, {
|
|
14116
14328
|
title: '订单备注',
|
|
14117
14329
|
dataIndex: 'orderMsg',
|
|
@@ -14422,7 +14634,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
14422
14634
|
valueRef.current = value;
|
|
14423
14635
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo)) {
|
|
14424
14636
|
getOrderFlag.current = true;
|
|
14425
|
-
getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
|
|
14637
|
+
compType.indexOf('WDT') > -1 && getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
|
|
14426
14638
|
}
|
|
14427
14639
|
}, [value]);
|
|
14428
14640
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
@@ -14859,11 +15071,12 @@ var typeMap$1 = {
|
|
|
14859
15071
|
formatDefaultField: {
|
|
14860
15072
|
money: 'orderPrice',
|
|
14861
15073
|
share: 'sharePrice'
|
|
14862
|
-
}
|
|
15074
|
+
},
|
|
15075
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
14863
15076
|
}
|
|
14864
15077
|
};
|
|
14865
15078
|
var wdtReissue = function wdtReissue(props) {
|
|
14866
|
-
var _value$wdtSystemOrder, _typeMap$type7, _typeMap$
|
|
15079
|
+
var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
14867
15080
|
var value = props.value,
|
|
14868
15081
|
onChange = props.onChange,
|
|
14869
15082
|
_props$reasonList = props.reasonList,
|
|
@@ -14885,7 +15098,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14885
15098
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$1[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$1[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)) {
|
|
14886
15099
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
14887
15100
|
getOrderFlag.current = true;
|
|
14888
|
-
|
|
15101
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[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);
|
|
14889
15102
|
}
|
|
14890
15103
|
return;
|
|
14891
15104
|
}, [value]);
|
|
@@ -14903,13 +15116,30 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14903
15116
|
}
|
|
14904
15117
|
return;
|
|
14905
15118
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
|
|
14906
|
-
|
|
15119
|
+
// const getWdtOrderList = async (orderNo: string) => {
|
|
15120
|
+
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
15121
|
+
// const orders = data?.trades || [];
|
|
15122
|
+
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
15123
|
+
// return { billNo, billType, billTag }
|
|
15124
|
+
// });
|
|
15125
|
+
// onChange({
|
|
15126
|
+
// ...value,
|
|
15127
|
+
// [typeMap[type]?.systemOrder]: {
|
|
15128
|
+
// ...value[typeMap[type]?.systemOrder],
|
|
15129
|
+
// showOrderInfo,
|
|
15130
|
+
// orders,
|
|
15131
|
+
// },
|
|
15132
|
+
// });
|
|
15133
|
+
// })
|
|
15134
|
+
// };
|
|
15135
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
14907
15136
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
15137
|
+
var _typeMap$type8;
|
|
14908
15138
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14909
15139
|
while (1) switch (_context.prev = _context.next) {
|
|
14910
15140
|
case 0:
|
|
14911
|
-
|
|
14912
|
-
var _typeMap$
|
|
15141
|
+
(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
|
|
15142
|
+
var _typeMap$type9, _typeMap$type10;
|
|
14913
15143
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
14914
15144
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
14915
15145
|
var billNo = _ref2.billNo,
|
|
@@ -14921,7 +15151,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14921
15151
|
billTag: billTag
|
|
14922
15152
|
};
|
|
14923
15153
|
});
|
|
14924
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
15154
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder]), {}, {
|
|
14925
15155
|
showOrderInfo: showOrderInfo,
|
|
14926
15156
|
orders: orders
|
|
14927
15157
|
}))));
|
|
@@ -14932,43 +15162,43 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14932
15162
|
}
|
|
14933
15163
|
}, _callee);
|
|
14934
15164
|
}));
|
|
14935
|
-
return function
|
|
15165
|
+
return function getOrderList(_x) {
|
|
14936
15166
|
return _ref.apply(this, arguments);
|
|
14937
15167
|
};
|
|
14938
15168
|
}();
|
|
14939
15169
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
14940
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
15170
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
14941
15171
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
14942
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
15172
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$1[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])) return;
|
|
14943
15173
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
14944
15174
|
var newValue = _objectSpread2({}, value);
|
|
14945
|
-
newValue[(_typeMap$
|
|
15175
|
+
newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
14946
15176
|
if (typeName === '1') {
|
|
14947
|
-
var _typeMap$
|
|
14948
|
-
newValue[(_typeMap$
|
|
15177
|
+
var _typeMap$type13;
|
|
15178
|
+
newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
14949
15179
|
mode: isStrict
|
|
14950
15180
|
});
|
|
14951
15181
|
} else if (typeName === '2') {
|
|
14952
|
-
var _typeMap$
|
|
15182
|
+
var _typeMap$type14;
|
|
14953
15183
|
// 切换到非原单,清空列表
|
|
14954
|
-
newValue[(_typeMap$
|
|
15184
|
+
newValue[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
14955
15185
|
}
|
|
14956
15186
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14957
15187
|
};
|
|
14958
15188
|
var handleModeChange = function handleModeChange(mode) {
|
|
14959
|
-
var _value$typeMap$type$t3, _typeMap$
|
|
14960
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
15189
|
+
var _value$typeMap$type$t3, _typeMap$type15, _typeMap$type16;
|
|
15190
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
|
|
14961
15191
|
setIsStrict(mode);
|
|
14962
15192
|
if (!isOriginalOrder) return;
|
|
14963
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
15193
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
14964
15194
|
mode: mode
|
|
14965
15195
|
}))));
|
|
14966
15196
|
};
|
|
14967
15197
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
14968
|
-
var _typeMap$
|
|
15198
|
+
var _typeMap$type17, _typeMap$type18, _order$goodDetails;
|
|
14969
15199
|
var mode = _ref3.mode;
|
|
14970
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
14971
|
-
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15200
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
15201
|
+
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
14972
15202
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
14973
15203
|
return order.tradeNo === systemOrderNo;
|
|
14974
15204
|
});
|
|
@@ -14979,31 +15209,31 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14979
15209
|
}) : goodDetails;
|
|
14980
15210
|
};
|
|
14981
15211
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
14982
|
-
var _typeMap$
|
|
15212
|
+
var _typeMap$type19;
|
|
14983
15213
|
var newValue = _objectSpread2({}, value);
|
|
14984
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14985
|
-
var _typeMap$
|
|
14986
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14987
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15214
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
|
|
15215
|
+
var _typeMap$type20, _typeMap$type21;
|
|
15216
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
|
|
15217
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
|
|
14988
15218
|
return item;
|
|
14989
15219
|
});
|
|
14990
15220
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14991
15221
|
};
|
|
14992
15222
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
14993
|
-
var _typeMap$
|
|
15223
|
+
var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
|
|
14994
15224
|
var newValue = _objectSpread2({}, value);
|
|
14995
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14996
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
14997
|
-
var _typeMap$
|
|
14998
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15225
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
15226
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
15227
|
+
var _typeMap$type24;
|
|
15228
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
|
|
14999
15229
|
}
|
|
15000
15230
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15001
15231
|
};
|
|
15002
15232
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15003
15233
|
var showChangeBtn = useMemo(function () {
|
|
15004
|
-
var _typeMap$
|
|
15005
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15006
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15234
|
+
var _typeMap$type25;
|
|
15235
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
|
|
15236
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
|
|
15007
15237
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
15008
15238
|
gutter: 8,
|
|
15009
15239
|
wrap: true
|
|
@@ -15021,12 +15251,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15021
15251
|
},
|
|
15022
15252
|
disabled: disabled,
|
|
15023
15253
|
allowClear: false,
|
|
15024
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15254
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
|
|
15025
15255
|
onChange: function onChange(val) {
|
|
15026
15256
|
return changeSystemOrderHandle(val);
|
|
15027
15257
|
},
|
|
15028
15258
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15029
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15259
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
15030
15260
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
15031
15261
|
key: item.billNo,
|
|
15032
15262
|
value: item.billNo,
|
|
@@ -15047,7 +15277,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15047
15277
|
disabled: disabled,
|
|
15048
15278
|
allowClear: false,
|
|
15049
15279
|
options: reasonList,
|
|
15050
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15280
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
|
|
15051
15281
|
onChange: function onChange(val) {
|
|
15052
15282
|
return changeTypeHandle(val);
|
|
15053
15283
|
}
|
|
@@ -15059,7 +15289,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15059
15289
|
canUpdateNumber: showChangeBtn,
|
|
15060
15290
|
showChangeBtn: showChangeBtn,
|
|
15061
15291
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15062
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15292
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
|
|
15063
15293
|
onChange: function onChange(val) {
|
|
15064
15294
|
return changeGoodHandle(val);
|
|
15065
15295
|
},
|
|
@@ -15839,4 +16069,227 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
15839
16069
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
15840
16070
|
};
|
|
15841
16071
|
|
|
15842
|
-
|
|
16072
|
+
var _excluded$k = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
16073
|
+
var typeMap$2 = {
|
|
16074
|
+
BS_E3_REISSUE_GOODS: {
|
|
16075
|
+
key: 'bsE3ReissueGoods',
|
|
16076
|
+
typeName: 'bsE3ReissueType',
|
|
16077
|
+
systemOrder: 'bsE3SystemOrder',
|
|
16078
|
+
systemOrderNo: 'bsE3SystemOrderNo',
|
|
16079
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
16080
|
+
}
|
|
16081
|
+
};
|
|
16082
|
+
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16083
|
+
var _typeMap$type7, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
16084
|
+
var value = props.value,
|
|
16085
|
+
onChange = props.onChange,
|
|
16086
|
+
_props$reasonList = props.reasonList,
|
|
16087
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
16088
|
+
disabled = props.disabled,
|
|
16089
|
+
type = props.type,
|
|
16090
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
16091
|
+
var getOrderFlag = useRef(false);
|
|
16092
|
+
var _useState = useState(false),
|
|
16093
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16094
|
+
isStrict = _useState2[0],
|
|
16095
|
+
setIsStrict = _useState2[1];
|
|
16096
|
+
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
16097
|
+
useEffect(function () {
|
|
16098
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
16099
|
+
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)) {
|
|
16100
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
16101
|
+
getOrderFlag.current = true;
|
|
16102
|
+
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);
|
|
16103
|
+
}
|
|
16104
|
+
return;
|
|
16105
|
+
}, [value]);
|
|
16106
|
+
useEffect(function () {
|
|
16107
|
+
var _typeMap$type4;
|
|
16108
|
+
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
|
|
16109
|
+
if (systemOrderNo) {
|
|
16110
|
+
var _value$typeMap$type$t, _typeMap$type5;
|
|
16111
|
+
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
|
|
16112
|
+
var _typeMap$type6;
|
|
16113
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
|
|
16114
|
+
mode: isStrict
|
|
16115
|
+
}))));
|
|
16116
|
+
}
|
|
16117
|
+
}
|
|
16118
|
+
return;
|
|
16119
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
|
|
16120
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
16121
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
16122
|
+
var _typeMap$type8;
|
|
16123
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16124
|
+
while (1) switch (_context.prev = _context.next) {
|
|
16125
|
+
case 0:
|
|
16126
|
+
(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
|
|
16127
|
+
var _typeMap$type9, _typeMap$type10;
|
|
16128
|
+
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
16129
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
16130
|
+
var orderSn = _ref2.orderSn;
|
|
16131
|
+
return {
|
|
16132
|
+
billNo: orderSn
|
|
16133
|
+
};
|
|
16134
|
+
});
|
|
16135
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder]), {}, {
|
|
16136
|
+
showOrderInfo: showOrderInfo,
|
|
16137
|
+
orders: orders
|
|
16138
|
+
}))));
|
|
16139
|
+
});
|
|
16140
|
+
case 1:
|
|
16141
|
+
case "end":
|
|
16142
|
+
return _context.stop();
|
|
16143
|
+
}
|
|
16144
|
+
}, _callee);
|
|
16145
|
+
}));
|
|
16146
|
+
return function getOrderList(_x) {
|
|
16147
|
+
return _ref.apply(this, arguments);
|
|
16148
|
+
};
|
|
16149
|
+
}();
|
|
16150
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
16151
|
+
var _typeMap$type11;
|
|
16152
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
16153
|
+
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
16154
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
16155
|
+
var newValue = _objectSpread2({}, value);
|
|
16156
|
+
newValue[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
16157
|
+
if (typeName === '1') {
|
|
16158
|
+
var _typeMap$type12;
|
|
16159
|
+
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
16160
|
+
mode: isStrict
|
|
16161
|
+
});
|
|
16162
|
+
} else if (typeName === '2') {
|
|
16163
|
+
var _typeMap$type13;
|
|
16164
|
+
// 切换到非原单,清空列表
|
|
16165
|
+
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
16166
|
+
}
|
|
16167
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16168
|
+
};
|
|
16169
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
16170
|
+
var _value$typeMap$type$t2, _typeMap$type14, _typeMap$type15;
|
|
16171
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
16172
|
+
setIsStrict(mode);
|
|
16173
|
+
if (!isOriginalOrder) return;
|
|
16174
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
|
|
16175
|
+
mode: mode
|
|
16176
|
+
}))));
|
|
16177
|
+
};
|
|
16178
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
16179
|
+
var _typeMap$type16, _typeMap$type17, _order$orderDetailGet;
|
|
16180
|
+
var mode = _ref3.mode;
|
|
16181
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
|
|
16182
|
+
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
|
|
16183
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
16184
|
+
return order.orderSn === systemOrderNo;
|
|
16185
|
+
});
|
|
16186
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length) ? updateBsE3GoodsHandle([order]) : [];
|
|
16187
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
16188
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
16189
|
+
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
16190
|
+
}) : goodDetails;
|
|
16191
|
+
};
|
|
16192
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
16193
|
+
var _typeMap$type18;
|
|
16194
|
+
var newValue = _objectSpread2({}, value);
|
|
16195
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = val || [];
|
|
16196
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16197
|
+
};
|
|
16198
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
16199
|
+
var _typeMap$type19, _value$typeMap$type$t3, _typeMap$type20;
|
|
16200
|
+
var newValue = _objectSpread2({}, value);
|
|
16201
|
+
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.systemOrderNo)] = val;
|
|
16202
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
16203
|
+
var _typeMap$type21;
|
|
16204
|
+
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.key)] = [];
|
|
16205
|
+
}
|
|
16206
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16207
|
+
};
|
|
16208
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
16209
|
+
var showChangeBtn = useMemo(function () {
|
|
16210
|
+
var _typeMap$type22;
|
|
16211
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo]);
|
|
16212
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]]);
|
|
16213
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
16214
|
+
var _typeMap$type24, _getGoodDetails;
|
|
16215
|
+
var newValue = _objectSpread2({}, value);
|
|
16216
|
+
newValue["".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)] = (_getGoodDetails = getGoodDetails({
|
|
16217
|
+
mode: isStrict
|
|
16218
|
+
})) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
|
|
16219
|
+
return skuList.includes(item.sku);
|
|
16220
|
+
});
|
|
16221
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16222
|
+
}, [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.key)], isStrict]);
|
|
16223
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
16224
|
+
gutter: 8,
|
|
16225
|
+
wrap: true,
|
|
16226
|
+
id: "bsE3ReissueGoods"
|
|
16227
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
16228
|
+
className: "gutter-row",
|
|
16229
|
+
xs: {
|
|
16230
|
+
span: 11
|
|
16231
|
+
},
|
|
16232
|
+
sm: {
|
|
16233
|
+
span: 6
|
|
16234
|
+
}
|
|
16235
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
16236
|
+
style: {
|
|
16237
|
+
marginBottom: '8px'
|
|
16238
|
+
},
|
|
16239
|
+
disabled: disabled,
|
|
16240
|
+
allowClear: false,
|
|
16241
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
16242
|
+
onChange: function onChange(val) {
|
|
16243
|
+
return changeSystemOrderHandle(val);
|
|
16244
|
+
},
|
|
16245
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16246
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
16247
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
16248
|
+
key: item.billNo,
|
|
16249
|
+
value: item.billNo,
|
|
16250
|
+
label: item.billNo
|
|
16251
|
+
}, item.billNo);
|
|
16252
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
16253
|
+
className: "gutter-row",
|
|
16254
|
+
xs: {
|
|
16255
|
+
span: 11
|
|
16256
|
+
},
|
|
16257
|
+
sm: {
|
|
16258
|
+
span: 6
|
|
16259
|
+
}
|
|
16260
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
16261
|
+
style: {
|
|
16262
|
+
marginBottom: '8px'
|
|
16263
|
+
},
|
|
16264
|
+
disabled: disabled,
|
|
16265
|
+
allowClear: false,
|
|
16266
|
+
options: reasonList,
|
|
16267
|
+
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.typeName)],
|
|
16268
|
+
onChange: function onChange(val) {
|
|
16269
|
+
return changeTypeHandle(val);
|
|
16270
|
+
}
|
|
16271
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
16272
|
+
key: 'reissueGoods'
|
|
16273
|
+
}, other), {}, {
|
|
16274
|
+
type: type,
|
|
16275
|
+
disabled: disabled,
|
|
16276
|
+
canUpdateNumber: showChangeBtn,
|
|
16277
|
+
showChangeBtn: showChangeBtn,
|
|
16278
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16279
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
16280
|
+
onChange: function onChange(val) {
|
|
16281
|
+
return changeGoodHandle(val);
|
|
16282
|
+
},
|
|
16283
|
+
onModeChange: handleModeChange,
|
|
16284
|
+
showModeBtn: false,
|
|
16285
|
+
isStrict: isStrict,
|
|
16286
|
+
tradeGoods: {
|
|
16287
|
+
originDataSource: getGoodDetails({
|
|
16288
|
+
mode: isStrict
|
|
16289
|
+
}),
|
|
16290
|
+
selectedGoodsChange: selectedGoodsChange
|
|
16291
|
+
}
|
|
16292
|
+
})));
|
|
16293
|
+
};
|
|
16294
|
+
|
|
16295
|
+
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, 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 };
|