@kmkf-fe-packages/basic-components 2.0.55 → 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 +266 -119
- package/dist/index.js +269 -118
- 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,
|
|
@@ -17199,7 +17351,6 @@ var index$3 = (function (props) {
|
|
|
17199
17351
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17200
17352
|
getBsE3OrderList(value.orderNo);
|
|
17201
17353
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17202
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17203
17354
|
getGyOrderList(value.orderNo);
|
|
17204
17355
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17205
17356
|
getJstOrderList(value.orderNo);
|
|
@@ -17635,7 +17786,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17635
17786
|
disabled = props.disabled,
|
|
17636
17787
|
onChange = props.onChange,
|
|
17637
17788
|
compType = props.type;
|
|
17638
|
-
console.log('value?.orders', value
|
|
17789
|
+
// console.log('value?.orders', value?.orders);
|
|
17639
17790
|
// 合并单订单会包含","
|
|
17640
17791
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17641
17792
|
var _order$componentMap$c;
|
|
@@ -18159,7 +18310,7 @@ var typeMap$1 = {
|
|
|
18159
18310
|
}
|
|
18160
18311
|
};
|
|
18161
18312
|
var wdtReissue = function wdtReissue(props) {
|
|
18162
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
18313
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18163
18314
|
var value = props.value,
|
|
18164
18315
|
onChange = props.onChange,
|
|
18165
18316
|
_props$reasonList = props.reasonList,
|
|
@@ -18316,7 +18467,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18316
18467
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18317
18468
|
};
|
|
18318
18469
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18319
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
18470
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18320
18471
|
var newValue = _objectSpread2({}, value);
|
|
18321
18472
|
// 原订单商品
|
|
18322
18473
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18327,14 +18478,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18327
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) {
|
|
18328
18479
|
return skuList.includes(item.uuid);
|
|
18329
18480
|
});
|
|
18330
|
-
console.log('商品发生变化', newValue[
|
|
18481
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18331
18482
|
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$
|
|
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]);
|
|
18333
18484
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18334
18485
|
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$
|
|
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]]);
|
|
18338
18489
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18339
18490
|
gutter: 8,
|
|
18340
18491
|
wrap: true
|
|
@@ -18352,12 +18503,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18352
18503
|
},
|
|
18353
18504
|
disabled: disabled,
|
|
18354
18505
|
allowClear: false,
|
|
18355
|
-
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)],
|
|
18356
18507
|
onChange: function onChange(val) {
|
|
18357
18508
|
return changeSystemOrderHandle(val);
|
|
18358
18509
|
},
|
|
18359
18510
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18360
|
-
}, ((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) {
|
|
18361
18512
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18362
18513
|
key: item.billNo,
|
|
18363
18514
|
value: item.billNo,
|
|
@@ -18378,7 +18529,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18378
18529
|
disabled: disabled,
|
|
18379
18530
|
allowClear: false,
|
|
18380
18531
|
options: reasonList,
|
|
18381
|
-
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)],
|
|
18382
18533
|
onChange: function onChange(val) {
|
|
18383
18534
|
return changeTypeHandle(val);
|
|
18384
18535
|
}
|
|
@@ -18390,7 +18541,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18390
18541
|
canUpdateNumber: showChangeBtn,
|
|
18391
18542
|
showChangeBtn: showChangeBtn,
|
|
18392
18543
|
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$
|
|
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)],
|
|
18394
18545
|
onChange: function onChange(val) {
|
|
18395
18546
|
return changeGoodHandle(val);
|
|
18396
18547
|
},
|
|
@@ -19738,7 +19889,7 @@ var typeMap$4 = {
|
|
|
19738
19889
|
}
|
|
19739
19890
|
};
|
|
19740
19891
|
var GyReissue = function GyReissue(props) {
|
|
19741
|
-
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;
|
|
19742
19893
|
var value = props.value,
|
|
19743
19894
|
onChange = props.onChange,
|
|
19744
19895
|
_props$reasonList = props.reasonList,
|
|
@@ -19893,7 +20044,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19893
20044
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19894
20045
|
};
|
|
19895
20046
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19896
|
-
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy
|
|
20047
|
+
var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
|
|
19897
20048
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
19898
20049
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19899
20050
|
// 原订单商品
|
|
@@ -19905,21 +20056,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19905
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) {
|
|
19906
20057
|
return skuList.includes(item.uuid);
|
|
19907
20058
|
});
|
|
19908
|
-
console.log('商品发生变化', newValue[
|
|
20059
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
19909
20060
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19910
20061
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19911
|
-
}, [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]);
|
|
19912
20063
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
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, {
|
|
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, {
|
|
19923
20068
|
gutter: 8,
|
|
19924
20069
|
wrap: true
|
|
19925
20070
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
@@ -19936,12 +20081,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19936
20081
|
},
|
|
19937
20082
|
disabled: disabled,
|
|
19938
20083
|
allowClear: false,
|
|
19939
|
-
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)],
|
|
19940
20085
|
onChange: function onChange(val) {
|
|
19941
20086
|
return changeSystemOrderHandle(val);
|
|
19942
20087
|
},
|
|
19943
20088
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19944
|
-
}, ((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) {
|
|
19945
20090
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
19946
20091
|
key: item.billNo,
|
|
19947
20092
|
value: item.billNo,
|
|
@@ -19962,7 +20107,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19962
20107
|
disabled: disabled,
|
|
19963
20108
|
allowClear: false,
|
|
19964
20109
|
options: reasonList,
|
|
19965
|
-
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)],
|
|
19966
20111
|
onChange: function onChange(val) {
|
|
19967
20112
|
return changeTypeHandle(val);
|
|
19968
20113
|
}
|
|
@@ -19973,8 +20118,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
19973
20118
|
disabled: disabled,
|
|
19974
20119
|
canUpdateNumber: showChangeBtn,
|
|
19975
20120
|
showChangeBtn: showChangeBtn,
|
|
20121
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20122
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
19976
20123
|
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$
|
|
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)],
|
|
19978
20125
|
onChange: function onChange(val) {
|
|
19979
20126
|
return changeGoodHandle(val);
|
|
19980
20127
|
},
|
|
@@ -20011,7 +20158,7 @@ var typeMap$5 = {
|
|
|
20011
20158
|
}
|
|
20012
20159
|
};
|
|
20013
20160
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20014
|
-
var _typeMap$
|
|
20161
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20015
20162
|
var value = props.value,
|
|
20016
20163
|
onChange = props.onChange,
|
|
20017
20164
|
_props$reasonList = props.reasonList,
|
|
@@ -20119,7 +20266,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20119
20266
|
};
|
|
20120
20267
|
}();
|
|
20121
20268
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20122
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
20269
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20123
20270
|
var newValue = _objectSpread2({}, value);
|
|
20124
20271
|
// 原订单商品
|
|
20125
20272
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20130,49 +20277,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20130
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) {
|
|
20131
20278
|
return skuList.includes(item.uuid);
|
|
20132
20279
|
});
|
|
20133
|
-
console.log('商品发生变化', newValue[
|
|
20280
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20134
20281
|
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$
|
|
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]);
|
|
20136
20283
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20137
|
-
var _value$typeMap$type$t, _typeMap$
|
|
20284
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20138
20285
|
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$
|
|
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;
|
|
20140
20287
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20141
20288
|
var newValue = _objectSpread2({}, value);
|
|
20142
|
-
newValue[(_typeMap$
|
|
20289
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20143
20290
|
if (typeName === '1') {
|
|
20144
|
-
var _typeMap$
|
|
20145
|
-
newValue[(_typeMap$
|
|
20291
|
+
var _typeMap$type12;
|
|
20292
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20146
20293
|
mode: isStrict
|
|
20147
20294
|
});
|
|
20148
20295
|
} else if (typeName === '2') {
|
|
20149
|
-
var _typeMap$
|
|
20296
|
+
var _typeMap$type13;
|
|
20150
20297
|
// 切换到非原单,清空列表
|
|
20151
|
-
newValue[(_typeMap$
|
|
20298
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20152
20299
|
}
|
|
20153
20300
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20154
20301
|
};
|
|
20155
20302
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20156
|
-
var _typeMap$
|
|
20303
|
+
var _typeMap$type14;
|
|
20157
20304
|
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$
|
|
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;
|
|
20162
20309
|
return item;
|
|
20163
20310
|
});
|
|
20164
20311
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20165
20312
|
};
|
|
20166
20313
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20167
|
-
var _typeMap$
|
|
20314
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20168
20315
|
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$
|
|
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({
|
|
20176
20323
|
mode: isStrict,
|
|
20177
20324
|
sysOrderNo: val
|
|
20178
20325
|
});
|
|
@@ -20180,11 +20327,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20180
20327
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20181
20328
|
};
|
|
20182
20329
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20183
|
-
var _typeMap$
|
|
20330
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20184
20331
|
var mode = _ref4.mode,
|
|
20185
20332
|
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$
|
|
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];
|
|
20188
20335
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20189
20336
|
return order.code === systemOrderNo;
|
|
20190
20337
|
});
|
|
@@ -20195,19 +20342,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20195
20342
|
}) : goodDetails;
|
|
20196
20343
|
};
|
|
20197
20344
|
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$
|
|
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';
|
|
20200
20347
|
setIsStrict(mode);
|
|
20201
20348
|
if (!isOriginalOrder) return;
|
|
20202
|
-
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({
|
|
20203
20350
|
mode: mode
|
|
20204
20351
|
}))));
|
|
20205
20352
|
};
|
|
20206
20353
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
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]]);
|
|
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]);
|
|
20211
20357
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20212
20358
|
gutter: 8,
|
|
20213
20359
|
wrap: true
|
|
@@ -20225,12 +20371,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20225
20371
|
},
|
|
20226
20372
|
disabled: disabled,
|
|
20227
20373
|
allowClear: false,
|
|
20228
|
-
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)],
|
|
20229
20375
|
onChange: function onChange(val) {
|
|
20230
20376
|
return changeSystemOrderHandle(val);
|
|
20231
20377
|
},
|
|
20232
20378
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20233
|
-
}, ((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) {
|
|
20234
20380
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
20235
20381
|
key: item.billNo,
|
|
20236
20382
|
value: item.billNo,
|
|
@@ -20251,7 +20397,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20251
20397
|
disabled: disabled,
|
|
20252
20398
|
allowClear: false,
|
|
20253
20399
|
options: reasonList,
|
|
20254
|
-
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)],
|
|
20255
20401
|
onChange: function onChange(val) {
|
|
20256
20402
|
return changeTypeHandle(val);
|
|
20257
20403
|
}
|
|
@@ -20263,13 +20409,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20263
20409
|
canUpdateNumber: showChangeBtn,
|
|
20264
20410
|
showChangeBtn: showChangeBtn,
|
|
20265
20411
|
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$
|
|
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)],
|
|
20267
20413
|
onChange: function onChange(val) {
|
|
20268
20414
|
return changeGoodHandle(val);
|
|
20269
20415
|
},
|
|
20270
20416
|
onModeChange: handleModeChange,
|
|
20271
20417
|
isStrict: isStrict,
|
|
20272
|
-
showErpGoodsBtn:
|
|
20418
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20419
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20273
20420
|
tradeGoods: {
|
|
20274
20421
|
originDataSource: getGoodDetails({
|
|
20275
20422
|
mode: isStrict
|
|
@@ -20346,6 +20493,10 @@ exports.WdtGoodList = WdtGoodList;
|
|
|
20346
20493
|
exports.WdtReissue = wdtReissue;
|
|
20347
20494
|
exports.WlnGoods = WlnGoods;
|
|
20348
20495
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
20496
|
+
exports.erpColumnsMap = erpColumnsMap;
|
|
20497
|
+
exports.erpFormValidator = erpFormValidator;
|
|
20349
20498
|
exports.erpModalColumnsMap = index$2;
|
|
20499
|
+
exports.getGyColumns = getColumns$4;
|
|
20350
20500
|
exports.getJstColumns = getColumns$5;
|
|
20501
|
+
exports.getWdtColumns = getColumns$2;
|
|
20351
20502
|
exports.getWlnColumns = getColumns$3;
|