@kmkf-fe-packages/basic-components 2.0.54-beta.5 → 2.0.54-beta.50
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 +1521 -469
- package/dist/index.js +1520 -466
- 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 +6 -0
- 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 +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } 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, {
|
|
@@ -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',
|
|
@@ -15562,24 +16113,253 @@ var getColumns$5 = function getColumns() {
|
|
|
15562
16113
|
title: '单价',
|
|
15563
16114
|
width: 120,
|
|
15564
16115
|
render: function render(val, record, index) {
|
|
15565
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16116
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16117
|
+
style: {
|
|
16118
|
+
width: 70
|
|
16119
|
+
},
|
|
16120
|
+
value: val,
|
|
16121
|
+
min: 0,
|
|
16122
|
+
precision: 2,
|
|
16123
|
+
onChange: function onChange(num) {
|
|
16124
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
|
|
16125
|
+
}
|
|
16126
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16127
|
+
}
|
|
16128
|
+
}, {
|
|
16129
|
+
dataIndex: 'qty',
|
|
16130
|
+
title: '数量',
|
|
16131
|
+
width: 100,
|
|
16132
|
+
render: function render(val, record, index) {
|
|
16133
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16134
|
+
style: {
|
|
16135
|
+
width: 70
|
|
16136
|
+
},
|
|
16137
|
+
value: val,
|
|
16138
|
+
min: 1,
|
|
16139
|
+
precision: 0,
|
|
16140
|
+
onChange: function onChange(num) {
|
|
16141
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
|
|
16142
|
+
}
|
|
16143
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16144
|
+
}
|
|
16145
|
+
}, {
|
|
16146
|
+
dataIndex: 'saleAmount',
|
|
16147
|
+
title: '总金额',
|
|
16148
|
+
render: function render(val, record) {
|
|
16149
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
16150
|
+
}
|
|
16151
|
+
}, {
|
|
16152
|
+
dataIndex: 'isGift',
|
|
16153
|
+
title: '是否赠品',
|
|
16154
|
+
width: 100,
|
|
16155
|
+
render: function render(val, record, index) {
|
|
16156
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
16157
|
+
value: val,
|
|
16158
|
+
onChange: function onChange(value) {
|
|
16159
|
+
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
16160
|
+
},
|
|
16161
|
+
options: [{
|
|
16162
|
+
label: '是',
|
|
16163
|
+
value: true
|
|
16164
|
+
}, {
|
|
16165
|
+
label: '否',
|
|
16166
|
+
value: false
|
|
16167
|
+
}]
|
|
16168
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
16169
|
+
}
|
|
16170
|
+
}, {
|
|
16171
|
+
dataIndex: 'remark',
|
|
16172
|
+
title: '备注',
|
|
16173
|
+
render: function render(val, record, index) {
|
|
16174
|
+
return !disabled ? /*#__PURE__*/React.createElement(Input, {
|
|
16175
|
+
style: {
|
|
16176
|
+
width: 70
|
|
16177
|
+
},
|
|
16178
|
+
value: val,
|
|
16179
|
+
onChange: function onChange(e) {
|
|
16180
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
|
|
16181
|
+
}
|
|
16182
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16183
|
+
}
|
|
16184
|
+
}].map(fillAttrs)
|
|
16185
|
+
};
|
|
16186
|
+
};
|
|
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
|
+
}
|
|
16197
|
+
var getColumns$6 = function getColumns(_ref) {
|
|
16198
|
+
var _ref$text = _ref.text,
|
|
16199
|
+
disabled = _ref.disabled,
|
|
16200
|
+
updateHandle = _ref.updateHandle;
|
|
16201
|
+
return {
|
|
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, {
|
|
15566
16346
|
style: {
|
|
15567
16347
|
width: 70
|
|
15568
16348
|
},
|
|
15569
16349
|
value: val,
|
|
15570
|
-
min:
|
|
15571
|
-
precision:
|
|
16350
|
+
min: 1,
|
|
16351
|
+
precision: 0,
|
|
15572
16352
|
onChange: function onChange(num) {
|
|
15573
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, '
|
|
16353
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
15574
16354
|
}
|
|
15575
|
-
}) : /*#__PURE__*/React.createElement("span", null, val
|
|
16355
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15576
16356
|
}
|
|
15577
16357
|
}, {
|
|
15578
|
-
dataIndex: '
|
|
15579
|
-
title:
|
|
16358
|
+
dataIndex: 'desiredNum',
|
|
16359
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
15580
16360
|
width: 100,
|
|
15581
16361
|
render: function render(val, record, index) {
|
|
15582
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16362
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15583
16363
|
style: {
|
|
15584
16364
|
width: 70
|
|
15585
16365
|
},
|
|
@@ -15587,54 +16367,58 @@ var getColumns$5 = function getColumns() {
|
|
|
15587
16367
|
min: 1,
|
|
15588
16368
|
precision: 0,
|
|
15589
16369
|
onChange: function onChange(num) {
|
|
15590
|
-
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, '
|
|
16370
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
15591
16371
|
}
|
|
15592
16372
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15593
16373
|
}
|
|
15594
16374
|
}, {
|
|
15595
|
-
dataIndex: '
|
|
15596
|
-
title:
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
}, {
|
|
15601
|
-
dataIndex: 'isGift',
|
|
15602
|
-
title: '是否赠品',
|
|
15603
|
-
width: 100,
|
|
15604
|
-
render: function render(val, record, index) {
|
|
15605
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
15606
|
-
value: val,
|
|
15607
|
-
onChange: function onChange(value) {
|
|
15608
|
-
updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
|
|
15609
|
-
},
|
|
15610
|
-
options: [{
|
|
15611
|
-
label: '是',
|
|
15612
|
-
value: true
|
|
15613
|
-
}, {
|
|
15614
|
-
label: '否',
|
|
15615
|
-
value: false
|
|
15616
|
-
}]
|
|
15617
|
-
}) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
|
|
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) : '';
|
|
15618
16380
|
}
|
|
15619
16381
|
}, {
|
|
15620
|
-
dataIndex: '
|
|
15621
|
-
title:
|
|
16382
|
+
dataIndex: 'payment',
|
|
16383
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16384
|
+
width: 150,
|
|
15622
16385
|
render: function render(val, record, index) {
|
|
15623
|
-
return !disabled ? /*#__PURE__*/React.createElement(
|
|
16386
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
15624
16387
|
style: {
|
|
15625
|
-
width:
|
|
16388
|
+
width: 130
|
|
15626
16389
|
},
|
|
15627
16390
|
value: val,
|
|
15628
|
-
|
|
15629
|
-
|
|
16391
|
+
min: 0,
|
|
16392
|
+
precision: 2,
|
|
16393
|
+
onChange: function onChange(num) {
|
|
16394
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
15630
16395
|
}
|
|
15631
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16396
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
15632
16397
|
}
|
|
15633
|
-
}
|
|
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
|
+
})
|
|
15634
16418
|
};
|
|
15635
16419
|
};
|
|
15636
16420
|
|
|
15637
|
-
var getColumns$
|
|
16421
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
15638
16422
|
var _ref$text = _ref.text,
|
|
15639
16423
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15640
16424
|
disabled = _ref.disabled,
|
|
@@ -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
|
+
sysSkuPropertiesName: 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,
|
|
@@ -15934,10 +16947,13 @@ var GoodsModalMap = {
|
|
|
15934
16947
|
BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
|
|
15935
16948
|
GY_GOODS: GyGoodsModal$2,
|
|
15936
16949
|
GY_REISSUE_GOODS: GyGoodsModal$2,
|
|
16950
|
+
GY_RETURN_GOODS: GyGoodsModal$2,
|
|
15937
16951
|
JST_GOODS: JstGoodsModal,
|
|
15938
16952
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15939
16953
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15940
16954
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16955
|
+
KM_GOODS: KmGoodsModal,
|
|
16956
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15941
16957
|
OTHER_GOODS: GoodsModal$2
|
|
15942
16958
|
};
|
|
15943
16959
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15971,7 +16987,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15971
16987
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15972
16988
|
}));
|
|
15973
16989
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15974
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
16990
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15975
16991
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15976
16992
|
};
|
|
15977
16993
|
var rowSelection = {
|
|
@@ -16000,13 +17016,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16000
17016
|
};
|
|
16001
17017
|
var getButtonText = function getButtonText() {
|
|
16002
17018
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17019
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17020
|
+
return '选择快麦ERP商品';
|
|
17021
|
+
}
|
|
16003
17022
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16004
17023
|
return '选择百胜ERP商品';
|
|
16005
17024
|
}
|
|
16006
17025
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
16007
17026
|
return '选择旺店通商品';
|
|
16008
17027
|
}
|
|
16009
|
-
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
17028
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16010
17029
|
return '选择管易ERP商品';
|
|
16011
17030
|
}
|
|
16012
17031
|
if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16143,6 +17162,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16143
17162
|
case 'JST_RETURN_GOODS':
|
|
16144
17163
|
case 'GY_REISSUE_GOODS':
|
|
16145
17164
|
case 'GY_RETURN_GOODS':
|
|
17165
|
+
case 'KM_GOODS':
|
|
17166
|
+
case 'KM_REISSUE_GOODS':
|
|
16146
17167
|
{
|
|
16147
17168
|
columns = getColumnsMap$1({
|
|
16148
17169
|
text: text,
|
|
@@ -16260,120 +17281,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16260
17281
|
}].concat(_toConsumableArray(columns));
|
|
16261
17282
|
}, []);
|
|
16262
17283
|
var onSubmit = function onSubmit(list) {
|
|
16263
|
-
var newList =
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
item.num = 1;
|
|
16269
|
-
item.orderPrice = 0;
|
|
16270
|
-
item.sharePrice = 0;
|
|
16271
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16272
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16273
|
-
item.price = item.retailPrice;
|
|
16274
|
-
item.type = '1';
|
|
16275
|
-
}
|
|
16276
|
-
return item;
|
|
16277
|
-
});
|
|
16278
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16279
|
-
newList = list.map(function (item) {
|
|
16280
|
-
var specNo = item.specNo,
|
|
16281
|
-
specId = item.specId,
|
|
16282
|
-
goodName = item.goodName,
|
|
16283
|
-
goodShortName = item.goodShortName,
|
|
16284
|
-
goodPicUrl = item.goodPicUrl,
|
|
16285
|
-
goodNo = item.goodNo,
|
|
16286
|
-
goodId = item.goodId,
|
|
16287
|
-
retailPrice = item.retailPrice;
|
|
16288
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16289
|
-
sku: specNo,
|
|
16290
|
-
skuId: specId,
|
|
16291
|
-
goodsName: goodName,
|
|
16292
|
-
goodsShortName: goodShortName,
|
|
16293
|
-
picPath: goodPicUrl,
|
|
16294
|
-
goodsSn: goodNo,
|
|
16295
|
-
goodsId: goodId,
|
|
16296
|
-
goodsPrice: retailPrice,
|
|
16297
|
-
shopPrice: retailPrice,
|
|
16298
|
-
sharePayment: '',
|
|
16299
|
-
sharePrice: '',
|
|
16300
|
-
payment: '',
|
|
16301
|
-
tcSku: '',
|
|
16302
|
-
tcGoodsNumber: '',
|
|
16303
|
-
taoCanSingleSl: '',
|
|
16304
|
-
isGift: '',
|
|
16305
|
-
uuid: uuid(),
|
|
16306
|
-
canDelete: true,
|
|
16307
|
-
canEdit: true,
|
|
16308
|
-
goodsNumber: 1,
|
|
16309
|
-
canUpdateNumber: canUpdateNumber
|
|
16310
|
-
});
|
|
16311
|
-
});
|
|
16312
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
16313
|
-
newList = list.map(function (item) {
|
|
16314
|
-
var goodName = item.goodName,
|
|
16315
|
-
goodShortName = item.goodShortName,
|
|
16316
|
-
goodNo = item.goodNo,
|
|
16317
|
-
specName = item.specName,
|
|
16318
|
-
specNo = item.specNo,
|
|
16319
|
-
retailPrice = item.retailPrice;
|
|
16320
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16321
|
-
uuid: uuid(),
|
|
16322
|
-
canDelete: true,
|
|
16323
|
-
canEdit: true,
|
|
16324
|
-
qty: 1,
|
|
16325
|
-
goodName: goodName,
|
|
16326
|
-
goodShortName: goodShortName,
|
|
16327
|
-
goodNo: goodNo,
|
|
16328
|
-
specName: specName,
|
|
16329
|
-
specNo: specNo,
|
|
16330
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16331
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16332
|
-
});
|
|
16333
|
-
});
|
|
16334
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16335
|
-
newList = list.map(function (item) {
|
|
16336
|
-
return {
|
|
16337
|
-
name: item.goodName,
|
|
16338
|
-
skuId: item.goodNo,
|
|
16339
|
-
iId: item.styleCode,
|
|
16340
|
-
pic: item.goodPicUrl,
|
|
16341
|
-
propertiesValue: item.propertiesValue,
|
|
16342
|
-
saleBasePrice: item.retailPrice,
|
|
16343
|
-
salePrice: item.retailPrice,
|
|
16344
|
-
remark: '',
|
|
16345
|
-
uuid: uuid(),
|
|
16346
|
-
canDelete: true,
|
|
16347
|
-
canEdit: true,
|
|
16348
|
-
qty: 1
|
|
16349
|
-
};
|
|
16350
|
-
});
|
|
16351
|
-
} else {
|
|
16352
|
-
newList = list.map(function (item) {
|
|
16353
|
-
var goodsId = item.goodsId,
|
|
16354
|
-
name = item.name,
|
|
16355
|
-
code = item.code,
|
|
16356
|
-
skuCode = item.skuCode,
|
|
16357
|
-
marketPrice = item.marketPrice,
|
|
16358
|
-
skuName = item.skuName;
|
|
16359
|
-
return {
|
|
16360
|
-
id: goodsId,
|
|
16361
|
-
mark: '是',
|
|
16362
|
-
pic: '',
|
|
16363
|
-
skuName: skuName,
|
|
16364
|
-
name: name,
|
|
16365
|
-
code: code,
|
|
16366
|
-
sku: skuCode,
|
|
16367
|
-
money: marketPrice || 0,
|
|
16368
|
-
share: marketPrice || 0,
|
|
16369
|
-
number: 1,
|
|
16370
|
-
type: '',
|
|
16371
|
-
uuid: uuid(),
|
|
16372
|
-
canDelete: true,
|
|
16373
|
-
canUpdateNumber: canUpdateNumber
|
|
16374
|
-
};
|
|
16375
|
-
});
|
|
16376
|
-
}
|
|
17284
|
+
var newList = processGoods({
|
|
17285
|
+
list: list,
|
|
17286
|
+
canUpdateNumber: canUpdateNumber,
|
|
17287
|
+
type: type
|
|
17288
|
+
});
|
|
16377
17289
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16378
17290
|
};
|
|
16379
17291
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17087,10 +17999,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17087
17999
|
var _data$data, _data$data$trades;
|
|
17088
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) {
|
|
17089
18001
|
data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18002
|
+
var _tradeStatusMap$data$;
|
|
17090
18003
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17091
18004
|
billNo: item.tradeNo,
|
|
17092
18005
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17093
|
-
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]
|
|
17094
18008
|
});
|
|
17095
18009
|
});
|
|
17096
18010
|
}
|
|
@@ -17333,7 +18247,6 @@ var index$3 = (function (props) {
|
|
|
17333
18247
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17334
18248
|
getBsE3OrderList(value.orderNo);
|
|
17335
18249
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17336
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17337
18250
|
getGyOrderList(value.orderNo);
|
|
17338
18251
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17339
18252
|
getJstOrderList(value.orderNo);
|
|
@@ -17447,11 +18360,13 @@ var index$3 = (function (props) {
|
|
|
17447
18360
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17448
18361
|
var billNo = _ref4.billNo,
|
|
17449
18362
|
billType = _ref4.billType,
|
|
17450
|
-
billTag = _ref4.billTag
|
|
18363
|
+
billTag = _ref4.billTag,
|
|
18364
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17451
18365
|
return {
|
|
17452
18366
|
billNo: billNo,
|
|
17453
18367
|
billType: billType,
|
|
17454
|
-
billTag: billTag
|
|
18368
|
+
billTag: billTag,
|
|
18369
|
+
tradeStatusValue: tradeStatusValue
|
|
17455
18370
|
};
|
|
17456
18371
|
})
|
|
17457
18372
|
}));
|
|
@@ -17761,6 +18676,31 @@ var componentMap$1 = {
|
|
|
17761
18676
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17762
18677
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17763
18678
|
}
|
|
18679
|
+
},
|
|
18680
|
+
KM_GOODS: {
|
|
18681
|
+
type: 'km',
|
|
18682
|
+
key: 'kmGoods',
|
|
18683
|
+
name: '快麦',
|
|
18684
|
+
orderNo: 'tid',
|
|
18685
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18686
|
+
eventNameMap: {
|
|
18687
|
+
// pubsub 事件
|
|
18688
|
+
type: 'kmType',
|
|
18689
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
18690
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18691
|
+
selectList: 'kmSelectList',
|
|
18692
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18693
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18694
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18695
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18696
|
+
reissueType: 'kmReissueType',
|
|
18697
|
+
returnType: 'kmReturnType',
|
|
18698
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18699
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18700
|
+
deleteGood: 'kmDeleteGood',
|
|
18701
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18702
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18703
|
+
}
|
|
17764
18704
|
}
|
|
17765
18705
|
};
|
|
17766
18706
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17769,7 +18709,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17769
18709
|
disabled = props.disabled,
|
|
17770
18710
|
onChange = props.onChange,
|
|
17771
18711
|
compType = props.type;
|
|
17772
|
-
console.log('value?.orders', value
|
|
18712
|
+
// console.log('value?.orders', value?.orders);
|
|
17773
18713
|
// 合并单订单会包含","
|
|
17774
18714
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17775
18715
|
var _order$componentMap$c;
|
|
@@ -17922,7 +18862,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17922
18862
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17923
18863
|
var mode = _ref2.mode;
|
|
17924
18864
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17925
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18865
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18866
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18867
|
+
});
|
|
17926
18868
|
var orderNo = value.orderNo;
|
|
17927
18869
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17928
18870
|
var _componentMap$compTyp;
|
|
@@ -17976,7 +18918,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17976
18918
|
_props$reasonList = props.reasonList,
|
|
17977
18919
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17978
18920
|
disabled = props.disabled,
|
|
17979
|
-
compType = props.type
|
|
18921
|
+
compType = props.type,
|
|
18922
|
+
isSettingConfig = props.isSettingConfig;
|
|
17980
18923
|
var valueRef = useRef({});
|
|
17981
18924
|
useEffect(function () {
|
|
17982
18925
|
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18068,7 +19011,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18068
19011
|
var newValue = _objectSpread2({}, value);
|
|
18069
19012
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18070
19013
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18071
|
-
if (['2'].includes(val[0])) {
|
|
19014
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18072
19015
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18073
19016
|
valueRef.current = newValue;
|
|
18074
19017
|
}
|
|
@@ -18090,7 +19033,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18090
19033
|
style: {
|
|
18091
19034
|
marginBottom: '8px'
|
|
18092
19035
|
},
|
|
18093
|
-
disabled: disabled,
|
|
19036
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18094
19037
|
allowClear: false,
|
|
18095
19038
|
options: reasonList,
|
|
18096
19039
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18272,7 +19215,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18272
19215
|
})));
|
|
18273
19216
|
};
|
|
18274
19217
|
|
|
18275
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19218
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18276
19219
|
var typeMap$1 = {
|
|
18277
19220
|
WDT_REISSUE_GOODS: {
|
|
18278
19221
|
key: 'wdtReissueGoods',
|
|
@@ -18293,13 +19236,14 @@ var typeMap$1 = {
|
|
|
18293
19236
|
}
|
|
18294
19237
|
};
|
|
18295
19238
|
var wdtReissue = function wdtReissue(props) {
|
|
18296
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19239
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18297
19240
|
var value = props.value,
|
|
18298
19241
|
onChange = props.onChange,
|
|
18299
19242
|
_props$reasonList = props.reasonList,
|
|
18300
19243
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18301
19244
|
disabled = props.disabled,
|
|
18302
19245
|
type = props.type,
|
|
19246
|
+
isSettingConfig = props.isSettingConfig,
|
|
18303
19247
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18304
19248
|
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) {
|
|
18305
19249
|
var _order$srcTid;
|
|
@@ -18363,11 +19307,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18363
19307
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18364
19308
|
var billNo = _ref2.billNo,
|
|
18365
19309
|
billType = _ref2.billType,
|
|
18366
|
-
billTag = _ref2.billTag
|
|
19310
|
+
billTag = _ref2.billTag,
|
|
19311
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18367
19312
|
return {
|
|
18368
19313
|
billNo: billNo,
|
|
18369
19314
|
billType: billType,
|
|
18370
|
-
billTag: billTag
|
|
19315
|
+
billTag: billTag,
|
|
19316
|
+
tradeStatusValue: tradeStatusValue
|
|
18371
19317
|
};
|
|
18372
19318
|
});
|
|
18373
19319
|
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]) || {}), {}, {
|
|
@@ -18450,7 +19396,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18450
19396
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18451
19397
|
};
|
|
18452
19398
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18453
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19399
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18454
19400
|
var newValue = _objectSpread2({}, value);
|
|
18455
19401
|
// 原订单商品
|
|
18456
19402
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18461,14 +19407,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18461
19407
|
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) {
|
|
18462
19408
|
return skuList.includes(item.uuid);
|
|
18463
19409
|
});
|
|
18464
|
-
console.log('商品发生变化', newValue[
|
|
19410
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18465
19411
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18466
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19412
|
+
}, [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]);
|
|
18467
19413
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18468
19414
|
var showChangeBtn = useMemo(function () {
|
|
18469
|
-
var _typeMap$
|
|
18470
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18471
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19415
|
+
var _typeMap$type24;
|
|
19416
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19417
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18472
19418
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18473
19419
|
gutter: 8,
|
|
18474
19420
|
wrap: true
|
|
@@ -18482,16 +19428,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18482
19428
|
}
|
|
18483
19429
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18484
19430
|
style: {
|
|
18485
|
-
marginBottom: '8px'
|
|
19431
|
+
marginBottom: '8px',
|
|
19432
|
+
width: '100%'
|
|
18486
19433
|
},
|
|
18487
19434
|
disabled: disabled,
|
|
18488
19435
|
allowClear: false,
|
|
18489
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19436
|
+
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)],
|
|
18490
19437
|
onChange: function onChange(val) {
|
|
18491
19438
|
return changeSystemOrderHandle(val);
|
|
18492
19439
|
},
|
|
18493
19440
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18494
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19441
|
+
}, ((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) {
|
|
18495
19442
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18496
19443
|
key: item.billNo,
|
|
18497
19444
|
value: item.billNo,
|
|
@@ -18507,12 +19454,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18507
19454
|
}
|
|
18508
19455
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18509
19456
|
style: {
|
|
18510
|
-
marginBottom: '8px'
|
|
19457
|
+
marginBottom: '8px',
|
|
19458
|
+
width: '100%'
|
|
18511
19459
|
},
|
|
18512
|
-
disabled: disabled,
|
|
19460
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18513
19461
|
allowClear: false,
|
|
18514
19462
|
options: reasonList,
|
|
18515
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19463
|
+
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)],
|
|
18516
19464
|
onChange: function onChange(val) {
|
|
18517
19465
|
return changeTypeHandle(val);
|
|
18518
19466
|
}
|
|
@@ -18524,7 +19472,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18524
19472
|
canUpdateNumber: showChangeBtn,
|
|
18525
19473
|
showChangeBtn: showChangeBtn,
|
|
18526
19474
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18527
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19475
|
+
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)],
|
|
18528
19476
|
onChange: function onChange(val) {
|
|
18529
19477
|
return changeGoodHandle(val);
|
|
18530
19478
|
},
|
|
@@ -18540,7 +19488,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18540
19488
|
})));
|
|
18541
19489
|
};
|
|
18542
19490
|
|
|
18543
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19491
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18544
19492
|
var typeMap$2 = {
|
|
18545
19493
|
JST_REISSUE_GOODS: {
|
|
18546
19494
|
compType: '补发',
|
|
@@ -18555,7 +19503,9 @@ var typeMap$2 = {
|
|
|
18555
19503
|
orderTypeKey: 'orderType',
|
|
18556
19504
|
oIdKey: 'oId',
|
|
18557
19505
|
outerOiIdKey: '',
|
|
18558
|
-
goodDetailsKey: 'items'
|
|
19506
|
+
goodDetailsKey: 'items',
|
|
19507
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19508
|
+
uniqueKey: 'uuid'
|
|
18559
19509
|
},
|
|
18560
19510
|
JST_RETURN_GOODS: {
|
|
18561
19511
|
compType: '退货',
|
|
@@ -18571,6 +19521,8 @@ var typeMap$2 = {
|
|
|
18571
19521
|
oIdKey: 'oId',
|
|
18572
19522
|
outerOiIdKey: '',
|
|
18573
19523
|
goodDetailsKey: 'items',
|
|
19524
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19525
|
+
uniqueKey: 'uuid',
|
|
18574
19526
|
eventNameMap: {
|
|
18575
19527
|
// pubsub 事件
|
|
18576
19528
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18578,16 +19530,32 @@ var typeMap$2 = {
|
|
|
18578
19530
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18579
19531
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18580
19532
|
}
|
|
19533
|
+
},
|
|
19534
|
+
KM_REISSUE_GOODS: {
|
|
19535
|
+
compType: '补发',
|
|
19536
|
+
key: 'kmReissueGoods',
|
|
19537
|
+
typeName: 'kmReissueType',
|
|
19538
|
+
systemOrder: 'kmSystemOrder',
|
|
19539
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19540
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19541
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
19542
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19543
|
+
orderTypeKey: 'orderType',
|
|
19544
|
+
oIdKey: 'billNo',
|
|
19545
|
+
outerOiIdKey: '',
|
|
19546
|
+
goodDetailsKey: 'subOrders',
|
|
19547
|
+
uniqueKey: 'id'
|
|
18581
19548
|
}
|
|
18582
19549
|
};
|
|
18583
19550
|
var PublicReissue = function PublicReissue(props) {
|
|
18584
|
-
var _typeMap$
|
|
19551
|
+
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;
|
|
18585
19552
|
var value = props.value,
|
|
18586
19553
|
onChange = props.onChange,
|
|
18587
19554
|
_props$reasonList = props.reasonList,
|
|
18588
19555
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18589
19556
|
disabled = props.disabled,
|
|
18590
19557
|
type = props.type,
|
|
19558
|
+
isSettingConfig = props.isSettingConfig,
|
|
18591
19559
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18592
19560
|
var getOrderFlag = useRef(false);
|
|
18593
19561
|
var _useState = useState(false),
|
|
@@ -18694,7 +19662,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18694
19662
|
}))));
|
|
18695
19663
|
};
|
|
18696
19664
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18697
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19665
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18698
19666
|
var mode = _ref4.mode,
|
|
18699
19667
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18700
19668
|
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];
|
|
@@ -18702,63 +19670,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18702
19670
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18703
19671
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18704
19672
|
});
|
|
18705
|
-
var
|
|
19673
|
+
var orderRest = undefined;
|
|
19674
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19675
|
+
orderRest = true;
|
|
19676
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19677
|
+
orderRest = {
|
|
19678
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19679
|
+
canEdit: true
|
|
19680
|
+
};
|
|
19681
|
+
}
|
|
19682
|
+
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) : [];
|
|
18706
19683
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18707
|
-
|
|
19684
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18708
19685
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18709
19686
|
}) : goodDetails;
|
|
19687
|
+
return list;
|
|
18710
19688
|
};
|
|
18711
19689
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18712
|
-
var _typeMap$
|
|
19690
|
+
var _typeMap$type21;
|
|
18713
19691
|
var newValue = _objectSpread2({}, value);
|
|
18714
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19692
|
+
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 || [];
|
|
18715
19693
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18716
19694
|
};
|
|
18717
19695
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18718
|
-
var _typeMap$
|
|
19696
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18719
19697
|
var newValue = _objectSpread2({}, value);
|
|
18720
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18721
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18722
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18723
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19698
|
+
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;
|
|
19699
|
+
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) {
|
|
19700
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19701
|
+
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) || [];
|
|
18724
19702
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18725
|
-
var _typeMap$
|
|
18726
|
-
return oItem[(_typeMap$
|
|
19703
|
+
var _typeMap$type25;
|
|
19704
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18727
19705
|
});
|
|
18728
|
-
newValue[(_typeMap$
|
|
18729
|
-
}
|
|
18730
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18731
|
-
var _typeMap$
|
|
18732
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18733
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18734
|
-
var _typeMap$
|
|
18735
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19706
|
+
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];
|
|
19707
|
+
}
|
|
19708
|
+
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])) {
|
|
19709
|
+
var _typeMap$type29;
|
|
19710
|
+
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)] = [];
|
|
19711
|
+
} 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])) {
|
|
19712
|
+
var _typeMap$type31;
|
|
19713
|
+
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({
|
|
18736
19714
|
mode: isStrict,
|
|
18737
19715
|
sysOrderNo: val
|
|
18738
19716
|
});
|
|
18739
19717
|
}
|
|
18740
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19718
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18741
19719
|
};
|
|
18742
19720
|
//显示选择商品按钮
|
|
18743
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19721
|
+
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]);
|
|
18744
19722
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18745
|
-
var _typeMap$
|
|
19723
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18746
19724
|
var newValue = _objectSpread2({}, value);
|
|
18747
19725
|
// 原订单商品
|
|
18748
19726
|
var originTradeGoodList = getGoodDetails({
|
|
18749
19727
|
mode: isStrict
|
|
18750
19728
|
}) || [];
|
|
18751
19729
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18752
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18753
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18754
|
-
|
|
19730
|
+
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)]) || [];
|
|
19731
|
+
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) {
|
|
19732
|
+
var _typeMap$type36;
|
|
19733
|
+
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]);
|
|
18755
19734
|
});
|
|
18756
19735
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18757
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19736
|
+
}, [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]);
|
|
18758
19737
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18759
19738
|
gutter: 8,
|
|
18760
19739
|
wrap: true,
|
|
18761
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19740
|
+
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())
|
|
18762
19741
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
18763
19742
|
className: "gutter-row",
|
|
18764
19743
|
xs: {
|
|
@@ -18769,16 +19748,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18769
19748
|
}
|
|
18770
19749
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18771
19750
|
style: {
|
|
18772
|
-
marginBottom: '8px'
|
|
19751
|
+
marginBottom: '8px',
|
|
19752
|
+
width: '100%'
|
|
18773
19753
|
},
|
|
18774
19754
|
disabled: disabled,
|
|
18775
19755
|
allowClear: false,
|
|
18776
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19756
|
+
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)],
|
|
18777
19757
|
onChange: function onChange(val) {
|
|
18778
19758
|
return changeSystemOrderHandle(val);
|
|
18779
19759
|
},
|
|
18780
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18781
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19760
|
+
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")
|
|
19761
|
+
}, ((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) {
|
|
18782
19762
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18783
19763
|
key: item[typeMap$2[type].oIdKey],
|
|
18784
19764
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18794,16 +19774,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18794
19774
|
}
|
|
18795
19775
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18796
19776
|
style: {
|
|
18797
|
-
marginBottom: '8px'
|
|
19777
|
+
marginBottom: '8px',
|
|
19778
|
+
width: '100%'
|
|
18798
19779
|
},
|
|
18799
|
-
disabled: disabled,
|
|
19780
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18800
19781
|
allowClear: false,
|
|
18801
19782
|
options: reasonList,
|
|
18802
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19783
|
+
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)],
|
|
18803
19784
|
onChange: function onChange(val) {
|
|
18804
19785
|
return changeTypeHandle(val);
|
|
18805
19786
|
}
|
|
18806
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19787
|
+
})), (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, {
|
|
18807
19788
|
className: "gutter-row",
|
|
18808
19789
|
xs: {
|
|
18809
19790
|
span: 11
|
|
@@ -18812,7 +19793,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18812
19793
|
span: 6
|
|
18813
19794
|
}
|
|
18814
19795
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
18815
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19796
|
+
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)],
|
|
18816
19797
|
disabled: disabled,
|
|
18817
19798
|
readOnly: true
|
|
18818
19799
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18822,10 +19803,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18822
19803
|
disabled: disabled,
|
|
18823
19804
|
canUpdateNumber: showChangeBtn,
|
|
18824
19805
|
showChangeBtn: showChangeBtn,
|
|
18825
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18826
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19806
|
+
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,
|
|
19807
|
+
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,
|
|
18827
19808
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18828
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19809
|
+
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)],
|
|
18829
19810
|
onChange: function onChange(val) {
|
|
18830
19811
|
return changeGoodHandle(val);
|
|
18831
19812
|
},
|
|
@@ -18836,6 +19817,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18836
19817
|
originDataSource: getGoodDetails({
|
|
18837
19818
|
mode: isStrict
|
|
18838
19819
|
}),
|
|
19820
|
+
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',
|
|
18839
19821
|
selectedGoodsChange: selectedGoodsChange
|
|
18840
19822
|
}
|
|
18841
19823
|
})));
|
|
@@ -19596,6 +20578,39 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19596
20578
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19597
20579
|
};
|
|
19598
20580
|
|
|
20581
|
+
var _excluded$n = ["showOnly", "getOptionsAsync"];
|
|
20582
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20583
|
+
var _props$showOnly = props.showOnly,
|
|
20584
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20585
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20586
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20587
|
+
var _React$useState = React.useState([]),
|
|
20588
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20589
|
+
data = _React$useState2[0],
|
|
20590
|
+
setData = _React$useState2[1];
|
|
20591
|
+
React.useEffect(function () {
|
|
20592
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20593
|
+
setData(list);
|
|
20594
|
+
});
|
|
20595
|
+
}, []);
|
|
20596
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20597
|
+
if (showOnly) {
|
|
20598
|
+
var selectedItem = options.find(function (option) {
|
|
20599
|
+
return option.value === props.value;
|
|
20600
|
+
});
|
|
20601
|
+
return selectedItem ? selectedItem.label : props.value;
|
|
20602
|
+
}
|
|
20603
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
20604
|
+
showSearch: true,
|
|
20605
|
+
filterOption: function filterOption(input, option) {
|
|
20606
|
+
return option.label.includes(input);
|
|
20607
|
+
},
|
|
20608
|
+
notFoundContent: null
|
|
20609
|
+
}, otherProps), {}, {
|
|
20610
|
+
options: options
|
|
20611
|
+
}));
|
|
20612
|
+
};
|
|
20613
|
+
|
|
19599
20614
|
var CalculationInput = function CalculationInput(props) {
|
|
19600
20615
|
var _props$config = props.config,
|
|
19601
20616
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19614,7 +20629,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19614
20629
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19615
20630
|
};
|
|
19616
20631
|
|
|
19617
|
-
var _excluded$
|
|
20632
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19618
20633
|
var typeMap$3 = {
|
|
19619
20634
|
BS_E3_REISSUE_GOODS: {
|
|
19620
20635
|
key: 'bsE3ReissueGoods',
|
|
@@ -19632,7 +20647,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19632
20647
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19633
20648
|
disabled = props.disabled,
|
|
19634
20649
|
type = props.type,
|
|
19635
|
-
|
|
20650
|
+
isSettingConfig = props.isSettingConfig,
|
|
20651
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19636
20652
|
var getOrderFlag = useRef(false);
|
|
19637
20653
|
var valueRef = useRef(null);
|
|
19638
20654
|
var _useState = useState(false),
|
|
@@ -19792,7 +20808,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19792
20808
|
}
|
|
19793
20809
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
19794
20810
|
style: {
|
|
19795
|
-
marginBottom: '8px'
|
|
20811
|
+
marginBottom: '8px',
|
|
20812
|
+
width: '100%'
|
|
19796
20813
|
},
|
|
19797
20814
|
disabled: disabled,
|
|
19798
20815
|
allowClear: false,
|
|
@@ -19817,9 +20834,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19817
20834
|
}
|
|
19818
20835
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
19819
20836
|
style: {
|
|
19820
|
-
marginBottom: '8px'
|
|
20837
|
+
marginBottom: '8px',
|
|
20838
|
+
width: '100%'
|
|
19821
20839
|
},
|
|
19822
|
-
disabled: disabled,
|
|
20840
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19823
20841
|
allowClear: false,
|
|
19824
20842
|
options: reasonList,
|
|
19825
20843
|
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)],
|
|
@@ -19850,7 +20868,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19850
20868
|
})));
|
|
19851
20869
|
};
|
|
19852
20870
|
|
|
19853
|
-
var _excluded$
|
|
20871
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19854
20872
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19855
20873
|
var typeMap$4 = {
|
|
19856
20874
|
GY_REISSUE_GOODS: {
|
|
@@ -19872,17 +20890,19 @@ var typeMap$4 = {
|
|
|
19872
20890
|
}
|
|
19873
20891
|
};
|
|
19874
20892
|
var GyReissue = function GyReissue(props) {
|
|
19875
|
-
var _typeMap$
|
|
20893
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19876
20894
|
var value = props.value,
|
|
19877
20895
|
onChange = props.onChange,
|
|
19878
20896
|
_props$reasonList = props.reasonList,
|
|
19879
20897
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19880
20898
|
disabled = props.disabled,
|
|
19881
20899
|
type = props.type,
|
|
19882
|
-
|
|
20900
|
+
isSettingConfig = props.isSettingConfig,
|
|
20901
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19883
20902
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19884
20903
|
// order?.platformCode?.includes(';'),
|
|
19885
20904
|
// );
|
|
20905
|
+
var getVipCodeFlag = useRef(false);
|
|
19886
20906
|
var getOrderFlag = useRef(false);
|
|
19887
20907
|
var valueRef = useRef(null);
|
|
19888
20908
|
var _useState = useState(false),
|
|
@@ -19890,23 +20910,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19890
20910
|
isStrict = _useState2[0],
|
|
19891
20911
|
setIsStrict = _useState2[1];
|
|
19892
20912
|
useEffect(function () {
|
|
19893
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20913
|
+
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;
|
|
19894
20914
|
valueRef.current = value;
|
|
19895
20915
|
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)) {
|
|
19896
20916
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19897
20917
|
getOrderFlag.current = true;
|
|
19898
20918
|
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);
|
|
20919
|
+
} 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)) {
|
|
20920
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20921
|
+
getVipCodeFlag.current = true;
|
|
20922
|
+
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);
|
|
19899
20923
|
}
|
|
19900
20924
|
return;
|
|
19901
20925
|
}, [value]);
|
|
19902
20926
|
var getOrderList = /*#__PURE__*/function () {
|
|
19903
20927
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19904
|
-
var _typeMap$
|
|
20928
|
+
var _typeMap$type7;
|
|
19905
20929
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19906
20930
|
while (1) switch (_context.prev = _context.next) {
|
|
19907
20931
|
case 0:
|
|
19908
|
-
(_typeMap$
|
|
19909
|
-
var _typeMap$
|
|
20932
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20933
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19910
20934
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19911
20935
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19912
20936
|
var billNo = _ref2.billNo,
|
|
@@ -19928,17 +20952,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19928
20952
|
shopCode: shopCode
|
|
19929
20953
|
});
|
|
19930
20954
|
});
|
|
20955
|
+
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]) || {}), {}, {
|
|
20956
|
+
showOrderInfo: showOrderInfo,
|
|
20957
|
+
orders: orders
|
|
20958
|
+
})), _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));
|
|
19931
20959
|
pushGyLog('getOrderList', {
|
|
19932
20960
|
before: valueRef.current,
|
|
19933
|
-
after:
|
|
19934
|
-
showOrderInfo: showOrderInfo,
|
|
19935
|
-
orders: orders
|
|
19936
|
-
})))
|
|
20961
|
+
after: newValue
|
|
19937
20962
|
});
|
|
19938
|
-
onChange(
|
|
19939
|
-
showOrderInfo: showOrderInfo,
|
|
19940
|
-
orders: orders
|
|
19941
|
-
}))));
|
|
20963
|
+
onChange(newValue);
|
|
19942
20964
|
});
|
|
19943
20965
|
case 1:
|
|
19944
20966
|
case "end":
|
|
@@ -19950,42 +20972,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19950
20972
|
return _ref.apply(this, arguments);
|
|
19951
20973
|
};
|
|
19952
20974
|
}();
|
|
20975
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
20976
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
20977
|
+
var _typeMap$type10;
|
|
20978
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20979
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
20980
|
+
case 0:
|
|
20981
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
20982
|
+
var _orders$3, _orders$4;
|
|
20983
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20984
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
20985
|
+
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),
|
|
20986
|
+
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)
|
|
20987
|
+
});
|
|
20988
|
+
pushGyLog('getVipCode', {
|
|
20989
|
+
before: valueRef.current,
|
|
20990
|
+
after: newValue
|
|
20991
|
+
});
|
|
20992
|
+
onChange(newValue);
|
|
20993
|
+
}));
|
|
20994
|
+
case 1:
|
|
20995
|
+
case "end":
|
|
20996
|
+
return _context2.stop();
|
|
20997
|
+
}
|
|
20998
|
+
}, _callee2);
|
|
20999
|
+
}));
|
|
21000
|
+
return function getVipCode(_x2) {
|
|
21001
|
+
return _ref4.apply(this, arguments);
|
|
21002
|
+
};
|
|
21003
|
+
}();
|
|
19953
21004
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19954
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21005
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19955
21006
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19956
21007
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19957
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21008
|
+
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;
|
|
19958
21009
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19959
21010
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19960
|
-
newValue[(_typeMap$
|
|
21011
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19961
21012
|
if (typeName === '1') {
|
|
19962
|
-
var _typeMap$
|
|
19963
|
-
newValue[(_typeMap$
|
|
21013
|
+
var _typeMap$type13;
|
|
21014
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19964
21015
|
mode: isStrict
|
|
19965
21016
|
});
|
|
19966
21017
|
} else if (typeName === '2') {
|
|
19967
|
-
var _typeMap$
|
|
21018
|
+
var _typeMap$type14;
|
|
19968
21019
|
// 切换到非原单,清空列表
|
|
19969
|
-
newValue[(_typeMap$
|
|
21020
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19970
21021
|
}
|
|
19971
21022
|
pushGyLog('afterChangeType', newValue);
|
|
19972
21023
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19973
21024
|
};
|
|
19974
21025
|
var handleModeChange = function handleModeChange(mode) {
|
|
19975
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19976
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21026
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21027
|
+
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';
|
|
19977
21028
|
setIsStrict(mode);
|
|
19978
21029
|
if (!isOriginalOrder) return;
|
|
19979
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21030
|
+
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({
|
|
19980
21031
|
mode: mode
|
|
19981
21032
|
}))));
|
|
19982
21033
|
};
|
|
19983
21034
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19984
|
-
var _ref8, _typeMap$
|
|
21035
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19985
21036
|
var mode = _ref7.mode,
|
|
19986
21037
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19987
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19988
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21038
|
+
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];
|
|
21039
|
+
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];
|
|
19989
21040
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19990
21041
|
return order.code === systemOrderNo;
|
|
19991
21042
|
});
|
|
@@ -19996,29 +21047,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
19996
21047
|
}) : goodDetails;
|
|
19997
21048
|
};
|
|
19998
21049
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19999
|
-
var _typeMap$
|
|
21050
|
+
var _typeMap$type19;
|
|
20000
21051
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20001
21052
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20002
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20003
|
-
var _typeMap$
|
|
20004
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20005
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21053
|
+
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) {
|
|
21054
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21055
|
+
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;
|
|
21056
|
+
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;
|
|
20006
21057
|
return item;
|
|
20007
21058
|
});
|
|
20008
21059
|
pushGyLog('afterChangeGood', newValue);
|
|
20009
21060
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20010
21061
|
};
|
|
20011
21062
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20012
|
-
var _typeMap$
|
|
21063
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20013
21064
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20014
21065
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20015
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20016
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20017
|
-
var _typeMap$type22;
|
|
20018
|
-
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)] = [];
|
|
20019
|
-
} 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])) {
|
|
21066
|
+
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;
|
|
21067
|
+
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])) {
|
|
20020
21068
|
var _typeMap$type24;
|
|
20021
|
-
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)] =
|
|
21069
|
+
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)] = [];
|
|
21070
|
+
} 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])) {
|
|
21071
|
+
var _typeMap$type26;
|
|
21072
|
+
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({
|
|
20022
21073
|
mode: isStrict,
|
|
20023
21074
|
sysOrderNo: val
|
|
20024
21075
|
});
|
|
@@ -20027,7 +21078,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20027
21078
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20028
21079
|
};
|
|
20029
21080
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20030
|
-
var _ref12, _typeMap$
|
|
21081
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20031
21082
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20032
21083
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20033
21084
|
// 原订单商品
|
|
@@ -20035,25 +21086,19 @@ var GyReissue = function GyReissue(props) {
|
|
|
20035
21086
|
mode: isStrict
|
|
20036
21087
|
}) || [];
|
|
20037
21088
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20038
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20039
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21089
|
+
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)]) || [];
|
|
21090
|
+
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) {
|
|
20040
21091
|
return skuList.includes(item.uuid);
|
|
20041
21092
|
});
|
|
20042
|
-
console.log('商品发生变化', newValue[
|
|
21093
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20043
21094
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20044
21095
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20045
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21096
|
+
}, [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]);
|
|
20046
21097
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20047
|
-
var
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
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, {
|
|
21098
|
+
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];
|
|
21099
|
+
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]);
|
|
21100
|
+
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
21101
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20057
21102
|
gutter: 8,
|
|
20058
21103
|
wrap: true
|
|
20059
21104
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
@@ -20066,16 +21111,17 @@ var GyReissue = function GyReissue(props) {
|
|
|
20066
21111
|
}
|
|
20067
21112
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20068
21113
|
style: {
|
|
20069
|
-
marginBottom: '8px'
|
|
21114
|
+
marginBottom: '8px',
|
|
21115
|
+
width: '100%'
|
|
20070
21116
|
},
|
|
20071
21117
|
disabled: disabled,
|
|
20072
21118
|
allowClear: false,
|
|
20073
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21119
|
+
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
21120
|
onChange: function onChange(val) {
|
|
20075
21121
|
return changeSystemOrderHandle(val);
|
|
20076
21122
|
},
|
|
20077
21123
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20078
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21124
|
+
}, ((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
21125
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20080
21126
|
key: item.billNo,
|
|
20081
21127
|
value: item.billNo,
|
|
@@ -20091,12 +21137,13 @@ var GyReissue = function GyReissue(props) {
|
|
|
20091
21137
|
}
|
|
20092
21138
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20093
21139
|
style: {
|
|
20094
|
-
marginBottom: '8px'
|
|
21140
|
+
marginBottom: '8px',
|
|
21141
|
+
width: '100%'
|
|
20095
21142
|
},
|
|
20096
|
-
disabled: disabled,
|
|
21143
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20097
21144
|
allowClear: false,
|
|
20098
21145
|
options: reasonList,
|
|
20099
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21146
|
+
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
21147
|
onChange: function onChange(val) {
|
|
20101
21148
|
return changeTypeHandle(val);
|
|
20102
21149
|
}
|
|
@@ -20107,8 +21154,10 @@ var GyReissue = function GyReissue(props) {
|
|
|
20107
21154
|
disabled: disabled,
|
|
20108
21155
|
canUpdateNumber: showChangeBtn,
|
|
20109
21156
|
showChangeBtn: showChangeBtn,
|
|
21157
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
21158
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20110
21159
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20111
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21160
|
+
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)],
|
|
20112
21161
|
onChange: function onChange(val) {
|
|
20113
21162
|
return changeGoodHandle(val);
|
|
20114
21163
|
},
|
|
@@ -20123,7 +21172,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20123
21172
|
})));
|
|
20124
21173
|
};
|
|
20125
21174
|
|
|
20126
|
-
var _excluded$
|
|
21175
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20127
21176
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20128
21177
|
var typeMap$5 = {
|
|
20129
21178
|
GY_RETURN_GOODS: {
|
|
@@ -20145,14 +21194,15 @@ var typeMap$5 = {
|
|
|
20145
21194
|
}
|
|
20146
21195
|
};
|
|
20147
21196
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20148
|
-
var _typeMap$
|
|
21197
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20149
21198
|
var value = props.value,
|
|
20150
21199
|
onChange = props.onChange,
|
|
20151
21200
|
_props$reasonList = props.reasonList,
|
|
20152
21201
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20153
21202
|
disabled = props.disabled,
|
|
20154
21203
|
type = props.type,
|
|
20155
|
-
|
|
21204
|
+
isSettingConfig = props.isSettingConfig,
|
|
21205
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20156
21206
|
var valueRef = useRef({});
|
|
20157
21207
|
var getOrderFlag = useRef(false);
|
|
20158
21208
|
var _useState = useState(false),
|
|
@@ -20215,7 +21265,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20215
21265
|
while (1) switch (_context.prev = _context.next) {
|
|
20216
21266
|
case 0:
|
|
20217
21267
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20218
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21268
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20219
21269
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20220
21270
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20221
21271
|
var billNo = _ref2.billNo,
|
|
@@ -20237,10 +21287,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20237
21287
|
shopCode: shopCode
|
|
20238
21288
|
});
|
|
20239
21289
|
});
|
|
20240
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21290
|
+
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 : {}), {}, {
|
|
20241
21291
|
showOrderInfo: showOrderInfo,
|
|
20242
21292
|
orders: orders
|
|
20243
|
-
}))));
|
|
21293
|
+
})), _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)));
|
|
20244
21294
|
});
|
|
20245
21295
|
case 1:
|
|
20246
21296
|
case "end":
|
|
@@ -20253,7 +21303,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20253
21303
|
};
|
|
20254
21304
|
}();
|
|
20255
21305
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20256
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21306
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20257
21307
|
var newValue = _objectSpread2({}, value);
|
|
20258
21308
|
// 原订单商品
|
|
20259
21309
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20264,49 +21314,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20264
21314
|
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) {
|
|
20265
21315
|
return skuList.includes(item.uuid);
|
|
20266
21316
|
});
|
|
20267
|
-
console.log('商品发生变化', newValue[
|
|
21317
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20268
21318
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20269
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21319
|
+
}, [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]);
|
|
20270
21320
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20271
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21321
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20272
21322
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20273
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21323
|
+
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;
|
|
20274
21324
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20275
21325
|
var newValue = _objectSpread2({}, value);
|
|
20276
|
-
newValue[(_typeMap$
|
|
21326
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20277
21327
|
if (typeName === '1') {
|
|
20278
|
-
var _typeMap$
|
|
20279
|
-
newValue[(_typeMap$
|
|
21328
|
+
var _typeMap$type12;
|
|
21329
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20280
21330
|
mode: isStrict
|
|
20281
21331
|
});
|
|
20282
21332
|
} else if (typeName === '2') {
|
|
20283
|
-
var _typeMap$
|
|
21333
|
+
var _typeMap$type13;
|
|
20284
21334
|
// 切换到非原单,清空列表
|
|
20285
|
-
newValue[(_typeMap$
|
|
21335
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20286
21336
|
}
|
|
20287
21337
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20288
21338
|
};
|
|
20289
21339
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20290
|
-
var _typeMap$
|
|
21340
|
+
var _typeMap$type14;
|
|
20291
21341
|
var newValue = _objectSpread2({}, value);
|
|
20292
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20293
|
-
var _typeMap$
|
|
20294
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20295
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21342
|
+
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) {
|
|
21343
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21344
|
+
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;
|
|
21345
|
+
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;
|
|
20296
21346
|
return item;
|
|
20297
21347
|
});
|
|
20298
21348
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20299
21349
|
};
|
|
20300
21350
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20301
|
-
var _typeMap$
|
|
21351
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20302
21352
|
var newValue = _objectSpread2({}, value);
|
|
20303
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20304
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20305
|
-
var _typeMap$
|
|
20306
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20307
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20308
|
-
var _typeMap$
|
|
20309
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21353
|
+
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;
|
|
21354
|
+
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])) {
|
|
21355
|
+
var _typeMap$type19;
|
|
21356
|
+
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)] = [];
|
|
21357
|
+
} 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])) {
|
|
21358
|
+
var _typeMap$type21;
|
|
21359
|
+
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({
|
|
20310
21360
|
mode: isStrict,
|
|
20311
21361
|
sysOrderNo: val
|
|
20312
21362
|
});
|
|
@@ -20314,11 +21364,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20314
21364
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20315
21365
|
};
|
|
20316
21366
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20317
|
-
var _typeMap$
|
|
21367
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20318
21368
|
var mode = _ref4.mode,
|
|
20319
21369
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20320
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20321
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21370
|
+
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];
|
|
21371
|
+
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];
|
|
20322
21372
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20323
21373
|
return order.code === systemOrderNo;
|
|
20324
21374
|
});
|
|
@@ -20329,19 +21379,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20329
21379
|
}) : goodDetails;
|
|
20330
21380
|
};
|
|
20331
21381
|
var handleModeChange = function handleModeChange(mode) {
|
|
20332
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20333
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21382
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21383
|
+
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';
|
|
20334
21384
|
setIsStrict(mode);
|
|
20335
21385
|
if (!isOriginalOrder) return;
|
|
20336
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21386
|
+
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({
|
|
20337
21387
|
mode: mode
|
|
20338
21388
|
}))));
|
|
20339
21389
|
};
|
|
20340
21390
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20341
|
-
var
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
21391
|
+
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];
|
|
21392
|
+
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
21393
|
+
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]);
|
|
20345
21394
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20346
21395
|
gutter: 8,
|
|
20347
21396
|
wrap: true
|
|
@@ -20355,16 +21404,17 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20355
21404
|
}
|
|
20356
21405
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20357
21406
|
style: {
|
|
20358
|
-
marginBottom: '8px'
|
|
21407
|
+
marginBottom: '8px',
|
|
21408
|
+
width: '100%'
|
|
20359
21409
|
},
|
|
20360
21410
|
disabled: disabled,
|
|
20361
21411
|
allowClear: false,
|
|
20362
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21412
|
+
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)],
|
|
20363
21413
|
onChange: function onChange(val) {
|
|
20364
21414
|
return changeSystemOrderHandle(val);
|
|
20365
21415
|
},
|
|
20366
21416
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20367
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21417
|
+
}, ((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) {
|
|
20368
21418
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20369
21419
|
key: item.billNo,
|
|
20370
21420
|
value: item.billNo,
|
|
@@ -20380,12 +21430,13 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20380
21430
|
}
|
|
20381
21431
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20382
21432
|
style: {
|
|
20383
|
-
marginBottom: '8px'
|
|
21433
|
+
marginBottom: '8px',
|
|
21434
|
+
width: '100%'
|
|
20384
21435
|
},
|
|
20385
|
-
disabled: disabled,
|
|
21436
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20386
21437
|
allowClear: false,
|
|
20387
21438
|
options: reasonList,
|
|
20388
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21439
|
+
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)],
|
|
20389
21440
|
onChange: function onChange(val) {
|
|
20390
21441
|
return changeTypeHandle(val);
|
|
20391
21442
|
}
|
|
@@ -20397,13 +21448,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20397
21448
|
canUpdateNumber: showChangeBtn,
|
|
20398
21449
|
showChangeBtn: showChangeBtn,
|
|
20399
21450
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20400
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21451
|
+
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)],
|
|
20401
21452
|
onChange: function onChange(val) {
|
|
20402
21453
|
return changeGoodHandle(val);
|
|
20403
21454
|
},
|
|
20404
21455
|
onModeChange: handleModeChange,
|
|
20405
21456
|
isStrict: isStrict,
|
|
20406
|
-
showErpGoodsBtn:
|
|
21457
|
+
showErpGoodsBtn: showErpGoodsBtn,
|
|
21458
|
+
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20407
21459
|
tradeGoods: {
|
|
20408
21460
|
originDataSource: getGoodDetails({
|
|
20409
21461
|
mode: isStrict
|
|
@@ -20413,4 +21465,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20413
21465
|
})));
|
|
20414
21466
|
};
|
|
20415
21467
|
|
|
20416
|
-
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, 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, 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$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|
|
21468
|
+
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, 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 };
|