@kmkf-fe-packages/basic-components 1.19.11 → 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.js
CHANGED
|
@@ -12095,9 +12095,9 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12095
12095
|
var current = _ref.current,
|
|
12096
12096
|
pageSize = _ref.pageSize;
|
|
12097
12097
|
var data = {
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12098
|
+
goodNo: formData.goodNo || null,
|
|
12099
|
+
goodName: formData.goodName || null,
|
|
12100
|
+
skuCode: formData.skuCode || null,
|
|
12101
12101
|
skuId: formData.skuId || null
|
|
12102
12102
|
};
|
|
12103
12103
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
@@ -12105,7 +12105,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
|
|
|
12105
12105
|
data: _objectSpread2({
|
|
12106
12106
|
pageSize: pageSize,
|
|
12107
12107
|
pageNo: current,
|
|
12108
|
-
platform: '
|
|
12108
|
+
platform: 'BS_E3_ERP'
|
|
12109
12109
|
}, data)
|
|
12110
12110
|
}).then(function (res) {
|
|
12111
12111
|
var _res$data = res.data,
|
|
@@ -12134,127 +12134,91 @@ var columns$2 = [{
|
|
|
12134
12134
|
}
|
|
12135
12135
|
}, index + 1);
|
|
12136
12136
|
},
|
|
12137
|
-
width:
|
|
12137
|
+
width: 80
|
|
12138
12138
|
}, {
|
|
12139
|
-
dataIndex: '
|
|
12139
|
+
dataIndex: 'specNo',
|
|
12140
12140
|
title: "SKU",
|
|
12141
12141
|
ellipsis: true,
|
|
12142
|
-
width:
|
|
12142
|
+
width: 200
|
|
12143
12143
|
}, {
|
|
12144
|
-
dataIndex: '
|
|
12144
|
+
dataIndex: 'specId',
|
|
12145
12145
|
title: "SKU ID",
|
|
12146
12146
|
ellipsis: true,
|
|
12147
|
-
width:
|
|
12147
|
+
width: 80
|
|
12148
12148
|
}, {
|
|
12149
|
-
dataIndex: '
|
|
12149
|
+
dataIndex: 'goodName',
|
|
12150
12150
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
12151
12151
|
ellipsis: true,
|
|
12152
|
-
width:
|
|
12152
|
+
width: 250
|
|
12153
12153
|
}, {
|
|
12154
|
-
dataIndex: '
|
|
12154
|
+
dataIndex: 'goodShortName',
|
|
12155
12155
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12156
12156
|
ellipsis: true,
|
|
12157
|
-
width:
|
|
12158
|
-
},
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12157
|
+
width: 250
|
|
12158
|
+
},
|
|
12159
|
+
// {
|
|
12160
|
+
// dataIndex: 'goodPicUrl',
|
|
12161
|
+
// title: `商品图片`,
|
|
12162
|
+
// ellipsis: true,
|
|
12163
|
+
// width: 100,
|
|
12164
|
+
// render: (picUrl: string) => {
|
|
12165
|
+
// return (
|
|
12166
|
+
// <img
|
|
12167
|
+
// style={{
|
|
12168
|
+
// width: '40px',
|
|
12169
|
+
// height: '40px',
|
|
12170
|
+
// objectFit: 'contain',
|
|
12171
|
+
// }}
|
|
12172
|
+
// src={picUrl}
|
|
12173
|
+
// ></img>
|
|
12174
|
+
// );
|
|
12175
|
+
// },
|
|
12176
|
+
// },
|
|
12177
|
+
{
|
|
12178
|
+
dataIndex: 'goodNo',
|
|
12175
12179
|
title: "\u8D27\u53F7",
|
|
12176
12180
|
ellipsis: true,
|
|
12177
|
-
width:
|
|
12181
|
+
width: 150
|
|
12178
12182
|
}, {
|
|
12179
|
-
dataIndex: '
|
|
12183
|
+
dataIndex: 'goodId',
|
|
12180
12184
|
title: "\u8D27\u53F7ID",
|
|
12181
12185
|
ellipsis: true,
|
|
12182
|
-
width:
|
|
12186
|
+
width: 100
|
|
12183
12187
|
}, {
|
|
12184
12188
|
dataIndex: 'colorName',
|
|
12185
12189
|
title: "\u989C\u8272\u540D\u79F0",
|
|
12186
12190
|
ellipsis: true,
|
|
12187
|
-
width:
|
|
12191
|
+
width: 100
|
|
12188
12192
|
}, {
|
|
12189
12193
|
dataIndex: 'colorCode',
|
|
12190
12194
|
title: "\u989C\u8272\u4EE3\u7801",
|
|
12191
12195
|
ellipsis: true,
|
|
12192
|
-
width:
|
|
12196
|
+
width: 100
|
|
12193
12197
|
}, {
|
|
12194
12198
|
dataIndex: 'sizeName',
|
|
12195
12199
|
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12196
12200
|
ellipsis: true,
|
|
12197
|
-
width:
|
|
12201
|
+
width: 100
|
|
12198
12202
|
}, {
|
|
12199
12203
|
dataIndex: 'sizeCode',
|
|
12200
12204
|
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12201
12205
|
ellipsis: true,
|
|
12202
|
-
width:
|
|
12206
|
+
width: 100
|
|
12203
12207
|
}, {
|
|
12204
12208
|
dataIndex: 'brandName',
|
|
12205
12209
|
title: "\u54C1\u724C\u540D\u79F0",
|
|
12206
12210
|
ellipsis: true,
|
|
12207
|
-
width:
|
|
12208
|
-
}, {
|
|
12209
|
-
dataIndex: 'goodsNumber',
|
|
12210
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12211
|
-
ellipsis: true,
|
|
12212
|
-
width: 70
|
|
12213
|
-
}, {
|
|
12214
|
-
dataIndex: 'goodsPrice',
|
|
12215
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12216
|
-
ellipsis: true,
|
|
12217
|
-
width: 70
|
|
12218
|
-
}, {
|
|
12219
|
-
dataIndex: 'shopPrice',
|
|
12220
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12221
|
-
ellipsis: true,
|
|
12222
|
-
width: 70
|
|
12223
|
-
}, {
|
|
12224
|
-
dataIndex: 'sharePrice',
|
|
12225
|
-
title: "\u5206\u644A\u4EF7",
|
|
12226
|
-
ellipsis: true,
|
|
12227
|
-
width: 70
|
|
12228
|
-
}, {
|
|
12229
|
-
dataIndex: 'sharePayment',
|
|
12230
|
-
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
12231
|
-
ellipsis: true,
|
|
12232
|
-
width: 70
|
|
12233
|
-
}, {
|
|
12234
|
-
dataIndex: 'payment',
|
|
12235
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
12236
|
-
ellipsis: true,
|
|
12237
|
-
width: 70
|
|
12238
|
-
}, {
|
|
12239
|
-
dataIndex: 'tcSku',
|
|
12240
|
-
title: "\u5957\u9910SKU",
|
|
12241
|
-
ellipsis: true,
|
|
12242
|
-
width: 70
|
|
12243
|
-
}, {
|
|
12244
|
-
dataIndex: 'tcGoodsNumber',
|
|
12245
|
-
title: "\u5957\u9910\u5957\u6570",
|
|
12246
|
-
ellipsis: true,
|
|
12247
|
-
width: 70
|
|
12211
|
+
width: 100
|
|
12248
12212
|
}, {
|
|
12249
|
-
dataIndex: '
|
|
12250
|
-
title: "\
|
|
12213
|
+
dataIndex: 'marketPrice',
|
|
12214
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12251
12215
|
ellipsis: true,
|
|
12252
|
-
width:
|
|
12216
|
+
width: 100
|
|
12253
12217
|
}, {
|
|
12254
|
-
dataIndex: '
|
|
12255
|
-
title: "\
|
|
12218
|
+
dataIndex: 'retailPrice',
|
|
12219
|
+
title: "\u552E\u4EF7",
|
|
12256
12220
|
ellipsis: true,
|
|
12257
|
-
width:
|
|
12221
|
+
width: 100
|
|
12258
12222
|
}];
|
|
12259
12223
|
var GoodList$1 = function GoodList(props, ref) {
|
|
12260
12224
|
var _useState = React.useState([]),
|
|
@@ -12288,7 +12252,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12288
12252
|
layout: "inline",
|
|
12289
12253
|
form: form
|
|
12290
12254
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12291
|
-
name: "
|
|
12255
|
+
name: "goodNo",
|
|
12292
12256
|
style: {
|
|
12293
12257
|
marginBottom: '12px'
|
|
12294
12258
|
}
|
|
@@ -12299,7 +12263,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12299
12263
|
width: 150
|
|
12300
12264
|
}
|
|
12301
12265
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12302
|
-
name: "
|
|
12266
|
+
name: "goodName",
|
|
12303
12267
|
style: {
|
|
12304
12268
|
marginBottom: '12px'
|
|
12305
12269
|
}
|
|
@@ -12310,7 +12274,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12310
12274
|
width: 150
|
|
12311
12275
|
}
|
|
12312
12276
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12313
|
-
name: "
|
|
12277
|
+
name: "skuCode",
|
|
12314
12278
|
style: {
|
|
12315
12279
|
marginBottom: '12px'
|
|
12316
12280
|
}
|
|
@@ -12427,7 +12391,7 @@ var GoodList$1 = function GoodList(props, ref) {
|
|
|
12427
12391
|
}
|
|
12428
12392
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12429
12393
|
rowSelection: rowSelection,
|
|
12430
|
-
rowKey: "
|
|
12394
|
+
rowKey: "specNo",
|
|
12431
12395
|
columns: columns$2,
|
|
12432
12396
|
scroll: {
|
|
12433
12397
|
x: '100%',
|
|
@@ -12487,15 +12451,197 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12487
12451
|
};
|
|
12488
12452
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12489
12453
|
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12454
|
+
var columns$3 = [{
|
|
12455
|
+
dataIndex: 'sku',
|
|
12456
|
+
title: "SKU",
|
|
12457
|
+
width: 150
|
|
12458
|
+
}, {
|
|
12459
|
+
dataIndex: 'skuId',
|
|
12460
|
+
title: "SKU ID",
|
|
12461
|
+
width: 150
|
|
12462
|
+
}, {
|
|
12463
|
+
dataIndex: 'goodsName',
|
|
12464
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12465
|
+
width: 150
|
|
12466
|
+
}, {
|
|
12467
|
+
dataIndex: 'goodsShortName',
|
|
12468
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12469
|
+
width: 150
|
|
12470
|
+
}, {
|
|
12471
|
+
dataIndex: 'picPath',
|
|
12472
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12473
|
+
width: 150
|
|
12474
|
+
}, {
|
|
12475
|
+
dataIndex: 'goodsSn',
|
|
12476
|
+
title: "\u8D27\u53F7",
|
|
12477
|
+
width: 150
|
|
12478
|
+
}, {
|
|
12479
|
+
dataIndex: 'goodsId',
|
|
12480
|
+
title: "\u8D27\u53F7ID",
|
|
12481
|
+
width: 150
|
|
12482
|
+
}, {
|
|
12483
|
+
dataIndex: 'colorName',
|
|
12484
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12485
|
+
width: 150
|
|
12486
|
+
}, {
|
|
12487
|
+
dataIndex: 'colorCode',
|
|
12488
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12489
|
+
width: 150
|
|
12490
|
+
}, {
|
|
12491
|
+
dataIndex: 'sizeName',
|
|
12492
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12493
|
+
width: 150
|
|
12494
|
+
}, {
|
|
12495
|
+
dataIndex: 'sizeCode',
|
|
12496
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12497
|
+
width: 150
|
|
12498
|
+
}, {
|
|
12499
|
+
dataIndex: 'brandName',
|
|
12500
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12501
|
+
width: 150
|
|
12502
|
+
}, {
|
|
12503
|
+
dataIndex: 'goodsNumber',
|
|
12504
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12505
|
+
width: 150
|
|
12506
|
+
}, {
|
|
12507
|
+
dataIndex: 'goodsPrice',
|
|
12508
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12509
|
+
width: 150
|
|
12510
|
+
}, {
|
|
12511
|
+
dataIndex: 'shopPrice',
|
|
12512
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12513
|
+
width: 150
|
|
12514
|
+
}, {
|
|
12515
|
+
dataIndex: 'isGift',
|
|
12516
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12517
|
+
width: 150,
|
|
12518
|
+
render: function render(val) {
|
|
12519
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12520
|
+
}
|
|
12521
|
+
}];
|
|
12522
|
+
var renderFieldMap = {
|
|
12523
|
+
goodsNumber: function goodsNumber(_ref) {
|
|
12524
|
+
var disabled = _ref.disabled,
|
|
12525
|
+
updateHandle = _ref.updateHandle;
|
|
12526
|
+
return function (val, record, index) {
|
|
12527
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12528
|
+
style: {
|
|
12529
|
+
width: 70
|
|
12530
|
+
},
|
|
12531
|
+
value: val,
|
|
12532
|
+
min: 1,
|
|
12533
|
+
precision: 0,
|
|
12534
|
+
onChange: function onChange(num) {
|
|
12535
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12536
|
+
}
|
|
12537
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12538
|
+
};
|
|
12539
|
+
},
|
|
12540
|
+
goodsPrice: function goodsPrice(_ref2) {
|
|
12541
|
+
var disabled = _ref2.disabled,
|
|
12542
|
+
updateHandle = _ref2.updateHandle;
|
|
12543
|
+
return function (val, record, index) {
|
|
12544
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12545
|
+
style: {
|
|
12546
|
+
width: 70
|
|
12547
|
+
},
|
|
12548
|
+
value: val,
|
|
12549
|
+
min: 0,
|
|
12550
|
+
onChange: function onChange(value) {
|
|
12551
|
+
return updateHandle(value, index, 'goodsPrice');
|
|
12552
|
+
}
|
|
12553
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12554
|
+
};
|
|
12555
|
+
},
|
|
12556
|
+
isGift: function isGift(_ref3) {
|
|
12557
|
+
var disabled = _ref3.disabled,
|
|
12558
|
+
updateHandle = _ref3.updateHandle;
|
|
12559
|
+
return function (val, record, index) {
|
|
12560
|
+
var options = [{
|
|
12561
|
+
label: '是',
|
|
12562
|
+
value: 1
|
|
12563
|
+
}, {
|
|
12564
|
+
label: '否',
|
|
12565
|
+
value: 0
|
|
12566
|
+
}];
|
|
12567
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12568
|
+
style: {
|
|
12569
|
+
width: 70
|
|
12570
|
+
},
|
|
12571
|
+
options: options,
|
|
12572
|
+
value: val,
|
|
12573
|
+
onChange: function onChange(value) {
|
|
12574
|
+
return updateHandle(value, index, 'isGift');
|
|
12575
|
+
},
|
|
12576
|
+
getPopupContainer: function getPopupContainer() {
|
|
12577
|
+
return document.getElementById('bsE3ReissueGoods');
|
|
12578
|
+
}
|
|
12579
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12580
|
+
};
|
|
12581
|
+
}
|
|
12582
|
+
};
|
|
12583
|
+
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
12584
|
+
var disabled = _ref4.disabled,
|
|
12585
|
+
updateHandle = _ref4.updateHandle,
|
|
12586
|
+
operate = _ref4.operate;
|
|
12587
|
+
return columns$3.map(function (item) {
|
|
12588
|
+
var newItem = _objectSpread2({
|
|
12589
|
+
align: 'center',
|
|
12590
|
+
ellipsis: true
|
|
12591
|
+
}, item);
|
|
12592
|
+
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
12593
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12594
|
+
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
12595
|
+
disabled: disabled,
|
|
12596
|
+
updateHandle: updateHandle
|
|
12597
|
+
})
|
|
12598
|
+
});
|
|
12599
|
+
}
|
|
12600
|
+
return newItem;
|
|
12601
|
+
});
|
|
12602
|
+
};
|
|
12603
|
+
|
|
12604
|
+
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12605
|
+
var columns = _ref.columns,
|
|
12606
|
+
dataSource = _ref.dataSource,
|
|
12607
|
+
selectedRowKeys = _ref.selectedRowKeys,
|
|
12608
|
+
onChangeSelectedKeys = _ref.onChangeSelectedKeys;
|
|
12609
|
+
var _useState = React.useState(false),
|
|
12610
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12611
|
+
tradeGoodsVisible = _useState2[0],
|
|
12612
|
+
setTradeGoodsVisible = _useState2[1];
|
|
12613
|
+
var openModal = function openModal() {
|
|
12614
|
+
return setTradeGoodsVisible(true);
|
|
12615
|
+
};
|
|
12616
|
+
var closeModal = function closeModal() {
|
|
12617
|
+
return setTradeGoodsVisible(false);
|
|
12618
|
+
};
|
|
12619
|
+
var rowSelection = {
|
|
12620
|
+
selectedRowKeys: selectedRowKeys,
|
|
12621
|
+
onChange: onChangeSelectedKeys
|
|
12622
|
+
};
|
|
12623
|
+
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12624
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12625
|
+
type: "link",
|
|
12626
|
+
onClick: openModal
|
|
12627
|
+
}, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12628
|
+
title: "\u8BA2\u5355\u5546\u54C1",
|
|
12629
|
+
visible: tradeGoodsVisible,
|
|
12630
|
+
footer: null,
|
|
12631
|
+
onCancel: closeModal
|
|
12632
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12633
|
+
rowKey: "sku",
|
|
12634
|
+
rowSelection: rowSelection,
|
|
12635
|
+
columns: columns,
|
|
12636
|
+
dataSource: dataSource,
|
|
12637
|
+
pagination: false,
|
|
12638
|
+
scroll: {
|
|
12639
|
+
x: 500,
|
|
12640
|
+
y: 500
|
|
12641
|
+
}
|
|
12642
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12643
|
+
};
|
|
12497
12644
|
var GoodItem$1 = function GoodItem(props) {
|
|
12498
|
-
var _ref;
|
|
12499
12645
|
var _props$value = props.value,
|
|
12500
12646
|
value = _props$value === void 0 ? [] : _props$value,
|
|
12501
12647
|
type = props.type,
|
|
@@ -12529,8 +12675,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12529
12675
|
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
12530
12676
|
onSelect = props.onSelect,
|
|
12531
12677
|
onDelete = props.onDelete,
|
|
12532
|
-
onModeChange = props.onModeChange
|
|
12678
|
+
onModeChange = props.onModeChange,
|
|
12679
|
+
tradeGoods = props.tradeGoods;
|
|
12533
12680
|
var refModal = React.useRef();
|
|
12681
|
+
console.debug('表格数据', value);
|
|
12534
12682
|
var handleDelete = function handleDelete(record, index) {
|
|
12535
12683
|
onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
|
|
12536
12684
|
var newList = _toConsumableArray(value).filter(function (item, i) {
|
|
@@ -12538,13 +12686,19 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12538
12686
|
});
|
|
12539
12687
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
|
|
12540
12688
|
};
|
|
12541
|
-
var
|
|
12542
|
-
|
|
12543
|
-
selectedRowKeys =
|
|
12544
|
-
setSelectedRowKeys =
|
|
12689
|
+
var _useState3 = React.useState([]),
|
|
12690
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12691
|
+
selectedRowKeys = _useState4[0],
|
|
12692
|
+
setSelectedRowKeys = _useState4[1];
|
|
12545
12693
|
React.useEffect(function () {
|
|
12546
12694
|
setSelectedRowKeys([]);
|
|
12547
12695
|
}, [tableSelect, selectType]);
|
|
12696
|
+
// TODO: 商品订单中以选中商品
|
|
12697
|
+
var selectedGoods = React.useMemo(function () {
|
|
12698
|
+
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12699
|
+
return v.sku;
|
|
12700
|
+
});
|
|
12701
|
+
}, [value]);
|
|
12548
12702
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
12549
12703
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
12550
12704
|
value[index][columnType] = val;
|
|
@@ -12578,6 +12732,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12578
12732
|
};
|
|
12579
12733
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12580
12734
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12735
|
+
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12581
12736
|
return function (type) {
|
|
12582
12737
|
var columns = [];
|
|
12583
12738
|
switch (type) {
|
|
@@ -13071,10 +13226,22 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13071
13226
|
title: "\u662F\u5426\u8D60\u54C1",
|
|
13072
13227
|
align: 'center',
|
|
13073
13228
|
ellipsis: true,
|
|
13074
|
-
width: 100
|
|
13229
|
+
width: 100,
|
|
13230
|
+
render: function render(val) {
|
|
13231
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13232
|
+
}
|
|
13075
13233
|
}];
|
|
13076
13234
|
}
|
|
13077
13235
|
break;
|
|
13236
|
+
case 'BS_E3_REISSUE_GOODS':
|
|
13237
|
+
{
|
|
13238
|
+
columns = getBsE3ReissueGoodColumns({
|
|
13239
|
+
disabled: disabled,
|
|
13240
|
+
updateHandle: updateHandle,
|
|
13241
|
+
operate: operate
|
|
13242
|
+
});
|
|
13243
|
+
}
|
|
13244
|
+
break;
|
|
13078
13245
|
default:
|
|
13079
13246
|
columns = [{
|
|
13080
13247
|
dataIndex: 'mark',
|
|
@@ -13214,6 +13381,19 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13214
13381
|
}
|
|
13215
13382
|
return columnList;
|
|
13216
13383
|
}, [showHeader, value, disabled]);
|
|
13384
|
+
var orderColumns = React.useMemo(function () {
|
|
13385
|
+
var columns = COLUMNS_MAP('', false)(type);
|
|
13386
|
+
return [{
|
|
13387
|
+
dataIndex: '',
|
|
13388
|
+
title: '序号',
|
|
13389
|
+
align: 'center',
|
|
13390
|
+
ellipsis: true,
|
|
13391
|
+
width: 50,
|
|
13392
|
+
render: function render(val, record, index) {
|
|
13393
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
|
|
13394
|
+
}
|
|
13395
|
+
}].concat(_toConsumableArray(columns));
|
|
13396
|
+
}, []);
|
|
13217
13397
|
var onSubmit = function onSubmit(list) {
|
|
13218
13398
|
var newList = [];
|
|
13219
13399
|
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -13232,12 +13412,36 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13232
13412
|
});
|
|
13233
13413
|
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
13234
13414
|
newList = list.map(function (item) {
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13415
|
+
var specNo = item.specNo,
|
|
13416
|
+
specId = item.specId,
|
|
13417
|
+
goodName = item.goodName,
|
|
13418
|
+
goodShortName = item.goodShortName,
|
|
13419
|
+
goodPicUrl = item.goodPicUrl,
|
|
13420
|
+
goodNo = item.goodNo,
|
|
13421
|
+
goodId = item.goodId,
|
|
13422
|
+
retailPrice = item.retailPrice;
|
|
13423
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13424
|
+
sku: specNo,
|
|
13425
|
+
skuId: specId,
|
|
13426
|
+
goodsName: goodName,
|
|
13427
|
+
goodsShortName: goodShortName,
|
|
13428
|
+
picPath: goodPicUrl,
|
|
13429
|
+
goodsSn: goodNo,
|
|
13430
|
+
goodsId: goodId,
|
|
13431
|
+
goodsPrice: retailPrice,
|
|
13432
|
+
shopPrice: retailPrice,
|
|
13433
|
+
sharePayment: '',
|
|
13434
|
+
sharePrice: '',
|
|
13435
|
+
payment: '',
|
|
13436
|
+
tcSku: '',
|
|
13437
|
+
tcGoodsNumber: '',
|
|
13438
|
+
taoCanSingleSl: '',
|
|
13439
|
+
isGift: '',
|
|
13440
|
+
uuid: kmkfUtils.uuid(),
|
|
13441
|
+
canDelete: true,
|
|
13442
|
+
goodsNumber: 1,
|
|
13443
|
+
canUpdateNumber: canUpdateNumber
|
|
13444
|
+
});
|
|
13241
13445
|
});
|
|
13242
13446
|
} else {
|
|
13243
13447
|
newList = list.map(function (item) {
|
|
@@ -13298,10 +13502,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13298
13502
|
}, showModeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
|
|
13299
13503
|
checked: isStrict,
|
|
13300
13504
|
onChange: handleCheckboxChange
|
|
13301
|
-
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !
|
|
13505
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
|
|
13506
|
+
columns: orderColumns,
|
|
13507
|
+
dataSource: tradeGoods.originDataSource,
|
|
13508
|
+
selectedRowKeys: selectedGoods,
|
|
13509
|
+
onChangeSelectedKeys: tradeGoods.selectedGoodsChange
|
|
13510
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13302
13511
|
type: "link",
|
|
13303
13512
|
onClick: handleChangeGoods
|
|
13304
|
-
},
|
|
13513
|
+
}, ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? '选择百胜ERP商品' : '选择商品'), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13305
13514
|
columns: newColumns,
|
|
13306
13515
|
dataSource: value,
|
|
13307
13516
|
rowKey: 'uuid',
|
|
@@ -14010,25 +14219,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
14010
14219
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14011
14220
|
var _data$data, _data$data$orderList;
|
|
14012
14221
|
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) {
|
|
14013
|
-
|
|
14014
|
-
data.data.orderList = (_filterBsE3Orders = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
|
|
14015
|
-
var isSplit = item.isSplit,
|
|
14016
|
-
isSplitNew = item.isSplitNew,
|
|
14017
|
-
isCopy = item.isCopy,
|
|
14018
|
-
isExchangeOrder = item.isExchangeOrder,
|
|
14019
|
-
isCombineNew = item.isCombineNew,
|
|
14020
|
-
isCombine = item.isCombine,
|
|
14021
|
-
orderStatus = item.orderStatus;
|
|
14022
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14023
|
-
orderStatus: kmkfUtils.BS_E3_ORDER_STATUS_MAP[orderStatus],
|
|
14024
|
-
isSplit: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplit],
|
|
14025
|
-
isSplitNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
|
|
14026
|
-
isExchangeOrder: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
|
|
14027
|
-
isCopy: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCopy],
|
|
14028
|
-
isCombineNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
|
|
14029
|
-
isCombine: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombine]
|
|
14030
|
-
});
|
|
14031
|
-
});
|
|
14222
|
+
data.data.orderList = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
|
|
14032
14223
|
}
|
|
14033
14224
|
resolve(data.data);
|
|
14034
14225
|
} else {
|
|
@@ -14093,37 +14284,58 @@ var columnsMap = {
|
|
|
14093
14284
|
title: '订单状态',
|
|
14094
14285
|
dataIndex: 'orderStatus',
|
|
14095
14286
|
width: 100,
|
|
14096
|
-
ellipsis: true
|
|
14287
|
+
ellipsis: true,
|
|
14288
|
+
render: function render(val) {
|
|
14289
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_ORDER_STATUS_MAP[val] || val);
|
|
14290
|
+
}
|
|
14097
14291
|
}, {
|
|
14098
14292
|
title: '是否被拆分',
|
|
14099
14293
|
dataIndex: 'isSplit',
|
|
14100
|
-
width:
|
|
14101
|
-
ellipsis: true
|
|
14294
|
+
width: 100,
|
|
14295
|
+
ellipsis: true,
|
|
14296
|
+
render: function render(val) {
|
|
14297
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14298
|
+
}
|
|
14102
14299
|
}, {
|
|
14103
14300
|
title: '是否拆分子单',
|
|
14104
14301
|
dataIndex: 'isSplitNew',
|
|
14105
|
-
width:
|
|
14106
|
-
ellipsis: true
|
|
14302
|
+
width: 100,
|
|
14303
|
+
ellipsis: true,
|
|
14304
|
+
render: function render(val) {
|
|
14305
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14306
|
+
}
|
|
14107
14307
|
}, {
|
|
14108
14308
|
title: '是否被合并',
|
|
14109
14309
|
dataIndex: 'isCombine',
|
|
14110
|
-
width:
|
|
14111
|
-
ellipsis: true
|
|
14310
|
+
width: 100,
|
|
14311
|
+
ellipsis: true,
|
|
14312
|
+
render: function render(val) {
|
|
14313
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14314
|
+
}
|
|
14112
14315
|
}, {
|
|
14113
14316
|
title: '是否合并新单',
|
|
14114
14317
|
dataIndex: 'isCombineNew',
|
|
14115
|
-
width:
|
|
14116
|
-
ellipsis: true
|
|
14318
|
+
width: 100,
|
|
14319
|
+
ellipsis: true,
|
|
14320
|
+
render: function render(val) {
|
|
14321
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14322
|
+
}
|
|
14117
14323
|
}, {
|
|
14118
14324
|
title: '是否复制单',
|
|
14119
14325
|
dataIndex: 'isCopy',
|
|
14120
|
-
width:
|
|
14121
|
-
ellipsis: true
|
|
14326
|
+
width: 100,
|
|
14327
|
+
ellipsis: true,
|
|
14328
|
+
render: function render(val) {
|
|
14329
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14330
|
+
}
|
|
14122
14331
|
}, {
|
|
14123
14332
|
title: '是否换货单',
|
|
14124
14333
|
dataIndex: 'isExchangeOrder',
|
|
14125
|
-
width:
|
|
14126
|
-
ellipsis: true
|
|
14334
|
+
width: 100,
|
|
14335
|
+
ellipsis: true,
|
|
14336
|
+
render: function render(val) {
|
|
14337
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14338
|
+
}
|
|
14127
14339
|
}, {
|
|
14128
14340
|
title: '订单备注',
|
|
14129
14341
|
dataIndex: 'orderMsg',
|
|
@@ -14434,7 +14646,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
14434
14646
|
valueRef.current = value;
|
|
14435
14647
|
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)) {
|
|
14436
14648
|
getOrderFlag.current = true;
|
|
14437
|
-
getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
|
|
14649
|
+
compType.indexOf('WDT') > -1 && getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
|
|
14438
14650
|
}
|
|
14439
14651
|
}, [value]);
|
|
14440
14652
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
@@ -14871,11 +15083,12 @@ var typeMap$1 = {
|
|
|
14871
15083
|
formatDefaultField: {
|
|
14872
15084
|
money: 'orderPrice',
|
|
14873
15085
|
share: 'sharePrice'
|
|
14874
|
-
}
|
|
15086
|
+
},
|
|
15087
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
14875
15088
|
}
|
|
14876
15089
|
};
|
|
14877
15090
|
var wdtReissue = function wdtReissue(props) {
|
|
14878
|
-
var _value$wdtSystemOrder, _typeMap$type7, _typeMap$
|
|
15091
|
+
var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
14879
15092
|
var value = props.value,
|
|
14880
15093
|
onChange = props.onChange,
|
|
14881
15094
|
_props$reasonList = props.reasonList,
|
|
@@ -14897,7 +15110,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14897
15110
|
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)) {
|
|
14898
15111
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
14899
15112
|
getOrderFlag.current = true;
|
|
14900
|
-
|
|
15113
|
+
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);
|
|
14901
15114
|
}
|
|
14902
15115
|
return;
|
|
14903
15116
|
}, [value]);
|
|
@@ -14915,13 +15128,30 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14915
15128
|
}
|
|
14916
15129
|
return;
|
|
14917
15130
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
|
|
14918
|
-
|
|
15131
|
+
// const getWdtOrderList = async (orderNo: string) => {
|
|
15132
|
+
// wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
|
|
15133
|
+
// const orders = data?.trades || [];
|
|
15134
|
+
// const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
|
|
15135
|
+
// return { billNo, billType, billTag }
|
|
15136
|
+
// });
|
|
15137
|
+
// onChange({
|
|
15138
|
+
// ...value,
|
|
15139
|
+
// [typeMap[type]?.systemOrder]: {
|
|
15140
|
+
// ...value[typeMap[type]?.systemOrder],
|
|
15141
|
+
// showOrderInfo,
|
|
15142
|
+
// orders,
|
|
15143
|
+
// },
|
|
15144
|
+
// });
|
|
15145
|
+
// })
|
|
15146
|
+
// };
|
|
15147
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
14919
15148
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
15149
|
+
var _typeMap$type8;
|
|
14920
15150
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14921
15151
|
while (1) switch (_context.prev = _context.next) {
|
|
14922
15152
|
case 0:
|
|
14923
|
-
|
|
14924
|
-
var _typeMap$
|
|
15153
|
+
(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
|
|
15154
|
+
var _typeMap$type9, _typeMap$type10;
|
|
14925
15155
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
14926
15156
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
14927
15157
|
var billNo = _ref2.billNo,
|
|
@@ -14933,7 +15163,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14933
15163
|
billTag: billTag
|
|
14934
15164
|
};
|
|
14935
15165
|
});
|
|
14936
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
15166
|
+
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]), {}, {
|
|
14937
15167
|
showOrderInfo: showOrderInfo,
|
|
14938
15168
|
orders: orders
|
|
14939
15169
|
}))));
|
|
@@ -14944,43 +15174,43 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14944
15174
|
}
|
|
14945
15175
|
}, _callee);
|
|
14946
15176
|
}));
|
|
14947
|
-
return function
|
|
15177
|
+
return function getOrderList(_x) {
|
|
14948
15178
|
return _ref.apply(this, arguments);
|
|
14949
15179
|
};
|
|
14950
15180
|
}();
|
|
14951
15181
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
14952
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
15182
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
14953
15183
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
14954
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
15184
|
+
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;
|
|
14955
15185
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
14956
15186
|
var newValue = _objectSpread2({}, value);
|
|
14957
|
-
newValue[(_typeMap$
|
|
15187
|
+
newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
14958
15188
|
if (typeName === '1') {
|
|
14959
|
-
var _typeMap$
|
|
14960
|
-
newValue[(_typeMap$
|
|
15189
|
+
var _typeMap$type13;
|
|
15190
|
+
newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
14961
15191
|
mode: isStrict
|
|
14962
15192
|
});
|
|
14963
15193
|
} else if (typeName === '2') {
|
|
14964
|
-
var _typeMap$
|
|
15194
|
+
var _typeMap$type14;
|
|
14965
15195
|
// 切换到非原单,清空列表
|
|
14966
|
-
newValue[(_typeMap$
|
|
15196
|
+
newValue[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
14967
15197
|
}
|
|
14968
15198
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14969
15199
|
};
|
|
14970
15200
|
var handleModeChange = function handleModeChange(mode) {
|
|
14971
|
-
var _value$typeMap$type$t3, _typeMap$
|
|
14972
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
15201
|
+
var _value$typeMap$type$t3, _typeMap$type15, _typeMap$type16;
|
|
15202
|
+
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';
|
|
14973
15203
|
setIsStrict(mode);
|
|
14974
15204
|
if (!isOriginalOrder) return;
|
|
14975
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
15205
|
+
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({
|
|
14976
15206
|
mode: mode
|
|
14977
15207
|
}))));
|
|
14978
15208
|
};
|
|
14979
15209
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
14980
|
-
var _typeMap$
|
|
15210
|
+
var _typeMap$type17, _typeMap$type18, _order$goodDetails;
|
|
14981
15211
|
var mode = _ref3.mode;
|
|
14982
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
14983
|
-
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15212
|
+
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];
|
|
15213
|
+
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];
|
|
14984
15214
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
14985
15215
|
return order.tradeNo === systemOrderNo;
|
|
14986
15216
|
});
|
|
@@ -14991,31 +15221,31 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14991
15221
|
}) : goodDetails;
|
|
14992
15222
|
};
|
|
14993
15223
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
14994
|
-
var _typeMap$
|
|
15224
|
+
var _typeMap$type19;
|
|
14995
15225
|
var newValue = _objectSpread2({}, value);
|
|
14996
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14997
|
-
var _typeMap$
|
|
14998
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14999
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15226
|
+
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) {
|
|
15227
|
+
var _typeMap$type20, _typeMap$type21;
|
|
15228
|
+
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;
|
|
15229
|
+
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;
|
|
15000
15230
|
return item;
|
|
15001
15231
|
});
|
|
15002
15232
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15003
15233
|
};
|
|
15004
15234
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
15005
|
-
var _typeMap$
|
|
15235
|
+
var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
|
|
15006
15236
|
var newValue = _objectSpread2({}, value);
|
|
15007
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15008
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
15009
|
-
var _typeMap$
|
|
15010
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15237
|
+
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;
|
|
15238
|
+
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])) {
|
|
15239
|
+
var _typeMap$type24;
|
|
15240
|
+
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)] = [];
|
|
15011
15241
|
}
|
|
15012
15242
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15013
15243
|
};
|
|
15014
15244
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15015
15245
|
var showChangeBtn = React.useMemo(function () {
|
|
15016
|
-
var _typeMap$
|
|
15017
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15018
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15246
|
+
var _typeMap$type25;
|
|
15247
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
|
|
15248
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
|
|
15019
15249
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
15020
15250
|
gutter: 8,
|
|
15021
15251
|
wrap: true
|
|
@@ -15033,12 +15263,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15033
15263
|
},
|
|
15034
15264
|
disabled: disabled,
|
|
15035
15265
|
allowClear: false,
|
|
15036
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15266
|
+
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)],
|
|
15037
15267
|
onChange: function onChange(val) {
|
|
15038
15268
|
return changeSystemOrderHandle(val);
|
|
15039
15269
|
},
|
|
15040
15270
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15041
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15271
|
+
}, ((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) {
|
|
15042
15272
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
15043
15273
|
key: item.billNo,
|
|
15044
15274
|
value: item.billNo,
|
|
@@ -15059,7 +15289,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15059
15289
|
disabled: disabled,
|
|
15060
15290
|
allowClear: false,
|
|
15061
15291
|
options: reasonList,
|
|
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$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
|
|
15063
15293
|
onChange: function onChange(val) {
|
|
15064
15294
|
return changeTypeHandle(val);
|
|
15065
15295
|
}
|
|
@@ -15071,7 +15301,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15071
15301
|
canUpdateNumber: showChangeBtn,
|
|
15072
15302
|
showChangeBtn: showChangeBtn,
|
|
15073
15303
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15074
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15304
|
+
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)],
|
|
15075
15305
|
onChange: function onChange(val) {
|
|
15076
15306
|
return changeGoodHandle(val);
|
|
15077
15307
|
},
|
|
@@ -15851,6 +16081,229 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
15851
16081
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
15852
16082
|
};
|
|
15853
16083
|
|
|
16084
|
+
var _excluded$k = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
16085
|
+
var typeMap$2 = {
|
|
16086
|
+
BS_E3_REISSUE_GOODS: {
|
|
16087
|
+
key: 'bsE3ReissueGoods',
|
|
16088
|
+
typeName: 'bsE3ReissueType',
|
|
16089
|
+
systemOrder: 'bsE3SystemOrder',
|
|
16090
|
+
systemOrderNo: 'bsE3SystemOrderNo',
|
|
16091
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
16092
|
+
}
|
|
16093
|
+
};
|
|
16094
|
+
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16095
|
+
var _typeMap$type7, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
16096
|
+
var value = props.value,
|
|
16097
|
+
onChange = props.onChange,
|
|
16098
|
+
_props$reasonList = props.reasonList,
|
|
16099
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
16100
|
+
disabled = props.disabled,
|
|
16101
|
+
type = props.type,
|
|
16102
|
+
other = _objectWithoutProperties(props, _excluded$k);
|
|
16103
|
+
var getOrderFlag = React.useRef(false);
|
|
16104
|
+
var _useState = React.useState(false),
|
|
16105
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16106
|
+
isStrict = _useState2[0],
|
|
16107
|
+
setIsStrict = _useState2[1];
|
|
16108
|
+
// TODO: 在修改场景下手动获取一次订单详情中数据
|
|
16109
|
+
React.useEffect(function () {
|
|
16110
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
16111
|
+
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)) {
|
|
16112
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
16113
|
+
getOrderFlag.current = true;
|
|
16114
|
+
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);
|
|
16115
|
+
}
|
|
16116
|
+
return;
|
|
16117
|
+
}, [value]);
|
|
16118
|
+
React.useEffect(function () {
|
|
16119
|
+
var _typeMap$type4;
|
|
16120
|
+
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];
|
|
16121
|
+
if (systemOrderNo) {
|
|
16122
|
+
var _value$typeMap$type$t, _typeMap$type5;
|
|
16123
|
+
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])) {
|
|
16124
|
+
var _typeMap$type6;
|
|
16125
|
+
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({
|
|
16126
|
+
mode: isStrict
|
|
16127
|
+
}))));
|
|
16128
|
+
}
|
|
16129
|
+
}
|
|
16130
|
+
return;
|
|
16131
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
|
|
16132
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
16133
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
16134
|
+
var _typeMap$type8;
|
|
16135
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16136
|
+
while (1) switch (_context.prev = _context.next) {
|
|
16137
|
+
case 0:
|
|
16138
|
+
(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
|
|
16139
|
+
var _typeMap$type9, _typeMap$type10;
|
|
16140
|
+
var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
|
|
16141
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
16142
|
+
var orderSn = _ref2.orderSn;
|
|
16143
|
+
return {
|
|
16144
|
+
billNo: orderSn
|
|
16145
|
+
};
|
|
16146
|
+
});
|
|
16147
|
+
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]), {}, {
|
|
16148
|
+
showOrderInfo: showOrderInfo,
|
|
16149
|
+
orders: orders
|
|
16150
|
+
}))));
|
|
16151
|
+
});
|
|
16152
|
+
case 1:
|
|
16153
|
+
case "end":
|
|
16154
|
+
return _context.stop();
|
|
16155
|
+
}
|
|
16156
|
+
}, _callee);
|
|
16157
|
+
}));
|
|
16158
|
+
return function getOrderList(_x) {
|
|
16159
|
+
return _ref.apply(this, arguments);
|
|
16160
|
+
};
|
|
16161
|
+
}();
|
|
16162
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
16163
|
+
var _typeMap$type11;
|
|
16164
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
16165
|
+
// if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
|
|
16166
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
16167
|
+
var newValue = _objectSpread2({}, value);
|
|
16168
|
+
newValue[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
16169
|
+
if (typeName === '1') {
|
|
16170
|
+
var _typeMap$type12;
|
|
16171
|
+
newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
16172
|
+
mode: isStrict
|
|
16173
|
+
});
|
|
16174
|
+
} else if (typeName === '2') {
|
|
16175
|
+
var _typeMap$type13;
|
|
16176
|
+
// 切换到非原单,清空列表
|
|
16177
|
+
newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
16178
|
+
}
|
|
16179
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16180
|
+
};
|
|
16181
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
16182
|
+
var _value$typeMap$type$t2, _typeMap$type14, _typeMap$type15;
|
|
16183
|
+
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';
|
|
16184
|
+
setIsStrict(mode);
|
|
16185
|
+
if (!isOriginalOrder) return;
|
|
16186
|
+
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({
|
|
16187
|
+
mode: mode
|
|
16188
|
+
}))));
|
|
16189
|
+
};
|
|
16190
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
16191
|
+
var _typeMap$type16, _typeMap$type17, _order$orderDetailGet;
|
|
16192
|
+
var mode = _ref3.mode;
|
|
16193
|
+
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];
|
|
16194
|
+
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];
|
|
16195
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
16196
|
+
return order.orderSn === systemOrderNo;
|
|
16197
|
+
});
|
|
16198
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length) ? kmkfUtils.updateBsE3GoodsHandle([order]) : [];
|
|
16199
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
16200
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
16201
|
+
return !orderNo || goodItem.originalOrderSn === orderNo;
|
|
16202
|
+
}) : goodDetails;
|
|
16203
|
+
};
|
|
16204
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
16205
|
+
var _typeMap$type18;
|
|
16206
|
+
var newValue = _objectSpread2({}, value);
|
|
16207
|
+
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 || [];
|
|
16208
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16209
|
+
};
|
|
16210
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
16211
|
+
var _typeMap$type19, _value$typeMap$type$t3, _typeMap$type20;
|
|
16212
|
+
var newValue = _objectSpread2({}, value);
|
|
16213
|
+
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;
|
|
16214
|
+
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])) {
|
|
16215
|
+
var _typeMap$type21;
|
|
16216
|
+
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)] = [];
|
|
16217
|
+
}
|
|
16218
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16219
|
+
};
|
|
16220
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
16221
|
+
var showChangeBtn = React.useMemo(function () {
|
|
16222
|
+
var _typeMap$type22;
|
|
16223
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo]);
|
|
16224
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]]);
|
|
16225
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
16226
|
+
var _typeMap$type24, _getGoodDetails;
|
|
16227
|
+
var newValue = _objectSpread2({}, value);
|
|
16228
|
+
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({
|
|
16229
|
+
mode: isStrict
|
|
16230
|
+
})) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
|
|
16231
|
+
return skuList.includes(item.sku);
|
|
16232
|
+
});
|
|
16233
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16234
|
+
}, [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]);
|
|
16235
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
16236
|
+
gutter: 8,
|
|
16237
|
+
wrap: true,
|
|
16238
|
+
id: "bsE3ReissueGoods"
|
|
16239
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
16240
|
+
className: "gutter-row",
|
|
16241
|
+
xs: {
|
|
16242
|
+
span: 11
|
|
16243
|
+
},
|
|
16244
|
+
sm: {
|
|
16245
|
+
span: 6
|
|
16246
|
+
}
|
|
16247
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
16248
|
+
style: {
|
|
16249
|
+
marginBottom: '8px'
|
|
16250
|
+
},
|
|
16251
|
+
disabled: disabled,
|
|
16252
|
+
allowClear: false,
|
|
16253
|
+
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)],
|
|
16254
|
+
onChange: function onChange(val) {
|
|
16255
|
+
return changeSystemOrderHandle(val);
|
|
16256
|
+
},
|
|
16257
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16258
|
+
}, ((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) {
|
|
16259
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
16260
|
+
key: item.billNo,
|
|
16261
|
+
value: item.billNo,
|
|
16262
|
+
label: item.billNo
|
|
16263
|
+
}, item.billNo);
|
|
16264
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
16265
|
+
className: "gutter-row",
|
|
16266
|
+
xs: {
|
|
16267
|
+
span: 11
|
|
16268
|
+
},
|
|
16269
|
+
sm: {
|
|
16270
|
+
span: 6
|
|
16271
|
+
}
|
|
16272
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
16273
|
+
style: {
|
|
16274
|
+
marginBottom: '8px'
|
|
16275
|
+
},
|
|
16276
|
+
disabled: disabled,
|
|
16277
|
+
allowClear: false,
|
|
16278
|
+
options: reasonList,
|
|
16279
|
+
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)],
|
|
16280
|
+
onChange: function onChange(val) {
|
|
16281
|
+
return changeTypeHandle(val);
|
|
16282
|
+
}
|
|
16283
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
16284
|
+
key: 'reissueGoods'
|
|
16285
|
+
}, other), {}, {
|
|
16286
|
+
type: type,
|
|
16287
|
+
disabled: disabled,
|
|
16288
|
+
canUpdateNumber: showChangeBtn,
|
|
16289
|
+
showChangeBtn: showChangeBtn,
|
|
16290
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16291
|
+
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)],
|
|
16292
|
+
onChange: function onChange(val) {
|
|
16293
|
+
return changeGoodHandle(val);
|
|
16294
|
+
},
|
|
16295
|
+
onModeChange: handleModeChange,
|
|
16296
|
+
showModeBtn: false,
|
|
16297
|
+
isStrict: isStrict,
|
|
16298
|
+
tradeGoods: {
|
|
16299
|
+
originDataSource: getGoodDetails({
|
|
16300
|
+
mode: isStrict
|
|
16301
|
+
}),
|
|
16302
|
+
selectedGoodsChange: selectedGoodsChange
|
|
16303
|
+
}
|
|
16304
|
+
})));
|
|
16305
|
+
};
|
|
16306
|
+
|
|
15854
16307
|
exports.Address = ApaasAddress;
|
|
15855
16308
|
exports.AliPay = AliPay;
|
|
15856
16309
|
exports.ApaasAddress = Province;
|
|
@@ -15871,6 +16324,7 @@ exports.ApaasTextArea = ApaasTextArea;
|
|
|
15871
16324
|
exports.ApaasUpload = ApaasUpload;
|
|
15872
16325
|
exports.ApaasUploadAsync = index;
|
|
15873
16326
|
exports.ApaasUploadFile = ApaasUploadFile;
|
|
16327
|
+
exports.BsE3Reissue = bsE3Reissue;
|
|
15874
16328
|
exports.BsExchange = BsExchange;
|
|
15875
16329
|
exports.BsGoods = BsGoods;
|
|
15876
16330
|
exports.BsReissue = BsReissue;
|