@kmkf-fe-packages/basic-components 2.0.54 → 2.0.56
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 +267 -122
- package/dist/index.js +270 -121
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +9 -1
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +17 -1
- package/dist/src/bs/component/model/Columns/useGetColumns.d.ts +2 -2
- package/dist/src/constants/columnsBaseInfoMap.d.ts +11 -2
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -485,6 +485,57 @@ function _nonIterableSpread() {
|
|
|
485
485
|
function _nonIterableRest() {
|
|
486
486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
487
487
|
}
|
|
488
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
489
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
490
|
+
if (!it) {
|
|
491
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
492
|
+
if (it) o = it;
|
|
493
|
+
var i = 0;
|
|
494
|
+
var F = function () {};
|
|
495
|
+
return {
|
|
496
|
+
s: F,
|
|
497
|
+
n: function () {
|
|
498
|
+
if (i >= o.length) return {
|
|
499
|
+
done: true
|
|
500
|
+
};
|
|
501
|
+
return {
|
|
502
|
+
done: false,
|
|
503
|
+
value: o[i++]
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
e: function (e) {
|
|
507
|
+
throw e;
|
|
508
|
+
},
|
|
509
|
+
f: F
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
513
|
+
}
|
|
514
|
+
var normalCompletion = true,
|
|
515
|
+
didErr = false,
|
|
516
|
+
err;
|
|
517
|
+
return {
|
|
518
|
+
s: function () {
|
|
519
|
+
it = it.call(o);
|
|
520
|
+
},
|
|
521
|
+
n: function () {
|
|
522
|
+
var step = it.next();
|
|
523
|
+
normalCompletion = step.done;
|
|
524
|
+
return step;
|
|
525
|
+
},
|
|
526
|
+
e: function (e) {
|
|
527
|
+
didErr = true;
|
|
528
|
+
err = e;
|
|
529
|
+
},
|
|
530
|
+
f: function () {
|
|
531
|
+
try {
|
|
532
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
533
|
+
} finally {
|
|
534
|
+
if (didErr) throw err;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
}
|
|
488
539
|
function _toPrimitive(input, hint) {
|
|
489
540
|
if (typeof input !== "object" || input === null) return input;
|
|
490
541
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -12560,9 +12611,7 @@ var useGetColumns = (function (type) {
|
|
|
12560
12611
|
loading = _useState4[0],
|
|
12561
12612
|
setLoading = _useState4[1];
|
|
12562
12613
|
var showColumnsDataIndexList = React.useMemo(function () {
|
|
12563
|
-
return columns.
|
|
12564
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12565
|
-
}).map(function (item) {
|
|
12614
|
+
return columns.map(function (item) {
|
|
12566
12615
|
return item.dataIndex;
|
|
12567
12616
|
});
|
|
12568
12617
|
}, [columns]);
|
|
@@ -14139,15 +14188,20 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14139
14188
|
WDT_REISSUE_GOODS: [{
|
|
14140
14189
|
dataIndex: 'goodId',
|
|
14141
14190
|
title: "\u5546\u54C1ID",
|
|
14142
|
-
width: 120
|
|
14191
|
+
width: 120,
|
|
14192
|
+
align: 'center',
|
|
14193
|
+
ellipsis: true
|
|
14143
14194
|
}, {
|
|
14144
14195
|
dataIndex: 'goodNo',
|
|
14145
14196
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
14146
|
-
|
|
14197
|
+
align: 'center',
|
|
14198
|
+
ellipsis: true,
|
|
14199
|
+
width: 180
|
|
14147
14200
|
}, {
|
|
14148
14201
|
dataIndex: 'goodName',
|
|
14149
14202
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
14150
14203
|
width: 200,
|
|
14204
|
+
align: 'center',
|
|
14151
14205
|
render: function render(text) {
|
|
14152
14206
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
14153
14207
|
val: text
|
|
@@ -14156,14 +14210,19 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14156
14210
|
}, {
|
|
14157
14211
|
dataIndex: 'specId',
|
|
14158
14212
|
title: "SKUID",
|
|
14213
|
+
align: 'center',
|
|
14214
|
+
ellipsis: true,
|
|
14159
14215
|
width: 150
|
|
14160
14216
|
}, {
|
|
14161
14217
|
dataIndex: 'specNo',
|
|
14162
14218
|
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
14163
|
-
|
|
14219
|
+
align: 'center',
|
|
14220
|
+
ellipsis: true,
|
|
14221
|
+
width: 180
|
|
14164
14222
|
}, {
|
|
14165
14223
|
dataIndex: 'specName',
|
|
14166
14224
|
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
14225
|
+
align: 'center',
|
|
14167
14226
|
width: 250,
|
|
14168
14227
|
render: function render(text) {
|
|
14169
14228
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
@@ -14276,18 +14335,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14276
14335
|
align: 'center',
|
|
14277
14336
|
ellipsis: true,
|
|
14278
14337
|
width: 100,
|
|
14279
|
-
render:
|
|
14280
|
-
var giftTypeMap = {
|
|
14281
|
-
0: '非赠品',
|
|
14282
|
-
1: '自动赠送',
|
|
14283
|
-
2: '手工赠送',
|
|
14284
|
-
3: '回购自动送赠品',
|
|
14285
|
-
4: '前N有礼送赠品',
|
|
14286
|
-
6: '天猫优仓赠品',
|
|
14287
|
-
7: '淘宝CRM会员送赠'
|
|
14288
|
-
};
|
|
14289
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14290
|
-
}
|
|
14338
|
+
render: renderGiftType
|
|
14291
14339
|
}],
|
|
14292
14340
|
//旺店通退货商品信息
|
|
14293
14341
|
WDT_RETURN_GOODS: [{
|
|
@@ -14383,18 +14431,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14383
14431
|
align: 'center',
|
|
14384
14432
|
ellipsis: true,
|
|
14385
14433
|
width: 100,
|
|
14386
|
-
render:
|
|
14387
|
-
var giftTypeMap = {
|
|
14388
|
-
0: '非赠品',
|
|
14389
|
-
1: '自动赠送',
|
|
14390
|
-
2: '手工赠送',
|
|
14391
|
-
3: '回购自动送赠品',
|
|
14392
|
-
4: '前N有礼送赠品',
|
|
14393
|
-
6: '天猫优仓赠品',
|
|
14394
|
-
7: '淘宝CRM会员送赠'
|
|
14395
|
-
};
|
|
14396
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14397
|
-
}
|
|
14434
|
+
render: renderGiftType
|
|
14398
14435
|
}, {
|
|
14399
14436
|
dataIndex: 'type',
|
|
14400
14437
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14515,18 +14552,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14515
14552
|
align: 'center',
|
|
14516
14553
|
ellipsis: true,
|
|
14517
14554
|
width: 100,
|
|
14518
|
-
render:
|
|
14519
|
-
var giftTypeMap = {
|
|
14520
|
-
0: '非赠品',
|
|
14521
|
-
1: '自动赠送',
|
|
14522
|
-
2: '手工赠送',
|
|
14523
|
-
3: '回购自动送赠品',
|
|
14524
|
-
4: '前N有礼送赠品',
|
|
14525
|
-
6: '天猫优仓赠品',
|
|
14526
|
-
7: '淘宝CRM会员送赠'
|
|
14527
|
-
};
|
|
14528
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14529
|
-
}
|
|
14555
|
+
render: renderGiftType
|
|
14530
14556
|
}, {
|
|
14531
14557
|
dataIndex: 'type',
|
|
14532
14558
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14710,6 +14736,15 @@ var getYesOrNo$1 = function getYesOrNo(val) {
|
|
|
14710
14736
|
if (kmkfUtils.isNull(val)) return null;
|
|
14711
14737
|
return val ? '是' : '否';
|
|
14712
14738
|
};
|
|
14739
|
+
function toNum(value) {
|
|
14740
|
+
if (typeof value === 'string') {
|
|
14741
|
+
return value ? +value : void 0;
|
|
14742
|
+
}
|
|
14743
|
+
if (typeof value === 'number') {
|
|
14744
|
+
return value;
|
|
14745
|
+
}
|
|
14746
|
+
return void 0;
|
|
14747
|
+
}
|
|
14713
14748
|
var getColumns$4 = function getColumns(_ref) {
|
|
14714
14749
|
var _ref$text = _ref.text,
|
|
14715
14750
|
disabled = _ref.disabled,
|
|
@@ -14867,6 +14902,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14867
14902
|
dataIndex: 'qty',
|
|
14868
14903
|
title: "\u6570\u91CF",
|
|
14869
14904
|
width: 100,
|
|
14905
|
+
validator: function validator(_rule, value) {
|
|
14906
|
+
var goodsName = '';
|
|
14907
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
14908
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
14909
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
14910
|
+
if (res) {
|
|
14911
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
14912
|
+
}
|
|
14913
|
+
return res;
|
|
14914
|
+
})) {
|
|
14915
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
14916
|
+
}
|
|
14917
|
+
},
|
|
14870
14918
|
render: function render(val, record, index) {
|
|
14871
14919
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14872
14920
|
style: {
|
|
@@ -14970,6 +15018,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14970
15018
|
dataIndex: 'qty',
|
|
14971
15019
|
title: "\u6570\u91CF",
|
|
14972
15020
|
width: 100,
|
|
15021
|
+
validator: function validator(_rule, value) {
|
|
15022
|
+
var goodsName = '';
|
|
15023
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
15024
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15025
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15026
|
+
if (res) {
|
|
15027
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
15028
|
+
}
|
|
15029
|
+
return res;
|
|
15030
|
+
})) {
|
|
15031
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15032
|
+
}
|
|
15033
|
+
},
|
|
14973
15034
|
render: function render(val, record, index) {
|
|
14974
15035
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14975
15036
|
style: {
|
|
@@ -15061,6 +15122,15 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
15061
15122
|
if (!item.align) item.align = 'center';
|
|
15062
15123
|
return item;
|
|
15063
15124
|
};
|
|
15125
|
+
function toNum$1(value) {
|
|
15126
|
+
if (typeof value === 'string') {
|
|
15127
|
+
return value ? +value : void 0;
|
|
15128
|
+
}
|
|
15129
|
+
if (typeof value === 'number') {
|
|
15130
|
+
return value;
|
|
15131
|
+
}
|
|
15132
|
+
return void 0;
|
|
15133
|
+
}
|
|
15064
15134
|
var getColumns$5 = function getColumns() {
|
|
15065
15135
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
15066
15136
|
_ref$text = _ref.text,
|
|
@@ -15244,6 +15314,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15244
15314
|
ellipsis: true,
|
|
15245
15315
|
align: 'center',
|
|
15246
15316
|
width: 120,
|
|
15317
|
+
validator: function validator(_rule, value) {
|
|
15318
|
+
var goodsName = '';
|
|
15319
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15320
|
+
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15321
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
15322
|
+
if (res) {
|
|
15323
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15324
|
+
}
|
|
15325
|
+
return res;
|
|
15326
|
+
})) {
|
|
15327
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15328
|
+
}
|
|
15329
|
+
},
|
|
15247
15330
|
render: function render(val, record, index) {
|
|
15248
15331
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15249
15332
|
style: {
|
|
@@ -15263,6 +15346,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15263
15346
|
ellipsis: true,
|
|
15264
15347
|
align: 'center',
|
|
15265
15348
|
width: 100,
|
|
15349
|
+
validator: function validator(_rule, value) {
|
|
15350
|
+
var goodsName = '';
|
|
15351
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15352
|
+
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15353
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15354
|
+
if (res) {
|
|
15355
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15356
|
+
}
|
|
15357
|
+
return res;
|
|
15358
|
+
})) {
|
|
15359
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15360
|
+
}
|
|
15361
|
+
},
|
|
15266
15362
|
render: function render(val, record, index) {
|
|
15267
15363
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15268
15364
|
style: {
|
|
@@ -15347,6 +15443,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15347
15443
|
dataIndex: 'salePrice',
|
|
15348
15444
|
title: '单价',
|
|
15349
15445
|
width: 120,
|
|
15446
|
+
validator: function validator(_rule, value) {
|
|
15447
|
+
var goodsName = '';
|
|
15448
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15449
|
+
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15450
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
15451
|
+
if (res) {
|
|
15452
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15453
|
+
}
|
|
15454
|
+
return res;
|
|
15455
|
+
})) {
|
|
15456
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15457
|
+
}
|
|
15458
|
+
},
|
|
15350
15459
|
render: function render(val, record, index) {
|
|
15351
15460
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15352
15461
|
style: {
|
|
@@ -15364,6 +15473,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15364
15473
|
dataIndex: 'qty',
|
|
15365
15474
|
title: '数量',
|
|
15366
15475
|
width: 100,
|
|
15476
|
+
validator: function validator(_rule, value) {
|
|
15477
|
+
var goodsName = '';
|
|
15478
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15479
|
+
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15480
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15481
|
+
if (res) {
|
|
15482
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15483
|
+
}
|
|
15484
|
+
return res;
|
|
15485
|
+
})) {
|
|
15486
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15487
|
+
}
|
|
15488
|
+
},
|
|
15367
15489
|
render: function render(val, record, index) {
|
|
15368
15490
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15369
15491
|
style: {
|
|
@@ -15675,6 +15797,30 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15675
15797
|
})['default']
|
|
15676
15798
|
});
|
|
15677
15799
|
};
|
|
15800
|
+
var erpColumnsMap = getColumnsMap$1();
|
|
15801
|
+
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
15802
|
+
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
15803
|
+
return column.validator;
|
|
15804
|
+
}).filter(Boolean);
|
|
15805
|
+
var res = null;
|
|
15806
|
+
var _iterator = _createForOfIteratorHelper(validatorFnList),
|
|
15807
|
+
_step;
|
|
15808
|
+
try {
|
|
15809
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15810
|
+
var validatorFn = _step.value;
|
|
15811
|
+
var validatorResult = validatorFn(_rule, value, type);
|
|
15812
|
+
if (validatorResult) {
|
|
15813
|
+
res = validatorResult;
|
|
15814
|
+
break;
|
|
15815
|
+
}
|
|
15816
|
+
}
|
|
15817
|
+
} catch (err) {
|
|
15818
|
+
_iterator.e(err);
|
|
15819
|
+
} finally {
|
|
15820
|
+
_iterator.f();
|
|
15821
|
+
}
|
|
15822
|
+
return res;
|
|
15823
|
+
};
|
|
15678
15824
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15679
15825
|
var clone_columnsMap = lodash.cloneDeep(getColumnsMap$1());
|
|
15680
15826
|
var newColumns = {};
|
|
@@ -15682,7 +15828,8 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
|
15682
15828
|
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
15683
15829
|
return {
|
|
15684
15830
|
title: col.title,
|
|
15685
|
-
dataIndex: col.dataIndex
|
|
15831
|
+
dataIndex: col.dataIndex,
|
|
15832
|
+
disabled: !!col.validator
|
|
15686
15833
|
};
|
|
15687
15834
|
});
|
|
15688
15835
|
});
|
|
@@ -15804,6 +15951,7 @@ var GoodsModalMap = {
|
|
|
15804
15951
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15805
15952
|
GY_GOODS: GyGoodsModal$2,
|
|
15806
15953
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
15954
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15807
15955
|
JST_GOODS: JstGoodsModal,
|
|
15808
15956
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15809
15957
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
@@ -15841,7 +15989,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15841
15989
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15842
15990
|
}));
|
|
15843
15991
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15844
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15992
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15845
15993
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15846
15994
|
};
|
|
15847
15995
|
var rowSelection = {
|
|
@@ -15876,7 +16024,7 @@ var getButtonText = function getButtonText() {
|
|
|
15876
16024
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
15877
16025
|
return '选择旺店通商品';
|
|
15878
16026
|
}
|
|
15879
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16027
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
15880
16028
|
return '选择管易ERP商品';
|
|
15881
16029
|
}
|
|
15882
16030
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16064,16 +16212,18 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16064
16212
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
16065
16213
|
if (isStringArray) {
|
|
16066
16214
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
16067
|
-
return showHeader.includes(col.dataIndex);
|
|
16215
|
+
return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
|
|
16068
16216
|
});
|
|
16069
16217
|
} else if (isObjectArray) {
|
|
16070
|
-
baseInfoColumns = showHeader.
|
|
16071
|
-
return col.show !== false;
|
|
16072
|
-
}).map(function (col) {
|
|
16218
|
+
baseInfoColumns = showHeader.map(function (col) {
|
|
16073
16219
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
16074
16220
|
return item.dataIndex === col.dataIndex;
|
|
16075
16221
|
});
|
|
16076
|
-
|
|
16222
|
+
// 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
|
|
16223
|
+
if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
|
|
16224
|
+
return currentCol;
|
|
16225
|
+
}
|
|
16226
|
+
return undefined;
|
|
16077
16227
|
}).filter(Boolean);
|
|
16078
16228
|
}
|
|
16079
16229
|
var columnList = [{
|
|
@@ -16177,7 +16327,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16177
16327
|
canUpdateNumber: canUpdateNumber
|
|
16178
16328
|
});
|
|
16179
16329
|
});
|
|
16180
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16330
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16181
16331
|
newList = list.map(function (item) {
|
|
16182
16332
|
var goodName = item.goodName,
|
|
16183
16333
|
goodShortName = item.goodShortName,
|
|
@@ -17201,7 +17351,6 @@ var index$3 = (function (props) {
|
|
|
17201
17351
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17202
17352
|
getBsE3OrderList(value.orderNo);
|
|
17203
17353
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17204
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17205
17354
|
getGyOrderList(value.orderNo);
|
|
17206
17355
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17207
17356
|
getJstOrderList(value.orderNo);
|
|
@@ -17637,7 +17786,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17637
17786
|
disabled = props.disabled,
|
|
17638
17787
|
onChange = props.onChange,
|
|
17639
17788
|
compType = props.type;
|
|
17640
|
-
console.log('value?.orders', value
|
|
17789
|
+
// console.log('value?.orders', value?.orders);
|
|
17641
17790
|
// 合并单订单会包含","
|
|
17642
17791
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17643
17792
|
var _order$componentMap$c;
|
|
@@ -18161,7 +18310,7 @@ var typeMap$1 = {
|
|
|
18161
18310
|
}
|
|
18162
18311
|
};
|
|
18163
18312
|
var wdtReissue = function wdtReissue(props) {
|
|
18164
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
18313
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18165
18314
|
var value = props.value,
|
|
18166
18315
|
onChange = props.onChange,
|
|
18167
18316
|
_props$reasonList = props.reasonList,
|
|
@@ -18318,7 +18467,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18318
18467
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18319
18468
|
};
|
|
18320
18469
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18321
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
18470
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18322
18471
|
var newValue = _objectSpread2({}, value);
|
|
18323
18472
|
// 原订单商品
|
|
18324
18473
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18329,14 +18478,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18329
18478
|
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.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18330
18479
|
return skuList.includes(item.uuid);
|
|
18331
18480
|
});
|
|
18332
|
-
console.log('商品发生变化', newValue[
|
|
18481
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18333
18482
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18334
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18483
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
|
|
18335
18484
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18336
18485
|
var showChangeBtn = React.useMemo(function () {
|
|
18337
|
-
var _typeMap$
|
|
18338
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18339
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18486
|
+
var _typeMap$type24;
|
|
18487
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
18488
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18340
18489
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18341
18490
|
gutter: 8,
|
|
18342
18491
|
wrap: true
|
|
@@ -18354,12 +18503,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18354
18503
|
},
|
|
18355
18504
|
disabled: disabled,
|
|
18356
18505
|
allowClear: false,
|
|
18357
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18506
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
18358
18507
|
onChange: function onChange(val) {
|
|
18359
18508
|
return changeSystemOrderHandle(val);
|
|
18360
18509
|
},
|
|
18361
18510
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18362
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
18511
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[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) {
|
|
18363
18512
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18364
18513
|
key: item.billNo,
|
|
18365
18514
|
value: item.billNo,
|
|
@@ -18380,7 +18529,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18380
18529
|
disabled: disabled,
|
|
18381
18530
|
allowClear: false,
|
|
18382
18531
|
options: reasonList,
|
|
18383
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18532
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
18384
18533
|
onChange: function onChange(val) {
|
|
18385
18534
|
return changeTypeHandle(val);
|
|
18386
18535
|
}
|
|
@@ -18392,7 +18541,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18392
18541
|
canUpdateNumber: showChangeBtn,
|
|
18393
18542
|
showChangeBtn: showChangeBtn,
|
|
18394
18543
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18395
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18544
|
+
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.key)],
|
|
18396
18545
|
onChange: function onChange(val) {
|
|
18397
18546
|
return changeGoodHandle(val);
|
|
18398
18547
|
},
|
|
@@ -19740,7 +19889,7 @@ var typeMap$4 = {
|
|
|
19740
19889
|
}
|
|
19741
19890
|
};
|
|
19742
19891
|
var GyReissue = function GyReissue(props) {
|
|
19743
|
-
var _typeMap$type28, _typeMap$
|
|
19892
|
+
var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
|
|
19744
19893
|
var value = props.value,
|
|
19745
19894
|
onChange = props.onChange,
|
|
19746
19895
|
_props$reasonList = props.reasonList,
|
|
@@ -19895,7 +20044,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19895
20044
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19896
20045
|
};
|
|
19897
20046
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19898
|
-
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy
|
|
20047
|
+
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
|
|
19899
20048
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
19900
20049
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19901
20050
|
// 原订单商品
|
|
@@ -19907,21 +20056,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19907
20056
|
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19908
20057
|
return skuList.includes(item.uuid);
|
|
19909
20058
|
});
|
|
19910
|
-
console.log('商品发生变化', newValue[
|
|
20059
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
19911
20060
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19912
20061
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19913
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20062
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)], isStrict]);
|
|
19914
20063
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19915
|
-
var
|
|
19916
|
-
|
|
19917
|
-
|
|
19918
|
-
|
|
19919
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19920
|
-
id: "TEST_GY",
|
|
19921
|
-
onClick: function onClick() {
|
|
19922
|
-
console.log('TEST_GY', value);
|
|
19923
|
-
}
|
|
19924
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20064
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder];
|
|
20065
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
20066
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20067
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
19925
20068
|
gutter: 8,
|
|
19926
20069
|
wrap: true
|
|
19927
20070
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
@@ -19938,12 +20081,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19938
20081
|
},
|
|
19939
20082
|
disabled: disabled,
|
|
19940
20083
|
allowClear: false,
|
|
19941
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20084
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo)],
|
|
19942
20085
|
onChange: function onChange(val) {
|
|
19943
20086
|
return changeSystemOrderHandle(val);
|
|
19944
20087
|
},
|
|
19945
20088
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19946
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
20089
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
19947
20090
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
19948
20091
|
key: item.billNo,
|
|
19949
20092
|
value: item.billNo,
|
|
@@ -19964,7 +20107,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19964
20107
|
disabled: disabled,
|
|
19965
20108
|
allowClear: false,
|
|
19966
20109
|
options: reasonList,
|
|
19967
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20110
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName)],
|
|
19968
20111
|
onChange: function onChange(val) {
|
|
19969
20112
|
return changeTypeHandle(val);
|
|
19970
20113
|
}
|
|
@@ -19975,8 +20118,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
19975
20118
|
disabled: disabled,
|
|
19976
20119
|
canUpdateNumber: showChangeBtn,
|
|
19977
20120
|
showChangeBtn: showChangeBtn,
|
|
20121
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20122
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
19978
20123
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19979
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20124
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)],
|
|
19980
20125
|
onChange: function onChange(val) {
|
|
19981
20126
|
return changeGoodHandle(val);
|
|
19982
20127
|
},
|
|
@@ -20013,7 +20158,7 @@ var typeMap$5 = {
|
|
|
20013
20158
|
}
|
|
20014
20159
|
};
|
|
20015
20160
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20016
|
-
var _typeMap$
|
|
20161
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20017
20162
|
var value = props.value,
|
|
20018
20163
|
onChange = props.onChange,
|
|
20019
20164
|
_props$reasonList = props.reasonList,
|
|
@@ -20121,7 +20266,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20121
20266
|
};
|
|
20122
20267
|
}();
|
|
20123
20268
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20124
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
20269
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20125
20270
|
var newValue = _objectSpread2({}, value);
|
|
20126
20271
|
// 原订单商品
|
|
20127
20272
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20132,49 +20277,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20132
20277
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20133
20278
|
return skuList.includes(item.uuid);
|
|
20134
20279
|
});
|
|
20135
|
-
console.log('商品发生变化', newValue[
|
|
20280
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20136
20281
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20137
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20282
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20138
20283
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20139
|
-
var _value$typeMap$type$t, _typeMap$
|
|
20284
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20140
20285
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20141
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
20286
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20142
20287
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20143
20288
|
var newValue = _objectSpread2({}, value);
|
|
20144
|
-
newValue[(_typeMap$
|
|
20289
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20145
20290
|
if (typeName === '1') {
|
|
20146
|
-
var _typeMap$
|
|
20147
|
-
newValue[(_typeMap$
|
|
20291
|
+
var _typeMap$type12;
|
|
20292
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20148
20293
|
mode: isStrict
|
|
20149
20294
|
});
|
|
20150
20295
|
} else if (typeName === '2') {
|
|
20151
|
-
var _typeMap$
|
|
20296
|
+
var _typeMap$type13;
|
|
20152
20297
|
// 切换到非原单,清空列表
|
|
20153
|
-
newValue[(_typeMap$
|
|
20298
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20154
20299
|
}
|
|
20155
20300
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20156
20301
|
};
|
|
20157
20302
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20158
|
-
var _typeMap$
|
|
20303
|
+
var _typeMap$type14;
|
|
20159
20304
|
var newValue = _objectSpread2({}, value);
|
|
20160
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20161
|
-
var _typeMap$
|
|
20162
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20163
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20305
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
20306
|
+
var _typeMap$type15, _typeMap$type16;
|
|
20307
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
20308
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20164
20309
|
return item;
|
|
20165
20310
|
});
|
|
20166
20311
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20167
20312
|
};
|
|
20168
20313
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20169
|
-
var _typeMap$
|
|
20314
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20170
20315
|
var newValue = _objectSpread2({}, value);
|
|
20171
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20172
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20173
|
-
var _typeMap$
|
|
20174
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20175
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20176
|
-
var _typeMap$
|
|
20177
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20316
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
20317
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
20318
|
+
var _typeMap$type19;
|
|
20319
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
20320
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[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])) {
|
|
20321
|
+
var _typeMap$type21;
|
|
20322
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20178
20323
|
mode: isStrict,
|
|
20179
20324
|
sysOrderNo: val
|
|
20180
20325
|
});
|
|
@@ -20182,11 +20327,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20182
20327
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20183
20328
|
};
|
|
20184
20329
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20185
|
-
var _typeMap$
|
|
20330
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20186
20331
|
var mode = _ref4.mode,
|
|
20187
20332
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20188
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20189
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20333
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
20334
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20190
20335
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20191
20336
|
return order.code === systemOrderNo;
|
|
20192
20337
|
});
|
|
@@ -20197,19 +20342,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20197
20342
|
}) : goodDetails;
|
|
20198
20343
|
};
|
|
20199
20344
|
var handleModeChange = function handleModeChange(mode) {
|
|
20200
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20201
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
20345
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
20346
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20202
20347
|
setIsStrict(mode);
|
|
20203
20348
|
if (!isOriginalOrder) return;
|
|
20204
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
20349
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20205
20350
|
mode: mode
|
|
20206
20351
|
}))));
|
|
20207
20352
|
};
|
|
20208
20353
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20209
|
-
var
|
|
20210
|
-
|
|
20211
|
-
|
|
20212
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
20354
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
20355
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20356
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20213
20357
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20214
20358
|
gutter: 8,
|
|
20215
20359
|
wrap: true
|
|
@@ -20227,12 +20371,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20227
20371
|
},
|
|
20228
20372
|
disabled: disabled,
|
|
20229
20373
|
allowClear: false,
|
|
20230
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20374
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20231
20375
|
onChange: function onChange(val) {
|
|
20232
20376
|
return changeSystemOrderHandle(val);
|
|
20233
20377
|
},
|
|
20234
20378
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20235
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
20379
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20236
20380
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
20237
20381
|
key: item.billNo,
|
|
20238
20382
|
value: item.billNo,
|
|
@@ -20253,7 +20397,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20253
20397
|
disabled: disabled,
|
|
20254
20398
|
allowClear: false,
|
|
20255
20399
|
options: reasonList,
|
|
20256
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20400
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20257
20401
|
onChange: function onChange(val) {
|
|
20258
20402
|
return changeTypeHandle(val);
|
|
20259
20403
|
}
|
|
@@ -20265,13 +20409,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20265
20409
|
canUpdateNumber: showChangeBtn,
|
|
20266
20410
|
showChangeBtn: showChangeBtn,
|
|
20267
20411
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20268
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20412
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20269
20413
|
onChange: function onChange(val) {
|
|
20270
20414
|
return changeGoodHandle(val);
|
|
20271
20415
|
},
|
|
20272
20416
|
onModeChange: handleModeChange,
|
|
20273
20417
|
isStrict: isStrict,
|
|
20274
|
-
showErpGoodsBtn:
|
|
20418
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20419
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20275
20420
|
tradeGoods: {
|
|
20276
20421
|
originDataSource: getGoodDetails({
|
|
20277
20422
|
mode: isStrict
|
|
@@ -20348,6 +20493,10 @@ exports.WdtGoodList = WdtGoodList;
|
|
|
20348
20493
|
exports.WdtReissue = wdtReissue;
|
|
20349
20494
|
exports.WlnGoods = WlnGoods;
|
|
20350
20495
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
20496
|
+
exports.erpColumnsMap = erpColumnsMap;
|
|
20497
|
+
exports.erpFormValidator = erpFormValidator;
|
|
20351
20498
|
exports.erpModalColumnsMap = index$2;
|
|
20499
|
+
exports.getGyColumns = getColumns$4;
|
|
20352
20500
|
exports.getJstColumns = getColumns$5;
|
|
20501
|
+
exports.getWdtColumns = getColumns$2;
|
|
20353
20502
|
exports.getWlnColumns = getColumns$3;
|