@kmkf-fe-packages/basic-components 2.0.54-beta.7 → 2.0.54-beta.72
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 +1778 -447
- package/dist/index.js +1777 -443
- package/dist/src/apaas/ApaasAddress/index.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +5 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/model/Columns/Erp/km.d.ts +27 -0
- package/dist/src/bs/component/model/Columns/useGetColumns.d.ts +2 -2
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +9 -0
- package/dist/src/common/CommonSystemOrder/index.d.ts +2 -1
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +1 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/km/KmVideo/index.d.ts +20 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7734,7 +7734,8 @@ var Province = function Province(props) {
|
|
|
7734
7734
|
workOrder: kmkfUtils.AddressData.getInstance(),
|
|
7735
7735
|
bs: kmkfUtils.BsAddressData.getInstance(),
|
|
7736
7736
|
wdt: kmkfUtils.WdtAddressData.getInstance(),
|
|
7737
|
-
gy: kmkfUtils.GyAddressData.getInstance()
|
|
7737
|
+
gy: kmkfUtils.GyAddressData.getInstance(),
|
|
7738
|
+
km: kmkfUtils.AddressData.getInstance()
|
|
7738
7739
|
};
|
|
7739
7740
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7740
7741
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7840,6 +7841,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7840
7841
|
bs: kmkfUtils.BsAddressData,
|
|
7841
7842
|
wdt: kmkfUtils.WdtAddressData,
|
|
7842
7843
|
gy: kmkfUtils.GyAddressData,
|
|
7844
|
+
km: kmkfUtils.AddressData,
|
|
7843
7845
|
workOrder: kmkfUtils.AddressData
|
|
7844
7846
|
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7845
7847
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -8143,17 +8145,16 @@ var SubForm = function SubForm(props) {
|
|
|
8143
8145
|
return [{
|
|
8144
8146
|
dataIndex: 'index',
|
|
8145
8147
|
title: '序号',
|
|
8148
|
+
fixed: 'left',
|
|
8149
|
+
width: 20,
|
|
8146
8150
|
render: function render(val, record, index) {
|
|
8147
|
-
return
|
|
8148
|
-
style: {
|
|
8149
|
-
width: 25
|
|
8150
|
-
}
|
|
8151
|
-
}, index + 1);
|
|
8151
|
+
return index + 1;
|
|
8152
8152
|
}
|
|
8153
8153
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8154
8154
|
return {
|
|
8155
8155
|
dataIndex: t.key,
|
|
8156
|
-
title: t.name
|
|
8156
|
+
title: t.name,
|
|
8157
|
+
width: 90
|
|
8157
8158
|
};
|
|
8158
8159
|
})));
|
|
8159
8160
|
}, [newTableHeader]);
|
|
@@ -8341,7 +8342,7 @@ var SubForm = function SubForm(props) {
|
|
|
8341
8342
|
onScrollCapture: onScrollCapture,
|
|
8342
8343
|
style: {
|
|
8343
8344
|
height: 320,
|
|
8344
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8345
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8345
8346
|
overflowY: 'scroll',
|
|
8346
8347
|
overflowX: 'auto'
|
|
8347
8348
|
}
|
|
@@ -8352,7 +8353,7 @@ var SubForm = function SubForm(props) {
|
|
|
8352
8353
|
size: "small",
|
|
8353
8354
|
pagination: false,
|
|
8354
8355
|
scroll: {
|
|
8355
|
-
x: '
|
|
8356
|
+
x: 'max-content'
|
|
8356
8357
|
},
|
|
8357
8358
|
locale: {
|
|
8358
8359
|
emptyText: '暂无数据'
|
|
@@ -8725,7 +8726,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8725
8726
|
changeSku = props.changeSku,
|
|
8726
8727
|
width = props.width,
|
|
8727
8728
|
_props$numIidType = props.numIidType,
|
|
8728
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8729
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8730
|
+
form = props.form,
|
|
8731
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8729
8732
|
var _useState = React.useState([]),
|
|
8730
8733
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8731
8734
|
selectList = _useState2[0],
|
|
@@ -8738,10 +8741,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8738
8741
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8739
8742
|
goodList = _useState6[0],
|
|
8740
8743
|
setGoodList = _useState6[1];
|
|
8741
|
-
var _useState7 = React.useState(
|
|
8744
|
+
var _useState7 = React.useState([]),
|
|
8742
8745
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8743
|
-
|
|
8744
|
-
|
|
8746
|
+
orderNoItems = _useState8[0],
|
|
8747
|
+
setOrderNoItems = _useState8[1];
|
|
8748
|
+
var _useState9 = React.useState(false),
|
|
8749
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8750
|
+
loading = _useState10[0],
|
|
8751
|
+
setLoading = _useState10[1];
|
|
8745
8752
|
var transformIdType = function transformIdType(id) {
|
|
8746
8753
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8747
8754
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8761,7 +8768,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8768
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8762
8769
|
return setGoodList(list.map(transformType));
|
|
8763
8770
|
};
|
|
8764
|
-
var
|
|
8771
|
+
var _useState11 = React.useState({
|
|
8765
8772
|
apiName: 'queryItems',
|
|
8766
8773
|
desc: true,
|
|
8767
8774
|
numIids: '',
|
|
@@ -8773,30 +8780,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8773
8780
|
cids: '',
|
|
8774
8781
|
title: ''
|
|
8775
8782
|
}),
|
|
8776
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8777
|
-
searchParams = _useState10[0],
|
|
8778
|
-
setSearch = _useState10[1];
|
|
8779
|
-
var _useState11 = React.useState(0),
|
|
8780
8783
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState13 = React.useState(
|
|
8784
|
+
searchParams = _useState12[0],
|
|
8785
|
+
setSearch = _useState12[1];
|
|
8786
|
+
var _useState13 = React.useState(0),
|
|
8784
8787
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState15 = React.useState(
|
|
8788
|
+
total = _useState14[0],
|
|
8789
|
+
setTotal = _useState14[1];
|
|
8790
|
+
var _useState15 = React.useState(''),
|
|
8788
8791
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
var _useState17 = React.useState(
|
|
8792
|
+
platform = _useState16[0],
|
|
8793
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8794
|
+
var _useState17 = React.useState({}),
|
|
8792
8795
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
var _useState19 = React.useState(
|
|
8796
|
+
shopInfo = _useState18[0],
|
|
8797
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8798
|
+
var _useState19 = React.useState(true),
|
|
8796
8799
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
var _useState21 = React.useState([
|
|
8800
|
+
canSearch = _useState20[0],
|
|
8801
|
+
setCanSearch = _useState20[1];
|
|
8802
|
+
var _useState21 = React.useState([null]),
|
|
8803
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8804
|
+
nextKeyList = _useState22[0],
|
|
8805
|
+
setNextKeyList = _useState22[1];
|
|
8806
|
+
var _useState23 = React.useState([{
|
|
8800
8807
|
tab: '出售中',
|
|
8801
8808
|
key: 'onSale'
|
|
8802
8809
|
}, {
|
|
@@ -8806,10 +8813,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8806
8813
|
tab: '已选择',
|
|
8807
8814
|
key: 'select'
|
|
8808
8815
|
}]),
|
|
8809
|
-
|
|
8810
|
-
tabs =
|
|
8811
|
-
setTabs =
|
|
8812
|
-
var
|
|
8816
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8817
|
+
tabs = _useState24[0],
|
|
8818
|
+
setTabs = _useState24[1];
|
|
8819
|
+
var _useState25 = React.useState([{
|
|
8813
8820
|
name: '上架时间',
|
|
8814
8821
|
value: 'list_time'
|
|
8815
8822
|
}, {
|
|
@@ -8819,13 +8826,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8819
8826
|
name: '按价格',
|
|
8820
8827
|
value: 'price'
|
|
8821
8828
|
}]),
|
|
8822
|
-
|
|
8823
|
-
goodSort =
|
|
8829
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8830
|
+
goodSort = _useState26[0];
|
|
8824
8831
|
//宝贝分类
|
|
8825
|
-
var
|
|
8826
|
-
|
|
8827
|
-
shell =
|
|
8828
|
-
setShell =
|
|
8832
|
+
var _useState27 = React.useState([]),
|
|
8833
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8834
|
+
shell = _useState28[0],
|
|
8835
|
+
setShell = _useState28[1];
|
|
8829
8836
|
var clickOrder = function clickOrder(sort) {
|
|
8830
8837
|
if (sort.value === searchParams.orderBy) {
|
|
8831
8838
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9098,8 +9105,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9098
9105
|
}
|
|
9099
9106
|
}, [platform]);
|
|
9100
9107
|
React.useEffect(function () {
|
|
9101
|
-
platform && canSearch
|
|
9108
|
+
if (platform && canSearch) {
|
|
9109
|
+
if (searchParams.type === 'orderProduct') {
|
|
9110
|
+
getOrderProductItem(searchParams);
|
|
9111
|
+
} else {
|
|
9112
|
+
getItem(searchParams, platform);
|
|
9113
|
+
}
|
|
9114
|
+
}
|
|
9102
9115
|
}, [searchParams, platform]);
|
|
9116
|
+
React.useEffect(function () {
|
|
9117
|
+
if (visible && platform !== 'fxg') {
|
|
9118
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9119
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9120
|
+
if (orderNo) {
|
|
9121
|
+
setTabs(function (prev) {
|
|
9122
|
+
return lodash.uniqBy([{
|
|
9123
|
+
tab: '订单商品',
|
|
9124
|
+
key: 'orderProduct'
|
|
9125
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9126
|
+
});
|
|
9127
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9128
|
+
setSearch(function (prev) {
|
|
9129
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9130
|
+
type: 'orderProduct'
|
|
9131
|
+
});
|
|
9132
|
+
});
|
|
9133
|
+
}
|
|
9134
|
+
}
|
|
9135
|
+
}
|
|
9136
|
+
if (!visible) {
|
|
9137
|
+
setOrderNoItems([]);
|
|
9138
|
+
}
|
|
9139
|
+
}, [visible]);
|
|
9140
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9141
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9142
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9143
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9144
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9145
|
+
case 0:
|
|
9146
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9147
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9148
|
+
if (orderNo) {
|
|
9149
|
+
_context2.next = 4;
|
|
9150
|
+
break;
|
|
9151
|
+
}
|
|
9152
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9153
|
+
case 4:
|
|
9154
|
+
if (orderNoItems.length) {
|
|
9155
|
+
_context2.next = 20;
|
|
9156
|
+
break;
|
|
9157
|
+
}
|
|
9158
|
+
_context2.prev = 5;
|
|
9159
|
+
setLoading(true);
|
|
9160
|
+
_context2.next = 9;
|
|
9161
|
+
return kmkfUtils.servers.orderDetail({
|
|
9162
|
+
shopId: shopId,
|
|
9163
|
+
orderNo: orderNo
|
|
9164
|
+
});
|
|
9165
|
+
case 9:
|
|
9166
|
+
res = _context2.sent;
|
|
9167
|
+
if (res.success) {
|
|
9168
|
+
_context2.next = 14;
|
|
9169
|
+
break;
|
|
9170
|
+
}
|
|
9171
|
+
handleSetGoodList([]);
|
|
9172
|
+
antd.message.warn(res.message);
|
|
9173
|
+
return _context2.abrupt("return");
|
|
9174
|
+
case 14:
|
|
9175
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9176
|
+
items = res.data.itemList;
|
|
9177
|
+
totalCount = items.length;
|
|
9178
|
+
items.forEach(function (item) {
|
|
9179
|
+
item.platform = platform;
|
|
9180
|
+
});
|
|
9181
|
+
setOrderNoItems(items);
|
|
9182
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9183
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9184
|
+
setTotal(totalCount);
|
|
9185
|
+
}
|
|
9186
|
+
case 15:
|
|
9187
|
+
_context2.prev = 15;
|
|
9188
|
+
setLoading(false);
|
|
9189
|
+
return _context2.finish(15);
|
|
9190
|
+
case 18:
|
|
9191
|
+
_context2.next = 26;
|
|
9192
|
+
break;
|
|
9193
|
+
case 20:
|
|
9194
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9195
|
+
title = params.title;
|
|
9196
|
+
if (platform !== 'taobao') {
|
|
9197
|
+
title = params.numIids;
|
|
9198
|
+
}
|
|
9199
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9200
|
+
return item.title.includes(title.trim());
|
|
9201
|
+
}) : orderNoItems;
|
|
9202
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9203
|
+
setTotal(_items.length);
|
|
9204
|
+
case 26:
|
|
9205
|
+
case "end":
|
|
9206
|
+
return _context2.stop();
|
|
9207
|
+
}
|
|
9208
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9209
|
+
}));
|
|
9210
|
+
return function getOrderProductItem(_x2) {
|
|
9211
|
+
return _ref4.apply(this, arguments);
|
|
9212
|
+
};
|
|
9213
|
+
}();
|
|
9103
9214
|
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9104
9215
|
title: '选择宝贝',
|
|
9105
9216
|
okText: '确认',
|
|
@@ -9133,7 +9244,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9133
9244
|
style: {
|
|
9134
9245
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9135
9246
|
}
|
|
9136
|
-
}, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9247
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9137
9248
|
value: searchParams.orderBy,
|
|
9138
9249
|
onChange: function onChange(e) {
|
|
9139
9250
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9149,7 +9260,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9149
9260
|
},
|
|
9150
9261
|
key: sort.value
|
|
9151
9262
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u21BE") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C2") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C5"));
|
|
9152
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9263
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9153
9264
|
className: "classify",
|
|
9154
9265
|
value: searchParams.cids,
|
|
9155
9266
|
onChange: function onChange(value) {
|
|
@@ -9164,7 +9275,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9164
9275
|
key: item.value
|
|
9165
9276
|
}, item.label);
|
|
9166
9277
|
})), /*#__PURE__*/React__default['default'].createElement(Search, {
|
|
9167
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9278
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9168
9279
|
// enterButton="搜索"
|
|
9169
9280
|
className: "search",
|
|
9170
9281
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9787,7 +9898,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9787
9898
|
userNick = props.userNick,
|
|
9788
9899
|
disabled = props.disabled,
|
|
9789
9900
|
changeSku = props.changeSku,
|
|
9790
|
-
width = props.width
|
|
9901
|
+
width = props.width,
|
|
9902
|
+
form = props.form,
|
|
9903
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9791
9904
|
var shopId = value.shopId,
|
|
9792
9905
|
imgList = value.imgList;
|
|
9793
9906
|
var _useState = React.useState(false),
|
|
@@ -9878,7 +9991,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9878
9991
|
var onSubmit = /*#__PURE__*/function () {
|
|
9879
9992
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9880
9993
|
var _list$;
|
|
9881
|
-
var newList, newImgList;
|
|
9994
|
+
var newList, newImgList, _list$2;
|
|
9882
9995
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9883
9996
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9884
9997
|
case 0:
|
|
@@ -9900,7 +10013,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9900
10013
|
// if (type === 1) {
|
|
9901
10014
|
// params.outerId = item.outerId; //编码
|
|
9902
10015
|
// }
|
|
9903
|
-
|
|
10016
|
+
//返填商品属性 && 为订单商品
|
|
10017
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10018
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10019
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10020
|
+
} else if (changeSku) {
|
|
9904
10021
|
params.propertiesName = '';
|
|
9905
10022
|
}
|
|
9906
10023
|
// if (type === 4) {
|
|
@@ -9919,7 +10036,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9919
10036
|
imgList: newImgList
|
|
9920
10037
|
});
|
|
9921
10038
|
setVisible(false);
|
|
9922
|
-
|
|
10039
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10040
|
+
checkSkus(list === null || list === void 0 ? void 0 : (_list$2 = list[0]) === null || _list$2 === void 0 ? void 0 : _list$2.numIid, newImgList.length - 1);
|
|
10041
|
+
}
|
|
9923
10042
|
case 5:
|
|
9924
10043
|
case "end":
|
|
9925
10044
|
return _context2.stop();
|
|
@@ -10176,6 +10295,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10176
10295
|
shopId: shopId,
|
|
10177
10296
|
maxLength: maxLength,
|
|
10178
10297
|
changeSku: changeSku,
|
|
10298
|
+
form: form,
|
|
10299
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10179
10300
|
onCancel: function onCancel() {
|
|
10180
10301
|
setVisible(false);
|
|
10181
10302
|
}
|
|
@@ -10974,7 +11095,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10974
11095
|
}
|
|
10975
11096
|
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10976
11097
|
label: '发件人手机号',
|
|
10977
|
-
required
|
|
11098
|
+
// required={true}
|
|
10978
11099
|
key: 'interceptSenderMobile',
|
|
10979
11100
|
hidden: !showSenderMobile
|
|
10980
11101
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -11003,7 +11124,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
11003
11124
|
value: item.uk
|
|
11004
11125
|
}, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
11005
11126
|
}))), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
11006
|
-
label: '
|
|
11127
|
+
label: '修改后派送地址',
|
|
11007
11128
|
required: true,
|
|
11008
11129
|
key: 'newAddress',
|
|
11009
11130
|
hidden: !showNewAddress
|
|
@@ -11154,7 +11275,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11154
11275
|
_props$value = props.value,
|
|
11155
11276
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11156
11277
|
disabled = props.disabled,
|
|
11157
|
-
onChange = props.onChange
|
|
11278
|
+
onChange = props.onChange,
|
|
11279
|
+
_props$isSingle = props.isSingle,
|
|
11280
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11281
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11282
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11158
11283
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11159
11284
|
var val = e.target.value;
|
|
11160
11285
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11165,13 +11290,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11165
11290
|
}));
|
|
11166
11291
|
handleSearchSnapshot(val);
|
|
11167
11292
|
};
|
|
11293
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11294
|
+
var _value$trajectoryApiS;
|
|
11295
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11296
|
+
trajectoryApiStatus: {
|
|
11297
|
+
status: val,
|
|
11298
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11299
|
+
}
|
|
11300
|
+
});
|
|
11301
|
+
onChange(newVal);
|
|
11302
|
+
};
|
|
11168
11303
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11169
11304
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11170
11305
|
trajectoryCode = value.trajectoryCode,
|
|
11171
11306
|
trajectoryPhone = value.trajectoryPhone;
|
|
11172
11307
|
var newCompany = company ? company : trajectoryCompany;
|
|
11173
11308
|
//不展示拦截状态不请求
|
|
11174
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11309
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11175
11310
|
return;
|
|
11176
11311
|
}
|
|
11177
11312
|
if (disabled) {
|
|
@@ -11196,13 +11331,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11196
11331
|
data = res.data,
|
|
11197
11332
|
msg = res.message;
|
|
11198
11333
|
if (result === 100 || success) {
|
|
11199
|
-
|
|
11200
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11334
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11201
11335
|
trajectoryCompany: newCompany
|
|
11202
|
-
})
|
|
11336
|
+
});
|
|
11337
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11338
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11339
|
+
onChange(newValue);
|
|
11203
11340
|
} else {
|
|
11204
11341
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11205
11342
|
trajectorySnapshot: '',
|
|
11343
|
+
trajectoryApiStatus: {
|
|
11344
|
+
reason: '',
|
|
11345
|
+
status: ''
|
|
11346
|
+
},
|
|
11206
11347
|
trajectoryCompany: newCompany
|
|
11207
11348
|
}));
|
|
11208
11349
|
msg && antd.message.error(msg);
|
|
@@ -11211,6 +11352,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11211
11352
|
} catch (err) {
|
|
11212
11353
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11213
11354
|
trajectorySnapshot: '',
|
|
11355
|
+
trajectoryApiStatus: {
|
|
11356
|
+
reason: '',
|
|
11357
|
+
status: ''
|
|
11358
|
+
},
|
|
11214
11359
|
trajectoryCompany: newCompany
|
|
11215
11360
|
}));
|
|
11216
11361
|
(err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11264,6 +11409,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11264
11409
|
}
|
|
11265
11410
|
});
|
|
11266
11411
|
};
|
|
11412
|
+
// 接口状态
|
|
11413
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11414
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11415
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11416
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11417
|
+
disabled: true,
|
|
11418
|
+
style: {
|
|
11419
|
+
width: '100%',
|
|
11420
|
+
marginTop: '8px'
|
|
11421
|
+
},
|
|
11422
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11423
|
+
onChange: handleStatusChange,
|
|
11424
|
+
options: [{
|
|
11425
|
+
label: '成功',
|
|
11426
|
+
value: '成功'
|
|
11427
|
+
}, {
|
|
11428
|
+
label: '失败',
|
|
11429
|
+
value: '失败'
|
|
11430
|
+
}]
|
|
11431
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11432
|
+
style: {
|
|
11433
|
+
color: 'red'
|
|
11434
|
+
}
|
|
11435
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
|
|
11436
|
+
};
|
|
11267
11437
|
//物流快照
|
|
11268
11438
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11269
11439
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -11278,7 +11448,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11278
11448
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11279
11449
|
});
|
|
11280
11450
|
};
|
|
11281
|
-
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);
|
|
11451
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
11282
11452
|
};
|
|
11283
11453
|
|
|
11284
11454
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11491,7 +11661,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11491
11661
|
disabled: disabled,
|
|
11492
11662
|
onChange: function onChange(val) {
|
|
11493
11663
|
return handleChange(val, changeIndex);
|
|
11494
|
-
}
|
|
11664
|
+
},
|
|
11665
|
+
isSingle: false
|
|
11495
11666
|
}));
|
|
11496
11667
|
};
|
|
11497
11668
|
|
|
@@ -11514,7 +11685,7 @@ var typeInitValueMap = {
|
|
|
11514
11685
|
}]
|
|
11515
11686
|
};
|
|
11516
11687
|
var jstGoods = function jstGoods(props) {
|
|
11517
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11;
|
|
11688
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
|
|
11518
11689
|
var _props$value = props.value,
|
|
11519
11690
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11520
11691
|
onChange = props.onChange,
|
|
@@ -11622,7 +11793,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11622
11793
|
onChange: function onChange(val) {
|
|
11623
11794
|
changeInputHandle(val, 'logisticsCompany');
|
|
11624
11795
|
},
|
|
11625
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false)
|
|
11796
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
|
|
11626
11797
|
showSearch: true,
|
|
11627
11798
|
dropdownMatchSelectWidth: false,
|
|
11628
11799
|
filterOption: function filterOption(input, option) {
|
|
@@ -11639,28 +11810,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
11639
11810
|
onChange: function onChange(e) {
|
|
11640
11811
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11641
11812
|
},
|
|
11642
|
-
value: (_value$
|
|
11813
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11643
11814
|
}) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11644
11815
|
disabled: disabled,
|
|
11645
11816
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11646
11817
|
onChange: function onChange(e) {
|
|
11647
11818
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11648
11819
|
},
|
|
11649
|
-
value: (_value$
|
|
11820
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11650
11821
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11651
11822
|
disabled: disabled,
|
|
11652
11823
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11653
11824
|
onChange: function onChange(e) {
|
|
11654
11825
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11655
11826
|
},
|
|
11656
|
-
value: (_value$
|
|
11827
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11657
11828
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11658
11829
|
disabled: disabled,
|
|
11659
11830
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11660
11831
|
onChange: function onChange(e) {
|
|
11661
11832
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11662
11833
|
},
|
|
11663
|
-
value: (_value$
|
|
11834
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11664
11835
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11665
11836
|
style: {
|
|
11666
11837
|
minWidth: '100px',
|
|
@@ -11671,7 +11842,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11671
11842
|
showSearch: true,
|
|
11672
11843
|
options: sendOptions,
|
|
11673
11844
|
filterOption: filterOption,
|
|
11674
|
-
value: ((_value$
|
|
11845
|
+
value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
|
|
11675
11846
|
onChange: function onChange(value, option) {
|
|
11676
11847
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11677
11848
|
}
|
|
@@ -11681,14 +11852,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11681
11852
|
onChange: function onChange(e) {
|
|
11682
11853
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11683
11854
|
},
|
|
11684
|
-
value: (_value$
|
|
11855
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11685
11856
|
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11686
11857
|
disabled: disabled,
|
|
11687
11858
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11688
11859
|
onChange: function onChange(e) {
|
|
11689
11860
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11690
11861
|
},
|
|
11691
|
-
value: (_value$
|
|
11862
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11692
11863
|
})) : null) : null);
|
|
11693
11864
|
};
|
|
11694
11865
|
|
|
@@ -12255,7 +12426,7 @@ var gyColumns = [{
|
|
|
12255
12426
|
}, {
|
|
12256
12427
|
dataIndex: 'specNo',
|
|
12257
12428
|
title: 'SKU编码',
|
|
12258
|
-
width:
|
|
12429
|
+
width: 150,
|
|
12259
12430
|
ellipsis: true
|
|
12260
12431
|
}, {
|
|
12261
12432
|
dataIndex: 'goodName',
|
|
@@ -12266,11 +12437,11 @@ var gyColumns = [{
|
|
|
12266
12437
|
dataIndex: 'goodShortName',
|
|
12267
12438
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12268
12439
|
ellipsis: true,
|
|
12269
|
-
width:
|
|
12440
|
+
width: 150
|
|
12270
12441
|
}, {
|
|
12271
12442
|
dataIndex: 'goodNo',
|
|
12272
12443
|
title: '商品编码',
|
|
12273
|
-
width:
|
|
12444
|
+
width: 150,
|
|
12274
12445
|
ellipsis: true
|
|
12275
12446
|
}, {
|
|
12276
12447
|
dataIndex: 'goodPicUrl',
|
|
@@ -12543,12 +12714,144 @@ var bse3Columns = [{
|
|
|
12543
12714
|
width: 100
|
|
12544
12715
|
}];
|
|
12545
12716
|
|
|
12717
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12718
|
+
if (!lodash.isBoolean(val)) return null;
|
|
12719
|
+
return val ? '是' : '否';
|
|
12720
|
+
};
|
|
12721
|
+
var kmColumns = [{
|
|
12722
|
+
dataIndex: 'goodName',
|
|
12723
|
+
title: '商品名称',
|
|
12724
|
+
width: 250,
|
|
12725
|
+
ellipsis: true
|
|
12726
|
+
}, {
|
|
12727
|
+
dataIndex: 'goodNo',
|
|
12728
|
+
title: '商品编码',
|
|
12729
|
+
width: 150,
|
|
12730
|
+
ellipsis: true
|
|
12731
|
+
}, {
|
|
12732
|
+
dataIndex: 'goodId',
|
|
12733
|
+
title: '商品ID',
|
|
12734
|
+
width: 200,
|
|
12735
|
+
ellipsis: true
|
|
12736
|
+
}, {
|
|
12737
|
+
dataIndex: 'goodPicUrl',
|
|
12738
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12739
|
+
width: 150,
|
|
12740
|
+
render: function render(val) {
|
|
12741
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12742
|
+
width: 60,
|
|
12743
|
+
src: val
|
|
12744
|
+
});
|
|
12745
|
+
}
|
|
12746
|
+
}, {
|
|
12747
|
+
dataIndex: 'goodShortName',
|
|
12748
|
+
title: '商品简称',
|
|
12749
|
+
width: 200,
|
|
12750
|
+
ellipsis: true
|
|
12751
|
+
}, {
|
|
12752
|
+
dataIndex: 'goodBarcode',
|
|
12753
|
+
title: '商品条码',
|
|
12754
|
+
width: 200,
|
|
12755
|
+
ellipsis: true
|
|
12756
|
+
}, {
|
|
12757
|
+
dataIndex: 'brandName',
|
|
12758
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12759
|
+
ellipsis: true,
|
|
12760
|
+
width: 150
|
|
12761
|
+
}, {
|
|
12762
|
+
dataIndex: 'skuType',
|
|
12763
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12764
|
+
ellipsis: true,
|
|
12765
|
+
width: 150
|
|
12766
|
+
}, {
|
|
12767
|
+
dataIndex: 'specName',
|
|
12768
|
+
title: "SKU\u540D\u79F0",
|
|
12769
|
+
ellipsis: true,
|
|
12770
|
+
width: 150
|
|
12771
|
+
}, {
|
|
12772
|
+
dataIndex: 'specNo',
|
|
12773
|
+
title: "SKU\u7F16\u7801",
|
|
12774
|
+
ellipsis: true,
|
|
12775
|
+
width: 150
|
|
12776
|
+
}, {
|
|
12777
|
+
dataIndex: 'specId',
|
|
12778
|
+
title: "SKU ID",
|
|
12779
|
+
ellipsis: true,
|
|
12780
|
+
width: 150
|
|
12781
|
+
}, {
|
|
12782
|
+
dataIndex: 'propertiesValue',
|
|
12783
|
+
title: "\u89C4\u683C\u503C",
|
|
12784
|
+
ellipsis: true,
|
|
12785
|
+
width: 150
|
|
12786
|
+
}, {
|
|
12787
|
+
dataIndex: 'skuShortTitle',
|
|
12788
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12789
|
+
ellipsis: true,
|
|
12790
|
+
width: 150
|
|
12791
|
+
}, {
|
|
12792
|
+
dataIndex: 'specBarcode',
|
|
12793
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12794
|
+
ellipsis: true,
|
|
12795
|
+
width: 150
|
|
12796
|
+
}, {
|
|
12797
|
+
dataIndex: 'specImgUrl',
|
|
12798
|
+
title: "SKU \u56FE\u7247",
|
|
12799
|
+
ellipsis: true,
|
|
12800
|
+
width: 150,
|
|
12801
|
+
render: function render(val) {
|
|
12802
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12803
|
+
width: 60,
|
|
12804
|
+
src: val
|
|
12805
|
+
});
|
|
12806
|
+
}
|
|
12807
|
+
}, {
|
|
12808
|
+
dataIndex: 'isGift',
|
|
12809
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12810
|
+
ellipsis: true,
|
|
12811
|
+
width: 150,
|
|
12812
|
+
render: function render(val) {
|
|
12813
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12814
|
+
}
|
|
12815
|
+
}, {
|
|
12816
|
+
dataIndex: 'isVirtual',
|
|
12817
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12818
|
+
ellipsis: true,
|
|
12819
|
+
width: 150,
|
|
12820
|
+
render: function render(val) {
|
|
12821
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12822
|
+
}
|
|
12823
|
+
}, {
|
|
12824
|
+
dataIndex: 'isSkuItem',
|
|
12825
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12826
|
+
ellipsis: true,
|
|
12827
|
+
width: 150,
|
|
12828
|
+
render: function render(val) {
|
|
12829
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12830
|
+
}
|
|
12831
|
+
}, {
|
|
12832
|
+
dataIndex: 'marketPrice',
|
|
12833
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12834
|
+
ellipsis: true,
|
|
12835
|
+
width: 150
|
|
12836
|
+
}, {
|
|
12837
|
+
dataIndex: 'retailPrice',
|
|
12838
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12839
|
+
ellipsis: true,
|
|
12840
|
+
width: 150
|
|
12841
|
+
}, {
|
|
12842
|
+
dataIndex: 'costPrice',
|
|
12843
|
+
title: "\u6210\u672C\u4EF7",
|
|
12844
|
+
ellipsis: true,
|
|
12845
|
+
width: 150
|
|
12846
|
+
}];
|
|
12847
|
+
|
|
12546
12848
|
var getColumnsMap = function getColumnsMap() {
|
|
12547
12849
|
return lodash.cloneDeep({
|
|
12548
12850
|
gy: gyColumns,
|
|
12549
12851
|
jst: jstColumns,
|
|
12550
12852
|
wdt: wdtColumns,
|
|
12551
|
-
bse3: bse3Columns
|
|
12853
|
+
bse3: bse3Columns,
|
|
12854
|
+
km: kmColumns
|
|
12552
12855
|
});
|
|
12553
12856
|
};
|
|
12554
12857
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -12603,9 +12906,7 @@ var useGetColumns = (function (type) {
|
|
|
12603
12906
|
loading = _useState4[0],
|
|
12604
12907
|
setLoading = _useState4[1];
|
|
12605
12908
|
var showColumnsDataIndexList = React.useMemo(function () {
|
|
12606
|
-
return columns.
|
|
12607
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12608
|
-
}).map(function (item) {
|
|
12909
|
+
return columns.map(function (item) {
|
|
12609
12910
|
return item.dataIndex;
|
|
12610
12911
|
});
|
|
12611
12912
|
}, [columns]);
|
|
@@ -13500,23 +13801,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13500
13801
|
};
|
|
13501
13802
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
13502
13803
|
|
|
13804
|
+
var rowCheckKey = 'id';
|
|
13503
13805
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13504
13806
|
var current = _ref.current,
|
|
13505
13807
|
pageSize = _ref.pageSize;
|
|
13506
|
-
var data = {
|
|
13507
|
-
goodShortName: formData.goodShortName || null,
|
|
13508
|
-
skuName: formData.skuName || null,
|
|
13509
|
-
skuCode: formData.skuCode || null,
|
|
13510
|
-
goodName: formData.goodName || null,
|
|
13511
|
-
goodNo: formData.goodNo || null
|
|
13512
|
-
};
|
|
13513
13808
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13514
13809
|
method: 'post',
|
|
13515
13810
|
data: _objectSpread2({
|
|
13516
13811
|
pageSize: pageSize,
|
|
13517
13812
|
pageNo: current,
|
|
13518
|
-
platform: '
|
|
13519
|
-
},
|
|
13813
|
+
platform: 'KM_ERP'
|
|
13814
|
+
}, formData)
|
|
13520
13815
|
}).then(function (res) {
|
|
13521
13816
|
var _res$data = res.data,
|
|
13522
13817
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13533,22 +13828,19 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13533
13828
|
});
|
|
13534
13829
|
};
|
|
13535
13830
|
var searchFormData$2 = [{
|
|
13536
|
-
label: '
|
|
13537
|
-
name: '
|
|
13831
|
+
label: '商品名称',
|
|
13832
|
+
name: 'goodName'
|
|
13538
13833
|
}, {
|
|
13539
|
-
label: '
|
|
13834
|
+
label: '商品编码',
|
|
13835
|
+
name: 'goodNo'
|
|
13836
|
+
}, {
|
|
13837
|
+
label: 'SKU名称',
|
|
13540
13838
|
name: 'skuName',
|
|
13541
13839
|
dataIndex: 'specName'
|
|
13542
13840
|
}, {
|
|
13543
|
-
label: '
|
|
13841
|
+
label: 'SKU编码',
|
|
13544
13842
|
name: 'skuCode',
|
|
13545
13843
|
dataIndex: 'specNo'
|
|
13546
|
-
}, {
|
|
13547
|
-
label: '商品名称',
|
|
13548
|
-
name: 'goodName'
|
|
13549
|
-
}, {
|
|
13550
|
-
label: '商品编码',
|
|
13551
|
-
name: 'goodNo'
|
|
13552
13844
|
}];
|
|
13553
13845
|
var GoodList$3 = function GoodList(props, ref) {
|
|
13554
13846
|
var _useState = React.useState([]),
|
|
@@ -13559,7 +13851,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13559
13851
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13560
13852
|
selectIds = _useState4[0],
|
|
13561
13853
|
setSelectIds = _useState4[1];
|
|
13562
|
-
var _useGetColumns = useGetColumns('
|
|
13854
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13563
13855
|
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13564
13856
|
columns = _useGetColumns2[0],
|
|
13565
13857
|
showColumnsDataIndexList = _useGetColumns2[1],
|
|
@@ -13588,41 +13880,50 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13588
13880
|
fixed: true,
|
|
13589
13881
|
onSelect: function onSelect(record, selected) {
|
|
13590
13882
|
if (selected) {
|
|
13591
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record
|
|
13883
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13592
13884
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13593
13885
|
} else {
|
|
13594
13886
|
setSelectIds(selectIds.filter(function (t) {
|
|
13595
|
-
return t !== record
|
|
13887
|
+
return t !== record[rowCheckKey];
|
|
13596
13888
|
}));
|
|
13597
13889
|
setSelect(selectList.filter(function (t) {
|
|
13598
|
-
return t
|
|
13890
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13599
13891
|
}));
|
|
13600
13892
|
}
|
|
13601
13893
|
},
|
|
13602
13894
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13603
13895
|
if (selected) {
|
|
13604
13896
|
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13605
|
-
return t
|
|
13897
|
+
return t[rowCheckKey];
|
|
13606
13898
|
}))));
|
|
13607
13899
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13608
13900
|
} else {
|
|
13609
13901
|
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
13610
|
-
return t
|
|
13902
|
+
return t[rowCheckKey];
|
|
13611
13903
|
})));
|
|
13612
13904
|
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13613
|
-
return arrVal
|
|
13905
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13614
13906
|
});
|
|
13615
13907
|
setSelect(list);
|
|
13616
13908
|
}
|
|
13909
|
+
},
|
|
13910
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13911
|
+
var options = {
|
|
13912
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13913
|
+
return row[rowCheckKey] || row.skuId;
|
|
13914
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13915
|
+
name: record[rowCheckKey]
|
|
13916
|
+
};
|
|
13917
|
+
return options;
|
|
13617
13918
|
}
|
|
13618
13919
|
};
|
|
13619
13920
|
var showTable = function showTable() {
|
|
13620
13921
|
var handleDelete = function handleDelete(record) {
|
|
13621
13922
|
setSelectIds(selectIds.filter(function (t) {
|
|
13622
|
-
return t !== record
|
|
13923
|
+
return t !== record[rowCheckKey];
|
|
13623
13924
|
}));
|
|
13624
13925
|
setSelect(selectList.filter(function (t) {
|
|
13625
|
-
return t
|
|
13926
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13626
13927
|
}));
|
|
13627
13928
|
};
|
|
13628
13929
|
var showColumns = [{
|
|
@@ -13646,7 +13947,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13646
13947
|
}
|
|
13647
13948
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
13648
13949
|
columns: showColumns,
|
|
13649
|
-
rowKey:
|
|
13950
|
+
rowKey: rowCheckKey,
|
|
13650
13951
|
dataSource: selectList,
|
|
13651
13952
|
scroll: {
|
|
13652
13953
|
x: '100%',
|
|
@@ -13675,7 +13976,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13675
13976
|
}
|
|
13676
13977
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
13677
13978
|
rowSelection: rowSelection,
|
|
13678
|
-
rowKey:
|
|
13979
|
+
rowKey: rowCheckKey,
|
|
13679
13980
|
columns: columns,
|
|
13680
13981
|
scroll: {
|
|
13681
13982
|
x: '100%',
|
|
@@ -13692,13 +13993,15 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13692
13993
|
type: "text"
|
|
13693
13994
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
13694
13995
|
};
|
|
13695
|
-
var
|
|
13996
|
+
var ErpGoodsList = /*#__PURE__*/React.forwardRef(GoodList$3);
|
|
13696
13997
|
|
|
13697
|
-
var
|
|
13998
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
13698
13999
|
React.useImperativeHandle(ref, function () {
|
|
13699
14000
|
return {
|
|
13700
|
-
open: function open() {
|
|
14001
|
+
open: function open(shopCode) {
|
|
14002
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13701
14003
|
setVisible(true);
|
|
14004
|
+
setSelectedRows(options.value || []);
|
|
13702
14005
|
}
|
|
13703
14006
|
};
|
|
13704
14007
|
});
|
|
@@ -13708,13 +14011,17 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13708
14011
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13709
14012
|
visible = _useState2[0],
|
|
13710
14013
|
setVisible = _useState2[1];
|
|
13711
|
-
var
|
|
14014
|
+
var _useState3 = React.useState([]),
|
|
14015
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14016
|
+
selectedRows = _useState4[0],
|
|
14017
|
+
setSelectedRows = _useState4[1];
|
|
14018
|
+
var erpGoodsListRef = React.useRef(null);
|
|
13712
14019
|
var _onCancel = function onCancel() {
|
|
13713
14020
|
setVisible(false);
|
|
13714
14021
|
};
|
|
13715
14022
|
var onOk = function onOk() {
|
|
13716
|
-
var
|
|
13717
|
-
var selectedList = ((
|
|
14023
|
+
var _erpGoodsListRef$curr;
|
|
14024
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
13718
14025
|
onSubmit(selectedList);
|
|
13719
14026
|
_onCancel();
|
|
13720
14027
|
};
|
|
@@ -13729,8 +14036,244 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13729
14036
|
},
|
|
13730
14037
|
onOk: onOk,
|
|
13731
14038
|
wrapClassName: "goodModal"
|
|
13732
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
13733
|
-
ref:
|
|
14039
|
+
}, /*#__PURE__*/React__default['default'].createElement(ErpGoodsList, {
|
|
14040
|
+
ref: erpGoodsListRef,
|
|
14041
|
+
selectedRows: selectedRows
|
|
14042
|
+
})));
|
|
14043
|
+
};
|
|
14044
|
+
var KmGoodsModal = /*#__PURE__*/React.forwardRef(ErpGoodsModal);
|
|
14045
|
+
|
|
14046
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14047
|
+
var current = _ref.current,
|
|
14048
|
+
pageSize = _ref.pageSize;
|
|
14049
|
+
var data = {
|
|
14050
|
+
goodShortName: formData.goodShortName || null,
|
|
14051
|
+
skuName: formData.skuName || null,
|
|
14052
|
+
skuCode: formData.skuCode || null,
|
|
14053
|
+
goodName: formData.goodName || null,
|
|
14054
|
+
goodNo: formData.goodNo || null
|
|
14055
|
+
};
|
|
14056
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14057
|
+
method: 'post',
|
|
14058
|
+
data: _objectSpread2({
|
|
14059
|
+
pageSize: pageSize,
|
|
14060
|
+
pageNo: current,
|
|
14061
|
+
platform: 'GY_ERP'
|
|
14062
|
+
}, data)
|
|
14063
|
+
}).then(function (res) {
|
|
14064
|
+
var _res$data = res.data,
|
|
14065
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14066
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14067
|
+
_res$data$total = _res$data.total,
|
|
14068
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14069
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14070
|
+
return _objectSpread2({}, item);
|
|
14071
|
+
});
|
|
14072
|
+
return {
|
|
14073
|
+
total: total,
|
|
14074
|
+
list: newProducts
|
|
14075
|
+
};
|
|
14076
|
+
});
|
|
14077
|
+
};
|
|
14078
|
+
var searchFormData$3 = [{
|
|
14079
|
+
label: '商品简称',
|
|
14080
|
+
name: 'goodShortName'
|
|
14081
|
+
}, {
|
|
14082
|
+
label: '商品sku名称',
|
|
14083
|
+
name: 'skuName',
|
|
14084
|
+
dataIndex: 'specName'
|
|
14085
|
+
}, {
|
|
14086
|
+
label: '商品sku编码',
|
|
14087
|
+
name: 'skuCode',
|
|
14088
|
+
dataIndex: 'specNo'
|
|
14089
|
+
}, {
|
|
14090
|
+
label: '商品名称',
|
|
14091
|
+
name: 'goodName'
|
|
14092
|
+
}, {
|
|
14093
|
+
label: '商品编码',
|
|
14094
|
+
name: 'goodNo'
|
|
14095
|
+
}];
|
|
14096
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
14097
|
+
var _useState = React.useState([]),
|
|
14098
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14099
|
+
selectList = _useState2[0],
|
|
14100
|
+
setSelect = _useState2[1];
|
|
14101
|
+
var _useState3 = React.useState([]),
|
|
14102
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14103
|
+
selectIds = _useState4[0],
|
|
14104
|
+
setSelectIds = _useState4[1];
|
|
14105
|
+
var _useGetColumns = useGetColumns('gy'),
|
|
14106
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
14107
|
+
columns = _useGetColumns2[0],
|
|
14108
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
14109
|
+
loading = _useGetColumns2[2];
|
|
14110
|
+
React.useImperativeHandle(ref, function () {
|
|
14111
|
+
return {
|
|
14112
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
14113
|
+
return selectList;
|
|
14114
|
+
}
|
|
14115
|
+
};
|
|
14116
|
+
});
|
|
14117
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
14118
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
14119
|
+
form = _Form$useForm2[0];
|
|
14120
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
|
|
14121
|
+
defaultPageSize: 10,
|
|
14122
|
+
form: form
|
|
14123
|
+
}),
|
|
14124
|
+
tableProps = _useAntdTable.tableProps,
|
|
14125
|
+
search = _useAntdTable.search,
|
|
14126
|
+
params = _useAntdTable.params;
|
|
14127
|
+
var submit = search.submit,
|
|
14128
|
+
reset = search.reset;
|
|
14129
|
+
var rowSelection = {
|
|
14130
|
+
selectedRowKeys: selectIds,
|
|
14131
|
+
fixed: true,
|
|
14132
|
+
onSelect: function onSelect(record, selected) {
|
|
14133
|
+
if (selected) {
|
|
14134
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
14135
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
14136
|
+
} else {
|
|
14137
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14138
|
+
return t !== record.id;
|
|
14139
|
+
}));
|
|
14140
|
+
setSelect(selectList.filter(function (t) {
|
|
14141
|
+
return t.id !== record.id;
|
|
14142
|
+
}));
|
|
14143
|
+
}
|
|
14144
|
+
},
|
|
14145
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
14146
|
+
if (selected) {
|
|
14147
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
14148
|
+
return t.id;
|
|
14149
|
+
}))));
|
|
14150
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
14151
|
+
} else {
|
|
14152
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
14153
|
+
return t.id;
|
|
14154
|
+
})));
|
|
14155
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
14156
|
+
return arrVal.id !== othVal.id;
|
|
14157
|
+
});
|
|
14158
|
+
setSelect(list);
|
|
14159
|
+
}
|
|
14160
|
+
}
|
|
14161
|
+
};
|
|
14162
|
+
var showTable = function showTable() {
|
|
14163
|
+
var handleDelete = function handleDelete(record) {
|
|
14164
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14165
|
+
return t !== record.id;
|
|
14166
|
+
}));
|
|
14167
|
+
setSelect(selectList.filter(function (t) {
|
|
14168
|
+
return t.id !== record.id;
|
|
14169
|
+
}));
|
|
14170
|
+
};
|
|
14171
|
+
var showColumns = [{
|
|
14172
|
+
dataIndex: '',
|
|
14173
|
+
title: "\u64CD\u4F5C",
|
|
14174
|
+
ellipsis: true,
|
|
14175
|
+
width: 100,
|
|
14176
|
+
render: function render(val, record) {
|
|
14177
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
14178
|
+
type: "link",
|
|
14179
|
+
onClick: function onClick() {
|
|
14180
|
+
return handleDelete(record);
|
|
14181
|
+
}
|
|
14182
|
+
}, "\u5220\u9664");
|
|
14183
|
+
}
|
|
14184
|
+
}].concat(lodash.takeRight(columns, columns.length - 1));
|
|
14185
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14186
|
+
style: {
|
|
14187
|
+
width: '100%',
|
|
14188
|
+
maxWidth: '387px'
|
|
14189
|
+
}
|
|
14190
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
14191
|
+
columns: showColumns,
|
|
14192
|
+
rowKey: 'id',
|
|
14193
|
+
dataSource: selectList,
|
|
14194
|
+
scroll: {
|
|
14195
|
+
x: '100%',
|
|
14196
|
+
y: 250
|
|
14197
|
+
},
|
|
14198
|
+
pagination: {
|
|
14199
|
+
size: 'small',
|
|
14200
|
+
total: selectIds.length,
|
|
14201
|
+
pageSize: 10,
|
|
14202
|
+
showSizeChanger: false
|
|
14203
|
+
}
|
|
14204
|
+
})) : null;
|
|
14205
|
+
};
|
|
14206
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
|
|
14207
|
+
active: true,
|
|
14208
|
+
loading: loading
|
|
14209
|
+
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
14210
|
+
searchFormData: searchFormData$3,
|
|
14211
|
+
form: form,
|
|
14212
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14213
|
+
submit: submit,
|
|
14214
|
+
reset: reset
|
|
14215
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14216
|
+
style: {
|
|
14217
|
+
marginTop: '4px'
|
|
14218
|
+
}
|
|
14219
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
14220
|
+
rowSelection: rowSelection,
|
|
14221
|
+
rowKey: "id",
|
|
14222
|
+
columns: columns,
|
|
14223
|
+
scroll: {
|
|
14224
|
+
x: '100%',
|
|
14225
|
+
y: 250
|
|
14226
|
+
}
|
|
14227
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
14228
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14229
|
+
return triggerNode.parentElement;
|
|
14230
|
+
},
|
|
14231
|
+
content: showTable(),
|
|
14232
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14233
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
14234
|
+
danger: true,
|
|
14235
|
+
type: "text"
|
|
14236
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
14237
|
+
};
|
|
14238
|
+
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
|
|
14239
|
+
|
|
14240
|
+
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
14241
|
+
React.useImperativeHandle(ref, function () {
|
|
14242
|
+
return {
|
|
14243
|
+
open: function open() {
|
|
14244
|
+
setVisible(true);
|
|
14245
|
+
}
|
|
14246
|
+
};
|
|
14247
|
+
});
|
|
14248
|
+
var onSubmit = props.onSubmit,
|
|
14249
|
+
width = props.width;
|
|
14250
|
+
var _useState = React.useState(false),
|
|
14251
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14252
|
+
visible = _useState2[0],
|
|
14253
|
+
setVisible = _useState2[1];
|
|
14254
|
+
var gyGoodsListRef = React.useRef(null);
|
|
14255
|
+
var _onCancel = function onCancel() {
|
|
14256
|
+
setVisible(false);
|
|
14257
|
+
};
|
|
14258
|
+
var onOk = function onOk() {
|
|
14259
|
+
var _gyGoodsListRef$curre;
|
|
14260
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
14261
|
+
onSubmit(selectedList);
|
|
14262
|
+
_onCancel();
|
|
14263
|
+
};
|
|
14264
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
14265
|
+
title: '选择商品',
|
|
14266
|
+
okText: '确认',
|
|
14267
|
+
cancelText: '取消',
|
|
14268
|
+
visible: visible,
|
|
14269
|
+
width: width || 850,
|
|
14270
|
+
onCancel: function onCancel() {
|
|
14271
|
+
_onCancel();
|
|
14272
|
+
},
|
|
14273
|
+
onOk: onOk,
|
|
14274
|
+
wrapClassName: "goodModal"
|
|
14275
|
+
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
|
|
14276
|
+
ref: gyGoodsListRef
|
|
13734
14277
|
})));
|
|
13735
14278
|
};
|
|
13736
14279
|
var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
|
|
@@ -14441,6 +14984,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14441
14984
|
label: '组合装',
|
|
14442
14985
|
value: '2'
|
|
14443
14986
|
}];
|
|
14987
|
+
var typeMap = {
|
|
14988
|
+
'1': '单品',
|
|
14989
|
+
'2': '组合装'
|
|
14990
|
+
};
|
|
14444
14991
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14445
14992
|
style: {
|
|
14446
14993
|
width: 70
|
|
@@ -14450,7 +14997,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14450
14997
|
onChange: function onChange(value) {
|
|
14451
14998
|
return updateHandle(value, index, 'type');
|
|
14452
14999
|
}
|
|
14453
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15000
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14454
15001
|
}
|
|
14455
15002
|
}],
|
|
14456
15003
|
//旺店通换出商品信息
|
|
@@ -14562,6 +15109,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14562
15109
|
label: '组合装',
|
|
14563
15110
|
value: '2'
|
|
14564
15111
|
}];
|
|
15112
|
+
var typeMap = {
|
|
15113
|
+
'1': '单品',
|
|
15114
|
+
'2': '组合装'
|
|
15115
|
+
};
|
|
14565
15116
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14566
15117
|
style: {
|
|
14567
15118
|
width: 70
|
|
@@ -14571,13 +15122,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14571
15122
|
onChange: function onChange(value) {
|
|
14572
15123
|
return updateHandle(value, index, 'type');
|
|
14573
15124
|
}
|
|
14574
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15125
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14575
15126
|
}
|
|
14576
15127
|
}]
|
|
14577
15128
|
};
|
|
14578
15129
|
};
|
|
14579
15130
|
|
|
14580
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15131
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14581
15132
|
if (kmkfUtils.isNull(val)) return null;
|
|
14582
15133
|
return val ? '是' : '否';
|
|
14583
15134
|
};
|
|
@@ -14715,7 +15266,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14715
15266
|
label: '否',
|
|
14716
15267
|
value: false
|
|
14717
15268
|
}]
|
|
14718
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
15269
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
|
|
14719
15270
|
},
|
|
14720
15271
|
width: 100
|
|
14721
15272
|
}]
|
|
@@ -14727,7 +15278,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14727
15278
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14728
15279
|
return false;
|
|
14729
15280
|
};
|
|
14730
|
-
var getYesOrNo$
|
|
15281
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14731
15282
|
if (kmkfUtils.isNull(val)) return null;
|
|
14732
15283
|
return val ? '是' : '否';
|
|
14733
15284
|
};
|
|
@@ -14837,7 +15388,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14837
15388
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14838
15389
|
width: 150,
|
|
14839
15390
|
render: function render(val) {
|
|
14840
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15391
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14841
15392
|
}
|
|
14842
15393
|
}, {
|
|
14843
15394
|
dataIndex: 'isGift',
|
|
@@ -14856,7 +15407,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14856
15407
|
label: '否',
|
|
14857
15408
|
value: 0
|
|
14858
15409
|
}]
|
|
14859
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15410
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14860
15411
|
}
|
|
14861
15412
|
}, {
|
|
14862
15413
|
dataIndex: 'skuNote',
|
|
@@ -14976,7 +15527,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14976
15527
|
label: '否',
|
|
14977
15528
|
value: 0
|
|
14978
15529
|
}]
|
|
14979
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15530
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14980
15531
|
}
|
|
14981
15532
|
}].map(function (item) {
|
|
14982
15533
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15100,7 +15651,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15100
15651
|
label: '否',
|
|
15101
15652
|
value: 0
|
|
15102
15653
|
}]
|
|
15103
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15654
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
15104
15655
|
}
|
|
15105
15656
|
}].map(function (item) {
|
|
15106
15657
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15222,7 +15773,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15222
15773
|
ellipsis: true,
|
|
15223
15774
|
align: 'center',
|
|
15224
15775
|
render: function render(val, record, index) {
|
|
15225
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15776
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15226
15777
|
}
|
|
15227
15778
|
}, {
|
|
15228
15779
|
dataIndex: 'batchId',
|
|
@@ -15498,7 +16049,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15498
16049
|
dataIndex: 'saleAmount',
|
|
15499
16050
|
title: '总金额',
|
|
15500
16051
|
render: function render(val, record) {
|
|
15501
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16052
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15502
16053
|
}
|
|
15503
16054
|
}, {
|
|
15504
16055
|
dataIndex: 'batchId',
|
|
@@ -15607,7 +16158,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15607
16158
|
dataIndex: 'saleAmount',
|
|
15608
16159
|
title: '总金额',
|
|
15609
16160
|
render: function render(val, record) {
|
|
15610
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16161
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15611
16162
|
}
|
|
15612
16163
|
}, {
|
|
15613
16164
|
dataIndex: 'isGift',
|
|
@@ -15646,20 +16197,253 @@ var getColumns$5 = function getColumns() {
|
|
|
15646
16197
|
};
|
|
15647
16198
|
};
|
|
15648
16199
|
|
|
16200
|
+
function toNum$2(value) {
|
|
16201
|
+
if (typeof value === 'string') {
|
|
16202
|
+
return value ? +value : void 0;
|
|
16203
|
+
}
|
|
16204
|
+
if (typeof value === 'number') {
|
|
16205
|
+
return value;
|
|
16206
|
+
}
|
|
16207
|
+
return void 0;
|
|
16208
|
+
}
|
|
15649
16209
|
var getColumns$6 = function getColumns(_ref) {
|
|
15650
16210
|
var _ref$text = _ref.text,
|
|
15651
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15652
16211
|
disabled = _ref.disabled,
|
|
15653
16212
|
updateHandle = _ref.updateHandle;
|
|
15654
16213
|
return {
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
16214
|
+
KM_GOODS: [{
|
|
16215
|
+
dataIndex: 'skuPropertiesName',
|
|
16216
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16217
|
+
width: 250
|
|
16218
|
+
}, {
|
|
16219
|
+
dataIndex: 'sysTitle',
|
|
16220
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16221
|
+
width: 150
|
|
16222
|
+
}, {
|
|
16223
|
+
dataIndex: 'title',
|
|
16224
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16225
|
+
width: 150
|
|
16226
|
+
}, {
|
|
16227
|
+
dataIndex: 'shortTitle',
|
|
16228
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16229
|
+
width: 150
|
|
16230
|
+
}, {
|
|
16231
|
+
dataIndex: 'sysOuterId',
|
|
16232
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16233
|
+
width: 150
|
|
16234
|
+
}, {
|
|
16235
|
+
dataIndex: 'skuSysId',
|
|
16236
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16237
|
+
width: 150
|
|
16238
|
+
}, {
|
|
16239
|
+
dataIndex: 'skuId',
|
|
16240
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16241
|
+
width: 170
|
|
16242
|
+
}, {
|
|
16243
|
+
dataIndex: 'itemSysId',
|
|
16244
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16245
|
+
width: 150
|
|
16246
|
+
}, {
|
|
16247
|
+
dataIndex: 'sysPicPath',
|
|
16248
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16249
|
+
width: 100,
|
|
16250
|
+
render: function render(val) {
|
|
16251
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16252
|
+
width: 60,
|
|
16253
|
+
src: val
|
|
16254
|
+
});
|
|
16255
|
+
}
|
|
16256
|
+
}, {
|
|
16257
|
+
dataIndex: 'num',
|
|
16258
|
+
title: "\u6570\u91CF",
|
|
16259
|
+
width: 100,
|
|
16260
|
+
render: function render(val, record, index) {
|
|
16261
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16262
|
+
style: {
|
|
16263
|
+
width: 70
|
|
16264
|
+
},
|
|
16265
|
+
value: val,
|
|
16266
|
+
min: 1,
|
|
16267
|
+
precision: 0,
|
|
16268
|
+
onChange: function onChange(num) {
|
|
16269
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16270
|
+
}
|
|
16271
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16272
|
+
}
|
|
16273
|
+
}, {
|
|
16274
|
+
dataIndex: 'payment',
|
|
16275
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16276
|
+
width: 150,
|
|
16277
|
+
render: function render(val, record, index) {
|
|
16278
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16279
|
+
style: {
|
|
16280
|
+
width: 130
|
|
16281
|
+
},
|
|
16282
|
+
value: val,
|
|
16283
|
+
min: 0,
|
|
16284
|
+
precision: 2,
|
|
16285
|
+
onChange: function onChange(num) {
|
|
16286
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16287
|
+
}
|
|
16288
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16289
|
+
}
|
|
16290
|
+
}, {
|
|
16291
|
+
dataIndex: 'price',
|
|
16292
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16293
|
+
width: 150,
|
|
16294
|
+
render: function render(val) {
|
|
16295
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16296
|
+
}
|
|
16297
|
+
}, {
|
|
16298
|
+
dataIndex: 'type',
|
|
16299
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16300
|
+
width: 150
|
|
16301
|
+
}].map(function (item) {
|
|
16302
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16303
|
+
align: 'center',
|
|
16304
|
+
ellipsis: true
|
|
16305
|
+
});
|
|
16306
|
+
}),
|
|
16307
|
+
KM_REISSUE_GOODS: [{
|
|
16308
|
+
dataIndex: 'skuPropertiesName',
|
|
16309
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16310
|
+
width: 250
|
|
16311
|
+
}, {
|
|
16312
|
+
dataIndex: 'sysTitle',
|
|
16313
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16314
|
+
width: 150
|
|
16315
|
+
}, {
|
|
16316
|
+
dataIndex: 'shortTitle',
|
|
16317
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16318
|
+
width: 150
|
|
16319
|
+
}, {
|
|
16320
|
+
dataIndex: 'title',
|
|
16321
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16322
|
+
width: 150
|
|
16323
|
+
}, {
|
|
16324
|
+
dataIndex: 'sysOuterId',
|
|
16325
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16326
|
+
width: 150
|
|
16327
|
+
}, {
|
|
16328
|
+
dataIndex: 'itemSysId',
|
|
16329
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16330
|
+
width: 150
|
|
16331
|
+
}, {
|
|
16332
|
+
dataIndex: 'skuSysId',
|
|
16333
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16334
|
+
width: 150
|
|
16335
|
+
}, {
|
|
16336
|
+
dataIndex: 'skuId',
|
|
16337
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16338
|
+
width: 170
|
|
16339
|
+
}, {
|
|
16340
|
+
dataIndex: 'realNum',
|
|
16341
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16342
|
+
width: 100,
|
|
16343
|
+
validator: function validator(_rule, value) {
|
|
16344
|
+
var title = '';
|
|
16345
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16346
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16347
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16348
|
+
if (res) {
|
|
16349
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16350
|
+
}
|
|
16351
|
+
return res;
|
|
16352
|
+
})) {
|
|
16353
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16354
|
+
}
|
|
16355
|
+
},
|
|
16356
|
+
render: function render(val, record, index) {
|
|
16357
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16358
|
+
style: {
|
|
16359
|
+
width: 70
|
|
16360
|
+
},
|
|
16361
|
+
value: val,
|
|
16362
|
+
min: 1,
|
|
16363
|
+
precision: 0,
|
|
16364
|
+
onChange: function onChange(num) {
|
|
16365
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16366
|
+
}
|
|
16367
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16368
|
+
}
|
|
16369
|
+
}, {
|
|
16370
|
+
dataIndex: 'desiredNum',
|
|
16371
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16372
|
+
width: 100,
|
|
16373
|
+
render: function render(val, record, index) {
|
|
16374
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16375
|
+
style: {
|
|
16376
|
+
width: 70
|
|
16377
|
+
},
|
|
16378
|
+
value: val,
|
|
16379
|
+
min: 1,
|
|
16380
|
+
precision: 0,
|
|
16381
|
+
onChange: function onChange(num) {
|
|
16382
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16383
|
+
}
|
|
16384
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16385
|
+
}
|
|
16386
|
+
}, {
|
|
16387
|
+
dataIndex: 'price',
|
|
16388
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16389
|
+
width: 150,
|
|
16390
|
+
render: function render(val) {
|
|
16391
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16392
|
+
}
|
|
16393
|
+
}, {
|
|
16394
|
+
dataIndex: 'payment',
|
|
16395
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16396
|
+
width: 150,
|
|
16397
|
+
render: function render(val, record, index) {
|
|
16398
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16399
|
+
style: {
|
|
16400
|
+
width: 130
|
|
16401
|
+
},
|
|
16402
|
+
value: val,
|
|
16403
|
+
min: 0,
|
|
16404
|
+
precision: 2,
|
|
16405
|
+
onChange: function onChange(num) {
|
|
16406
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16407
|
+
}
|
|
16408
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16409
|
+
}
|
|
16410
|
+
}, {
|
|
16411
|
+
dataIndex: 'type',
|
|
16412
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16413
|
+
width: 150
|
|
16414
|
+
}, {
|
|
16415
|
+
dataIndex: 'sysPicPath',
|
|
16416
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16417
|
+
width: 100,
|
|
16418
|
+
render: function render(val) {
|
|
16419
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16420
|
+
width: 60,
|
|
16421
|
+
src: val
|
|
16422
|
+
});
|
|
16423
|
+
}
|
|
16424
|
+
}].map(function (item) {
|
|
16425
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16426
|
+
align: 'center',
|
|
16427
|
+
ellipsis: true
|
|
16428
|
+
});
|
|
16429
|
+
})
|
|
16430
|
+
};
|
|
16431
|
+
};
|
|
16432
|
+
|
|
16433
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16434
|
+
var _ref$text = _ref.text,
|
|
16435
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16436
|
+
disabled = _ref.disabled,
|
|
16437
|
+
updateHandle = _ref.updateHandle;
|
|
16438
|
+
return {
|
|
16439
|
+
//bs商品信息
|
|
16440
|
+
default: [{
|
|
16441
|
+
dataIndex: 'mark',
|
|
16442
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16443
|
+
align: 'center',
|
|
16444
|
+
ellipsis: true,
|
|
16445
|
+
width: 70,
|
|
16446
|
+
render: function render(val, record, index) {
|
|
15663
16447
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
15664
16448
|
options: [{
|
|
15665
16449
|
label: '是',
|
|
@@ -15759,7 +16543,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15759
16543
|
disabled = _ref.disabled,
|
|
15760
16544
|
updateHandle = _ref.updateHandle,
|
|
15761
16545
|
updateDataHandle = _ref.updateDataHandle;
|
|
15762
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16546
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15763
16547
|
text: text,
|
|
15764
16548
|
disabled: disabled,
|
|
15765
16549
|
updateHandle: updateHandle
|
|
@@ -15784,8 +16568,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15784
16568
|
text: text,
|
|
15785
16569
|
disabled: disabled,
|
|
15786
16570
|
updateHandle: updateHandle
|
|
16571
|
+
})), getColumns$6({
|
|
16572
|
+
text: text,
|
|
16573
|
+
disabled: disabled,
|
|
16574
|
+
updateHandle: updateHandle
|
|
15787
16575
|
})), {}, {
|
|
15788
|
-
default: getColumns$
|
|
16576
|
+
default: getColumns$7({
|
|
15789
16577
|
text: text,
|
|
15790
16578
|
disabled: disabled,
|
|
15791
16579
|
updateHandle: updateHandle
|
|
@@ -15937,6 +16725,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15937
16725
|
})));
|
|
15938
16726
|
}
|
|
15939
16727
|
|
|
16728
|
+
var isErpType = {
|
|
16729
|
+
isWdt: function isWdt(type) {
|
|
16730
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16731
|
+
},
|
|
16732
|
+
isBsE3: function isBsE3(type) {
|
|
16733
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16734
|
+
},
|
|
16735
|
+
isGy: function isGy(type) {
|
|
16736
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16737
|
+
},
|
|
16738
|
+
isJst: function isJst(type) {
|
|
16739
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16740
|
+
},
|
|
16741
|
+
isKm: function isKm(type) {
|
|
16742
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16743
|
+
}
|
|
16744
|
+
};
|
|
16745
|
+
var processGoods = function processGoods(_ref) {
|
|
16746
|
+
var list = _ref.list,
|
|
16747
|
+
type = _ref.type,
|
|
16748
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16749
|
+
var newList = [];
|
|
16750
|
+
// 根据商品类型处理数据
|
|
16751
|
+
if (isErpType.isWdt(type)) {
|
|
16752
|
+
newList = processWdtGoods({
|
|
16753
|
+
list: list,
|
|
16754
|
+
type: type,
|
|
16755
|
+
canUpdateNumber: canUpdateNumber
|
|
16756
|
+
});
|
|
16757
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16758
|
+
newList = processBsE3Goods({
|
|
16759
|
+
list: list,
|
|
16760
|
+
type: type,
|
|
16761
|
+
canUpdateNumber: canUpdateNumber
|
|
16762
|
+
});
|
|
16763
|
+
} else if (isErpType.isGy(type)) {
|
|
16764
|
+
newList = processGyGoods({
|
|
16765
|
+
list: list,
|
|
16766
|
+
type: type,
|
|
16767
|
+
canUpdateNumber: canUpdateNumber
|
|
16768
|
+
});
|
|
16769
|
+
} else if (isErpType.isJst(type)) {
|
|
16770
|
+
newList = processJstGoods({
|
|
16771
|
+
list: list,
|
|
16772
|
+
type: type,
|
|
16773
|
+
canUpdateNumber: canUpdateNumber
|
|
16774
|
+
});
|
|
16775
|
+
} else if (isErpType.isKm(type)) {
|
|
16776
|
+
newList = processKmGoods({
|
|
16777
|
+
list: list,
|
|
16778
|
+
type: type,
|
|
16779
|
+
canUpdateNumber: canUpdateNumber
|
|
16780
|
+
});
|
|
16781
|
+
} else {
|
|
16782
|
+
newList = processDefaultGoods({
|
|
16783
|
+
list: list,
|
|
16784
|
+
type: type,
|
|
16785
|
+
canUpdateNumber: canUpdateNumber
|
|
16786
|
+
});
|
|
16787
|
+
}
|
|
16788
|
+
return newList;
|
|
16789
|
+
};
|
|
16790
|
+
// 处理不同类型的商品数据
|
|
16791
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16792
|
+
var list = _ref2.list,
|
|
16793
|
+
type = _ref2.type,
|
|
16794
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16795
|
+
return list.map(function (item) {
|
|
16796
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16797
|
+
uuid: kmkfUtils.uuid(),
|
|
16798
|
+
canDelete: true,
|
|
16799
|
+
num: 1,
|
|
16800
|
+
orderPrice: 0,
|
|
16801
|
+
sharePrice: 0,
|
|
16802
|
+
canUpdateNumber: canUpdateNumber
|
|
16803
|
+
});
|
|
16804
|
+
// 特殊处理换货商品
|
|
16805
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16806
|
+
processedItem.price = item.retailPrice;
|
|
16807
|
+
processedItem.type = '1';
|
|
16808
|
+
}
|
|
16809
|
+
return processedItem;
|
|
16810
|
+
});
|
|
16811
|
+
};
|
|
16812
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16813
|
+
var list = _ref3.list,
|
|
16814
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16815
|
+
return list.map(function (item) {
|
|
16816
|
+
var specNo = item.specNo,
|
|
16817
|
+
specId = item.specId,
|
|
16818
|
+
goodName = item.goodName,
|
|
16819
|
+
goodShortName = item.goodShortName,
|
|
16820
|
+
goodPicUrl = item.goodPicUrl,
|
|
16821
|
+
goodNo = item.goodNo,
|
|
16822
|
+
goodId = item.goodId,
|
|
16823
|
+
retailPrice = item.retailPrice;
|
|
16824
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16825
|
+
sku: specNo,
|
|
16826
|
+
skuId: specId,
|
|
16827
|
+
goodsName: goodName,
|
|
16828
|
+
goodsShortName: goodShortName,
|
|
16829
|
+
picPath: goodPicUrl,
|
|
16830
|
+
goodsSn: goodNo,
|
|
16831
|
+
goodsId: goodId,
|
|
16832
|
+
goodsPrice: retailPrice,
|
|
16833
|
+
shopPrice: retailPrice,
|
|
16834
|
+
sharePayment: '',
|
|
16835
|
+
sharePrice: '',
|
|
16836
|
+
payment: '',
|
|
16837
|
+
tcSku: '',
|
|
16838
|
+
tcGoodsNumber: '',
|
|
16839
|
+
taoCanSingleSl: '',
|
|
16840
|
+
isGift: '',
|
|
16841
|
+
uuid: kmkfUtils.uuid(),
|
|
16842
|
+
canDelete: true,
|
|
16843
|
+
canEdit: true,
|
|
16844
|
+
goodsNumber: 1,
|
|
16845
|
+
canUpdateNumber: canUpdateNumber
|
|
16846
|
+
});
|
|
16847
|
+
});
|
|
16848
|
+
};
|
|
16849
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16850
|
+
var list = _ref4.list;
|
|
16851
|
+
return list.map(function (item) {
|
|
16852
|
+
var goodName = item.goodName,
|
|
16853
|
+
goodShortName = item.goodShortName,
|
|
16854
|
+
goodNo = item.goodNo,
|
|
16855
|
+
specName = item.specName,
|
|
16856
|
+
specNo = item.specNo,
|
|
16857
|
+
retailPrice = item.retailPrice;
|
|
16858
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16859
|
+
uuid: kmkfUtils.uuid(),
|
|
16860
|
+
canDelete: true,
|
|
16861
|
+
canEdit: true,
|
|
16862
|
+
qty: 1,
|
|
16863
|
+
goodName: goodName,
|
|
16864
|
+
goodShortName: goodShortName,
|
|
16865
|
+
goodNo: goodNo,
|
|
16866
|
+
specName: specName,
|
|
16867
|
+
specNo: specNo,
|
|
16868
|
+
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16869
|
+
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16870
|
+
});
|
|
16871
|
+
});
|
|
16872
|
+
};
|
|
16873
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16874
|
+
var list = _ref5.list;
|
|
16875
|
+
return list.map(function (item) {
|
|
16876
|
+
return {
|
|
16877
|
+
name: item.goodName,
|
|
16878
|
+
skuId: item.goodNo,
|
|
16879
|
+
iId: item.styleCode,
|
|
16880
|
+
pic: item.goodPicUrl,
|
|
16881
|
+
propertiesValue: item.propertiesValue,
|
|
16882
|
+
saleBasePrice: item.retailPrice,
|
|
16883
|
+
salePrice: item.retailPrice,
|
|
16884
|
+
remark: '',
|
|
16885
|
+
uuid: kmkfUtils.uuid(),
|
|
16886
|
+
canDelete: true,
|
|
16887
|
+
canEdit: true,
|
|
16888
|
+
qty: 1
|
|
16889
|
+
};
|
|
16890
|
+
});
|
|
16891
|
+
};
|
|
16892
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16893
|
+
var list = _ref6.list,
|
|
16894
|
+
type = _ref6.type;
|
|
16895
|
+
var initParamsMap = {
|
|
16896
|
+
KM_GOODS: {
|
|
16897
|
+
num: 1
|
|
16898
|
+
},
|
|
16899
|
+
KM_REISSUE_GOODS: {
|
|
16900
|
+
realNum: 1,
|
|
16901
|
+
desiredNum: 1
|
|
16902
|
+
}
|
|
16903
|
+
};
|
|
16904
|
+
return list.map(function (item) {
|
|
16905
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16906
|
+
skuPropertiesName: item.specName,
|
|
16907
|
+
sysTitle: item.goodName,
|
|
16908
|
+
title: null,
|
|
16909
|
+
shortTitle: item.goodShortName,
|
|
16910
|
+
sysOuterId: item.goodNo,
|
|
16911
|
+
outerId: item.goodNo,
|
|
16912
|
+
skuSysId: item.specId,
|
|
16913
|
+
itemSysId: item.goodId,
|
|
16914
|
+
sysPicPath: item.goodPicUrl,
|
|
16915
|
+
payment: null,
|
|
16916
|
+
price: item.retailPrice,
|
|
16917
|
+
type: null,
|
|
16918
|
+
uuid: kmkfUtils.uuid(),
|
|
16919
|
+
canDelete: true,
|
|
16920
|
+
canEdit: true
|
|
16921
|
+
}, initParamsMap[type] || {});
|
|
16922
|
+
});
|
|
16923
|
+
};
|
|
16924
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16925
|
+
var list = _ref7.list,
|
|
16926
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16927
|
+
return list.map(function (item) {
|
|
16928
|
+
var goodsId = item.goodsId,
|
|
16929
|
+
name = item.name,
|
|
16930
|
+
code = item.code,
|
|
16931
|
+
skuCode = item.skuCode,
|
|
16932
|
+
marketPrice = item.marketPrice,
|
|
16933
|
+
skuName = item.skuName;
|
|
16934
|
+
return {
|
|
16935
|
+
id: goodsId,
|
|
16936
|
+
mark: '是',
|
|
16937
|
+
pic: '',
|
|
16938
|
+
skuName: skuName,
|
|
16939
|
+
name: name,
|
|
16940
|
+
code: code,
|
|
16941
|
+
sku: skuCode,
|
|
16942
|
+
money: marketPrice || 0,
|
|
16943
|
+
share: marketPrice || 0,
|
|
16944
|
+
number: 1,
|
|
16945
|
+
type: '',
|
|
16946
|
+
uuid: kmkfUtils.uuid(),
|
|
16947
|
+
canDelete: true,
|
|
16948
|
+
canUpdateNumber: canUpdateNumber
|
|
16949
|
+
};
|
|
16950
|
+
});
|
|
16951
|
+
};
|
|
16952
|
+
|
|
15940
16953
|
var GoodsModalMap = {
|
|
15941
16954
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15942
16955
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15951,6 +16964,8 @@ var GoodsModalMap = {
|
|
|
15951
16964
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15952
16965
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15953
16966
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16967
|
+
KM_GOODS: KmGoodsModal,
|
|
16968
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15954
16969
|
OTHER_GOODS: GoodsModal$2
|
|
15955
16970
|
};
|
|
15956
16971
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15984,7 +16999,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15984
16999
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15985
17000
|
}));
|
|
15986
17001
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15987
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17002
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15988
17003
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15989
17004
|
};
|
|
15990
17005
|
var rowSelection = {
|
|
@@ -16013,6 +17028,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16013
17028
|
};
|
|
16014
17029
|
var getButtonText = function getButtonText() {
|
|
16015
17030
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17031
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17032
|
+
return '选择快麦ERP商品';
|
|
17033
|
+
}
|
|
16016
17034
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16017
17035
|
return '选择百胜ERP商品';
|
|
16018
17036
|
}
|
|
@@ -16156,6 +17174,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16156
17174
|
case 'JST_RETURN_GOODS':
|
|
16157
17175
|
case 'GY_REISSUE_GOODS':
|
|
16158
17176
|
case 'GY_RETURN_GOODS':
|
|
17177
|
+
case 'KM_GOODS':
|
|
17178
|
+
case 'KM_REISSUE_GOODS':
|
|
16159
17179
|
{
|
|
16160
17180
|
columns = getColumnsMap$1({
|
|
16161
17181
|
text: text,
|
|
@@ -16273,120 +17293,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16273
17293
|
}].concat(_toConsumableArray(columns));
|
|
16274
17294
|
}, []);
|
|
16275
17295
|
var onSubmit = function onSubmit(list) {
|
|
16276
|
-
var newList =
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
item.num = 1;
|
|
16282
|
-
item.orderPrice = 0;
|
|
16283
|
-
item.sharePrice = 0;
|
|
16284
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16285
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16286
|
-
item.price = item.retailPrice;
|
|
16287
|
-
item.type = '1';
|
|
16288
|
-
}
|
|
16289
|
-
return item;
|
|
16290
|
-
});
|
|
16291
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16292
|
-
newList = list.map(function (item) {
|
|
16293
|
-
var specNo = item.specNo,
|
|
16294
|
-
specId = item.specId,
|
|
16295
|
-
goodName = item.goodName,
|
|
16296
|
-
goodShortName = item.goodShortName,
|
|
16297
|
-
goodPicUrl = item.goodPicUrl,
|
|
16298
|
-
goodNo = item.goodNo,
|
|
16299
|
-
goodId = item.goodId,
|
|
16300
|
-
retailPrice = item.retailPrice;
|
|
16301
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16302
|
-
sku: specNo,
|
|
16303
|
-
skuId: specId,
|
|
16304
|
-
goodsName: goodName,
|
|
16305
|
-
goodsShortName: goodShortName,
|
|
16306
|
-
picPath: goodPicUrl,
|
|
16307
|
-
goodsSn: goodNo,
|
|
16308
|
-
goodsId: goodId,
|
|
16309
|
-
goodsPrice: retailPrice,
|
|
16310
|
-
shopPrice: retailPrice,
|
|
16311
|
-
sharePayment: '',
|
|
16312
|
-
sharePrice: '',
|
|
16313
|
-
payment: '',
|
|
16314
|
-
tcSku: '',
|
|
16315
|
-
tcGoodsNumber: '',
|
|
16316
|
-
taoCanSingleSl: '',
|
|
16317
|
-
isGift: '',
|
|
16318
|
-
uuid: kmkfUtils.uuid(),
|
|
16319
|
-
canDelete: true,
|
|
16320
|
-
canEdit: true,
|
|
16321
|
-
goodsNumber: 1,
|
|
16322
|
-
canUpdateNumber: canUpdateNumber
|
|
16323
|
-
});
|
|
16324
|
-
});
|
|
16325
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16326
|
-
newList = list.map(function (item) {
|
|
16327
|
-
var goodName = item.goodName,
|
|
16328
|
-
goodShortName = item.goodShortName,
|
|
16329
|
-
goodNo = item.goodNo,
|
|
16330
|
-
specName = item.specName,
|
|
16331
|
-
specNo = item.specNo,
|
|
16332
|
-
retailPrice = item.retailPrice;
|
|
16333
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16334
|
-
uuid: kmkfUtils.uuid(),
|
|
16335
|
-
canDelete: true,
|
|
16336
|
-
canEdit: true,
|
|
16337
|
-
qty: 1,
|
|
16338
|
-
goodName: goodName,
|
|
16339
|
-
goodShortName: goodShortName,
|
|
16340
|
-
goodNo: goodNo,
|
|
16341
|
-
specName: specName,
|
|
16342
|
-
specNo: specNo,
|
|
16343
|
-
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16344
|
-
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16345
|
-
});
|
|
16346
|
-
});
|
|
16347
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16348
|
-
newList = list.map(function (item) {
|
|
16349
|
-
return {
|
|
16350
|
-
name: item.goodName,
|
|
16351
|
-
skuId: item.goodNo,
|
|
16352
|
-
iId: item.styleCode,
|
|
16353
|
-
pic: item.goodPicUrl,
|
|
16354
|
-
propertiesValue: item.propertiesValue,
|
|
16355
|
-
saleBasePrice: item.retailPrice,
|
|
16356
|
-
salePrice: item.retailPrice,
|
|
16357
|
-
remark: '',
|
|
16358
|
-
uuid: kmkfUtils.uuid(),
|
|
16359
|
-
canDelete: true,
|
|
16360
|
-
canEdit: true,
|
|
16361
|
-
qty: 1
|
|
16362
|
-
};
|
|
16363
|
-
});
|
|
16364
|
-
} else {
|
|
16365
|
-
newList = list.map(function (item) {
|
|
16366
|
-
var goodsId = item.goodsId,
|
|
16367
|
-
name = item.name,
|
|
16368
|
-
code = item.code,
|
|
16369
|
-
skuCode = item.skuCode,
|
|
16370
|
-
marketPrice = item.marketPrice,
|
|
16371
|
-
skuName = item.skuName;
|
|
16372
|
-
return {
|
|
16373
|
-
id: goodsId,
|
|
16374
|
-
mark: '是',
|
|
16375
|
-
pic: '',
|
|
16376
|
-
skuName: skuName,
|
|
16377
|
-
name: name,
|
|
16378
|
-
code: code,
|
|
16379
|
-
sku: skuCode,
|
|
16380
|
-
money: marketPrice || 0,
|
|
16381
|
-
share: marketPrice || 0,
|
|
16382
|
-
number: 1,
|
|
16383
|
-
type: '',
|
|
16384
|
-
uuid: kmkfUtils.uuid(),
|
|
16385
|
-
canDelete: true,
|
|
16386
|
-
canUpdateNumber: canUpdateNumber
|
|
16387
|
-
};
|
|
16388
|
-
});
|
|
16389
|
-
}
|
|
17296
|
+
var newList = processGoods({
|
|
17297
|
+
list: list,
|
|
17298
|
+
canUpdateNumber: canUpdateNumber,
|
|
17299
|
+
type: type
|
|
17300
|
+
});
|
|
16390
17301
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16391
17302
|
};
|
|
16392
17303
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17100,10 +18011,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17100
18011
|
var _data$data, _data$data$trades;
|
|
17101
18012
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
17102
18013
|
data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18014
|
+
var _tradeStatusMap$data$;
|
|
17103
18015
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17104
18016
|
billNo: item.tradeNo,
|
|
17105
18017
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17106
|
-
billTag: item.tagName
|
|
18018
|
+
billTag: item.tagName,
|
|
18019
|
+
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17107
18020
|
});
|
|
17108
18021
|
});
|
|
17109
18022
|
}
|
|
@@ -17186,6 +18099,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17186
18099
|
deliveryState: item.deliveryState,
|
|
17187
18100
|
vipCode: item.vipCode,
|
|
17188
18101
|
shopCode: item.shopCode,
|
|
18102
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17189
18103
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17190
18104
|
});
|
|
17191
18105
|
});
|
|
@@ -17304,7 +18218,7 @@ var kmUtils = {
|
|
|
17304
18218
|
getOrderListSingleton: getOrderListSingleton
|
|
17305
18219
|
};
|
|
17306
18220
|
|
|
17307
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18221
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17308
18222
|
var columnsMap = {
|
|
17309
18223
|
BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17310
18224
|
KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17346,7 +18260,6 @@ var index$3 = (function (props) {
|
|
|
17346
18260
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17347
18261
|
getBsE3OrderList(value.orderNo);
|
|
17348
18262
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17349
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17350
18263
|
getGyOrderList(value.orderNo);
|
|
17351
18264
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17352
18265
|
getJstOrderList(value.orderNo);
|
|
@@ -17460,11 +18373,13 @@ var index$3 = (function (props) {
|
|
|
17460
18373
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17461
18374
|
var billNo = _ref4.billNo,
|
|
17462
18375
|
billType = _ref4.billType,
|
|
17463
|
-
billTag = _ref4.billTag
|
|
18376
|
+
billTag = _ref4.billTag,
|
|
18377
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17464
18378
|
return {
|
|
17465
18379
|
billNo: billNo,
|
|
17466
18380
|
billType: billType,
|
|
17467
|
-
billTag: billTag
|
|
18381
|
+
billTag: billTag,
|
|
18382
|
+
tradeStatusValue: tradeStatusValue
|
|
17468
18383
|
};
|
|
17469
18384
|
})
|
|
17470
18385
|
}));
|
|
@@ -17578,6 +18493,7 @@ var index$3 = (function (props) {
|
|
|
17578
18493
|
deliveryState = _ref10.deliveryState,
|
|
17579
18494
|
vipCode = _ref10.vipCode,
|
|
17580
18495
|
shopCode = _ref10.shopCode,
|
|
18496
|
+
cancel = _ref10.cancel,
|
|
17581
18497
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17582
18498
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17583
18499
|
billNo: billNo,
|
|
@@ -17585,6 +18501,7 @@ var index$3 = (function (props) {
|
|
|
17585
18501
|
billTag: billTag,
|
|
17586
18502
|
tradeTagName: tradeTagName,
|
|
17587
18503
|
deliveryState: deliveryState,
|
|
18504
|
+
cancelName: cancel ? '是' : '否',
|
|
17588
18505
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17589
18506
|
vipCode: vipCode,
|
|
17590
18507
|
shopCode: shopCode
|
|
@@ -17774,6 +18691,31 @@ var componentMap$1 = {
|
|
|
17774
18691
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17775
18692
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17776
18693
|
}
|
|
18694
|
+
},
|
|
18695
|
+
KM_GOODS: {
|
|
18696
|
+
type: 'km',
|
|
18697
|
+
key: 'kmGoods',
|
|
18698
|
+
name: '快麦',
|
|
18699
|
+
orderNo: 'tid',
|
|
18700
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18701
|
+
eventNameMap: {
|
|
18702
|
+
// pubsub 事件
|
|
18703
|
+
type: 'kmType',
|
|
18704
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
18705
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18706
|
+
selectList: 'kmSelectList',
|
|
18707
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18708
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18709
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18710
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18711
|
+
reissueType: 'kmReissueType',
|
|
18712
|
+
returnType: 'kmReturnType',
|
|
18713
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18714
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18715
|
+
deleteGood: 'kmDeleteGood',
|
|
18716
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18717
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18718
|
+
}
|
|
17777
18719
|
}
|
|
17778
18720
|
};
|
|
17779
18721
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17782,7 +18724,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17782
18724
|
disabled = props.disabled,
|
|
17783
18725
|
onChange = props.onChange,
|
|
17784
18726
|
compType = props.type;
|
|
17785
|
-
console.log('value?.orders', value
|
|
18727
|
+
// console.log('value?.orders', value?.orders);
|
|
17786
18728
|
// 合并单订单会包含","
|
|
17787
18729
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17788
18730
|
var _order$componentMap$c;
|
|
@@ -17935,7 +18877,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17935
18877
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17936
18878
|
var mode = _ref2.mode;
|
|
17937
18879
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17938
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18880
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18881
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18882
|
+
});
|
|
17939
18883
|
var orderNo = value.orderNo;
|
|
17940
18884
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17941
18885
|
var _componentMap$compTyp;
|
|
@@ -17989,7 +18933,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17989
18933
|
_props$reasonList = props.reasonList,
|
|
17990
18934
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17991
18935
|
disabled = props.disabled,
|
|
17992
|
-
compType = props.type
|
|
18936
|
+
compType = props.type,
|
|
18937
|
+
isSettingConfig = props.isSettingConfig;
|
|
17993
18938
|
var valueRef = React.useRef({});
|
|
17994
18939
|
React.useEffect(function () {
|
|
17995
18940
|
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18081,7 +19026,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18081
19026
|
var newValue = _objectSpread2({}, value);
|
|
18082
19027
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18083
19028
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18084
|
-
if (['2'].includes(val[0])) {
|
|
19029
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18085
19030
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18086
19031
|
valueRef.current = newValue;
|
|
18087
19032
|
}
|
|
@@ -18103,7 +19048,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18103
19048
|
style: {
|
|
18104
19049
|
marginBottom: '8px'
|
|
18105
19050
|
},
|
|
18106
|
-
disabled: disabled,
|
|
19051
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18107
19052
|
allowClear: false,
|
|
18108
19053
|
options: reasonList,
|
|
18109
19054
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18285,7 +19230,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18285
19230
|
})));
|
|
18286
19231
|
};
|
|
18287
19232
|
|
|
18288
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19233
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18289
19234
|
var typeMap$1 = {
|
|
18290
19235
|
WDT_REISSUE_GOODS: {
|
|
18291
19236
|
key: 'wdtReissueGoods',
|
|
@@ -18306,13 +19251,14 @@ var typeMap$1 = {
|
|
|
18306
19251
|
}
|
|
18307
19252
|
};
|
|
18308
19253
|
var wdtReissue = function wdtReissue(props) {
|
|
18309
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19254
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18310
19255
|
var value = props.value,
|
|
18311
19256
|
onChange = props.onChange,
|
|
18312
19257
|
_props$reasonList = props.reasonList,
|
|
18313
19258
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18314
19259
|
disabled = props.disabled,
|
|
18315
19260
|
type = props.type,
|
|
19261
|
+
isSettingConfig = props.isSettingConfig,
|
|
18316
19262
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18317
19263
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
18318
19264
|
var _order$srcTid;
|
|
@@ -18376,11 +19322,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18376
19322
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18377
19323
|
var billNo = _ref2.billNo,
|
|
18378
19324
|
billType = _ref2.billType,
|
|
18379
|
-
billTag = _ref2.billTag
|
|
19325
|
+
billTag = _ref2.billTag,
|
|
19326
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18380
19327
|
return {
|
|
18381
19328
|
billNo: billNo,
|
|
18382
19329
|
billType: billType,
|
|
18383
|
-
billTag: billTag
|
|
19330
|
+
billTag: billTag,
|
|
19331
|
+
tradeStatusValue: tradeStatusValue
|
|
18384
19332
|
};
|
|
18385
19333
|
});
|
|
18386
19334
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18463,7 +19411,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18463
19411
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18464
19412
|
};
|
|
18465
19413
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18466
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19414
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18467
19415
|
var newValue = _objectSpread2({}, value);
|
|
18468
19416
|
// 原订单商品
|
|
18469
19417
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18474,14 +19422,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18474
19422
|
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18475
19423
|
return skuList.includes(item.uuid);
|
|
18476
19424
|
});
|
|
18477
|
-
console.log('商品发生变化', newValue[
|
|
19425
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18478
19426
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18479
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19427
|
+
}, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
|
|
18480
19428
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18481
19429
|
var showChangeBtn = React.useMemo(function () {
|
|
18482
|
-
var _typeMap$
|
|
18483
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18484
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19430
|
+
var _typeMap$type24;
|
|
19431
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19432
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18485
19433
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18486
19434
|
gutter: 8,
|
|
18487
19435
|
wrap: true
|
|
@@ -18495,16 +19443,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18495
19443
|
}
|
|
18496
19444
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18497
19445
|
style: {
|
|
18498
|
-
marginBottom: '8px'
|
|
19446
|
+
marginBottom: '8px',
|
|
19447
|
+
width: '100%'
|
|
18499
19448
|
},
|
|
18500
19449
|
disabled: disabled,
|
|
18501
19450
|
allowClear: false,
|
|
18502
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19451
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
18503
19452
|
onChange: function onChange(val) {
|
|
18504
19453
|
return changeSystemOrderHandle(val);
|
|
18505
19454
|
},
|
|
18506
19455
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18507
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19456
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18508
19457
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18509
19458
|
key: item.billNo,
|
|
18510
19459
|
value: item.billNo,
|
|
@@ -18520,12 +19469,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18520
19469
|
}
|
|
18521
19470
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18522
19471
|
style: {
|
|
18523
|
-
marginBottom: '8px'
|
|
19472
|
+
marginBottom: '8px',
|
|
19473
|
+
width: '100%'
|
|
18524
19474
|
},
|
|
18525
|
-
disabled: disabled,
|
|
19475
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18526
19476
|
allowClear: false,
|
|
18527
19477
|
options: reasonList,
|
|
18528
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19478
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
18529
19479
|
onChange: function onChange(val) {
|
|
18530
19480
|
return changeTypeHandle(val);
|
|
18531
19481
|
}
|
|
@@ -18537,7 +19487,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18537
19487
|
canUpdateNumber: showChangeBtn,
|
|
18538
19488
|
showChangeBtn: showChangeBtn,
|
|
18539
19489
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18540
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19490
|
+
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.key)],
|
|
18541
19491
|
onChange: function onChange(val) {
|
|
18542
19492
|
return changeGoodHandle(val);
|
|
18543
19493
|
},
|
|
@@ -18553,7 +19503,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18553
19503
|
})));
|
|
18554
19504
|
};
|
|
18555
19505
|
|
|
18556
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19506
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18557
19507
|
var typeMap$2 = {
|
|
18558
19508
|
JST_REISSUE_GOODS: {
|
|
18559
19509
|
compType: '补发',
|
|
@@ -18568,7 +19518,9 @@ var typeMap$2 = {
|
|
|
18568
19518
|
orderTypeKey: 'orderType',
|
|
18569
19519
|
oIdKey: 'oId',
|
|
18570
19520
|
outerOiIdKey: '',
|
|
18571
|
-
goodDetailsKey: 'items'
|
|
19521
|
+
goodDetailsKey: 'items',
|
|
19522
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19523
|
+
uniqueKey: 'uuid'
|
|
18572
19524
|
},
|
|
18573
19525
|
JST_RETURN_GOODS: {
|
|
18574
19526
|
compType: '退货',
|
|
@@ -18584,6 +19536,8 @@ var typeMap$2 = {
|
|
|
18584
19536
|
oIdKey: 'oId',
|
|
18585
19537
|
outerOiIdKey: '',
|
|
18586
19538
|
goodDetailsKey: 'items',
|
|
19539
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19540
|
+
uniqueKey: 'uuid',
|
|
18587
19541
|
eventNameMap: {
|
|
18588
19542
|
// pubsub 事件
|
|
18589
19543
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18591,16 +19545,32 @@ var typeMap$2 = {
|
|
|
18591
19545
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18592
19546
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18593
19547
|
}
|
|
19548
|
+
},
|
|
19549
|
+
KM_REISSUE_GOODS: {
|
|
19550
|
+
compType: '补发',
|
|
19551
|
+
key: 'kmReissueGoods',
|
|
19552
|
+
typeName: 'kmReissueType',
|
|
19553
|
+
systemOrder: 'kmSystemOrder',
|
|
19554
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19555
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19556
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
19557
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19558
|
+
orderTypeKey: 'orderType',
|
|
19559
|
+
oIdKey: 'billNo',
|
|
19560
|
+
outerOiIdKey: '',
|
|
19561
|
+
goodDetailsKey: 'subOrders',
|
|
19562
|
+
uniqueKey: 'id'
|
|
18594
19563
|
}
|
|
18595
19564
|
};
|
|
18596
19565
|
var PublicReissue = function PublicReissue(props) {
|
|
18597
|
-
var _typeMap$
|
|
19566
|
+
var _typeMap$type32, _typeMap$type37, _typeMap$type38, _typeMap$type39, _typeMap$type40, _value$typeMap$type$s6, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48;
|
|
18598
19567
|
var value = props.value,
|
|
18599
19568
|
onChange = props.onChange,
|
|
18600
19569
|
_props$reasonList = props.reasonList,
|
|
18601
19570
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18602
19571
|
disabled = props.disabled,
|
|
18603
19572
|
type = props.type,
|
|
19573
|
+
isSettingConfig = props.isSettingConfig,
|
|
18604
19574
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18605
19575
|
var getOrderFlag = React.useRef(false);
|
|
18606
19576
|
var _useState = React.useState(false),
|
|
@@ -18707,7 +19677,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18707
19677
|
}))));
|
|
18708
19678
|
};
|
|
18709
19679
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18710
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19680
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18711
19681
|
var mode = _ref4.mode,
|
|
18712
19682
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18713
19683
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
@@ -18715,63 +19685,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18715
19685
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18716
19686
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18717
19687
|
});
|
|
18718
|
-
var
|
|
19688
|
+
var orderRest = undefined;
|
|
19689
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19690
|
+
orderRest = true;
|
|
19691
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19692
|
+
orderRest = {
|
|
19693
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19694
|
+
canEdit: true
|
|
19695
|
+
};
|
|
19696
|
+
}
|
|
19697
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], orderRest)) : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.updateGoodsHandle([order], orderRest) : [];
|
|
18719
19698
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18720
|
-
|
|
19699
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18721
19700
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18722
19701
|
}) : goodDetails;
|
|
19702
|
+
return list;
|
|
18723
19703
|
};
|
|
18724
19704
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18725
|
-
var _typeMap$
|
|
19705
|
+
var _typeMap$type21;
|
|
18726
19706
|
var newValue = _objectSpread2({}, value);
|
|
18727
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19707
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = val || [];
|
|
18728
19708
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18729
19709
|
};
|
|
18730
19710
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18731
|
-
var _typeMap$
|
|
19711
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18732
19712
|
var newValue = _objectSpread2({}, value);
|
|
18733
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18734
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18735
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18736
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19713
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
19714
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderBillType) {
|
|
19715
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19716
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
|
|
18737
19717
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18738
|
-
var _typeMap$
|
|
18739
|
-
return oItem[(_typeMap$
|
|
19718
|
+
var _typeMap$type25;
|
|
19719
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18740
19720
|
});
|
|
18741
|
-
newValue[(_typeMap$
|
|
18742
|
-
}
|
|
18743
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18744
|
-
var _typeMap$
|
|
18745
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18746
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18747
|
-
var _typeMap$
|
|
18748
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19721
|
+
newValue[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.orderTypeKey];
|
|
19722
|
+
}
|
|
19723
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
19724
|
+
var _typeMap$type29;
|
|
19725
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)] = [];
|
|
19726
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19727
|
+
var _typeMap$type31;
|
|
19728
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = getGoodDetails({
|
|
18749
19729
|
mode: isStrict,
|
|
18750
19730
|
sysOrderNo: val
|
|
18751
19731
|
});
|
|
18752
19732
|
}
|
|
18753
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19733
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18754
19734
|
};
|
|
18755
19735
|
//显示选择商品按钮
|
|
18756
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19736
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
|
|
18757
19737
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18758
|
-
var _typeMap$
|
|
19738
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18759
19739
|
var newValue = _objectSpread2({}, value);
|
|
18760
19740
|
// 原订单商品
|
|
18761
19741
|
var originTradeGoodList = getGoodDetails({
|
|
18762
19742
|
mode: isStrict
|
|
18763
19743
|
}) || [];
|
|
18764
19744
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18765
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18766
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18767
|
-
|
|
19745
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
|
|
19746
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19747
|
+
var _typeMap$type36;
|
|
19748
|
+
return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.uniqueKey]);
|
|
18768
19749
|
});
|
|
18769
19750
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18770
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19751
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)], isStrict]);
|
|
18771
19752
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18772
19753
|
gutter: 8,
|
|
18773
19754
|
wrap: true,
|
|
18774
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19755
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key) || "".concat(Date.now())
|
|
18775
19756
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18776
19757
|
className: "gutter-row",
|
|
18777
19758
|
xs: {
|
|
@@ -18782,16 +19763,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18782
19763
|
}
|
|
18783
19764
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18784
19765
|
style: {
|
|
18785
|
-
marginBottom: '8px'
|
|
19766
|
+
marginBottom: '8px',
|
|
19767
|
+
width: '100%'
|
|
18786
19768
|
},
|
|
18787
19769
|
disabled: disabled,
|
|
18788
19770
|
allowClear: false,
|
|
18789
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19771
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo)],
|
|
18790
19772
|
onChange: function onChange(val) {
|
|
18791
19773
|
return changeSystemOrderHandle(val);
|
|
18792
19774
|
},
|
|
18793
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18794
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19775
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
19776
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
|
|
18795
19777
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18796
19778
|
key: item[typeMap$2[type].oIdKey],
|
|
18797
19779
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18807,16 +19789,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18807
19789
|
}
|
|
18808
19790
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18809
19791
|
style: {
|
|
18810
|
-
marginBottom: '8px'
|
|
19792
|
+
marginBottom: '8px',
|
|
19793
|
+
width: '100%'
|
|
18811
19794
|
},
|
|
18812
|
-
disabled: disabled,
|
|
19795
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18813
19796
|
allowClear: false,
|
|
18814
19797
|
options: reasonList,
|
|
18815
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19798
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.typeName)],
|
|
18816
19799
|
onChange: function onChange(val) {
|
|
18817
19800
|
return changeTypeHandle(val);
|
|
18818
19801
|
}
|
|
18819
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19802
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18820
19803
|
className: "gutter-row",
|
|
18821
19804
|
xs: {
|
|
18822
19805
|
span: 11
|
|
@@ -18825,7 +19808,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18825
19808
|
span: 6
|
|
18826
19809
|
}
|
|
18827
19810
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18828
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19811
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrderBillType)],
|
|
18829
19812
|
disabled: disabled,
|
|
18830
19813
|
readOnly: true
|
|
18831
19814
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18835,10 +19818,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18835
19818
|
disabled: disabled,
|
|
18836
19819
|
canUpdateNumber: showChangeBtn,
|
|
18837
19820
|
showChangeBtn: showChangeBtn,
|
|
18838
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18839
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19821
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.alwaysShowChooseErpGoodsBtn,
|
|
19822
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.showErpGoodsBtn,
|
|
18840
19823
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18841
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19824
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.key)],
|
|
18842
19825
|
onChange: function onChange(val) {
|
|
18843
19826
|
return changeGoodHandle(val);
|
|
18844
19827
|
},
|
|
@@ -18849,6 +19832,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18849
19832
|
originDataSource: getGoodDetails({
|
|
18850
19833
|
mode: isStrict
|
|
18851
19834
|
}),
|
|
19835
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.uniqueKey) || 'uuid',
|
|
18852
19836
|
selectedGoodsChange: selectedGoodsChange
|
|
18853
19837
|
}
|
|
18854
19838
|
})));
|
|
@@ -19387,6 +20371,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19387
20371
|
var _props$value = props.value,
|
|
19388
20372
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19389
20373
|
onChange = props.onChange,
|
|
20374
|
+
onBlur = props.onBlur,
|
|
19390
20375
|
disabled = props.disabled,
|
|
19391
20376
|
_props$type = props.type,
|
|
19392
20377
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19468,6 +20453,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19468
20453
|
onChange: function onChange(e) {
|
|
19469
20454
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19470
20455
|
},
|
|
20456
|
+
onBlur: onBlur,
|
|
19471
20457
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19472
20458
|
})) : null) : null);
|
|
19473
20459
|
};
|
|
@@ -19609,6 +20595,64 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19609
20595
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19610
20596
|
};
|
|
19611
20597
|
|
|
20598
|
+
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
20599
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20600
|
+
var mode = props.mode,
|
|
20601
|
+
maxSelectCount = props.maxSelectCount,
|
|
20602
|
+
_props$showOnly = props.showOnly,
|
|
20603
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20604
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20605
|
+
_onChange = props.onChange,
|
|
20606
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20607
|
+
var _React$useState = React__default['default'].useState([]),
|
|
20608
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20609
|
+
data = _React$useState2[0],
|
|
20610
|
+
setData = _React$useState2[1];
|
|
20611
|
+
React__default['default'].useEffect(function () {
|
|
20612
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20613
|
+
setData(list);
|
|
20614
|
+
});
|
|
20615
|
+
}, []);
|
|
20616
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20617
|
+
var getValueString = function getValueString(value) {
|
|
20618
|
+
var list = options;
|
|
20619
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
20620
|
+
var _list$filter$map$join;
|
|
20621
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20622
|
+
return value.includes(item.value);
|
|
20623
|
+
}).map(function (item) {
|
|
20624
|
+
return item.label;
|
|
20625
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20626
|
+
} else {
|
|
20627
|
+
var selectedItem = list.find(function (item) {
|
|
20628
|
+
return item.value === value;
|
|
20629
|
+
});
|
|
20630
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20631
|
+
}
|
|
20632
|
+
};
|
|
20633
|
+
if (showOnly) {
|
|
20634
|
+
return getValueString(props.value);
|
|
20635
|
+
}
|
|
20636
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
|
|
20637
|
+
showArrow: true,
|
|
20638
|
+
showSearch: true,
|
|
20639
|
+
filterOption: function filterOption(input, option) {
|
|
20640
|
+
return option.label.includes(input);
|
|
20641
|
+
},
|
|
20642
|
+
notFoundContent: null
|
|
20643
|
+
}, otherProps), {}, {
|
|
20644
|
+
options: options,
|
|
20645
|
+
mode: mode,
|
|
20646
|
+
onChange: function onChange(value, option) {
|
|
20647
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
20648
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
20649
|
+
} else {
|
|
20650
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
20651
|
+
}
|
|
20652
|
+
}
|
|
20653
|
+
}));
|
|
20654
|
+
};
|
|
20655
|
+
|
|
19612
20656
|
var CalculationInput = function CalculationInput(props) {
|
|
19613
20657
|
var _props$config = props.config,
|
|
19614
20658
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19627,7 +20671,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19627
20671
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19628
20672
|
};
|
|
19629
20673
|
|
|
19630
|
-
var _excluded$
|
|
20674
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19631
20675
|
var typeMap$3 = {
|
|
19632
20676
|
BS_E3_REISSUE_GOODS: {
|
|
19633
20677
|
key: 'bsE3ReissueGoods',
|
|
@@ -19645,7 +20689,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19645
20689
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19646
20690
|
disabled = props.disabled,
|
|
19647
20691
|
type = props.type,
|
|
19648
|
-
|
|
20692
|
+
isSettingConfig = props.isSettingConfig,
|
|
20693
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19649
20694
|
var getOrderFlag = React.useRef(false);
|
|
19650
20695
|
var valueRef = React.useRef(null);
|
|
19651
20696
|
var _useState = React.useState(false),
|
|
@@ -19805,7 +20850,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19805
20850
|
}
|
|
19806
20851
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
19807
20852
|
style: {
|
|
19808
|
-
marginBottom: '8px'
|
|
20853
|
+
marginBottom: '8px',
|
|
20854
|
+
width: '100%'
|
|
19809
20855
|
},
|
|
19810
20856
|
disabled: disabled,
|
|
19811
20857
|
allowClear: false,
|
|
@@ -19830,9 +20876,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19830
20876
|
}
|
|
19831
20877
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
19832
20878
|
style: {
|
|
19833
|
-
marginBottom: '8px'
|
|
20879
|
+
marginBottom: '8px',
|
|
20880
|
+
width: '100%'
|
|
19834
20881
|
},
|
|
19835
|
-
disabled: disabled,
|
|
20882
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19836
20883
|
allowClear: false,
|
|
19837
20884
|
options: reasonList,
|
|
19838
20885
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
@@ -19863,7 +20910,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19863
20910
|
})));
|
|
19864
20911
|
};
|
|
19865
20912
|
|
|
19866
|
-
var
|
|
20913
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
20914
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
20915
|
+
styleInject(css_248z$c);
|
|
20916
|
+
|
|
20917
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19867
20918
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19868
20919
|
var typeMap$4 = {
|
|
19869
20920
|
GY_REISSUE_GOODS: {
|
|
@@ -19885,17 +20936,19 @@ var typeMap$4 = {
|
|
|
19885
20936
|
}
|
|
19886
20937
|
};
|
|
19887
20938
|
var GyReissue = function GyReissue(props) {
|
|
19888
|
-
var _typeMap$
|
|
20939
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19889
20940
|
var value = props.value,
|
|
19890
20941
|
onChange = props.onChange,
|
|
19891
20942
|
_props$reasonList = props.reasonList,
|
|
19892
20943
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19893
20944
|
disabled = props.disabled,
|
|
19894
20945
|
type = props.type,
|
|
19895
|
-
|
|
20946
|
+
isSettingConfig = props.isSettingConfig,
|
|
20947
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19896
20948
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19897
20949
|
// order?.platformCode?.includes(';'),
|
|
19898
20950
|
// );
|
|
20951
|
+
var getVipCodeFlag = React.useRef(false);
|
|
19899
20952
|
var getOrderFlag = React.useRef(false);
|
|
19900
20953
|
var valueRef = React.useRef(null);
|
|
19901
20954
|
var _useState = React.useState(false),
|
|
@@ -19903,23 +20956,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19903
20956
|
isStrict = _useState2[0],
|
|
19904
20957
|
setIsStrict = _useState2[1];
|
|
19905
20958
|
React.useEffect(function () {
|
|
19906
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20959
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2, _typeMap$type4, _value$typeMap$type$s5, _typeMap$type5;
|
|
19907
20960
|
valueRef.current = value;
|
|
19908
20961
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
19909
20962
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19910
20963
|
getOrderFlag.current = true;
|
|
19911
20964
|
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
20965
|
+
} else if (!getVipCodeFlag.current && (value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo]) && !(value === null || value === void 0 ? void 0 : value.vipCode) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo)) {
|
|
20966
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20967
|
+
getVipCodeFlag.current = true;
|
|
20968
|
+
getVipCode(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orderNo);
|
|
19912
20969
|
}
|
|
19913
20970
|
return;
|
|
19914
20971
|
}, [value]);
|
|
19915
20972
|
var getOrderList = /*#__PURE__*/function () {
|
|
19916
20973
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19917
|
-
var _typeMap$
|
|
20974
|
+
var _typeMap$type7;
|
|
19918
20975
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19919
20976
|
while (1) switch (_context.prev = _context.next) {
|
|
19920
20977
|
case 0:
|
|
19921
|
-
(_typeMap$
|
|
19922
|
-
var _typeMap$
|
|
20978
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20979
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19923
20980
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19924
20981
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19925
20982
|
var billNo = _ref2.billNo,
|
|
@@ -19941,17 +20998,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19941
20998
|
shopCode: shopCode
|
|
19942
20999
|
});
|
|
19943
21000
|
});
|
|
21001
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]) || {}), {}, {
|
|
21002
|
+
showOrderInfo: showOrderInfo,
|
|
21003
|
+
orders: orders
|
|
21004
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _defineProperty(_objectSpread2$1, "vipCode", (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$2 = orders[0]) === null || _orders$2 === void 0 ? void 0 : _orders$2.vipCode)), _objectSpread2$1));
|
|
19944
21005
|
kmkfUtils.pushGyLog('getOrderList', {
|
|
19945
21006
|
before: valueRef.current,
|
|
19946
|
-
after:
|
|
19947
|
-
showOrderInfo: showOrderInfo,
|
|
19948
|
-
orders: orders
|
|
19949
|
-
})))
|
|
21007
|
+
after: newValue
|
|
19950
21008
|
});
|
|
19951
|
-
onChange(
|
|
19952
|
-
showOrderInfo: showOrderInfo,
|
|
19953
|
-
orders: orders
|
|
19954
|
-
}))));
|
|
21009
|
+
onChange(newValue);
|
|
19955
21010
|
});
|
|
19956
21011
|
case 1:
|
|
19957
21012
|
case "end":
|
|
@@ -19963,42 +21018,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19963
21018
|
return _ref.apply(this, arguments);
|
|
19964
21019
|
};
|
|
19965
21020
|
}();
|
|
21021
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21022
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21023
|
+
var _typeMap$type10;
|
|
21024
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21025
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21026
|
+
case 0:
|
|
21027
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21028
|
+
var _orders$3, _orders$4;
|
|
21029
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21030
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21031
|
+
shopCode: (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$3 = orders[0]) === null || _orders$3 === void 0 ? void 0 : _orders$3.shopCode),
|
|
21032
|
+
vipCode: (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$4 = orders[0]) === null || _orders$4 === void 0 ? void 0 : _orders$4.vipCode)
|
|
21033
|
+
});
|
|
21034
|
+
kmkfUtils.pushGyLog('getVipCode', {
|
|
21035
|
+
before: valueRef.current,
|
|
21036
|
+
after: newValue
|
|
21037
|
+
});
|
|
21038
|
+
onChange(newValue);
|
|
21039
|
+
}));
|
|
21040
|
+
case 1:
|
|
21041
|
+
case "end":
|
|
21042
|
+
return _context2.stop();
|
|
21043
|
+
}
|
|
21044
|
+
}, _callee2);
|
|
21045
|
+
}));
|
|
21046
|
+
return function getVipCode(_x2) {
|
|
21047
|
+
return _ref4.apply(this, arguments);
|
|
21048
|
+
};
|
|
21049
|
+
}();
|
|
19966
21050
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19967
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21051
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19968
21052
|
kmkfUtils.pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19969
21053
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19970
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21054
|
+
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
|
|
19971
21055
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19972
21056
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19973
|
-
newValue[(_typeMap$
|
|
21057
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19974
21058
|
if (typeName === '1') {
|
|
19975
|
-
var _typeMap$
|
|
19976
|
-
newValue[(_typeMap$
|
|
21059
|
+
var _typeMap$type13;
|
|
21060
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19977
21061
|
mode: isStrict
|
|
19978
21062
|
});
|
|
19979
21063
|
} else if (typeName === '2') {
|
|
19980
|
-
var _typeMap$
|
|
21064
|
+
var _typeMap$type14;
|
|
19981
21065
|
// 切换到非原单,清空列表
|
|
19982
|
-
newValue[(_typeMap$
|
|
21066
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19983
21067
|
}
|
|
19984
21068
|
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
19985
21069
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19986
21070
|
};
|
|
19987
21071
|
var handleModeChange = function handleModeChange(mode) {
|
|
19988
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19989
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21072
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21073
|
+
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
|
|
19990
21074
|
setIsStrict(mode);
|
|
19991
21075
|
if (!isOriginalOrder) return;
|
|
19992
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21076
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
19993
21077
|
mode: mode
|
|
19994
21078
|
}))));
|
|
19995
21079
|
};
|
|
19996
21080
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19997
|
-
var _ref8, _typeMap$
|
|
21081
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19998
21082
|
var mode = _ref7.mode,
|
|
19999
21083
|
sysOrderNo = _ref7.sysOrderNo;
|
|
20000
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
20001
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21084
|
+
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
21085
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
20002
21086
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20003
21087
|
return order.code === systemOrderNo;
|
|
20004
21088
|
});
|
|
@@ -20009,29 +21093,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
20009
21093
|
}) : goodDetails;
|
|
20010
21094
|
};
|
|
20011
21095
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20012
|
-
var _typeMap$
|
|
21096
|
+
var _typeMap$type19;
|
|
20013
21097
|
kmkfUtils.pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20014
21098
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20015
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20016
|
-
var _typeMap$
|
|
20017
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20018
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21099
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
|
|
21100
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21101
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
|
|
21102
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
|
|
20019
21103
|
return item;
|
|
20020
21104
|
});
|
|
20021
21105
|
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
20022
21106
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20023
21107
|
};
|
|
20024
21108
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20025
|
-
var _typeMap$
|
|
21109
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20026
21110
|
kmkfUtils.pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20027
21111
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20028
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20029
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20030
|
-
var _typeMap$type22;
|
|
20031
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
20032
|
-
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21112
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
21113
|
+
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
|
|
20033
21114
|
var _typeMap$type24;
|
|
20034
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] =
|
|
21115
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
|
|
21116
|
+
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21117
|
+
var _typeMap$type26;
|
|
21118
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = getGoodDetails({
|
|
20035
21119
|
mode: isStrict,
|
|
20036
21120
|
sysOrderNo: val
|
|
20037
21121
|
});
|
|
@@ -20040,7 +21124,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20040
21124
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20041
21125
|
};
|
|
20042
21126
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20043
|
-
var _ref12, _typeMap$
|
|
21127
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20044
21128
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20045
21129
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20046
21130
|
// 原订单商品
|
|
@@ -20048,67 +21132,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
20048
21132
|
mode: isStrict
|
|
20049
21133
|
}) || [];
|
|
20050
21134
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20051
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20052
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21135
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]) || [];
|
|
21136
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20053
21137
|
return skuList.includes(item.uuid);
|
|
20054
21138
|
});
|
|
20055
|
-
console.log('商品发生变化', newValue[
|
|
21139
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20056
21140
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20057
21141
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20058
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21142
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)], isStrict]);
|
|
20059
21143
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20060
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20061
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21144
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder];
|
|
21145
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
20062
21146
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20063
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20064
|
-
id: "TEST_GY",
|
|
20065
|
-
onClick: function onClick() {
|
|
20066
|
-
console.log('TEST_GY', value);
|
|
20067
|
-
}
|
|
20068
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21147
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20069
21148
|
gutter: 8,
|
|
20070
21149
|
wrap: true
|
|
20071
21150
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20072
21151
|
className: "gutter-row",
|
|
20073
21152
|
xs: {
|
|
20074
|
-
span:
|
|
21153
|
+
span: 12
|
|
20075
21154
|
},
|
|
20076
21155
|
sm: {
|
|
20077
|
-
span:
|
|
21156
|
+
span: 8
|
|
20078
21157
|
}
|
|
20079
21158
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20080
21159
|
style: {
|
|
20081
|
-
marginBottom: '8px'
|
|
21160
|
+
marginBottom: '8px',
|
|
21161
|
+
width: '100%'
|
|
20082
21162
|
},
|
|
20083
21163
|
disabled: disabled,
|
|
20084
21164
|
allowClear: false,
|
|
20085
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21165
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)],
|
|
20086
21166
|
onChange: function onChange(val) {
|
|
20087
21167
|
return changeSystemOrderHandle(val);
|
|
20088
21168
|
},
|
|
20089
21169
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20090
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21170
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
|
|
20091
21171
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21172
|
+
className: styles$5.systemNoDisabled,
|
|
20092
21173
|
key: item.billNo,
|
|
20093
21174
|
value: item.billNo,
|
|
20094
|
-
label: item.billNo
|
|
20095
|
-
|
|
21175
|
+
label: item.billNo,
|
|
21176
|
+
disabled: item.cancel
|
|
21177
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20096
21178
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20097
21179
|
className: "gutter-row",
|
|
20098
21180
|
xs: {
|
|
20099
|
-
span:
|
|
21181
|
+
span: 12
|
|
20100
21182
|
},
|
|
20101
21183
|
sm: {
|
|
20102
|
-
span:
|
|
21184
|
+
span: 4
|
|
20103
21185
|
}
|
|
20104
21186
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20105
21187
|
style: {
|
|
20106
|
-
marginBottom: '8px'
|
|
21188
|
+
marginBottom: '8px',
|
|
21189
|
+
width: '100%'
|
|
20107
21190
|
},
|
|
20108
|
-
disabled: disabled,
|
|
21191
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20109
21192
|
allowClear: false,
|
|
20110
21193
|
options: reasonList,
|
|
20111
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21194
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName)],
|
|
20112
21195
|
onChange: function onChange(val) {
|
|
20113
21196
|
return changeTypeHandle(val);
|
|
20114
21197
|
}
|
|
@@ -20122,7 +21205,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20122
21205
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20123
21206
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20124
21207
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20125
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21208
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)],
|
|
20126
21209
|
onChange: function onChange(val) {
|
|
20127
21210
|
return changeGoodHandle(val);
|
|
20128
21211
|
},
|
|
@@ -20137,7 +21220,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20137
21220
|
})));
|
|
20138
21221
|
};
|
|
20139
21222
|
|
|
20140
|
-
var _excluded$
|
|
21223
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20141
21224
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20142
21225
|
var typeMap$5 = {
|
|
20143
21226
|
GY_RETURN_GOODS: {
|
|
@@ -20159,14 +21242,15 @@ var typeMap$5 = {
|
|
|
20159
21242
|
}
|
|
20160
21243
|
};
|
|
20161
21244
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20162
|
-
var _typeMap$
|
|
21245
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20163
21246
|
var value = props.value,
|
|
20164
21247
|
onChange = props.onChange,
|
|
20165
21248
|
_props$reasonList = props.reasonList,
|
|
20166
21249
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20167
21250
|
disabled = props.disabled,
|
|
20168
21251
|
type = props.type,
|
|
20169
|
-
|
|
21252
|
+
isSettingConfig = props.isSettingConfig,
|
|
21253
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20170
21254
|
var valueRef = React.useRef({});
|
|
20171
21255
|
var getOrderFlag = React.useRef(false);
|
|
20172
21256
|
var _useState = React.useState(false),
|
|
@@ -20229,7 +21313,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20229
21313
|
while (1) switch (_context.prev = _context.next) {
|
|
20230
21314
|
case 0:
|
|
20231
21315
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20232
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21316
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20233
21317
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20234
21318
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20235
21319
|
var billNo = _ref2.billNo,
|
|
@@ -20251,10 +21335,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20251
21335
|
shopCode: shopCode
|
|
20252
21336
|
});
|
|
20253
21337
|
});
|
|
20254
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21338
|
+
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
|
|
20255
21339
|
showOrderInfo: showOrderInfo,
|
|
20256
21340
|
orders: orders
|
|
20257
|
-
}))));
|
|
21341
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _objectSpread2$1)));
|
|
20258
21342
|
});
|
|
20259
21343
|
case 1:
|
|
20260
21344
|
case "end":
|
|
@@ -20267,7 +21351,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20267
21351
|
};
|
|
20268
21352
|
}();
|
|
20269
21353
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20270
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21354
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20271
21355
|
var newValue = _objectSpread2({}, value);
|
|
20272
21356
|
// 原订单商品
|
|
20273
21357
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20278,49 +21362,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20278
21362
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20279
21363
|
return skuList.includes(item.uuid);
|
|
20280
21364
|
});
|
|
20281
|
-
console.log('商品发生变化', newValue[
|
|
21365
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20282
21366
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20283
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21367
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20284
21368
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20285
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21369
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20286
21370
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20287
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21371
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20288
21372
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20289
21373
|
var newValue = _objectSpread2({}, value);
|
|
20290
|
-
newValue[(_typeMap$
|
|
21374
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20291
21375
|
if (typeName === '1') {
|
|
20292
|
-
var _typeMap$
|
|
20293
|
-
newValue[(_typeMap$
|
|
21376
|
+
var _typeMap$type12;
|
|
21377
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20294
21378
|
mode: isStrict
|
|
20295
21379
|
});
|
|
20296
21380
|
} else if (typeName === '2') {
|
|
20297
|
-
var _typeMap$
|
|
21381
|
+
var _typeMap$type13;
|
|
20298
21382
|
// 切换到非原单,清空列表
|
|
20299
|
-
newValue[(_typeMap$
|
|
21383
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20300
21384
|
}
|
|
20301
21385
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20302
21386
|
};
|
|
20303
21387
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20304
|
-
var _typeMap$
|
|
21388
|
+
var _typeMap$type14;
|
|
20305
21389
|
var newValue = _objectSpread2({}, value);
|
|
20306
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20307
|
-
var _typeMap$
|
|
20308
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20309
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21390
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
21391
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21392
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
21393
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20310
21394
|
return item;
|
|
20311
21395
|
});
|
|
20312
21396
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20313
21397
|
};
|
|
20314
21398
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20315
|
-
var _typeMap$
|
|
21399
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20316
21400
|
var newValue = _objectSpread2({}, value);
|
|
20317
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20318
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20319
|
-
var _typeMap$
|
|
20320
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20321
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20322
|
-
var _typeMap$
|
|
20323
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21401
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
21402
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
21403
|
+
var _typeMap$type19;
|
|
21404
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
21405
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
21406
|
+
var _typeMap$type21;
|
|
21407
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20324
21408
|
mode: isStrict,
|
|
20325
21409
|
sysOrderNo: val
|
|
20326
21410
|
});
|
|
@@ -20328,11 +21412,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20328
21412
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20329
21413
|
};
|
|
20330
21414
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20331
|
-
var _typeMap$
|
|
21415
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20332
21416
|
var mode = _ref4.mode,
|
|
20333
21417
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20334
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20335
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21418
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
21419
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20336
21420
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20337
21421
|
return order.code === systemOrderNo;
|
|
20338
21422
|
});
|
|
@@ -20343,62 +21427,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20343
21427
|
}) : goodDetails;
|
|
20344
21428
|
};
|
|
20345
21429
|
var handleModeChange = function handleModeChange(mode) {
|
|
20346
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20347
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21430
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21431
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20348
21432
|
setIsStrict(mode);
|
|
20349
21433
|
if (!isOriginalOrder) return;
|
|
20350
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21434
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20351
21435
|
mode: mode
|
|
20352
21436
|
}))));
|
|
20353
21437
|
};
|
|
20354
21438
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20355
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21439
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
20356
21440
|
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20357
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21441
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20358
21442
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20359
21443
|
gutter: 8,
|
|
20360
21444
|
wrap: true
|
|
20361
21445
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20362
21446
|
className: "gutter-row",
|
|
20363
21447
|
xs: {
|
|
20364
|
-
span:
|
|
21448
|
+
span: 12
|
|
20365
21449
|
},
|
|
20366
21450
|
sm: {
|
|
20367
|
-
span:
|
|
21451
|
+
span: 8
|
|
20368
21452
|
}
|
|
20369
21453
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20370
21454
|
style: {
|
|
20371
|
-
marginBottom: '8px'
|
|
21455
|
+
marginBottom: '8px',
|
|
21456
|
+
width: '100%'
|
|
20372
21457
|
},
|
|
20373
21458
|
disabled: disabled,
|
|
20374
21459
|
allowClear: false,
|
|
20375
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21460
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20376
21461
|
onChange: function onChange(val) {
|
|
20377
21462
|
return changeSystemOrderHandle(val);
|
|
20378
21463
|
},
|
|
20379
21464
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20380
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21465
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20381
21466
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21467
|
+
className: styles$5.systemNoDisabled,
|
|
20382
21468
|
key: item.billNo,
|
|
20383
21469
|
value: item.billNo,
|
|
20384
|
-
label: item.billNo
|
|
20385
|
-
|
|
21470
|
+
label: item.billNo,
|
|
21471
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21472
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20386
21473
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20387
21474
|
className: "gutter-row",
|
|
20388
21475
|
xs: {
|
|
20389
|
-
span:
|
|
21476
|
+
span: 12
|
|
20390
21477
|
},
|
|
20391
21478
|
sm: {
|
|
20392
|
-
span:
|
|
21479
|
+
span: 4
|
|
20393
21480
|
}
|
|
20394
21481
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20395
21482
|
style: {
|
|
20396
|
-
marginBottom: '8px'
|
|
21483
|
+
marginBottom: '8px',
|
|
21484
|
+
width: '100%'
|
|
20397
21485
|
},
|
|
20398
|
-
disabled: disabled,
|
|
21486
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20399
21487
|
allowClear: false,
|
|
20400
21488
|
options: reasonList,
|
|
20401
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21489
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20402
21490
|
onChange: function onChange(val) {
|
|
20403
21491
|
return changeTypeHandle(val);
|
|
20404
21492
|
}
|
|
@@ -20410,7 +21498,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20410
21498
|
canUpdateNumber: showChangeBtn,
|
|
20411
21499
|
showChangeBtn: showChangeBtn,
|
|
20412
21500
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20413
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21501
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20414
21502
|
onChange: function onChange(val) {
|
|
20415
21503
|
return changeGoodHandle(val);
|
|
20416
21504
|
},
|
|
@@ -20427,6 +21515,249 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20427
21515
|
})));
|
|
20428
21516
|
};
|
|
20429
21517
|
|
|
21518
|
+
var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
21519
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21520
|
+
styleInject(css_248z$d);
|
|
21521
|
+
|
|
21522
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21523
|
+
var Dragger$1 = antd.Upload.Dragger;
|
|
21524
|
+
var fn$4 = function fn() {
|
|
21525
|
+
return void 0;
|
|
21526
|
+
};
|
|
21527
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21528
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21529
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21530
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21531
|
+
_ref$maxSize = _ref.maxSize,
|
|
21532
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21533
|
+
_ref$onChange = _ref.onChange,
|
|
21534
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21535
|
+
_ref$value = _ref.value,
|
|
21536
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21537
|
+
_ref$disabled = _ref.disabled,
|
|
21538
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21539
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21540
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21541
|
+
_ref$canDownload = _ref.canDownload,
|
|
21542
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21543
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21544
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21545
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21546
|
+
var _useState = React.useState(false),
|
|
21547
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21548
|
+
visible = _useState2[0],
|
|
21549
|
+
setVisible = _useState2[1];
|
|
21550
|
+
var _useState3 = React.useState(''),
|
|
21551
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21552
|
+
fileUrl = _useState4[0],
|
|
21553
|
+
setFileUrl = _useState4[1];
|
|
21554
|
+
var _useState5 = React.useState(''),
|
|
21555
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21556
|
+
fileType = _useState6[0],
|
|
21557
|
+
setFileType = _useState6[1];
|
|
21558
|
+
var _useState7 = React.useState(''),
|
|
21559
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21560
|
+
fileName = _useState8[0],
|
|
21561
|
+
setFileName = _useState8[1];
|
|
21562
|
+
var valueRef = React.useRef(value);
|
|
21563
|
+
var uploadCount = React.useRef(0);
|
|
21564
|
+
var _useState9 = React.useState(false),
|
|
21565
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21566
|
+
uploading = _useState10[0],
|
|
21567
|
+
setUploading = _useState10[1];
|
|
21568
|
+
var fileList = React.useMemo(function () {
|
|
21569
|
+
return value.map(function (t, i) {
|
|
21570
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21571
|
+
percent: 100,
|
|
21572
|
+
uid: i + ''
|
|
21573
|
+
});
|
|
21574
|
+
});
|
|
21575
|
+
}, [value]);
|
|
21576
|
+
React.useEffect(function () {
|
|
21577
|
+
valueRef.current = value;
|
|
21578
|
+
}, [value]);
|
|
21579
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21580
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21581
|
+
var formData, fileName, _yield$request, success, data;
|
|
21582
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21583
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21584
|
+
case 0:
|
|
21585
|
+
setUploading(true);
|
|
21586
|
+
uploadCount.current++;
|
|
21587
|
+
formData = new FormData();
|
|
21588
|
+
formData.append('file', file);
|
|
21589
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21590
|
+
formData.append('fileName', fileName);
|
|
21591
|
+
_context.prev = 6;
|
|
21592
|
+
_context.next = 9;
|
|
21593
|
+
return request__default['default'](actionUrl, {
|
|
21594
|
+
method: 'post',
|
|
21595
|
+
body: formData
|
|
21596
|
+
});
|
|
21597
|
+
case 9:
|
|
21598
|
+
_yield$request = _context.sent;
|
|
21599
|
+
success = _yield$request.success;
|
|
21600
|
+
data = _yield$request.data;
|
|
21601
|
+
if (success) {
|
|
21602
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21603
|
+
kmVideoName: file.name,
|
|
21604
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21605
|
+
}]));
|
|
21606
|
+
}
|
|
21607
|
+
_context.next = 18;
|
|
21608
|
+
break;
|
|
21609
|
+
case 15:
|
|
21610
|
+
_context.prev = 15;
|
|
21611
|
+
_context.t0 = _context["catch"](6);
|
|
21612
|
+
antd.message.error('文件上传失败');
|
|
21613
|
+
case 18:
|
|
21614
|
+
_context.prev = 18;
|
|
21615
|
+
uploadCount.current--;
|
|
21616
|
+
if (uploadCount.current < 1) {
|
|
21617
|
+
setUploading(false);
|
|
21618
|
+
}
|
|
21619
|
+
return _context.finish(18);
|
|
21620
|
+
case 22:
|
|
21621
|
+
case "end":
|
|
21622
|
+
return _context.stop();
|
|
21623
|
+
}
|
|
21624
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21625
|
+
}));
|
|
21626
|
+
return function asyncUpload(_x) {
|
|
21627
|
+
return _ref2.apply(this, arguments);
|
|
21628
|
+
};
|
|
21629
|
+
}();
|
|
21630
|
+
var download = function download(url, name) {
|
|
21631
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21632
|
+
window.open(url);
|
|
21633
|
+
return;
|
|
21634
|
+
}
|
|
21635
|
+
fetch(url).then(function (res) {
|
|
21636
|
+
return res.blob();
|
|
21637
|
+
}).then(function (blob) {
|
|
21638
|
+
var a = document.createElement('a');
|
|
21639
|
+
document.body.appendChild(a);
|
|
21640
|
+
a.style.display = 'none';
|
|
21641
|
+
var url = window.URL.createObjectURL(blob);
|
|
21642
|
+
a.href = url;
|
|
21643
|
+
a.download = name;
|
|
21644
|
+
a.click();
|
|
21645
|
+
document.body.removeChild(a);
|
|
21646
|
+
window.URL.revokeObjectURL(url);
|
|
21647
|
+
});
|
|
21648
|
+
};
|
|
21649
|
+
var handleChange = function handleChange(list) {
|
|
21650
|
+
valueRef.current = list;
|
|
21651
|
+
onChange(list);
|
|
21652
|
+
};
|
|
21653
|
+
// 手动上传模式, 一直返回false
|
|
21654
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21655
|
+
// console.log('beforeUpload', file);
|
|
21656
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21657
|
+
// TODO: 批量提交的时候
|
|
21658
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21659
|
+
antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21660
|
+
return antd.Upload.LIST_IGNORE;
|
|
21661
|
+
}
|
|
21662
|
+
if (!size) {
|
|
21663
|
+
antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21664
|
+
return antd.Upload.LIST_IGNORE;
|
|
21665
|
+
}
|
|
21666
|
+
asyncUpload(file);
|
|
21667
|
+
return antd.Upload.LIST_IGNORE;
|
|
21668
|
+
};
|
|
21669
|
+
var onRemove = function onRemove(file) {
|
|
21670
|
+
var newValue = value.filter(function (item) {
|
|
21671
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21672
|
+
});
|
|
21673
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21674
|
+
};
|
|
21675
|
+
var onPreview = function onPreview(file) {
|
|
21676
|
+
var _file$url;
|
|
21677
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21678
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21679
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21680
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21681
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21682
|
+
setFileType('video');
|
|
21683
|
+
setVisible(true);
|
|
21684
|
+
} else {
|
|
21685
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21686
|
+
}
|
|
21687
|
+
};
|
|
21688
|
+
var handleCancel = function handleCancel() {
|
|
21689
|
+
setFileUrl('');
|
|
21690
|
+
setFileName('');
|
|
21691
|
+
setVisible(false);
|
|
21692
|
+
};
|
|
21693
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
21694
|
+
spinning: uploading
|
|
21695
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21696
|
+
className: styles$6.tips
|
|
21697
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21698
|
+
className: styles$6.imageBox
|
|
21699
|
+
}, /*#__PURE__*/React__default['default'].createElement(Dragger$1, _objectSpread2({
|
|
21700
|
+
disabled: disabled,
|
|
21701
|
+
multiple: true,
|
|
21702
|
+
name: "file",
|
|
21703
|
+
maxCount: maxCount,
|
|
21704
|
+
beforeUpload: beforeUpload,
|
|
21705
|
+
onPreview: onPreview,
|
|
21706
|
+
fileList: fileList.map(function (item) {
|
|
21707
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21708
|
+
url: item.kmVideoUrl,
|
|
21709
|
+
name: item.kmVideoName
|
|
21710
|
+
});
|
|
21711
|
+
}),
|
|
21712
|
+
onRemove: onRemove,
|
|
21713
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21714
|
+
iconRender: function iconRender(file) {
|
|
21715
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
21716
|
+
align: "center"
|
|
21717
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.VideoCameraTwoTone, {
|
|
21718
|
+
style: {
|
|
21719
|
+
fontSize: 16
|
|
21720
|
+
}
|
|
21721
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21722
|
+
}
|
|
21723
|
+
}, resetProps), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21724
|
+
className: styles$6.addBtn
|
|
21725
|
+
}, "+"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21726
|
+
className: styles$6.addBtn
|
|
21727
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
21728
|
+
visible: visible,
|
|
21729
|
+
title: fileName,
|
|
21730
|
+
footer: null,
|
|
21731
|
+
onCancel: handleCancel
|
|
21732
|
+
}, canDownload ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21733
|
+
type: "link",
|
|
21734
|
+
onClick: function onClick() {
|
|
21735
|
+
return download(fileUrl, fileName);
|
|
21736
|
+
}
|
|
21737
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React__default['default'].createElement(reactCopyToClipboard.CopyToClipboard, {
|
|
21738
|
+
text: fileUrl,
|
|
21739
|
+
onCopy: function onCopy() {
|
|
21740
|
+
antd.message.success('复制成功');
|
|
21741
|
+
}
|
|
21742
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21743
|
+
type: "link"
|
|
21744
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
21745
|
+
alt: "example",
|
|
21746
|
+
style: {
|
|
21747
|
+
width: '100%'
|
|
21748
|
+
},
|
|
21749
|
+
src: fileUrl
|
|
21750
|
+
}) : /*#__PURE__*/React__default['default'].createElement("video", {
|
|
21751
|
+
style: {
|
|
21752
|
+
width: '100%',
|
|
21753
|
+
height: '100%'
|
|
21754
|
+
},
|
|
21755
|
+
autoPlay: true,
|
|
21756
|
+
controls: true,
|
|
21757
|
+
src: fileUrl
|
|
21758
|
+
}))));
|
|
21759
|
+
};
|
|
21760
|
+
|
|
20430
21761
|
exports.Address = ApaasAddress;
|
|
20431
21762
|
exports.AliPay = AliPay;
|
|
20432
21763
|
exports.ApaasAddress = Province;
|
|
@@ -20448,6 +21779,7 @@ exports.ApaasUpload = ApaasUpload;
|
|
|
20448
21779
|
exports.ApaasUploadAsync = index;
|
|
20449
21780
|
exports.ApaasUploadFile = ApaasUploadFile;
|
|
20450
21781
|
exports.ApaasUploadProAsync = index$1;
|
|
21782
|
+
exports.AsyncSelect = AsyncSelect;
|
|
20451
21783
|
exports.BsE3Reissue = bsE3Reissue;
|
|
20452
21784
|
exports.BsExchange = BsExchange;
|
|
20453
21785
|
exports.BsGoods = BsGoods;
|
|
@@ -20473,6 +21805,7 @@ exports.IdentifyAddress = IdentifyAddress;
|
|
|
20473
21805
|
exports.Invoice = Invoice;
|
|
20474
21806
|
exports.JstGoods = jstGoods;
|
|
20475
21807
|
exports.JstItemList = ItemList;
|
|
21808
|
+
exports.KmVideo = KmVideo;
|
|
20476
21809
|
exports.LogisticsInterception = LogisticsInterception;
|
|
20477
21810
|
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
20478
21811
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
@@ -20499,5 +21832,6 @@ exports.erpFormValidator = erpFormValidator;
|
|
|
20499
21832
|
exports.erpModalColumnsMap = index$2;
|
|
20500
21833
|
exports.getGyColumns = getColumns$4;
|
|
20501
21834
|
exports.getJstColumns = getColumns$5;
|
|
21835
|
+
exports.getKmColumns = getColumns$6;
|
|
20502
21836
|
exports.getWdtColumns = getColumns$2;
|
|
20503
21837
|
exports.getWlnColumns = getColumns$3;
|