@kmkf-fe-packages/basic-components 2.0.54-beta.3 → 2.0.54
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/README.md +1 -1
- package/dist/index.esm.js +50 -201
- package/dist/index.js +49 -204
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -9
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +1 -17
- package/dist/src/constants/columnsBaseInfoMap.d.ts +2 -11
- package/dist/src/constants/index.d.ts +0 -2
- package/dist/src/index.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -473,57 +473,6 @@ function _nonIterableSpread() {
|
|
|
473
473
|
function _nonIterableRest() {
|
|
474
474
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
475
475
|
}
|
|
476
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
477
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
478
|
-
if (!it) {
|
|
479
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
480
|
-
if (it) o = it;
|
|
481
|
-
var i = 0;
|
|
482
|
-
var F = function () {};
|
|
483
|
-
return {
|
|
484
|
-
s: F,
|
|
485
|
-
n: function () {
|
|
486
|
-
if (i >= o.length) return {
|
|
487
|
-
done: true
|
|
488
|
-
};
|
|
489
|
-
return {
|
|
490
|
-
done: false,
|
|
491
|
-
value: o[i++]
|
|
492
|
-
};
|
|
493
|
-
},
|
|
494
|
-
e: function (e) {
|
|
495
|
-
throw e;
|
|
496
|
-
},
|
|
497
|
-
f: F
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
501
|
-
}
|
|
502
|
-
var normalCompletion = true,
|
|
503
|
-
didErr = false,
|
|
504
|
-
err;
|
|
505
|
-
return {
|
|
506
|
-
s: function () {
|
|
507
|
-
it = it.call(o);
|
|
508
|
-
},
|
|
509
|
-
n: function () {
|
|
510
|
-
var step = it.next();
|
|
511
|
-
normalCompletion = step.done;
|
|
512
|
-
return step;
|
|
513
|
-
},
|
|
514
|
-
e: function (e) {
|
|
515
|
-
didErr = true;
|
|
516
|
-
err = e;
|
|
517
|
-
},
|
|
518
|
-
f: function () {
|
|
519
|
-
try {
|
|
520
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
521
|
-
} finally {
|
|
522
|
-
if (didErr) throw err;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
476
|
function _toPrimitive(input, hint) {
|
|
528
477
|
if (typeof input !== "object" || input === null) return input;
|
|
529
478
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -8001,7 +7950,8 @@ var WidgetMap = {
|
|
|
8001
7950
|
var pageSize = 50;
|
|
8002
7951
|
var SubForm = function SubForm(props) {
|
|
8003
7952
|
var _selectOptions$;
|
|
8004
|
-
var value = props.value,
|
|
7953
|
+
var _props$value = props.value,
|
|
7954
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
8005
7955
|
onChange = props.onChange,
|
|
8006
7956
|
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
8007
7957
|
_props$subConfig = props.subConfig,
|
|
@@ -8303,7 +8253,7 @@ var SubForm = function SubForm(props) {
|
|
|
8303
8253
|
}
|
|
8304
8254
|
});
|
|
8305
8255
|
}
|
|
8306
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8256
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8307
8257
|
uuid: uuid()
|
|
8308
8258
|
})]));
|
|
8309
8259
|
};
|
|
@@ -13265,7 +13215,6 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
13265
13215
|
var current = _ref.current,
|
|
13266
13216
|
pageSize = _ref.pageSize;
|
|
13267
13217
|
var data = {
|
|
13268
|
-
goodShortName: formData.goodShortName || null,
|
|
13269
13218
|
goodNo: formData.goodNo || null,
|
|
13270
13219
|
goodName: formData.goodName || null,
|
|
13271
13220
|
skuCode: formData.skuCode || null,
|
|
@@ -14178,20 +14127,15 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14178
14127
|
WDT_REISSUE_GOODS: [{
|
|
14179
14128
|
dataIndex: 'goodId',
|
|
14180
14129
|
title: "\u5546\u54C1ID",
|
|
14181
|
-
width: 120
|
|
14182
|
-
align: 'center',
|
|
14183
|
-
ellipsis: true
|
|
14130
|
+
width: 120
|
|
14184
14131
|
}, {
|
|
14185
14132
|
dataIndex: 'goodNo',
|
|
14186
14133
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
14187
|
-
|
|
14188
|
-
ellipsis: true,
|
|
14189
|
-
width: 180
|
|
14134
|
+
width: 200
|
|
14190
14135
|
}, {
|
|
14191
14136
|
dataIndex: 'goodName',
|
|
14192
14137
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
14193
14138
|
width: 200,
|
|
14194
|
-
align: 'center',
|
|
14195
14139
|
render: function render(text) {
|
|
14196
14140
|
return /*#__PURE__*/React.createElement(CopyTextIcon, {
|
|
14197
14141
|
val: text
|
|
@@ -14200,19 +14144,14 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14200
14144
|
}, {
|
|
14201
14145
|
dataIndex: 'specId',
|
|
14202
14146
|
title: "SKUID",
|
|
14203
|
-
align: 'center',
|
|
14204
|
-
ellipsis: true,
|
|
14205
14147
|
width: 150
|
|
14206
14148
|
}, {
|
|
14207
14149
|
dataIndex: 'specNo',
|
|
14208
14150
|
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
14209
|
-
|
|
14210
|
-
ellipsis: true,
|
|
14211
|
-
width: 180
|
|
14151
|
+
width: 200
|
|
14212
14152
|
}, {
|
|
14213
14153
|
dataIndex: 'specName',
|
|
14214
14154
|
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
14215
|
-
align: 'center',
|
|
14216
14155
|
width: 250,
|
|
14217
14156
|
render: function render(text) {
|
|
14218
14157
|
return /*#__PURE__*/React.createElement(CopyTextIcon, {
|
|
@@ -14325,7 +14264,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14325
14264
|
align: 'center',
|
|
14326
14265
|
ellipsis: true,
|
|
14327
14266
|
width: 100,
|
|
14328
|
-
render:
|
|
14267
|
+
render: function render(val) {
|
|
14268
|
+
var giftTypeMap = {
|
|
14269
|
+
0: '非赠品',
|
|
14270
|
+
1: '自动赠送',
|
|
14271
|
+
2: '手工赠送',
|
|
14272
|
+
3: '回购自动送赠品',
|
|
14273
|
+
4: '前N有礼送赠品',
|
|
14274
|
+
6: '天猫优仓赠品',
|
|
14275
|
+
7: '淘宝CRM会员送赠'
|
|
14276
|
+
};
|
|
14277
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
14278
|
+
}
|
|
14329
14279
|
}],
|
|
14330
14280
|
//旺店通退货商品信息
|
|
14331
14281
|
WDT_RETURN_GOODS: [{
|
|
@@ -14421,7 +14371,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14421
14371
|
align: 'center',
|
|
14422
14372
|
ellipsis: true,
|
|
14423
14373
|
width: 100,
|
|
14424
|
-
render:
|
|
14374
|
+
render: function render(val) {
|
|
14375
|
+
var giftTypeMap = {
|
|
14376
|
+
0: '非赠品',
|
|
14377
|
+
1: '自动赠送',
|
|
14378
|
+
2: '手工赠送',
|
|
14379
|
+
3: '回购自动送赠品',
|
|
14380
|
+
4: '前N有礼送赠品',
|
|
14381
|
+
6: '天猫优仓赠品',
|
|
14382
|
+
7: '淘宝CRM会员送赠'
|
|
14383
|
+
};
|
|
14384
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
14385
|
+
}
|
|
14425
14386
|
}, {
|
|
14426
14387
|
dataIndex: 'type',
|
|
14427
14388
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14542,7 +14503,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14542
14503
|
align: 'center',
|
|
14543
14504
|
ellipsis: true,
|
|
14544
14505
|
width: 100,
|
|
14545
|
-
render:
|
|
14506
|
+
render: function render(val) {
|
|
14507
|
+
var giftTypeMap = {
|
|
14508
|
+
0: '非赠品',
|
|
14509
|
+
1: '自动赠送',
|
|
14510
|
+
2: '手工赠送',
|
|
14511
|
+
3: '回购自动送赠品',
|
|
14512
|
+
4: '前N有礼送赠品',
|
|
14513
|
+
6: '天猫优仓赠品',
|
|
14514
|
+
7: '淘宝CRM会员送赠'
|
|
14515
|
+
};
|
|
14516
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
14517
|
+
}
|
|
14546
14518
|
}, {
|
|
14547
14519
|
dataIndex: 'type',
|
|
14548
14520
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14726,15 +14698,6 @@ var getYesOrNo$1 = function getYesOrNo(val) {
|
|
|
14726
14698
|
if (isNull(val)) return null;
|
|
14727
14699
|
return val ? '是' : '否';
|
|
14728
14700
|
};
|
|
14729
|
-
function toNum(value) {
|
|
14730
|
-
if (typeof value === 'string') {
|
|
14731
|
-
return value ? +value : void 0;
|
|
14732
|
-
}
|
|
14733
|
-
if (typeof value === 'number') {
|
|
14734
|
-
return value;
|
|
14735
|
-
}
|
|
14736
|
-
return void 0;
|
|
14737
|
-
}
|
|
14738
14701
|
var getColumns$4 = function getColumns(_ref) {
|
|
14739
14702
|
var _ref$text = _ref.text,
|
|
14740
14703
|
disabled = _ref.disabled,
|
|
@@ -14892,19 +14855,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14892
14855
|
dataIndex: 'qty',
|
|
14893
14856
|
title: "\u6570\u91CF",
|
|
14894
14857
|
width: 100,
|
|
14895
|
-
validator: function validator(_rule, value) {
|
|
14896
|
-
var goodsName = '';
|
|
14897
|
-
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
14898
|
-
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
14899
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
14900
|
-
if (res) {
|
|
14901
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
14902
|
-
}
|
|
14903
|
-
return res;
|
|
14904
|
-
})) {
|
|
14905
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
14906
|
-
}
|
|
14907
|
-
},
|
|
14908
14858
|
render: function render(val, record, index) {
|
|
14909
14859
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14910
14860
|
style: {
|
|
@@ -15008,19 +14958,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15008
14958
|
dataIndex: 'qty',
|
|
15009
14959
|
title: "\u6570\u91CF",
|
|
15010
14960
|
width: 100,
|
|
15011
|
-
validator: function validator(_rule, value) {
|
|
15012
|
-
var goodsName = '';
|
|
15013
|
-
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
15014
|
-
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15015
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15016
|
-
if (res) {
|
|
15017
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
15018
|
-
}
|
|
15019
|
-
return res;
|
|
15020
|
-
})) {
|
|
15021
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15022
|
-
}
|
|
15023
|
-
},
|
|
15024
14961
|
render: function render(val, record, index) {
|
|
15025
14962
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15026
14963
|
style: {
|
|
@@ -15112,15 +15049,6 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
15112
15049
|
if (!item.align) item.align = 'center';
|
|
15113
15050
|
return item;
|
|
15114
15051
|
};
|
|
15115
|
-
function toNum$1(value) {
|
|
15116
|
-
if (typeof value === 'string') {
|
|
15117
|
-
return value ? +value : void 0;
|
|
15118
|
-
}
|
|
15119
|
-
if (typeof value === 'number') {
|
|
15120
|
-
return value;
|
|
15121
|
-
}
|
|
15122
|
-
return void 0;
|
|
15123
|
-
}
|
|
15124
15052
|
var getColumns$5 = function getColumns() {
|
|
15125
15053
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
15126
15054
|
_ref$text = _ref.text,
|
|
@@ -15304,19 +15232,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15304
15232
|
ellipsis: true,
|
|
15305
15233
|
align: 'center',
|
|
15306
15234
|
width: 120,
|
|
15307
|
-
validator: function validator(_rule, value) {
|
|
15308
|
-
var goodsName = '';
|
|
15309
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15310
|
-
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15311
|
-
var res = typeof v === 'number' ? v < 0 : true;
|
|
15312
|
-
if (res) {
|
|
15313
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15314
|
-
}
|
|
15315
|
-
return res;
|
|
15316
|
-
})) {
|
|
15317
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15318
|
-
}
|
|
15319
|
-
},
|
|
15320
15235
|
render: function render(val, record, index) {
|
|
15321
15236
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15322
15237
|
style: {
|
|
@@ -15336,19 +15251,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15336
15251
|
ellipsis: true,
|
|
15337
15252
|
align: 'center',
|
|
15338
15253
|
width: 100,
|
|
15339
|
-
validator: function validator(_rule, value) {
|
|
15340
|
-
var goodsName = '';
|
|
15341
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15342
|
-
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15343
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15344
|
-
if (res) {
|
|
15345
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15346
|
-
}
|
|
15347
|
-
return res;
|
|
15348
|
-
})) {
|
|
15349
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15350
|
-
}
|
|
15351
|
-
},
|
|
15352
15254
|
render: function render(val, record, index) {
|
|
15353
15255
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15354
15256
|
style: {
|
|
@@ -15433,19 +15335,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15433
15335
|
dataIndex: 'salePrice',
|
|
15434
15336
|
title: '单价',
|
|
15435
15337
|
width: 120,
|
|
15436
|
-
validator: function validator(_rule, value) {
|
|
15437
|
-
var goodsName = '';
|
|
15438
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15439
|
-
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15440
|
-
var res = typeof v === 'number' ? v < 0 : true;
|
|
15441
|
-
if (res) {
|
|
15442
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15443
|
-
}
|
|
15444
|
-
return res;
|
|
15445
|
-
})) {
|
|
15446
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15447
|
-
}
|
|
15448
|
-
},
|
|
15449
15338
|
render: function render(val, record, index) {
|
|
15450
15339
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15451
15340
|
style: {
|
|
@@ -15463,19 +15352,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15463
15352
|
dataIndex: 'qty',
|
|
15464
15353
|
title: '数量',
|
|
15465
15354
|
width: 100,
|
|
15466
|
-
validator: function validator(_rule, value) {
|
|
15467
|
-
var goodsName = '';
|
|
15468
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15469
|
-
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15470
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15471
|
-
if (res) {
|
|
15472
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15473
|
-
}
|
|
15474
|
-
return res;
|
|
15475
|
-
})) {
|
|
15476
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15477
|
-
}
|
|
15478
|
-
},
|
|
15479
15355
|
render: function render(val, record, index) {
|
|
15480
15356
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15481
15357
|
style: {
|
|
@@ -15787,30 +15663,6 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15787
15663
|
})['default']
|
|
15788
15664
|
});
|
|
15789
15665
|
};
|
|
15790
|
-
var erpColumnsMap = getColumnsMap$1();
|
|
15791
|
-
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
15792
|
-
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
15793
|
-
return column.validator;
|
|
15794
|
-
}).filter(Boolean);
|
|
15795
|
-
var res = null;
|
|
15796
|
-
var _iterator = _createForOfIteratorHelper(validatorFnList),
|
|
15797
|
-
_step;
|
|
15798
|
-
try {
|
|
15799
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15800
|
-
var validatorFn = _step.value;
|
|
15801
|
-
var validatorResult = validatorFn(_rule, value, type);
|
|
15802
|
-
if (validatorResult) {
|
|
15803
|
-
res = validatorResult;
|
|
15804
|
-
break;
|
|
15805
|
-
}
|
|
15806
|
-
}
|
|
15807
|
-
} catch (err) {
|
|
15808
|
-
_iterator.e(err);
|
|
15809
|
-
} finally {
|
|
15810
|
-
_iterator.f();
|
|
15811
|
-
}
|
|
15812
|
-
return res;
|
|
15813
|
-
};
|
|
15814
15666
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15815
15667
|
var clone_columnsMap = cloneDeep(getColumnsMap$1());
|
|
15816
15668
|
var newColumns = {};
|
|
@@ -15818,8 +15670,7 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
|
15818
15670
|
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
15819
15671
|
return {
|
|
15820
15672
|
title: col.title,
|
|
15821
|
-
dataIndex: col.dataIndex
|
|
15822
|
-
disabled: !!col.validator
|
|
15673
|
+
dataIndex: col.dataIndex
|
|
15823
15674
|
};
|
|
15824
15675
|
});
|
|
15825
15676
|
});
|
|
@@ -16201,18 +16052,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16201
16052
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
16202
16053
|
if (isStringArray) {
|
|
16203
16054
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
16204
|
-
return showHeader.includes(col.dataIndex)
|
|
16055
|
+
return showHeader.includes(col.dataIndex);
|
|
16205
16056
|
});
|
|
16206
16057
|
} else if (isObjectArray) {
|
|
16207
|
-
baseInfoColumns = showHeader.
|
|
16058
|
+
baseInfoColumns = showHeader.filter(function (col) {
|
|
16059
|
+
return col.show !== false;
|
|
16060
|
+
}).map(function (col) {
|
|
16208
16061
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
16209
16062
|
return item.dataIndex === col.dataIndex;
|
|
16210
16063
|
});
|
|
16211
|
-
|
|
16212
|
-
if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
|
|
16213
|
-
return currentCol;
|
|
16214
|
-
}
|
|
16215
|
-
return undefined;
|
|
16064
|
+
return currentCol ? currentCol : undefined;
|
|
16216
16065
|
}).filter(Boolean);
|
|
16217
16066
|
}
|
|
16218
16067
|
var columnList = [{
|
|
@@ -19583,7 +19432,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19583
19432
|
onClick: function onClick() {
|
|
19584
19433
|
return setChangeIndex(index);
|
|
19585
19434
|
}
|
|
19586
|
-
}, msgTypeCh[key]
|
|
19435
|
+
}, msgTypeCh[key], item.ruleName);
|
|
19587
19436
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
19588
19437
|
showSearch: true,
|
|
19589
19438
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -20420,4 +20269,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20420
20269
|
})));
|
|
20421
20270
|
};
|
|
20422
20271
|
|
|
20423
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap,
|
|
20272
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, index$2 as erpModalColumnsMap, getColumns$5 as getJstColumns, getColumns$3 as getWlnColumns };
|
package/dist/index.js
CHANGED
|
@@ -485,57 +485,6 @@ 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
|
-
}
|
|
539
488
|
function _toPrimitive(input, hint) {
|
|
540
489
|
if (typeof input !== "object" || input === null) return input;
|
|
541
490
|
var prim = input[Symbol.toPrimitive];
|
|
@@ -8013,7 +7962,8 @@ var WidgetMap = {
|
|
|
8013
7962
|
var pageSize = 50;
|
|
8014
7963
|
var SubForm = function SubForm(props) {
|
|
8015
7964
|
var _selectOptions$;
|
|
8016
|
-
var value = props.value,
|
|
7965
|
+
var _props$value = props.value,
|
|
7966
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
8017
7967
|
onChange = props.onChange,
|
|
8018
7968
|
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
8019
7969
|
_props$subConfig = props.subConfig,
|
|
@@ -8315,7 +8265,7 @@ var SubForm = function SubForm(props) {
|
|
|
8315
8265
|
}
|
|
8316
8266
|
});
|
|
8317
8267
|
}
|
|
8318
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8268
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8319
8269
|
uuid: kmkfUtils.uuid()
|
|
8320
8270
|
})]));
|
|
8321
8271
|
};
|
|
@@ -13277,7 +13227,6 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
13277
13227
|
var current = _ref.current,
|
|
13278
13228
|
pageSize = _ref.pageSize;
|
|
13279
13229
|
var data = {
|
|
13280
|
-
goodShortName: formData.goodShortName || null,
|
|
13281
13230
|
goodNo: formData.goodNo || null,
|
|
13282
13231
|
goodName: formData.goodName || null,
|
|
13283
13232
|
skuCode: formData.skuCode || null,
|
|
@@ -14190,20 +14139,15 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14190
14139
|
WDT_REISSUE_GOODS: [{
|
|
14191
14140
|
dataIndex: 'goodId',
|
|
14192
14141
|
title: "\u5546\u54C1ID",
|
|
14193
|
-
width: 120
|
|
14194
|
-
align: 'center',
|
|
14195
|
-
ellipsis: true
|
|
14142
|
+
width: 120
|
|
14196
14143
|
}, {
|
|
14197
14144
|
dataIndex: 'goodNo',
|
|
14198
14145
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
14199
|
-
|
|
14200
|
-
ellipsis: true,
|
|
14201
|
-
width: 180
|
|
14146
|
+
width: 200
|
|
14202
14147
|
}, {
|
|
14203
14148
|
dataIndex: 'goodName',
|
|
14204
14149
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
14205
14150
|
width: 200,
|
|
14206
|
-
align: 'center',
|
|
14207
14151
|
render: function render(text) {
|
|
14208
14152
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
14209
14153
|
val: text
|
|
@@ -14212,19 +14156,14 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14212
14156
|
}, {
|
|
14213
14157
|
dataIndex: 'specId',
|
|
14214
14158
|
title: "SKUID",
|
|
14215
|
-
align: 'center',
|
|
14216
|
-
ellipsis: true,
|
|
14217
14159
|
width: 150
|
|
14218
14160
|
}, {
|
|
14219
14161
|
dataIndex: 'specNo',
|
|
14220
14162
|
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
14221
|
-
|
|
14222
|
-
ellipsis: true,
|
|
14223
|
-
width: 180
|
|
14163
|
+
width: 200
|
|
14224
14164
|
}, {
|
|
14225
14165
|
dataIndex: 'specName',
|
|
14226
14166
|
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
14227
|
-
align: 'center',
|
|
14228
14167
|
width: 250,
|
|
14229
14168
|
render: function render(text) {
|
|
14230
14169
|
return /*#__PURE__*/React__default['default'].createElement(CopyTextIcon, {
|
|
@@ -14337,7 +14276,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14337
14276
|
align: 'center',
|
|
14338
14277
|
ellipsis: true,
|
|
14339
14278
|
width: 100,
|
|
14340
|
-
render:
|
|
14279
|
+
render: function render(val) {
|
|
14280
|
+
var giftTypeMap = {
|
|
14281
|
+
0: '非赠品',
|
|
14282
|
+
1: '自动赠送',
|
|
14283
|
+
2: '手工赠送',
|
|
14284
|
+
3: '回购自动送赠品',
|
|
14285
|
+
4: '前N有礼送赠品',
|
|
14286
|
+
6: '天猫优仓赠品',
|
|
14287
|
+
7: '淘宝CRM会员送赠'
|
|
14288
|
+
};
|
|
14289
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14290
|
+
}
|
|
14341
14291
|
}],
|
|
14342
14292
|
//旺店通退货商品信息
|
|
14343
14293
|
WDT_RETURN_GOODS: [{
|
|
@@ -14433,7 +14383,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14433
14383
|
align: 'center',
|
|
14434
14384
|
ellipsis: true,
|
|
14435
14385
|
width: 100,
|
|
14436
|
-
render:
|
|
14386
|
+
render: function render(val) {
|
|
14387
|
+
var giftTypeMap = {
|
|
14388
|
+
0: '非赠品',
|
|
14389
|
+
1: '自动赠送',
|
|
14390
|
+
2: '手工赠送',
|
|
14391
|
+
3: '回购自动送赠品',
|
|
14392
|
+
4: '前N有礼送赠品',
|
|
14393
|
+
6: '天猫优仓赠品',
|
|
14394
|
+
7: '淘宝CRM会员送赠'
|
|
14395
|
+
};
|
|
14396
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14397
|
+
}
|
|
14437
14398
|
}, {
|
|
14438
14399
|
dataIndex: 'type',
|
|
14439
14400
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14554,7 +14515,18 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14554
14515
|
align: 'center',
|
|
14555
14516
|
ellipsis: true,
|
|
14556
14517
|
width: 100,
|
|
14557
|
-
render:
|
|
14518
|
+
render: function render(val) {
|
|
14519
|
+
var giftTypeMap = {
|
|
14520
|
+
0: '非赠品',
|
|
14521
|
+
1: '自动赠送',
|
|
14522
|
+
2: '手工赠送',
|
|
14523
|
+
3: '回购自动送赠品',
|
|
14524
|
+
4: '前N有礼送赠品',
|
|
14525
|
+
6: '天猫优仓赠品',
|
|
14526
|
+
7: '淘宝CRM会员送赠'
|
|
14527
|
+
};
|
|
14528
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
14529
|
+
}
|
|
14558
14530
|
}, {
|
|
14559
14531
|
dataIndex: 'type',
|
|
14560
14532
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14738,15 +14710,6 @@ var getYesOrNo$1 = function getYesOrNo(val) {
|
|
|
14738
14710
|
if (kmkfUtils.isNull(val)) return null;
|
|
14739
14711
|
return val ? '是' : '否';
|
|
14740
14712
|
};
|
|
14741
|
-
function toNum(value) {
|
|
14742
|
-
if (typeof value === 'string') {
|
|
14743
|
-
return value ? +value : void 0;
|
|
14744
|
-
}
|
|
14745
|
-
if (typeof value === 'number') {
|
|
14746
|
-
return value;
|
|
14747
|
-
}
|
|
14748
|
-
return void 0;
|
|
14749
|
-
}
|
|
14750
14713
|
var getColumns$4 = function getColumns(_ref) {
|
|
14751
14714
|
var _ref$text = _ref.text,
|
|
14752
14715
|
disabled = _ref.disabled,
|
|
@@ -14904,19 +14867,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14904
14867
|
dataIndex: 'qty',
|
|
14905
14868
|
title: "\u6570\u91CF",
|
|
14906
14869
|
width: 100,
|
|
14907
|
-
validator: function validator(_rule, value) {
|
|
14908
|
-
var goodsName = '';
|
|
14909
|
-
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
14910
|
-
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
14911
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
14912
|
-
if (res) {
|
|
14913
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
14914
|
-
}
|
|
14915
|
-
return res;
|
|
14916
|
-
})) {
|
|
14917
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
14918
|
-
}
|
|
14919
|
-
},
|
|
14920
14870
|
render: function render(val, record, index) {
|
|
14921
14871
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14922
14872
|
style: {
|
|
@@ -15020,19 +14970,6 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15020
14970
|
dataIndex: 'qty',
|
|
15021
14971
|
title: "\u6570\u91CF",
|
|
15022
14972
|
width: 100,
|
|
15023
|
-
validator: function validator(_rule, value) {
|
|
15024
|
-
var goodsName = '';
|
|
15025
|
-
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
15026
|
-
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15027
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15028
|
-
if (res) {
|
|
15029
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
15030
|
-
}
|
|
15031
|
-
return res;
|
|
15032
|
-
})) {
|
|
15033
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15034
|
-
}
|
|
15035
|
-
},
|
|
15036
14973
|
render: function render(val, record, index) {
|
|
15037
14974
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15038
14975
|
style: {
|
|
@@ -15124,15 +15061,6 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
15124
15061
|
if (!item.align) item.align = 'center';
|
|
15125
15062
|
return item;
|
|
15126
15063
|
};
|
|
15127
|
-
function toNum$1(value) {
|
|
15128
|
-
if (typeof value === 'string') {
|
|
15129
|
-
return value ? +value : void 0;
|
|
15130
|
-
}
|
|
15131
|
-
if (typeof value === 'number') {
|
|
15132
|
-
return value;
|
|
15133
|
-
}
|
|
15134
|
-
return void 0;
|
|
15135
|
-
}
|
|
15136
15064
|
var getColumns$5 = function getColumns() {
|
|
15137
15065
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
15138
15066
|
_ref$text = _ref.text,
|
|
@@ -15316,19 +15244,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15316
15244
|
ellipsis: true,
|
|
15317
15245
|
align: 'center',
|
|
15318
15246
|
width: 120,
|
|
15319
|
-
validator: function validator(_rule, value) {
|
|
15320
|
-
var goodsName = '';
|
|
15321
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15322
|
-
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15323
|
-
var res = typeof v === 'number' ? v < 0 : true;
|
|
15324
|
-
if (res) {
|
|
15325
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15326
|
-
}
|
|
15327
|
-
return res;
|
|
15328
|
-
})) {
|
|
15329
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15330
|
-
}
|
|
15331
|
-
},
|
|
15332
15247
|
render: function render(val, record, index) {
|
|
15333
15248
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15334
15249
|
style: {
|
|
@@ -15348,19 +15263,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15348
15263
|
ellipsis: true,
|
|
15349
15264
|
align: 'center',
|
|
15350
15265
|
width: 100,
|
|
15351
|
-
validator: function validator(_rule, value) {
|
|
15352
|
-
var goodsName = '';
|
|
15353
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15354
|
-
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15355
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15356
|
-
if (res) {
|
|
15357
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15358
|
-
}
|
|
15359
|
-
return res;
|
|
15360
|
-
})) {
|
|
15361
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15362
|
-
}
|
|
15363
|
-
},
|
|
15364
15266
|
render: function render(val, record, index) {
|
|
15365
15267
|
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15366
15268
|
style: {
|
|
@@ -15445,19 +15347,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15445
15347
|
dataIndex: 'salePrice',
|
|
15446
15348
|
title: '单价',
|
|
15447
15349
|
width: 120,
|
|
15448
|
-
validator: function validator(_rule, value) {
|
|
15449
|
-
var goodsName = '';
|
|
15450
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15451
|
-
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15452
|
-
var res = typeof v === 'number' ? v < 0 : true;
|
|
15453
|
-
if (res) {
|
|
15454
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15455
|
-
}
|
|
15456
|
-
return res;
|
|
15457
|
-
})) {
|
|
15458
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15459
|
-
}
|
|
15460
|
-
},
|
|
15461
15350
|
render: function render(val, record, index) {
|
|
15462
15351
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15463
15352
|
style: {
|
|
@@ -15475,19 +15364,6 @@ var getColumns$5 = function getColumns() {
|
|
|
15475
15364
|
dataIndex: 'qty',
|
|
15476
15365
|
title: '数量',
|
|
15477
15366
|
width: 100,
|
|
15478
|
-
validator: function validator(_rule, value) {
|
|
15479
|
-
var goodsName = '';
|
|
15480
|
-
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15481
|
-
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15482
|
-
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15483
|
-
if (res) {
|
|
15484
|
-
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15485
|
-
}
|
|
15486
|
-
return res;
|
|
15487
|
-
})) {
|
|
15488
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15489
|
-
}
|
|
15490
|
-
},
|
|
15491
15367
|
render: function render(val, record, index) {
|
|
15492
15368
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
15493
15369
|
style: {
|
|
@@ -15799,30 +15675,6 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15799
15675
|
})['default']
|
|
15800
15676
|
});
|
|
15801
15677
|
};
|
|
15802
|
-
var erpColumnsMap = getColumnsMap$1();
|
|
15803
|
-
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
15804
|
-
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
15805
|
-
return column.validator;
|
|
15806
|
-
}).filter(Boolean);
|
|
15807
|
-
var res = null;
|
|
15808
|
-
var _iterator = _createForOfIteratorHelper(validatorFnList),
|
|
15809
|
-
_step;
|
|
15810
|
-
try {
|
|
15811
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15812
|
-
var validatorFn = _step.value;
|
|
15813
|
-
var validatorResult = validatorFn(_rule, value, type);
|
|
15814
|
-
if (validatorResult) {
|
|
15815
|
-
res = validatorResult;
|
|
15816
|
-
break;
|
|
15817
|
-
}
|
|
15818
|
-
}
|
|
15819
|
-
} catch (err) {
|
|
15820
|
-
_iterator.e(err);
|
|
15821
|
-
} finally {
|
|
15822
|
-
_iterator.f();
|
|
15823
|
-
}
|
|
15824
|
-
return res;
|
|
15825
|
-
};
|
|
15826
15678
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15827
15679
|
var clone_columnsMap = lodash.cloneDeep(getColumnsMap$1());
|
|
15828
15680
|
var newColumns = {};
|
|
@@ -15830,8 +15682,7 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
|
15830
15682
|
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
15831
15683
|
return {
|
|
15832
15684
|
title: col.title,
|
|
15833
|
-
dataIndex: col.dataIndex
|
|
15834
|
-
disabled: !!col.validator
|
|
15685
|
+
dataIndex: col.dataIndex
|
|
15835
15686
|
};
|
|
15836
15687
|
});
|
|
15837
15688
|
});
|
|
@@ -16213,18 +16064,16 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16213
16064
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
16214
16065
|
if (isStringArray) {
|
|
16215
16066
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
16216
|
-
return showHeader.includes(col.dataIndex)
|
|
16067
|
+
return showHeader.includes(col.dataIndex);
|
|
16217
16068
|
});
|
|
16218
16069
|
} else if (isObjectArray) {
|
|
16219
|
-
baseInfoColumns = showHeader.
|
|
16070
|
+
baseInfoColumns = showHeader.filter(function (col) {
|
|
16071
|
+
return col.show !== false;
|
|
16072
|
+
}).map(function (col) {
|
|
16220
16073
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
16221
16074
|
return item.dataIndex === col.dataIndex;
|
|
16222
16075
|
});
|
|
16223
|
-
|
|
16224
|
-
if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
|
|
16225
|
-
return currentCol;
|
|
16226
|
-
}
|
|
16227
|
-
return undefined;
|
|
16076
|
+
return currentCol ? currentCol : undefined;
|
|
16228
16077
|
}).filter(Boolean);
|
|
16229
16078
|
}
|
|
16230
16079
|
var columnList = [{
|
|
@@ -19595,7 +19444,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19595
19444
|
onClick: function onClick() {
|
|
19596
19445
|
return setChangeIndex(index);
|
|
19597
19446
|
}
|
|
19598
|
-
}, kmkfUtils.msgTypeCh[key]
|
|
19447
|
+
}, kmkfUtils.msgTypeCh[key], item.ruleName);
|
|
19599
19448
|
}))) : null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
19600
19449
|
showSearch: true,
|
|
19601
19450
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -20499,10 +20348,6 @@ exports.WdtGoodList = WdtGoodList;
|
|
|
20499
20348
|
exports.WdtReissue = wdtReissue;
|
|
20500
20349
|
exports.WlnGoods = WlnGoods;
|
|
20501
20350
|
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|
|
20502
|
-
exports.erpColumnsMap = erpColumnsMap;
|
|
20503
|
-
exports.erpFormValidator = erpFormValidator;
|
|
20504
20351
|
exports.erpModalColumnsMap = index$2;
|
|
20505
|
-
exports.getGyColumns = getColumns$4;
|
|
20506
20352
|
exports.getJstColumns = getColumns$5;
|
|
20507
|
-
exports.getWdtColumns = getColumns$2;
|
|
20508
20353
|
exports.getWlnColumns = getColumns$3;
|
|
@@ -3,13 +3,5 @@ type P = {
|
|
|
3
3
|
updateHandle: (v: any, index: number, key: string) => void;
|
|
4
4
|
operate?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const getBsE3ReissueGoodColumns: ({ disabled, updateHandle, operate, }: P) =>
|
|
7
|
-
dataIndex: string;
|
|
8
|
-
title: string;
|
|
9
|
-
width?: number | undefined;
|
|
10
|
-
align: string;
|
|
11
|
-
ellipsis: boolean;
|
|
12
|
-
render?: ((val: any, record: any, index: number) => any) | undefined;
|
|
13
|
-
validator?: ((rule: any, value: any, callback: any) => any) | undefined;
|
|
14
|
-
}[];
|
|
6
|
+
export declare const getBsE3ReissueGoodColumns: ({ disabled, updateHandle, operate, }: P) => any[];
|
|
15
7
|
export {};
|
|
@@ -5,21 +5,5 @@ type P = {
|
|
|
5
5
|
updateHandle: (v: any, index: number, key: string) => void;
|
|
6
6
|
operate?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const getWdtReissueGoodColumns: ({ disabled, updateHandle, operate, }: P) =>
|
|
9
|
-
dataIndex: string;
|
|
10
|
-
title: string;
|
|
11
|
-
width?: number | undefined;
|
|
12
|
-
align: string;
|
|
13
|
-
ellipsis: boolean;
|
|
14
|
-
render?: ((val: any, record: any, index: number) => any) | undefined;
|
|
15
|
-
validator?: ((rule: any, value: any, callback: any) => any) | undefined;
|
|
16
|
-
} | {
|
|
17
|
-
render: ((val: number) => React.JSX.Element) | ((val: any, record: any, index: number) => React.JSX.Element);
|
|
18
|
-
dataIndex: string;
|
|
19
|
-
title: string;
|
|
20
|
-
width?: number | undefined;
|
|
21
|
-
align: string;
|
|
22
|
-
ellipsis: boolean;
|
|
23
|
-
validator?: ((rule: any, value: any, callback: any) => any) | undefined;
|
|
24
|
-
})[];
|
|
8
|
+
export declare const getWdtReissueGoodColumns: ({ disabled, updateHandle, operate, }: P) => any[];
|
|
25
9
|
export {};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
title: string;
|
|
4
|
-
width?: number;
|
|
5
|
-
align?: 'left' | 'center' | 'right';
|
|
6
|
-
ellipsis?: boolean;
|
|
7
|
-
render?: (val: any, record: any, index: number) => any;
|
|
8
|
-
validator?: (rule: any, value: any, callback: any) => any;
|
|
1
|
+
type ColumnsMapType = {
|
|
2
|
+
[key: string]: any[];
|
|
9
3
|
};
|
|
10
|
-
type ColumnsMapType = Record<string, ColumnsItemType[]>;
|
|
11
4
|
export type GetColumnsBaseInfoMapFnType = (...args: any[]) => ColumnsMapType;
|
|
12
5
|
export declare const getColumnsMap: GetColumnsBaseInfoMapFnType;
|
|
13
|
-
export declare const erpColumnsMap: ColumnsMapType;
|
|
14
|
-
export declare const erpFormValidator: (_rule: any, value: any, type: string) => any;
|
|
15
6
|
declare const _default: ColumnsMapType;
|
|
16
7
|
export default _default;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -66,5 +66,5 @@ export type { WdtGoods } from './bs/component/model/WdtGoodList';
|
|
|
66
66
|
export { default as GyReissue } from './gy/Reissue';
|
|
67
67
|
export * from './constants/index';
|
|
68
68
|
export { default as GyReturn } from './gy/Return';
|
|
69
|
-
export { default as columnsBaseInfoMap
|
|
69
|
+
export { default as columnsBaseInfoMap } from './constants/columnsBaseInfoMap';
|
|
70
70
|
export { default as erpModalColumnsMap } from './bs/component/model/Columns';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.0.54
|
|
3
|
+
"version": "2.0.54",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.54
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.54",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"bignumber.js": "^9.1.2",
|
|
26
26
|
"kmkf-monitor": "^0.8.9",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "67e965ffb447b6c6fc0bddb1c2ef9d78edf5f93a"
|
|
69
69
|
}
|