@kmkf-fe-packages/basic-components 2.0.54-beta.7 → 2.0.54-beta.71
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 +1768 -447
- package/dist/index.js +1767 -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 +7 -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.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
2
2
|
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
|
|
3
|
-
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -7722,7 +7722,8 @@ var Province = function Province(props) {
|
|
|
7722
7722
|
workOrder: AddressData.getInstance(),
|
|
7723
7723
|
bs: BsAddressData.getInstance(),
|
|
7724
7724
|
wdt: WdtAddressData.getInstance(),
|
|
7725
|
-
gy: GyAddressData.getInstance()
|
|
7725
|
+
gy: GyAddressData.getInstance(),
|
|
7726
|
+
km: AddressData.getInstance()
|
|
7726
7727
|
};
|
|
7727
7728
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7728
7729
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7828,6 +7829,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7828
7829
|
bs: BsAddressData,
|
|
7829
7830
|
wdt: WdtAddressData,
|
|
7830
7831
|
gy: GyAddressData,
|
|
7832
|
+
km: AddressData,
|
|
7831
7833
|
workOrder: AddressData
|
|
7832
7834
|
}[type] || AddressData).getInstance();
|
|
7833
7835
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -8131,17 +8133,16 @@ var SubForm = function SubForm(props) {
|
|
|
8131
8133
|
return [{
|
|
8132
8134
|
dataIndex: 'index',
|
|
8133
8135
|
title: '序号',
|
|
8136
|
+
fixed: 'left',
|
|
8137
|
+
width: 20,
|
|
8134
8138
|
render: function render(val, record, index) {
|
|
8135
|
-
return
|
|
8136
|
-
style: {
|
|
8137
|
-
width: 25
|
|
8138
|
-
}
|
|
8139
|
-
}, index + 1);
|
|
8139
|
+
return index + 1;
|
|
8140
8140
|
}
|
|
8141
8141
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8142
8142
|
return {
|
|
8143
8143
|
dataIndex: t.key,
|
|
8144
|
-
title: t.name
|
|
8144
|
+
title: t.name,
|
|
8145
|
+
width: 90
|
|
8145
8146
|
};
|
|
8146
8147
|
})));
|
|
8147
8148
|
}, [newTableHeader]);
|
|
@@ -8329,7 +8330,7 @@ var SubForm = function SubForm(props) {
|
|
|
8329
8330
|
onScrollCapture: onScrollCapture,
|
|
8330
8331
|
style: {
|
|
8331
8332
|
height: 320,
|
|
8332
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8333
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8333
8334
|
overflowY: 'scroll',
|
|
8334
8335
|
overflowX: 'auto'
|
|
8335
8336
|
}
|
|
@@ -8340,7 +8341,7 @@ var SubForm = function SubForm(props) {
|
|
|
8340
8341
|
size: "small",
|
|
8341
8342
|
pagination: false,
|
|
8342
8343
|
scroll: {
|
|
8343
|
-
x: '
|
|
8344
|
+
x: 'max-content'
|
|
8344
8345
|
},
|
|
8345
8346
|
locale: {
|
|
8346
8347
|
emptyText: '暂无数据'
|
|
@@ -8713,7 +8714,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8713
8714
|
changeSku = props.changeSku,
|
|
8714
8715
|
width = props.width,
|
|
8715
8716
|
_props$numIidType = props.numIidType,
|
|
8716
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8717
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8718
|
+
form = props.form,
|
|
8719
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8717
8720
|
var _useState = useState([]),
|
|
8718
8721
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8719
8722
|
selectList = _useState2[0],
|
|
@@ -8726,10 +8729,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8726
8729
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8727
8730
|
goodList = _useState6[0],
|
|
8728
8731
|
setGoodList = _useState6[1];
|
|
8729
|
-
var _useState7 = useState(
|
|
8732
|
+
var _useState7 = useState([]),
|
|
8730
8733
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8731
|
-
|
|
8732
|
-
|
|
8734
|
+
orderNoItems = _useState8[0],
|
|
8735
|
+
setOrderNoItems = _useState8[1];
|
|
8736
|
+
var _useState9 = useState(false),
|
|
8737
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8738
|
+
loading = _useState10[0],
|
|
8739
|
+
setLoading = _useState10[1];
|
|
8733
8740
|
var transformIdType = function transformIdType(id) {
|
|
8734
8741
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8735
8742
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8749,7 +8756,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8749
8756
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8750
8757
|
return setGoodList(list.map(transformType));
|
|
8751
8758
|
};
|
|
8752
|
-
var
|
|
8759
|
+
var _useState11 = useState({
|
|
8753
8760
|
apiName: 'queryItems',
|
|
8754
8761
|
desc: true,
|
|
8755
8762
|
numIids: '',
|
|
@@ -8761,30 +8768,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8768
|
cids: '',
|
|
8762
8769
|
title: ''
|
|
8763
8770
|
}),
|
|
8764
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8765
|
-
searchParams = _useState10[0],
|
|
8766
|
-
setSearch = _useState10[1];
|
|
8767
|
-
var _useState11 = useState(0),
|
|
8768
8771
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
var _useState13 = useState(
|
|
8772
|
+
searchParams = _useState12[0],
|
|
8773
|
+
setSearch = _useState12[1];
|
|
8774
|
+
var _useState13 = useState(0),
|
|
8772
8775
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
var _useState15 = useState(
|
|
8776
|
+
total = _useState14[0],
|
|
8777
|
+
setTotal = _useState14[1];
|
|
8778
|
+
var _useState15 = useState(''),
|
|
8776
8779
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
var _useState17 = useState(
|
|
8780
|
+
platform = _useState16[0],
|
|
8781
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8782
|
+
var _useState17 = useState({}),
|
|
8780
8783
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState19 = useState(
|
|
8784
|
+
shopInfo = _useState18[0],
|
|
8785
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8786
|
+
var _useState19 = useState(true),
|
|
8784
8787
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState21 = useState([
|
|
8788
|
+
canSearch = _useState20[0],
|
|
8789
|
+
setCanSearch = _useState20[1];
|
|
8790
|
+
var _useState21 = useState([null]),
|
|
8791
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8792
|
+
nextKeyList = _useState22[0],
|
|
8793
|
+
setNextKeyList = _useState22[1];
|
|
8794
|
+
var _useState23 = useState([{
|
|
8788
8795
|
tab: '出售中',
|
|
8789
8796
|
key: 'onSale'
|
|
8790
8797
|
}, {
|
|
@@ -8794,10 +8801,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8794
8801
|
tab: '已选择',
|
|
8795
8802
|
key: 'select'
|
|
8796
8803
|
}]),
|
|
8797
|
-
|
|
8798
|
-
tabs =
|
|
8799
|
-
setTabs =
|
|
8800
|
-
var
|
|
8804
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8805
|
+
tabs = _useState24[0],
|
|
8806
|
+
setTabs = _useState24[1];
|
|
8807
|
+
var _useState25 = useState([{
|
|
8801
8808
|
name: '上架时间',
|
|
8802
8809
|
value: 'list_time'
|
|
8803
8810
|
}, {
|
|
@@ -8807,13 +8814,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8807
8814
|
name: '按价格',
|
|
8808
8815
|
value: 'price'
|
|
8809
8816
|
}]),
|
|
8810
|
-
|
|
8811
|
-
goodSort =
|
|
8817
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8818
|
+
goodSort = _useState26[0];
|
|
8812
8819
|
//宝贝分类
|
|
8813
|
-
var
|
|
8814
|
-
|
|
8815
|
-
shell =
|
|
8816
|
-
setShell =
|
|
8820
|
+
var _useState27 = useState([]),
|
|
8821
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8822
|
+
shell = _useState28[0],
|
|
8823
|
+
setShell = _useState28[1];
|
|
8817
8824
|
var clickOrder = function clickOrder(sort) {
|
|
8818
8825
|
if (sort.value === searchParams.orderBy) {
|
|
8819
8826
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9086,8 +9093,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9086
9093
|
}
|
|
9087
9094
|
}, [platform]);
|
|
9088
9095
|
useEffect(function () {
|
|
9089
|
-
platform && canSearch
|
|
9096
|
+
if (platform && canSearch) {
|
|
9097
|
+
if (searchParams.type === 'orderProduct') {
|
|
9098
|
+
getOrderProductItem(searchParams);
|
|
9099
|
+
} else {
|
|
9100
|
+
getItem(searchParams, platform);
|
|
9101
|
+
}
|
|
9102
|
+
}
|
|
9090
9103
|
}, [searchParams, platform]);
|
|
9104
|
+
useEffect(function () {
|
|
9105
|
+
if (visible && platform !== 'fxg') {
|
|
9106
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9107
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9108
|
+
if (orderNo) {
|
|
9109
|
+
setTabs(function (prev) {
|
|
9110
|
+
return uniqBy([{
|
|
9111
|
+
tab: '订单商品',
|
|
9112
|
+
key: 'orderProduct'
|
|
9113
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9114
|
+
});
|
|
9115
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9116
|
+
setSearch(function (prev) {
|
|
9117
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9118
|
+
type: 'orderProduct'
|
|
9119
|
+
});
|
|
9120
|
+
});
|
|
9121
|
+
}
|
|
9122
|
+
}
|
|
9123
|
+
}
|
|
9124
|
+
if (!visible) {
|
|
9125
|
+
setOrderNoItems([]);
|
|
9126
|
+
}
|
|
9127
|
+
}, [visible]);
|
|
9128
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9129
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9130
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9131
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9132
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9133
|
+
case 0:
|
|
9134
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9135
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9136
|
+
if (orderNo) {
|
|
9137
|
+
_context2.next = 4;
|
|
9138
|
+
break;
|
|
9139
|
+
}
|
|
9140
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9141
|
+
case 4:
|
|
9142
|
+
if (orderNoItems.length) {
|
|
9143
|
+
_context2.next = 20;
|
|
9144
|
+
break;
|
|
9145
|
+
}
|
|
9146
|
+
_context2.prev = 5;
|
|
9147
|
+
setLoading(true);
|
|
9148
|
+
_context2.next = 9;
|
|
9149
|
+
return servers.orderDetail({
|
|
9150
|
+
shopId: shopId,
|
|
9151
|
+
orderNo: orderNo
|
|
9152
|
+
});
|
|
9153
|
+
case 9:
|
|
9154
|
+
res = _context2.sent;
|
|
9155
|
+
if (res.success) {
|
|
9156
|
+
_context2.next = 14;
|
|
9157
|
+
break;
|
|
9158
|
+
}
|
|
9159
|
+
handleSetGoodList([]);
|
|
9160
|
+
message.warn(res.message);
|
|
9161
|
+
return _context2.abrupt("return");
|
|
9162
|
+
case 14:
|
|
9163
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9164
|
+
items = res.data.itemList;
|
|
9165
|
+
totalCount = items.length;
|
|
9166
|
+
items.forEach(function (item) {
|
|
9167
|
+
item.platform = platform;
|
|
9168
|
+
});
|
|
9169
|
+
setOrderNoItems(items);
|
|
9170
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9171
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9172
|
+
setTotal(totalCount);
|
|
9173
|
+
}
|
|
9174
|
+
case 15:
|
|
9175
|
+
_context2.prev = 15;
|
|
9176
|
+
setLoading(false);
|
|
9177
|
+
return _context2.finish(15);
|
|
9178
|
+
case 18:
|
|
9179
|
+
_context2.next = 26;
|
|
9180
|
+
break;
|
|
9181
|
+
case 20:
|
|
9182
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9183
|
+
title = params.title;
|
|
9184
|
+
if (platform !== 'taobao') {
|
|
9185
|
+
title = params.numIids;
|
|
9186
|
+
}
|
|
9187
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9188
|
+
return item.title.includes(title.trim());
|
|
9189
|
+
}) : orderNoItems;
|
|
9190
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9191
|
+
setTotal(_items.length);
|
|
9192
|
+
case 26:
|
|
9193
|
+
case "end":
|
|
9194
|
+
return _context2.stop();
|
|
9195
|
+
}
|
|
9196
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9197
|
+
}));
|
|
9198
|
+
return function getOrderProductItem(_x2) {
|
|
9199
|
+
return _ref4.apply(this, arguments);
|
|
9200
|
+
};
|
|
9201
|
+
}();
|
|
9091
9202
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
9092
9203
|
title: '选择宝贝',
|
|
9093
9204
|
okText: '确认',
|
|
@@ -9121,7 +9232,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9121
9232
|
style: {
|
|
9122
9233
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9123
9234
|
}
|
|
9124
|
-
}, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9235
|
+
}, /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9125
9236
|
value: searchParams.orderBy,
|
|
9126
9237
|
onChange: function onChange(e) {
|
|
9127
9238
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9137,7 +9248,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9137
9248
|
},
|
|
9138
9249
|
key: sort.value
|
|
9139
9250
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React.createElement("span", null, "\u21BE") : /*#__PURE__*/React.createElement("span", null, "\u21C2") : /*#__PURE__*/React.createElement("span", null, "\u21C5"));
|
|
9140
|
-
})), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && /*#__PURE__*/React.createElement(Select, {
|
|
9251
|
+
}))), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Select, {
|
|
9141
9252
|
className: "classify",
|
|
9142
9253
|
value: searchParams.cids,
|
|
9143
9254
|
onChange: function onChange(value) {
|
|
@@ -9152,7 +9263,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9152
9263
|
key: item.value
|
|
9153
9264
|
}, item.label);
|
|
9154
9265
|
})), /*#__PURE__*/React.createElement(Search, {
|
|
9155
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9266
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9156
9267
|
// enterButton="搜索"
|
|
9157
9268
|
className: "search",
|
|
9158
9269
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9775,7 +9886,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9775
9886
|
userNick = props.userNick,
|
|
9776
9887
|
disabled = props.disabled,
|
|
9777
9888
|
changeSku = props.changeSku,
|
|
9778
|
-
width = props.width
|
|
9889
|
+
width = props.width,
|
|
9890
|
+
form = props.form,
|
|
9891
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9779
9892
|
var shopId = value.shopId,
|
|
9780
9893
|
imgList = value.imgList;
|
|
9781
9894
|
var _useState = useState(false),
|
|
@@ -9866,7 +9979,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9866
9979
|
var onSubmit = /*#__PURE__*/function () {
|
|
9867
9980
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9868
9981
|
var _list$;
|
|
9869
|
-
var newList, newImgList;
|
|
9982
|
+
var newList, newImgList, _list$2;
|
|
9870
9983
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9871
9984
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9872
9985
|
case 0:
|
|
@@ -9888,7 +10001,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9888
10001
|
// if (type === 1) {
|
|
9889
10002
|
// params.outerId = item.outerId; //编码
|
|
9890
10003
|
// }
|
|
9891
|
-
|
|
10004
|
+
//返填商品属性 && 为订单商品
|
|
10005
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10006
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10007
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10008
|
+
} else if (changeSku) {
|
|
9892
10009
|
params.propertiesName = '';
|
|
9893
10010
|
}
|
|
9894
10011
|
// if (type === 4) {
|
|
@@ -9907,7 +10024,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9907
10024
|
imgList: newImgList
|
|
9908
10025
|
});
|
|
9909
10026
|
setVisible(false);
|
|
9910
|
-
|
|
10027
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10028
|
+
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);
|
|
10029
|
+
}
|
|
9911
10030
|
case 5:
|
|
9912
10031
|
case "end":
|
|
9913
10032
|
return _context2.stop();
|
|
@@ -10164,6 +10283,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10164
10283
|
shopId: shopId,
|
|
10165
10284
|
maxLength: maxLength,
|
|
10166
10285
|
changeSku: changeSku,
|
|
10286
|
+
form: form,
|
|
10287
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10167
10288
|
onCancel: function onCancel() {
|
|
10168
10289
|
setVisible(false);
|
|
10169
10290
|
}
|
|
@@ -10962,7 +11083,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10962
11083
|
}
|
|
10963
11084
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
10964
11085
|
label: '发件人手机号',
|
|
10965
|
-
required
|
|
11086
|
+
// required={true}
|
|
10966
11087
|
key: 'interceptSenderMobile',
|
|
10967
11088
|
hidden: !showSenderMobile
|
|
10968
11089
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -10991,7 +11112,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10991
11112
|
value: item.uk
|
|
10992
11113
|
}, "".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));
|
|
10993
11114
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
10994
|
-
label: '
|
|
11115
|
+
label: '修改后派送地址',
|
|
10995
11116
|
required: true,
|
|
10996
11117
|
key: 'newAddress',
|
|
10997
11118
|
hidden: !showNewAddress
|
|
@@ -11142,7 +11263,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11142
11263
|
_props$value = props.value,
|
|
11143
11264
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11144
11265
|
disabled = props.disabled,
|
|
11145
|
-
onChange = props.onChange
|
|
11266
|
+
onChange = props.onChange,
|
|
11267
|
+
_props$isSingle = props.isSingle,
|
|
11268
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11269
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11270
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11146
11271
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11147
11272
|
var val = e.target.value;
|
|
11148
11273
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11153,13 +11278,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11153
11278
|
}));
|
|
11154
11279
|
handleSearchSnapshot(val);
|
|
11155
11280
|
};
|
|
11281
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11282
|
+
var _value$trajectoryApiS;
|
|
11283
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11284
|
+
trajectoryApiStatus: {
|
|
11285
|
+
status: val,
|
|
11286
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11287
|
+
}
|
|
11288
|
+
});
|
|
11289
|
+
onChange(newVal);
|
|
11290
|
+
};
|
|
11156
11291
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11157
11292
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11158
11293
|
trajectoryCode = value.trajectoryCode,
|
|
11159
11294
|
trajectoryPhone = value.trajectoryPhone;
|
|
11160
11295
|
var newCompany = company ? company : trajectoryCompany;
|
|
11161
11296
|
//不展示拦截状态不请求
|
|
11162
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11297
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11163
11298
|
return;
|
|
11164
11299
|
}
|
|
11165
11300
|
if (disabled) {
|
|
@@ -11184,13 +11319,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11184
11319
|
data = res.data,
|
|
11185
11320
|
msg = res.message;
|
|
11186
11321
|
if (result === 100 || success) {
|
|
11187
|
-
|
|
11188
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11322
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11189
11323
|
trajectoryCompany: newCompany
|
|
11190
|
-
})
|
|
11324
|
+
});
|
|
11325
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11326
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11327
|
+
onChange(newValue);
|
|
11191
11328
|
} else {
|
|
11192
11329
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11193
11330
|
trajectorySnapshot: '',
|
|
11331
|
+
trajectoryApiStatus: {
|
|
11332
|
+
reason: '',
|
|
11333
|
+
status: ''
|
|
11334
|
+
},
|
|
11194
11335
|
trajectoryCompany: newCompany
|
|
11195
11336
|
}));
|
|
11196
11337
|
msg && message.error(msg);
|
|
@@ -11199,6 +11340,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11199
11340
|
} catch (err) {
|
|
11200
11341
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11201
11342
|
trajectorySnapshot: '',
|
|
11343
|
+
trajectoryApiStatus: {
|
|
11344
|
+
reason: '',
|
|
11345
|
+
status: ''
|
|
11346
|
+
},
|
|
11202
11347
|
trajectoryCompany: newCompany
|
|
11203
11348
|
}));
|
|
11204
11349
|
(err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11252,6 +11397,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11252
11397
|
}
|
|
11253
11398
|
});
|
|
11254
11399
|
};
|
|
11400
|
+
// 接口状态
|
|
11401
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11402
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11403
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
11404
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11405
|
+
disabled: true,
|
|
11406
|
+
style: {
|
|
11407
|
+
width: '100%',
|
|
11408
|
+
marginTop: '8px'
|
|
11409
|
+
},
|
|
11410
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11411
|
+
onChange: handleStatusChange,
|
|
11412
|
+
options: [{
|
|
11413
|
+
label: '成功',
|
|
11414
|
+
value: '成功'
|
|
11415
|
+
}, {
|
|
11416
|
+
label: '失败',
|
|
11417
|
+
value: '失败'
|
|
11418
|
+
}]
|
|
11419
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
11420
|
+
style: {
|
|
11421
|
+
color: 'red'
|
|
11422
|
+
}
|
|
11423
|
+
}, "\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);
|
|
11424
|
+
};
|
|
11255
11425
|
//物流快照
|
|
11256
11426
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11257
11427
|
return /*#__PURE__*/React.createElement(Input, {
|
|
@@ -11266,7 +11436,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11266
11436
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11267
11437
|
});
|
|
11268
11438
|
};
|
|
11269
|
-
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
11439
|
+
return /*#__PURE__*/React.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.createElement(LogisticsSnapshot, null) : null);
|
|
11270
11440
|
};
|
|
11271
11441
|
|
|
11272
11442
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11479,7 +11649,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11479
11649
|
disabled: disabled,
|
|
11480
11650
|
onChange: function onChange(val) {
|
|
11481
11651
|
return handleChange(val, changeIndex);
|
|
11482
|
-
}
|
|
11652
|
+
},
|
|
11653
|
+
isSingle: false
|
|
11483
11654
|
}));
|
|
11484
11655
|
};
|
|
11485
11656
|
|
|
@@ -11502,7 +11673,7 @@ var typeInitValueMap = {
|
|
|
11502
11673
|
}]
|
|
11503
11674
|
};
|
|
11504
11675
|
var jstGoods = function jstGoods(props) {
|
|
11505
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11;
|
|
11676
|
+
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;
|
|
11506
11677
|
var _props$value = props.value,
|
|
11507
11678
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11508
11679
|
onChange = props.onChange,
|
|
@@ -11610,7 +11781,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11610
11781
|
onChange: function onChange(val) {
|
|
11611
11782
|
changeInputHandle(val, 'logisticsCompany');
|
|
11612
11783
|
},
|
|
11613
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false)
|
|
11784
|
+
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'],
|
|
11614
11785
|
showSearch: true,
|
|
11615
11786
|
dropdownMatchSelectWidth: false,
|
|
11616
11787
|
filterOption: function filterOption(input, option) {
|
|
@@ -11627,28 +11798,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
11627
11798
|
onChange: function onChange(e) {
|
|
11628
11799
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11629
11800
|
},
|
|
11630
|
-
value: (_value$
|
|
11801
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11631
11802
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11632
11803
|
disabled: disabled,
|
|
11633
11804
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11634
11805
|
onChange: function onChange(e) {
|
|
11635
11806
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11636
11807
|
},
|
|
11637
|
-
value: (_value$
|
|
11808
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11638
11809
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11639
11810
|
disabled: disabled,
|
|
11640
11811
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11641
11812
|
onChange: function onChange(e) {
|
|
11642
11813
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11643
11814
|
},
|
|
11644
|
-
value: (_value$
|
|
11815
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11645
11816
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11646
11817
|
disabled: disabled,
|
|
11647
11818
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11648
11819
|
onChange: function onChange(e) {
|
|
11649
11820
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11650
11821
|
},
|
|
11651
|
-
value: (_value$
|
|
11822
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11652
11823
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11653
11824
|
style: {
|
|
11654
11825
|
minWidth: '100px',
|
|
@@ -11659,7 +11830,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11659
11830
|
showSearch: true,
|
|
11660
11831
|
options: sendOptions,
|
|
11661
11832
|
filterOption: filterOption,
|
|
11662
|
-
value: ((_value$
|
|
11833
|
+
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,
|
|
11663
11834
|
onChange: function onChange(value, option) {
|
|
11664
11835
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11665
11836
|
}
|
|
@@ -11669,14 +11840,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11669
11840
|
onChange: function onChange(e) {
|
|
11670
11841
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11671
11842
|
},
|
|
11672
|
-
value: (_value$
|
|
11843
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11673
11844
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11674
11845
|
disabled: disabled,
|
|
11675
11846
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11676
11847
|
onChange: function onChange(e) {
|
|
11677
11848
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11678
11849
|
},
|
|
11679
|
-
value: (_value$
|
|
11850
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11680
11851
|
})) : null) : null);
|
|
11681
11852
|
};
|
|
11682
11853
|
|
|
@@ -12243,7 +12414,7 @@ var gyColumns = [{
|
|
|
12243
12414
|
}, {
|
|
12244
12415
|
dataIndex: 'specNo',
|
|
12245
12416
|
title: 'SKU编码',
|
|
12246
|
-
width:
|
|
12417
|
+
width: 150,
|
|
12247
12418
|
ellipsis: true
|
|
12248
12419
|
}, {
|
|
12249
12420
|
dataIndex: 'goodName',
|
|
@@ -12254,11 +12425,11 @@ var gyColumns = [{
|
|
|
12254
12425
|
dataIndex: 'goodShortName',
|
|
12255
12426
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12256
12427
|
ellipsis: true,
|
|
12257
|
-
width:
|
|
12428
|
+
width: 150
|
|
12258
12429
|
}, {
|
|
12259
12430
|
dataIndex: 'goodNo',
|
|
12260
12431
|
title: '商品编码',
|
|
12261
|
-
width:
|
|
12432
|
+
width: 150,
|
|
12262
12433
|
ellipsis: true
|
|
12263
12434
|
}, {
|
|
12264
12435
|
dataIndex: 'goodPicUrl',
|
|
@@ -12531,12 +12702,144 @@ var bse3Columns = [{
|
|
|
12531
12702
|
width: 100
|
|
12532
12703
|
}];
|
|
12533
12704
|
|
|
12705
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12706
|
+
if (!isBoolean(val)) return null;
|
|
12707
|
+
return val ? '是' : '否';
|
|
12708
|
+
};
|
|
12709
|
+
var kmColumns = [{
|
|
12710
|
+
dataIndex: 'goodName',
|
|
12711
|
+
title: '商品名称',
|
|
12712
|
+
width: 250,
|
|
12713
|
+
ellipsis: true
|
|
12714
|
+
}, {
|
|
12715
|
+
dataIndex: 'goodNo',
|
|
12716
|
+
title: '商品编码',
|
|
12717
|
+
width: 150,
|
|
12718
|
+
ellipsis: true
|
|
12719
|
+
}, {
|
|
12720
|
+
dataIndex: 'goodId',
|
|
12721
|
+
title: '商品ID',
|
|
12722
|
+
width: 200,
|
|
12723
|
+
ellipsis: true
|
|
12724
|
+
}, {
|
|
12725
|
+
dataIndex: 'goodPicUrl',
|
|
12726
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12727
|
+
width: 150,
|
|
12728
|
+
render: function render(val) {
|
|
12729
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12730
|
+
width: 60,
|
|
12731
|
+
src: val
|
|
12732
|
+
});
|
|
12733
|
+
}
|
|
12734
|
+
}, {
|
|
12735
|
+
dataIndex: 'goodShortName',
|
|
12736
|
+
title: '商品简称',
|
|
12737
|
+
width: 200,
|
|
12738
|
+
ellipsis: true
|
|
12739
|
+
}, {
|
|
12740
|
+
dataIndex: 'goodBarcode',
|
|
12741
|
+
title: '商品条码',
|
|
12742
|
+
width: 200,
|
|
12743
|
+
ellipsis: true
|
|
12744
|
+
}, {
|
|
12745
|
+
dataIndex: 'brandName',
|
|
12746
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12747
|
+
ellipsis: true,
|
|
12748
|
+
width: 150
|
|
12749
|
+
}, {
|
|
12750
|
+
dataIndex: 'skuType',
|
|
12751
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12752
|
+
ellipsis: true,
|
|
12753
|
+
width: 150
|
|
12754
|
+
}, {
|
|
12755
|
+
dataIndex: 'specName',
|
|
12756
|
+
title: "SKU\u540D\u79F0",
|
|
12757
|
+
ellipsis: true,
|
|
12758
|
+
width: 150
|
|
12759
|
+
}, {
|
|
12760
|
+
dataIndex: 'specNo',
|
|
12761
|
+
title: "SKU\u7F16\u7801",
|
|
12762
|
+
ellipsis: true,
|
|
12763
|
+
width: 150
|
|
12764
|
+
}, {
|
|
12765
|
+
dataIndex: 'specId',
|
|
12766
|
+
title: "SKU ID",
|
|
12767
|
+
ellipsis: true,
|
|
12768
|
+
width: 150
|
|
12769
|
+
}, {
|
|
12770
|
+
dataIndex: 'propertiesValue',
|
|
12771
|
+
title: "\u89C4\u683C\u503C",
|
|
12772
|
+
ellipsis: true,
|
|
12773
|
+
width: 150
|
|
12774
|
+
}, {
|
|
12775
|
+
dataIndex: 'skuShortTitle',
|
|
12776
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12777
|
+
ellipsis: true,
|
|
12778
|
+
width: 150
|
|
12779
|
+
}, {
|
|
12780
|
+
dataIndex: 'specBarcode',
|
|
12781
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12782
|
+
ellipsis: true,
|
|
12783
|
+
width: 150
|
|
12784
|
+
}, {
|
|
12785
|
+
dataIndex: 'specImgUrl',
|
|
12786
|
+
title: "SKU \u56FE\u7247",
|
|
12787
|
+
ellipsis: true,
|
|
12788
|
+
width: 150,
|
|
12789
|
+
render: function render(val) {
|
|
12790
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12791
|
+
width: 60,
|
|
12792
|
+
src: val
|
|
12793
|
+
});
|
|
12794
|
+
}
|
|
12795
|
+
}, {
|
|
12796
|
+
dataIndex: 'isGift',
|
|
12797
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12798
|
+
ellipsis: true,
|
|
12799
|
+
width: 150,
|
|
12800
|
+
render: function render(val) {
|
|
12801
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12802
|
+
}
|
|
12803
|
+
}, {
|
|
12804
|
+
dataIndex: 'isVirtual',
|
|
12805
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12806
|
+
ellipsis: true,
|
|
12807
|
+
width: 150,
|
|
12808
|
+
render: function render(val) {
|
|
12809
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12810
|
+
}
|
|
12811
|
+
}, {
|
|
12812
|
+
dataIndex: 'isSkuItem',
|
|
12813
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12814
|
+
ellipsis: true,
|
|
12815
|
+
width: 150,
|
|
12816
|
+
render: function render(val) {
|
|
12817
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12818
|
+
}
|
|
12819
|
+
}, {
|
|
12820
|
+
dataIndex: 'marketPrice',
|
|
12821
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12822
|
+
ellipsis: true,
|
|
12823
|
+
width: 150
|
|
12824
|
+
}, {
|
|
12825
|
+
dataIndex: 'retailPrice',
|
|
12826
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12827
|
+
ellipsis: true,
|
|
12828
|
+
width: 150
|
|
12829
|
+
}, {
|
|
12830
|
+
dataIndex: 'costPrice',
|
|
12831
|
+
title: "\u6210\u672C\u4EF7",
|
|
12832
|
+
ellipsis: true,
|
|
12833
|
+
width: 150
|
|
12834
|
+
}];
|
|
12835
|
+
|
|
12534
12836
|
var getColumnsMap = function getColumnsMap() {
|
|
12535
12837
|
return cloneDeep({
|
|
12536
12838
|
gy: gyColumns,
|
|
12537
12839
|
jst: jstColumns,
|
|
12538
12840
|
wdt: wdtColumns,
|
|
12539
|
-
bse3: bse3Columns
|
|
12841
|
+
bse3: bse3Columns,
|
|
12842
|
+
km: kmColumns
|
|
12540
12843
|
});
|
|
12541
12844
|
};
|
|
12542
12845
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -12591,9 +12894,7 @@ var useGetColumns = (function (type) {
|
|
|
12591
12894
|
loading = _useState4[0],
|
|
12592
12895
|
setLoading = _useState4[1];
|
|
12593
12896
|
var showColumnsDataIndexList = useMemo(function () {
|
|
12594
|
-
return columns.
|
|
12595
|
-
return Object.hasOwn(item, 'dataIndex');
|
|
12596
|
-
}).map(function (item) {
|
|
12897
|
+
return columns.map(function (item) {
|
|
12597
12898
|
return item.dataIndex;
|
|
12598
12899
|
});
|
|
12599
12900
|
}, [columns]);
|
|
@@ -13488,23 +13789,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13488
13789
|
};
|
|
13489
13790
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
13490
13791
|
|
|
13792
|
+
var rowCheckKey = 'id';
|
|
13491
13793
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13492
13794
|
var current = _ref.current,
|
|
13493
13795
|
pageSize = _ref.pageSize;
|
|
13494
|
-
var data = {
|
|
13495
|
-
goodShortName: formData.goodShortName || null,
|
|
13496
|
-
skuName: formData.skuName || null,
|
|
13497
|
-
skuCode: formData.skuCode || null,
|
|
13498
|
-
goodName: formData.goodName || null,
|
|
13499
|
-
goodNo: formData.goodNo || null
|
|
13500
|
-
};
|
|
13501
13796
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13502
13797
|
method: 'post',
|
|
13503
13798
|
data: _objectSpread2({
|
|
13504
13799
|
pageSize: pageSize,
|
|
13505
13800
|
pageNo: current,
|
|
13506
|
-
platform: '
|
|
13507
|
-
},
|
|
13801
|
+
platform: 'KM_ERP'
|
|
13802
|
+
}, formData)
|
|
13508
13803
|
}).then(function (res) {
|
|
13509
13804
|
var _res$data = res.data,
|
|
13510
13805
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13521,22 +13816,19 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13521
13816
|
});
|
|
13522
13817
|
};
|
|
13523
13818
|
var searchFormData$2 = [{
|
|
13524
|
-
label: '
|
|
13525
|
-
name: '
|
|
13819
|
+
label: '商品名称',
|
|
13820
|
+
name: 'goodName'
|
|
13526
13821
|
}, {
|
|
13527
|
-
label: '
|
|
13822
|
+
label: '商品编码',
|
|
13823
|
+
name: 'goodNo'
|
|
13824
|
+
}, {
|
|
13825
|
+
label: 'SKU名称',
|
|
13528
13826
|
name: 'skuName',
|
|
13529
13827
|
dataIndex: 'specName'
|
|
13530
13828
|
}, {
|
|
13531
|
-
label: '
|
|
13829
|
+
label: 'SKU编码',
|
|
13532
13830
|
name: 'skuCode',
|
|
13533
13831
|
dataIndex: 'specNo'
|
|
13534
|
-
}, {
|
|
13535
|
-
label: '商品名称',
|
|
13536
|
-
name: 'goodName'
|
|
13537
|
-
}, {
|
|
13538
|
-
label: '商品编码',
|
|
13539
|
-
name: 'goodNo'
|
|
13540
13832
|
}];
|
|
13541
13833
|
var GoodList$3 = function GoodList(props, ref) {
|
|
13542
13834
|
var _useState = useState([]),
|
|
@@ -13547,7 +13839,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13547
13839
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13548
13840
|
selectIds = _useState4[0],
|
|
13549
13841
|
setSelectIds = _useState4[1];
|
|
13550
|
-
var _useGetColumns = useGetColumns('
|
|
13842
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13551
13843
|
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13552
13844
|
columns = _useGetColumns2[0],
|
|
13553
13845
|
showColumnsDataIndexList = _useGetColumns2[1],
|
|
@@ -13576,41 +13868,50 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13576
13868
|
fixed: true,
|
|
13577
13869
|
onSelect: function onSelect(record, selected) {
|
|
13578
13870
|
if (selected) {
|
|
13579
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record
|
|
13871
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13580
13872
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13581
13873
|
} else {
|
|
13582
13874
|
setSelectIds(selectIds.filter(function (t) {
|
|
13583
|
-
return t !== record
|
|
13875
|
+
return t !== record[rowCheckKey];
|
|
13584
13876
|
}));
|
|
13585
13877
|
setSelect(selectList.filter(function (t) {
|
|
13586
|
-
return t
|
|
13878
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13587
13879
|
}));
|
|
13588
13880
|
}
|
|
13589
13881
|
},
|
|
13590
13882
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13591
13883
|
if (selected) {
|
|
13592
13884
|
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13593
|
-
return t
|
|
13885
|
+
return t[rowCheckKey];
|
|
13594
13886
|
}))));
|
|
13595
13887
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13596
13888
|
} else {
|
|
13597
13889
|
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
13598
|
-
return t
|
|
13890
|
+
return t[rowCheckKey];
|
|
13599
13891
|
})));
|
|
13600
13892
|
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13601
|
-
return arrVal
|
|
13893
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13602
13894
|
});
|
|
13603
13895
|
setSelect(list);
|
|
13604
13896
|
}
|
|
13897
|
+
},
|
|
13898
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13899
|
+
var options = {
|
|
13900
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13901
|
+
return row[rowCheckKey] || row.skuId;
|
|
13902
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13903
|
+
name: record[rowCheckKey]
|
|
13904
|
+
};
|
|
13905
|
+
return options;
|
|
13605
13906
|
}
|
|
13606
13907
|
};
|
|
13607
13908
|
var showTable = function showTable() {
|
|
13608
13909
|
var handleDelete = function handleDelete(record) {
|
|
13609
13910
|
setSelectIds(selectIds.filter(function (t) {
|
|
13610
|
-
return t !== record
|
|
13911
|
+
return t !== record[rowCheckKey];
|
|
13611
13912
|
}));
|
|
13612
13913
|
setSelect(selectList.filter(function (t) {
|
|
13613
|
-
return t
|
|
13914
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13614
13915
|
}));
|
|
13615
13916
|
};
|
|
13616
13917
|
var showColumns = [{
|
|
@@ -13634,7 +13935,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13634
13935
|
}
|
|
13635
13936
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
13636
13937
|
columns: showColumns,
|
|
13637
|
-
rowKey:
|
|
13938
|
+
rowKey: rowCheckKey,
|
|
13638
13939
|
dataSource: selectList,
|
|
13639
13940
|
scroll: {
|
|
13640
13941
|
x: '100%',
|
|
@@ -13663,7 +13964,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13663
13964
|
}
|
|
13664
13965
|
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13665
13966
|
rowSelection: rowSelection,
|
|
13666
|
-
rowKey:
|
|
13967
|
+
rowKey: rowCheckKey,
|
|
13667
13968
|
columns: columns,
|
|
13668
13969
|
scroll: {
|
|
13669
13970
|
x: '100%',
|
|
@@ -13680,13 +13981,15 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13680
13981
|
type: "text"
|
|
13681
13982
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13682
13983
|
};
|
|
13683
|
-
var
|
|
13984
|
+
var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
|
|
13684
13985
|
|
|
13685
|
-
var
|
|
13986
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
13686
13987
|
useImperativeHandle(ref, function () {
|
|
13687
13988
|
return {
|
|
13688
|
-
open: function open() {
|
|
13989
|
+
open: function open(shopCode) {
|
|
13990
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13689
13991
|
setVisible(true);
|
|
13992
|
+
setSelectedRows(options.value || []);
|
|
13690
13993
|
}
|
|
13691
13994
|
};
|
|
13692
13995
|
});
|
|
@@ -13696,13 +13999,17 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13696
13999
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13697
14000
|
visible = _useState2[0],
|
|
13698
14001
|
setVisible = _useState2[1];
|
|
13699
|
-
var
|
|
14002
|
+
var _useState3 = useState([]),
|
|
14003
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14004
|
+
selectedRows = _useState4[0],
|
|
14005
|
+
setSelectedRows = _useState4[1];
|
|
14006
|
+
var erpGoodsListRef = useRef(null);
|
|
13700
14007
|
var _onCancel = function onCancel() {
|
|
13701
14008
|
setVisible(false);
|
|
13702
14009
|
};
|
|
13703
14010
|
var onOk = function onOk() {
|
|
13704
|
-
var
|
|
13705
|
-
var selectedList = ((
|
|
14011
|
+
var _erpGoodsListRef$curr;
|
|
14012
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
13706
14013
|
onSubmit(selectedList);
|
|
13707
14014
|
_onCancel();
|
|
13708
14015
|
};
|
|
@@ -13717,8 +14024,244 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
13717
14024
|
},
|
|
13718
14025
|
onOk: onOk,
|
|
13719
14026
|
wrapClassName: "goodModal"
|
|
13720
|
-
}, /*#__PURE__*/React.createElement(
|
|
13721
|
-
ref:
|
|
14027
|
+
}, /*#__PURE__*/React.createElement(ErpGoodsList, {
|
|
14028
|
+
ref: erpGoodsListRef,
|
|
14029
|
+
selectedRows: selectedRows
|
|
14030
|
+
})));
|
|
14031
|
+
};
|
|
14032
|
+
var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
|
|
14033
|
+
|
|
14034
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14035
|
+
var current = _ref.current,
|
|
14036
|
+
pageSize = _ref.pageSize;
|
|
14037
|
+
var data = {
|
|
14038
|
+
goodShortName: formData.goodShortName || null,
|
|
14039
|
+
skuName: formData.skuName || null,
|
|
14040
|
+
skuCode: formData.skuCode || null,
|
|
14041
|
+
goodName: formData.goodName || null,
|
|
14042
|
+
goodNo: formData.goodNo || null
|
|
14043
|
+
};
|
|
14044
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14045
|
+
method: 'post',
|
|
14046
|
+
data: _objectSpread2({
|
|
14047
|
+
pageSize: pageSize,
|
|
14048
|
+
pageNo: current,
|
|
14049
|
+
platform: 'GY_ERP'
|
|
14050
|
+
}, data)
|
|
14051
|
+
}).then(function (res) {
|
|
14052
|
+
var _res$data = res.data,
|
|
14053
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14054
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14055
|
+
_res$data$total = _res$data.total,
|
|
14056
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14057
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14058
|
+
return _objectSpread2({}, item);
|
|
14059
|
+
});
|
|
14060
|
+
return {
|
|
14061
|
+
total: total,
|
|
14062
|
+
list: newProducts
|
|
14063
|
+
};
|
|
14064
|
+
});
|
|
14065
|
+
};
|
|
14066
|
+
var searchFormData$3 = [{
|
|
14067
|
+
label: '商品简称',
|
|
14068
|
+
name: 'goodShortName'
|
|
14069
|
+
}, {
|
|
14070
|
+
label: '商品sku名称',
|
|
14071
|
+
name: 'skuName',
|
|
14072
|
+
dataIndex: 'specName'
|
|
14073
|
+
}, {
|
|
14074
|
+
label: '商品sku编码',
|
|
14075
|
+
name: 'skuCode',
|
|
14076
|
+
dataIndex: 'specNo'
|
|
14077
|
+
}, {
|
|
14078
|
+
label: '商品名称',
|
|
14079
|
+
name: 'goodName'
|
|
14080
|
+
}, {
|
|
14081
|
+
label: '商品编码',
|
|
14082
|
+
name: 'goodNo'
|
|
14083
|
+
}];
|
|
14084
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
14085
|
+
var _useState = useState([]),
|
|
14086
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14087
|
+
selectList = _useState2[0],
|
|
14088
|
+
setSelect = _useState2[1];
|
|
14089
|
+
var _useState3 = useState([]),
|
|
14090
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14091
|
+
selectIds = _useState4[0],
|
|
14092
|
+
setSelectIds = _useState4[1];
|
|
14093
|
+
var _useGetColumns = useGetColumns('gy'),
|
|
14094
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
14095
|
+
columns = _useGetColumns2[0],
|
|
14096
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
14097
|
+
loading = _useGetColumns2[2];
|
|
14098
|
+
useImperativeHandle(ref, function () {
|
|
14099
|
+
return {
|
|
14100
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
14101
|
+
return selectList;
|
|
14102
|
+
}
|
|
14103
|
+
};
|
|
14104
|
+
});
|
|
14105
|
+
var _Form$useForm = Form.useForm(),
|
|
14106
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
14107
|
+
form = _Form$useForm2[0];
|
|
14108
|
+
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
14109
|
+
defaultPageSize: 10,
|
|
14110
|
+
form: form
|
|
14111
|
+
}),
|
|
14112
|
+
tableProps = _useAntdTable.tableProps,
|
|
14113
|
+
search = _useAntdTable.search,
|
|
14114
|
+
params = _useAntdTable.params;
|
|
14115
|
+
var submit = search.submit,
|
|
14116
|
+
reset = search.reset;
|
|
14117
|
+
var rowSelection = {
|
|
14118
|
+
selectedRowKeys: selectIds,
|
|
14119
|
+
fixed: true,
|
|
14120
|
+
onSelect: function onSelect(record, selected) {
|
|
14121
|
+
if (selected) {
|
|
14122
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
14123
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
14124
|
+
} else {
|
|
14125
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14126
|
+
return t !== record.id;
|
|
14127
|
+
}));
|
|
14128
|
+
setSelect(selectList.filter(function (t) {
|
|
14129
|
+
return t.id !== record.id;
|
|
14130
|
+
}));
|
|
14131
|
+
}
|
|
14132
|
+
},
|
|
14133
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
14134
|
+
if (selected) {
|
|
14135
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
14136
|
+
return t.id;
|
|
14137
|
+
}))));
|
|
14138
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
14139
|
+
} else {
|
|
14140
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
14141
|
+
return t.id;
|
|
14142
|
+
})));
|
|
14143
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
14144
|
+
return arrVal.id !== othVal.id;
|
|
14145
|
+
});
|
|
14146
|
+
setSelect(list);
|
|
14147
|
+
}
|
|
14148
|
+
}
|
|
14149
|
+
};
|
|
14150
|
+
var showTable = function showTable() {
|
|
14151
|
+
var handleDelete = function handleDelete(record) {
|
|
14152
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14153
|
+
return t !== record.id;
|
|
14154
|
+
}));
|
|
14155
|
+
setSelect(selectList.filter(function (t) {
|
|
14156
|
+
return t.id !== record.id;
|
|
14157
|
+
}));
|
|
14158
|
+
};
|
|
14159
|
+
var showColumns = [{
|
|
14160
|
+
dataIndex: '',
|
|
14161
|
+
title: "\u64CD\u4F5C",
|
|
14162
|
+
ellipsis: true,
|
|
14163
|
+
width: 100,
|
|
14164
|
+
render: function render(val, record) {
|
|
14165
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
14166
|
+
type: "link",
|
|
14167
|
+
onClick: function onClick() {
|
|
14168
|
+
return handleDelete(record);
|
|
14169
|
+
}
|
|
14170
|
+
}, "\u5220\u9664");
|
|
14171
|
+
}
|
|
14172
|
+
}].concat(takeRight(columns, columns.length - 1));
|
|
14173
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
14174
|
+
style: {
|
|
14175
|
+
width: '100%',
|
|
14176
|
+
maxWidth: '387px'
|
|
14177
|
+
}
|
|
14178
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
14179
|
+
columns: showColumns,
|
|
14180
|
+
rowKey: 'id',
|
|
14181
|
+
dataSource: selectList,
|
|
14182
|
+
scroll: {
|
|
14183
|
+
x: '100%',
|
|
14184
|
+
y: 250
|
|
14185
|
+
},
|
|
14186
|
+
pagination: {
|
|
14187
|
+
size: 'small',
|
|
14188
|
+
total: selectIds.length,
|
|
14189
|
+
pageSize: 10,
|
|
14190
|
+
showSizeChanger: false
|
|
14191
|
+
}
|
|
14192
|
+
})) : null;
|
|
14193
|
+
};
|
|
14194
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
14195
|
+
active: true,
|
|
14196
|
+
loading: loading
|
|
14197
|
+
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
14198
|
+
searchFormData: searchFormData$3,
|
|
14199
|
+
form: form,
|
|
14200
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14201
|
+
submit: submit,
|
|
14202
|
+
reset: reset
|
|
14203
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14204
|
+
style: {
|
|
14205
|
+
marginTop: '4px'
|
|
14206
|
+
}
|
|
14207
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
14208
|
+
rowSelection: rowSelection,
|
|
14209
|
+
rowKey: "id",
|
|
14210
|
+
columns: columns,
|
|
14211
|
+
scroll: {
|
|
14212
|
+
x: '100%',
|
|
14213
|
+
y: 250
|
|
14214
|
+
}
|
|
14215
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
14216
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14217
|
+
return triggerNode.parentElement;
|
|
14218
|
+
},
|
|
14219
|
+
content: showTable(),
|
|
14220
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14221
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
14222
|
+
danger: true,
|
|
14223
|
+
type: "text"
|
|
14224
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
14225
|
+
};
|
|
14226
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
|
|
14227
|
+
|
|
14228
|
+
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
14229
|
+
useImperativeHandle(ref, function () {
|
|
14230
|
+
return {
|
|
14231
|
+
open: function open() {
|
|
14232
|
+
setVisible(true);
|
|
14233
|
+
}
|
|
14234
|
+
};
|
|
14235
|
+
});
|
|
14236
|
+
var onSubmit = props.onSubmit,
|
|
14237
|
+
width = props.width;
|
|
14238
|
+
var _useState = useState(false),
|
|
14239
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14240
|
+
visible = _useState2[0],
|
|
14241
|
+
setVisible = _useState2[1];
|
|
14242
|
+
var gyGoodsListRef = useRef(null);
|
|
14243
|
+
var _onCancel = function onCancel() {
|
|
14244
|
+
setVisible(false);
|
|
14245
|
+
};
|
|
14246
|
+
var onOk = function onOk() {
|
|
14247
|
+
var _gyGoodsListRef$curre;
|
|
14248
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
14249
|
+
onSubmit(selectedList);
|
|
14250
|
+
_onCancel();
|
|
14251
|
+
};
|
|
14252
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
14253
|
+
title: '选择商品',
|
|
14254
|
+
okText: '确认',
|
|
14255
|
+
cancelText: '取消',
|
|
14256
|
+
visible: visible,
|
|
14257
|
+
width: width || 850,
|
|
14258
|
+
onCancel: function onCancel() {
|
|
14259
|
+
_onCancel();
|
|
14260
|
+
},
|
|
14261
|
+
onOk: onOk,
|
|
14262
|
+
wrapClassName: "goodModal"
|
|
14263
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList$1, {
|
|
14264
|
+
ref: gyGoodsListRef
|
|
13722
14265
|
})));
|
|
13723
14266
|
};
|
|
13724
14267
|
var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
|
|
@@ -14429,6 +14972,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14429
14972
|
label: '组合装',
|
|
14430
14973
|
value: '2'
|
|
14431
14974
|
}];
|
|
14975
|
+
var typeMap = {
|
|
14976
|
+
'1': '单品',
|
|
14977
|
+
'2': '组合装'
|
|
14978
|
+
};
|
|
14432
14979
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14433
14980
|
style: {
|
|
14434
14981
|
width: 70
|
|
@@ -14438,7 +14985,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14438
14985
|
onChange: function onChange(value) {
|
|
14439
14986
|
return updateHandle(value, index, 'type');
|
|
14440
14987
|
}
|
|
14441
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14988
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14442
14989
|
}
|
|
14443
14990
|
}],
|
|
14444
14991
|
//旺店通换出商品信息
|
|
@@ -14550,6 +15097,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14550
15097
|
label: '组合装',
|
|
14551
15098
|
value: '2'
|
|
14552
15099
|
}];
|
|
15100
|
+
var typeMap = {
|
|
15101
|
+
'1': '单品',
|
|
15102
|
+
'2': '组合装'
|
|
15103
|
+
};
|
|
14553
15104
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14554
15105
|
style: {
|
|
14555
15106
|
width: 70
|
|
@@ -14559,13 +15110,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14559
15110
|
onChange: function onChange(value) {
|
|
14560
15111
|
return updateHandle(value, index, 'type');
|
|
14561
15112
|
}
|
|
14562
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15113
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14563
15114
|
}
|
|
14564
15115
|
}]
|
|
14565
15116
|
};
|
|
14566
15117
|
};
|
|
14567
15118
|
|
|
14568
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15119
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14569
15120
|
if (isNull(val)) return null;
|
|
14570
15121
|
return val ? '是' : '否';
|
|
14571
15122
|
};
|
|
@@ -14703,7 +15254,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14703
15254
|
label: '否',
|
|
14704
15255
|
value: false
|
|
14705
15256
|
}]
|
|
14706
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
15257
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
|
|
14707
15258
|
},
|
|
14708
15259
|
width: 100
|
|
14709
15260
|
}]
|
|
@@ -14715,7 +15266,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14715
15266
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14716
15267
|
return false;
|
|
14717
15268
|
};
|
|
14718
|
-
var getYesOrNo$
|
|
15269
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14719
15270
|
if (isNull(val)) return null;
|
|
14720
15271
|
return val ? '是' : '否';
|
|
14721
15272
|
};
|
|
@@ -14825,7 +15376,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14825
15376
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14826
15377
|
width: 150,
|
|
14827
15378
|
render: function render(val) {
|
|
14828
|
-
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15379
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14829
15380
|
}
|
|
14830
15381
|
}, {
|
|
14831
15382
|
dataIndex: 'isGift',
|
|
@@ -14844,7 +15395,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14844
15395
|
label: '否',
|
|
14845
15396
|
value: 0
|
|
14846
15397
|
}]
|
|
14847
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15398
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14848
15399
|
}
|
|
14849
15400
|
}, {
|
|
14850
15401
|
dataIndex: 'skuNote',
|
|
@@ -14964,7 +15515,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14964
15515
|
label: '否',
|
|
14965
15516
|
value: 0
|
|
14966
15517
|
}]
|
|
14967
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15518
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14968
15519
|
}
|
|
14969
15520
|
}].map(function (item) {
|
|
14970
15521
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15088,7 +15639,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15088
15639
|
label: '否',
|
|
15089
15640
|
value: 0
|
|
15090
15641
|
}]
|
|
15091
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15642
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
15092
15643
|
}
|
|
15093
15644
|
}].map(function (item) {
|
|
15094
15645
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15210,7 +15761,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15210
15761
|
ellipsis: true,
|
|
15211
15762
|
align: 'center',
|
|
15212
15763
|
render: function render(val, record, index) {
|
|
15213
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15764
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15214
15765
|
}
|
|
15215
15766
|
}, {
|
|
15216
15767
|
dataIndex: 'batchId',
|
|
@@ -15486,7 +16037,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15486
16037
|
dataIndex: 'saleAmount',
|
|
15487
16038
|
title: '总金额',
|
|
15488
16039
|
render: function render(val, record) {
|
|
15489
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16040
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15490
16041
|
}
|
|
15491
16042
|
}, {
|
|
15492
16043
|
dataIndex: 'batchId',
|
|
@@ -15595,7 +16146,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15595
16146
|
dataIndex: 'saleAmount',
|
|
15596
16147
|
title: '总金额',
|
|
15597
16148
|
render: function render(val, record) {
|
|
15598
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16149
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15599
16150
|
}
|
|
15600
16151
|
}, {
|
|
15601
16152
|
dataIndex: 'isGift',
|
|
@@ -15634,20 +16185,253 @@ var getColumns$5 = function getColumns() {
|
|
|
15634
16185
|
};
|
|
15635
16186
|
};
|
|
15636
16187
|
|
|
16188
|
+
function toNum$2(value) {
|
|
16189
|
+
if (typeof value === 'string') {
|
|
16190
|
+
return value ? +value : void 0;
|
|
16191
|
+
}
|
|
16192
|
+
if (typeof value === 'number') {
|
|
16193
|
+
return value;
|
|
16194
|
+
}
|
|
16195
|
+
return void 0;
|
|
16196
|
+
}
|
|
15637
16197
|
var getColumns$6 = function getColumns(_ref) {
|
|
15638
16198
|
var _ref$text = _ref.text,
|
|
15639
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15640
16199
|
disabled = _ref.disabled,
|
|
15641
16200
|
updateHandle = _ref.updateHandle;
|
|
15642
16201
|
return {
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
|
|
16202
|
+
KM_GOODS: [{
|
|
16203
|
+
dataIndex: 'skuPropertiesName',
|
|
16204
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16205
|
+
width: 250
|
|
16206
|
+
}, {
|
|
16207
|
+
dataIndex: 'sysTitle',
|
|
16208
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16209
|
+
width: 150
|
|
16210
|
+
}, {
|
|
16211
|
+
dataIndex: 'title',
|
|
16212
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16213
|
+
width: 150
|
|
16214
|
+
}, {
|
|
16215
|
+
dataIndex: 'shortTitle',
|
|
16216
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16217
|
+
width: 150
|
|
16218
|
+
}, {
|
|
16219
|
+
dataIndex: 'sysOuterId',
|
|
16220
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16221
|
+
width: 150
|
|
16222
|
+
}, {
|
|
16223
|
+
dataIndex: 'skuSysId',
|
|
16224
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16225
|
+
width: 150
|
|
16226
|
+
}, {
|
|
16227
|
+
dataIndex: 'skuId',
|
|
16228
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16229
|
+
width: 170
|
|
16230
|
+
}, {
|
|
16231
|
+
dataIndex: 'itemSysId',
|
|
16232
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16233
|
+
width: 150
|
|
16234
|
+
}, {
|
|
16235
|
+
dataIndex: 'sysPicPath',
|
|
16236
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16237
|
+
width: 100,
|
|
16238
|
+
render: function render(val) {
|
|
16239
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16240
|
+
width: 60,
|
|
16241
|
+
src: val
|
|
16242
|
+
});
|
|
16243
|
+
}
|
|
16244
|
+
}, {
|
|
16245
|
+
dataIndex: 'num',
|
|
16246
|
+
title: "\u6570\u91CF",
|
|
16247
|
+
width: 100,
|
|
16248
|
+
render: function render(val, record, index) {
|
|
16249
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16250
|
+
style: {
|
|
16251
|
+
width: 70
|
|
16252
|
+
},
|
|
16253
|
+
value: val,
|
|
16254
|
+
min: 1,
|
|
16255
|
+
precision: 0,
|
|
16256
|
+
onChange: function onChange(num) {
|
|
16257
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16258
|
+
}
|
|
16259
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16260
|
+
}
|
|
16261
|
+
}, {
|
|
16262
|
+
dataIndex: 'payment',
|
|
16263
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16264
|
+
width: 150,
|
|
16265
|
+
render: function render(val, record, index) {
|
|
16266
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16267
|
+
style: {
|
|
16268
|
+
width: 130
|
|
16269
|
+
},
|
|
16270
|
+
value: val,
|
|
16271
|
+
min: 0,
|
|
16272
|
+
precision: 2,
|
|
16273
|
+
onChange: function onChange(num) {
|
|
16274
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16275
|
+
}
|
|
16276
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16277
|
+
}
|
|
16278
|
+
}, {
|
|
16279
|
+
dataIndex: 'price',
|
|
16280
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16281
|
+
width: 150,
|
|
16282
|
+
render: function render(val) {
|
|
16283
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16284
|
+
}
|
|
16285
|
+
}, {
|
|
16286
|
+
dataIndex: 'type',
|
|
16287
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16288
|
+
width: 150
|
|
16289
|
+
}].map(function (item) {
|
|
16290
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16291
|
+
align: 'center',
|
|
16292
|
+
ellipsis: true
|
|
16293
|
+
});
|
|
16294
|
+
}),
|
|
16295
|
+
KM_REISSUE_GOODS: [{
|
|
16296
|
+
dataIndex: 'skuPropertiesName',
|
|
16297
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16298
|
+
width: 250
|
|
16299
|
+
}, {
|
|
16300
|
+
dataIndex: 'sysTitle',
|
|
16301
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16302
|
+
width: 150
|
|
16303
|
+
}, {
|
|
16304
|
+
dataIndex: 'shortTitle',
|
|
16305
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16306
|
+
width: 150
|
|
16307
|
+
}, {
|
|
16308
|
+
dataIndex: 'title',
|
|
16309
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16310
|
+
width: 150
|
|
16311
|
+
}, {
|
|
16312
|
+
dataIndex: 'sysOuterId',
|
|
16313
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16314
|
+
width: 150
|
|
16315
|
+
}, {
|
|
16316
|
+
dataIndex: 'itemSysId',
|
|
16317
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16318
|
+
width: 150
|
|
16319
|
+
}, {
|
|
16320
|
+
dataIndex: 'skuSysId',
|
|
16321
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16322
|
+
width: 150
|
|
16323
|
+
}, {
|
|
16324
|
+
dataIndex: 'skuId',
|
|
16325
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16326
|
+
width: 170
|
|
16327
|
+
}, {
|
|
16328
|
+
dataIndex: 'realNum',
|
|
16329
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16330
|
+
width: 100,
|
|
16331
|
+
validator: function validator(_rule, value) {
|
|
16332
|
+
var title = '';
|
|
16333
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16334
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16335
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16336
|
+
if (res) {
|
|
16337
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16338
|
+
}
|
|
16339
|
+
return res;
|
|
16340
|
+
})) {
|
|
16341
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16342
|
+
}
|
|
16343
|
+
},
|
|
16344
|
+
render: function render(val, record, index) {
|
|
16345
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16346
|
+
style: {
|
|
16347
|
+
width: 70
|
|
16348
|
+
},
|
|
16349
|
+
value: val,
|
|
16350
|
+
min: 1,
|
|
16351
|
+
precision: 0,
|
|
16352
|
+
onChange: function onChange(num) {
|
|
16353
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16354
|
+
}
|
|
16355
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16356
|
+
}
|
|
16357
|
+
}, {
|
|
16358
|
+
dataIndex: 'desiredNum',
|
|
16359
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16360
|
+
width: 100,
|
|
16361
|
+
render: function render(val, record, index) {
|
|
16362
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16363
|
+
style: {
|
|
16364
|
+
width: 70
|
|
16365
|
+
},
|
|
16366
|
+
value: val,
|
|
16367
|
+
min: 1,
|
|
16368
|
+
precision: 0,
|
|
16369
|
+
onChange: function onChange(num) {
|
|
16370
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16371
|
+
}
|
|
16372
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16373
|
+
}
|
|
16374
|
+
}, {
|
|
16375
|
+
dataIndex: 'price',
|
|
16376
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16377
|
+
width: 150,
|
|
16378
|
+
render: function render(val) {
|
|
16379
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16380
|
+
}
|
|
16381
|
+
}, {
|
|
16382
|
+
dataIndex: 'payment',
|
|
16383
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16384
|
+
width: 150,
|
|
16385
|
+
render: function render(val, record, index) {
|
|
16386
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16387
|
+
style: {
|
|
16388
|
+
width: 130
|
|
16389
|
+
},
|
|
16390
|
+
value: val,
|
|
16391
|
+
min: 0,
|
|
16392
|
+
precision: 2,
|
|
16393
|
+
onChange: function onChange(num) {
|
|
16394
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16395
|
+
}
|
|
16396
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16397
|
+
}
|
|
16398
|
+
}, {
|
|
16399
|
+
dataIndex: 'type',
|
|
16400
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16401
|
+
width: 150
|
|
16402
|
+
}, {
|
|
16403
|
+
dataIndex: 'sysPicPath',
|
|
16404
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16405
|
+
width: 100,
|
|
16406
|
+
render: function render(val) {
|
|
16407
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16408
|
+
width: 60,
|
|
16409
|
+
src: val
|
|
16410
|
+
});
|
|
16411
|
+
}
|
|
16412
|
+
}].map(function (item) {
|
|
16413
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16414
|
+
align: 'center',
|
|
16415
|
+
ellipsis: true
|
|
16416
|
+
});
|
|
16417
|
+
})
|
|
16418
|
+
};
|
|
16419
|
+
};
|
|
16420
|
+
|
|
16421
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16422
|
+
var _ref$text = _ref.text,
|
|
16423
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16424
|
+
disabled = _ref.disabled,
|
|
16425
|
+
updateHandle = _ref.updateHandle;
|
|
16426
|
+
return {
|
|
16427
|
+
//bs商品信息
|
|
16428
|
+
default: [{
|
|
16429
|
+
dataIndex: 'mark',
|
|
16430
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16431
|
+
align: 'center',
|
|
16432
|
+
ellipsis: true,
|
|
16433
|
+
width: 70,
|
|
16434
|
+
render: function render(val, record, index) {
|
|
15651
16435
|
return /*#__PURE__*/React.createElement(Select, {
|
|
15652
16436
|
options: [{
|
|
15653
16437
|
label: '是',
|
|
@@ -15747,7 +16531,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15747
16531
|
disabled = _ref.disabled,
|
|
15748
16532
|
updateHandle = _ref.updateHandle,
|
|
15749
16533
|
updateDataHandle = _ref.updateDataHandle;
|
|
15750
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16534
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15751
16535
|
text: text,
|
|
15752
16536
|
disabled: disabled,
|
|
15753
16537
|
updateHandle: updateHandle
|
|
@@ -15772,8 +16556,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15772
16556
|
text: text,
|
|
15773
16557
|
disabled: disabled,
|
|
15774
16558
|
updateHandle: updateHandle
|
|
16559
|
+
})), getColumns$6({
|
|
16560
|
+
text: text,
|
|
16561
|
+
disabled: disabled,
|
|
16562
|
+
updateHandle: updateHandle
|
|
15775
16563
|
})), {}, {
|
|
15776
|
-
default: getColumns$
|
|
16564
|
+
default: getColumns$7({
|
|
15777
16565
|
text: text,
|
|
15778
16566
|
disabled: disabled,
|
|
15779
16567
|
updateHandle: updateHandle
|
|
@@ -15925,6 +16713,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15925
16713
|
})));
|
|
15926
16714
|
}
|
|
15927
16715
|
|
|
16716
|
+
var isErpType = {
|
|
16717
|
+
isWdt: function isWdt(type) {
|
|
16718
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16719
|
+
},
|
|
16720
|
+
isBsE3: function isBsE3(type) {
|
|
16721
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16722
|
+
},
|
|
16723
|
+
isGy: function isGy(type) {
|
|
16724
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16725
|
+
},
|
|
16726
|
+
isJst: function isJst(type) {
|
|
16727
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16728
|
+
},
|
|
16729
|
+
isKm: function isKm(type) {
|
|
16730
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16731
|
+
}
|
|
16732
|
+
};
|
|
16733
|
+
var processGoods = function processGoods(_ref) {
|
|
16734
|
+
var list = _ref.list,
|
|
16735
|
+
type = _ref.type,
|
|
16736
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16737
|
+
var newList = [];
|
|
16738
|
+
// 根据商品类型处理数据
|
|
16739
|
+
if (isErpType.isWdt(type)) {
|
|
16740
|
+
newList = processWdtGoods({
|
|
16741
|
+
list: list,
|
|
16742
|
+
type: type,
|
|
16743
|
+
canUpdateNumber: canUpdateNumber
|
|
16744
|
+
});
|
|
16745
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16746
|
+
newList = processBsE3Goods({
|
|
16747
|
+
list: list,
|
|
16748
|
+
type: type,
|
|
16749
|
+
canUpdateNumber: canUpdateNumber
|
|
16750
|
+
});
|
|
16751
|
+
} else if (isErpType.isGy(type)) {
|
|
16752
|
+
newList = processGyGoods({
|
|
16753
|
+
list: list,
|
|
16754
|
+
type: type,
|
|
16755
|
+
canUpdateNumber: canUpdateNumber
|
|
16756
|
+
});
|
|
16757
|
+
} else if (isErpType.isJst(type)) {
|
|
16758
|
+
newList = processJstGoods({
|
|
16759
|
+
list: list,
|
|
16760
|
+
type: type,
|
|
16761
|
+
canUpdateNumber: canUpdateNumber
|
|
16762
|
+
});
|
|
16763
|
+
} else if (isErpType.isKm(type)) {
|
|
16764
|
+
newList = processKmGoods({
|
|
16765
|
+
list: list,
|
|
16766
|
+
type: type,
|
|
16767
|
+
canUpdateNumber: canUpdateNumber
|
|
16768
|
+
});
|
|
16769
|
+
} else {
|
|
16770
|
+
newList = processDefaultGoods({
|
|
16771
|
+
list: list,
|
|
16772
|
+
type: type,
|
|
16773
|
+
canUpdateNumber: canUpdateNumber
|
|
16774
|
+
});
|
|
16775
|
+
}
|
|
16776
|
+
return newList;
|
|
16777
|
+
};
|
|
16778
|
+
// 处理不同类型的商品数据
|
|
16779
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16780
|
+
var list = _ref2.list,
|
|
16781
|
+
type = _ref2.type,
|
|
16782
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16783
|
+
return list.map(function (item) {
|
|
16784
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16785
|
+
uuid: uuid(),
|
|
16786
|
+
canDelete: true,
|
|
16787
|
+
num: 1,
|
|
16788
|
+
orderPrice: 0,
|
|
16789
|
+
sharePrice: 0,
|
|
16790
|
+
canUpdateNumber: canUpdateNumber
|
|
16791
|
+
});
|
|
16792
|
+
// 特殊处理换货商品
|
|
16793
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16794
|
+
processedItem.price = item.retailPrice;
|
|
16795
|
+
processedItem.type = '1';
|
|
16796
|
+
}
|
|
16797
|
+
return processedItem;
|
|
16798
|
+
});
|
|
16799
|
+
};
|
|
16800
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16801
|
+
var list = _ref3.list,
|
|
16802
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16803
|
+
return list.map(function (item) {
|
|
16804
|
+
var specNo = item.specNo,
|
|
16805
|
+
specId = item.specId,
|
|
16806
|
+
goodName = item.goodName,
|
|
16807
|
+
goodShortName = item.goodShortName,
|
|
16808
|
+
goodPicUrl = item.goodPicUrl,
|
|
16809
|
+
goodNo = item.goodNo,
|
|
16810
|
+
goodId = item.goodId,
|
|
16811
|
+
retailPrice = item.retailPrice;
|
|
16812
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16813
|
+
sku: specNo,
|
|
16814
|
+
skuId: specId,
|
|
16815
|
+
goodsName: goodName,
|
|
16816
|
+
goodsShortName: goodShortName,
|
|
16817
|
+
picPath: goodPicUrl,
|
|
16818
|
+
goodsSn: goodNo,
|
|
16819
|
+
goodsId: goodId,
|
|
16820
|
+
goodsPrice: retailPrice,
|
|
16821
|
+
shopPrice: retailPrice,
|
|
16822
|
+
sharePayment: '',
|
|
16823
|
+
sharePrice: '',
|
|
16824
|
+
payment: '',
|
|
16825
|
+
tcSku: '',
|
|
16826
|
+
tcGoodsNumber: '',
|
|
16827
|
+
taoCanSingleSl: '',
|
|
16828
|
+
isGift: '',
|
|
16829
|
+
uuid: uuid(),
|
|
16830
|
+
canDelete: true,
|
|
16831
|
+
canEdit: true,
|
|
16832
|
+
goodsNumber: 1,
|
|
16833
|
+
canUpdateNumber: canUpdateNumber
|
|
16834
|
+
});
|
|
16835
|
+
});
|
|
16836
|
+
};
|
|
16837
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16838
|
+
var list = _ref4.list;
|
|
16839
|
+
return list.map(function (item) {
|
|
16840
|
+
var goodName = item.goodName,
|
|
16841
|
+
goodShortName = item.goodShortName,
|
|
16842
|
+
goodNo = item.goodNo,
|
|
16843
|
+
specName = item.specName,
|
|
16844
|
+
specNo = item.specNo,
|
|
16845
|
+
retailPrice = item.retailPrice;
|
|
16846
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16847
|
+
uuid: uuid(),
|
|
16848
|
+
canDelete: true,
|
|
16849
|
+
canEdit: true,
|
|
16850
|
+
qty: 1,
|
|
16851
|
+
goodName: goodName,
|
|
16852
|
+
goodShortName: goodShortName,
|
|
16853
|
+
goodNo: goodNo,
|
|
16854
|
+
specName: specName,
|
|
16855
|
+
specNo: specNo,
|
|
16856
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16857
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16858
|
+
});
|
|
16859
|
+
});
|
|
16860
|
+
};
|
|
16861
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16862
|
+
var list = _ref5.list;
|
|
16863
|
+
return list.map(function (item) {
|
|
16864
|
+
return {
|
|
16865
|
+
name: item.goodName,
|
|
16866
|
+
skuId: item.goodNo,
|
|
16867
|
+
iId: item.styleCode,
|
|
16868
|
+
pic: item.goodPicUrl,
|
|
16869
|
+
propertiesValue: item.propertiesValue,
|
|
16870
|
+
saleBasePrice: item.retailPrice,
|
|
16871
|
+
salePrice: item.retailPrice,
|
|
16872
|
+
remark: '',
|
|
16873
|
+
uuid: uuid(),
|
|
16874
|
+
canDelete: true,
|
|
16875
|
+
canEdit: true,
|
|
16876
|
+
qty: 1
|
|
16877
|
+
};
|
|
16878
|
+
});
|
|
16879
|
+
};
|
|
16880
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16881
|
+
var list = _ref6.list,
|
|
16882
|
+
type = _ref6.type;
|
|
16883
|
+
var initParamsMap = {
|
|
16884
|
+
KM_GOODS: {
|
|
16885
|
+
num: 1
|
|
16886
|
+
},
|
|
16887
|
+
KM_REISSUE_GOODS: {
|
|
16888
|
+
realNum: 1,
|
|
16889
|
+
desiredNum: 1
|
|
16890
|
+
}
|
|
16891
|
+
};
|
|
16892
|
+
return list.map(function (item) {
|
|
16893
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16894
|
+
skuPropertiesName: item.specName,
|
|
16895
|
+
sysTitle: item.goodName,
|
|
16896
|
+
title: null,
|
|
16897
|
+
shortTitle: item.goodShortName,
|
|
16898
|
+
sysOuterId: item.goodNo,
|
|
16899
|
+
outerId: item.goodNo,
|
|
16900
|
+
skuSysId: item.specId,
|
|
16901
|
+
itemSysId: item.goodId,
|
|
16902
|
+
sysPicPath: item.goodPicUrl,
|
|
16903
|
+
payment: null,
|
|
16904
|
+
price: item.retailPrice,
|
|
16905
|
+
type: null,
|
|
16906
|
+
uuid: uuid(),
|
|
16907
|
+
canDelete: true,
|
|
16908
|
+
canEdit: true
|
|
16909
|
+
}, initParamsMap[type] || {});
|
|
16910
|
+
});
|
|
16911
|
+
};
|
|
16912
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16913
|
+
var list = _ref7.list,
|
|
16914
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16915
|
+
return list.map(function (item) {
|
|
16916
|
+
var goodsId = item.goodsId,
|
|
16917
|
+
name = item.name,
|
|
16918
|
+
code = item.code,
|
|
16919
|
+
skuCode = item.skuCode,
|
|
16920
|
+
marketPrice = item.marketPrice,
|
|
16921
|
+
skuName = item.skuName;
|
|
16922
|
+
return {
|
|
16923
|
+
id: goodsId,
|
|
16924
|
+
mark: '是',
|
|
16925
|
+
pic: '',
|
|
16926
|
+
skuName: skuName,
|
|
16927
|
+
name: name,
|
|
16928
|
+
code: code,
|
|
16929
|
+
sku: skuCode,
|
|
16930
|
+
money: marketPrice || 0,
|
|
16931
|
+
share: marketPrice || 0,
|
|
16932
|
+
number: 1,
|
|
16933
|
+
type: '',
|
|
16934
|
+
uuid: uuid(),
|
|
16935
|
+
canDelete: true,
|
|
16936
|
+
canUpdateNumber: canUpdateNumber
|
|
16937
|
+
};
|
|
16938
|
+
});
|
|
16939
|
+
};
|
|
16940
|
+
|
|
15928
16941
|
var GoodsModalMap = {
|
|
15929
16942
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15930
16943
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15939,6 +16952,8 @@ var GoodsModalMap = {
|
|
|
15939
16952
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15940
16953
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15941
16954
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16955
|
+
KM_GOODS: KmGoodsModal,
|
|
16956
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15942
16957
|
OTHER_GOODS: GoodsModal$2
|
|
15943
16958
|
};
|
|
15944
16959
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15972,7 +16987,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15972
16987
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15973
16988
|
}));
|
|
15974
16989
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15975
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
16990
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15976
16991
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15977
16992
|
};
|
|
15978
16993
|
var rowSelection = {
|
|
@@ -16001,6 +17016,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16001
17016
|
};
|
|
16002
17017
|
var getButtonText = function getButtonText() {
|
|
16003
17018
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17019
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17020
|
+
return '选择快麦ERP商品';
|
|
17021
|
+
}
|
|
16004
17022
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16005
17023
|
return '选择百胜ERP商品';
|
|
16006
17024
|
}
|
|
@@ -16144,6 +17162,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16144
17162
|
case 'JST_RETURN_GOODS':
|
|
16145
17163
|
case 'GY_REISSUE_GOODS':
|
|
16146
17164
|
case 'GY_RETURN_GOODS':
|
|
17165
|
+
case 'KM_GOODS':
|
|
17166
|
+
case 'KM_REISSUE_GOODS':
|
|
16147
17167
|
{
|
|
16148
17168
|
columns = getColumnsMap$1({
|
|
16149
17169
|
text: text,
|
|
@@ -16261,120 +17281,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16261
17281
|
}].concat(_toConsumableArray(columns));
|
|
16262
17282
|
}, []);
|
|
16263
17283
|
var onSubmit = function onSubmit(list) {
|
|
16264
|
-
var newList =
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
item.num = 1;
|
|
16270
|
-
item.orderPrice = 0;
|
|
16271
|
-
item.sharePrice = 0;
|
|
16272
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16273
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16274
|
-
item.price = item.retailPrice;
|
|
16275
|
-
item.type = '1';
|
|
16276
|
-
}
|
|
16277
|
-
return item;
|
|
16278
|
-
});
|
|
16279
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16280
|
-
newList = list.map(function (item) {
|
|
16281
|
-
var specNo = item.specNo,
|
|
16282
|
-
specId = item.specId,
|
|
16283
|
-
goodName = item.goodName,
|
|
16284
|
-
goodShortName = item.goodShortName,
|
|
16285
|
-
goodPicUrl = item.goodPicUrl,
|
|
16286
|
-
goodNo = item.goodNo,
|
|
16287
|
-
goodId = item.goodId,
|
|
16288
|
-
retailPrice = item.retailPrice;
|
|
16289
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16290
|
-
sku: specNo,
|
|
16291
|
-
skuId: specId,
|
|
16292
|
-
goodsName: goodName,
|
|
16293
|
-
goodsShortName: goodShortName,
|
|
16294
|
-
picPath: goodPicUrl,
|
|
16295
|
-
goodsSn: goodNo,
|
|
16296
|
-
goodsId: goodId,
|
|
16297
|
-
goodsPrice: retailPrice,
|
|
16298
|
-
shopPrice: retailPrice,
|
|
16299
|
-
sharePayment: '',
|
|
16300
|
-
sharePrice: '',
|
|
16301
|
-
payment: '',
|
|
16302
|
-
tcSku: '',
|
|
16303
|
-
tcGoodsNumber: '',
|
|
16304
|
-
taoCanSingleSl: '',
|
|
16305
|
-
isGift: '',
|
|
16306
|
-
uuid: uuid(),
|
|
16307
|
-
canDelete: true,
|
|
16308
|
-
canEdit: true,
|
|
16309
|
-
goodsNumber: 1,
|
|
16310
|
-
canUpdateNumber: canUpdateNumber
|
|
16311
|
-
});
|
|
16312
|
-
});
|
|
16313
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16314
|
-
newList = list.map(function (item) {
|
|
16315
|
-
var goodName = item.goodName,
|
|
16316
|
-
goodShortName = item.goodShortName,
|
|
16317
|
-
goodNo = item.goodNo,
|
|
16318
|
-
specName = item.specName,
|
|
16319
|
-
specNo = item.specNo,
|
|
16320
|
-
retailPrice = item.retailPrice;
|
|
16321
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16322
|
-
uuid: uuid(),
|
|
16323
|
-
canDelete: true,
|
|
16324
|
-
canEdit: true,
|
|
16325
|
-
qty: 1,
|
|
16326
|
-
goodName: goodName,
|
|
16327
|
-
goodShortName: goodShortName,
|
|
16328
|
-
goodNo: goodNo,
|
|
16329
|
-
specName: specName,
|
|
16330
|
-
specNo: specNo,
|
|
16331
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16332
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16333
|
-
});
|
|
16334
|
-
});
|
|
16335
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16336
|
-
newList = list.map(function (item) {
|
|
16337
|
-
return {
|
|
16338
|
-
name: item.goodName,
|
|
16339
|
-
skuId: item.goodNo,
|
|
16340
|
-
iId: item.styleCode,
|
|
16341
|
-
pic: item.goodPicUrl,
|
|
16342
|
-
propertiesValue: item.propertiesValue,
|
|
16343
|
-
saleBasePrice: item.retailPrice,
|
|
16344
|
-
salePrice: item.retailPrice,
|
|
16345
|
-
remark: '',
|
|
16346
|
-
uuid: uuid(),
|
|
16347
|
-
canDelete: true,
|
|
16348
|
-
canEdit: true,
|
|
16349
|
-
qty: 1
|
|
16350
|
-
};
|
|
16351
|
-
});
|
|
16352
|
-
} else {
|
|
16353
|
-
newList = list.map(function (item) {
|
|
16354
|
-
var goodsId = item.goodsId,
|
|
16355
|
-
name = item.name,
|
|
16356
|
-
code = item.code,
|
|
16357
|
-
skuCode = item.skuCode,
|
|
16358
|
-
marketPrice = item.marketPrice,
|
|
16359
|
-
skuName = item.skuName;
|
|
16360
|
-
return {
|
|
16361
|
-
id: goodsId,
|
|
16362
|
-
mark: '是',
|
|
16363
|
-
pic: '',
|
|
16364
|
-
skuName: skuName,
|
|
16365
|
-
name: name,
|
|
16366
|
-
code: code,
|
|
16367
|
-
sku: skuCode,
|
|
16368
|
-
money: marketPrice || 0,
|
|
16369
|
-
share: marketPrice || 0,
|
|
16370
|
-
number: 1,
|
|
16371
|
-
type: '',
|
|
16372
|
-
uuid: uuid(),
|
|
16373
|
-
canDelete: true,
|
|
16374
|
-
canUpdateNumber: canUpdateNumber
|
|
16375
|
-
};
|
|
16376
|
-
});
|
|
16377
|
-
}
|
|
17284
|
+
var newList = processGoods({
|
|
17285
|
+
list: list,
|
|
17286
|
+
canUpdateNumber: canUpdateNumber,
|
|
17287
|
+
type: type
|
|
17288
|
+
});
|
|
16378
17289
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16379
17290
|
};
|
|
16380
17291
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17088,10 +17999,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17088
17999
|
var _data$data, _data$data$trades;
|
|
17089
18000
|
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) {
|
|
17090
18001
|
data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18002
|
+
var _tradeStatusMap$data$;
|
|
17091
18003
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17092
18004
|
billNo: item.tradeNo,
|
|
17093
18005
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17094
|
-
billTag: item.tagName
|
|
18006
|
+
billTag: item.tagName,
|
|
18007
|
+
tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17095
18008
|
});
|
|
17096
18009
|
});
|
|
17097
18010
|
}
|
|
@@ -17174,6 +18087,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17174
18087
|
deliveryState: item.deliveryState,
|
|
17175
18088
|
vipCode: item.vipCode,
|
|
17176
18089
|
shopCode: item.shopCode,
|
|
18090
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17177
18091
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17178
18092
|
});
|
|
17179
18093
|
});
|
|
@@ -17292,7 +18206,7 @@ var kmUtils = {
|
|
|
17292
18206
|
getOrderListSingleton: getOrderListSingleton
|
|
17293
18207
|
};
|
|
17294
18208
|
|
|
17295
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18209
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17296
18210
|
var columnsMap = {
|
|
17297
18211
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17298
18212
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17334,7 +18248,6 @@ var index$3 = (function (props) {
|
|
|
17334
18248
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17335
18249
|
getBsE3OrderList(value.orderNo);
|
|
17336
18250
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17337
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17338
18251
|
getGyOrderList(value.orderNo);
|
|
17339
18252
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17340
18253
|
getJstOrderList(value.orderNo);
|
|
@@ -17448,11 +18361,13 @@ var index$3 = (function (props) {
|
|
|
17448
18361
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17449
18362
|
var billNo = _ref4.billNo,
|
|
17450
18363
|
billType = _ref4.billType,
|
|
17451
|
-
billTag = _ref4.billTag
|
|
18364
|
+
billTag = _ref4.billTag,
|
|
18365
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17452
18366
|
return {
|
|
17453
18367
|
billNo: billNo,
|
|
17454
18368
|
billType: billType,
|
|
17455
|
-
billTag: billTag
|
|
18369
|
+
billTag: billTag,
|
|
18370
|
+
tradeStatusValue: tradeStatusValue
|
|
17456
18371
|
};
|
|
17457
18372
|
})
|
|
17458
18373
|
}));
|
|
@@ -17566,6 +18481,7 @@ var index$3 = (function (props) {
|
|
|
17566
18481
|
deliveryState = _ref10.deliveryState,
|
|
17567
18482
|
vipCode = _ref10.vipCode,
|
|
17568
18483
|
shopCode = _ref10.shopCode,
|
|
18484
|
+
cancel = _ref10.cancel,
|
|
17569
18485
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17570
18486
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17571
18487
|
billNo: billNo,
|
|
@@ -17573,6 +18489,7 @@ var index$3 = (function (props) {
|
|
|
17573
18489
|
billTag: billTag,
|
|
17574
18490
|
tradeTagName: tradeTagName,
|
|
17575
18491
|
deliveryState: deliveryState,
|
|
18492
|
+
cancelName: cancel ? '是' : '否',
|
|
17576
18493
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17577
18494
|
vipCode: vipCode,
|
|
17578
18495
|
shopCode: shopCode
|
|
@@ -17762,6 +18679,31 @@ var componentMap$1 = {
|
|
|
17762
18679
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17763
18680
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17764
18681
|
}
|
|
18682
|
+
},
|
|
18683
|
+
KM_GOODS: {
|
|
18684
|
+
type: 'km',
|
|
18685
|
+
key: 'kmGoods',
|
|
18686
|
+
name: '快麦',
|
|
18687
|
+
orderNo: 'tid',
|
|
18688
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18689
|
+
eventNameMap: {
|
|
18690
|
+
// pubsub 事件
|
|
18691
|
+
type: 'kmType',
|
|
18692
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
18693
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18694
|
+
selectList: 'kmSelectList',
|
|
18695
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18696
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18697
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18698
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18699
|
+
reissueType: 'kmReissueType',
|
|
18700
|
+
returnType: 'kmReturnType',
|
|
18701
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18702
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18703
|
+
deleteGood: 'kmDeleteGood',
|
|
18704
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18705
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18706
|
+
}
|
|
17765
18707
|
}
|
|
17766
18708
|
};
|
|
17767
18709
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17770,7 +18712,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17770
18712
|
disabled = props.disabled,
|
|
17771
18713
|
onChange = props.onChange,
|
|
17772
18714
|
compType = props.type;
|
|
17773
|
-
console.log('value?.orders', value
|
|
18715
|
+
// console.log('value?.orders', value?.orders);
|
|
17774
18716
|
// 合并单订单会包含","
|
|
17775
18717
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17776
18718
|
var _order$componentMap$c;
|
|
@@ -17923,7 +18865,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17923
18865
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17924
18866
|
var mode = _ref2.mode;
|
|
17925
18867
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17926
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18868
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18869
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18870
|
+
});
|
|
17927
18871
|
var orderNo = value.orderNo;
|
|
17928
18872
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17929
18873
|
var _componentMap$compTyp;
|
|
@@ -17977,7 +18921,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17977
18921
|
_props$reasonList = props.reasonList,
|
|
17978
18922
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17979
18923
|
disabled = props.disabled,
|
|
17980
|
-
compType = props.type
|
|
18924
|
+
compType = props.type,
|
|
18925
|
+
isSettingConfig = props.isSettingConfig;
|
|
17981
18926
|
var valueRef = useRef({});
|
|
17982
18927
|
useEffect(function () {
|
|
17983
18928
|
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18069,7 +19014,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18069
19014
|
var newValue = _objectSpread2({}, value);
|
|
18070
19015
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18071
19016
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18072
|
-
if (['2'].includes(val[0])) {
|
|
19017
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18073
19018
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18074
19019
|
valueRef.current = newValue;
|
|
18075
19020
|
}
|
|
@@ -18091,7 +19036,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18091
19036
|
style: {
|
|
18092
19037
|
marginBottom: '8px'
|
|
18093
19038
|
},
|
|
18094
|
-
disabled: disabled,
|
|
19039
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18095
19040
|
allowClear: false,
|
|
18096
19041
|
options: reasonList,
|
|
18097
19042
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18273,7 +19218,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18273
19218
|
})));
|
|
18274
19219
|
};
|
|
18275
19220
|
|
|
18276
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19221
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18277
19222
|
var typeMap$1 = {
|
|
18278
19223
|
WDT_REISSUE_GOODS: {
|
|
18279
19224
|
key: 'wdtReissueGoods',
|
|
@@ -18294,13 +19239,14 @@ var typeMap$1 = {
|
|
|
18294
19239
|
}
|
|
18295
19240
|
};
|
|
18296
19241
|
var wdtReissue = function wdtReissue(props) {
|
|
18297
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19242
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18298
19243
|
var value = props.value,
|
|
18299
19244
|
onChange = props.onChange,
|
|
18300
19245
|
_props$reasonList = props.reasonList,
|
|
18301
19246
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18302
19247
|
disabled = props.disabled,
|
|
18303
19248
|
type = props.type,
|
|
19249
|
+
isSettingConfig = props.isSettingConfig,
|
|
18304
19250
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18305
19251
|
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) {
|
|
18306
19252
|
var _order$srcTid;
|
|
@@ -18364,11 +19310,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18364
19310
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18365
19311
|
var billNo = _ref2.billNo,
|
|
18366
19312
|
billType = _ref2.billType,
|
|
18367
|
-
billTag = _ref2.billTag
|
|
19313
|
+
billTag = _ref2.billTag,
|
|
19314
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18368
19315
|
return {
|
|
18369
19316
|
billNo: billNo,
|
|
18370
19317
|
billType: billType,
|
|
18371
|
-
billTag: billTag
|
|
19318
|
+
billTag: billTag,
|
|
19319
|
+
tradeStatusValue: tradeStatusValue
|
|
18372
19320
|
};
|
|
18373
19321
|
});
|
|
18374
19322
|
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]) || {}), {}, {
|
|
@@ -18451,7 +19399,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18451
19399
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18452
19400
|
};
|
|
18453
19401
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18454
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19402
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18455
19403
|
var newValue = _objectSpread2({}, value);
|
|
18456
19404
|
// 原订单商品
|
|
18457
19405
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18462,14 +19410,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18462
19410
|
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18463
19411
|
return skuList.includes(item.uuid);
|
|
18464
19412
|
});
|
|
18465
|
-
console.log('商品发生变化', newValue[
|
|
19413
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18466
19414
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18467
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19415
|
+
}, [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]);
|
|
18468
19416
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18469
19417
|
var showChangeBtn = useMemo(function () {
|
|
18470
|
-
var _typeMap$
|
|
18471
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18472
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19418
|
+
var _typeMap$type24;
|
|
19419
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19420
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18473
19421
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18474
19422
|
gutter: 8,
|
|
18475
19423
|
wrap: true
|
|
@@ -18483,16 +19431,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18483
19431
|
}
|
|
18484
19432
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18485
19433
|
style: {
|
|
18486
|
-
marginBottom: '8px'
|
|
19434
|
+
marginBottom: '8px',
|
|
19435
|
+
width: '100%'
|
|
18487
19436
|
},
|
|
18488
19437
|
disabled: disabled,
|
|
18489
19438
|
allowClear: false,
|
|
18490
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19439
|
+
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)],
|
|
18491
19440
|
onChange: function onChange(val) {
|
|
18492
19441
|
return changeSystemOrderHandle(val);
|
|
18493
19442
|
},
|
|
18494
19443
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18495
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19444
|
+
}, ((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) {
|
|
18496
19445
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18497
19446
|
key: item.billNo,
|
|
18498
19447
|
value: item.billNo,
|
|
@@ -18508,12 +19457,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18508
19457
|
}
|
|
18509
19458
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18510
19459
|
style: {
|
|
18511
|
-
marginBottom: '8px'
|
|
19460
|
+
marginBottom: '8px',
|
|
19461
|
+
width: '100%'
|
|
18512
19462
|
},
|
|
18513
|
-
disabled: disabled,
|
|
19463
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18514
19464
|
allowClear: false,
|
|
18515
19465
|
options: reasonList,
|
|
18516
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19466
|
+
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)],
|
|
18517
19467
|
onChange: function onChange(val) {
|
|
18518
19468
|
return changeTypeHandle(val);
|
|
18519
19469
|
}
|
|
@@ -18525,7 +19475,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18525
19475
|
canUpdateNumber: showChangeBtn,
|
|
18526
19476
|
showChangeBtn: showChangeBtn,
|
|
18527
19477
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
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$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
18529
19479
|
onChange: function onChange(val) {
|
|
18530
19480
|
return changeGoodHandle(val);
|
|
18531
19481
|
},
|
|
@@ -18541,7 +19491,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18541
19491
|
})));
|
|
18542
19492
|
};
|
|
18543
19493
|
|
|
18544
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19494
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18545
19495
|
var typeMap$2 = {
|
|
18546
19496
|
JST_REISSUE_GOODS: {
|
|
18547
19497
|
compType: '补发',
|
|
@@ -18556,7 +19506,9 @@ var typeMap$2 = {
|
|
|
18556
19506
|
orderTypeKey: 'orderType',
|
|
18557
19507
|
oIdKey: 'oId',
|
|
18558
19508
|
outerOiIdKey: '',
|
|
18559
|
-
goodDetailsKey: 'items'
|
|
19509
|
+
goodDetailsKey: 'items',
|
|
19510
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19511
|
+
uniqueKey: 'uuid'
|
|
18560
19512
|
},
|
|
18561
19513
|
JST_RETURN_GOODS: {
|
|
18562
19514
|
compType: '退货',
|
|
@@ -18572,6 +19524,8 @@ var typeMap$2 = {
|
|
|
18572
19524
|
oIdKey: 'oId',
|
|
18573
19525
|
outerOiIdKey: '',
|
|
18574
19526
|
goodDetailsKey: 'items',
|
|
19527
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19528
|
+
uniqueKey: 'uuid',
|
|
18575
19529
|
eventNameMap: {
|
|
18576
19530
|
// pubsub 事件
|
|
18577
19531
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18579,16 +19533,32 @@ var typeMap$2 = {
|
|
|
18579
19533
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18580
19534
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18581
19535
|
}
|
|
19536
|
+
},
|
|
19537
|
+
KM_REISSUE_GOODS: {
|
|
19538
|
+
compType: '补发',
|
|
19539
|
+
key: 'kmReissueGoods',
|
|
19540
|
+
typeName: 'kmReissueType',
|
|
19541
|
+
systemOrder: 'kmSystemOrder',
|
|
19542
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19543
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19544
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
19545
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19546
|
+
orderTypeKey: 'orderType',
|
|
19547
|
+
oIdKey: 'billNo',
|
|
19548
|
+
outerOiIdKey: '',
|
|
19549
|
+
goodDetailsKey: 'subOrders',
|
|
19550
|
+
uniqueKey: 'id'
|
|
18582
19551
|
}
|
|
18583
19552
|
};
|
|
18584
19553
|
var PublicReissue = function PublicReissue(props) {
|
|
18585
|
-
var _typeMap$
|
|
19554
|
+
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;
|
|
18586
19555
|
var value = props.value,
|
|
18587
19556
|
onChange = props.onChange,
|
|
18588
19557
|
_props$reasonList = props.reasonList,
|
|
18589
19558
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18590
19559
|
disabled = props.disabled,
|
|
18591
19560
|
type = props.type,
|
|
19561
|
+
isSettingConfig = props.isSettingConfig,
|
|
18592
19562
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18593
19563
|
var getOrderFlag = useRef(false);
|
|
18594
19564
|
var _useState = useState(false),
|
|
@@ -18695,7 +19665,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18695
19665
|
}))));
|
|
18696
19666
|
};
|
|
18697
19667
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18698
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19668
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18699
19669
|
var mode = _ref4.mode,
|
|
18700
19670
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18701
19671
|
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];
|
|
@@ -18703,63 +19673,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18703
19673
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18704
19674
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18705
19675
|
});
|
|
18706
|
-
var
|
|
19676
|
+
var orderRest = undefined;
|
|
19677
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19678
|
+
orderRest = true;
|
|
19679
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19680
|
+
orderRest = {
|
|
19681
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19682
|
+
canEdit: true
|
|
19683
|
+
};
|
|
19684
|
+
}
|
|
19685
|
+
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) : [];
|
|
18707
19686
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18708
|
-
|
|
19687
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18709
19688
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18710
19689
|
}) : goodDetails;
|
|
19690
|
+
return list;
|
|
18711
19691
|
};
|
|
18712
19692
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18713
|
-
var _typeMap$
|
|
19693
|
+
var _typeMap$type21;
|
|
18714
19694
|
var newValue = _objectSpread2({}, value);
|
|
18715
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19695
|
+
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 || [];
|
|
18716
19696
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18717
19697
|
};
|
|
18718
19698
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18719
|
-
var _typeMap$
|
|
19699
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18720
19700
|
var newValue = _objectSpread2({}, value);
|
|
18721
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18722
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18723
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18724
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19701
|
+
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;
|
|
19702
|
+
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) {
|
|
19703
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19704
|
+
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) || [];
|
|
18725
19705
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18726
|
-
var _typeMap$
|
|
18727
|
-
return oItem[(_typeMap$
|
|
19706
|
+
var _typeMap$type25;
|
|
19707
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18728
19708
|
});
|
|
18729
|
-
newValue[(_typeMap$
|
|
18730
|
-
}
|
|
18731
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18732
|
-
var _typeMap$
|
|
18733
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18734
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18735
|
-
var _typeMap$
|
|
18736
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19709
|
+
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];
|
|
19710
|
+
}
|
|
19711
|
+
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])) {
|
|
19712
|
+
var _typeMap$type29;
|
|
19713
|
+
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)] = [];
|
|
19714
|
+
} 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])) {
|
|
19715
|
+
var _typeMap$type31;
|
|
19716
|
+
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({
|
|
18737
19717
|
mode: isStrict,
|
|
18738
19718
|
sysOrderNo: val
|
|
18739
19719
|
});
|
|
18740
19720
|
}
|
|
18741
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19721
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18742
19722
|
};
|
|
18743
19723
|
//显示选择商品按钮
|
|
18744
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19724
|
+
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]);
|
|
18745
19725
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18746
|
-
var _typeMap$
|
|
19726
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18747
19727
|
var newValue = _objectSpread2({}, value);
|
|
18748
19728
|
// 原订单商品
|
|
18749
19729
|
var originTradeGoodList = getGoodDetails({
|
|
18750
19730
|
mode: isStrict
|
|
18751
19731
|
}) || [];
|
|
18752
19732
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18753
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18754
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18755
|
-
|
|
19733
|
+
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)]) || [];
|
|
19734
|
+
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 = 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) {
|
|
19735
|
+
var _typeMap$type36;
|
|
19736
|
+
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]);
|
|
18756
19737
|
});
|
|
18757
19738
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18758
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19739
|
+
}, [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]);
|
|
18759
19740
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18760
19741
|
gutter: 8,
|
|
18761
19742
|
wrap: true,
|
|
18762
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19743
|
+
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())
|
|
18763
19744
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
18764
19745
|
className: "gutter-row",
|
|
18765
19746
|
xs: {
|
|
@@ -18770,16 +19751,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18770
19751
|
}
|
|
18771
19752
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18772
19753
|
style: {
|
|
18773
|
-
marginBottom: '8px'
|
|
19754
|
+
marginBottom: '8px',
|
|
19755
|
+
width: '100%'
|
|
18774
19756
|
},
|
|
18775
19757
|
disabled: disabled,
|
|
18776
19758
|
allowClear: false,
|
|
18777
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19759
|
+
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)],
|
|
18778
19760
|
onChange: function onChange(val) {
|
|
18779
19761
|
return changeSystemOrderHandle(val);
|
|
18780
19762
|
},
|
|
18781
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18782
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19763
|
+
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")
|
|
19764
|
+
}, ((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) {
|
|
18783
19765
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18784
19766
|
key: item[typeMap$2[type].oIdKey],
|
|
18785
19767
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18795,16 +19777,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18795
19777
|
}
|
|
18796
19778
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18797
19779
|
style: {
|
|
18798
|
-
marginBottom: '8px'
|
|
19780
|
+
marginBottom: '8px',
|
|
19781
|
+
width: '100%'
|
|
18799
19782
|
},
|
|
18800
|
-
disabled: disabled,
|
|
19783
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18801
19784
|
allowClear: false,
|
|
18802
19785
|
options: reasonList,
|
|
18803
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19786
|
+
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)],
|
|
18804
19787
|
onChange: function onChange(val) {
|
|
18805
19788
|
return changeTypeHandle(val);
|
|
18806
19789
|
}
|
|
18807
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19790
|
+
})), (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.createElement(Col, {
|
|
18808
19791
|
className: "gutter-row",
|
|
18809
19792
|
xs: {
|
|
18810
19793
|
span: 11
|
|
@@ -18813,7 +19796,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18813
19796
|
span: 6
|
|
18814
19797
|
}
|
|
18815
19798
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
18816
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19799
|
+
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)],
|
|
18817
19800
|
disabled: disabled,
|
|
18818
19801
|
readOnly: true
|
|
18819
19802
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18823,10 +19806,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18823
19806
|
disabled: disabled,
|
|
18824
19807
|
canUpdateNumber: showChangeBtn,
|
|
18825
19808
|
showChangeBtn: showChangeBtn,
|
|
18826
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18827
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19809
|
+
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,
|
|
19810
|
+
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,
|
|
18828
19811
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18829
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19812
|
+
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)],
|
|
18830
19813
|
onChange: function onChange(val) {
|
|
18831
19814
|
return changeGoodHandle(val);
|
|
18832
19815
|
},
|
|
@@ -18837,6 +19820,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18837
19820
|
originDataSource: getGoodDetails({
|
|
18838
19821
|
mode: isStrict
|
|
18839
19822
|
}),
|
|
19823
|
+
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',
|
|
18840
19824
|
selectedGoodsChange: selectedGoodsChange
|
|
18841
19825
|
}
|
|
18842
19826
|
})));
|
|
@@ -19375,6 +20359,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19375
20359
|
var _props$value = props.value,
|
|
19376
20360
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19377
20361
|
onChange = props.onChange,
|
|
20362
|
+
onBlur = props.onBlur,
|
|
19378
20363
|
disabled = props.disabled,
|
|
19379
20364
|
_props$type = props.type,
|
|
19380
20365
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19456,6 +20441,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19456
20441
|
onChange: function onChange(e) {
|
|
19457
20442
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19458
20443
|
},
|
|
20444
|
+
onBlur: onBlur,
|
|
19459
20445
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19460
20446
|
})) : null) : null);
|
|
19461
20447
|
};
|
|
@@ -19597,6 +20583,54 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19597
20583
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19598
20584
|
};
|
|
19599
20585
|
|
|
20586
|
+
var _excluded$n = ["mode", "showOnly", "getOptionsAsync"];
|
|
20587
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20588
|
+
var mode = props.mode,
|
|
20589
|
+
_props$showOnly = props.showOnly,
|
|
20590
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20591
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20592
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20593
|
+
var _React$useState = React.useState([]),
|
|
20594
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20595
|
+
data = _React$useState2[0],
|
|
20596
|
+
setData = _React$useState2[1];
|
|
20597
|
+
React.useEffect(function () {
|
|
20598
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20599
|
+
setData(list);
|
|
20600
|
+
});
|
|
20601
|
+
}, []);
|
|
20602
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20603
|
+
var getValueString = function getValueString(value) {
|
|
20604
|
+
var list = options;
|
|
20605
|
+
if (!mode) {
|
|
20606
|
+
var selectedItem = list.find(function (item) {
|
|
20607
|
+
return item.value === value;
|
|
20608
|
+
});
|
|
20609
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20610
|
+
} else if (mode === 'multiple' && Array.isArray(value)) {
|
|
20611
|
+
var _list$filter$map$join;
|
|
20612
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20613
|
+
return value.includes(item.value);
|
|
20614
|
+
}).map(function (item) {
|
|
20615
|
+
return item.label;
|
|
20616
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20617
|
+
}
|
|
20618
|
+
};
|
|
20619
|
+
if (showOnly) {
|
|
20620
|
+
return getValueString(props.value);
|
|
20621
|
+
}
|
|
20622
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
20623
|
+
showSearch: true,
|
|
20624
|
+
filterOption: function filterOption(input, option) {
|
|
20625
|
+
return option.label.includes(input);
|
|
20626
|
+
},
|
|
20627
|
+
notFoundContent: null
|
|
20628
|
+
}, otherProps), {}, {
|
|
20629
|
+
options: options,
|
|
20630
|
+
mode: mode
|
|
20631
|
+
}));
|
|
20632
|
+
};
|
|
20633
|
+
|
|
19600
20634
|
var CalculationInput = function CalculationInput(props) {
|
|
19601
20635
|
var _props$config = props.config,
|
|
19602
20636
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19615,7 +20649,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19615
20649
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19616
20650
|
};
|
|
19617
20651
|
|
|
19618
|
-
var _excluded$
|
|
20652
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19619
20653
|
var typeMap$3 = {
|
|
19620
20654
|
BS_E3_REISSUE_GOODS: {
|
|
19621
20655
|
key: 'bsE3ReissueGoods',
|
|
@@ -19633,7 +20667,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19633
20667
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19634
20668
|
disabled = props.disabled,
|
|
19635
20669
|
type = props.type,
|
|
19636
|
-
|
|
20670
|
+
isSettingConfig = props.isSettingConfig,
|
|
20671
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19637
20672
|
var getOrderFlag = useRef(false);
|
|
19638
20673
|
var valueRef = useRef(null);
|
|
19639
20674
|
var _useState = useState(false),
|
|
@@ -19793,7 +20828,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19793
20828
|
}
|
|
19794
20829
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
19795
20830
|
style: {
|
|
19796
|
-
marginBottom: '8px'
|
|
20831
|
+
marginBottom: '8px',
|
|
20832
|
+
width: '100%'
|
|
19797
20833
|
},
|
|
19798
20834
|
disabled: disabled,
|
|
19799
20835
|
allowClear: false,
|
|
@@ -19818,9 +20854,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19818
20854
|
}
|
|
19819
20855
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
19820
20856
|
style: {
|
|
19821
|
-
marginBottom: '8px'
|
|
20857
|
+
marginBottom: '8px',
|
|
20858
|
+
width: '100%'
|
|
19822
20859
|
},
|
|
19823
|
-
disabled: disabled,
|
|
20860
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19824
20861
|
allowClear: false,
|
|
19825
20862
|
options: reasonList,
|
|
19826
20863
|
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)],
|
|
@@ -19851,7 +20888,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19851
20888
|
})));
|
|
19852
20889
|
};
|
|
19853
20890
|
|
|
19854
|
-
var
|
|
20891
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
20892
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
20893
|
+
styleInject(css_248z$c);
|
|
20894
|
+
|
|
20895
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19855
20896
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19856
20897
|
var typeMap$4 = {
|
|
19857
20898
|
GY_REISSUE_GOODS: {
|
|
@@ -19873,17 +20914,19 @@ var typeMap$4 = {
|
|
|
19873
20914
|
}
|
|
19874
20915
|
};
|
|
19875
20916
|
var GyReissue = function GyReissue(props) {
|
|
19876
|
-
var _typeMap$
|
|
20917
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19877
20918
|
var value = props.value,
|
|
19878
20919
|
onChange = props.onChange,
|
|
19879
20920
|
_props$reasonList = props.reasonList,
|
|
19880
20921
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19881
20922
|
disabled = props.disabled,
|
|
19882
20923
|
type = props.type,
|
|
19883
|
-
|
|
20924
|
+
isSettingConfig = props.isSettingConfig,
|
|
20925
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19884
20926
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19885
20927
|
// order?.platformCode?.includes(';'),
|
|
19886
20928
|
// );
|
|
20929
|
+
var getVipCodeFlag = useRef(false);
|
|
19887
20930
|
var getOrderFlag = useRef(false);
|
|
19888
20931
|
var valueRef = useRef(null);
|
|
19889
20932
|
var _useState = useState(false),
|
|
@@ -19891,23 +20934,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19891
20934
|
isStrict = _useState2[0],
|
|
19892
20935
|
setIsStrict = _useState2[1];
|
|
19893
20936
|
useEffect(function () {
|
|
19894
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20937
|
+
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;
|
|
19895
20938
|
valueRef.current = value;
|
|
19896
20939
|
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)) {
|
|
19897
20940
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19898
20941
|
getOrderFlag.current = true;
|
|
19899
20942
|
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);
|
|
20943
|
+
} 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)) {
|
|
20944
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20945
|
+
getVipCodeFlag.current = true;
|
|
20946
|
+
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);
|
|
19900
20947
|
}
|
|
19901
20948
|
return;
|
|
19902
20949
|
}, [value]);
|
|
19903
20950
|
var getOrderList = /*#__PURE__*/function () {
|
|
19904
20951
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19905
|
-
var _typeMap$
|
|
20952
|
+
var _typeMap$type7;
|
|
19906
20953
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19907
20954
|
while (1) switch (_context.prev = _context.next) {
|
|
19908
20955
|
case 0:
|
|
19909
|
-
(_typeMap$
|
|
19910
|
-
var _typeMap$
|
|
20956
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20957
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19911
20958
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19912
20959
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19913
20960
|
var billNo = _ref2.billNo,
|
|
@@ -19929,17 +20976,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19929
20976
|
shopCode: shopCode
|
|
19930
20977
|
});
|
|
19931
20978
|
});
|
|
20979
|
+
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]) || {}), {}, {
|
|
20980
|
+
showOrderInfo: showOrderInfo,
|
|
20981
|
+
orders: orders
|
|
20982
|
+
})), _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));
|
|
19932
20983
|
pushGyLog('getOrderList', {
|
|
19933
20984
|
before: valueRef.current,
|
|
19934
|
-
after:
|
|
19935
|
-
showOrderInfo: showOrderInfo,
|
|
19936
|
-
orders: orders
|
|
19937
|
-
})))
|
|
20985
|
+
after: newValue
|
|
19938
20986
|
});
|
|
19939
|
-
onChange(
|
|
19940
|
-
showOrderInfo: showOrderInfo,
|
|
19941
|
-
orders: orders
|
|
19942
|
-
}))));
|
|
20987
|
+
onChange(newValue);
|
|
19943
20988
|
});
|
|
19944
20989
|
case 1:
|
|
19945
20990
|
case "end":
|
|
@@ -19951,42 +20996,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19951
20996
|
return _ref.apply(this, arguments);
|
|
19952
20997
|
};
|
|
19953
20998
|
}();
|
|
20999
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21000
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21001
|
+
var _typeMap$type10;
|
|
21002
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21003
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21004
|
+
case 0:
|
|
21005
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21006
|
+
var _orders$3, _orders$4;
|
|
21007
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21008
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21009
|
+
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),
|
|
21010
|
+
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)
|
|
21011
|
+
});
|
|
21012
|
+
pushGyLog('getVipCode', {
|
|
21013
|
+
before: valueRef.current,
|
|
21014
|
+
after: newValue
|
|
21015
|
+
});
|
|
21016
|
+
onChange(newValue);
|
|
21017
|
+
}));
|
|
21018
|
+
case 1:
|
|
21019
|
+
case "end":
|
|
21020
|
+
return _context2.stop();
|
|
21021
|
+
}
|
|
21022
|
+
}, _callee2);
|
|
21023
|
+
}));
|
|
21024
|
+
return function getVipCode(_x2) {
|
|
21025
|
+
return _ref4.apply(this, arguments);
|
|
21026
|
+
};
|
|
21027
|
+
}();
|
|
19954
21028
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19955
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21029
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19956
21030
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19957
21031
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19958
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21032
|
+
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;
|
|
19959
21033
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19960
21034
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19961
|
-
newValue[(_typeMap$
|
|
21035
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19962
21036
|
if (typeName === '1') {
|
|
19963
|
-
var _typeMap$
|
|
19964
|
-
newValue[(_typeMap$
|
|
21037
|
+
var _typeMap$type13;
|
|
21038
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19965
21039
|
mode: isStrict
|
|
19966
21040
|
});
|
|
19967
21041
|
} else if (typeName === '2') {
|
|
19968
|
-
var _typeMap$
|
|
21042
|
+
var _typeMap$type14;
|
|
19969
21043
|
// 切换到非原单,清空列表
|
|
19970
|
-
newValue[(_typeMap$
|
|
21044
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19971
21045
|
}
|
|
19972
21046
|
pushGyLog('afterChangeType', newValue);
|
|
19973
21047
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19974
21048
|
};
|
|
19975
21049
|
var handleModeChange = function handleModeChange(mode) {
|
|
19976
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19977
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21050
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21051
|
+
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';
|
|
19978
21052
|
setIsStrict(mode);
|
|
19979
21053
|
if (!isOriginalOrder) return;
|
|
19980
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21054
|
+
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({
|
|
19981
21055
|
mode: mode
|
|
19982
21056
|
}))));
|
|
19983
21057
|
};
|
|
19984
21058
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19985
|
-
var _ref8, _typeMap$
|
|
21059
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19986
21060
|
var mode = _ref7.mode,
|
|
19987
21061
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19988
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19989
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21062
|
+
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];
|
|
21063
|
+
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];
|
|
19990
21064
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19991
21065
|
return order.code === systemOrderNo;
|
|
19992
21066
|
});
|
|
@@ -19997,29 +21071,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
19997
21071
|
}) : goodDetails;
|
|
19998
21072
|
};
|
|
19999
21073
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20000
|
-
var _typeMap$
|
|
21074
|
+
var _typeMap$type19;
|
|
20001
21075
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20002
21076
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20003
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20004
|
-
var _typeMap$
|
|
20005
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20006
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21077
|
+
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) {
|
|
21078
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21079
|
+
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;
|
|
21080
|
+
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;
|
|
20007
21081
|
return item;
|
|
20008
21082
|
});
|
|
20009
21083
|
pushGyLog('afterChangeGood', newValue);
|
|
20010
21084
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20011
21085
|
};
|
|
20012
21086
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20013
|
-
var _typeMap$
|
|
21087
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20014
21088
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20015
21089
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20016
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20017
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20018
|
-
var _typeMap$type22;
|
|
20019
|
-
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)] = [];
|
|
20020
|
-
} 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])) {
|
|
21090
|
+
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;
|
|
21091
|
+
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])) {
|
|
20021
21092
|
var _typeMap$type24;
|
|
20022
|
-
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)] =
|
|
21093
|
+
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)] = [];
|
|
21094
|
+
} 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])) {
|
|
21095
|
+
var _typeMap$type26;
|
|
21096
|
+
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({
|
|
20023
21097
|
mode: isStrict,
|
|
20024
21098
|
sysOrderNo: val
|
|
20025
21099
|
});
|
|
@@ -20028,7 +21102,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20028
21102
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20029
21103
|
};
|
|
20030
21104
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20031
|
-
var _ref12, _typeMap$
|
|
21105
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20032
21106
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20033
21107
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20034
21108
|
// 原订单商品
|
|
@@ -20036,67 +21110,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
20036
21110
|
mode: isStrict
|
|
20037
21111
|
}) || [];
|
|
20038
21112
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20039
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20040
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21113
|
+
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)]) || [];
|
|
21114
|
+
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20041
21115
|
return skuList.includes(item.uuid);
|
|
20042
21116
|
});
|
|
20043
|
-
console.log('商品发生变化', newValue[
|
|
21117
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20044
21118
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20045
21119
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20046
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21120
|
+
}, [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]);
|
|
20047
21121
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20048
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20049
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21122
|
+
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];
|
|
21123
|
+
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]);
|
|
20050
21124
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20051
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
20052
|
-
id: "TEST_GY",
|
|
20053
|
-
onClick: function onClick() {
|
|
20054
|
-
console.log('TEST_GY', value);
|
|
20055
|
-
}
|
|
20056
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
21125
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20057
21126
|
gutter: 8,
|
|
20058
21127
|
wrap: true
|
|
20059
21128
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20060
21129
|
className: "gutter-row",
|
|
20061
21130
|
xs: {
|
|
20062
|
-
span:
|
|
21131
|
+
span: 12
|
|
20063
21132
|
},
|
|
20064
21133
|
sm: {
|
|
20065
|
-
span:
|
|
21134
|
+
span: 8
|
|
20066
21135
|
}
|
|
20067
21136
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20068
21137
|
style: {
|
|
20069
|
-
marginBottom: '8px'
|
|
21138
|
+
marginBottom: '8px',
|
|
21139
|
+
width: '100%'
|
|
20070
21140
|
},
|
|
20071
21141
|
disabled: disabled,
|
|
20072
21142
|
allowClear: false,
|
|
20073
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21143
|
+
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)],
|
|
20074
21144
|
onChange: function onChange(val) {
|
|
20075
21145
|
return changeSystemOrderHandle(val);
|
|
20076
21146
|
},
|
|
20077
21147
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20078
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21148
|
+
}, ((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) {
|
|
20079
21149
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21150
|
+
className: styles$5.systemNoDisabled,
|
|
20080
21151
|
key: item.billNo,
|
|
20081
21152
|
value: item.billNo,
|
|
20082
|
-
label: item.billNo
|
|
20083
|
-
|
|
21153
|
+
label: item.billNo,
|
|
21154
|
+
disabled: item.cancel
|
|
21155
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20084
21156
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20085
21157
|
className: "gutter-row",
|
|
20086
21158
|
xs: {
|
|
20087
|
-
span:
|
|
21159
|
+
span: 12
|
|
20088
21160
|
},
|
|
20089
21161
|
sm: {
|
|
20090
|
-
span:
|
|
21162
|
+
span: 4
|
|
20091
21163
|
}
|
|
20092
21164
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20093
21165
|
style: {
|
|
20094
|
-
marginBottom: '8px'
|
|
21166
|
+
marginBottom: '8px',
|
|
21167
|
+
width: '100%'
|
|
20095
21168
|
},
|
|
20096
|
-
disabled: disabled,
|
|
21169
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20097
21170
|
allowClear: false,
|
|
20098
21171
|
options: reasonList,
|
|
20099
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21172
|
+
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)],
|
|
20100
21173
|
onChange: function onChange(val) {
|
|
20101
21174
|
return changeTypeHandle(val);
|
|
20102
21175
|
}
|
|
@@ -20110,7 +21183,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20110
21183
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20111
21184
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20112
21185
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20113
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21186
|
+
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)],
|
|
20114
21187
|
onChange: function onChange(val) {
|
|
20115
21188
|
return changeGoodHandle(val);
|
|
20116
21189
|
},
|
|
@@ -20125,7 +21198,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20125
21198
|
})));
|
|
20126
21199
|
};
|
|
20127
21200
|
|
|
20128
|
-
var _excluded$
|
|
21201
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20129
21202
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20130
21203
|
var typeMap$5 = {
|
|
20131
21204
|
GY_RETURN_GOODS: {
|
|
@@ -20147,14 +21220,15 @@ var typeMap$5 = {
|
|
|
20147
21220
|
}
|
|
20148
21221
|
};
|
|
20149
21222
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20150
|
-
var _typeMap$
|
|
21223
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20151
21224
|
var value = props.value,
|
|
20152
21225
|
onChange = props.onChange,
|
|
20153
21226
|
_props$reasonList = props.reasonList,
|
|
20154
21227
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20155
21228
|
disabled = props.disabled,
|
|
20156
21229
|
type = props.type,
|
|
20157
|
-
|
|
21230
|
+
isSettingConfig = props.isSettingConfig,
|
|
21231
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20158
21232
|
var valueRef = useRef({});
|
|
20159
21233
|
var getOrderFlag = useRef(false);
|
|
20160
21234
|
var _useState = useState(false),
|
|
@@ -20217,7 +21291,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20217
21291
|
while (1) switch (_context.prev = _context.next) {
|
|
20218
21292
|
case 0:
|
|
20219
21293
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20220
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21294
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20221
21295
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20222
21296
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20223
21297
|
var billNo = _ref2.billNo,
|
|
@@ -20239,10 +21313,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20239
21313
|
shopCode: shopCode
|
|
20240
21314
|
});
|
|
20241
21315
|
});
|
|
20242
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21316
|
+
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 : {}), {}, {
|
|
20243
21317
|
showOrderInfo: showOrderInfo,
|
|
20244
21318
|
orders: orders
|
|
20245
|
-
}))));
|
|
21319
|
+
})), _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)));
|
|
20246
21320
|
});
|
|
20247
21321
|
case 1:
|
|
20248
21322
|
case "end":
|
|
@@ -20255,7 +21329,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20255
21329
|
};
|
|
20256
21330
|
}();
|
|
20257
21331
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20258
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21332
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20259
21333
|
var newValue = _objectSpread2({}, value);
|
|
20260
21334
|
// 原订单商品
|
|
20261
21335
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20266,49 +21340,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20266
21340
|
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20267
21341
|
return skuList.includes(item.uuid);
|
|
20268
21342
|
});
|
|
20269
|
-
console.log('商品发生变化', newValue[
|
|
21343
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20270
21344
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20271
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21345
|
+
}, [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]);
|
|
20272
21346
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20273
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21347
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20274
21348
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20275
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21349
|
+
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;
|
|
20276
21350
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20277
21351
|
var newValue = _objectSpread2({}, value);
|
|
20278
|
-
newValue[(_typeMap$
|
|
21352
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20279
21353
|
if (typeName === '1') {
|
|
20280
|
-
var _typeMap$
|
|
20281
|
-
newValue[(_typeMap$
|
|
21354
|
+
var _typeMap$type12;
|
|
21355
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20282
21356
|
mode: isStrict
|
|
20283
21357
|
});
|
|
20284
21358
|
} else if (typeName === '2') {
|
|
20285
|
-
var _typeMap$
|
|
21359
|
+
var _typeMap$type13;
|
|
20286
21360
|
// 切换到非原单,清空列表
|
|
20287
|
-
newValue[(_typeMap$
|
|
21361
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20288
21362
|
}
|
|
20289
21363
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20290
21364
|
};
|
|
20291
21365
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20292
|
-
var _typeMap$
|
|
21366
|
+
var _typeMap$type14;
|
|
20293
21367
|
var newValue = _objectSpread2({}, value);
|
|
20294
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20295
|
-
var _typeMap$
|
|
20296
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20297
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21368
|
+
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) {
|
|
21369
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21370
|
+
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;
|
|
21371
|
+
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;
|
|
20298
21372
|
return item;
|
|
20299
21373
|
});
|
|
20300
21374
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20301
21375
|
};
|
|
20302
21376
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20303
|
-
var _typeMap$
|
|
21377
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20304
21378
|
var newValue = _objectSpread2({}, value);
|
|
20305
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20306
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20307
|
-
var _typeMap$
|
|
20308
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20309
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20310
|
-
var _typeMap$
|
|
20311
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21379
|
+
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;
|
|
21380
|
+
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])) {
|
|
21381
|
+
var _typeMap$type19;
|
|
21382
|
+
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)] = [];
|
|
21383
|
+
} 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])) {
|
|
21384
|
+
var _typeMap$type21;
|
|
21385
|
+
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({
|
|
20312
21386
|
mode: isStrict,
|
|
20313
21387
|
sysOrderNo: val
|
|
20314
21388
|
});
|
|
@@ -20316,11 +21390,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20316
21390
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20317
21391
|
};
|
|
20318
21392
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20319
|
-
var _typeMap$
|
|
21393
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20320
21394
|
var mode = _ref4.mode,
|
|
20321
21395
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20322
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20323
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21396
|
+
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];
|
|
21397
|
+
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];
|
|
20324
21398
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20325
21399
|
return order.code === systemOrderNo;
|
|
20326
21400
|
});
|
|
@@ -20331,62 +21405,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20331
21405
|
}) : goodDetails;
|
|
20332
21406
|
};
|
|
20333
21407
|
var handleModeChange = function handleModeChange(mode) {
|
|
20334
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20335
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21408
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21409
|
+
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';
|
|
20336
21410
|
setIsStrict(mode);
|
|
20337
21411
|
if (!isOriginalOrder) return;
|
|
20338
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21412
|
+
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({
|
|
20339
21413
|
mode: mode
|
|
20340
21414
|
}))));
|
|
20341
21415
|
};
|
|
20342
21416
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20343
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21417
|
+
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];
|
|
20344
21418
|
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20345
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21419
|
+
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]);
|
|
20346
21420
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20347
21421
|
gutter: 8,
|
|
20348
21422
|
wrap: true
|
|
20349
21423
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20350
21424
|
className: "gutter-row",
|
|
20351
21425
|
xs: {
|
|
20352
|
-
span:
|
|
21426
|
+
span: 12
|
|
20353
21427
|
},
|
|
20354
21428
|
sm: {
|
|
20355
|
-
span:
|
|
21429
|
+
span: 8
|
|
20356
21430
|
}
|
|
20357
21431
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20358
21432
|
style: {
|
|
20359
|
-
marginBottom: '8px'
|
|
21433
|
+
marginBottom: '8px',
|
|
21434
|
+
width: '100%'
|
|
20360
21435
|
},
|
|
20361
21436
|
disabled: disabled,
|
|
20362
21437
|
allowClear: false,
|
|
20363
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21438
|
+
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)],
|
|
20364
21439
|
onChange: function onChange(val) {
|
|
20365
21440
|
return changeSystemOrderHandle(val);
|
|
20366
21441
|
},
|
|
20367
21442
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20368
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21443
|
+
}, ((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) {
|
|
20369
21444
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21445
|
+
className: styles$5.systemNoDisabled,
|
|
20370
21446
|
key: item.billNo,
|
|
20371
21447
|
value: item.billNo,
|
|
20372
|
-
label: item.billNo
|
|
20373
|
-
|
|
21448
|
+
label: item.billNo,
|
|
21449
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21450
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20374
21451
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20375
21452
|
className: "gutter-row",
|
|
20376
21453
|
xs: {
|
|
20377
|
-
span:
|
|
21454
|
+
span: 12
|
|
20378
21455
|
},
|
|
20379
21456
|
sm: {
|
|
20380
|
-
span:
|
|
21457
|
+
span: 4
|
|
20381
21458
|
}
|
|
20382
21459
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20383
21460
|
style: {
|
|
20384
|
-
marginBottom: '8px'
|
|
21461
|
+
marginBottom: '8px',
|
|
21462
|
+
width: '100%'
|
|
20385
21463
|
},
|
|
20386
|
-
disabled: disabled,
|
|
21464
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20387
21465
|
allowClear: false,
|
|
20388
21466
|
options: reasonList,
|
|
20389
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21467
|
+
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)],
|
|
20390
21468
|
onChange: function onChange(val) {
|
|
20391
21469
|
return changeTypeHandle(val);
|
|
20392
21470
|
}
|
|
@@ -20398,7 +21476,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20398
21476
|
canUpdateNumber: showChangeBtn,
|
|
20399
21477
|
showChangeBtn: showChangeBtn,
|
|
20400
21478
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20401
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21479
|
+
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)],
|
|
20402
21480
|
onChange: function onChange(val) {
|
|
20403
21481
|
return changeGoodHandle(val);
|
|
20404
21482
|
},
|
|
@@ -20415,4 +21493,247 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20415
21493
|
})));
|
|
20416
21494
|
};
|
|
20417
21495
|
|
|
20418
|
-
|
|
21496
|
+
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";
|
|
21497
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21498
|
+
styleInject(css_248z$d);
|
|
21499
|
+
|
|
21500
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21501
|
+
var Dragger$1 = Upload.Dragger;
|
|
21502
|
+
var fn$4 = function fn() {
|
|
21503
|
+
return void 0;
|
|
21504
|
+
};
|
|
21505
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21506
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21507
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21508
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21509
|
+
_ref$maxSize = _ref.maxSize,
|
|
21510
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21511
|
+
_ref$onChange = _ref.onChange,
|
|
21512
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21513
|
+
_ref$value = _ref.value,
|
|
21514
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21515
|
+
_ref$disabled = _ref.disabled,
|
|
21516
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21517
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21518
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21519
|
+
_ref$canDownload = _ref.canDownload,
|
|
21520
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21521
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21522
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21523
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21524
|
+
var _useState = useState(false),
|
|
21525
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21526
|
+
visible = _useState2[0],
|
|
21527
|
+
setVisible = _useState2[1];
|
|
21528
|
+
var _useState3 = useState(''),
|
|
21529
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21530
|
+
fileUrl = _useState4[0],
|
|
21531
|
+
setFileUrl = _useState4[1];
|
|
21532
|
+
var _useState5 = useState(''),
|
|
21533
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21534
|
+
fileType = _useState6[0],
|
|
21535
|
+
setFileType = _useState6[1];
|
|
21536
|
+
var _useState7 = useState(''),
|
|
21537
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21538
|
+
fileName = _useState8[0],
|
|
21539
|
+
setFileName = _useState8[1];
|
|
21540
|
+
var valueRef = useRef(value);
|
|
21541
|
+
var uploadCount = useRef(0);
|
|
21542
|
+
var _useState9 = useState(false),
|
|
21543
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21544
|
+
uploading = _useState10[0],
|
|
21545
|
+
setUploading = _useState10[1];
|
|
21546
|
+
var fileList = useMemo(function () {
|
|
21547
|
+
return value.map(function (t, i) {
|
|
21548
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21549
|
+
percent: 100,
|
|
21550
|
+
uid: i + ''
|
|
21551
|
+
});
|
|
21552
|
+
});
|
|
21553
|
+
}, [value]);
|
|
21554
|
+
useEffect(function () {
|
|
21555
|
+
valueRef.current = value;
|
|
21556
|
+
}, [value]);
|
|
21557
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21558
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21559
|
+
var formData, fileName, _yield$request, success, data;
|
|
21560
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21561
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21562
|
+
case 0:
|
|
21563
|
+
setUploading(true);
|
|
21564
|
+
uploadCount.current++;
|
|
21565
|
+
formData = new FormData();
|
|
21566
|
+
formData.append('file', file);
|
|
21567
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21568
|
+
formData.append('fileName', fileName);
|
|
21569
|
+
_context.prev = 6;
|
|
21570
|
+
_context.next = 9;
|
|
21571
|
+
return request(actionUrl, {
|
|
21572
|
+
method: 'post',
|
|
21573
|
+
body: formData
|
|
21574
|
+
});
|
|
21575
|
+
case 9:
|
|
21576
|
+
_yield$request = _context.sent;
|
|
21577
|
+
success = _yield$request.success;
|
|
21578
|
+
data = _yield$request.data;
|
|
21579
|
+
if (success) {
|
|
21580
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21581
|
+
kmVideoName: file.name,
|
|
21582
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21583
|
+
}]));
|
|
21584
|
+
}
|
|
21585
|
+
_context.next = 18;
|
|
21586
|
+
break;
|
|
21587
|
+
case 15:
|
|
21588
|
+
_context.prev = 15;
|
|
21589
|
+
_context.t0 = _context["catch"](6);
|
|
21590
|
+
message.error('文件上传失败');
|
|
21591
|
+
case 18:
|
|
21592
|
+
_context.prev = 18;
|
|
21593
|
+
uploadCount.current--;
|
|
21594
|
+
if (uploadCount.current < 1) {
|
|
21595
|
+
setUploading(false);
|
|
21596
|
+
}
|
|
21597
|
+
return _context.finish(18);
|
|
21598
|
+
case 22:
|
|
21599
|
+
case "end":
|
|
21600
|
+
return _context.stop();
|
|
21601
|
+
}
|
|
21602
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21603
|
+
}));
|
|
21604
|
+
return function asyncUpload(_x) {
|
|
21605
|
+
return _ref2.apply(this, arguments);
|
|
21606
|
+
};
|
|
21607
|
+
}();
|
|
21608
|
+
var download = function download(url, name) {
|
|
21609
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21610
|
+
window.open(url);
|
|
21611
|
+
return;
|
|
21612
|
+
}
|
|
21613
|
+
fetch(url).then(function (res) {
|
|
21614
|
+
return res.blob();
|
|
21615
|
+
}).then(function (blob) {
|
|
21616
|
+
var a = document.createElement('a');
|
|
21617
|
+
document.body.appendChild(a);
|
|
21618
|
+
a.style.display = 'none';
|
|
21619
|
+
var url = window.URL.createObjectURL(blob);
|
|
21620
|
+
a.href = url;
|
|
21621
|
+
a.download = name;
|
|
21622
|
+
a.click();
|
|
21623
|
+
document.body.removeChild(a);
|
|
21624
|
+
window.URL.revokeObjectURL(url);
|
|
21625
|
+
});
|
|
21626
|
+
};
|
|
21627
|
+
var handleChange = function handleChange(list) {
|
|
21628
|
+
valueRef.current = list;
|
|
21629
|
+
onChange(list);
|
|
21630
|
+
};
|
|
21631
|
+
// 手动上传模式, 一直返回false
|
|
21632
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21633
|
+
// console.log('beforeUpload', file);
|
|
21634
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21635
|
+
// TODO: 批量提交的时候
|
|
21636
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21637
|
+
message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21638
|
+
return Upload.LIST_IGNORE;
|
|
21639
|
+
}
|
|
21640
|
+
if (!size) {
|
|
21641
|
+
message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21642
|
+
return Upload.LIST_IGNORE;
|
|
21643
|
+
}
|
|
21644
|
+
asyncUpload(file);
|
|
21645
|
+
return Upload.LIST_IGNORE;
|
|
21646
|
+
};
|
|
21647
|
+
var onRemove = function onRemove(file) {
|
|
21648
|
+
var newValue = value.filter(function (item) {
|
|
21649
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21650
|
+
});
|
|
21651
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21652
|
+
};
|
|
21653
|
+
var onPreview = function onPreview(file) {
|
|
21654
|
+
var _file$url;
|
|
21655
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21656
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21657
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21658
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21659
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21660
|
+
setFileType('video');
|
|
21661
|
+
setVisible(true);
|
|
21662
|
+
} else {
|
|
21663
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21664
|
+
}
|
|
21665
|
+
};
|
|
21666
|
+
var handleCancel = function handleCancel() {
|
|
21667
|
+
setFileUrl('');
|
|
21668
|
+
setFileName('');
|
|
21669
|
+
setVisible(false);
|
|
21670
|
+
};
|
|
21671
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
21672
|
+
spinning: uploading
|
|
21673
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
21674
|
+
className: styles$6.tips
|
|
21675
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
|
|
21676
|
+
className: styles$6.imageBox
|
|
21677
|
+
}, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
|
|
21678
|
+
disabled: disabled,
|
|
21679
|
+
multiple: true,
|
|
21680
|
+
name: "file",
|
|
21681
|
+
maxCount: maxCount,
|
|
21682
|
+
beforeUpload: beforeUpload,
|
|
21683
|
+
onPreview: onPreview,
|
|
21684
|
+
fileList: fileList.map(function (item) {
|
|
21685
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21686
|
+
url: item.kmVideoUrl,
|
|
21687
|
+
name: item.kmVideoName
|
|
21688
|
+
});
|
|
21689
|
+
}),
|
|
21690
|
+
onRemove: onRemove,
|
|
21691
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21692
|
+
iconRender: function iconRender(file) {
|
|
21693
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
21694
|
+
align: "center"
|
|
21695
|
+
}, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
|
|
21696
|
+
style: {
|
|
21697
|
+
fontSize: 16
|
|
21698
|
+
}
|
|
21699
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21700
|
+
}
|
|
21701
|
+
}, resetProps), /*#__PURE__*/React.createElement("span", {
|
|
21702
|
+
className: styles$6.addBtn
|
|
21703
|
+
}, "+"), /*#__PURE__*/React.createElement("p", {
|
|
21704
|
+
className: styles$6.addBtn
|
|
21705
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
|
|
21706
|
+
visible: visible,
|
|
21707
|
+
title: fileName,
|
|
21708
|
+
footer: null,
|
|
21709
|
+
onCancel: handleCancel
|
|
21710
|
+
}, canDownload ? /*#__PURE__*/React.createElement(Button, {
|
|
21711
|
+
type: "link",
|
|
21712
|
+
onClick: function onClick() {
|
|
21713
|
+
return download(fileUrl, fileName);
|
|
21714
|
+
}
|
|
21715
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
21716
|
+
text: fileUrl,
|
|
21717
|
+
onCopy: function onCopy() {
|
|
21718
|
+
message.success('复制成功');
|
|
21719
|
+
}
|
|
21720
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
21721
|
+
type: "link"
|
|
21722
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
21723
|
+
alt: "example",
|
|
21724
|
+
style: {
|
|
21725
|
+
width: '100%'
|
|
21726
|
+
},
|
|
21727
|
+
src: fileUrl
|
|
21728
|
+
}) : /*#__PURE__*/React.createElement("video", {
|
|
21729
|
+
style: {
|
|
21730
|
+
width: '100%',
|
|
21731
|
+
height: '100%'
|
|
21732
|
+
},
|
|
21733
|
+
autoPlay: true,
|
|
21734
|
+
controls: true,
|
|
21735
|
+
src: fileUrl
|
|
21736
|
+
}))));
|
|
21737
|
+
};
|
|
21738
|
+
|
|
21739
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|