@kmkf-fe-packages/basic-components 0.23.1-beta.14 → 0.23.1-beta.16
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 +101 -72
- package/dist/index.js +101 -72
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -10702,43 +10702,44 @@ var columns$1 = [{
|
|
|
10702
10702
|
}, {
|
|
10703
10703
|
dataIndex: 'goodName',
|
|
10704
10704
|
title: '商品名称',
|
|
10705
|
-
|
|
10705
|
+
width: 200,
|
|
10706
10706
|
ellipsis: true
|
|
10707
10707
|
}, {
|
|
10708
10708
|
dataIndex: 'goodNo',
|
|
10709
10709
|
title: '商品spu编码',
|
|
10710
|
-
|
|
10711
|
-
ellipsis: true
|
|
10710
|
+
width: 200
|
|
10711
|
+
// ellipsis: true,
|
|
10712
10712
|
}, {
|
|
10713
10713
|
dataIndex: 'goodId',
|
|
10714
10714
|
title: 'SPUID',
|
|
10715
|
-
|
|
10716
|
-
ellipsis: true
|
|
10715
|
+
width: 200
|
|
10716
|
+
// ellipsis: true,
|
|
10717
10717
|
}, {
|
|
10718
10718
|
dataIndex: 'specCount',
|
|
10719
10719
|
title: '规格数',
|
|
10720
|
-
|
|
10721
|
-
ellipsis: true
|
|
10720
|
+
width: 160
|
|
10721
|
+
// ellipsis: true,
|
|
10722
10722
|
}];
|
|
10723
|
+
|
|
10723
10724
|
var expandedColumns = [{
|
|
10724
10725
|
dataIndex: 'specName',
|
|
10725
10726
|
title: '商品sku名称',
|
|
10726
|
-
|
|
10727
|
+
width: 200,
|
|
10727
10728
|
ellipsis: true
|
|
10728
10729
|
}, {
|
|
10729
10730
|
dataIndex: 'specNo',
|
|
10730
10731
|
title: '商品sku编码',
|
|
10731
|
-
|
|
10732
|
-
ellipsis: true
|
|
10732
|
+
width: 200
|
|
10733
|
+
// ellipsis: true,
|
|
10733
10734
|
}, {
|
|
10734
10735
|
dataIndex: 'specId',
|
|
10735
10736
|
title: 'SKUID',
|
|
10736
|
-
|
|
10737
|
-
ellipsis: true
|
|
10737
|
+
width: 200
|
|
10738
|
+
// ellipsis: true,
|
|
10738
10739
|
}, {
|
|
10739
10740
|
dataIndex: 'imgUrl',
|
|
10740
10741
|
title: '商品图片',
|
|
10741
|
-
|
|
10742
|
+
width: 100,
|
|
10742
10743
|
render: function render(picUrl) {
|
|
10743
10744
|
return /*#__PURE__*/React.createElement("img", {
|
|
10744
10745
|
style: {
|
|
@@ -10751,13 +10752,16 @@ var expandedColumns = [{
|
|
|
10751
10752
|
}
|
|
10752
10753
|
}, {
|
|
10753
10754
|
dataIndex: 'marketPrice',
|
|
10754
|
-
title: '市场价'
|
|
10755
|
+
title: '市场价',
|
|
10756
|
+
width: 140
|
|
10755
10757
|
}, {
|
|
10756
10758
|
dataIndex: 'retailPrice',
|
|
10757
|
-
title: '零售价'
|
|
10759
|
+
title: '零售价',
|
|
10760
|
+
width: 140
|
|
10758
10761
|
}, {
|
|
10759
10762
|
dataIndex: 'memberPrice',
|
|
10760
|
-
title: '会员价'
|
|
10763
|
+
title: '会员价',
|
|
10764
|
+
width: 140
|
|
10761
10765
|
}];
|
|
10762
10766
|
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
10763
10767
|
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
@@ -10774,6 +10778,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10774
10778
|
};
|
|
10775
10779
|
});
|
|
10776
10780
|
|
|
10781
|
+
var initStartTime = hooks().subtract(1, 'M').format(dateFormat);
|
|
10782
|
+
var initEndTime = hooks().format(dateFormat);
|
|
10777
10783
|
var onSubmit = props.onSubmit,
|
|
10778
10784
|
shopId = props.shopId,
|
|
10779
10785
|
shopList = props.shopList,
|
|
@@ -10810,11 +10816,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10810
10816
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
10811
10817
|
total = _useState16[0],
|
|
10812
10818
|
setTotal = _useState16[1];
|
|
10813
|
-
var _useState17 = useState(
|
|
10819
|
+
var _useState17 = useState(initStartTime),
|
|
10814
10820
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
10815
10821
|
startTime = _useState18[0],
|
|
10816
10822
|
setStartTime = _useState18[1];
|
|
10817
|
-
var _useState19 = useState(
|
|
10823
|
+
var _useState19 = useState(initEndTime),
|
|
10818
10824
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
10819
10825
|
endTime = _useState20[0],
|
|
10820
10826
|
setEndTime = _useState20[1];
|
|
@@ -10824,13 +10830,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10824
10830
|
return item;
|
|
10825
10831
|
});
|
|
10826
10832
|
}, [selectList]);
|
|
10833
|
+
useEffect(function () {
|
|
10834
|
+
queryItems();
|
|
10835
|
+
}, [pageNo]);
|
|
10827
10836
|
var _Form$useForm = Form.useForm(),
|
|
10828
10837
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
10829
10838
|
form = _Form$useForm2[0];
|
|
10830
10839
|
//选择页码
|
|
10831
10840
|
var pageChange = function pageChange(page) {
|
|
10832
10841
|
setPageNo(page);
|
|
10833
|
-
queryItems();
|
|
10834
10842
|
};
|
|
10835
10843
|
/**
|
|
10836
10844
|
* 查询商品
|
|
@@ -10840,8 +10848,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10840
10848
|
var search,
|
|
10841
10849
|
params,
|
|
10842
10850
|
res,
|
|
10851
|
+
_res$data,
|
|
10843
10852
|
_res$data$productList,
|
|
10844
10853
|
productList,
|
|
10854
|
+
_res$data$total,
|
|
10855
|
+
_total,
|
|
10845
10856
|
newProducts,
|
|
10846
10857
|
_args = arguments;
|
|
10847
10858
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -10866,13 +10877,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10866
10877
|
case 6:
|
|
10867
10878
|
res = _context.sent;
|
|
10868
10879
|
if (res.success) {
|
|
10869
|
-
_res$data
|
|
10880
|
+
_res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
10870
10881
|
newProducts = productList.map(function (item, index) {
|
|
10871
10882
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
10872
10883
|
index: index + 1
|
|
10873
10884
|
});
|
|
10874
10885
|
});
|
|
10875
|
-
|
|
10886
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
10887
|
+
if (pageNo === 1) {
|
|
10888
|
+
setTotal(_total);
|
|
10889
|
+
}
|
|
10876
10890
|
}
|
|
10877
10891
|
case 8:
|
|
10878
10892
|
_context.prev = 8;
|
|
@@ -10888,11 +10902,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10888
10902
|
return _ref.apply(this, arguments);
|
|
10889
10903
|
};
|
|
10890
10904
|
}();
|
|
10891
|
-
var initData = function initData(list) {
|
|
10892
|
-
setGoodList(_toConsumableArray(list));
|
|
10893
|
-
setTotal(list.length);
|
|
10894
|
-
setPageNo(1);
|
|
10895
|
-
};
|
|
10896
10905
|
var _onCancel = function onCancel() {
|
|
10897
10906
|
onReset();
|
|
10898
10907
|
setVisible(false);
|
|
@@ -10909,7 +10918,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10909
10918
|
};
|
|
10910
10919
|
var onReset = function onReset() {
|
|
10911
10920
|
form.resetFields();
|
|
10912
|
-
|
|
10921
|
+
setPageNo(1);
|
|
10922
|
+
// queryItems()
|
|
10913
10923
|
};
|
|
10914
10924
|
// const getShopList = async () => {
|
|
10915
10925
|
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
@@ -11012,7 +11022,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11012
11022
|
columns: expandedColumns,
|
|
11013
11023
|
dataSource: record.itemDetailList || [],
|
|
11014
11024
|
pagination: false,
|
|
11015
|
-
rowSelection: expandedRowSelection
|
|
11025
|
+
rowSelection: expandedRowSelection,
|
|
11026
|
+
scroll: {
|
|
11027
|
+
x: true
|
|
11028
|
+
}
|
|
11016
11029
|
});
|
|
11017
11030
|
};
|
|
11018
11031
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -11030,7 +11043,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11030
11043
|
layout: "inline",
|
|
11031
11044
|
form: form,
|
|
11032
11045
|
onFinish: onFinish,
|
|
11033
|
-
onValuesChange: onValuesChange
|
|
11046
|
+
onValuesChange: onValuesChange,
|
|
11047
|
+
initialValues: {
|
|
11048
|
+
dateTimePicker: [hooks(initStartTime, dateFormat), hooks(initEndTime, dateFormat)],
|
|
11049
|
+
code: ''
|
|
11050
|
+
}
|
|
11034
11051
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
11035
11052
|
name: "dateTimePicker"
|
|
11036
11053
|
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
@@ -11050,12 +11067,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11050
11067
|
htmlType: "submit"
|
|
11051
11068
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
11052
11069
|
onClick: onReset
|
|
11053
|
-
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(
|
|
11054
|
-
|
|
11070
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
11071
|
+
style: {
|
|
11072
|
+
marginTop: '16px'
|
|
11073
|
+
}
|
|
11055
11074
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
11056
11075
|
rowKey: 'goodNo',
|
|
11057
11076
|
columns: columns$1,
|
|
11058
11077
|
dataSource: goodList,
|
|
11078
|
+
loading: loading,
|
|
11059
11079
|
scroll: {
|
|
11060
11080
|
x: true,
|
|
11061
11081
|
y: 250
|
|
@@ -11164,18 +11184,18 @@ var GoodItem = function GoodItem(props) {
|
|
|
11164
11184
|
align: 'center',
|
|
11165
11185
|
ellipsis: true,
|
|
11166
11186
|
width: 100
|
|
11167
|
-
}, {
|
|
11168
|
-
dataIndex: 'specId',
|
|
11169
|
-
title: "".concat(text, "SKUID"),
|
|
11170
|
-
align: 'center',
|
|
11171
|
-
ellipsis: true,
|
|
11172
|
-
width: 100
|
|
11173
11187
|
}, {
|
|
11174
11188
|
dataIndex: 'goodName',
|
|
11175
11189
|
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11176
11190
|
align: 'center',
|
|
11177
11191
|
ellipsis: true,
|
|
11178
11192
|
width: 250
|
|
11193
|
+
}, {
|
|
11194
|
+
dataIndex: 'specId',
|
|
11195
|
+
title: "".concat(text, "SKUID"),
|
|
11196
|
+
align: 'center',
|
|
11197
|
+
ellipsis: true,
|
|
11198
|
+
width: 100
|
|
11179
11199
|
}, {
|
|
11180
11200
|
dataIndex: 'specNo',
|
|
11181
11201
|
title: "".concat(text, "sku\u7F16\u7801"),
|
|
@@ -11190,7 +11210,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
11190
11210
|
width: 250
|
|
11191
11211
|
}, {
|
|
11192
11212
|
dataIndex: 'orderPrice',
|
|
11193
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11213
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11194
11214
|
align: 'center',
|
|
11195
11215
|
ellipsis: true,
|
|
11196
11216
|
width: 100
|
|
@@ -11229,7 +11249,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
11229
11249
|
width: 70
|
|
11230
11250
|
}, {
|
|
11231
11251
|
dataIndex: 'giftType',
|
|
11232
|
-
title: "\u8D60\u54C1\
|
|
11252
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11233
11253
|
align: 'center',
|
|
11234
11254
|
ellipsis: true,
|
|
11235
11255
|
width: 100,
|
|
@@ -11393,8 +11413,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
11393
11413
|
item.uuid = uuid();
|
|
11394
11414
|
item.canDelete = true;
|
|
11395
11415
|
item.num = 1;
|
|
11396
|
-
item.orderPrice =
|
|
11397
|
-
item.sharePrice =
|
|
11416
|
+
item.orderPrice = 0;
|
|
11417
|
+
item.sharePrice = 0;
|
|
11398
11418
|
item.canUpdateNumber = canUpdateNumber;
|
|
11399
11419
|
return item;
|
|
11400
11420
|
});
|
|
@@ -11865,9 +11885,12 @@ var typeMap = {
|
|
|
11865
11885
|
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
11866
11886
|
reissueDeleteGood: 'reissueDeleteGood',
|
|
11867
11887
|
changeShopCode: 'changeShopCode',
|
|
11868
|
-
reissueType: 'reissueType'
|
|
11888
|
+
reissueType: 'reissueType',
|
|
11889
|
+
formatDefaultField: {
|
|
11890
|
+
money: 'money',
|
|
11891
|
+
share: 'share'
|
|
11892
|
+
}
|
|
11869
11893
|
},
|
|
11870
|
-
|
|
11871
11894
|
WDT_REISSUE_GOODS: {
|
|
11872
11895
|
key: 'wdtReissueGoods',
|
|
11873
11896
|
name: '旺店通',
|
|
@@ -11876,12 +11899,15 @@ var typeMap = {
|
|
|
11876
11899
|
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
11877
11900
|
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
11878
11901
|
changeShopCode: 'wdtChangeShopCode',
|
|
11879
|
-
reissueType: 'wdtReissueType'
|
|
11902
|
+
reissueType: 'wdtReissueType',
|
|
11903
|
+
formatDefaultField: {
|
|
11904
|
+
money: 'orderPrice',
|
|
11905
|
+
share: 'sharePrice'
|
|
11906
|
+
}
|
|
11880
11907
|
}
|
|
11881
11908
|
};
|
|
11882
|
-
|
|
11883
11909
|
var BsReissue = function BsReissue(props) {
|
|
11884
|
-
var _typeMap$
|
|
11910
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11885
11911
|
var value = props.value,
|
|
11886
11912
|
onChange = props.onChange,
|
|
11887
11913
|
_props$reasonList = props.reasonList,
|
|
@@ -11900,8 +11926,9 @@ var BsReissue = function BsReissue(props) {
|
|
|
11900
11926
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11901
11927
|
});
|
|
11902
11928
|
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type2 = typeMap[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11903
|
-
|
|
11904
|
-
item.
|
|
11929
|
+
var _typeMap$type3, _typeMap$type4;
|
|
11930
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type3 = typeMap[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.formatDefaultField.money)] = 0;
|
|
11931
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type4 = typeMap[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.formatDefaultField.share)] = 0;
|
|
11905
11932
|
item.canUpdateNumber = true;
|
|
11906
11933
|
return item;
|
|
11907
11934
|
});
|
|
@@ -11909,17 +11936,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11909
11936
|
});
|
|
11910
11937
|
}, []);
|
|
11911
11938
|
useEffect(function () {
|
|
11912
|
-
var _typeMap$
|
|
11913
|
-
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11914
|
-
var _typeMap$
|
|
11939
|
+
var _typeMap$type5;
|
|
11940
|
+
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type5 = typeMap[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.reissueSelectListReturn), function (_, data) {
|
|
11941
|
+
var _typeMap$type6;
|
|
11915
11942
|
// console.log('reissueSelectListReturn', data);
|
|
11916
11943
|
if (disabled) return;
|
|
11917
11944
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11918
11945
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11919
11946
|
});
|
|
11920
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11921
|
-
|
|
11922
|
-
item.
|
|
11947
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type6 = typeMap[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11948
|
+
var _typeMap$type7, _typeMap$type8;
|
|
11949
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type7 = typeMap[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.formatDefaultField.money)] = 0;
|
|
11950
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type8 = typeMap[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.formatDefaultField.share)] = 0;
|
|
11923
11951
|
item.canUpdateNumber = true;
|
|
11924
11952
|
return item;
|
|
11925
11953
|
});
|
|
@@ -11927,54 +11955,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11927
11955
|
});
|
|
11928
11956
|
}, []);
|
|
11929
11957
|
useEffect(function () {
|
|
11930
|
-
var _typeMap$
|
|
11958
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11931
11959
|
valueRef.current = value;
|
|
11932
|
-
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11960
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type9 = typeMap[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.reissueDeleteGood), function (_, data) {
|
|
11933
11961
|
if (disabled) return;
|
|
11934
11962
|
if (value) {
|
|
11935
|
-
var _typeMap$
|
|
11963
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11936
11964
|
var newValue = _objectSpread2({}, value);
|
|
11937
|
-
newValue["".concat((_typeMap$
|
|
11965
|
+
newValue["".concat((_typeMap$type10 = typeMap[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type11 = typeMap[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key)].filter(function (item) {
|
|
11938
11966
|
return item.sku !== data;
|
|
11939
11967
|
});
|
|
11940
11968
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11941
11969
|
}
|
|
11942
11970
|
});
|
|
11943
|
-
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11971
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type12 = typeMap[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.changeShopCode), function (type, data) {
|
|
11944
11972
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11945
11973
|
shopCode: data.shopCode
|
|
11946
11974
|
}));
|
|
11947
11975
|
});
|
|
11948
11976
|
}, [value, disabled]);
|
|
11949
11977
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
11950
|
-
var _typeMap$
|
|
11978
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11951
11979
|
var newValue = _objectSpread2({}, value);
|
|
11952
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11953
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11980
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
11981
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11954
11982
|
if (['2', '4'].includes(val[0])) {
|
|
11955
11983
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11956
11984
|
valueRef.current = newValue;
|
|
11957
11985
|
}
|
|
11958
|
-
pubsub.publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11986
|
+
pubsub.publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type15 = typeMap[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.reissueType), {
|
|
11959
11987
|
val: val[0],
|
|
11960
11988
|
goodValue: newValue
|
|
11961
11989
|
});
|
|
11962
11990
|
};
|
|
11963
11991
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
11964
|
-
var _typeMap$
|
|
11992
|
+
var _typeMap$type16;
|
|
11965
11993
|
var newValue = _objectSpread2({}, value);
|
|
11966
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11967
|
-
|
|
11968
|
-
item.
|
|
11994
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type16 = typeMap[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key)] = (val || []).map(function (item) {
|
|
11995
|
+
var _typeMap$type17, _typeMap$type18;
|
|
11996
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type17 = typeMap[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.money)] = 0;
|
|
11997
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type18 = typeMap[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.share)] = 0;
|
|
11969
11998
|
return item;
|
|
11970
11999
|
});
|
|
11971
12000
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11972
12001
|
};
|
|
11973
12002
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11974
12003
|
var showChangeBtn = useMemo(function () {
|
|
11975
|
-
var _value, _typeMap$
|
|
11976
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11977
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
12004
|
+
var _value, _typeMap$type19;
|
|
12005
|
+
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type19 = typeMap[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName)]) === null || _value === void 0 ? void 0 : _value[0]);
|
|
12006
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11978
12007
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
11979
12008
|
style: {
|
|
11980
12009
|
marginBottom: '8px'
|
|
@@ -11982,7 +12011,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
11982
12011
|
disabled: disabled,
|
|
11983
12012
|
allowClear: false,
|
|
11984
12013
|
options: reasonList,
|
|
11985
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
12014
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type21 = typeMap[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName)],
|
|
11986
12015
|
onChange: function onChange(val) {
|
|
11987
12016
|
return changeTypeHandle(val);
|
|
11988
12017
|
}
|
|
@@ -11994,7 +12023,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
11994
12023
|
canUpdateNumber: showChangeBtn,
|
|
11995
12024
|
showChangeBtn: showChangeBtn,
|
|
11996
12025
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11997
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
12026
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type22 = typeMap[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)],
|
|
11998
12027
|
onChange: function onChange(val) {
|
|
11999
12028
|
return changeGoodHandle(val);
|
|
12000
12029
|
}
|
package/dist/index.js
CHANGED
|
@@ -10713,43 +10713,44 @@ var columns$1 = [{
|
|
|
10713
10713
|
}, {
|
|
10714
10714
|
dataIndex: 'goodName',
|
|
10715
10715
|
title: '商品名称',
|
|
10716
|
-
|
|
10716
|
+
width: 200,
|
|
10717
10717
|
ellipsis: true
|
|
10718
10718
|
}, {
|
|
10719
10719
|
dataIndex: 'goodNo',
|
|
10720
10720
|
title: '商品spu编码',
|
|
10721
|
-
|
|
10722
|
-
ellipsis: true
|
|
10721
|
+
width: 200
|
|
10722
|
+
// ellipsis: true,
|
|
10723
10723
|
}, {
|
|
10724
10724
|
dataIndex: 'goodId',
|
|
10725
10725
|
title: 'SPUID',
|
|
10726
|
-
|
|
10727
|
-
ellipsis: true
|
|
10726
|
+
width: 200
|
|
10727
|
+
// ellipsis: true,
|
|
10728
10728
|
}, {
|
|
10729
10729
|
dataIndex: 'specCount',
|
|
10730
10730
|
title: '规格数',
|
|
10731
|
-
|
|
10732
|
-
ellipsis: true
|
|
10731
|
+
width: 160
|
|
10732
|
+
// ellipsis: true,
|
|
10733
10733
|
}];
|
|
10734
|
+
|
|
10734
10735
|
var expandedColumns = [{
|
|
10735
10736
|
dataIndex: 'specName',
|
|
10736
10737
|
title: '商品sku名称',
|
|
10737
|
-
|
|
10738
|
+
width: 200,
|
|
10738
10739
|
ellipsis: true
|
|
10739
10740
|
}, {
|
|
10740
10741
|
dataIndex: 'specNo',
|
|
10741
10742
|
title: '商品sku编码',
|
|
10742
|
-
|
|
10743
|
-
ellipsis: true
|
|
10743
|
+
width: 200
|
|
10744
|
+
// ellipsis: true,
|
|
10744
10745
|
}, {
|
|
10745
10746
|
dataIndex: 'specId',
|
|
10746
10747
|
title: 'SKUID',
|
|
10747
|
-
|
|
10748
|
-
ellipsis: true
|
|
10748
|
+
width: 200
|
|
10749
|
+
// ellipsis: true,
|
|
10749
10750
|
}, {
|
|
10750
10751
|
dataIndex: 'imgUrl',
|
|
10751
10752
|
title: '商品图片',
|
|
10752
|
-
|
|
10753
|
+
width: 100,
|
|
10753
10754
|
render: function render(picUrl) {
|
|
10754
10755
|
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
10755
10756
|
style: {
|
|
@@ -10762,13 +10763,16 @@ var expandedColumns = [{
|
|
|
10762
10763
|
}
|
|
10763
10764
|
}, {
|
|
10764
10765
|
dataIndex: 'marketPrice',
|
|
10765
|
-
title: '市场价'
|
|
10766
|
+
title: '市场价',
|
|
10767
|
+
width: 140
|
|
10766
10768
|
}, {
|
|
10767
10769
|
dataIndex: 'retailPrice',
|
|
10768
|
-
title: '零售价'
|
|
10770
|
+
title: '零售价',
|
|
10771
|
+
width: 140
|
|
10769
10772
|
}, {
|
|
10770
10773
|
dataIndex: 'memberPrice',
|
|
10771
|
-
title: '会员价'
|
|
10774
|
+
title: '会员价',
|
|
10775
|
+
width: 140
|
|
10772
10776
|
}];
|
|
10773
10777
|
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
10774
10778
|
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
@@ -10785,6 +10789,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10785
10789
|
};
|
|
10786
10790
|
});
|
|
10787
10791
|
|
|
10792
|
+
var initStartTime = hooks().subtract(1, 'M').format(dateFormat);
|
|
10793
|
+
var initEndTime = hooks().format(dateFormat);
|
|
10788
10794
|
var onSubmit = props.onSubmit,
|
|
10789
10795
|
shopId = props.shopId,
|
|
10790
10796
|
shopList = props.shopList,
|
|
@@ -10821,11 +10827,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10821
10827
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
10822
10828
|
total = _useState16[0],
|
|
10823
10829
|
setTotal = _useState16[1];
|
|
10824
|
-
var _useState17 = React.useState(
|
|
10830
|
+
var _useState17 = React.useState(initStartTime),
|
|
10825
10831
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
10826
10832
|
startTime = _useState18[0],
|
|
10827
10833
|
setStartTime = _useState18[1];
|
|
10828
|
-
var _useState19 = React.useState(
|
|
10834
|
+
var _useState19 = React.useState(initEndTime),
|
|
10829
10835
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
10830
10836
|
endTime = _useState20[0],
|
|
10831
10837
|
setEndTime = _useState20[1];
|
|
@@ -10835,13 +10841,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10835
10841
|
return item;
|
|
10836
10842
|
});
|
|
10837
10843
|
}, [selectList]);
|
|
10844
|
+
React.useEffect(function () {
|
|
10845
|
+
queryItems();
|
|
10846
|
+
}, [pageNo]);
|
|
10838
10847
|
var _Form$useForm = antd.Form.useForm(),
|
|
10839
10848
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
10840
10849
|
form = _Form$useForm2[0];
|
|
10841
10850
|
//选择页码
|
|
10842
10851
|
var pageChange = function pageChange(page) {
|
|
10843
10852
|
setPageNo(page);
|
|
10844
|
-
queryItems();
|
|
10845
10853
|
};
|
|
10846
10854
|
/**
|
|
10847
10855
|
* 查询商品
|
|
@@ -10851,8 +10859,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10851
10859
|
var search,
|
|
10852
10860
|
params,
|
|
10853
10861
|
res,
|
|
10862
|
+
_res$data,
|
|
10854
10863
|
_res$data$productList,
|
|
10855
10864
|
productList,
|
|
10865
|
+
_res$data$total,
|
|
10866
|
+
_total,
|
|
10856
10867
|
newProducts,
|
|
10857
10868
|
_args = arguments;
|
|
10858
10869
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -10877,13 +10888,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10877
10888
|
case 6:
|
|
10878
10889
|
res = _context.sent;
|
|
10879
10890
|
if (res.success) {
|
|
10880
|
-
_res$data
|
|
10891
|
+
_res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
10881
10892
|
newProducts = productList.map(function (item, index) {
|
|
10882
10893
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
10883
10894
|
index: index + 1
|
|
10884
10895
|
});
|
|
10885
10896
|
});
|
|
10886
|
-
|
|
10897
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
10898
|
+
if (pageNo === 1) {
|
|
10899
|
+
setTotal(_total);
|
|
10900
|
+
}
|
|
10887
10901
|
}
|
|
10888
10902
|
case 8:
|
|
10889
10903
|
_context.prev = 8;
|
|
@@ -10899,11 +10913,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10899
10913
|
return _ref.apply(this, arguments);
|
|
10900
10914
|
};
|
|
10901
10915
|
}();
|
|
10902
|
-
var initData = function initData(list) {
|
|
10903
|
-
setGoodList(_toConsumableArray(list));
|
|
10904
|
-
setTotal(list.length);
|
|
10905
|
-
setPageNo(1);
|
|
10906
|
-
};
|
|
10907
10916
|
var _onCancel = function onCancel() {
|
|
10908
10917
|
onReset();
|
|
10909
10918
|
setVisible(false);
|
|
@@ -10920,7 +10929,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
10920
10929
|
};
|
|
10921
10930
|
var onReset = function onReset() {
|
|
10922
10931
|
form.resetFields();
|
|
10923
|
-
|
|
10932
|
+
setPageNo(1);
|
|
10933
|
+
// queryItems()
|
|
10924
10934
|
};
|
|
10925
10935
|
// const getShopList = async () => {
|
|
10926
10936
|
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
@@ -11023,7 +11033,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11023
11033
|
columns: expandedColumns,
|
|
11024
11034
|
dataSource: record.itemDetailList || [],
|
|
11025
11035
|
pagination: false,
|
|
11026
|
-
rowSelection: expandedRowSelection
|
|
11036
|
+
rowSelection: expandedRowSelection,
|
|
11037
|
+
scroll: {
|
|
11038
|
+
x: true
|
|
11039
|
+
}
|
|
11027
11040
|
});
|
|
11028
11041
|
};
|
|
11029
11042
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
@@ -11041,7 +11054,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11041
11054
|
layout: "inline",
|
|
11042
11055
|
form: form,
|
|
11043
11056
|
onFinish: onFinish,
|
|
11044
|
-
onValuesChange: onValuesChange
|
|
11057
|
+
onValuesChange: onValuesChange,
|
|
11058
|
+
initialValues: {
|
|
11059
|
+
dateTimePicker: [hooks(initStartTime, dateFormat), hooks(initEndTime, dateFormat)],
|
|
11060
|
+
code: ''
|
|
11061
|
+
}
|
|
11045
11062
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11046
11063
|
name: "dateTimePicker"
|
|
11047
11064
|
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
@@ -11061,12 +11078,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11061
11078
|
htmlType: "submit"
|
|
11062
11079
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11063
11080
|
onClick: onReset
|
|
11064
|
-
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(
|
|
11065
|
-
|
|
11081
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11082
|
+
style: {
|
|
11083
|
+
marginTop: '16px'
|
|
11084
|
+
}
|
|
11066
11085
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11067
11086
|
rowKey: 'goodNo',
|
|
11068
11087
|
columns: columns$1,
|
|
11069
11088
|
dataSource: goodList,
|
|
11089
|
+
loading: loading,
|
|
11070
11090
|
scroll: {
|
|
11071
11091
|
x: true,
|
|
11072
11092
|
y: 250
|
|
@@ -11175,18 +11195,18 @@ var GoodItem = function GoodItem(props) {
|
|
|
11175
11195
|
align: 'center',
|
|
11176
11196
|
ellipsis: true,
|
|
11177
11197
|
width: 100
|
|
11178
|
-
}, {
|
|
11179
|
-
dataIndex: 'specId',
|
|
11180
|
-
title: "".concat(text, "SKUID"),
|
|
11181
|
-
align: 'center',
|
|
11182
|
-
ellipsis: true,
|
|
11183
|
-
width: 100
|
|
11184
11198
|
}, {
|
|
11185
11199
|
dataIndex: 'goodName',
|
|
11186
11200
|
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11187
11201
|
align: 'center',
|
|
11188
11202
|
ellipsis: true,
|
|
11189
11203
|
width: 250
|
|
11204
|
+
}, {
|
|
11205
|
+
dataIndex: 'specId',
|
|
11206
|
+
title: "".concat(text, "SKUID"),
|
|
11207
|
+
align: 'center',
|
|
11208
|
+
ellipsis: true,
|
|
11209
|
+
width: 100
|
|
11190
11210
|
}, {
|
|
11191
11211
|
dataIndex: 'specNo',
|
|
11192
11212
|
title: "".concat(text, "sku\u7F16\u7801"),
|
|
@@ -11201,7 +11221,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
11201
11221
|
width: 250
|
|
11202
11222
|
}, {
|
|
11203
11223
|
dataIndex: 'orderPrice',
|
|
11204
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11224
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11205
11225
|
align: 'center',
|
|
11206
11226
|
ellipsis: true,
|
|
11207
11227
|
width: 100
|
|
@@ -11240,7 +11260,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
11240
11260
|
width: 70
|
|
11241
11261
|
}, {
|
|
11242
11262
|
dataIndex: 'giftType',
|
|
11243
|
-
title: "\u8D60\u54C1\
|
|
11263
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11244
11264
|
align: 'center',
|
|
11245
11265
|
ellipsis: true,
|
|
11246
11266
|
width: 100,
|
|
@@ -11404,8 +11424,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
11404
11424
|
item.uuid = kmkfUtils.uuid();
|
|
11405
11425
|
item.canDelete = true;
|
|
11406
11426
|
item.num = 1;
|
|
11407
|
-
item.orderPrice =
|
|
11408
|
-
item.sharePrice =
|
|
11427
|
+
item.orderPrice = 0;
|
|
11428
|
+
item.sharePrice = 0;
|
|
11409
11429
|
item.canUpdateNumber = canUpdateNumber;
|
|
11410
11430
|
return item;
|
|
11411
11431
|
});
|
|
@@ -11876,9 +11896,12 @@ var typeMap = {
|
|
|
11876
11896
|
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
11877
11897
|
reissueDeleteGood: 'reissueDeleteGood',
|
|
11878
11898
|
changeShopCode: 'changeShopCode',
|
|
11879
|
-
reissueType: 'reissueType'
|
|
11899
|
+
reissueType: 'reissueType',
|
|
11900
|
+
formatDefaultField: {
|
|
11901
|
+
money: 'money',
|
|
11902
|
+
share: 'share'
|
|
11903
|
+
}
|
|
11880
11904
|
},
|
|
11881
|
-
|
|
11882
11905
|
WDT_REISSUE_GOODS: {
|
|
11883
11906
|
key: 'wdtReissueGoods',
|
|
11884
11907
|
name: '旺店通',
|
|
@@ -11887,12 +11910,15 @@ var typeMap = {
|
|
|
11887
11910
|
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
11888
11911
|
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
11889
11912
|
changeShopCode: 'wdtChangeShopCode',
|
|
11890
|
-
reissueType: 'wdtReissueType'
|
|
11913
|
+
reissueType: 'wdtReissueType',
|
|
11914
|
+
formatDefaultField: {
|
|
11915
|
+
money: 'orderPrice',
|
|
11916
|
+
share: 'sharePrice'
|
|
11917
|
+
}
|
|
11891
11918
|
}
|
|
11892
11919
|
};
|
|
11893
|
-
|
|
11894
11920
|
var BsReissue = function BsReissue(props) {
|
|
11895
|
-
var _typeMap$
|
|
11921
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11896
11922
|
var value = props.value,
|
|
11897
11923
|
onChange = props.onChange,
|
|
11898
11924
|
_props$reasonList = props.reasonList,
|
|
@@ -11911,8 +11937,9 @@ var BsReissue = function BsReissue(props) {
|
|
|
11911
11937
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11912
11938
|
});
|
|
11913
11939
|
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type2 = typeMap[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11914
|
-
|
|
11915
|
-
item.
|
|
11940
|
+
var _typeMap$type3, _typeMap$type4;
|
|
11941
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type3 = typeMap[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.formatDefaultField.money)] = 0;
|
|
11942
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type4 = typeMap[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.formatDefaultField.share)] = 0;
|
|
11916
11943
|
item.canUpdateNumber = true;
|
|
11917
11944
|
return item;
|
|
11918
11945
|
});
|
|
@@ -11920,17 +11947,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11920
11947
|
});
|
|
11921
11948
|
}, []);
|
|
11922
11949
|
React.useEffect(function () {
|
|
11923
|
-
var _typeMap$
|
|
11924
|
-
pubsub__default['default'].subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11925
|
-
var _typeMap$
|
|
11950
|
+
var _typeMap$type5;
|
|
11951
|
+
pubsub__default['default'].subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type5 = typeMap[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.reissueSelectListReturn), function (_, data) {
|
|
11952
|
+
var _typeMap$type6;
|
|
11926
11953
|
// console.log('reissueSelectListReturn', data);
|
|
11927
11954
|
if (disabled) return;
|
|
11928
11955
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11929
11956
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11930
11957
|
});
|
|
11931
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11932
|
-
|
|
11933
|
-
item.
|
|
11958
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type6 = typeMap[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
11959
|
+
var _typeMap$type7, _typeMap$type8;
|
|
11960
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type7 = typeMap[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.formatDefaultField.money)] = 0;
|
|
11961
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type8 = typeMap[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.formatDefaultField.share)] = 0;
|
|
11934
11962
|
item.canUpdateNumber = true;
|
|
11935
11963
|
return item;
|
|
11936
11964
|
});
|
|
@@ -11938,54 +11966,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11938
11966
|
});
|
|
11939
11967
|
}, []);
|
|
11940
11968
|
React.useEffect(function () {
|
|
11941
|
-
var _typeMap$
|
|
11969
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11942
11970
|
valueRef.current = value;
|
|
11943
|
-
pubsub__default['default'].subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11971
|
+
pubsub__default['default'].subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type9 = typeMap[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.reissueDeleteGood), function (_, data) {
|
|
11944
11972
|
if (disabled) return;
|
|
11945
11973
|
if (value) {
|
|
11946
|
-
var _typeMap$
|
|
11974
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11947
11975
|
var newValue = _objectSpread2({}, value);
|
|
11948
|
-
newValue["".concat((_typeMap$
|
|
11976
|
+
newValue["".concat((_typeMap$type10 = typeMap[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type11 = typeMap[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key)].filter(function (item) {
|
|
11949
11977
|
return item.sku !== data;
|
|
11950
11978
|
});
|
|
11951
11979
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11952
11980
|
}
|
|
11953
11981
|
});
|
|
11954
|
-
pubsub__default['default'].subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11982
|
+
pubsub__default['default'].subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type12 = typeMap[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.changeShopCode), function (type, data) {
|
|
11955
11983
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11956
11984
|
shopCode: data.shopCode
|
|
11957
11985
|
}));
|
|
11958
11986
|
});
|
|
11959
11987
|
}, [value, disabled]);
|
|
11960
11988
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
11961
|
-
var _typeMap$
|
|
11989
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11962
11990
|
var newValue = _objectSpread2({}, value);
|
|
11963
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11964
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11991
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
11992
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11965
11993
|
if (['2', '4'].includes(val[0])) {
|
|
11966
11994
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11967
11995
|
valueRef.current = newValue;
|
|
11968
11996
|
}
|
|
11969
|
-
pubsub__default['default'].publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11997
|
+
pubsub__default['default'].publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type15 = typeMap[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.reissueType), {
|
|
11970
11998
|
val: val[0],
|
|
11971
11999
|
goodValue: newValue
|
|
11972
12000
|
});
|
|
11973
12001
|
};
|
|
11974
12002
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
11975
|
-
var _typeMap$
|
|
12003
|
+
var _typeMap$type16;
|
|
11976
12004
|
var newValue = _objectSpread2({}, value);
|
|
11977
|
-
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11978
|
-
|
|
11979
|
-
item.
|
|
12005
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type16 = typeMap[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key)] = (val || []).map(function (item) {
|
|
12006
|
+
var _typeMap$type17, _typeMap$type18;
|
|
12007
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type17 = typeMap[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.money)] = 0;
|
|
12008
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type18 = typeMap[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.share)] = 0;
|
|
11980
12009
|
return item;
|
|
11981
12010
|
});
|
|
11982
12011
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11983
12012
|
};
|
|
11984
12013
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11985
12014
|
var showChangeBtn = React.useMemo(function () {
|
|
11986
|
-
var _value, _typeMap$
|
|
11987
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
11988
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
12015
|
+
var _value, _typeMap$type19;
|
|
12016
|
+
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type19 = typeMap[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName)]) === null || _value === void 0 ? void 0 : _value[0]);
|
|
12017
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11989
12018
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
11990
12019
|
style: {
|
|
11991
12020
|
marginBottom: '8px'
|
|
@@ -11993,7 +12022,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
11993
12022
|
disabled: disabled,
|
|
11994
12023
|
allowClear: false,
|
|
11995
12024
|
options: reasonList,
|
|
11996
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
12025
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type21 = typeMap[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName)],
|
|
11997
12026
|
onChange: function onChange(val) {
|
|
11998
12027
|
return changeTypeHandle(val);
|
|
11999
12028
|
}
|
|
@@ -12005,7 +12034,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
12005
12034
|
canUpdateNumber: showChangeBtn,
|
|
12006
12035
|
showChangeBtn: showChangeBtn,
|
|
12007
12036
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12008
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$
|
|
12037
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type22 = typeMap[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)],
|
|
12009
12038
|
onChange: function onChange(val) {
|
|
12010
12039
|
return changeGoodHandle(val);
|
|
12011
12040
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.23.1-beta.
|
|
3
|
+
"version": "0.23.1-beta.16",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "b25d0a7eff9d6692d21f0f554367111c917fd552"
|
|
68
68
|
}
|