@kmkf-fe-packages/basic-components 1.22.1-beta.4 → 1.22.1-beta.6
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 +141 -10
- package/dist/index.js +141 -10
- package/dist/src/bs/component/GoodItem/wdtReissueGoodsColumns.d.ts +21 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -12576,6 +12576,103 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
12576
12576
|
});
|
|
12577
12577
|
};
|
|
12578
12578
|
|
|
12579
|
+
var columns$4 = [{
|
|
12580
|
+
dataIndex: 'goodId',
|
|
12581
|
+
title: "\u5546\u54C1ID",
|
|
12582
|
+
width: 70
|
|
12583
|
+
}, {
|
|
12584
|
+
dataIndex: 'goodNo',
|
|
12585
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
12586
|
+
width: 180
|
|
12587
|
+
}, {
|
|
12588
|
+
dataIndex: 'goodName',
|
|
12589
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12590
|
+
width: 250
|
|
12591
|
+
}, {
|
|
12592
|
+
dataIndex: 'specId',
|
|
12593
|
+
title: "SKUID",
|
|
12594
|
+
width: 100
|
|
12595
|
+
}, {
|
|
12596
|
+
dataIndex: 'specNo',
|
|
12597
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
12598
|
+
width: 180
|
|
12599
|
+
}, {
|
|
12600
|
+
dataIndex: 'specName',
|
|
12601
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
12602
|
+
width: 250
|
|
12603
|
+
}, {
|
|
12604
|
+
dataIndex: 'orderPrice',
|
|
12605
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12606
|
+
width: 100
|
|
12607
|
+
}, {
|
|
12608
|
+
dataIndex: 'num',
|
|
12609
|
+
title: "\u6570\u91CF",
|
|
12610
|
+
width: 100
|
|
12611
|
+
}, {
|
|
12612
|
+
dataIndex: 'sharePrice',
|
|
12613
|
+
title: "\u5206\u644A\u4EF7",
|
|
12614
|
+
width: 70
|
|
12615
|
+
}, {
|
|
12616
|
+
dataIndex: 'giftType',
|
|
12617
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12618
|
+
width: 100
|
|
12619
|
+
}];
|
|
12620
|
+
var renderFieldMap$1 = {
|
|
12621
|
+
num: function num(_ref) {
|
|
12622
|
+
var disabled = _ref.disabled,
|
|
12623
|
+
updateHandle = _ref.updateHandle;
|
|
12624
|
+
return function (val, record, index) {
|
|
12625
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12626
|
+
style: {
|
|
12627
|
+
width: 70
|
|
12628
|
+
},
|
|
12629
|
+
value: val,
|
|
12630
|
+
min: 1,
|
|
12631
|
+
precision: 0,
|
|
12632
|
+
onChange: function onChange(num) {
|
|
12633
|
+
return updateHandle(num, index, 'num');
|
|
12634
|
+
}
|
|
12635
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12636
|
+
};
|
|
12637
|
+
},
|
|
12638
|
+
giftType: function giftType(_ref2) {
|
|
12639
|
+
var disabled = _ref2.disabled,
|
|
12640
|
+
updateHandle = _ref2.updateHandle;
|
|
12641
|
+
return function (val) {
|
|
12642
|
+
var giftTypeMap = {
|
|
12643
|
+
0: '非赠品',
|
|
12644
|
+
1: '自动赠送',
|
|
12645
|
+
2: '手工赠送',
|
|
12646
|
+
3: '回购自动送赠品',
|
|
12647
|
+
4: '前N有礼送赠品',
|
|
12648
|
+
6: '天猫优仓赠品',
|
|
12649
|
+
7: '淘宝CRM会员送赠'
|
|
12650
|
+
};
|
|
12651
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12652
|
+
};
|
|
12653
|
+
}
|
|
12654
|
+
};
|
|
12655
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
|
|
12656
|
+
var disabled = _ref3.disabled,
|
|
12657
|
+
updateHandle = _ref3.updateHandle,
|
|
12658
|
+
operate = _ref3.operate;
|
|
12659
|
+
return columns$4.map(function (item) {
|
|
12660
|
+
var newItem = _objectSpread2({
|
|
12661
|
+
align: 'center',
|
|
12662
|
+
ellipsis: true
|
|
12663
|
+
}, item);
|
|
12664
|
+
if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
|
|
12665
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12666
|
+
render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
|
|
12667
|
+
disabled: disabled,
|
|
12668
|
+
updateHandle: updateHandle
|
|
12669
|
+
})
|
|
12670
|
+
});
|
|
12671
|
+
}
|
|
12672
|
+
return newItem;
|
|
12673
|
+
});
|
|
12674
|
+
};
|
|
12675
|
+
|
|
12579
12676
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12580
12677
|
var columns = _ref.columns,
|
|
12581
12678
|
dataSource = _ref.dataSource,
|
|
@@ -12616,6 +12713,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12616
12713
|
}
|
|
12617
12714
|
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12618
12715
|
};
|
|
12716
|
+
var getButtonText = function getButtonText() {
|
|
12717
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12718
|
+
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
12719
|
+
return '选择百胜ERP商品';
|
|
12720
|
+
}
|
|
12721
|
+
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12722
|
+
return '选择旺店通商品';
|
|
12723
|
+
}
|
|
12724
|
+
return '选择商品';
|
|
12725
|
+
};
|
|
12619
12726
|
var GoodItem$1 = function GoodItem(props) {
|
|
12620
12727
|
var _props$value = props.value,
|
|
12621
12728
|
value = _props$value === void 0 ? [] : _props$value,
|
|
@@ -12712,6 +12819,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12712
12819
|
var columns = [];
|
|
12713
12820
|
switch (type) {
|
|
12714
12821
|
case 'WDT_REISSUE_GOODS':
|
|
12822
|
+
{
|
|
12823
|
+
columns = getWdtReissueGoodColumns({
|
|
12824
|
+
disabled: disabled,
|
|
12825
|
+
updateHandle: updateHandle,
|
|
12826
|
+
operate: operate
|
|
12827
|
+
});
|
|
12828
|
+
}
|
|
12829
|
+
break;
|
|
12715
12830
|
case 'WDT_GOODS':
|
|
12716
12831
|
columns = [{
|
|
12717
12832
|
dataIndex: 'goodId',
|
|
@@ -13485,7 +13600,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13485
13600
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
13486
13601
|
type: "link",
|
|
13487
13602
|
onClick: handleChangeGoods
|
|
13488
|
-
},
|
|
13603
|
+
}, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13489
13604
|
columns: newColumns,
|
|
13490
13605
|
dataSource: value,
|
|
13491
13606
|
rowKey: 'uuid',
|
|
@@ -15164,7 +15279,7 @@ var typeMap$1 = {
|
|
|
15164
15279
|
}
|
|
15165
15280
|
};
|
|
15166
15281
|
var wdtReissue = function wdtReissue(props) {
|
|
15167
|
-
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$
|
|
15282
|
+
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
15168
15283
|
var value = props.value,
|
|
15169
15284
|
onChange = props.onChange,
|
|
15170
15285
|
_props$reasonList = props.reasonList,
|
|
@@ -15324,11 +15439,21 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15324
15439
|
}
|
|
15325
15440
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15326
15441
|
};
|
|
15442
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
15443
|
+
var _typeMap$type23, _getGoodDetails;
|
|
15444
|
+
var newValue = _objectSpread2({}, value);
|
|
15445
|
+
newValue["".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)] = (_getGoodDetails = getGoodDetails({
|
|
15446
|
+
mode: isStrict
|
|
15447
|
+
})) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
|
|
15448
|
+
return skuList.includes(item.id);
|
|
15449
|
+
});
|
|
15450
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15451
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
15327
15452
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15328
15453
|
var showChangeBtn = useMemo(function () {
|
|
15329
|
-
var _typeMap$
|
|
15330
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15331
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15454
|
+
var _typeMap$type25;
|
|
15455
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
|
|
15456
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
|
|
15332
15457
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
15333
15458
|
gutter: 8,
|
|
15334
15459
|
wrap: true
|
|
@@ -15346,12 +15471,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15346
15471
|
},
|
|
15347
15472
|
disabled: disabled,
|
|
15348
15473
|
allowClear: false,
|
|
15349
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15474
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
|
|
15350
15475
|
onChange: function onChange(val) {
|
|
15351
15476
|
return changeSystemOrderHandle(val);
|
|
15352
15477
|
},
|
|
15353
15478
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15354
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15479
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
15355
15480
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
15356
15481
|
key: item.billNo,
|
|
15357
15482
|
value: item.billNo,
|
|
@@ -15372,7 +15497,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15372
15497
|
disabled: disabled,
|
|
15373
15498
|
allowClear: false,
|
|
15374
15499
|
options: reasonList,
|
|
15375
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15500
|
+
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.typeName)],
|
|
15376
15501
|
onChange: function onChange(val) {
|
|
15377
15502
|
return changeTypeHandle(val);
|
|
15378
15503
|
}
|
|
@@ -15384,13 +15509,19 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15384
15509
|
canUpdateNumber: showChangeBtn,
|
|
15385
15510
|
showChangeBtn: showChangeBtn,
|
|
15386
15511
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15387
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15512
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
|
|
15388
15513
|
onChange: function onChange(val) {
|
|
15389
15514
|
return changeGoodHandle(val);
|
|
15390
15515
|
},
|
|
15391
15516
|
onModeChange: handleModeChange,
|
|
15392
15517
|
showModeBtn: showModeBtn,
|
|
15393
|
-
isStrict: isStrict
|
|
15518
|
+
isStrict: isStrict,
|
|
15519
|
+
tradeGoods: {
|
|
15520
|
+
originDataSource: getGoodDetails({
|
|
15521
|
+
mode: isStrict
|
|
15522
|
+
}),
|
|
15523
|
+
selectedGoodsChange: selectedGoodsChange
|
|
15524
|
+
}
|
|
15394
15525
|
})));
|
|
15395
15526
|
};
|
|
15396
15527
|
|
package/dist/index.js
CHANGED
|
@@ -12588,6 +12588,103 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
12588
12588
|
});
|
|
12589
12589
|
};
|
|
12590
12590
|
|
|
12591
|
+
var columns$4 = [{
|
|
12592
|
+
dataIndex: 'goodId',
|
|
12593
|
+
title: "\u5546\u54C1ID",
|
|
12594
|
+
width: 70
|
|
12595
|
+
}, {
|
|
12596
|
+
dataIndex: 'goodNo',
|
|
12597
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
12598
|
+
width: 180
|
|
12599
|
+
}, {
|
|
12600
|
+
dataIndex: 'goodName',
|
|
12601
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12602
|
+
width: 250
|
|
12603
|
+
}, {
|
|
12604
|
+
dataIndex: 'specId',
|
|
12605
|
+
title: "SKUID",
|
|
12606
|
+
width: 100
|
|
12607
|
+
}, {
|
|
12608
|
+
dataIndex: 'specNo',
|
|
12609
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
12610
|
+
width: 180
|
|
12611
|
+
}, {
|
|
12612
|
+
dataIndex: 'specName',
|
|
12613
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
12614
|
+
width: 250
|
|
12615
|
+
}, {
|
|
12616
|
+
dataIndex: 'orderPrice',
|
|
12617
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12618
|
+
width: 100
|
|
12619
|
+
}, {
|
|
12620
|
+
dataIndex: 'num',
|
|
12621
|
+
title: "\u6570\u91CF",
|
|
12622
|
+
width: 100
|
|
12623
|
+
}, {
|
|
12624
|
+
dataIndex: 'sharePrice',
|
|
12625
|
+
title: "\u5206\u644A\u4EF7",
|
|
12626
|
+
width: 70
|
|
12627
|
+
}, {
|
|
12628
|
+
dataIndex: 'giftType',
|
|
12629
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12630
|
+
width: 100
|
|
12631
|
+
}];
|
|
12632
|
+
var renderFieldMap$1 = {
|
|
12633
|
+
num: function num(_ref) {
|
|
12634
|
+
var disabled = _ref.disabled,
|
|
12635
|
+
updateHandle = _ref.updateHandle;
|
|
12636
|
+
return function (val, record, index) {
|
|
12637
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12638
|
+
style: {
|
|
12639
|
+
width: 70
|
|
12640
|
+
},
|
|
12641
|
+
value: val,
|
|
12642
|
+
min: 1,
|
|
12643
|
+
precision: 0,
|
|
12644
|
+
onChange: function onChange(num) {
|
|
12645
|
+
return updateHandle(num, index, 'num');
|
|
12646
|
+
}
|
|
12647
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12648
|
+
};
|
|
12649
|
+
},
|
|
12650
|
+
giftType: function giftType(_ref2) {
|
|
12651
|
+
var disabled = _ref2.disabled,
|
|
12652
|
+
updateHandle = _ref2.updateHandle;
|
|
12653
|
+
return function (val) {
|
|
12654
|
+
var giftTypeMap = {
|
|
12655
|
+
0: '非赠品',
|
|
12656
|
+
1: '自动赠送',
|
|
12657
|
+
2: '手工赠送',
|
|
12658
|
+
3: '回购自动送赠品',
|
|
12659
|
+
4: '前N有礼送赠品',
|
|
12660
|
+
6: '天猫优仓赠品',
|
|
12661
|
+
7: '淘宝CRM会员送赠'
|
|
12662
|
+
};
|
|
12663
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12664
|
+
};
|
|
12665
|
+
}
|
|
12666
|
+
};
|
|
12667
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
|
|
12668
|
+
var disabled = _ref3.disabled,
|
|
12669
|
+
updateHandle = _ref3.updateHandle,
|
|
12670
|
+
operate = _ref3.operate;
|
|
12671
|
+
return columns$4.map(function (item) {
|
|
12672
|
+
var newItem = _objectSpread2({
|
|
12673
|
+
align: 'center',
|
|
12674
|
+
ellipsis: true
|
|
12675
|
+
}, item);
|
|
12676
|
+
if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
|
|
12677
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12678
|
+
render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
|
|
12679
|
+
disabled: disabled,
|
|
12680
|
+
updateHandle: updateHandle
|
|
12681
|
+
})
|
|
12682
|
+
});
|
|
12683
|
+
}
|
|
12684
|
+
return newItem;
|
|
12685
|
+
});
|
|
12686
|
+
};
|
|
12687
|
+
|
|
12591
12688
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12592
12689
|
var columns = _ref.columns,
|
|
12593
12690
|
dataSource = _ref.dataSource,
|
|
@@ -12628,6 +12725,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12628
12725
|
}
|
|
12629
12726
|
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12630
12727
|
};
|
|
12728
|
+
var getButtonText = function getButtonText() {
|
|
12729
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12730
|
+
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
12731
|
+
return '选择百胜ERP商品';
|
|
12732
|
+
}
|
|
12733
|
+
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12734
|
+
return '选择旺店通商品';
|
|
12735
|
+
}
|
|
12736
|
+
return '选择商品';
|
|
12737
|
+
};
|
|
12631
12738
|
var GoodItem$1 = function GoodItem(props) {
|
|
12632
12739
|
var _props$value = props.value,
|
|
12633
12740
|
value = _props$value === void 0 ? [] : _props$value,
|
|
@@ -12724,6 +12831,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12724
12831
|
var columns = [];
|
|
12725
12832
|
switch (type) {
|
|
12726
12833
|
case 'WDT_REISSUE_GOODS':
|
|
12834
|
+
{
|
|
12835
|
+
columns = getWdtReissueGoodColumns({
|
|
12836
|
+
disabled: disabled,
|
|
12837
|
+
updateHandle: updateHandle,
|
|
12838
|
+
operate: operate
|
|
12839
|
+
});
|
|
12840
|
+
}
|
|
12841
|
+
break;
|
|
12727
12842
|
case 'WDT_GOODS':
|
|
12728
12843
|
columns = [{
|
|
12729
12844
|
dataIndex: 'goodId',
|
|
@@ -13497,7 +13612,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13497
13612
|
}), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13498
13613
|
type: "link",
|
|
13499
13614
|
onClick: handleChangeGoods
|
|
13500
|
-
},
|
|
13615
|
+
}, getButtonText(type)), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13501
13616
|
columns: newColumns,
|
|
13502
13617
|
dataSource: value,
|
|
13503
13618
|
rowKey: 'uuid',
|
|
@@ -15176,7 +15291,7 @@ var typeMap$1 = {
|
|
|
15176
15291
|
}
|
|
15177
15292
|
};
|
|
15178
15293
|
var wdtReissue = function wdtReissue(props) {
|
|
15179
|
-
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$
|
|
15294
|
+
var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
|
|
15180
15295
|
var value = props.value,
|
|
15181
15296
|
onChange = props.onChange,
|
|
15182
15297
|
_props$reasonList = props.reasonList,
|
|
@@ -15336,11 +15451,21 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15336
15451
|
}
|
|
15337
15452
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15338
15453
|
};
|
|
15454
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
15455
|
+
var _typeMap$type23, _getGoodDetails;
|
|
15456
|
+
var newValue = _objectSpread2({}, value);
|
|
15457
|
+
newValue["".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)] = (_getGoodDetails = getGoodDetails({
|
|
15458
|
+
mode: isStrict
|
|
15459
|
+
})) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
|
|
15460
|
+
return skuList.includes(item.id);
|
|
15461
|
+
});
|
|
15462
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15463
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
15339
15464
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15340
15465
|
var showChangeBtn = React.useMemo(function () {
|
|
15341
|
-
var _typeMap$
|
|
15342
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15343
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15466
|
+
var _typeMap$type25;
|
|
15467
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
|
|
15468
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
|
|
15344
15469
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
15345
15470
|
gutter: 8,
|
|
15346
15471
|
wrap: true
|
|
@@ -15358,12 +15483,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15358
15483
|
},
|
|
15359
15484
|
disabled: disabled,
|
|
15360
15485
|
allowClear: false,
|
|
15361
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15486
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
|
|
15362
15487
|
onChange: function onChange(val) {
|
|
15363
15488
|
return changeSystemOrderHandle(val);
|
|
15364
15489
|
},
|
|
15365
15490
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15366
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15491
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
15367
15492
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
15368
15493
|
key: item.billNo,
|
|
15369
15494
|
value: item.billNo,
|
|
@@ -15384,7 +15509,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15384
15509
|
disabled: disabled,
|
|
15385
15510
|
allowClear: false,
|
|
15386
15511
|
options: reasonList,
|
|
15387
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15512
|
+
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.typeName)],
|
|
15388
15513
|
onChange: function onChange(val) {
|
|
15389
15514
|
return changeTypeHandle(val);
|
|
15390
15515
|
}
|
|
@@ -15396,13 +15521,19 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15396
15521
|
canUpdateNumber: showChangeBtn,
|
|
15397
15522
|
showChangeBtn: showChangeBtn,
|
|
15398
15523
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15399
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15524
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
|
|
15400
15525
|
onChange: function onChange(val) {
|
|
15401
15526
|
return changeGoodHandle(val);
|
|
15402
15527
|
},
|
|
15403
15528
|
onModeChange: handleModeChange,
|
|
15404
15529
|
showModeBtn: showModeBtn,
|
|
15405
|
-
isStrict: isStrict
|
|
15530
|
+
isStrict: isStrict,
|
|
15531
|
+
tradeGoods: {
|
|
15532
|
+
originDataSource: getGoodDetails({
|
|
15533
|
+
mode: isStrict
|
|
15534
|
+
}),
|
|
15535
|
+
selectedGoodsChange: selectedGoodsChange
|
|
15536
|
+
}
|
|
15406
15537
|
})));
|
|
15407
15538
|
};
|
|
15408
15539
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type P = {
|
|
3
|
+
disabled: boolean | undefined;
|
|
4
|
+
updateHandle: (v: any, index: number, key: string) => void;
|
|
5
|
+
operate?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const getWdtReissueGoodColumns: ({ disabled, updateHandle, operate }: P) => ({
|
|
8
|
+
dataIndex: string;
|
|
9
|
+
title: string;
|
|
10
|
+
width: number;
|
|
11
|
+
align: string;
|
|
12
|
+
ellipsis: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
render: (val: any, record: any, index: number) => React.JSX.Element;
|
|
15
|
+
dataIndex: string;
|
|
16
|
+
title: string;
|
|
17
|
+
width: number;
|
|
18
|
+
align: string;
|
|
19
|
+
ellipsis: boolean;
|
|
20
|
+
})[];
|
|
21
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "1.22.1-beta.
|
|
3
|
+
"version": "1.22.1-beta.6",
|
|
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": "1.22.1-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "1.22.1-beta.6",
|
|
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": "519ad11f0f7853f93b865b1a52c72ece481fa56f"
|
|
69
69
|
}
|