@kmkf-fe-packages/basic-components 0.7.15-alpha.38 → 0.7.15-alpha.40
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 +110 -86
- package/dist/index.js +110 -86
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -0
- package/dist/src/bs/component/GoodsModal.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -9428,7 +9428,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
9428
9428
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
9429
9429
|
});
|
|
9430
9430
|
};
|
|
9431
|
-
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
9431
|
+
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
9432
9432
|
};
|
|
9433
9433
|
|
|
9434
9434
|
var jstGoods = function jstGoods(props) {
|
|
@@ -9442,7 +9442,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
9442
9442
|
_props$type = props.type,
|
|
9443
9443
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
9444
9444
|
_props$showField = props.showField,
|
|
9445
|
-
showField = _props$showField === void 0 ? '
|
|
9445
|
+
showField = _props$showField === void 0 ? '' : _props$showField;
|
|
9446
9446
|
var _useState = useState(0),
|
|
9447
9447
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9448
9448
|
changeIndex = _useState2[0],
|
|
@@ -9619,39 +9619,28 @@ var ItemList = function ItemList(props) {
|
|
|
9619
9619
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
9620
9620
|
};
|
|
9621
9621
|
|
|
9622
|
-
var
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
// },
|
|
9630
|
-
// },
|
|
9631
|
-
{
|
|
9632
|
-
dataIndex: 'code',
|
|
9633
|
-
title: '商品sku编码'
|
|
9622
|
+
var columns = [{
|
|
9623
|
+
dataIndex: '',
|
|
9624
|
+
title: '序号',
|
|
9625
|
+
width: 100,
|
|
9626
|
+
render: function render(value, record, index) {
|
|
9627
|
+
return /*#__PURE__*/React.createElement("span", null, index);
|
|
9628
|
+
}
|
|
9634
9629
|
}, {
|
|
9635
9630
|
dataIndex: 'name',
|
|
9636
|
-
title: '
|
|
9637
|
-
}, {
|
|
9638
|
-
dataIndex: 'simpleName',
|
|
9639
|
-
title: '简称'
|
|
9631
|
+
title: '商品名称'
|
|
9640
9632
|
}, {
|
|
9641
9633
|
dataIndex: 'goodsId',
|
|
9642
9634
|
title: '商品id'
|
|
9643
9635
|
}, {
|
|
9644
|
-
dataIndex: '
|
|
9645
|
-
title: '
|
|
9646
|
-
}, {
|
|
9647
|
-
dataIndex: 'goodsName',
|
|
9648
|
-
title: '商品名称'
|
|
9636
|
+
dataIndex: 'name',
|
|
9637
|
+
title: '商品sku名称'
|
|
9649
9638
|
}, {
|
|
9650
|
-
dataIndex: '
|
|
9651
|
-
title: '
|
|
9639
|
+
dataIndex: 'code',
|
|
9640
|
+
title: '商品编码'
|
|
9652
9641
|
}, {
|
|
9653
|
-
dataIndex: '
|
|
9654
|
-
title: '
|
|
9642
|
+
dataIndex: 'skuCode',
|
|
9643
|
+
title: '商品sku编码'
|
|
9655
9644
|
}];
|
|
9656
9645
|
var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
9657
9646
|
useImperativeHandle(ref, function () {
|
|
@@ -9669,7 +9658,8 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9669
9658
|
var onSubmit = props.onSubmit,
|
|
9670
9659
|
shopId = props.shopId,
|
|
9671
9660
|
shopList = props.shopList,
|
|
9672
|
-
width = props.width
|
|
9661
|
+
width = props.width,
|
|
9662
|
+
shopCode = props.shopCode;
|
|
9673
9663
|
var _useState = useState(false),
|
|
9674
9664
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9675
9665
|
visible = _useState2[0],
|
|
@@ -9786,7 +9776,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9786
9776
|
_context.prev = 0;
|
|
9787
9777
|
setLoading(true);
|
|
9788
9778
|
params = {
|
|
9789
|
-
shopCode:
|
|
9779
|
+
shopCode: shopCode
|
|
9790
9780
|
};
|
|
9791
9781
|
_context.next = 5;
|
|
9792
9782
|
return extendRequest('/qy/gdfw/product/bsListProduct', {
|
|
@@ -9798,18 +9788,19 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9798
9788
|
products = res.data.products;
|
|
9799
9789
|
console.log(products.length);
|
|
9800
9790
|
setAllList(_toConsumableArray(products));
|
|
9791
|
+
setFilterList(_toConsumableArray(products));
|
|
9801
9792
|
setGoodList(products.splice(0, pageSize));
|
|
9802
9793
|
setTotal(products.length);
|
|
9803
|
-
case
|
|
9804
|
-
_context.prev =
|
|
9794
|
+
case 12:
|
|
9795
|
+
_context.prev = 12;
|
|
9805
9796
|
setLoading(false);
|
|
9806
|
-
return _context.finish(
|
|
9807
|
-
case
|
|
9797
|
+
return _context.finish(12);
|
|
9798
|
+
case 15:
|
|
9808
9799
|
case "end":
|
|
9809
9800
|
return _context.stop();
|
|
9810
9801
|
}
|
|
9811
|
-
}, _callee, null, [[0,,
|
|
9812
|
-
})), [
|
|
9802
|
+
}, _callee, null, [[0,, 12, 15]]);
|
|
9803
|
+
})), [shopCode]);
|
|
9813
9804
|
useEffect(function () {
|
|
9814
9805
|
var shopInfo = shopList.find(function (item) {
|
|
9815
9806
|
return shopId === item.shopId || shopId === item.shopName;
|
|
@@ -9835,9 +9826,21 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9835
9826
|
};
|
|
9836
9827
|
var onFinish = function onFinish(value) {
|
|
9837
9828
|
console.log(value);
|
|
9829
|
+
var filterList = allList.filter(function (item) {
|
|
9830
|
+
return Object.keys(value).some(function (key) {
|
|
9831
|
+
return value[key] && item[key].indexOf(value[key]) > -1;
|
|
9832
|
+
});
|
|
9833
|
+
});
|
|
9834
|
+
console.log(filterList);
|
|
9835
|
+
setFilterList(filterList);
|
|
9836
|
+
setTotal(filterList.length);
|
|
9837
|
+
setPageNo(1);
|
|
9838
9838
|
};
|
|
9839
9839
|
var onReset = function onReset() {
|
|
9840
9840
|
form.resetFields();
|
|
9841
|
+
setFilterList(allList);
|
|
9842
|
+
setTotal(allList.length);
|
|
9843
|
+
setPageNo(1);
|
|
9841
9844
|
};
|
|
9842
9845
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
9843
9846
|
title: '选择商品',
|
|
@@ -9855,13 +9858,17 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9855
9858
|
form: form,
|
|
9856
9859
|
onFinish: onFinish
|
|
9857
9860
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
9861
|
+
name: "goodsName"
|
|
9862
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
9863
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"
|
|
9864
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
9858
9865
|
name: "goodsCode"
|
|
9859
9866
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
9860
|
-
placeholder: "\u5546\u54C1\u7F16\u7801"
|
|
9867
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u7801"
|
|
9861
9868
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
9862
|
-
name: "
|
|
9869
|
+
name: "code"
|
|
9863
9870
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
9864
|
-
placeholder: "\u5546\
|
|
9871
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1sku\u7F16\u7801"
|
|
9865
9872
|
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
9866
9873
|
type: "primary",
|
|
9867
9874
|
htmlType: "submit"
|
|
@@ -9873,7 +9880,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9873
9880
|
rowSelection: rowSelection,
|
|
9874
9881
|
columns: columns,
|
|
9875
9882
|
rowKey: 'id',
|
|
9876
|
-
dataSource:
|
|
9883
|
+
dataSource: goodList,
|
|
9877
9884
|
scroll: {
|
|
9878
9885
|
y: 300
|
|
9879
9886
|
},
|
|
@@ -9918,6 +9925,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9918
9925
|
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
9919
9926
|
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
9920
9927
|
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
9928
|
+
shopCode = props.shopCode,
|
|
9921
9929
|
onSelect = props.onSelect,
|
|
9922
9930
|
onDelete = props.onDelete;
|
|
9923
9931
|
var refModal = useRef();
|
|
@@ -10044,17 +10052,19 @@ var GoodItem = function GoodItem(props) {
|
|
|
10044
10052
|
}, [showHeader, value, disabled]);
|
|
10045
10053
|
var onSubmit = function onSubmit(list) {
|
|
10046
10054
|
var newList = list.map(function (item) {
|
|
10047
|
-
var
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10055
|
+
var id = item.id,
|
|
10056
|
+
goodsName = item.goodsName,
|
|
10057
|
+
goodsId = item.goodsId,
|
|
10058
|
+
name = item.name,
|
|
10059
|
+
code = item.code,
|
|
10060
|
+
skuCode = item.skuCode;
|
|
10051
10061
|
return {
|
|
10052
|
-
id:
|
|
10053
|
-
pic:
|
|
10054
|
-
name:
|
|
10055
|
-
code:
|
|
10056
|
-
sku:
|
|
10057
|
-
money:
|
|
10062
|
+
id: goodsId,
|
|
10063
|
+
pic: '',
|
|
10064
|
+
name: goodsName,
|
|
10065
|
+
code: code,
|
|
10066
|
+
sku: skuCode,
|
|
10067
|
+
money: '',
|
|
10058
10068
|
share: '',
|
|
10059
10069
|
number: 1,
|
|
10060
10070
|
type: '',
|
|
@@ -10110,13 +10120,15 @@ var GoodItem = function GoodItem(props) {
|
|
|
10110
10120
|
width: width,
|
|
10111
10121
|
shopList: shopList,
|
|
10112
10122
|
shopId: shopId,
|
|
10113
|
-
maxLength: maxLength
|
|
10123
|
+
maxLength: maxLength,
|
|
10124
|
+
shopCode: shopCode
|
|
10114
10125
|
}));
|
|
10115
10126
|
};
|
|
10116
10127
|
|
|
10117
10128
|
var BsGoods = function BsGoods(props) {
|
|
10118
10129
|
var value = props.value,
|
|
10119
|
-
disabled = props.disabled
|
|
10130
|
+
disabled = props.disabled,
|
|
10131
|
+
onChange = props.onChange;
|
|
10120
10132
|
var _useState = useState(false),
|
|
10121
10133
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10122
10134
|
tableSelect = _useState2[0],
|
|
@@ -10132,17 +10144,17 @@ var BsGoods = function BsGoods(props) {
|
|
|
10132
10144
|
var reissueRef = useRef();
|
|
10133
10145
|
useEffect(function () {
|
|
10134
10146
|
ref.current = pubsub.subscribeOnce('type', function (type, val) {
|
|
10135
|
-
|
|
10147
|
+
var _value$bsGoods;
|
|
10136
10148
|
if (disabled) return;
|
|
10137
10149
|
setWithInfo({
|
|
10138
10150
|
type: type,
|
|
10139
10151
|
val: val
|
|
10140
10152
|
});
|
|
10141
10153
|
setTableSelect(['2', '4'].includes(val));
|
|
10142
|
-
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
10154
|
+
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods = value.bsGoods) === null || _value$bsGoods === void 0 ? void 0 : _value$bsGoods.length)) {
|
|
10143
10155
|
pubsub.publish('selectList', {
|
|
10144
10156
|
type: val,
|
|
10145
|
-
list:
|
|
10157
|
+
list: ((value === null || value === void 0 ? void 0 : value.bsGoods) || []).map(function (item) {
|
|
10146
10158
|
item.canDelete = false;
|
|
10147
10159
|
return item;
|
|
10148
10160
|
})
|
|
@@ -10151,17 +10163,17 @@ var BsGoods = function BsGoods(props) {
|
|
|
10151
10163
|
});
|
|
10152
10164
|
//补发
|
|
10153
10165
|
reissueRef.current = pubsub.subscribeOnce('reissueType', function (type, val) {
|
|
10166
|
+
var _value$bsGoods2;
|
|
10154
10167
|
if (disabled) return;
|
|
10155
|
-
console.log('reissueType', type, val, value);
|
|
10156
10168
|
setWithInfo({
|
|
10157
10169
|
type: type,
|
|
10158
10170
|
val: val
|
|
10159
10171
|
});
|
|
10160
10172
|
setTableSelect(['2', '4'].includes(val));
|
|
10161
|
-
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
10173
|
+
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.length)) {
|
|
10162
10174
|
pubsub.publish('reissueSelectList', {
|
|
10163
10175
|
type: val,
|
|
10164
|
-
list: (value || []).map(function (item) {
|
|
10176
|
+
list: ((value === null || value === void 0 ? void 0 : value.bsGoods) || []).map(function (item) {
|
|
10165
10177
|
item.canDelete = false;
|
|
10166
10178
|
return item;
|
|
10167
10179
|
})
|
|
@@ -10190,16 +10202,26 @@ var BsGoods = function BsGoods(props) {
|
|
|
10190
10202
|
pubsub.publish('deleteGood', deleteId);
|
|
10191
10203
|
pubsub.publish('reissueDeleteGood', deleteId);
|
|
10192
10204
|
};
|
|
10205
|
+
var changeHandle = function changeHandle(list) {
|
|
10206
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10207
|
+
bsGoods: list
|
|
10208
|
+
}));
|
|
10209
|
+
};
|
|
10193
10210
|
return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
10194
|
-
key: 'bsGoods'
|
|
10195
|
-
disabled: disabled
|
|
10211
|
+
key: 'bsGoods'
|
|
10196
10212
|
}, props), {}, {
|
|
10213
|
+
disabled: disabled,
|
|
10214
|
+
value: value === null || value === void 0 ? void 0 : value.bsGoods,
|
|
10215
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10197
10216
|
tableSelect: tableSelect,
|
|
10198
10217
|
onSelect: function onSelect(list) {
|
|
10199
10218
|
return _onSelect(list);
|
|
10200
10219
|
},
|
|
10201
10220
|
onDelete: function onDelete(item) {
|
|
10202
10221
|
return _onDelete(item);
|
|
10222
|
+
},
|
|
10223
|
+
onChange: function onChange(val) {
|
|
10224
|
+
return changeHandle(val);
|
|
10203
10225
|
}
|
|
10204
10226
|
}));
|
|
10205
10227
|
};
|
|
@@ -10214,16 +10236,6 @@ var BsExchange = function BsExchange(props) {
|
|
|
10214
10236
|
disabled = props.disabled,
|
|
10215
10237
|
other = _objectWithoutProperties(props, _excluded$b);
|
|
10216
10238
|
useEffect(function () {
|
|
10217
|
-
pubsub.subscribeOnce('selectList', function (_, data) {
|
|
10218
|
-
if (disabled) return;
|
|
10219
|
-
if (value) {
|
|
10220
|
-
var newData = cloneDeep(data);
|
|
10221
|
-
console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
|
|
10222
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10223
|
-
bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
|
|
10224
|
-
}));
|
|
10225
|
-
}
|
|
10226
|
-
});
|
|
10227
10239
|
pubsub.subscribeOnce('deleteGood', function (_, data) {
|
|
10228
10240
|
if (disabled) return;
|
|
10229
10241
|
if (value) {
|
|
@@ -10295,6 +10307,15 @@ var BsExchange = function BsExchange(props) {
|
|
|
10295
10307
|
newValue.bsExchangeGiftGoods = [];
|
|
10296
10308
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10297
10309
|
pubsub.publish('type', val[0]);
|
|
10310
|
+
pubsub.subscribeOnce('selectList', function (_, data) {
|
|
10311
|
+
if (disabled) return;
|
|
10312
|
+
if (newValue) {
|
|
10313
|
+
var newData = cloneDeep(data);
|
|
10314
|
+
onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10315
|
+
bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), newValue)
|
|
10316
|
+
}));
|
|
10317
|
+
}
|
|
10318
|
+
});
|
|
10298
10319
|
};
|
|
10299
10320
|
var changeHandle = function changeHandle(val, key) {
|
|
10300
10321
|
var newValue = _objectSpread2({}, value);
|
|
@@ -10355,6 +10376,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10355
10376
|
disabled: disabled,
|
|
10356
10377
|
showChangeBtn: false,
|
|
10357
10378
|
value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
|
|
10379
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10358
10380
|
onChange: function onChange(val) {
|
|
10359
10381
|
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
10360
10382
|
}
|
|
@@ -10364,6 +10386,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10364
10386
|
}, other), {}, {
|
|
10365
10387
|
disabled: disabled,
|
|
10366
10388
|
showChangeBtn: showChangeBtn,
|
|
10389
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10367
10390
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
|
|
10368
10391
|
onChange: function onChange(val) {
|
|
10369
10392
|
return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
|
|
@@ -10375,6 +10398,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10375
10398
|
showChangeBtn: showChangeBtn,
|
|
10376
10399
|
otherOperations: copyGoods(index),
|
|
10377
10400
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
10401
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10378
10402
|
onChange: function onChange(val) {
|
|
10379
10403
|
return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
|
|
10380
10404
|
}
|
|
@@ -10400,20 +10424,6 @@ var BsReissue = function BsReissue(props) {
|
|
|
10400
10424
|
disabled = props.disabled,
|
|
10401
10425
|
other = _objectWithoutProperties(props, _excluded$c);
|
|
10402
10426
|
useEffect(function () {
|
|
10403
|
-
pubsub.subscribeOnce('reissueSelectList', function (_, data) {
|
|
10404
|
-
if (disabled) return;
|
|
10405
|
-
console.log(data, value);
|
|
10406
|
-
if (value) {
|
|
10407
|
-
var newData = cloneDeep(data);
|
|
10408
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10409
|
-
bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
|
|
10410
|
-
item.money = 0;
|
|
10411
|
-
item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
|
|
10412
|
-
return item;
|
|
10413
|
-
})
|
|
10414
|
-
}));
|
|
10415
|
-
}
|
|
10416
|
-
});
|
|
10417
10427
|
pubsub.subscribeOnce('reissueDeleteGood', function (_, data) {
|
|
10418
10428
|
if (disabled) return;
|
|
10419
10429
|
if (value) {
|
|
@@ -10436,10 +10446,23 @@ var BsReissue = function BsReissue(props) {
|
|
|
10436
10446
|
newValue[key] = val;
|
|
10437
10447
|
if (key === 'bsReissueType') {
|
|
10438
10448
|
newValue.bsReissueGoods = [];
|
|
10449
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
10439
10450
|
}
|
|
10440
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
10441
10451
|
if (key === 'bsReissueType') {
|
|
10442
10452
|
pubsub.publish('reissueType', val[0]);
|
|
10453
|
+
pubsub.subscribeOnce('reissueSelectList', function (_, data) {
|
|
10454
|
+
if (disabled) return;
|
|
10455
|
+
if (value) {
|
|
10456
|
+
var newData = cloneDeep(data);
|
|
10457
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10458
|
+
bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
|
|
10459
|
+
item.money = 0;
|
|
10460
|
+
item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
|
|
10461
|
+
return item;
|
|
10462
|
+
})
|
|
10463
|
+
}));
|
|
10464
|
+
}
|
|
10465
|
+
});
|
|
10443
10466
|
}
|
|
10444
10467
|
};
|
|
10445
10468
|
//显示选择商品按钮 原单换不显示选择商品
|
|
@@ -10464,6 +10487,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10464
10487
|
disabled: disabled,
|
|
10465
10488
|
canUpdateNumber: showChangeBtn,
|
|
10466
10489
|
showChangeBtn: showChangeBtn,
|
|
10490
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10467
10491
|
value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
|
|
10468
10492
|
onChange: function onChange(val) {
|
|
10469
10493
|
return changeHandle(val, 'bsReissueGoods');
|
|
@@ -10474,7 +10498,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10474
10498
|
var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
10475
10499
|
styleInject(css_248z$9);
|
|
10476
10500
|
|
|
10477
|
-
var TabPane$
|
|
10501
|
+
var TabPane$1 = Tabs.TabPane;
|
|
10478
10502
|
var Option$2 = Select.Option;
|
|
10479
10503
|
var Search$1 = Input.Search;
|
|
10480
10504
|
var GoodsModal$3 = function GoodsModal(props) {
|
|
@@ -10790,7 +10814,7 @@ var GoodsModal$3 = function GoodsModal(props) {
|
|
|
10790
10814
|
}));
|
|
10791
10815
|
}
|
|
10792
10816
|
}, tabs.map(function (tab) {
|
|
10793
|
-
return /*#__PURE__*/React.createElement(TabPane$
|
|
10817
|
+
return /*#__PURE__*/React.createElement(TabPane$1, {
|
|
10794
10818
|
tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
|
|
10795
10819
|
key: tab.key
|
|
10796
10820
|
});
|
package/dist/index.js
CHANGED
|
@@ -9439,7 +9439,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
9439
9439
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
9440
9440
|
});
|
|
9441
9441
|
};
|
|
9442
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
9442
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
9443
9443
|
};
|
|
9444
9444
|
|
|
9445
9445
|
var jstGoods = function jstGoods(props) {
|
|
@@ -9453,7 +9453,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
9453
9453
|
_props$type = props.type,
|
|
9454
9454
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
9455
9455
|
_props$showField = props.showField,
|
|
9456
|
-
showField = _props$showField === void 0 ? '
|
|
9456
|
+
showField = _props$showField === void 0 ? '' : _props$showField;
|
|
9457
9457
|
var _useState = React.useState(0),
|
|
9458
9458
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9459
9459
|
changeIndex = _useState2[0],
|
|
@@ -9630,39 +9630,28 @@ var ItemList = function ItemList(props) {
|
|
|
9630
9630
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
9631
9631
|
};
|
|
9632
9632
|
|
|
9633
|
-
var
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
// },
|
|
9641
|
-
// },
|
|
9642
|
-
{
|
|
9643
|
-
dataIndex: 'code',
|
|
9644
|
-
title: '商品sku编码'
|
|
9633
|
+
var columns = [{
|
|
9634
|
+
dataIndex: '',
|
|
9635
|
+
title: '序号',
|
|
9636
|
+
width: 100,
|
|
9637
|
+
render: function render(value, record, index) {
|
|
9638
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, index);
|
|
9639
|
+
}
|
|
9645
9640
|
}, {
|
|
9646
9641
|
dataIndex: 'name',
|
|
9647
|
-
title: '
|
|
9648
|
-
}, {
|
|
9649
|
-
dataIndex: 'simpleName',
|
|
9650
|
-
title: '简称'
|
|
9642
|
+
title: '商品名称'
|
|
9651
9643
|
}, {
|
|
9652
9644
|
dataIndex: 'goodsId',
|
|
9653
9645
|
title: '商品id'
|
|
9654
9646
|
}, {
|
|
9655
|
-
dataIndex: '
|
|
9656
|
-
title: '
|
|
9657
|
-
}, {
|
|
9658
|
-
dataIndex: 'goodsName',
|
|
9659
|
-
title: '商品名称'
|
|
9647
|
+
dataIndex: 'name',
|
|
9648
|
+
title: '商品sku名称'
|
|
9660
9649
|
}, {
|
|
9661
|
-
dataIndex: '
|
|
9662
|
-
title: '
|
|
9650
|
+
dataIndex: 'code',
|
|
9651
|
+
title: '商品编码'
|
|
9663
9652
|
}, {
|
|
9664
|
-
dataIndex: '
|
|
9665
|
-
title: '
|
|
9653
|
+
dataIndex: 'skuCode',
|
|
9654
|
+
title: '商品sku编码'
|
|
9666
9655
|
}];
|
|
9667
9656
|
var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
9668
9657
|
React.useImperativeHandle(ref, function () {
|
|
@@ -9680,7 +9669,8 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9680
9669
|
var onSubmit = props.onSubmit,
|
|
9681
9670
|
shopId = props.shopId,
|
|
9682
9671
|
shopList = props.shopList,
|
|
9683
|
-
width = props.width
|
|
9672
|
+
width = props.width,
|
|
9673
|
+
shopCode = props.shopCode;
|
|
9684
9674
|
var _useState = React.useState(false),
|
|
9685
9675
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9686
9676
|
visible = _useState2[0],
|
|
@@ -9797,7 +9787,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9797
9787
|
_context.prev = 0;
|
|
9798
9788
|
setLoading(true);
|
|
9799
9789
|
params = {
|
|
9800
|
-
shopCode:
|
|
9790
|
+
shopCode: shopCode
|
|
9801
9791
|
};
|
|
9802
9792
|
_context.next = 5;
|
|
9803
9793
|
return extendRequest('/qy/gdfw/product/bsListProduct', {
|
|
@@ -9809,18 +9799,19 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9809
9799
|
products = res.data.products;
|
|
9810
9800
|
console.log(products.length);
|
|
9811
9801
|
setAllList(_toConsumableArray(products));
|
|
9802
|
+
setFilterList(_toConsumableArray(products));
|
|
9812
9803
|
setGoodList(products.splice(0, pageSize));
|
|
9813
9804
|
setTotal(products.length);
|
|
9814
|
-
case
|
|
9815
|
-
_context.prev =
|
|
9805
|
+
case 12:
|
|
9806
|
+
_context.prev = 12;
|
|
9816
9807
|
setLoading(false);
|
|
9817
|
-
return _context.finish(
|
|
9818
|
-
case
|
|
9808
|
+
return _context.finish(12);
|
|
9809
|
+
case 15:
|
|
9819
9810
|
case "end":
|
|
9820
9811
|
return _context.stop();
|
|
9821
9812
|
}
|
|
9822
|
-
}, _callee, null, [[0,,
|
|
9823
|
-
})), [
|
|
9813
|
+
}, _callee, null, [[0,, 12, 15]]);
|
|
9814
|
+
})), [shopCode]);
|
|
9824
9815
|
React.useEffect(function () {
|
|
9825
9816
|
var shopInfo = shopList.find(function (item) {
|
|
9826
9817
|
return shopId === item.shopId || shopId === item.shopName;
|
|
@@ -9846,9 +9837,21 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9846
9837
|
};
|
|
9847
9838
|
var onFinish = function onFinish(value) {
|
|
9848
9839
|
console.log(value);
|
|
9840
|
+
var filterList = allList.filter(function (item) {
|
|
9841
|
+
return Object.keys(value).some(function (key) {
|
|
9842
|
+
return value[key] && item[key].indexOf(value[key]) > -1;
|
|
9843
|
+
});
|
|
9844
|
+
});
|
|
9845
|
+
console.log(filterList);
|
|
9846
|
+
setFilterList(filterList);
|
|
9847
|
+
setTotal(filterList.length);
|
|
9848
|
+
setPageNo(1);
|
|
9849
9849
|
};
|
|
9850
9850
|
var onReset = function onReset() {
|
|
9851
9851
|
form.resetFields();
|
|
9852
|
+
setFilterList(allList);
|
|
9853
|
+
setTotal(allList.length);
|
|
9854
|
+
setPageNo(1);
|
|
9852
9855
|
};
|
|
9853
9856
|
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9854
9857
|
title: '选择商品',
|
|
@@ -9866,13 +9869,17 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9866
9869
|
form: form,
|
|
9867
9870
|
onFinish: onFinish
|
|
9868
9871
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
9872
|
+
name: "goodsName"
|
|
9873
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9874
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"
|
|
9875
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
9869
9876
|
name: "goodsCode"
|
|
9870
9877
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9871
|
-
placeholder: "\u5546\u54C1\u7F16\u7801"
|
|
9878
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u7801"
|
|
9872
9879
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
9873
|
-
name: "
|
|
9880
|
+
name: "code"
|
|
9874
9881
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9875
|
-
placeholder: "\u5546\
|
|
9882
|
+
placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1sku\u7F16\u7801"
|
|
9876
9883
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
9877
9884
|
type: "primary",
|
|
9878
9885
|
htmlType: "submit"
|
|
@@ -9884,7 +9891,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
9884
9891
|
rowSelection: rowSelection,
|
|
9885
9892
|
columns: columns,
|
|
9886
9893
|
rowKey: 'id',
|
|
9887
|
-
dataSource:
|
|
9894
|
+
dataSource: goodList,
|
|
9888
9895
|
scroll: {
|
|
9889
9896
|
y: 300
|
|
9890
9897
|
},
|
|
@@ -9929,6 +9936,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9929
9936
|
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
9930
9937
|
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
9931
9938
|
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
9939
|
+
shopCode = props.shopCode,
|
|
9932
9940
|
onSelect = props.onSelect,
|
|
9933
9941
|
onDelete = props.onDelete;
|
|
9934
9942
|
var refModal = React.useRef();
|
|
@@ -10055,17 +10063,19 @@ var GoodItem = function GoodItem(props) {
|
|
|
10055
10063
|
}, [showHeader, value, disabled]);
|
|
10056
10064
|
var onSubmit = function onSubmit(list) {
|
|
10057
10065
|
var newList = list.map(function (item) {
|
|
10058
|
-
var
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10066
|
+
var id = item.id,
|
|
10067
|
+
goodsName = item.goodsName,
|
|
10068
|
+
goodsId = item.goodsId,
|
|
10069
|
+
name = item.name,
|
|
10070
|
+
code = item.code,
|
|
10071
|
+
skuCode = item.skuCode;
|
|
10062
10072
|
return {
|
|
10063
|
-
id:
|
|
10064
|
-
pic:
|
|
10065
|
-
name:
|
|
10066
|
-
code:
|
|
10067
|
-
sku:
|
|
10068
|
-
money:
|
|
10073
|
+
id: goodsId,
|
|
10074
|
+
pic: '',
|
|
10075
|
+
name: goodsName,
|
|
10076
|
+
code: code,
|
|
10077
|
+
sku: skuCode,
|
|
10078
|
+
money: '',
|
|
10069
10079
|
share: '',
|
|
10070
10080
|
number: 1,
|
|
10071
10081
|
type: '',
|
|
@@ -10121,13 +10131,15 @@ var GoodItem = function GoodItem(props) {
|
|
|
10121
10131
|
width: width,
|
|
10122
10132
|
shopList: shopList,
|
|
10123
10133
|
shopId: shopId,
|
|
10124
|
-
maxLength: maxLength
|
|
10134
|
+
maxLength: maxLength,
|
|
10135
|
+
shopCode: shopCode
|
|
10125
10136
|
}));
|
|
10126
10137
|
};
|
|
10127
10138
|
|
|
10128
10139
|
var BsGoods = function BsGoods(props) {
|
|
10129
10140
|
var value = props.value,
|
|
10130
|
-
disabled = props.disabled
|
|
10141
|
+
disabled = props.disabled,
|
|
10142
|
+
onChange = props.onChange;
|
|
10131
10143
|
var _useState = React.useState(false),
|
|
10132
10144
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10133
10145
|
tableSelect = _useState2[0],
|
|
@@ -10143,17 +10155,17 @@ var BsGoods = function BsGoods(props) {
|
|
|
10143
10155
|
var reissueRef = React.useRef();
|
|
10144
10156
|
React.useEffect(function () {
|
|
10145
10157
|
ref.current = pubsub__default['default'].subscribeOnce('type', function (type, val) {
|
|
10146
|
-
|
|
10158
|
+
var _value$bsGoods;
|
|
10147
10159
|
if (disabled) return;
|
|
10148
10160
|
setWithInfo({
|
|
10149
10161
|
type: type,
|
|
10150
10162
|
val: val
|
|
10151
10163
|
});
|
|
10152
10164
|
setTableSelect(['2', '4'].includes(val));
|
|
10153
|
-
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
10165
|
+
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods = value.bsGoods) === null || _value$bsGoods === void 0 ? void 0 : _value$bsGoods.length)) {
|
|
10154
10166
|
pubsub__default['default'].publish('selectList', {
|
|
10155
10167
|
type: val,
|
|
10156
|
-
list:
|
|
10168
|
+
list: ((value === null || value === void 0 ? void 0 : value.bsGoods) || []).map(function (item) {
|
|
10157
10169
|
item.canDelete = false;
|
|
10158
10170
|
return item;
|
|
10159
10171
|
})
|
|
@@ -10162,17 +10174,17 @@ var BsGoods = function BsGoods(props) {
|
|
|
10162
10174
|
});
|
|
10163
10175
|
//补发
|
|
10164
10176
|
reissueRef.current = pubsub__default['default'].subscribeOnce('reissueType', function (type, val) {
|
|
10177
|
+
var _value$bsGoods2;
|
|
10165
10178
|
if (disabled) return;
|
|
10166
|
-
console.log('reissueType', type, val, value);
|
|
10167
10179
|
setWithInfo({
|
|
10168
10180
|
type: type,
|
|
10169
10181
|
val: val
|
|
10170
10182
|
});
|
|
10171
10183
|
setTableSelect(['2', '4'].includes(val));
|
|
10172
|
-
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
10184
|
+
if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.length)) {
|
|
10173
10185
|
pubsub__default['default'].publish('reissueSelectList', {
|
|
10174
10186
|
type: val,
|
|
10175
|
-
list: (value || []).map(function (item) {
|
|
10187
|
+
list: ((value === null || value === void 0 ? void 0 : value.bsGoods) || []).map(function (item) {
|
|
10176
10188
|
item.canDelete = false;
|
|
10177
10189
|
return item;
|
|
10178
10190
|
})
|
|
@@ -10201,16 +10213,26 @@ var BsGoods = function BsGoods(props) {
|
|
|
10201
10213
|
pubsub__default['default'].publish('deleteGood', deleteId);
|
|
10202
10214
|
pubsub__default['default'].publish('reissueDeleteGood', deleteId);
|
|
10203
10215
|
};
|
|
10216
|
+
var changeHandle = function changeHandle(list) {
|
|
10217
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10218
|
+
bsGoods: list
|
|
10219
|
+
}));
|
|
10220
|
+
};
|
|
10204
10221
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
10205
|
-
key: 'bsGoods'
|
|
10206
|
-
disabled: disabled
|
|
10222
|
+
key: 'bsGoods'
|
|
10207
10223
|
}, props), {}, {
|
|
10224
|
+
disabled: disabled,
|
|
10225
|
+
value: value === null || value === void 0 ? void 0 : value.bsGoods,
|
|
10226
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10208
10227
|
tableSelect: tableSelect,
|
|
10209
10228
|
onSelect: function onSelect(list) {
|
|
10210
10229
|
return _onSelect(list);
|
|
10211
10230
|
},
|
|
10212
10231
|
onDelete: function onDelete(item) {
|
|
10213
10232
|
return _onDelete(item);
|
|
10233
|
+
},
|
|
10234
|
+
onChange: function onChange(val) {
|
|
10235
|
+
return changeHandle(val);
|
|
10214
10236
|
}
|
|
10215
10237
|
}));
|
|
10216
10238
|
};
|
|
@@ -10225,16 +10247,6 @@ var BsExchange = function BsExchange(props) {
|
|
|
10225
10247
|
disabled = props.disabled,
|
|
10226
10248
|
other = _objectWithoutProperties(props, _excluded$b);
|
|
10227
10249
|
React.useEffect(function () {
|
|
10228
|
-
pubsub__default['default'].subscribeOnce('selectList', function (_, data) {
|
|
10229
|
-
if (disabled) return;
|
|
10230
|
-
if (value) {
|
|
10231
|
-
var newData = lodash.cloneDeep(data);
|
|
10232
|
-
console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
|
|
10233
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10234
|
-
bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
|
|
10235
|
-
}));
|
|
10236
|
-
}
|
|
10237
|
-
});
|
|
10238
10250
|
pubsub__default['default'].subscribeOnce('deleteGood', function (_, data) {
|
|
10239
10251
|
if (disabled) return;
|
|
10240
10252
|
if (value) {
|
|
@@ -10306,6 +10318,15 @@ var BsExchange = function BsExchange(props) {
|
|
|
10306
10318
|
newValue.bsExchangeGiftGoods = [];
|
|
10307
10319
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10308
10320
|
pubsub__default['default'].publish('type', val[0]);
|
|
10321
|
+
pubsub__default['default'].subscribeOnce('selectList', function (_, data) {
|
|
10322
|
+
if (disabled) return;
|
|
10323
|
+
if (newValue) {
|
|
10324
|
+
var newData = lodash.cloneDeep(data);
|
|
10325
|
+
onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10326
|
+
bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), newValue)
|
|
10327
|
+
}));
|
|
10328
|
+
}
|
|
10329
|
+
});
|
|
10309
10330
|
};
|
|
10310
10331
|
var changeHandle = function changeHandle(val, key) {
|
|
10311
10332
|
var newValue = _objectSpread2({}, value);
|
|
@@ -10366,6 +10387,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10366
10387
|
disabled: disabled,
|
|
10367
10388
|
showChangeBtn: false,
|
|
10368
10389
|
value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
|
|
10390
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10369
10391
|
onChange: function onChange(val) {
|
|
10370
10392
|
return changeHandle(val, 'bsExchangeReturnGoods');
|
|
10371
10393
|
}
|
|
@@ -10375,6 +10397,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10375
10397
|
}, other), {}, {
|
|
10376
10398
|
disabled: disabled,
|
|
10377
10399
|
showChangeBtn: showChangeBtn,
|
|
10400
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10378
10401
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
|
|
10379
10402
|
onChange: function onChange(val) {
|
|
10380
10403
|
return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
|
|
@@ -10386,6 +10409,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
10386
10409
|
showChangeBtn: showChangeBtn,
|
|
10387
10410
|
otherOperations: copyGoods(index),
|
|
10388
10411
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
10412
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10389
10413
|
onChange: function onChange(val) {
|
|
10390
10414
|
return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
|
|
10391
10415
|
}
|
|
@@ -10411,20 +10435,6 @@ var BsReissue = function BsReissue(props) {
|
|
|
10411
10435
|
disabled = props.disabled,
|
|
10412
10436
|
other = _objectWithoutProperties(props, _excluded$c);
|
|
10413
10437
|
React.useEffect(function () {
|
|
10414
|
-
pubsub__default['default'].subscribeOnce('reissueSelectList', function (_, data) {
|
|
10415
|
-
if (disabled) return;
|
|
10416
|
-
console.log(data, value);
|
|
10417
|
-
if (value) {
|
|
10418
|
-
var newData = lodash.cloneDeep(data);
|
|
10419
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
10420
|
-
bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
|
|
10421
|
-
item.money = 0;
|
|
10422
|
-
item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
|
|
10423
|
-
return item;
|
|
10424
|
-
})
|
|
10425
|
-
}));
|
|
10426
|
-
}
|
|
10427
|
-
});
|
|
10428
10438
|
pubsub__default['default'].subscribeOnce('reissueDeleteGood', function (_, data) {
|
|
10429
10439
|
if (disabled) return;
|
|
10430
10440
|
if (value) {
|
|
@@ -10447,10 +10457,23 @@ var BsReissue = function BsReissue(props) {
|
|
|
10447
10457
|
newValue[key] = val;
|
|
10448
10458
|
if (key === 'bsReissueType') {
|
|
10449
10459
|
newValue.bsReissueGoods = [];
|
|
10460
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
10450
10461
|
}
|
|
10451
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
|
|
10452
10462
|
if (key === 'bsReissueType') {
|
|
10453
10463
|
pubsub__default['default'].publish('reissueType', val[0]);
|
|
10464
|
+
pubsub__default['default'].subscribeOnce('reissueSelectList', function (_, data) {
|
|
10465
|
+
if (disabled) return;
|
|
10466
|
+
if (value) {
|
|
10467
|
+
var newData = lodash.cloneDeep(data);
|
|
10468
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10469
|
+
bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
|
|
10470
|
+
item.money = 0;
|
|
10471
|
+
item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
|
|
10472
|
+
return item;
|
|
10473
|
+
})
|
|
10474
|
+
}));
|
|
10475
|
+
}
|
|
10476
|
+
});
|
|
10454
10477
|
}
|
|
10455
10478
|
};
|
|
10456
10479
|
//显示选择商品按钮 原单换不显示选择商品
|
|
@@ -10475,6 +10498,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10475
10498
|
disabled: disabled,
|
|
10476
10499
|
canUpdateNumber: showChangeBtn,
|
|
10477
10500
|
showChangeBtn: showChangeBtn,
|
|
10501
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
10478
10502
|
value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
|
|
10479
10503
|
onChange: function onChange(val) {
|
|
10480
10504
|
return changeHandle(val, 'bsReissueGoods');
|
|
@@ -10485,7 +10509,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
10485
10509
|
var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
10486
10510
|
styleInject(css_248z$9);
|
|
10487
10511
|
|
|
10488
|
-
var TabPane$
|
|
10512
|
+
var TabPane$1 = antd.Tabs.TabPane;
|
|
10489
10513
|
var Option$2 = antd.Select.Option;
|
|
10490
10514
|
var Search$1 = antd.Input.Search;
|
|
10491
10515
|
var GoodsModal$3 = function GoodsModal(props) {
|
|
@@ -10801,7 +10825,7 @@ var GoodsModal$3 = function GoodsModal(props) {
|
|
|
10801
10825
|
}));
|
|
10802
10826
|
}
|
|
10803
10827
|
}, tabs.map(function (tab) {
|
|
10804
|
-
return /*#__PURE__*/React__default['default'].createElement(TabPane$
|
|
10828
|
+
return /*#__PURE__*/React__default['default'].createElement(TabPane$1, {
|
|
10805
10829
|
tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
|
|
10806
10830
|
key: tab.key
|
|
10807
10831
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.40",
|
|
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": "^0.7.15-alpha.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.40",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"pubsub-js": "^1.9.4",
|
|
26
26
|
"umi-request": "^1.4.0"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "57c6d523ffca6dc56f9593cdd18e89a142971318"
|
|
62
62
|
}
|