@kmkf-fe-packages/basic-components 2.0.55 → 2.0.57
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 +278 -125
- package/dist/index.js +280 -123
- 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/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];
|
|
@@ -14137,15 +14188,20 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14137
14188
|
WDT_REISSUE_GOODS: [{
|
|
14138
14189
|
dataIndex: 'goodId',
|
|
14139
14190
|
title: "\u5546\u54C1ID",
|
|
14140
|
-
width: 120
|
|
14191
|
+
width: 120,
|
|
14192
|
+
align: 'center',
|
|
14193
|
+
ellipsis: true
|
|
14141
14194
|
}, {
|
|
14142
14195
|
dataIndex: 'goodNo',
|
|
14143
14196
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
14144
|
-
|
|
14197
|
+
align: 'center',
|
|
14198
|
+
ellipsis: true,
|
|
14199
|
+
width: 180
|
|
14145
14200
|
}, {
|
|
14146
14201
|
dataIndex: 'goodName',
|
|
14147
14202
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
14148
14203
|
width: 200,
|
|
14204
|
+
align: 'center',
|
|
14149
14205
|
render: function render(text) {
|
|
14150
14206
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
14151
14207
|
val: text
|
|
@@ -14154,14 +14210,19 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14154
14210
|
}, {
|
|
14155
14211
|
dataIndex: 'specId',
|
|
14156
14212
|
title: "SKUID",
|
|
14213
|
+
align: 'center',
|
|
14214
|
+
ellipsis: true,
|
|
14157
14215
|
width: 150
|
|
14158
14216
|
}, {
|
|
14159
14217
|
dataIndex: 'specNo',
|
|
14160
14218
|
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
14161
|
-
|
|
14219
|
+
align: 'center',
|
|
14220
|
+
ellipsis: true,
|
|
14221
|
+
width: 180
|
|
14162
14222
|
}, {
|
|
14163
14223
|
dataIndex: 'specName',
|
|
14164
14224
|
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
14225
|
+
align: 'center',
|
|
14165
14226
|
width: 250,
|
|
14166
14227
|
render: function render(text) {
|
|
14167
14228
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
@@ -14274,18 +14335,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14274
14335
|
align: 'center',
|
|
14275
14336
|
ellipsis: true,
|
|
14276
14337
|
width: 100,
|
|
14277
|
-
render:
|
|
14278
|
-
var giftTypeMap = {
|
|
14279
|
-
0: '非赠品',
|
|
14280
|
-
1: '自动赠送',
|
|
14281
|
-
2: '手工赠送',
|
|
14282
|
-
3: '回购自动送赠品',
|
|
14283
|
-
4: '前N有礼送赠品',
|
|
14284
|
-
6: '天猫优仓赠品',
|
|
14285
|
-
7: '淘宝CRM会员送赠'
|
|
14286
|
-
};
|
|
14287
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14288
|
-
}
|
|
14338
|
+
render: renderGiftType
|
|
14289
14339
|
}],
|
|
14290
14340
|
//旺店通退货商品信息
|
|
14291
14341
|
WDT_RETURN_GOODS: [{
|
|
@@ -14381,18 +14431,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14381
14431
|
align: 'center',
|
|
14382
14432
|
ellipsis: true,
|
|
14383
14433
|
width: 100,
|
|
14384
|
-
render:
|
|
14385
|
-
var giftTypeMap = {
|
|
14386
|
-
0: '非赠品',
|
|
14387
|
-
1: '自动赠送',
|
|
14388
|
-
2: '手工赠送',
|
|
14389
|
-
3: '回购自动送赠品',
|
|
14390
|
-
4: '前N有礼送赠品',
|
|
14391
|
-
6: '天猫优仓赠品',
|
|
14392
|
-
7: '淘宝CRM会员送赠'
|
|
14393
|
-
};
|
|
14394
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14395
|
-
}
|
|
14434
|
+
render: renderGiftType
|
|
14396
14435
|
}, {
|
|
14397
14436
|
dataIndex: 'type',
|
|
14398
14437
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14513,18 +14552,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14513
14552
|
align: 'center',
|
|
14514
14553
|
ellipsis: true,
|
|
14515
14554
|
width: 100,
|
|
14516
|
-
render:
|
|
14517
|
-
var giftTypeMap = {
|
|
14518
|
-
0: '非赠品',
|
|
14519
|
-
1: '自动赠送',
|
|
14520
|
-
2: '手工赠送',
|
|
14521
|
-
3: '回购自动送赠品',
|
|
14522
|
-
4: '前N有礼送赠品',
|
|
14523
|
-
6: '天猫优仓赠品',
|
|
14524
|
-
7: '淘宝CRM会员送赠'
|
|
14525
|
-
};
|
|
14526
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14527
|
-
}
|
|
14555
|
+
render: renderGiftType
|
|
14528
14556
|
}, {
|
|
14529
14557
|
dataIndex: 'type',
|
|
14530
14558
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14708,6 +14736,15 @@ var getYesOrNo$1 = function getYesOrNo(val) {
|
|
|
14708
14736
|
if (kmkfUtils.isNull(val)) return null;
|
|
14709
14737
|
return val ? '是' : '否';
|
|
14710
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
|
+
}
|
|
14711
14748
|
var getColumns$4 = function getColumns(_ref) {
|
|
14712
14749
|
var _ref$text = _ref.text,
|
|
14713
14750
|
disabled = _ref.disabled,
|
|
@@ -14865,6 +14902,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14865
14902
|
dataIndex: 'qty',
|
|
14866
14903
|
title: "\u6570\u91CF",
|
|
14867
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
|
+
},
|
|
14868
14918
|
render: function render(val, record, index) {
|
|
14869
14919
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14870
14920
|
style: {
|
|
@@ -14968,6 +15018,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14968
15018
|
dataIndex: 'qty',
|
|
14969
15019
|
title: "\u6570\u91CF",
|
|
14970
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
|
+
},
|
|
14971
15034
|
render: function render(val, record, index) {
|
|
14972
15035
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14973
15036
|
style: {
|
|
@@ -15059,6 +15122,15 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
15059
15122
|
if (!item.align) item.align = 'center';
|
|
15060
15123
|
return item;
|
|
15061
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
|
+
}
|
|
15062
15134
|
var getColumns$5 = function getColumns() {
|
|
15063
15135
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
15064
15136
|
_ref$text = _ref.text,
|
|
@@ -15242,6 +15314,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15242
15314
|
ellipsis: true,
|
|
15243
15315
|
align: 'center',
|
|
15244
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
|
+
},
|
|
15245
15330
|
render: function render(val, record, index) {
|
|
15246
15331
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15247
15332
|
style: {
|
|
@@ -15261,6 +15346,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15261
15346
|
ellipsis: true,
|
|
15262
15347
|
align: 'center',
|
|
15263
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
|
+
},
|
|
15264
15362
|
render: function render(val, record, index) {
|
|
15265
15363
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15266
15364
|
style: {
|
|
@@ -15345,6 +15443,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15345
15443
|
dataIndex: 'salePrice',
|
|
15346
15444
|
title: '单价',
|
|
15347
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
|
+
},
|
|
15348
15459
|
render: function render(val, record, index) {
|
|
15349
15460
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15350
15461
|
style: {
|
|
@@ -15362,6 +15473,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15362
15473
|
dataIndex: 'qty',
|
|
15363
15474
|
title: '数量',
|
|
15364
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
|
+
},
|
|
15365
15489
|
render: function render(val, record, index) {
|
|
15366
15490
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15367
15491
|
style: {
|
|
@@ -15673,6 +15797,30 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15673
15797
|
})['default']
|
|
15674
15798
|
});
|
|
15675
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
|
+
};
|
|
15676
15824
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15677
15825
|
var clone_columnsMap = lodash.cloneDeep(getColumnsMap$1());
|
|
15678
15826
|
var newColumns = {};
|
|
@@ -15680,7 +15828,8 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
|
15680
15828
|
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
15681
15829
|
return {
|
|
15682
15830
|
title: col.title,
|
|
15683
|
-
dataIndex: col.dataIndex
|
|
15831
|
+
dataIndex: col.dataIndex,
|
|
15832
|
+
disabled: !!col.validator
|
|
15684
15833
|
};
|
|
15685
15834
|
});
|
|
15686
15835
|
});
|
|
@@ -15802,6 +15951,7 @@ var GoodsModalMap = {
|
|
|
15802
15951
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15803
15952
|
GY_GOODS: GyGoodsModal$2,
|
|
15804
15953
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
15954
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15805
15955
|
JST_GOODS: JstGoodsModal,
|
|
15806
15956
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15807
15957
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
@@ -15839,7 +15989,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15839
15989
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15840
15990
|
}));
|
|
15841
15991
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15842
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15992
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15843
15993
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15844
15994
|
};
|
|
15845
15995
|
var rowSelection = {
|
|
@@ -15874,7 +16024,7 @@ var getButtonText = function getButtonText() {
|
|
|
15874
16024
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
15875
16025
|
return '选择旺店通商品';
|
|
15876
16026
|
}
|
|
15877
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16027
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
15878
16028
|
return '选择管易ERP商品';
|
|
15879
16029
|
}
|
|
15880
16030
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16062,16 +16212,18 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16062
16212
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
16063
16213
|
if (isStringArray) {
|
|
16064
16214
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
16065
|
-
return showHeader.includes(col.dataIndex);
|
|
16215
|
+
return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
|
|
16066
16216
|
});
|
|
16067
16217
|
} else if (isObjectArray) {
|
|
16068
|
-
baseInfoColumns = showHeader.
|
|
16069
|
-
return col.show !== false;
|
|
16070
|
-
}).map(function (col) {
|
|
16218
|
+
baseInfoColumns = showHeader.map(function (col) {
|
|
16071
16219
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
16072
16220
|
return item.dataIndex === col.dataIndex;
|
|
16073
16221
|
});
|
|
16074
|
-
|
|
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;
|
|
16075
16227
|
}).filter(Boolean);
|
|
16076
16228
|
}
|
|
16077
16229
|
var columnList = [{
|
|
@@ -16175,7 +16327,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16175
16327
|
canUpdateNumber: canUpdateNumber
|
|
16176
16328
|
});
|
|
16177
16329
|
});
|
|
16178
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16330
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16179
16331
|
newList = list.map(function (item) {
|
|
16180
16332
|
var goodName = item.goodName,
|
|
16181
16333
|
goodShortName = item.goodShortName,
|
|
@@ -16953,10 +17105,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
16953
17105
|
var _data$data, _data$data$trades;
|
|
16954
17106
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
16955
17107
|
data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
17108
|
+
var _tradeStatusMap$data$;
|
|
16956
17109
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16957
17110
|
billNo: item.tradeNo,
|
|
16958
17111
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
16959
|
-
billTag: item.tagName
|
|
17112
|
+
billTag: item.tagName,
|
|
17113
|
+
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
16960
17114
|
});
|
|
16961
17115
|
});
|
|
16962
17116
|
}
|
|
@@ -17199,7 +17353,6 @@ var index$3 = (function (props) {
|
|
|
17199
17353
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17200
17354
|
getBsE3OrderList(value.orderNo);
|
|
17201
17355
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17202
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17203
17356
|
getGyOrderList(value.orderNo);
|
|
17204
17357
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17205
17358
|
getJstOrderList(value.orderNo);
|
|
@@ -17313,11 +17466,13 @@ var index$3 = (function (props) {
|
|
|
17313
17466
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17314
17467
|
var billNo = _ref4.billNo,
|
|
17315
17468
|
billType = _ref4.billType,
|
|
17316
|
-
billTag = _ref4.billTag
|
|
17469
|
+
billTag = _ref4.billTag,
|
|
17470
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17317
17471
|
return {
|
|
17318
17472
|
billNo: billNo,
|
|
17319
17473
|
billType: billType,
|
|
17320
|
-
billTag: billTag
|
|
17474
|
+
billTag: billTag,
|
|
17475
|
+
tradeStatusValue: tradeStatusValue
|
|
17321
17476
|
};
|
|
17322
17477
|
})
|
|
17323
17478
|
}));
|
|
@@ -17635,7 +17790,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17635
17790
|
disabled = props.disabled,
|
|
17636
17791
|
onChange = props.onChange,
|
|
17637
17792
|
compType = props.type;
|
|
17638
|
-
console.log('value?.orders', value
|
|
17793
|
+
// console.log('value?.orders', value?.orders);
|
|
17639
17794
|
// 合并单订单会包含","
|
|
17640
17795
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17641
17796
|
var _order$componentMap$c;
|
|
@@ -18159,7 +18314,7 @@ var typeMap$1 = {
|
|
|
18159
18314
|
}
|
|
18160
18315
|
};
|
|
18161
18316
|
var wdtReissue = function wdtReissue(props) {
|
|
18162
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
18317
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18163
18318
|
var value = props.value,
|
|
18164
18319
|
onChange = props.onChange,
|
|
18165
18320
|
_props$reasonList = props.reasonList,
|
|
@@ -18229,11 +18384,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18229
18384
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18230
18385
|
var billNo = _ref2.billNo,
|
|
18231
18386
|
billType = _ref2.billType,
|
|
18232
|
-
billTag = _ref2.billTag
|
|
18387
|
+
billTag = _ref2.billTag,
|
|
18388
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18233
18389
|
return {
|
|
18234
18390
|
billNo: billNo,
|
|
18235
18391
|
billType: billType,
|
|
18236
|
-
billTag: billTag
|
|
18392
|
+
billTag: billTag,
|
|
18393
|
+
tradeStatusValue: tradeStatusValue
|
|
18237
18394
|
};
|
|
18238
18395
|
});
|
|
18239
18396
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18316,7 +18473,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18316
18473
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18317
18474
|
};
|
|
18318
18475
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18319
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
18476
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18320
18477
|
var newValue = _objectSpread2({}, value);
|
|
18321
18478
|
// 原订单商品
|
|
18322
18479
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18327,14 +18484,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18327
18484
|
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) {
|
|
18328
18485
|
return skuList.includes(item.uuid);
|
|
18329
18486
|
});
|
|
18330
|
-
console.log('商品发生变化', newValue[
|
|
18487
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18331
18488
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18332
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18489
|
+
}, [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]);
|
|
18333
18490
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18334
18491
|
var showChangeBtn = React.useMemo(function () {
|
|
18335
|
-
var _typeMap$
|
|
18336
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18337
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18492
|
+
var _typeMap$type24;
|
|
18493
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
18494
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18338
18495
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18339
18496
|
gutter: 8,
|
|
18340
18497
|
wrap: true
|
|
@@ -18352,12 +18509,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18352
18509
|
},
|
|
18353
18510
|
disabled: disabled,
|
|
18354
18511
|
allowClear: false,
|
|
18355
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18512
|
+
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)],
|
|
18356
18513
|
onChange: function onChange(val) {
|
|
18357
18514
|
return changeSystemOrderHandle(val);
|
|
18358
18515
|
},
|
|
18359
18516
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18360
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
18517
|
+
}, ((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) {
|
|
18361
18518
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18362
18519
|
key: item.billNo,
|
|
18363
18520
|
value: item.billNo,
|
|
@@ -18378,7 +18535,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18378
18535
|
disabled: disabled,
|
|
18379
18536
|
allowClear: false,
|
|
18380
18537
|
options: reasonList,
|
|
18381
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18538
|
+
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)],
|
|
18382
18539
|
onChange: function onChange(val) {
|
|
18383
18540
|
return changeTypeHandle(val);
|
|
18384
18541
|
}
|
|
@@ -18390,7 +18547,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18390
18547
|
canUpdateNumber: showChangeBtn,
|
|
18391
18548
|
showChangeBtn: showChangeBtn,
|
|
18392
18549
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18393
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
18550
|
+
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)],
|
|
18394
18551
|
onChange: function onChange(val) {
|
|
18395
18552
|
return changeGoodHandle(val);
|
|
18396
18553
|
},
|
|
@@ -19738,7 +19895,7 @@ var typeMap$4 = {
|
|
|
19738
19895
|
}
|
|
19739
19896
|
};
|
|
19740
19897
|
var GyReissue = function GyReissue(props) {
|
|
19741
|
-
var _typeMap$type28, _typeMap$
|
|
19898
|
+
var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
|
|
19742
19899
|
var value = props.value,
|
|
19743
19900
|
onChange = props.onChange,
|
|
19744
19901
|
_props$reasonList = props.reasonList,
|
|
@@ -19893,7 +20050,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19893
20050
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19894
20051
|
};
|
|
19895
20052
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19896
|
-
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy
|
|
20053
|
+
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
|
|
19897
20054
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
19898
20055
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19899
20056
|
// 原订单商品
|
|
@@ -19905,21 +20062,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19905
20062
|
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) {
|
|
19906
20063
|
return skuList.includes(item.uuid);
|
|
19907
20064
|
});
|
|
19908
|
-
console.log('商品发生变化', newValue[
|
|
20065
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
19909
20066
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19910
20067
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19911
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20068
|
+
}, [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]);
|
|
19912
20069
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19913
|
-
var
|
|
19914
|
-
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19918
|
-
id: "TEST_GY",
|
|
19919
|
-
onClick: function onClick() {
|
|
19920
|
-
console.log('TEST_GY', value);
|
|
19921
|
-
}
|
|
19922
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20070
|
+
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];
|
|
20071
|
+
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]);
|
|
20072
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20073
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
19923
20074
|
gutter: 8,
|
|
19924
20075
|
wrap: true
|
|
19925
20076
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
@@ -19936,12 +20087,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19936
20087
|
},
|
|
19937
20088
|
disabled: disabled,
|
|
19938
20089
|
allowClear: false,
|
|
19939
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20090
|
+
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)],
|
|
19940
20091
|
onChange: function onChange(val) {
|
|
19941
20092
|
return changeSystemOrderHandle(val);
|
|
19942
20093
|
},
|
|
19943
20094
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19944
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
20095
|
+
}, ((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) {
|
|
19945
20096
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
19946
20097
|
key: item.billNo,
|
|
19947
20098
|
value: item.billNo,
|
|
@@ -19962,7 +20113,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19962
20113
|
disabled: disabled,
|
|
19963
20114
|
allowClear: false,
|
|
19964
20115
|
options: reasonList,
|
|
19965
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20116
|
+
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)],
|
|
19966
20117
|
onChange: function onChange(val) {
|
|
19967
20118
|
return changeTypeHandle(val);
|
|
19968
20119
|
}
|
|
@@ -19973,8 +20124,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
19973
20124
|
disabled: disabled,
|
|
19974
20125
|
canUpdateNumber: showChangeBtn,
|
|
19975
20126
|
showChangeBtn: showChangeBtn,
|
|
20127
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20128
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
19976
20129
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19977
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20130
|
+
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)],
|
|
19978
20131
|
onChange: function onChange(val) {
|
|
19979
20132
|
return changeGoodHandle(val);
|
|
19980
20133
|
},
|
|
@@ -20011,7 +20164,7 @@ var typeMap$5 = {
|
|
|
20011
20164
|
}
|
|
20012
20165
|
};
|
|
20013
20166
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20014
|
-
var _typeMap$
|
|
20167
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20015
20168
|
var value = props.value,
|
|
20016
20169
|
onChange = props.onChange,
|
|
20017
20170
|
_props$reasonList = props.reasonList,
|
|
@@ -20119,7 +20272,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20119
20272
|
};
|
|
20120
20273
|
}();
|
|
20121
20274
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20122
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
20275
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20123
20276
|
var newValue = _objectSpread2({}, value);
|
|
20124
20277
|
// 原订单商品
|
|
20125
20278
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20130,49 +20283,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20130
20283
|
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) {
|
|
20131
20284
|
return skuList.includes(item.uuid);
|
|
20132
20285
|
});
|
|
20133
|
-
console.log('商品发生变化', newValue[
|
|
20286
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20134
20287
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20135
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20288
|
+
}, [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]);
|
|
20136
20289
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20137
|
-
var _value$typeMap$type$t, _typeMap$
|
|
20290
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20138
20291
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20139
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
20292
|
+
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;
|
|
20140
20293
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20141
20294
|
var newValue = _objectSpread2({}, value);
|
|
20142
|
-
newValue[(_typeMap$
|
|
20295
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20143
20296
|
if (typeName === '1') {
|
|
20144
|
-
var _typeMap$
|
|
20145
|
-
newValue[(_typeMap$
|
|
20297
|
+
var _typeMap$type12;
|
|
20298
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20146
20299
|
mode: isStrict
|
|
20147
20300
|
});
|
|
20148
20301
|
} else if (typeName === '2') {
|
|
20149
|
-
var _typeMap$
|
|
20302
|
+
var _typeMap$type13;
|
|
20150
20303
|
// 切换到非原单,清空列表
|
|
20151
|
-
newValue[(_typeMap$
|
|
20304
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20152
20305
|
}
|
|
20153
20306
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20154
20307
|
};
|
|
20155
20308
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20156
|
-
var _typeMap$
|
|
20309
|
+
var _typeMap$type14;
|
|
20157
20310
|
var newValue = _objectSpread2({}, value);
|
|
20158
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20159
|
-
var _typeMap$
|
|
20160
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20161
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20311
|
+
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) {
|
|
20312
|
+
var _typeMap$type15, _typeMap$type16;
|
|
20313
|
+
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;
|
|
20314
|
+
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;
|
|
20162
20315
|
return item;
|
|
20163
20316
|
});
|
|
20164
20317
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20165
20318
|
};
|
|
20166
20319
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20167
|
-
var _typeMap$
|
|
20320
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20168
20321
|
var newValue = _objectSpread2({}, value);
|
|
20169
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20170
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20171
|
-
var _typeMap$
|
|
20172
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20173
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20174
|
-
var _typeMap$
|
|
20175
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20322
|
+
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;
|
|
20323
|
+
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])) {
|
|
20324
|
+
var _typeMap$type19;
|
|
20325
|
+
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)] = [];
|
|
20326
|
+
} 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])) {
|
|
20327
|
+
var _typeMap$type21;
|
|
20328
|
+
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({
|
|
20176
20329
|
mode: isStrict,
|
|
20177
20330
|
sysOrderNo: val
|
|
20178
20331
|
});
|
|
@@ -20180,11 +20333,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20180
20333
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20181
20334
|
};
|
|
20182
20335
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20183
|
-
var _typeMap$
|
|
20336
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20184
20337
|
var mode = _ref4.mode,
|
|
20185
20338
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20186
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20187
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20339
|
+
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];
|
|
20340
|
+
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];
|
|
20188
20341
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20189
20342
|
return order.code === systemOrderNo;
|
|
20190
20343
|
});
|
|
@@ -20195,19 +20348,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20195
20348
|
}) : goodDetails;
|
|
20196
20349
|
};
|
|
20197
20350
|
var handleModeChange = function handleModeChange(mode) {
|
|
20198
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20199
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
20351
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
20352
|
+
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';
|
|
20200
20353
|
setIsStrict(mode);
|
|
20201
20354
|
if (!isOriginalOrder) return;
|
|
20202
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
20355
|
+
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({
|
|
20203
20356
|
mode: mode
|
|
20204
20357
|
}))));
|
|
20205
20358
|
};
|
|
20206
20359
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20207
|
-
var
|
|
20208
|
-
|
|
20209
|
-
|
|
20210
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
20360
|
+
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];
|
|
20361
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20362
|
+
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]);
|
|
20211
20363
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20212
20364
|
gutter: 8,
|
|
20213
20365
|
wrap: true
|
|
@@ -20225,12 +20377,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20225
20377
|
},
|
|
20226
20378
|
disabled: disabled,
|
|
20227
20379
|
allowClear: false,
|
|
20228
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20380
|
+
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)],
|
|
20229
20381
|
onChange: function onChange(val) {
|
|
20230
20382
|
return changeSystemOrderHandle(val);
|
|
20231
20383
|
},
|
|
20232
20384
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20233
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
20385
|
+
}, ((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) {
|
|
20234
20386
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
20235
20387
|
key: item.billNo,
|
|
20236
20388
|
value: item.billNo,
|
|
@@ -20251,7 +20403,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20251
20403
|
disabled: disabled,
|
|
20252
20404
|
allowClear: false,
|
|
20253
20405
|
options: reasonList,
|
|
20254
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20406
|
+
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)],
|
|
20255
20407
|
onChange: function onChange(val) {
|
|
20256
20408
|
return changeTypeHandle(val);
|
|
20257
20409
|
}
|
|
@@ -20263,13 +20415,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20263
20415
|
canUpdateNumber: showChangeBtn,
|
|
20264
20416
|
showChangeBtn: showChangeBtn,
|
|
20265
20417
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20266
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20418
|
+
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)],
|
|
20267
20419
|
onChange: function onChange(val) {
|
|
20268
20420
|
return changeGoodHandle(val);
|
|
20269
20421
|
},
|
|
20270
20422
|
onModeChange: handleModeChange,
|
|
20271
20423
|
isStrict: isStrict,
|
|
20272
|
-
showErpGoodsBtn:
|
|
20424
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20425
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20273
20426
|
tradeGoods: {
|
|
20274
20427
|
originDataSource: getGoodDetails({
|
|
20275
20428
|
mode: isStrict
|
|
@@ -20346,6 +20499,10 @@ exports.WdtGoodList = WdtGoodList;
|
|
|
20346
20499
|
exports.WdtReissue = wdtReissue;
|
|
20347
20500
|
exports.WlnGoods = WlnGoods;
|
|
20348
20501
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
20502
|
+
exports.erpColumnsMap = erpColumnsMap;
|
|
20503
|
+
exports.erpFormValidator = erpFormValidator;
|
|
20349
20504
|
exports.erpModalColumnsMap = index$2;
|
|
20505
|
+
exports.getGyColumns = getColumns$4;
|
|
20350
20506
|
exports.getJstColumns = getColumns$5;
|
|
20507
|
+
exports.getWdtColumns = getColumns$2;
|
|
20351
20508
|
exports.getWlnColumns = getColumns$3;
|