@kmkf-fe-packages/basic-components 2.0.54-beta.0 → 2.0.54-beta.10
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 +230 -86
- package/dist/index.js +233 -85
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +9 -1
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +17 -1
- package/dist/src/bs/component/model/Columns/useGetColumns.d.ts +2 -2
- package/dist/src/constants/columnsBaseInfoMap.d.ts +11 -2
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/jst/Goods/index.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -487,6 +487,57 @@ function _nonIterableSpread() {
|
|
|
487
487
|
function _nonIterableRest() {
|
|
488
488
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
489
489
|
}
|
|
490
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
491
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
492
|
+
if (!it) {
|
|
493
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
494
|
+
if (it) o = it;
|
|
495
|
+
var i = 0;
|
|
496
|
+
var F = function () {};
|
|
497
|
+
return {
|
|
498
|
+
s: F,
|
|
499
|
+
n: function () {
|
|
500
|
+
if (i >= o.length) return {
|
|
501
|
+
done: true
|
|
502
|
+
};
|
|
503
|
+
return {
|
|
504
|
+
done: false,
|
|
505
|
+
value: o[i++]
|
|
506
|
+
};
|
|
507
|
+
},
|
|
508
|
+
e: function (e) {
|
|
509
|
+
throw e;
|
|
510
|
+
},
|
|
511
|
+
f: F
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
515
|
+
}
|
|
516
|
+
var normalCompletion = true,
|
|
517
|
+
didErr = false,
|
|
518
|
+
err;
|
|
519
|
+
return {
|
|
520
|
+
s: function () {
|
|
521
|
+
it = it.call(o);
|
|
522
|
+
},
|
|
523
|
+
n: function () {
|
|
524
|
+
var step = it.next();
|
|
525
|
+
normalCompletion = step.done;
|
|
526
|
+
return step;
|
|
527
|
+
},
|
|
528
|
+
e: function (e) {
|
|
529
|
+
didErr = true;
|
|
530
|
+
err = e;
|
|
531
|
+
},
|
|
532
|
+
f: function () {
|
|
533
|
+
try {
|
|
534
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
535
|
+
} finally {
|
|
536
|
+
if (didErr) throw err;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
}
|
|
490
541
|
|
|
491
542
|
function ApaasCascader(props) {
|
|
492
543
|
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
@@ -7950,7 +8001,8 @@ var WidgetMap = {
|
|
|
7950
8001
|
var pageSize = 50;
|
|
7951
8002
|
var SubForm = function SubForm(props) {
|
|
7952
8003
|
var _selectOptions$;
|
|
7953
|
-
var value = props.value,
|
|
8004
|
+
var _props$value = props.value,
|
|
8005
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
7954
8006
|
onChange = props.onChange,
|
|
7955
8007
|
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7956
8008
|
_props$subConfig = props.subConfig,
|
|
@@ -8252,7 +8304,7 @@ var SubForm = function SubForm(props) {
|
|
|
8252
8304
|
}
|
|
8253
8305
|
});
|
|
8254
8306
|
}
|
|
8255
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8307
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
8256
8308
|
uuid: uuid()
|
|
8257
8309
|
})]));
|
|
8258
8310
|
};
|
|
@@ -11450,7 +11502,7 @@ var typeInitValueMap = {
|
|
|
11450
11502
|
}]
|
|
11451
11503
|
};
|
|
11452
11504
|
var jstGoods = function jstGoods(props) {
|
|
11453
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
|
|
11505
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11;
|
|
11454
11506
|
var _props$value = props.value,
|
|
11455
11507
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11456
11508
|
onChange = props.onChange,
|
|
@@ -11468,8 +11520,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
11468
11520
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11469
11521
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
11470
11522
|
var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
|
|
11523
|
+
var expressDateInstance = ExpressData.getInstance(platformType);
|
|
11471
11524
|
var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
|
|
11472
|
-
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11473
11525
|
useEffect(function () {
|
|
11474
11526
|
//没有值塞个默认值
|
|
11475
11527
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
@@ -11552,59 +11604,51 @@ var jstGoods = function jstGoods(props) {
|
|
|
11552
11604
|
return setChangeIndex(index);
|
|
11553
11605
|
}
|
|
11554
11606
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11555
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics,
|
|
11556
|
-
type: logisticsType,
|
|
11607
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
11557
11608
|
disabled: disabled,
|
|
11558
11609
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11559
11610
|
onChange: function onChange(val) {
|
|
11560
|
-
|
|
11561
|
-
changeInputHandle(null, 'logisticsCompany');
|
|
11562
|
-
changeInputHandle(val, 'logisticsCompanyName');
|
|
11563
|
-
} else {
|
|
11564
|
-
changeInputHandle(val, 'logisticsCompany');
|
|
11565
|
-
}
|
|
11611
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11566
11612
|
},
|
|
11567
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[
|
|
11568
|
-
}, logisticsType === 'input' ? {} : {
|
|
11613
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) || ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompanyName']) : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompany'],
|
|
11569
11614
|
showSearch: true,
|
|
11570
11615
|
dropdownMatchSelectWidth: false,
|
|
11571
11616
|
filterOption: function filterOption(input, option) {
|
|
11572
11617
|
return option.label.includes(input);
|
|
11573
|
-
}
|
|
11574
|
-
}), {}, {
|
|
11618
|
+
},
|
|
11575
11619
|
style: {
|
|
11576
11620
|
minWidth: '100px',
|
|
11577
11621
|
maxWidth: '180px'
|
|
11578
11622
|
},
|
|
11579
11623
|
platformType: platformType
|
|
11580
|
-
})
|
|
11624
|
+
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11581
11625
|
disabled: disabled,
|
|
11582
11626
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11583
11627
|
onChange: function onChange(e) {
|
|
11584
11628
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11585
11629
|
},
|
|
11586
|
-
value: (_value$
|
|
11630
|
+
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.logisticsCode
|
|
11587
11631
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11588
11632
|
disabled: disabled,
|
|
11589
11633
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11590
11634
|
onChange: function onChange(e) {
|
|
11591
11635
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11592
11636
|
},
|
|
11593
|
-
value: (_value$
|
|
11637
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.supplyId
|
|
11594
11638
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11595
11639
|
disabled: disabled,
|
|
11596
11640
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11597
11641
|
onChange: function onChange(e) {
|
|
11598
11642
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11599
11643
|
},
|
|
11600
|
-
value: (_value$
|
|
11644
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyName
|
|
11601
11645
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11602
11646
|
disabled: disabled,
|
|
11603
11647
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11604
11648
|
onChange: function onChange(e) {
|
|
11605
11649
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11606
11650
|
},
|
|
11607
|
-
value: (_value$
|
|
11651
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendId
|
|
11608
11652
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11609
11653
|
style: {
|
|
11610
11654
|
minWidth: '100px',
|
|
@@ -11615,7 +11659,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11615
11659
|
showSearch: true,
|
|
11616
11660
|
options: sendOptions,
|
|
11617
11661
|
filterOption: filterOption,
|
|
11618
|
-
value: ((_value$
|
|
11662
|
+
value: ((_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendSnapshotId) || ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName) || null,
|
|
11619
11663
|
onChange: function onChange(value, option) {
|
|
11620
11664
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11621
11665
|
}
|
|
@@ -11625,14 +11669,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11625
11669
|
onChange: function onChange(e) {
|
|
11626
11670
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11627
11671
|
},
|
|
11628
|
-
value: (_value$
|
|
11672
|
+
value: (_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName
|
|
11629
11673
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11630
11674
|
disabled: disabled,
|
|
11631
11675
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11632
11676
|
onChange: function onChange(e) {
|
|
11633
11677
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11634
11678
|
},
|
|
11635
|
-
value: (_value$
|
|
11679
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11636
11680
|
})) : null) : null);
|
|
11637
11681
|
};
|
|
11638
11682
|
|
|
@@ -12547,9 +12591,7 @@ var useGetColumns = (function (type) {
|
|
|
12547
12591
|
loading = _useState4[0],
|
|
12548
12592
|
setLoading = _useState4[1];
|
|
12549
12593
|
var showColumnsDataIndexList = useMemo(function () {
|
|
12550
|
-
return columns.
|
|
12551
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12552
|
-
}).map(function (item) {
|
|
12594
|
+
return columns.map(function (item) {
|
|
12553
12595
|
return item.dataIndex;
|
|
12554
12596
|
});
|
|
12555
12597
|
}, [columns]);
|
|
@@ -14127,15 +14169,20 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14127
14169
|
WDT_REISSUE_GOODS: [{
|
|
14128
14170
|
dataIndex: 'goodId',
|
|
14129
14171
|
title: "\u5546\u54C1ID",
|
|
14130
|
-
width: 120
|
|
14172
|
+
width: 120,
|
|
14173
|
+
align: 'center',
|
|
14174
|
+
ellipsis: true
|
|
14131
14175
|
}, {
|
|
14132
14176
|
dataIndex: 'goodNo',
|
|
14133
14177
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
14134
|
-
|
|
14178
|
+
align: 'center',
|
|
14179
|
+
ellipsis: true,
|
|
14180
|
+
width: 180
|
|
14135
14181
|
}, {
|
|
14136
14182
|
dataIndex: 'goodName',
|
|
14137
14183
|
title: "\u5546\u54C1\u540D\u79F0",
|
|
14138
14184
|
width: 200,
|
|
14185
|
+
align: 'center',
|
|
14139
14186
|
render: function render(text) {
|
|
14140
14187
|
return /*#__PURE__*/React.createElement(CopyTextIcon, {
|
|
14141
14188
|
val: text
|
|
@@ -14144,14 +14191,19 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14144
14191
|
}, {
|
|
14145
14192
|
dataIndex: 'specId',
|
|
14146
14193
|
title: "SKUID",
|
|
14194
|
+
align: 'center',
|
|
14195
|
+
ellipsis: true,
|
|
14147
14196
|
width: 150
|
|
14148
14197
|
}, {
|
|
14149
14198
|
dataIndex: 'specNo',
|
|
14150
14199
|
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
14151
|
-
|
|
14200
|
+
align: 'center',
|
|
14201
|
+
ellipsis: true,
|
|
14202
|
+
width: 180
|
|
14152
14203
|
}, {
|
|
14153
14204
|
dataIndex: 'specName',
|
|
14154
14205
|
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
14206
|
+
align: 'center',
|
|
14155
14207
|
width: 250,
|
|
14156
14208
|
render: function render(text) {
|
|
14157
14209
|
return /*#__PURE__*/React.createElement(CopyTextIcon, {
|
|
@@ -14264,18 +14316,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14264
14316
|
align: 'center',
|
|
14265
14317
|
ellipsis: true,
|
|
14266
14318
|
width: 100,
|
|
14267
|
-
render:
|
|
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
|
-
}
|
|
14319
|
+
render: renderGiftType
|
|
14279
14320
|
}],
|
|
14280
14321
|
//旺店通退货商品信息
|
|
14281
14322
|
WDT_RETURN_GOODS: [{
|
|
@@ -14371,18 +14412,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14371
14412
|
align: 'center',
|
|
14372
14413
|
ellipsis: true,
|
|
14373
14414
|
width: 100,
|
|
14374
|
-
render:
|
|
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
|
-
}
|
|
14415
|
+
render: renderGiftType
|
|
14386
14416
|
}, {
|
|
14387
14417
|
dataIndex: 'type',
|
|
14388
14418
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14503,18 +14533,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14503
14533
|
align: 'center',
|
|
14504
14534
|
ellipsis: true,
|
|
14505
14535
|
width: 100,
|
|
14506
|
-
render:
|
|
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
|
-
}
|
|
14536
|
+
render: renderGiftType
|
|
14518
14537
|
}, {
|
|
14519
14538
|
dataIndex: 'type',
|
|
14520
14539
|
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
@@ -14698,6 +14717,15 @@ var getYesOrNo$1 = function getYesOrNo(val) {
|
|
|
14698
14717
|
if (isNull(val)) return null;
|
|
14699
14718
|
return val ? '是' : '否';
|
|
14700
14719
|
};
|
|
14720
|
+
function toNum(value) {
|
|
14721
|
+
if (typeof value === 'string') {
|
|
14722
|
+
return value ? +value : void 0;
|
|
14723
|
+
}
|
|
14724
|
+
if (typeof value === 'number') {
|
|
14725
|
+
return value;
|
|
14726
|
+
}
|
|
14727
|
+
return void 0;
|
|
14728
|
+
}
|
|
14701
14729
|
var getColumns$4 = function getColumns(_ref) {
|
|
14702
14730
|
var _ref$text = _ref.text,
|
|
14703
14731
|
disabled = _ref.disabled,
|
|
@@ -14855,6 +14883,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14855
14883
|
dataIndex: 'qty',
|
|
14856
14884
|
title: "\u6570\u91CF",
|
|
14857
14885
|
width: 100,
|
|
14886
|
+
validator: function validator(_rule, value) {
|
|
14887
|
+
var goodsName = '';
|
|
14888
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
14889
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
14890
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
14891
|
+
if (res) {
|
|
14892
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
14893
|
+
}
|
|
14894
|
+
return res;
|
|
14895
|
+
})) {
|
|
14896
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
14897
|
+
}
|
|
14898
|
+
},
|
|
14858
14899
|
render: function render(val, record, index) {
|
|
14859
14900
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14860
14901
|
style: {
|
|
@@ -14958,6 +14999,19 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14958
14999
|
dataIndex: 'qty',
|
|
14959
15000
|
title: "\u6570\u91CF",
|
|
14960
15001
|
width: 100,
|
|
15002
|
+
validator: function validator(_rule, value) {
|
|
15003
|
+
var goodsName = '';
|
|
15004
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
15005
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15006
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15007
|
+
if (res) {
|
|
15008
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
15009
|
+
}
|
|
15010
|
+
return res;
|
|
15011
|
+
})) {
|
|
15012
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15013
|
+
}
|
|
15014
|
+
},
|
|
14961
15015
|
render: function render(val, record, index) {
|
|
14962
15016
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14963
15017
|
style: {
|
|
@@ -15049,6 +15103,15 @@ var fillAttrs = function fillAttrs(item) {
|
|
|
15049
15103
|
if (!item.align) item.align = 'center';
|
|
15050
15104
|
return item;
|
|
15051
15105
|
};
|
|
15106
|
+
function toNum$1(value) {
|
|
15107
|
+
if (typeof value === 'string') {
|
|
15108
|
+
return value ? +value : void 0;
|
|
15109
|
+
}
|
|
15110
|
+
if (typeof value === 'number') {
|
|
15111
|
+
return value;
|
|
15112
|
+
}
|
|
15113
|
+
return void 0;
|
|
15114
|
+
}
|
|
15052
15115
|
var getColumns$5 = function getColumns() {
|
|
15053
15116
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
15054
15117
|
_ref$text = _ref.text,
|
|
@@ -15232,6 +15295,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15232
15295
|
ellipsis: true,
|
|
15233
15296
|
align: 'center',
|
|
15234
15297
|
width: 120,
|
|
15298
|
+
validator: function validator(_rule, value) {
|
|
15299
|
+
var goodsName = '';
|
|
15300
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15301
|
+
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15302
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
15303
|
+
if (res) {
|
|
15304
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15305
|
+
}
|
|
15306
|
+
return res;
|
|
15307
|
+
})) {
|
|
15308
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15309
|
+
}
|
|
15310
|
+
},
|
|
15235
15311
|
render: function render(val, record, index) {
|
|
15236
15312
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15237
15313
|
style: {
|
|
@@ -15251,6 +15327,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15251
15327
|
ellipsis: true,
|
|
15252
15328
|
align: 'center',
|
|
15253
15329
|
width: 100,
|
|
15330
|
+
validator: function validator(_rule, value) {
|
|
15331
|
+
var goodsName = '';
|
|
15332
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
|
|
15333
|
+
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15334
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15335
|
+
if (res) {
|
|
15336
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15337
|
+
}
|
|
15338
|
+
return res;
|
|
15339
|
+
})) {
|
|
15340
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15341
|
+
}
|
|
15342
|
+
},
|
|
15254
15343
|
render: function render(val, record, index) {
|
|
15255
15344
|
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15256
15345
|
style: {
|
|
@@ -15335,6 +15424,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15335
15424
|
dataIndex: 'salePrice',
|
|
15336
15425
|
title: '单价',
|
|
15337
15426
|
width: 120,
|
|
15427
|
+
validator: function validator(_rule, value) {
|
|
15428
|
+
var goodsName = '';
|
|
15429
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15430
|
+
var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
15431
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
15432
|
+
if (res) {
|
|
15433
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15434
|
+
}
|
|
15435
|
+
return res;
|
|
15436
|
+
})) {
|
|
15437
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
15438
|
+
}
|
|
15439
|
+
},
|
|
15338
15440
|
render: function render(val, record, index) {
|
|
15339
15441
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15340
15442
|
style: {
|
|
@@ -15352,6 +15454,19 @@ var getColumns$5 = function getColumns() {
|
|
|
15352
15454
|
dataIndex: 'qty',
|
|
15353
15455
|
title: '数量',
|
|
15354
15456
|
width: 100,
|
|
15457
|
+
validator: function validator(_rule, value) {
|
|
15458
|
+
var goodsName = '';
|
|
15459
|
+
if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
|
|
15460
|
+
var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
15461
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
15462
|
+
if (res) {
|
|
15463
|
+
goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
15464
|
+
}
|
|
15465
|
+
return res;
|
|
15466
|
+
})) {
|
|
15467
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
15468
|
+
}
|
|
15469
|
+
},
|
|
15355
15470
|
render: function render(val, record, index) {
|
|
15356
15471
|
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15357
15472
|
style: {
|
|
@@ -15663,6 +15778,30 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15663
15778
|
})['default']
|
|
15664
15779
|
});
|
|
15665
15780
|
};
|
|
15781
|
+
var erpColumnsMap = getColumnsMap$1();
|
|
15782
|
+
var erpFormValidator = function erpFormValidator(_rule, value, type) {
|
|
15783
|
+
var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
|
|
15784
|
+
return column.validator;
|
|
15785
|
+
}).filter(Boolean);
|
|
15786
|
+
var res = null;
|
|
15787
|
+
var _iterator = _createForOfIteratorHelper(validatorFnList),
|
|
15788
|
+
_step;
|
|
15789
|
+
try {
|
|
15790
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15791
|
+
var validatorFn = _step.value;
|
|
15792
|
+
var validatorResult = validatorFn(_rule, value, type);
|
|
15793
|
+
if (validatorResult) {
|
|
15794
|
+
res = validatorResult;
|
|
15795
|
+
break;
|
|
15796
|
+
}
|
|
15797
|
+
}
|
|
15798
|
+
} catch (err) {
|
|
15799
|
+
_iterator.e(err);
|
|
15800
|
+
} finally {
|
|
15801
|
+
_iterator.f();
|
|
15802
|
+
}
|
|
15803
|
+
return res;
|
|
15804
|
+
};
|
|
15666
15805
|
var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
15667
15806
|
var clone_columnsMap = cloneDeep(getColumnsMap$1());
|
|
15668
15807
|
var newColumns = {};
|
|
@@ -15670,7 +15809,8 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
|
|
|
15670
15809
|
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
15671
15810
|
return {
|
|
15672
15811
|
title: col.title,
|
|
15673
|
-
dataIndex: col.dataIndex
|
|
15812
|
+
dataIndex: col.dataIndex,
|
|
15813
|
+
disabled: !!col.validator
|
|
15674
15814
|
};
|
|
15675
15815
|
});
|
|
15676
15816
|
});
|
|
@@ -15792,6 +15932,7 @@ var GoodsModalMap = {
|
|
|
15792
15932
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15793
15933
|
GY_GOODS: GyGoodsModal$2,
|
|
15794
15934
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
15935
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15795
15936
|
JST_GOODS: JstGoodsModal,
|
|
15796
15937
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15797
15938
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
@@ -15864,7 +16005,7 @@ var getButtonText = function getButtonText() {
|
|
|
15864
16005
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
15865
16006
|
return '选择旺店通商品';
|
|
15866
16007
|
}
|
|
15867
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16008
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
15868
16009
|
return '选择管易ERP商品';
|
|
15869
16010
|
}
|
|
15870
16011
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16052,16 +16193,18 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16052
16193
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
16053
16194
|
if (isStringArray) {
|
|
16054
16195
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
16055
|
-
return showHeader.includes(col.dataIndex);
|
|
16196
|
+
return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
|
|
16056
16197
|
});
|
|
16057
16198
|
} else if (isObjectArray) {
|
|
16058
|
-
baseInfoColumns = showHeader.
|
|
16059
|
-
return col.show !== false;
|
|
16060
|
-
}).map(function (col) {
|
|
16199
|
+
baseInfoColumns = showHeader.map(function (col) {
|
|
16061
16200
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
16062
16201
|
return item.dataIndex === col.dataIndex;
|
|
16063
16202
|
});
|
|
16064
|
-
|
|
16203
|
+
// 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
|
|
16204
|
+
if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
|
|
16205
|
+
return currentCol;
|
|
16206
|
+
}
|
|
16207
|
+
return undefined;
|
|
16065
16208
|
}).filter(Boolean);
|
|
16066
16209
|
}
|
|
16067
16210
|
var columnList = [{
|
|
@@ -16165,7 +16308,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16165
16308
|
canUpdateNumber: canUpdateNumber
|
|
16166
16309
|
});
|
|
16167
16310
|
});
|
|
16168
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16311
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16169
16312
|
newList = list.map(function (item) {
|
|
16170
16313
|
var goodName = item.goodName,
|
|
16171
16314
|
goodShortName = item.goodShortName,
|
|
@@ -19728,7 +19871,7 @@ var typeMap$4 = {
|
|
|
19728
19871
|
}
|
|
19729
19872
|
};
|
|
19730
19873
|
var GyReissue = function GyReissue(props) {
|
|
19731
|
-
var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
19874
|
+
var _typeMap$type28, _typeMap$type29, _typeMap$type30, _systemOrder$orders, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
19732
19875
|
var value = props.value,
|
|
19733
19876
|
onChange = props.onChange,
|
|
19734
19877
|
_props$reasonList = props.reasonList,
|
|
@@ -19900,10 +20043,9 @@ var GyReissue = function GyReissue(props) {
|
|
|
19900
20043
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19901
20044
|
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
|
|
19902
20045
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19903
|
-
var
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
|
|
20046
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder];
|
|
20047
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]);
|
|
20048
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
19907
20049
|
return /*#__PURE__*/React.createElement("div", {
|
|
19908
20050
|
id: "TEST_GY",
|
|
19909
20051
|
onClick: function onClick() {
|
|
@@ -19963,6 +20105,8 @@ var GyReissue = function GyReissue(props) {
|
|
|
19963
20105
|
disabled: disabled,
|
|
19964
20106
|
canUpdateNumber: showChangeBtn,
|
|
19965
20107
|
showChangeBtn: showChangeBtn,
|
|
20108
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20109
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
19966
20110
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19967
20111
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
|
|
19968
20112
|
onChange: function onChange(val) {
|
|
@@ -20001,7 +20145,7 @@ var typeMap$5 = {
|
|
|
20001
20145
|
}
|
|
20002
20146
|
};
|
|
20003
20147
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20004
|
-
var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
20148
|
+
var _typeMap$type10, _typeMap$type27, _systemOrder$orders, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
20005
20149
|
var value = props.value,
|
|
20006
20150
|
onChange = props.onChange,
|
|
20007
20151
|
_props$reasonList = props.reasonList,
|
|
@@ -20194,10 +20338,9 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20194
20338
|
}))));
|
|
20195
20339
|
};
|
|
20196
20340
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20197
|
-
var
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
20341
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder];
|
|
20342
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20343
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]);
|
|
20201
20344
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20202
20345
|
gutter: 8,
|
|
20203
20346
|
wrap: true
|
|
@@ -20259,7 +20402,8 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20259
20402
|
},
|
|
20260
20403
|
onModeChange: handleModeChange,
|
|
20261
20404
|
isStrict: isStrict,
|
|
20262
|
-
showErpGoodsBtn:
|
|
20405
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
20406
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20263
20407
|
tradeGoods: {
|
|
20264
20408
|
originDataSource: getGoodDetails({
|
|
20265
20409
|
mode: isStrict
|
|
@@ -20269,4 +20413,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20269
20413
|
})));
|
|
20270
20414
|
};
|
|
20271
20415
|
|
|
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 };
|
|
20416
|
+
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, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|