@kmkf-fe-packages/basic-components 2.0.54-beta.9 → 2.0.54-beta.90
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 +1809 -445
- package/dist/index.js +1808 -441
- 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/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +9 -0
- package/dist/src/common/CommonSystemOrder/index.d.ts +2 -1
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +1 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/km/KmVideo/index.d.ts +20 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
2
2
|
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
|
|
3
|
-
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -7722,7 +7722,8 @@ var Province = function Province(props) {
|
|
|
7722
7722
|
workOrder: AddressData.getInstance(),
|
|
7723
7723
|
bs: BsAddressData.getInstance(),
|
|
7724
7724
|
wdt: WdtAddressData.getInstance(),
|
|
7725
|
-
gy: GyAddressData.getInstance()
|
|
7725
|
+
gy: GyAddressData.getInstance(),
|
|
7726
|
+
km: AddressData.getInstance()
|
|
7726
7727
|
};
|
|
7727
7728
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7728
7729
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7736,8 +7737,7 @@ var Province = function Province(props) {
|
|
|
7736
7737
|
var TextArea$1 = Input.TextArea;
|
|
7737
7738
|
var ParseLogistics = function ParseLogistics(props) {
|
|
7738
7739
|
var onChange = props.onChange,
|
|
7739
|
-
_props$selfCalibratio = props.selfCalibration
|
|
7740
|
-
selfCalibration = _props$selfCalibratio === void 0 ? false : _props$selfCalibratio;
|
|
7740
|
+
_props$selfCalibratio = props.selfCalibration;
|
|
7741
7741
|
var _useState = useState(''),
|
|
7742
7742
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7743
7743
|
value = _useState2[0],
|
|
@@ -7746,26 +7746,52 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7746
7746
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7747
7747
|
isCopy = _useState4[0],
|
|
7748
7748
|
setIsCopy = _useState4[1];
|
|
7749
|
-
var handleIdentify = function handleIdentify(
|
|
7749
|
+
var handleIdentify = function handleIdentify() {
|
|
7750
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7750
7751
|
if (!value && !val) {
|
|
7751
7752
|
return;
|
|
7752
7753
|
}
|
|
7753
7754
|
var fullAddress = value || val;
|
|
7754
|
-
|
|
7755
|
+
// const needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
|
|
7755
7756
|
setIsCopy(false);
|
|
7756
7757
|
request$1({
|
|
7757
7758
|
url: '/qy/logistics/addressAnalysis',
|
|
7758
7759
|
method: 'post',
|
|
7759
7760
|
data: {
|
|
7760
|
-
fullAddress:
|
|
7761
|
+
fullAddress: fullAddress
|
|
7762
|
+
// fullAddress: needCalibration
|
|
7763
|
+
// ? `${fullAddress} 张三 18888888888`
|
|
7764
|
+
// : fullAddress,
|
|
7761
7765
|
}
|
|
7762
7766
|
}).then(function (res) {
|
|
7763
7767
|
var data = res.data;
|
|
7764
7768
|
// 如果是通过内部校准添加的姓名和手机号,则去除
|
|
7765
|
-
if (needCalibration) {
|
|
7766
|
-
|
|
7767
|
-
|
|
7769
|
+
// if (needCalibration) {
|
|
7770
|
+
// data.name = '';
|
|
7771
|
+
// data.phone = '';
|
|
7772
|
+
// }
|
|
7773
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7774
|
+
}).catch(function (e) {
|
|
7775
|
+
handleAIIdentify(fullAddress);
|
|
7776
|
+
console.log(e);
|
|
7777
|
+
});
|
|
7778
|
+
};
|
|
7779
|
+
var handleAIIdentify = function handleAIIdentify() {
|
|
7780
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7781
|
+
if (!value && !val) {
|
|
7782
|
+
return;
|
|
7783
|
+
}
|
|
7784
|
+
var fullAddress = value || val;
|
|
7785
|
+
setIsCopy(false);
|
|
7786
|
+
request$1({
|
|
7787
|
+
url: '/qy/logistics/addressAnalysis',
|
|
7788
|
+
method: 'post',
|
|
7789
|
+
data: {
|
|
7790
|
+
fullAddress: fullAddress,
|
|
7791
|
+
isAiParse: true
|
|
7768
7792
|
}
|
|
7793
|
+
}).then(function (res) {
|
|
7794
|
+
var data = res.data;
|
|
7769
7795
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7770
7796
|
}).catch(function (e) {
|
|
7771
7797
|
console.log(e);
|
|
@@ -7796,9 +7822,15 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7796
7822
|
size: "small",
|
|
7797
7823
|
type: "primary",
|
|
7798
7824
|
onClick: function onClick() {
|
|
7799
|
-
return handleIdentify(
|
|
7825
|
+
return handleIdentify();
|
|
7800
7826
|
}
|
|
7801
|
-
}, "\
|
|
7827
|
+
}, "\u4E00\u952E\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
7828
|
+
size: "small",
|
|
7829
|
+
type: "primary",
|
|
7830
|
+
onClick: function onClick() {
|
|
7831
|
+
return handleAIIdentify();
|
|
7832
|
+
}
|
|
7833
|
+
}, "AI\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
7802
7834
|
size: "small",
|
|
7803
7835
|
onClick: function onClick() {
|
|
7804
7836
|
return setValue('');
|
|
@@ -7828,6 +7860,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7828
7860
|
bs: BsAddressData,
|
|
7829
7861
|
wdt: WdtAddressData,
|
|
7830
7862
|
gy: GyAddressData,
|
|
7863
|
+
km: AddressData,
|
|
7831
7864
|
workOrder: AddressData
|
|
7832
7865
|
}[type] || AddressData).getInstance();
|
|
7833
7866
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -8131,17 +8164,16 @@ var SubForm = function SubForm(props) {
|
|
|
8131
8164
|
return [{
|
|
8132
8165
|
dataIndex: 'index',
|
|
8133
8166
|
title: '序号',
|
|
8167
|
+
fixed: 'left',
|
|
8168
|
+
width: 20,
|
|
8134
8169
|
render: function render(val, record, index) {
|
|
8135
|
-
return
|
|
8136
|
-
style: {
|
|
8137
|
-
width: 25
|
|
8138
|
-
}
|
|
8139
|
-
}, index + 1);
|
|
8170
|
+
return index + 1;
|
|
8140
8171
|
}
|
|
8141
8172
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8142
8173
|
return {
|
|
8143
8174
|
dataIndex: t.key,
|
|
8144
|
-
title: t.name
|
|
8175
|
+
title: t.name,
|
|
8176
|
+
width: 90
|
|
8145
8177
|
};
|
|
8146
8178
|
})));
|
|
8147
8179
|
}, [newTableHeader]);
|
|
@@ -8329,7 +8361,7 @@ var SubForm = function SubForm(props) {
|
|
|
8329
8361
|
onScrollCapture: onScrollCapture,
|
|
8330
8362
|
style: {
|
|
8331
8363
|
height: 320,
|
|
8332
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8364
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8333
8365
|
overflowY: 'scroll',
|
|
8334
8366
|
overflowX: 'auto'
|
|
8335
8367
|
}
|
|
@@ -8340,7 +8372,7 @@ var SubForm = function SubForm(props) {
|
|
|
8340
8372
|
size: "small",
|
|
8341
8373
|
pagination: false,
|
|
8342
8374
|
scroll: {
|
|
8343
|
-
x: '
|
|
8375
|
+
x: 'max-content'
|
|
8344
8376
|
},
|
|
8345
8377
|
locale: {
|
|
8346
8378
|
emptyText: '暂无数据'
|
|
@@ -8713,7 +8745,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8713
8745
|
changeSku = props.changeSku,
|
|
8714
8746
|
width = props.width,
|
|
8715
8747
|
_props$numIidType = props.numIidType,
|
|
8716
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8748
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8749
|
+
form = props.form,
|
|
8750
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8717
8751
|
var _useState = useState([]),
|
|
8718
8752
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8719
8753
|
selectList = _useState2[0],
|
|
@@ -8726,10 +8760,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8726
8760
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8727
8761
|
goodList = _useState6[0],
|
|
8728
8762
|
setGoodList = _useState6[1];
|
|
8729
|
-
var _useState7 = useState(
|
|
8763
|
+
var _useState7 = useState([]),
|
|
8730
8764
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8731
|
-
|
|
8732
|
-
|
|
8765
|
+
orderNoItems = _useState8[0],
|
|
8766
|
+
setOrderNoItems = _useState8[1];
|
|
8767
|
+
var _useState9 = useState(false),
|
|
8768
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8769
|
+
loading = _useState10[0],
|
|
8770
|
+
setLoading = _useState10[1];
|
|
8733
8771
|
var transformIdType = function transformIdType(id) {
|
|
8734
8772
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8735
8773
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8749,7 +8787,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8749
8787
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8750
8788
|
return setGoodList(list.map(transformType));
|
|
8751
8789
|
};
|
|
8752
|
-
var
|
|
8790
|
+
var _useState11 = useState({
|
|
8753
8791
|
apiName: 'queryItems',
|
|
8754
8792
|
desc: true,
|
|
8755
8793
|
numIids: '',
|
|
@@ -8761,30 +8799,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8799
|
cids: '',
|
|
8762
8800
|
title: ''
|
|
8763
8801
|
}),
|
|
8764
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8765
|
-
searchParams = _useState10[0],
|
|
8766
|
-
setSearch = _useState10[1];
|
|
8767
|
-
var _useState11 = useState(0),
|
|
8768
8802
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
var _useState13 = useState(
|
|
8803
|
+
searchParams = _useState12[0],
|
|
8804
|
+
setSearch = _useState12[1];
|
|
8805
|
+
var _useState13 = useState(0),
|
|
8772
8806
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
var _useState15 = useState(
|
|
8807
|
+
total = _useState14[0],
|
|
8808
|
+
setTotal = _useState14[1];
|
|
8809
|
+
var _useState15 = useState(''),
|
|
8776
8810
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
var _useState17 = useState(
|
|
8811
|
+
platform = _useState16[0],
|
|
8812
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8813
|
+
var _useState17 = useState({}),
|
|
8780
8814
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState19 = useState(
|
|
8815
|
+
shopInfo = _useState18[0],
|
|
8816
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8817
|
+
var _useState19 = useState(true),
|
|
8784
8818
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState21 = useState([
|
|
8819
|
+
canSearch = _useState20[0],
|
|
8820
|
+
setCanSearch = _useState20[1];
|
|
8821
|
+
var _useState21 = useState([null]),
|
|
8822
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8823
|
+
nextKeyList = _useState22[0],
|
|
8824
|
+
setNextKeyList = _useState22[1];
|
|
8825
|
+
var _useState23 = useState([{
|
|
8788
8826
|
tab: '出售中',
|
|
8789
8827
|
key: 'onSale'
|
|
8790
8828
|
}, {
|
|
@@ -8794,10 +8832,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8794
8832
|
tab: '已选择',
|
|
8795
8833
|
key: 'select'
|
|
8796
8834
|
}]),
|
|
8797
|
-
|
|
8798
|
-
tabs =
|
|
8799
|
-
setTabs =
|
|
8800
|
-
var
|
|
8835
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8836
|
+
tabs = _useState24[0],
|
|
8837
|
+
setTabs = _useState24[1];
|
|
8838
|
+
var _useState25 = useState([{
|
|
8801
8839
|
name: '上架时间',
|
|
8802
8840
|
value: 'list_time'
|
|
8803
8841
|
}, {
|
|
@@ -8807,13 +8845,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8807
8845
|
name: '按价格',
|
|
8808
8846
|
value: 'price'
|
|
8809
8847
|
}]),
|
|
8810
|
-
|
|
8811
|
-
goodSort =
|
|
8848
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8849
|
+
goodSort = _useState26[0];
|
|
8812
8850
|
//宝贝分类
|
|
8813
|
-
var
|
|
8814
|
-
|
|
8815
|
-
shell =
|
|
8816
|
-
setShell =
|
|
8851
|
+
var _useState27 = useState([]),
|
|
8852
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8853
|
+
shell = _useState28[0],
|
|
8854
|
+
setShell = _useState28[1];
|
|
8817
8855
|
var clickOrder = function clickOrder(sort) {
|
|
8818
8856
|
if (sort.value === searchParams.orderBy) {
|
|
8819
8857
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9086,8 +9124,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9086
9124
|
}
|
|
9087
9125
|
}, [platform]);
|
|
9088
9126
|
useEffect(function () {
|
|
9089
|
-
platform && canSearch
|
|
9127
|
+
if (platform && canSearch) {
|
|
9128
|
+
if (searchParams.type === 'orderProduct') {
|
|
9129
|
+
getOrderProductItem(searchParams);
|
|
9130
|
+
} else {
|
|
9131
|
+
getItem(searchParams, platform);
|
|
9132
|
+
}
|
|
9133
|
+
}
|
|
9090
9134
|
}, [searchParams, platform]);
|
|
9135
|
+
useEffect(function () {
|
|
9136
|
+
if (visible && platform !== 'fxg') {
|
|
9137
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9138
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9139
|
+
if (orderNo) {
|
|
9140
|
+
setTabs(function (prev) {
|
|
9141
|
+
return uniqBy([{
|
|
9142
|
+
tab: '订单商品',
|
|
9143
|
+
key: 'orderProduct'
|
|
9144
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9145
|
+
});
|
|
9146
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9147
|
+
setSearch(function (prev) {
|
|
9148
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9149
|
+
type: 'orderProduct'
|
|
9150
|
+
});
|
|
9151
|
+
});
|
|
9152
|
+
}
|
|
9153
|
+
}
|
|
9154
|
+
}
|
|
9155
|
+
if (!visible) {
|
|
9156
|
+
setOrderNoItems([]);
|
|
9157
|
+
}
|
|
9158
|
+
}, [visible]);
|
|
9159
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9160
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9161
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9162
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9163
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9164
|
+
case 0:
|
|
9165
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9166
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9167
|
+
if (orderNo) {
|
|
9168
|
+
_context2.next = 4;
|
|
9169
|
+
break;
|
|
9170
|
+
}
|
|
9171
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9172
|
+
case 4:
|
|
9173
|
+
if (orderNoItems.length) {
|
|
9174
|
+
_context2.next = 20;
|
|
9175
|
+
break;
|
|
9176
|
+
}
|
|
9177
|
+
_context2.prev = 5;
|
|
9178
|
+
setLoading(true);
|
|
9179
|
+
_context2.next = 9;
|
|
9180
|
+
return servers.orderDetail({
|
|
9181
|
+
shopId: shopId,
|
|
9182
|
+
orderNo: orderNo
|
|
9183
|
+
});
|
|
9184
|
+
case 9:
|
|
9185
|
+
res = _context2.sent;
|
|
9186
|
+
if (res.success) {
|
|
9187
|
+
_context2.next = 14;
|
|
9188
|
+
break;
|
|
9189
|
+
}
|
|
9190
|
+
handleSetGoodList([]);
|
|
9191
|
+
message.warn(res.message);
|
|
9192
|
+
return _context2.abrupt("return");
|
|
9193
|
+
case 14:
|
|
9194
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9195
|
+
items = res.data.itemList;
|
|
9196
|
+
totalCount = items.length;
|
|
9197
|
+
items.forEach(function (item) {
|
|
9198
|
+
item.platform = platform;
|
|
9199
|
+
});
|
|
9200
|
+
setOrderNoItems(items);
|
|
9201
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9202
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9203
|
+
setTotal(totalCount);
|
|
9204
|
+
}
|
|
9205
|
+
case 15:
|
|
9206
|
+
_context2.prev = 15;
|
|
9207
|
+
setLoading(false);
|
|
9208
|
+
return _context2.finish(15);
|
|
9209
|
+
case 18:
|
|
9210
|
+
_context2.next = 26;
|
|
9211
|
+
break;
|
|
9212
|
+
case 20:
|
|
9213
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9214
|
+
title = params.title;
|
|
9215
|
+
if (platform !== 'taobao') {
|
|
9216
|
+
title = params.numIids;
|
|
9217
|
+
}
|
|
9218
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9219
|
+
return item.title.includes(title.trim());
|
|
9220
|
+
}) : orderNoItems;
|
|
9221
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9222
|
+
setTotal(_items.length);
|
|
9223
|
+
case 26:
|
|
9224
|
+
case "end":
|
|
9225
|
+
return _context2.stop();
|
|
9226
|
+
}
|
|
9227
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9228
|
+
}));
|
|
9229
|
+
return function getOrderProductItem(_x2) {
|
|
9230
|
+
return _ref4.apply(this, arguments);
|
|
9231
|
+
};
|
|
9232
|
+
}();
|
|
9091
9233
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
9092
9234
|
title: '选择宝贝',
|
|
9093
9235
|
okText: '确认',
|
|
@@ -9121,7 +9263,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9121
9263
|
style: {
|
|
9122
9264
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9123
9265
|
}
|
|
9124
|
-
}, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9266
|
+
}, /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9125
9267
|
value: searchParams.orderBy,
|
|
9126
9268
|
onChange: function onChange(e) {
|
|
9127
9269
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9137,7 +9279,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9137
9279
|
},
|
|
9138
9280
|
key: sort.value
|
|
9139
9281
|
}, 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, {
|
|
9282
|
+
}))), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Select, {
|
|
9141
9283
|
className: "classify",
|
|
9142
9284
|
value: searchParams.cids,
|
|
9143
9285
|
onChange: function onChange(value) {
|
|
@@ -9152,7 +9294,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9152
9294
|
key: item.value
|
|
9153
9295
|
}, item.label);
|
|
9154
9296
|
})), /*#__PURE__*/React.createElement(Search, {
|
|
9155
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9297
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9156
9298
|
// enterButton="搜索"
|
|
9157
9299
|
className: "search",
|
|
9158
9300
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9775,7 +9917,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9775
9917
|
userNick = props.userNick,
|
|
9776
9918
|
disabled = props.disabled,
|
|
9777
9919
|
changeSku = props.changeSku,
|
|
9778
|
-
width = props.width
|
|
9920
|
+
width = props.width,
|
|
9921
|
+
form = props.form,
|
|
9922
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9779
9923
|
var shopId = value.shopId,
|
|
9780
9924
|
imgList = value.imgList;
|
|
9781
9925
|
var _useState = useState(false),
|
|
@@ -9866,7 +10010,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9866
10010
|
var onSubmit = /*#__PURE__*/function () {
|
|
9867
10011
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9868
10012
|
var _list$;
|
|
9869
|
-
var newList, newImgList;
|
|
10013
|
+
var newList, newImgList, _list$2;
|
|
9870
10014
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9871
10015
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9872
10016
|
case 0:
|
|
@@ -9888,7 +10032,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9888
10032
|
// if (type === 1) {
|
|
9889
10033
|
// params.outerId = item.outerId; //编码
|
|
9890
10034
|
// }
|
|
9891
|
-
|
|
10035
|
+
//返填商品属性 && 为订单商品
|
|
10036
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10037
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10038
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10039
|
+
} else if (changeSku) {
|
|
9892
10040
|
params.propertiesName = '';
|
|
9893
10041
|
}
|
|
9894
10042
|
// if (type === 4) {
|
|
@@ -9907,7 +10055,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9907
10055
|
imgList: newImgList
|
|
9908
10056
|
});
|
|
9909
10057
|
setVisible(false);
|
|
9910
|
-
|
|
10058
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10059
|
+
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);
|
|
10060
|
+
}
|
|
9911
10061
|
case 5:
|
|
9912
10062
|
case "end":
|
|
9913
10063
|
return _context2.stop();
|
|
@@ -10164,6 +10314,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10164
10314
|
shopId: shopId,
|
|
10165
10315
|
maxLength: maxLength,
|
|
10166
10316
|
changeSku: changeSku,
|
|
10317
|
+
form: form,
|
|
10318
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10167
10319
|
onCancel: function onCancel() {
|
|
10168
10320
|
setVisible(false);
|
|
10169
10321
|
}
|
|
@@ -10962,7 +11114,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10962
11114
|
}
|
|
10963
11115
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
10964
11116
|
label: '发件人手机号',
|
|
10965
|
-
required
|
|
11117
|
+
// required={true}
|
|
10966
11118
|
key: 'interceptSenderMobile',
|
|
10967
11119
|
hidden: !showSenderMobile
|
|
10968
11120
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -10991,7 +11143,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10991
11143
|
value: item.uk
|
|
10992
11144
|
}, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
10993
11145
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
10994
|
-
label: '
|
|
11146
|
+
label: '修改后派送地址',
|
|
10995
11147
|
required: true,
|
|
10996
11148
|
key: 'newAddress',
|
|
10997
11149
|
hidden: !showNewAddress
|
|
@@ -11142,7 +11294,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11142
11294
|
_props$value = props.value,
|
|
11143
11295
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11144
11296
|
disabled = props.disabled,
|
|
11145
|
-
onChange = props.onChange
|
|
11297
|
+
onChange = props.onChange,
|
|
11298
|
+
_props$isSingle = props.isSingle,
|
|
11299
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11300
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11301
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11146
11302
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11147
11303
|
var val = e.target.value;
|
|
11148
11304
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11153,13 +11309,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11153
11309
|
}));
|
|
11154
11310
|
handleSearchSnapshot(val);
|
|
11155
11311
|
};
|
|
11312
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11313
|
+
var _value$trajectoryApiS;
|
|
11314
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11315
|
+
trajectoryApiStatus: {
|
|
11316
|
+
status: val,
|
|
11317
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11318
|
+
}
|
|
11319
|
+
});
|
|
11320
|
+
onChange(newVal);
|
|
11321
|
+
};
|
|
11156
11322
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11157
11323
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11158
11324
|
trajectoryCode = value.trajectoryCode,
|
|
11159
11325
|
trajectoryPhone = value.trajectoryPhone;
|
|
11160
11326
|
var newCompany = company ? company : trajectoryCompany;
|
|
11161
11327
|
//不展示拦截状态不请求
|
|
11162
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11328
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11163
11329
|
return;
|
|
11164
11330
|
}
|
|
11165
11331
|
if (disabled) {
|
|
@@ -11184,13 +11350,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11184
11350
|
data = res.data,
|
|
11185
11351
|
msg = res.message;
|
|
11186
11352
|
if (result === 100 || success) {
|
|
11187
|
-
|
|
11188
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11353
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11189
11354
|
trajectoryCompany: newCompany
|
|
11190
|
-
})
|
|
11355
|
+
});
|
|
11356
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11357
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11358
|
+
onChange(newValue);
|
|
11191
11359
|
} else {
|
|
11192
11360
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11193
11361
|
trajectorySnapshot: '',
|
|
11362
|
+
trajectoryApiStatus: {
|
|
11363
|
+
reason: '',
|
|
11364
|
+
status: ''
|
|
11365
|
+
},
|
|
11194
11366
|
trajectoryCompany: newCompany
|
|
11195
11367
|
}));
|
|
11196
11368
|
msg && message.error(msg);
|
|
@@ -11199,6 +11371,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11199
11371
|
} catch (err) {
|
|
11200
11372
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11201
11373
|
trajectorySnapshot: '',
|
|
11374
|
+
trajectoryApiStatus: {
|
|
11375
|
+
reason: '',
|
|
11376
|
+
status: ''
|
|
11377
|
+
},
|
|
11202
11378
|
trajectoryCompany: newCompany
|
|
11203
11379
|
}));
|
|
11204
11380
|
(err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11252,6 +11428,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11252
11428
|
}
|
|
11253
11429
|
});
|
|
11254
11430
|
};
|
|
11431
|
+
// 接口状态
|
|
11432
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11433
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11434
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
11435
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11436
|
+
disabled: true,
|
|
11437
|
+
style: {
|
|
11438
|
+
width: '100%',
|
|
11439
|
+
marginTop: '8px'
|
|
11440
|
+
},
|
|
11441
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11442
|
+
onChange: handleStatusChange,
|
|
11443
|
+
options: [{
|
|
11444
|
+
label: '成功',
|
|
11445
|
+
value: '成功'
|
|
11446
|
+
}, {
|
|
11447
|
+
label: '失败',
|
|
11448
|
+
value: '失败'
|
|
11449
|
+
}]
|
|
11450
|
+
}), (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", {
|
|
11451
|
+
style: {
|
|
11452
|
+
color: 'red'
|
|
11453
|
+
}
|
|
11454
|
+
}, "\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);
|
|
11455
|
+
};
|
|
11255
11456
|
//物流快照
|
|
11256
11457
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11257
11458
|
return /*#__PURE__*/React.createElement(Input, {
|
|
@@ -11266,7 +11467,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11266
11467
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11267
11468
|
});
|
|
11268
11469
|
};
|
|
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);
|
|
11470
|
+
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
11471
|
};
|
|
11271
11472
|
|
|
11272
11473
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11479,7 +11680,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11479
11680
|
disabled: disabled,
|
|
11480
11681
|
onChange: function onChange(val) {
|
|
11481
11682
|
return handleChange(val, changeIndex);
|
|
11482
|
-
}
|
|
11683
|
+
},
|
|
11684
|
+
isSingle: false
|
|
11483
11685
|
}));
|
|
11484
11686
|
};
|
|
11485
11687
|
|
|
@@ -11502,7 +11704,7 @@ var typeInitValueMap = {
|
|
|
11502
11704
|
}]
|
|
11503
11705
|
};
|
|
11504
11706
|
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;
|
|
11707
|
+
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
11708
|
var _props$value = props.value,
|
|
11507
11709
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11508
11710
|
onChange = props.onChange,
|
|
@@ -11610,7 +11812,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11610
11812
|
onChange: function onChange(val) {
|
|
11611
11813
|
changeInputHandle(val, 'logisticsCompany');
|
|
11612
11814
|
},
|
|
11613
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false)
|
|
11815
|
+
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
11816
|
showSearch: true,
|
|
11615
11817
|
dropdownMatchSelectWidth: false,
|
|
11616
11818
|
filterOption: function filterOption(input, option) {
|
|
@@ -11627,28 +11829,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
11627
11829
|
onChange: function onChange(e) {
|
|
11628
11830
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11629
11831
|
},
|
|
11630
|
-
value: (_value$
|
|
11832
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11631
11833
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11632
11834
|
disabled: disabled,
|
|
11633
11835
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11634
11836
|
onChange: function onChange(e) {
|
|
11635
11837
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11636
11838
|
},
|
|
11637
|
-
value: (_value$
|
|
11839
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11638
11840
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11639
11841
|
disabled: disabled,
|
|
11640
11842
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11641
11843
|
onChange: function onChange(e) {
|
|
11642
11844
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11643
11845
|
},
|
|
11644
|
-
value: (_value$
|
|
11846
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11645
11847
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11646
11848
|
disabled: disabled,
|
|
11647
11849
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11648
11850
|
onChange: function onChange(e) {
|
|
11649
11851
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11650
11852
|
},
|
|
11651
|
-
value: (_value$
|
|
11853
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11652
11854
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11653
11855
|
style: {
|
|
11654
11856
|
minWidth: '100px',
|
|
@@ -11659,7 +11861,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11659
11861
|
showSearch: true,
|
|
11660
11862
|
options: sendOptions,
|
|
11661
11863
|
filterOption: filterOption,
|
|
11662
|
-
value: ((_value$
|
|
11864
|
+
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
11865
|
onChange: function onChange(value, option) {
|
|
11664
11866
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11665
11867
|
}
|
|
@@ -11669,14 +11871,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11669
11871
|
onChange: function onChange(e) {
|
|
11670
11872
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11671
11873
|
},
|
|
11672
|
-
value: (_value$
|
|
11874
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11673
11875
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11674
11876
|
disabled: disabled,
|
|
11675
11877
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11676
11878
|
onChange: function onChange(e) {
|
|
11677
11879
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11678
11880
|
},
|
|
11679
|
-
value: (_value$
|
|
11881
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11680
11882
|
})) : null) : null);
|
|
11681
11883
|
};
|
|
11682
11884
|
|
|
@@ -12243,7 +12445,7 @@ var gyColumns = [{
|
|
|
12243
12445
|
}, {
|
|
12244
12446
|
dataIndex: 'specNo',
|
|
12245
12447
|
title: 'SKU编码',
|
|
12246
|
-
width:
|
|
12448
|
+
width: 150,
|
|
12247
12449
|
ellipsis: true
|
|
12248
12450
|
}, {
|
|
12249
12451
|
dataIndex: 'goodName',
|
|
@@ -12254,11 +12456,11 @@ var gyColumns = [{
|
|
|
12254
12456
|
dataIndex: 'goodShortName',
|
|
12255
12457
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12256
12458
|
ellipsis: true,
|
|
12257
|
-
width:
|
|
12459
|
+
width: 150
|
|
12258
12460
|
}, {
|
|
12259
12461
|
dataIndex: 'goodNo',
|
|
12260
12462
|
title: '商品编码',
|
|
12261
|
-
width:
|
|
12463
|
+
width: 150,
|
|
12262
12464
|
ellipsis: true
|
|
12263
12465
|
}, {
|
|
12264
12466
|
dataIndex: 'goodPicUrl',
|
|
@@ -12531,12 +12733,144 @@ var bse3Columns = [{
|
|
|
12531
12733
|
width: 100
|
|
12532
12734
|
}];
|
|
12533
12735
|
|
|
12736
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12737
|
+
if (!isBoolean(val)) return null;
|
|
12738
|
+
return val ? '是' : '否';
|
|
12739
|
+
};
|
|
12740
|
+
var kmColumns = [{
|
|
12741
|
+
dataIndex: 'goodName',
|
|
12742
|
+
title: '商品名称',
|
|
12743
|
+
width: 250,
|
|
12744
|
+
ellipsis: true
|
|
12745
|
+
}, {
|
|
12746
|
+
dataIndex: 'goodNo',
|
|
12747
|
+
title: '商品编码',
|
|
12748
|
+
width: 150,
|
|
12749
|
+
ellipsis: true
|
|
12750
|
+
}, {
|
|
12751
|
+
dataIndex: 'goodId',
|
|
12752
|
+
title: '商品ID',
|
|
12753
|
+
width: 200,
|
|
12754
|
+
ellipsis: true
|
|
12755
|
+
}, {
|
|
12756
|
+
dataIndex: 'goodPicUrl',
|
|
12757
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12758
|
+
width: 150,
|
|
12759
|
+
render: function render(val) {
|
|
12760
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12761
|
+
width: 60,
|
|
12762
|
+
src: val
|
|
12763
|
+
});
|
|
12764
|
+
}
|
|
12765
|
+
}, {
|
|
12766
|
+
dataIndex: 'goodShortName',
|
|
12767
|
+
title: '商品简称',
|
|
12768
|
+
width: 200,
|
|
12769
|
+
ellipsis: true
|
|
12770
|
+
}, {
|
|
12771
|
+
dataIndex: 'goodBarcode',
|
|
12772
|
+
title: '商品条码',
|
|
12773
|
+
width: 200,
|
|
12774
|
+
ellipsis: true
|
|
12775
|
+
}, {
|
|
12776
|
+
dataIndex: 'brandName',
|
|
12777
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12778
|
+
ellipsis: true,
|
|
12779
|
+
width: 150
|
|
12780
|
+
}, {
|
|
12781
|
+
dataIndex: 'skuType',
|
|
12782
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12783
|
+
ellipsis: true,
|
|
12784
|
+
width: 150
|
|
12785
|
+
}, {
|
|
12786
|
+
dataIndex: 'specName',
|
|
12787
|
+
title: "SKU\u540D\u79F0",
|
|
12788
|
+
ellipsis: true,
|
|
12789
|
+
width: 150
|
|
12790
|
+
}, {
|
|
12791
|
+
dataIndex: 'specNo',
|
|
12792
|
+
title: "SKU\u7F16\u7801",
|
|
12793
|
+
ellipsis: true,
|
|
12794
|
+
width: 150
|
|
12795
|
+
}, {
|
|
12796
|
+
dataIndex: 'specId',
|
|
12797
|
+
title: "SKU ID",
|
|
12798
|
+
ellipsis: true,
|
|
12799
|
+
width: 150
|
|
12800
|
+
}, {
|
|
12801
|
+
dataIndex: 'propertiesValue',
|
|
12802
|
+
title: "\u89C4\u683C\u503C",
|
|
12803
|
+
ellipsis: true,
|
|
12804
|
+
width: 150
|
|
12805
|
+
}, {
|
|
12806
|
+
dataIndex: 'skuShortTitle',
|
|
12807
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12808
|
+
ellipsis: true,
|
|
12809
|
+
width: 150
|
|
12810
|
+
}, {
|
|
12811
|
+
dataIndex: 'specBarcode',
|
|
12812
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12813
|
+
ellipsis: true,
|
|
12814
|
+
width: 150
|
|
12815
|
+
}, {
|
|
12816
|
+
dataIndex: 'specImgUrl',
|
|
12817
|
+
title: "SKU \u56FE\u7247",
|
|
12818
|
+
ellipsis: true,
|
|
12819
|
+
width: 150,
|
|
12820
|
+
render: function render(val) {
|
|
12821
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12822
|
+
width: 60,
|
|
12823
|
+
src: val
|
|
12824
|
+
});
|
|
12825
|
+
}
|
|
12826
|
+
}, {
|
|
12827
|
+
dataIndex: 'isGift',
|
|
12828
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12829
|
+
ellipsis: true,
|
|
12830
|
+
width: 150,
|
|
12831
|
+
render: function render(val) {
|
|
12832
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12833
|
+
}
|
|
12834
|
+
}, {
|
|
12835
|
+
dataIndex: 'isVirtual',
|
|
12836
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12837
|
+
ellipsis: true,
|
|
12838
|
+
width: 150,
|
|
12839
|
+
render: function render(val) {
|
|
12840
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12841
|
+
}
|
|
12842
|
+
}, {
|
|
12843
|
+
dataIndex: 'isSkuItem',
|
|
12844
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12845
|
+
ellipsis: true,
|
|
12846
|
+
width: 150,
|
|
12847
|
+
render: function render(val) {
|
|
12848
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12849
|
+
}
|
|
12850
|
+
}, {
|
|
12851
|
+
dataIndex: 'marketPrice',
|
|
12852
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12853
|
+
ellipsis: true,
|
|
12854
|
+
width: 150
|
|
12855
|
+
}, {
|
|
12856
|
+
dataIndex: 'retailPrice',
|
|
12857
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12858
|
+
ellipsis: true,
|
|
12859
|
+
width: 150
|
|
12860
|
+
}, {
|
|
12861
|
+
dataIndex: 'costPrice',
|
|
12862
|
+
title: "\u6210\u672C\u4EF7",
|
|
12863
|
+
ellipsis: true,
|
|
12864
|
+
width: 150
|
|
12865
|
+
}];
|
|
12866
|
+
|
|
12534
12867
|
var getColumnsMap = function getColumnsMap() {
|
|
12535
12868
|
return cloneDeep({
|
|
12536
12869
|
gy: gyColumns,
|
|
12537
12870
|
jst: jstColumns,
|
|
12538
12871
|
wdt: wdtColumns,
|
|
12539
|
-
bse3: bse3Columns
|
|
12872
|
+
bse3: bse3Columns,
|
|
12873
|
+
km: kmColumns
|
|
12540
12874
|
});
|
|
12541
12875
|
};
|
|
12542
12876
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -13486,23 +13820,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13486
13820
|
};
|
|
13487
13821
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
13488
13822
|
|
|
13823
|
+
var rowCheckKey = 'id';
|
|
13489
13824
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13490
13825
|
var current = _ref.current,
|
|
13491
13826
|
pageSize = _ref.pageSize;
|
|
13492
|
-
var data = {
|
|
13493
|
-
goodShortName: formData.goodShortName || null,
|
|
13494
|
-
skuName: formData.skuName || null,
|
|
13495
|
-
skuCode: formData.skuCode || null,
|
|
13496
|
-
goodName: formData.goodName || null,
|
|
13497
|
-
goodNo: formData.goodNo || null
|
|
13498
|
-
};
|
|
13499
13827
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13500
13828
|
method: 'post',
|
|
13501
13829
|
data: _objectSpread2({
|
|
13502
13830
|
pageSize: pageSize,
|
|
13503
13831
|
pageNo: current,
|
|
13504
|
-
platform: '
|
|
13505
|
-
},
|
|
13832
|
+
platform: 'KM_ERP'
|
|
13833
|
+
}, formData)
|
|
13506
13834
|
}).then(function (res) {
|
|
13507
13835
|
var _res$data = res.data,
|
|
13508
13836
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13519,22 +13847,19 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13519
13847
|
});
|
|
13520
13848
|
};
|
|
13521
13849
|
var searchFormData$2 = [{
|
|
13522
|
-
label: '
|
|
13523
|
-
name: '
|
|
13850
|
+
label: '商品名称',
|
|
13851
|
+
name: 'goodName'
|
|
13524
13852
|
}, {
|
|
13525
|
-
label: '
|
|
13853
|
+
label: '商品编码',
|
|
13854
|
+
name: 'goodNo'
|
|
13855
|
+
}, {
|
|
13856
|
+
label: 'SKU名称',
|
|
13526
13857
|
name: 'skuName',
|
|
13527
13858
|
dataIndex: 'specName'
|
|
13528
13859
|
}, {
|
|
13529
|
-
label: '
|
|
13860
|
+
label: 'SKU编码',
|
|
13530
13861
|
name: 'skuCode',
|
|
13531
13862
|
dataIndex: 'specNo'
|
|
13532
|
-
}, {
|
|
13533
|
-
label: '商品名称',
|
|
13534
|
-
name: 'goodName'
|
|
13535
|
-
}, {
|
|
13536
|
-
label: '商品编码',
|
|
13537
|
-
name: 'goodNo'
|
|
13538
13863
|
}];
|
|
13539
13864
|
var GoodList$3 = function GoodList(props, ref) {
|
|
13540
13865
|
var _useState = useState([]),
|
|
@@ -13545,7 +13870,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13545
13870
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13546
13871
|
selectIds = _useState4[0],
|
|
13547
13872
|
setSelectIds = _useState4[1];
|
|
13548
|
-
var _useGetColumns = useGetColumns('
|
|
13873
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13549
13874
|
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13550
13875
|
columns = _useGetColumns2[0],
|
|
13551
13876
|
showColumnsDataIndexList = _useGetColumns2[1],
|
|
@@ -13574,29 +13899,280 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13574
13899
|
fixed: true,
|
|
13575
13900
|
onSelect: function onSelect(record, selected) {
|
|
13576
13901
|
if (selected) {
|
|
13577
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record
|
|
13902
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13578
13903
|
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13579
13904
|
} else {
|
|
13580
13905
|
setSelectIds(selectIds.filter(function (t) {
|
|
13581
|
-
return t !== record
|
|
13906
|
+
return t !== record[rowCheckKey];
|
|
13582
13907
|
}));
|
|
13583
13908
|
setSelect(selectList.filter(function (t) {
|
|
13584
|
-
return t
|
|
13909
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13585
13910
|
}));
|
|
13586
13911
|
}
|
|
13587
13912
|
},
|
|
13588
13913
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13589
13914
|
if (selected) {
|
|
13590
13915
|
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13591
|
-
return t
|
|
13916
|
+
return t[rowCheckKey];
|
|
13592
13917
|
}))));
|
|
13593
13918
|
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13594
13919
|
} else {
|
|
13595
13920
|
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
13596
|
-
return t
|
|
13921
|
+
return t[rowCheckKey];
|
|
13597
13922
|
})));
|
|
13598
13923
|
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13599
|
-
return arrVal
|
|
13924
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13925
|
+
});
|
|
13926
|
+
setSelect(list);
|
|
13927
|
+
}
|
|
13928
|
+
},
|
|
13929
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13930
|
+
var options = {
|
|
13931
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13932
|
+
return row[rowCheckKey] || row.skuId;
|
|
13933
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13934
|
+
name: record[rowCheckKey]
|
|
13935
|
+
};
|
|
13936
|
+
return options;
|
|
13937
|
+
}
|
|
13938
|
+
};
|
|
13939
|
+
var showTable = function showTable() {
|
|
13940
|
+
var handleDelete = function handleDelete(record) {
|
|
13941
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13942
|
+
return t !== record[rowCheckKey];
|
|
13943
|
+
}));
|
|
13944
|
+
setSelect(selectList.filter(function (t) {
|
|
13945
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13946
|
+
}));
|
|
13947
|
+
};
|
|
13948
|
+
var showColumns = [{
|
|
13949
|
+
dataIndex: '',
|
|
13950
|
+
title: "\u64CD\u4F5C",
|
|
13951
|
+
ellipsis: true,
|
|
13952
|
+
width: 100,
|
|
13953
|
+
render: function render(val, record) {
|
|
13954
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
13955
|
+
type: "link",
|
|
13956
|
+
onClick: function onClick() {
|
|
13957
|
+
return handleDelete(record);
|
|
13958
|
+
}
|
|
13959
|
+
}, "\u5220\u9664");
|
|
13960
|
+
}
|
|
13961
|
+
}].concat(takeRight(columns, columns.length - 1));
|
|
13962
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
13963
|
+
style: {
|
|
13964
|
+
width: '100%',
|
|
13965
|
+
maxWidth: '387px'
|
|
13966
|
+
}
|
|
13967
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
13968
|
+
columns: showColumns,
|
|
13969
|
+
rowKey: rowCheckKey,
|
|
13970
|
+
dataSource: selectList,
|
|
13971
|
+
scroll: {
|
|
13972
|
+
x: '100%',
|
|
13973
|
+
y: 250
|
|
13974
|
+
},
|
|
13975
|
+
pagination: {
|
|
13976
|
+
size: 'small',
|
|
13977
|
+
total: selectIds.length,
|
|
13978
|
+
pageSize: 10,
|
|
13979
|
+
showSizeChanger: false
|
|
13980
|
+
}
|
|
13981
|
+
})) : null;
|
|
13982
|
+
};
|
|
13983
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
13984
|
+
active: true,
|
|
13985
|
+
loading: loading
|
|
13986
|
+
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13987
|
+
searchFormData: searchFormData$2,
|
|
13988
|
+
form: form,
|
|
13989
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13990
|
+
submit: submit,
|
|
13991
|
+
reset: reset
|
|
13992
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
13993
|
+
style: {
|
|
13994
|
+
marginTop: '4px'
|
|
13995
|
+
}
|
|
13996
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
13997
|
+
rowSelection: rowSelection,
|
|
13998
|
+
rowKey: rowCheckKey,
|
|
13999
|
+
columns: columns,
|
|
14000
|
+
scroll: {
|
|
14001
|
+
x: '100%',
|
|
14002
|
+
y: 250
|
|
14003
|
+
}
|
|
14004
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
14005
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14006
|
+
return triggerNode.parentElement;
|
|
14007
|
+
},
|
|
14008
|
+
content: showTable(),
|
|
14009
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14010
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
14011
|
+
danger: true,
|
|
14012
|
+
type: "text"
|
|
14013
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
14014
|
+
};
|
|
14015
|
+
var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
|
|
14016
|
+
|
|
14017
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
14018
|
+
useImperativeHandle(ref, function () {
|
|
14019
|
+
return {
|
|
14020
|
+
open: function open(shopCode) {
|
|
14021
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14022
|
+
setVisible(true);
|
|
14023
|
+
setSelectedRows(options.value || []);
|
|
14024
|
+
}
|
|
14025
|
+
};
|
|
14026
|
+
});
|
|
14027
|
+
var onSubmit = props.onSubmit,
|
|
14028
|
+
width = props.width;
|
|
14029
|
+
var _useState = useState(false),
|
|
14030
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14031
|
+
visible = _useState2[0],
|
|
14032
|
+
setVisible = _useState2[1];
|
|
14033
|
+
var _useState3 = useState([]),
|
|
14034
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14035
|
+
selectedRows = _useState4[0],
|
|
14036
|
+
setSelectedRows = _useState4[1];
|
|
14037
|
+
var erpGoodsListRef = useRef(null);
|
|
14038
|
+
var _onCancel = function onCancel() {
|
|
14039
|
+
setVisible(false);
|
|
14040
|
+
};
|
|
14041
|
+
var onOk = function onOk() {
|
|
14042
|
+
var _erpGoodsListRef$curr;
|
|
14043
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
14044
|
+
onSubmit(selectedList);
|
|
14045
|
+
_onCancel();
|
|
14046
|
+
};
|
|
14047
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
14048
|
+
title: '选择商品',
|
|
14049
|
+
okText: '确认',
|
|
14050
|
+
cancelText: '取消',
|
|
14051
|
+
visible: visible,
|
|
14052
|
+
width: width || 850,
|
|
14053
|
+
onCancel: function onCancel() {
|
|
14054
|
+
_onCancel();
|
|
14055
|
+
},
|
|
14056
|
+
onOk: onOk,
|
|
14057
|
+
wrapClassName: "goodModal"
|
|
14058
|
+
}, /*#__PURE__*/React.createElement(ErpGoodsList, {
|
|
14059
|
+
ref: erpGoodsListRef,
|
|
14060
|
+
selectedRows: selectedRows
|
|
14061
|
+
})));
|
|
14062
|
+
};
|
|
14063
|
+
var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
|
|
14064
|
+
|
|
14065
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14066
|
+
var current = _ref.current,
|
|
14067
|
+
pageSize = _ref.pageSize;
|
|
14068
|
+
var data = {
|
|
14069
|
+
goodShortName: formData.goodShortName || null,
|
|
14070
|
+
skuName: formData.skuName || null,
|
|
14071
|
+
skuCode: formData.skuCode || null,
|
|
14072
|
+
goodName: formData.goodName || null,
|
|
14073
|
+
goodNo: formData.goodNo || null
|
|
14074
|
+
};
|
|
14075
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14076
|
+
method: 'post',
|
|
14077
|
+
data: _objectSpread2({
|
|
14078
|
+
pageSize: pageSize,
|
|
14079
|
+
pageNo: current,
|
|
14080
|
+
platform: 'GY_ERP'
|
|
14081
|
+
}, data)
|
|
14082
|
+
}).then(function (res) {
|
|
14083
|
+
var _res$data = res.data,
|
|
14084
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14085
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14086
|
+
_res$data$total = _res$data.total,
|
|
14087
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14088
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14089
|
+
return _objectSpread2({}, item);
|
|
14090
|
+
});
|
|
14091
|
+
return {
|
|
14092
|
+
total: total,
|
|
14093
|
+
list: newProducts
|
|
14094
|
+
};
|
|
14095
|
+
});
|
|
14096
|
+
};
|
|
14097
|
+
var searchFormData$3 = [{
|
|
14098
|
+
label: '商品简称',
|
|
14099
|
+
name: 'goodShortName'
|
|
14100
|
+
}, {
|
|
14101
|
+
label: '商品sku名称',
|
|
14102
|
+
name: 'skuName',
|
|
14103
|
+
dataIndex: 'specName'
|
|
14104
|
+
}, {
|
|
14105
|
+
label: '商品sku编码',
|
|
14106
|
+
name: 'skuCode',
|
|
14107
|
+
dataIndex: 'specNo'
|
|
14108
|
+
}, {
|
|
14109
|
+
label: '商品名称',
|
|
14110
|
+
name: 'goodName'
|
|
14111
|
+
}, {
|
|
14112
|
+
label: '商品编码',
|
|
14113
|
+
name: 'goodNo'
|
|
14114
|
+
}];
|
|
14115
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
14116
|
+
var _useState = useState([]),
|
|
14117
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14118
|
+
selectList = _useState2[0],
|
|
14119
|
+
setSelect = _useState2[1];
|
|
14120
|
+
var _useState3 = useState([]),
|
|
14121
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14122
|
+
selectIds = _useState4[0],
|
|
14123
|
+
setSelectIds = _useState4[1];
|
|
14124
|
+
var _useGetColumns = useGetColumns('gy'),
|
|
14125
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
14126
|
+
columns = _useGetColumns2[0],
|
|
14127
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
14128
|
+
loading = _useGetColumns2[2];
|
|
14129
|
+
useImperativeHandle(ref, function () {
|
|
14130
|
+
return {
|
|
14131
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
14132
|
+
return selectList;
|
|
14133
|
+
}
|
|
14134
|
+
};
|
|
14135
|
+
});
|
|
14136
|
+
var _Form$useForm = Form.useForm(),
|
|
14137
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
14138
|
+
form = _Form$useForm2[0];
|
|
14139
|
+
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
14140
|
+
defaultPageSize: 10,
|
|
14141
|
+
form: form
|
|
14142
|
+
}),
|
|
14143
|
+
tableProps = _useAntdTable.tableProps,
|
|
14144
|
+
search = _useAntdTable.search,
|
|
14145
|
+
params = _useAntdTable.params;
|
|
14146
|
+
var submit = search.submit,
|
|
14147
|
+
reset = search.reset;
|
|
14148
|
+
var rowSelection = {
|
|
14149
|
+
selectedRowKeys: selectIds,
|
|
14150
|
+
fixed: true,
|
|
14151
|
+
onSelect: function onSelect(record, selected) {
|
|
14152
|
+
if (selected) {
|
|
14153
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
14154
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
14155
|
+
} else {
|
|
14156
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14157
|
+
return t !== record.id;
|
|
14158
|
+
}));
|
|
14159
|
+
setSelect(selectList.filter(function (t) {
|
|
14160
|
+
return t.id !== record.id;
|
|
14161
|
+
}));
|
|
14162
|
+
}
|
|
14163
|
+
},
|
|
14164
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
14165
|
+
if (selected) {
|
|
14166
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
14167
|
+
return t.id;
|
|
14168
|
+
}))));
|
|
14169
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
14170
|
+
} else {
|
|
14171
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
14172
|
+
return t.id;
|
|
14173
|
+
})));
|
|
14174
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
14175
|
+
return arrVal.id !== othVal.id;
|
|
13600
14176
|
});
|
|
13601
14177
|
setSelect(list);
|
|
13602
14178
|
}
|
|
@@ -13650,7 +14226,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13650
14226
|
active: true,
|
|
13651
14227
|
loading: loading
|
|
13652
14228
|
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13653
|
-
searchFormData: searchFormData$
|
|
14229
|
+
searchFormData: searchFormData$3,
|
|
13654
14230
|
form: form,
|
|
13655
14231
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13656
14232
|
submit: submit,
|
|
@@ -13678,7 +14254,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13678
14254
|
type: "text"
|
|
13679
14255
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13680
14256
|
};
|
|
13681
|
-
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$
|
|
14257
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
|
|
13682
14258
|
|
|
13683
14259
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
13684
14260
|
useImperativeHandle(ref, function () {
|
|
@@ -14427,6 +15003,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14427
15003
|
label: '组合装',
|
|
14428
15004
|
value: '2'
|
|
14429
15005
|
}];
|
|
15006
|
+
var typeMap = {
|
|
15007
|
+
'1': '单品',
|
|
15008
|
+
'2': '组合装'
|
|
15009
|
+
};
|
|
14430
15010
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14431
15011
|
style: {
|
|
14432
15012
|
width: 70
|
|
@@ -14436,7 +15016,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14436
15016
|
onChange: function onChange(value) {
|
|
14437
15017
|
return updateHandle(value, index, 'type');
|
|
14438
15018
|
}
|
|
14439
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15019
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14440
15020
|
}
|
|
14441
15021
|
}],
|
|
14442
15022
|
//旺店通换出商品信息
|
|
@@ -14548,6 +15128,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14548
15128
|
label: '组合装',
|
|
14549
15129
|
value: '2'
|
|
14550
15130
|
}];
|
|
15131
|
+
var typeMap = {
|
|
15132
|
+
'1': '单品',
|
|
15133
|
+
'2': '组合装'
|
|
15134
|
+
};
|
|
14551
15135
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14552
15136
|
style: {
|
|
14553
15137
|
width: 70
|
|
@@ -14557,13 +15141,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14557
15141
|
onChange: function onChange(value) {
|
|
14558
15142
|
return updateHandle(value, index, 'type');
|
|
14559
15143
|
}
|
|
14560
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15144
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14561
15145
|
}
|
|
14562
15146
|
}]
|
|
14563
15147
|
};
|
|
14564
15148
|
};
|
|
14565
15149
|
|
|
14566
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15150
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14567
15151
|
if (isNull(val)) return null;
|
|
14568
15152
|
return val ? '是' : '否';
|
|
14569
15153
|
};
|
|
@@ -14701,7 +15285,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14701
15285
|
label: '否',
|
|
14702
15286
|
value: false
|
|
14703
15287
|
}]
|
|
14704
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
15288
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
|
|
14705
15289
|
},
|
|
14706
15290
|
width: 100
|
|
14707
15291
|
}]
|
|
@@ -14713,7 +15297,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14713
15297
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14714
15298
|
return false;
|
|
14715
15299
|
};
|
|
14716
|
-
var getYesOrNo$
|
|
15300
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14717
15301
|
if (isNull(val)) return null;
|
|
14718
15302
|
return val ? '是' : '否';
|
|
14719
15303
|
};
|
|
@@ -14823,7 +15407,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14823
15407
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14824
15408
|
width: 150,
|
|
14825
15409
|
render: function render(val) {
|
|
14826
|
-
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15410
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14827
15411
|
}
|
|
14828
15412
|
}, {
|
|
14829
15413
|
dataIndex: 'isGift',
|
|
@@ -14842,7 +15426,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14842
15426
|
label: '否',
|
|
14843
15427
|
value: 0
|
|
14844
15428
|
}]
|
|
14845
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15429
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14846
15430
|
}
|
|
14847
15431
|
}, {
|
|
14848
15432
|
dataIndex: 'skuNote',
|
|
@@ -14962,7 +15546,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14962
15546
|
label: '否',
|
|
14963
15547
|
value: 0
|
|
14964
15548
|
}]
|
|
14965
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15549
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14966
15550
|
}
|
|
14967
15551
|
}].map(function (item) {
|
|
14968
15552
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15086,7 +15670,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15086
15670
|
label: '否',
|
|
15087
15671
|
value: 0
|
|
15088
15672
|
}]
|
|
15089
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15673
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
15090
15674
|
}
|
|
15091
15675
|
}].map(function (item) {
|
|
15092
15676
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15208,7 +15792,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15208
15792
|
ellipsis: true,
|
|
15209
15793
|
align: 'center',
|
|
15210
15794
|
render: function render(val, record, index) {
|
|
15211
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15795
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15212
15796
|
}
|
|
15213
15797
|
}, {
|
|
15214
15798
|
dataIndex: 'batchId',
|
|
@@ -15484,7 +16068,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15484
16068
|
dataIndex: 'saleAmount',
|
|
15485
16069
|
title: '总金额',
|
|
15486
16070
|
render: function render(val, record) {
|
|
15487
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16071
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15488
16072
|
}
|
|
15489
16073
|
}, {
|
|
15490
16074
|
dataIndex: 'batchId',
|
|
@@ -15593,7 +16177,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15593
16177
|
dataIndex: 'saleAmount',
|
|
15594
16178
|
title: '总金额',
|
|
15595
16179
|
render: function render(val, record) {
|
|
15596
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16180
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15597
16181
|
}
|
|
15598
16182
|
}, {
|
|
15599
16183
|
dataIndex: 'isGift',
|
|
@@ -15632,21 +16216,254 @@ var getColumns$5 = function getColumns() {
|
|
|
15632
16216
|
};
|
|
15633
16217
|
};
|
|
15634
16218
|
|
|
16219
|
+
function toNum$2(value) {
|
|
16220
|
+
if (typeof value === 'string') {
|
|
16221
|
+
return value ? +value : void 0;
|
|
16222
|
+
}
|
|
16223
|
+
if (typeof value === 'number') {
|
|
16224
|
+
return value;
|
|
16225
|
+
}
|
|
16226
|
+
return void 0;
|
|
16227
|
+
}
|
|
15635
16228
|
var getColumns$6 = function getColumns(_ref) {
|
|
15636
16229
|
var _ref$text = _ref.text,
|
|
15637
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15638
16230
|
disabled = _ref.disabled,
|
|
15639
16231
|
updateHandle = _ref.updateHandle;
|
|
15640
16232
|
return {
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
16233
|
+
KM_GOODS: [{
|
|
16234
|
+
dataIndex: 'skuPropertiesName',
|
|
16235
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16236
|
+
width: 250
|
|
16237
|
+
}, {
|
|
16238
|
+
dataIndex: 'sysTitle',
|
|
16239
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16240
|
+
width: 150
|
|
16241
|
+
}, {
|
|
16242
|
+
dataIndex: 'title',
|
|
16243
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16244
|
+
width: 150
|
|
16245
|
+
}, {
|
|
16246
|
+
dataIndex: 'shortTitle',
|
|
16247
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16248
|
+
width: 150
|
|
16249
|
+
}, {
|
|
16250
|
+
dataIndex: 'sysOuterId',
|
|
16251
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16252
|
+
width: 150
|
|
16253
|
+
}, {
|
|
16254
|
+
dataIndex: 'skuSysId',
|
|
16255
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16256
|
+
width: 150
|
|
16257
|
+
}, {
|
|
16258
|
+
dataIndex: 'skuId',
|
|
16259
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16260
|
+
width: 170
|
|
16261
|
+
}, {
|
|
16262
|
+
dataIndex: 'itemSysId',
|
|
16263
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16264
|
+
width: 150
|
|
16265
|
+
}, {
|
|
16266
|
+
dataIndex: 'sysPicPath',
|
|
16267
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16268
|
+
width: 100,
|
|
16269
|
+
render: function render(val) {
|
|
16270
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16271
|
+
width: 60,
|
|
16272
|
+
src: val
|
|
16273
|
+
});
|
|
16274
|
+
}
|
|
16275
|
+
}, {
|
|
16276
|
+
dataIndex: 'num',
|
|
16277
|
+
title: "\u6570\u91CF",
|
|
16278
|
+
width: 100,
|
|
16279
|
+
render: function render(val, record, index) {
|
|
16280
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16281
|
+
style: {
|
|
16282
|
+
width: 70
|
|
16283
|
+
},
|
|
16284
|
+
value: val,
|
|
16285
|
+
min: 1,
|
|
16286
|
+
precision: 0,
|
|
16287
|
+
onChange: function onChange(num) {
|
|
16288
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16289
|
+
}
|
|
16290
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16291
|
+
}
|
|
16292
|
+
}, {
|
|
16293
|
+
dataIndex: 'payment',
|
|
16294
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16295
|
+
width: 150,
|
|
16296
|
+
render: function render(val, record, index) {
|
|
16297
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16298
|
+
style: {
|
|
16299
|
+
width: 130
|
|
16300
|
+
},
|
|
16301
|
+
value: val,
|
|
16302
|
+
min: 0,
|
|
16303
|
+
precision: 2,
|
|
16304
|
+
onChange: function onChange(num) {
|
|
16305
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16306
|
+
}
|
|
16307
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16308
|
+
}
|
|
16309
|
+
}, {
|
|
16310
|
+
dataIndex: 'price',
|
|
16311
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16312
|
+
width: 150,
|
|
16313
|
+
render: function render(val) {
|
|
16314
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16315
|
+
}
|
|
16316
|
+
}, {
|
|
16317
|
+
dataIndex: 'type',
|
|
16318
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16319
|
+
width: 150
|
|
16320
|
+
}].map(function (item) {
|
|
16321
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16322
|
+
align: 'center',
|
|
16323
|
+
ellipsis: true
|
|
16324
|
+
});
|
|
16325
|
+
}),
|
|
16326
|
+
KM_REISSUE_GOODS: [{
|
|
16327
|
+
dataIndex: 'skuPropertiesName',
|
|
16328
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16329
|
+
width: 250
|
|
16330
|
+
}, {
|
|
16331
|
+
dataIndex: 'sysTitle',
|
|
16332
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16333
|
+
width: 150
|
|
16334
|
+
}, {
|
|
16335
|
+
dataIndex: 'shortTitle',
|
|
16336
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16337
|
+
width: 150
|
|
16338
|
+
}, {
|
|
16339
|
+
dataIndex: 'title',
|
|
16340
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16341
|
+
width: 150
|
|
16342
|
+
}, {
|
|
16343
|
+
dataIndex: 'sysOuterId',
|
|
16344
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16345
|
+
width: 150
|
|
16346
|
+
}, {
|
|
16347
|
+
dataIndex: 'itemSysId',
|
|
16348
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16349
|
+
width: 150
|
|
16350
|
+
}, {
|
|
16351
|
+
dataIndex: 'skuSysId',
|
|
16352
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16353
|
+
width: 150
|
|
16354
|
+
}, {
|
|
16355
|
+
dataIndex: 'skuId',
|
|
16356
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16357
|
+
width: 170
|
|
16358
|
+
}, {
|
|
16359
|
+
dataIndex: 'realNum',
|
|
16360
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16361
|
+
width: 100,
|
|
16362
|
+
validator: function validator(_rule, value) {
|
|
16363
|
+
var title = '';
|
|
16364
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16365
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16366
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16367
|
+
if (res) {
|
|
16368
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16369
|
+
}
|
|
16370
|
+
return res;
|
|
16371
|
+
})) {
|
|
16372
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16373
|
+
}
|
|
16374
|
+
},
|
|
16375
|
+
render: function render(val, record, index) {
|
|
16376
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16377
|
+
style: {
|
|
16378
|
+
width: 70
|
|
16379
|
+
},
|
|
16380
|
+
value: val,
|
|
16381
|
+
min: 1,
|
|
16382
|
+
precision: 0,
|
|
16383
|
+
onChange: function onChange(num) {
|
|
16384
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16385
|
+
}
|
|
16386
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16387
|
+
}
|
|
16388
|
+
}, {
|
|
16389
|
+
dataIndex: 'desiredNum',
|
|
16390
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16391
|
+
width: 100,
|
|
16392
|
+
render: function render(val, record, index) {
|
|
16393
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16394
|
+
style: {
|
|
16395
|
+
width: 70
|
|
16396
|
+
},
|
|
16397
|
+
value: val,
|
|
16398
|
+
min: 1,
|
|
16399
|
+
precision: 0,
|
|
16400
|
+
onChange: function onChange(num) {
|
|
16401
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16402
|
+
}
|
|
16403
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16404
|
+
}
|
|
16405
|
+
}, {
|
|
16406
|
+
dataIndex: 'price',
|
|
16407
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16408
|
+
width: 150,
|
|
16409
|
+
render: function render(val) {
|
|
16410
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16411
|
+
}
|
|
16412
|
+
}, {
|
|
16413
|
+
dataIndex: 'payment',
|
|
16414
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16415
|
+
width: 150,
|
|
16416
|
+
render: function render(val, record, index) {
|
|
16417
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16418
|
+
style: {
|
|
16419
|
+
width: 130
|
|
16420
|
+
},
|
|
16421
|
+
value: val,
|
|
16422
|
+
min: 0,
|
|
16423
|
+
precision: 2,
|
|
16424
|
+
onChange: function onChange(num) {
|
|
16425
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16426
|
+
}
|
|
16427
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16428
|
+
}
|
|
16429
|
+
}, {
|
|
16430
|
+
dataIndex: 'type',
|
|
16431
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16432
|
+
width: 150
|
|
16433
|
+
}, {
|
|
16434
|
+
dataIndex: 'sysPicPath',
|
|
16435
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16436
|
+
width: 100,
|
|
16437
|
+
render: function render(val) {
|
|
16438
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16439
|
+
width: 60,
|
|
16440
|
+
src: val
|
|
16441
|
+
});
|
|
16442
|
+
}
|
|
16443
|
+
}].map(function (item) {
|
|
16444
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16445
|
+
align: 'center',
|
|
16446
|
+
ellipsis: true
|
|
16447
|
+
});
|
|
16448
|
+
})
|
|
16449
|
+
};
|
|
16450
|
+
};
|
|
16451
|
+
|
|
16452
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16453
|
+
var _ref$text = _ref.text,
|
|
16454
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16455
|
+
disabled = _ref.disabled,
|
|
16456
|
+
updateHandle = _ref.updateHandle;
|
|
16457
|
+
return {
|
|
16458
|
+
//bs商品信息
|
|
16459
|
+
default: [{
|
|
16460
|
+
dataIndex: 'mark',
|
|
16461
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16462
|
+
align: 'center',
|
|
16463
|
+
ellipsis: true,
|
|
16464
|
+
width: 70,
|
|
16465
|
+
render: function render(val, record, index) {
|
|
16466
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
15650
16467
|
options: [{
|
|
15651
16468
|
label: '是',
|
|
15652
16469
|
value: '是'
|
|
@@ -15745,7 +16562,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15745
16562
|
disabled = _ref.disabled,
|
|
15746
16563
|
updateHandle = _ref.updateHandle,
|
|
15747
16564
|
updateDataHandle = _ref.updateDataHandle;
|
|
15748
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16565
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15749
16566
|
text: text,
|
|
15750
16567
|
disabled: disabled,
|
|
15751
16568
|
updateHandle: updateHandle
|
|
@@ -15770,8 +16587,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15770
16587
|
text: text,
|
|
15771
16588
|
disabled: disabled,
|
|
15772
16589
|
updateHandle: updateHandle
|
|
16590
|
+
})), getColumns$6({
|
|
16591
|
+
text: text,
|
|
16592
|
+
disabled: disabled,
|
|
16593
|
+
updateHandle: updateHandle
|
|
15773
16594
|
})), {}, {
|
|
15774
|
-
default: getColumns$
|
|
16595
|
+
default: getColumns$7({
|
|
15775
16596
|
text: text,
|
|
15776
16597
|
disabled: disabled,
|
|
15777
16598
|
updateHandle: updateHandle
|
|
@@ -15923,6 +16744,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15923
16744
|
})));
|
|
15924
16745
|
}
|
|
15925
16746
|
|
|
16747
|
+
var isErpType = {
|
|
16748
|
+
isWdt: function isWdt(type) {
|
|
16749
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16750
|
+
},
|
|
16751
|
+
isBsE3: function isBsE3(type) {
|
|
16752
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16753
|
+
},
|
|
16754
|
+
isGy: function isGy(type) {
|
|
16755
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16756
|
+
},
|
|
16757
|
+
isJst: function isJst(type) {
|
|
16758
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16759
|
+
},
|
|
16760
|
+
isKm: function isKm(type) {
|
|
16761
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16762
|
+
}
|
|
16763
|
+
};
|
|
16764
|
+
var processGoods = function processGoods(_ref) {
|
|
16765
|
+
var list = _ref.list,
|
|
16766
|
+
type = _ref.type,
|
|
16767
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16768
|
+
var newList = [];
|
|
16769
|
+
// 根据商品类型处理数据
|
|
16770
|
+
if (isErpType.isWdt(type)) {
|
|
16771
|
+
newList = processWdtGoods({
|
|
16772
|
+
list: list,
|
|
16773
|
+
type: type,
|
|
16774
|
+
canUpdateNumber: canUpdateNumber
|
|
16775
|
+
});
|
|
16776
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16777
|
+
newList = processBsE3Goods({
|
|
16778
|
+
list: list,
|
|
16779
|
+
type: type,
|
|
16780
|
+
canUpdateNumber: canUpdateNumber
|
|
16781
|
+
});
|
|
16782
|
+
} else if (isErpType.isGy(type)) {
|
|
16783
|
+
newList = processGyGoods({
|
|
16784
|
+
list: list,
|
|
16785
|
+
type: type,
|
|
16786
|
+
canUpdateNumber: canUpdateNumber
|
|
16787
|
+
});
|
|
16788
|
+
} else if (isErpType.isJst(type)) {
|
|
16789
|
+
newList = processJstGoods({
|
|
16790
|
+
list: list,
|
|
16791
|
+
type: type,
|
|
16792
|
+
canUpdateNumber: canUpdateNumber
|
|
16793
|
+
});
|
|
16794
|
+
} else if (isErpType.isKm(type)) {
|
|
16795
|
+
newList = processKmGoods({
|
|
16796
|
+
list: list,
|
|
16797
|
+
type: type,
|
|
16798
|
+
canUpdateNumber: canUpdateNumber
|
|
16799
|
+
});
|
|
16800
|
+
} else {
|
|
16801
|
+
newList = processDefaultGoods({
|
|
16802
|
+
list: list,
|
|
16803
|
+
type: type,
|
|
16804
|
+
canUpdateNumber: canUpdateNumber
|
|
16805
|
+
});
|
|
16806
|
+
}
|
|
16807
|
+
return newList;
|
|
16808
|
+
};
|
|
16809
|
+
// 处理不同类型的商品数据
|
|
16810
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16811
|
+
var list = _ref2.list,
|
|
16812
|
+
type = _ref2.type,
|
|
16813
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16814
|
+
return list.map(function (item) {
|
|
16815
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16816
|
+
uuid: uuid(),
|
|
16817
|
+
canDelete: true,
|
|
16818
|
+
num: 1,
|
|
16819
|
+
orderPrice: 0,
|
|
16820
|
+
sharePrice: 0,
|
|
16821
|
+
canUpdateNumber: canUpdateNumber
|
|
16822
|
+
});
|
|
16823
|
+
// 特殊处理换货商品
|
|
16824
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16825
|
+
processedItem.price = item.retailPrice;
|
|
16826
|
+
processedItem.type = '1';
|
|
16827
|
+
}
|
|
16828
|
+
return processedItem;
|
|
16829
|
+
});
|
|
16830
|
+
};
|
|
16831
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16832
|
+
var list = _ref3.list,
|
|
16833
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16834
|
+
return list.map(function (item) {
|
|
16835
|
+
var specNo = item.specNo,
|
|
16836
|
+
specId = item.specId,
|
|
16837
|
+
goodName = item.goodName,
|
|
16838
|
+
goodShortName = item.goodShortName,
|
|
16839
|
+
goodPicUrl = item.goodPicUrl,
|
|
16840
|
+
goodNo = item.goodNo,
|
|
16841
|
+
goodId = item.goodId,
|
|
16842
|
+
retailPrice = item.retailPrice;
|
|
16843
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16844
|
+
sku: specNo,
|
|
16845
|
+
skuId: specId,
|
|
16846
|
+
goodsName: goodName,
|
|
16847
|
+
goodsShortName: goodShortName,
|
|
16848
|
+
picPath: goodPicUrl,
|
|
16849
|
+
goodsSn: goodNo,
|
|
16850
|
+
goodsId: goodId,
|
|
16851
|
+
goodsPrice: retailPrice,
|
|
16852
|
+
shopPrice: retailPrice,
|
|
16853
|
+
sharePayment: '',
|
|
16854
|
+
sharePrice: '',
|
|
16855
|
+
payment: '',
|
|
16856
|
+
tcSku: '',
|
|
16857
|
+
tcGoodsNumber: '',
|
|
16858
|
+
taoCanSingleSl: '',
|
|
16859
|
+
isGift: '',
|
|
16860
|
+
uuid: uuid(),
|
|
16861
|
+
canDelete: true,
|
|
16862
|
+
canEdit: true,
|
|
16863
|
+
goodsNumber: 1,
|
|
16864
|
+
canUpdateNumber: canUpdateNumber
|
|
16865
|
+
});
|
|
16866
|
+
});
|
|
16867
|
+
};
|
|
16868
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16869
|
+
var list = _ref4.list;
|
|
16870
|
+
return list.map(function (item) {
|
|
16871
|
+
var goodName = item.goodName,
|
|
16872
|
+
goodShortName = item.goodShortName,
|
|
16873
|
+
goodNo = item.goodNo,
|
|
16874
|
+
specName = item.specName,
|
|
16875
|
+
specNo = item.specNo,
|
|
16876
|
+
retailPrice = item.retailPrice;
|
|
16877
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16878
|
+
uuid: uuid(),
|
|
16879
|
+
canDelete: true,
|
|
16880
|
+
canEdit: true,
|
|
16881
|
+
qty: 1,
|
|
16882
|
+
goodName: goodName,
|
|
16883
|
+
goodShortName: goodShortName,
|
|
16884
|
+
goodNo: goodNo,
|
|
16885
|
+
specName: specName,
|
|
16886
|
+
specNo: specNo,
|
|
16887
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16888
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16889
|
+
});
|
|
16890
|
+
});
|
|
16891
|
+
};
|
|
16892
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16893
|
+
var list = _ref5.list;
|
|
16894
|
+
return list.map(function (item) {
|
|
16895
|
+
return {
|
|
16896
|
+
name: item.goodName,
|
|
16897
|
+
skuId: item.goodNo,
|
|
16898
|
+
iId: item.styleCode,
|
|
16899
|
+
pic: item.goodPicUrl,
|
|
16900
|
+
propertiesValue: item.propertiesValue,
|
|
16901
|
+
saleBasePrice: item.retailPrice,
|
|
16902
|
+
salePrice: item.retailPrice,
|
|
16903
|
+
remark: '',
|
|
16904
|
+
uuid: uuid(),
|
|
16905
|
+
canDelete: true,
|
|
16906
|
+
canEdit: true,
|
|
16907
|
+
qty: 1
|
|
16908
|
+
};
|
|
16909
|
+
});
|
|
16910
|
+
};
|
|
16911
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16912
|
+
var list = _ref6.list,
|
|
16913
|
+
type = _ref6.type;
|
|
16914
|
+
var initParamsMap = {
|
|
16915
|
+
KM_GOODS: {
|
|
16916
|
+
num: 1
|
|
16917
|
+
},
|
|
16918
|
+
KM_REISSUE_GOODS: {
|
|
16919
|
+
realNum: 1,
|
|
16920
|
+
desiredNum: 1
|
|
16921
|
+
}
|
|
16922
|
+
};
|
|
16923
|
+
return list.map(function (item) {
|
|
16924
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16925
|
+
skuPropertiesName: item.specName,
|
|
16926
|
+
sysTitle: item.goodName,
|
|
16927
|
+
title: null,
|
|
16928
|
+
shortTitle: item.goodShortName,
|
|
16929
|
+
sysOuterId: item.goodNo,
|
|
16930
|
+
outerId: item.goodNo,
|
|
16931
|
+
skuSysId: item.specId,
|
|
16932
|
+
itemSysId: item.goodId,
|
|
16933
|
+
sysPicPath: item.goodPicUrl,
|
|
16934
|
+
payment: null,
|
|
16935
|
+
price: item.retailPrice,
|
|
16936
|
+
type: null,
|
|
16937
|
+
uuid: uuid(),
|
|
16938
|
+
canDelete: true,
|
|
16939
|
+
canEdit: true
|
|
16940
|
+
}, initParamsMap[type] || {});
|
|
16941
|
+
});
|
|
16942
|
+
};
|
|
16943
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16944
|
+
var list = _ref7.list,
|
|
16945
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16946
|
+
return list.map(function (item) {
|
|
16947
|
+
var goodsId = item.goodsId,
|
|
16948
|
+
name = item.name,
|
|
16949
|
+
code = item.code,
|
|
16950
|
+
skuCode = item.skuCode,
|
|
16951
|
+
marketPrice = item.marketPrice,
|
|
16952
|
+
skuName = item.skuName;
|
|
16953
|
+
return {
|
|
16954
|
+
id: goodsId,
|
|
16955
|
+
mark: '是',
|
|
16956
|
+
pic: '',
|
|
16957
|
+
skuName: skuName,
|
|
16958
|
+
name: name,
|
|
16959
|
+
code: code,
|
|
16960
|
+
sku: skuCode,
|
|
16961
|
+
money: marketPrice || 0,
|
|
16962
|
+
share: marketPrice || 0,
|
|
16963
|
+
number: 1,
|
|
16964
|
+
type: '',
|
|
16965
|
+
uuid: uuid(),
|
|
16966
|
+
canDelete: true,
|
|
16967
|
+
canUpdateNumber: canUpdateNumber
|
|
16968
|
+
};
|
|
16969
|
+
});
|
|
16970
|
+
};
|
|
16971
|
+
|
|
15926
16972
|
var GoodsModalMap = {
|
|
15927
16973
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15928
16974
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15937,6 +16983,8 @@ var GoodsModalMap = {
|
|
|
15937
16983
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15938
16984
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15939
16985
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16986
|
+
KM_GOODS: KmGoodsModal,
|
|
16987
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15940
16988
|
OTHER_GOODS: GoodsModal$2
|
|
15941
16989
|
};
|
|
15942
16990
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15970,7 +17018,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15970
17018
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15971
17019
|
}));
|
|
15972
17020
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15973
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17021
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15974
17022
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15975
17023
|
};
|
|
15976
17024
|
var rowSelection = {
|
|
@@ -15999,6 +17047,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15999
17047
|
};
|
|
16000
17048
|
var getButtonText = function getButtonText() {
|
|
16001
17049
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17050
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17051
|
+
return '选择快麦ERP商品';
|
|
17052
|
+
}
|
|
16002
17053
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16003
17054
|
return '选择百胜ERP商品';
|
|
16004
17055
|
}
|
|
@@ -16142,6 +17193,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16142
17193
|
case 'JST_RETURN_GOODS':
|
|
16143
17194
|
case 'GY_REISSUE_GOODS':
|
|
16144
17195
|
case 'GY_RETURN_GOODS':
|
|
17196
|
+
case 'KM_GOODS':
|
|
17197
|
+
case 'KM_REISSUE_GOODS':
|
|
16145
17198
|
{
|
|
16146
17199
|
columns = getColumnsMap$1({
|
|
16147
17200
|
text: text,
|
|
@@ -16259,120 +17312,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16259
17312
|
}].concat(_toConsumableArray(columns));
|
|
16260
17313
|
}, []);
|
|
16261
17314
|
var onSubmit = function onSubmit(list) {
|
|
16262
|
-
var newList =
|
|
16263
|
-
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
item.num = 1;
|
|
16268
|
-
item.orderPrice = 0;
|
|
16269
|
-
item.sharePrice = 0;
|
|
16270
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16271
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16272
|
-
item.price = item.retailPrice;
|
|
16273
|
-
item.type = '1';
|
|
16274
|
-
}
|
|
16275
|
-
return item;
|
|
16276
|
-
});
|
|
16277
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16278
|
-
newList = list.map(function (item) {
|
|
16279
|
-
var specNo = item.specNo,
|
|
16280
|
-
specId = item.specId,
|
|
16281
|
-
goodName = item.goodName,
|
|
16282
|
-
goodShortName = item.goodShortName,
|
|
16283
|
-
goodPicUrl = item.goodPicUrl,
|
|
16284
|
-
goodNo = item.goodNo,
|
|
16285
|
-
goodId = item.goodId,
|
|
16286
|
-
retailPrice = item.retailPrice;
|
|
16287
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16288
|
-
sku: specNo,
|
|
16289
|
-
skuId: specId,
|
|
16290
|
-
goodsName: goodName,
|
|
16291
|
-
goodsShortName: goodShortName,
|
|
16292
|
-
picPath: goodPicUrl,
|
|
16293
|
-
goodsSn: goodNo,
|
|
16294
|
-
goodsId: goodId,
|
|
16295
|
-
goodsPrice: retailPrice,
|
|
16296
|
-
shopPrice: retailPrice,
|
|
16297
|
-
sharePayment: '',
|
|
16298
|
-
sharePrice: '',
|
|
16299
|
-
payment: '',
|
|
16300
|
-
tcSku: '',
|
|
16301
|
-
tcGoodsNumber: '',
|
|
16302
|
-
taoCanSingleSl: '',
|
|
16303
|
-
isGift: '',
|
|
16304
|
-
uuid: uuid(),
|
|
16305
|
-
canDelete: true,
|
|
16306
|
-
canEdit: true,
|
|
16307
|
-
goodsNumber: 1,
|
|
16308
|
-
canUpdateNumber: canUpdateNumber
|
|
16309
|
-
});
|
|
16310
|
-
});
|
|
16311
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16312
|
-
newList = list.map(function (item) {
|
|
16313
|
-
var goodName = item.goodName,
|
|
16314
|
-
goodShortName = item.goodShortName,
|
|
16315
|
-
goodNo = item.goodNo,
|
|
16316
|
-
specName = item.specName,
|
|
16317
|
-
specNo = item.specNo,
|
|
16318
|
-
retailPrice = item.retailPrice;
|
|
16319
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16320
|
-
uuid: uuid(),
|
|
16321
|
-
canDelete: true,
|
|
16322
|
-
canEdit: true,
|
|
16323
|
-
qty: 1,
|
|
16324
|
-
goodName: goodName,
|
|
16325
|
-
goodShortName: goodShortName,
|
|
16326
|
-
goodNo: goodNo,
|
|
16327
|
-
specName: specName,
|
|
16328
|
-
specNo: specNo,
|
|
16329
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16330
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16331
|
-
});
|
|
16332
|
-
});
|
|
16333
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16334
|
-
newList = list.map(function (item) {
|
|
16335
|
-
return {
|
|
16336
|
-
name: item.goodName,
|
|
16337
|
-
skuId: item.goodNo,
|
|
16338
|
-
iId: item.styleCode,
|
|
16339
|
-
pic: item.goodPicUrl,
|
|
16340
|
-
propertiesValue: item.propertiesValue,
|
|
16341
|
-
saleBasePrice: item.retailPrice,
|
|
16342
|
-
salePrice: item.retailPrice,
|
|
16343
|
-
remark: '',
|
|
16344
|
-
uuid: uuid(),
|
|
16345
|
-
canDelete: true,
|
|
16346
|
-
canEdit: true,
|
|
16347
|
-
qty: 1
|
|
16348
|
-
};
|
|
16349
|
-
});
|
|
16350
|
-
} else {
|
|
16351
|
-
newList = list.map(function (item) {
|
|
16352
|
-
var goodsId = item.goodsId,
|
|
16353
|
-
name = item.name,
|
|
16354
|
-
code = item.code,
|
|
16355
|
-
skuCode = item.skuCode,
|
|
16356
|
-
marketPrice = item.marketPrice,
|
|
16357
|
-
skuName = item.skuName;
|
|
16358
|
-
return {
|
|
16359
|
-
id: goodsId,
|
|
16360
|
-
mark: '是',
|
|
16361
|
-
pic: '',
|
|
16362
|
-
skuName: skuName,
|
|
16363
|
-
name: name,
|
|
16364
|
-
code: code,
|
|
16365
|
-
sku: skuCode,
|
|
16366
|
-
money: marketPrice || 0,
|
|
16367
|
-
share: marketPrice || 0,
|
|
16368
|
-
number: 1,
|
|
16369
|
-
type: '',
|
|
16370
|
-
uuid: uuid(),
|
|
16371
|
-
canDelete: true,
|
|
16372
|
-
canUpdateNumber: canUpdateNumber
|
|
16373
|
-
};
|
|
16374
|
-
});
|
|
16375
|
-
}
|
|
17315
|
+
var newList = processGoods({
|
|
17316
|
+
list: list,
|
|
17317
|
+
canUpdateNumber: canUpdateNumber,
|
|
17318
|
+
type: type
|
|
17319
|
+
});
|
|
16376
17320
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16377
17321
|
};
|
|
16378
17322
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17086,10 +18030,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17086
18030
|
var _data$data, _data$data$trades;
|
|
17087
18031
|
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) {
|
|
17088
18032
|
data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18033
|
+
var _tradeStatusMap$data$;
|
|
17089
18034
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17090
18035
|
billNo: item.tradeNo,
|
|
17091
18036
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17092
|
-
billTag: item.tagName
|
|
18037
|
+
billTag: item.tagName,
|
|
18038
|
+
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]
|
|
17093
18039
|
});
|
|
17094
18040
|
});
|
|
17095
18041
|
}
|
|
@@ -17172,6 +18118,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17172
18118
|
deliveryState: item.deliveryState,
|
|
17173
18119
|
vipCode: item.vipCode,
|
|
17174
18120
|
shopCode: item.shopCode,
|
|
18121
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17175
18122
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17176
18123
|
});
|
|
17177
18124
|
});
|
|
@@ -17290,7 +18237,7 @@ var kmUtils = {
|
|
|
17290
18237
|
getOrderListSingleton: getOrderListSingleton
|
|
17291
18238
|
};
|
|
17292
18239
|
|
|
17293
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18240
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17294
18241
|
var columnsMap = {
|
|
17295
18242
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17296
18243
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17332,7 +18279,6 @@ var index$3 = (function (props) {
|
|
|
17332
18279
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17333
18280
|
getBsE3OrderList(value.orderNo);
|
|
17334
18281
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17335
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17336
18282
|
getGyOrderList(value.orderNo);
|
|
17337
18283
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17338
18284
|
getJstOrderList(value.orderNo);
|
|
@@ -17446,11 +18392,13 @@ var index$3 = (function (props) {
|
|
|
17446
18392
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17447
18393
|
var billNo = _ref4.billNo,
|
|
17448
18394
|
billType = _ref4.billType,
|
|
17449
|
-
billTag = _ref4.billTag
|
|
18395
|
+
billTag = _ref4.billTag,
|
|
18396
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17450
18397
|
return {
|
|
17451
18398
|
billNo: billNo,
|
|
17452
18399
|
billType: billType,
|
|
17453
|
-
billTag: billTag
|
|
18400
|
+
billTag: billTag,
|
|
18401
|
+
tradeStatusValue: tradeStatusValue
|
|
17454
18402
|
};
|
|
17455
18403
|
})
|
|
17456
18404
|
}));
|
|
@@ -17564,6 +18512,7 @@ var index$3 = (function (props) {
|
|
|
17564
18512
|
deliveryState = _ref10.deliveryState,
|
|
17565
18513
|
vipCode = _ref10.vipCode,
|
|
17566
18514
|
shopCode = _ref10.shopCode,
|
|
18515
|
+
cancel = _ref10.cancel,
|
|
17567
18516
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17568
18517
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17569
18518
|
billNo: billNo,
|
|
@@ -17571,6 +18520,7 @@ var index$3 = (function (props) {
|
|
|
17571
18520
|
billTag: billTag,
|
|
17572
18521
|
tradeTagName: tradeTagName,
|
|
17573
18522
|
deliveryState: deliveryState,
|
|
18523
|
+
cancelName: cancel ? '是' : '否',
|
|
17574
18524
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17575
18525
|
vipCode: vipCode,
|
|
17576
18526
|
shopCode: shopCode
|
|
@@ -17760,6 +18710,31 @@ var componentMap$1 = {
|
|
|
17760
18710
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17761
18711
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17762
18712
|
}
|
|
18713
|
+
},
|
|
18714
|
+
KM_GOODS: {
|
|
18715
|
+
type: 'km',
|
|
18716
|
+
key: 'kmGoods',
|
|
18717
|
+
name: '快麦',
|
|
18718
|
+
orderNo: 'tid',
|
|
18719
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18720
|
+
eventNameMap: {
|
|
18721
|
+
// pubsub 事件
|
|
18722
|
+
type: 'kmType',
|
|
18723
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
18724
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18725
|
+
selectList: 'kmSelectList',
|
|
18726
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18727
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18728
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18729
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18730
|
+
reissueType: 'kmReissueType',
|
|
18731
|
+
returnType: 'kmReturnType',
|
|
18732
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18733
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18734
|
+
deleteGood: 'kmDeleteGood',
|
|
18735
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18736
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18737
|
+
}
|
|
17763
18738
|
}
|
|
17764
18739
|
};
|
|
17765
18740
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17768,7 +18743,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17768
18743
|
disabled = props.disabled,
|
|
17769
18744
|
onChange = props.onChange,
|
|
17770
18745
|
compType = props.type;
|
|
17771
|
-
console.log('value?.orders', value
|
|
18746
|
+
// console.log('value?.orders', value?.orders);
|
|
17772
18747
|
// 合并单订单会包含","
|
|
17773
18748
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17774
18749
|
var _order$componentMap$c;
|
|
@@ -17921,7 +18896,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17921
18896
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17922
18897
|
var mode = _ref2.mode;
|
|
17923
18898
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17924
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18899
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18900
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18901
|
+
});
|
|
17925
18902
|
var orderNo = value.orderNo;
|
|
17926
18903
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17927
18904
|
var _componentMap$compTyp;
|
|
@@ -17975,7 +18952,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17975
18952
|
_props$reasonList = props.reasonList,
|
|
17976
18953
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17977
18954
|
disabled = props.disabled,
|
|
17978
|
-
compType = props.type
|
|
18955
|
+
compType = props.type,
|
|
18956
|
+
isSettingConfig = props.isSettingConfig;
|
|
17979
18957
|
var valueRef = useRef({});
|
|
17980
18958
|
useEffect(function () {
|
|
17981
18959
|
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18067,7 +19045,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18067
19045
|
var newValue = _objectSpread2({}, value);
|
|
18068
19046
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18069
19047
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18070
|
-
if (['2'].includes(val[0])) {
|
|
19048
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18071
19049
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18072
19050
|
valueRef.current = newValue;
|
|
18073
19051
|
}
|
|
@@ -18089,7 +19067,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18089
19067
|
style: {
|
|
18090
19068
|
marginBottom: '8px'
|
|
18091
19069
|
},
|
|
18092
|
-
disabled: disabled,
|
|
19070
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18093
19071
|
allowClear: false,
|
|
18094
19072
|
options: reasonList,
|
|
18095
19073
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18271,7 +19249,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18271
19249
|
})));
|
|
18272
19250
|
};
|
|
18273
19251
|
|
|
18274
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19252
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18275
19253
|
var typeMap$1 = {
|
|
18276
19254
|
WDT_REISSUE_GOODS: {
|
|
18277
19255
|
key: 'wdtReissueGoods',
|
|
@@ -18292,13 +19270,14 @@ var typeMap$1 = {
|
|
|
18292
19270
|
}
|
|
18293
19271
|
};
|
|
18294
19272
|
var wdtReissue = function wdtReissue(props) {
|
|
18295
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19273
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18296
19274
|
var value = props.value,
|
|
18297
19275
|
onChange = props.onChange,
|
|
18298
19276
|
_props$reasonList = props.reasonList,
|
|
18299
19277
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18300
19278
|
disabled = props.disabled,
|
|
18301
19279
|
type = props.type,
|
|
19280
|
+
isSettingConfig = props.isSettingConfig,
|
|
18302
19281
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18303
19282
|
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) {
|
|
18304
19283
|
var _order$srcTid;
|
|
@@ -18362,11 +19341,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18362
19341
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18363
19342
|
var billNo = _ref2.billNo,
|
|
18364
19343
|
billType = _ref2.billType,
|
|
18365
|
-
billTag = _ref2.billTag
|
|
19344
|
+
billTag = _ref2.billTag,
|
|
19345
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18366
19346
|
return {
|
|
18367
19347
|
billNo: billNo,
|
|
18368
19348
|
billType: billType,
|
|
18369
|
-
billTag: billTag
|
|
19349
|
+
billTag: billTag,
|
|
19350
|
+
tradeStatusValue: tradeStatusValue
|
|
18370
19351
|
};
|
|
18371
19352
|
});
|
|
18372
19353
|
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]) || {}), {}, {
|
|
@@ -18449,7 +19430,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18449
19430
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18450
19431
|
};
|
|
18451
19432
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18452
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19433
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18453
19434
|
var newValue = _objectSpread2({}, value);
|
|
18454
19435
|
// 原订单商品
|
|
18455
19436
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18460,14 +19441,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18460
19441
|
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) {
|
|
18461
19442
|
return skuList.includes(item.uuid);
|
|
18462
19443
|
});
|
|
18463
|
-
console.log('商品发生变化', newValue[
|
|
19444
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18464
19445
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18465
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19446
|
+
}, [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]);
|
|
18466
19447
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18467
19448
|
var showChangeBtn = useMemo(function () {
|
|
18468
|
-
var _typeMap$
|
|
18469
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18470
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19449
|
+
var _typeMap$type24;
|
|
19450
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19451
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18471
19452
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18472
19453
|
gutter: 8,
|
|
18473
19454
|
wrap: true
|
|
@@ -18481,16 +19462,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18481
19462
|
}
|
|
18482
19463
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18483
19464
|
style: {
|
|
18484
|
-
marginBottom: '8px'
|
|
19465
|
+
marginBottom: '8px',
|
|
19466
|
+
width: '100%'
|
|
18485
19467
|
},
|
|
18486
19468
|
disabled: disabled,
|
|
18487
19469
|
allowClear: false,
|
|
18488
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19470
|
+
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)],
|
|
18489
19471
|
onChange: function onChange(val) {
|
|
18490
19472
|
return changeSystemOrderHandle(val);
|
|
18491
19473
|
},
|
|
18492
19474
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18493
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19475
|
+
}, ((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) {
|
|
18494
19476
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18495
19477
|
key: item.billNo,
|
|
18496
19478
|
value: item.billNo,
|
|
@@ -18506,12 +19488,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18506
19488
|
}
|
|
18507
19489
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18508
19490
|
style: {
|
|
18509
|
-
marginBottom: '8px'
|
|
19491
|
+
marginBottom: '8px',
|
|
19492
|
+
width: '100%'
|
|
18510
19493
|
},
|
|
18511
|
-
disabled: disabled,
|
|
19494
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18512
19495
|
allowClear: false,
|
|
18513
19496
|
options: reasonList,
|
|
18514
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19497
|
+
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)],
|
|
18515
19498
|
onChange: function onChange(val) {
|
|
18516
19499
|
return changeTypeHandle(val);
|
|
18517
19500
|
}
|
|
@@ -18523,7 +19506,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18523
19506
|
canUpdateNumber: showChangeBtn,
|
|
18524
19507
|
showChangeBtn: showChangeBtn,
|
|
18525
19508
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18526
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19509
|
+
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)],
|
|
18527
19510
|
onChange: function onChange(val) {
|
|
18528
19511
|
return changeGoodHandle(val);
|
|
18529
19512
|
},
|
|
@@ -18539,7 +19522,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18539
19522
|
})));
|
|
18540
19523
|
};
|
|
18541
19524
|
|
|
18542
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19525
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18543
19526
|
var typeMap$2 = {
|
|
18544
19527
|
JST_REISSUE_GOODS: {
|
|
18545
19528
|
compType: '补发',
|
|
@@ -18554,7 +19537,9 @@ var typeMap$2 = {
|
|
|
18554
19537
|
orderTypeKey: 'orderType',
|
|
18555
19538
|
oIdKey: 'oId',
|
|
18556
19539
|
outerOiIdKey: '',
|
|
18557
|
-
goodDetailsKey: 'items'
|
|
19540
|
+
goodDetailsKey: 'items',
|
|
19541
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19542
|
+
uniqueKey: 'uuid'
|
|
18558
19543
|
},
|
|
18559
19544
|
JST_RETURN_GOODS: {
|
|
18560
19545
|
compType: '退货',
|
|
@@ -18570,6 +19555,8 @@ var typeMap$2 = {
|
|
|
18570
19555
|
oIdKey: 'oId',
|
|
18571
19556
|
outerOiIdKey: '',
|
|
18572
19557
|
goodDetailsKey: 'items',
|
|
19558
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19559
|
+
uniqueKey: 'uuid',
|
|
18573
19560
|
eventNameMap: {
|
|
18574
19561
|
// pubsub 事件
|
|
18575
19562
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18577,16 +19564,32 @@ var typeMap$2 = {
|
|
|
18577
19564
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18578
19565
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18579
19566
|
}
|
|
19567
|
+
},
|
|
19568
|
+
KM_REISSUE_GOODS: {
|
|
19569
|
+
compType: '补发',
|
|
19570
|
+
key: 'kmReissueGoods',
|
|
19571
|
+
typeName: 'kmReissueType',
|
|
19572
|
+
systemOrder: 'kmSystemOrder',
|
|
19573
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19574
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19575
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
19576
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19577
|
+
orderTypeKey: 'orderType',
|
|
19578
|
+
oIdKey: 'billNo',
|
|
19579
|
+
outerOiIdKey: '',
|
|
19580
|
+
goodDetailsKey: 'subOrders',
|
|
19581
|
+
uniqueKey: 'id'
|
|
18580
19582
|
}
|
|
18581
19583
|
};
|
|
18582
19584
|
var PublicReissue = function PublicReissue(props) {
|
|
18583
|
-
var _typeMap$
|
|
19585
|
+
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;
|
|
18584
19586
|
var value = props.value,
|
|
18585
19587
|
onChange = props.onChange,
|
|
18586
19588
|
_props$reasonList = props.reasonList,
|
|
18587
19589
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18588
19590
|
disabled = props.disabled,
|
|
18589
19591
|
type = props.type,
|
|
19592
|
+
isSettingConfig = props.isSettingConfig,
|
|
18590
19593
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18591
19594
|
var getOrderFlag = useRef(false);
|
|
18592
19595
|
var _useState = useState(false),
|
|
@@ -18693,7 +19696,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18693
19696
|
}))));
|
|
18694
19697
|
};
|
|
18695
19698
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18696
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19699
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18697
19700
|
var mode = _ref4.mode,
|
|
18698
19701
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18699
19702
|
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];
|
|
@@ -18701,63 +19704,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18701
19704
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18702
19705
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18703
19706
|
});
|
|
18704
|
-
var
|
|
19707
|
+
var orderRest = undefined;
|
|
19708
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19709
|
+
orderRest = true;
|
|
19710
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19711
|
+
orderRest = {
|
|
19712
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19713
|
+
canEdit: true
|
|
19714
|
+
};
|
|
19715
|
+
}
|
|
19716
|
+
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) : [];
|
|
18705
19717
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18706
|
-
|
|
19718
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18707
19719
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18708
19720
|
}) : goodDetails;
|
|
19721
|
+
return list;
|
|
18709
19722
|
};
|
|
18710
19723
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18711
|
-
var _typeMap$
|
|
19724
|
+
var _typeMap$type21;
|
|
18712
19725
|
var newValue = _objectSpread2({}, value);
|
|
18713
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19726
|
+
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 || [];
|
|
18714
19727
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18715
19728
|
};
|
|
18716
19729
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18717
|
-
var _typeMap$
|
|
19730
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18718
19731
|
var newValue = _objectSpread2({}, value);
|
|
18719
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18720
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18721
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18722
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19732
|
+
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;
|
|
19733
|
+
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) {
|
|
19734
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19735
|
+
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) || [];
|
|
18723
19736
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18724
|
-
var _typeMap$
|
|
18725
|
-
return oItem[(_typeMap$
|
|
19737
|
+
var _typeMap$type25;
|
|
19738
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18726
19739
|
});
|
|
18727
|
-
newValue[(_typeMap$
|
|
18728
|
-
}
|
|
18729
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18730
|
-
var _typeMap$
|
|
18731
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18732
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18733
|
-
var _typeMap$
|
|
18734
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19740
|
+
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];
|
|
19741
|
+
}
|
|
19742
|
+
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])) {
|
|
19743
|
+
var _typeMap$type29;
|
|
19744
|
+
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)] = [];
|
|
19745
|
+
} 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])) {
|
|
19746
|
+
var _typeMap$type31;
|
|
19747
|
+
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({
|
|
18735
19748
|
mode: isStrict,
|
|
18736
19749
|
sysOrderNo: val
|
|
18737
19750
|
});
|
|
18738
19751
|
}
|
|
18739
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19752
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18740
19753
|
};
|
|
18741
19754
|
//显示选择商品按钮
|
|
18742
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19755
|
+
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]);
|
|
18743
19756
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18744
|
-
var _typeMap$
|
|
19757
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18745
19758
|
var newValue = _objectSpread2({}, value);
|
|
18746
19759
|
// 原订单商品
|
|
18747
19760
|
var originTradeGoodList = getGoodDetails({
|
|
18748
19761
|
mode: isStrict
|
|
18749
19762
|
}) || [];
|
|
18750
19763
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18751
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18752
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18753
|
-
|
|
19764
|
+
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)]) || [];
|
|
19765
|
+
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) {
|
|
19766
|
+
var _typeMap$type36;
|
|
19767
|
+
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]);
|
|
18754
19768
|
});
|
|
18755
19769
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18756
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19770
|
+
}, [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]);
|
|
18757
19771
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18758
19772
|
gutter: 8,
|
|
18759
19773
|
wrap: true,
|
|
18760
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19774
|
+
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())
|
|
18761
19775
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
18762
19776
|
className: "gutter-row",
|
|
18763
19777
|
xs: {
|
|
@@ -18768,16 +19782,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18768
19782
|
}
|
|
18769
19783
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18770
19784
|
style: {
|
|
18771
|
-
marginBottom: '8px'
|
|
19785
|
+
marginBottom: '8px',
|
|
19786
|
+
width: '100%'
|
|
18772
19787
|
},
|
|
18773
19788
|
disabled: disabled,
|
|
18774
19789
|
allowClear: false,
|
|
18775
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19790
|
+
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)],
|
|
18776
19791
|
onChange: function onChange(val) {
|
|
18777
19792
|
return changeSystemOrderHandle(val);
|
|
18778
19793
|
},
|
|
18779
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18780
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19794
|
+
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")
|
|
19795
|
+
}, ((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) {
|
|
18781
19796
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18782
19797
|
key: item[typeMap$2[type].oIdKey],
|
|
18783
19798
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18793,16 +19808,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18793
19808
|
}
|
|
18794
19809
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18795
19810
|
style: {
|
|
18796
|
-
marginBottom: '8px'
|
|
19811
|
+
marginBottom: '8px',
|
|
19812
|
+
width: '100%'
|
|
18797
19813
|
},
|
|
18798
|
-
disabled: disabled,
|
|
19814
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18799
19815
|
allowClear: false,
|
|
18800
19816
|
options: reasonList,
|
|
18801
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19817
|
+
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)],
|
|
18802
19818
|
onChange: function onChange(val) {
|
|
18803
19819
|
return changeTypeHandle(val);
|
|
18804
19820
|
}
|
|
18805
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19821
|
+
})), (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, {
|
|
18806
19822
|
className: "gutter-row",
|
|
18807
19823
|
xs: {
|
|
18808
19824
|
span: 11
|
|
@@ -18811,7 +19827,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18811
19827
|
span: 6
|
|
18812
19828
|
}
|
|
18813
19829
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
18814
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19830
|
+
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)],
|
|
18815
19831
|
disabled: disabled,
|
|
18816
19832
|
readOnly: true
|
|
18817
19833
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18821,10 +19837,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18821
19837
|
disabled: disabled,
|
|
18822
19838
|
canUpdateNumber: showChangeBtn,
|
|
18823
19839
|
showChangeBtn: showChangeBtn,
|
|
18824
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18825
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19840
|
+
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,
|
|
19841
|
+
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,
|
|
18826
19842
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18827
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19843
|
+
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)],
|
|
18828
19844
|
onChange: function onChange(val) {
|
|
18829
19845
|
return changeGoodHandle(val);
|
|
18830
19846
|
},
|
|
@@ -18835,6 +19851,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18835
19851
|
originDataSource: getGoodDetails({
|
|
18836
19852
|
mode: isStrict
|
|
18837
19853
|
}),
|
|
19854
|
+
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',
|
|
18838
19855
|
selectedGoodsChange: selectedGoodsChange
|
|
18839
19856
|
}
|
|
18840
19857
|
})));
|
|
@@ -19373,6 +20390,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19373
20390
|
var _props$value = props.value,
|
|
19374
20391
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19375
20392
|
onChange = props.onChange,
|
|
20393
|
+
onBlur = props.onBlur,
|
|
19376
20394
|
disabled = props.disabled,
|
|
19377
20395
|
_props$type = props.type,
|
|
19378
20396
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19454,6 +20472,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19454
20472
|
onChange: function onChange(e) {
|
|
19455
20473
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19456
20474
|
},
|
|
20475
|
+
onBlur: onBlur,
|
|
19457
20476
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19458
20477
|
})) : null) : null);
|
|
19459
20478
|
};
|
|
@@ -19595,6 +20614,64 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19595
20614
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19596
20615
|
};
|
|
19597
20616
|
|
|
20617
|
+
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
20618
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20619
|
+
var mode = props.mode,
|
|
20620
|
+
maxSelectCount = props.maxSelectCount,
|
|
20621
|
+
_props$showOnly = props.showOnly,
|
|
20622
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20623
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20624
|
+
_onChange = props.onChange,
|
|
20625
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20626
|
+
var _React$useState = React.useState([]),
|
|
20627
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20628
|
+
data = _React$useState2[0],
|
|
20629
|
+
setData = _React$useState2[1];
|
|
20630
|
+
React.useEffect(function () {
|
|
20631
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20632
|
+
setData(list);
|
|
20633
|
+
});
|
|
20634
|
+
}, []);
|
|
20635
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20636
|
+
var getValueString = function getValueString(value) {
|
|
20637
|
+
var list = options;
|
|
20638
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
20639
|
+
var _list$filter$map$join;
|
|
20640
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20641
|
+
return value.includes(item.value);
|
|
20642
|
+
}).map(function (item) {
|
|
20643
|
+
return item.label;
|
|
20644
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20645
|
+
} else {
|
|
20646
|
+
var selectedItem = list.find(function (item) {
|
|
20647
|
+
return item.value === value;
|
|
20648
|
+
});
|
|
20649
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20650
|
+
}
|
|
20651
|
+
};
|
|
20652
|
+
if (showOnly) {
|
|
20653
|
+
return getValueString(props.value);
|
|
20654
|
+
}
|
|
20655
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
20656
|
+
showArrow: true,
|
|
20657
|
+
showSearch: true,
|
|
20658
|
+
filterOption: function filterOption(input, option) {
|
|
20659
|
+
return option.label.includes(input);
|
|
20660
|
+
},
|
|
20661
|
+
notFoundContent: null
|
|
20662
|
+
}, otherProps), {}, {
|
|
20663
|
+
options: options,
|
|
20664
|
+
mode: mode,
|
|
20665
|
+
onChange: function onChange(value, option) {
|
|
20666
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
20667
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
20668
|
+
} else {
|
|
20669
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
20670
|
+
}
|
|
20671
|
+
}
|
|
20672
|
+
}));
|
|
20673
|
+
};
|
|
20674
|
+
|
|
19598
20675
|
var CalculationInput = function CalculationInput(props) {
|
|
19599
20676
|
var _props$config = props.config,
|
|
19600
20677
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19613,7 +20690,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19613
20690
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19614
20691
|
};
|
|
19615
20692
|
|
|
19616
|
-
var _excluded$
|
|
20693
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19617
20694
|
var typeMap$3 = {
|
|
19618
20695
|
BS_E3_REISSUE_GOODS: {
|
|
19619
20696
|
key: 'bsE3ReissueGoods',
|
|
@@ -19631,7 +20708,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19631
20708
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19632
20709
|
disabled = props.disabled,
|
|
19633
20710
|
type = props.type,
|
|
19634
|
-
|
|
20711
|
+
isSettingConfig = props.isSettingConfig,
|
|
20712
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19635
20713
|
var getOrderFlag = useRef(false);
|
|
19636
20714
|
var valueRef = useRef(null);
|
|
19637
20715
|
var _useState = useState(false),
|
|
@@ -19791,7 +20869,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19791
20869
|
}
|
|
19792
20870
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
19793
20871
|
style: {
|
|
19794
|
-
marginBottom: '8px'
|
|
20872
|
+
marginBottom: '8px',
|
|
20873
|
+
width: '100%'
|
|
19795
20874
|
},
|
|
19796
20875
|
disabled: disabled,
|
|
19797
20876
|
allowClear: false,
|
|
@@ -19816,9 +20895,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19816
20895
|
}
|
|
19817
20896
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
19818
20897
|
style: {
|
|
19819
|
-
marginBottom: '8px'
|
|
20898
|
+
marginBottom: '8px',
|
|
20899
|
+
width: '100%'
|
|
19820
20900
|
},
|
|
19821
|
-
disabled: disabled,
|
|
20901
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19822
20902
|
allowClear: false,
|
|
19823
20903
|
options: reasonList,
|
|
19824
20904
|
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)],
|
|
@@ -19849,7 +20929,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19849
20929
|
})));
|
|
19850
20930
|
};
|
|
19851
20931
|
|
|
19852
|
-
var
|
|
20932
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
20933
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
20934
|
+
styleInject(css_248z$c);
|
|
20935
|
+
|
|
20936
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19853
20937
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19854
20938
|
var typeMap$4 = {
|
|
19855
20939
|
GY_REISSUE_GOODS: {
|
|
@@ -19871,17 +20955,19 @@ var typeMap$4 = {
|
|
|
19871
20955
|
}
|
|
19872
20956
|
};
|
|
19873
20957
|
var GyReissue = function GyReissue(props) {
|
|
19874
|
-
var _typeMap$
|
|
20958
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19875
20959
|
var value = props.value,
|
|
19876
20960
|
onChange = props.onChange,
|
|
19877
20961
|
_props$reasonList = props.reasonList,
|
|
19878
20962
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19879
20963
|
disabled = props.disabled,
|
|
19880
20964
|
type = props.type,
|
|
19881
|
-
|
|
20965
|
+
isSettingConfig = props.isSettingConfig,
|
|
20966
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19882
20967
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19883
20968
|
// order?.platformCode?.includes(';'),
|
|
19884
20969
|
// );
|
|
20970
|
+
var getVipCodeFlag = useRef(false);
|
|
19885
20971
|
var getOrderFlag = useRef(false);
|
|
19886
20972
|
var valueRef = useRef(null);
|
|
19887
20973
|
var _useState = useState(false),
|
|
@@ -19889,23 +20975,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19889
20975
|
isStrict = _useState2[0],
|
|
19890
20976
|
setIsStrict = _useState2[1];
|
|
19891
20977
|
useEffect(function () {
|
|
19892
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20978
|
+
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;
|
|
19893
20979
|
valueRef.current = value;
|
|
19894
20980
|
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)) {
|
|
19895
20981
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19896
20982
|
getOrderFlag.current = true;
|
|
19897
20983
|
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);
|
|
20984
|
+
} 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)) {
|
|
20985
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20986
|
+
getVipCodeFlag.current = true;
|
|
20987
|
+
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);
|
|
19898
20988
|
}
|
|
19899
20989
|
return;
|
|
19900
20990
|
}, [value]);
|
|
19901
20991
|
var getOrderList = /*#__PURE__*/function () {
|
|
19902
20992
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19903
|
-
var _typeMap$
|
|
20993
|
+
var _typeMap$type7;
|
|
19904
20994
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19905
20995
|
while (1) switch (_context.prev = _context.next) {
|
|
19906
20996
|
case 0:
|
|
19907
|
-
(_typeMap$
|
|
19908
|
-
var _typeMap$
|
|
20997
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20998
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19909
20999
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19910
21000
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19911
21001
|
var billNo = _ref2.billNo,
|
|
@@ -19927,17 +21017,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19927
21017
|
shopCode: shopCode
|
|
19928
21018
|
});
|
|
19929
21019
|
});
|
|
21020
|
+
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]) || {}), {}, {
|
|
21021
|
+
showOrderInfo: showOrderInfo,
|
|
21022
|
+
orders: orders
|
|
21023
|
+
})), _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));
|
|
19930
21024
|
pushGyLog('getOrderList', {
|
|
19931
21025
|
before: valueRef.current,
|
|
19932
|
-
after:
|
|
19933
|
-
showOrderInfo: showOrderInfo,
|
|
19934
|
-
orders: orders
|
|
19935
|
-
})))
|
|
21026
|
+
after: newValue
|
|
19936
21027
|
});
|
|
19937
|
-
onChange(
|
|
19938
|
-
showOrderInfo: showOrderInfo,
|
|
19939
|
-
orders: orders
|
|
19940
|
-
}))));
|
|
21028
|
+
onChange(newValue);
|
|
19941
21029
|
});
|
|
19942
21030
|
case 1:
|
|
19943
21031
|
case "end":
|
|
@@ -19949,42 +21037,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19949
21037
|
return _ref.apply(this, arguments);
|
|
19950
21038
|
};
|
|
19951
21039
|
}();
|
|
21040
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21041
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21042
|
+
var _typeMap$type10;
|
|
21043
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21044
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21045
|
+
case 0:
|
|
21046
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21047
|
+
var _orders$3, _orders$4;
|
|
21048
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21049
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21050
|
+
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),
|
|
21051
|
+
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)
|
|
21052
|
+
});
|
|
21053
|
+
pushGyLog('getVipCode', {
|
|
21054
|
+
before: valueRef.current,
|
|
21055
|
+
after: newValue
|
|
21056
|
+
});
|
|
21057
|
+
onChange(newValue);
|
|
21058
|
+
}));
|
|
21059
|
+
case 1:
|
|
21060
|
+
case "end":
|
|
21061
|
+
return _context2.stop();
|
|
21062
|
+
}
|
|
21063
|
+
}, _callee2);
|
|
21064
|
+
}));
|
|
21065
|
+
return function getVipCode(_x2) {
|
|
21066
|
+
return _ref4.apply(this, arguments);
|
|
21067
|
+
};
|
|
21068
|
+
}();
|
|
19952
21069
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19953
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21070
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19954
21071
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19955
21072
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19956
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21073
|
+
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;
|
|
19957
21074
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19958
21075
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19959
|
-
newValue[(_typeMap$
|
|
21076
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19960
21077
|
if (typeName === '1') {
|
|
19961
|
-
var _typeMap$
|
|
19962
|
-
newValue[(_typeMap$
|
|
21078
|
+
var _typeMap$type13;
|
|
21079
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19963
21080
|
mode: isStrict
|
|
19964
21081
|
});
|
|
19965
21082
|
} else if (typeName === '2') {
|
|
19966
|
-
var _typeMap$
|
|
21083
|
+
var _typeMap$type14;
|
|
19967
21084
|
// 切换到非原单,清空列表
|
|
19968
|
-
newValue[(_typeMap$
|
|
21085
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19969
21086
|
}
|
|
19970
21087
|
pushGyLog('afterChangeType', newValue);
|
|
19971
21088
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19972
21089
|
};
|
|
19973
21090
|
var handleModeChange = function handleModeChange(mode) {
|
|
19974
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19975
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21091
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21092
|
+
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';
|
|
19976
21093
|
setIsStrict(mode);
|
|
19977
21094
|
if (!isOriginalOrder) return;
|
|
19978
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21095
|
+
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({
|
|
19979
21096
|
mode: mode
|
|
19980
21097
|
}))));
|
|
19981
21098
|
};
|
|
19982
21099
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19983
|
-
var _ref8, _typeMap$
|
|
21100
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19984
21101
|
var mode = _ref7.mode,
|
|
19985
21102
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19986
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19987
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21103
|
+
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];
|
|
21104
|
+
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];
|
|
19988
21105
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19989
21106
|
return order.code === systemOrderNo;
|
|
19990
21107
|
});
|
|
@@ -19995,29 +21112,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
19995
21112
|
}) : goodDetails;
|
|
19996
21113
|
};
|
|
19997
21114
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19998
|
-
var _typeMap$
|
|
21115
|
+
var _typeMap$type19;
|
|
19999
21116
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20000
21117
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20001
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20002
|
-
var _typeMap$
|
|
20003
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20004
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21118
|
+
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) {
|
|
21119
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21120
|
+
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;
|
|
21121
|
+
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;
|
|
20005
21122
|
return item;
|
|
20006
21123
|
});
|
|
20007
21124
|
pushGyLog('afterChangeGood', newValue);
|
|
20008
21125
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20009
21126
|
};
|
|
20010
21127
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20011
|
-
var _typeMap$
|
|
21128
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20012
21129
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20013
21130
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20014
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20015
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20016
|
-
var _typeMap$type22;
|
|
20017
|
-
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)] = [];
|
|
20018
|
-
} 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])) {
|
|
21131
|
+
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;
|
|
21132
|
+
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])) {
|
|
20019
21133
|
var _typeMap$type24;
|
|
20020
|
-
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)] =
|
|
21134
|
+
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)] = [];
|
|
21135
|
+
} 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])) {
|
|
21136
|
+
var _typeMap$type26;
|
|
21137
|
+
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({
|
|
20021
21138
|
mode: isStrict,
|
|
20022
21139
|
sysOrderNo: val
|
|
20023
21140
|
});
|
|
@@ -20026,7 +21143,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20026
21143
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20027
21144
|
};
|
|
20028
21145
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20029
|
-
var _ref12, _typeMap$
|
|
21146
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20030
21147
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20031
21148
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20032
21149
|
// 原订单商品
|
|
@@ -20034,67 +21151,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
20034
21151
|
mode: isStrict
|
|
20035
21152
|
}) || [];
|
|
20036
21153
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20037
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20038
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21154
|
+
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)]) || [];
|
|
21155
|
+
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) {
|
|
20039
21156
|
return skuList.includes(item.uuid);
|
|
20040
21157
|
});
|
|
20041
|
-
console.log('商品发生变化', newValue[
|
|
21158
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20042
21159
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20043
21160
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20044
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21161
|
+
}, [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]);
|
|
20045
21162
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20046
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20047
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21163
|
+
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];
|
|
21164
|
+
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]);
|
|
20048
21165
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20049
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
20050
|
-
id: "TEST_GY",
|
|
20051
|
-
onClick: function onClick() {
|
|
20052
|
-
console.log('TEST_GY', value);
|
|
20053
|
-
}
|
|
20054
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
21166
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20055
21167
|
gutter: 8,
|
|
20056
21168
|
wrap: true
|
|
20057
21169
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20058
21170
|
className: "gutter-row",
|
|
20059
21171
|
xs: {
|
|
20060
|
-
span:
|
|
21172
|
+
span: 12
|
|
20061
21173
|
},
|
|
20062
21174
|
sm: {
|
|
20063
|
-
span:
|
|
21175
|
+
span: 8
|
|
20064
21176
|
}
|
|
20065
21177
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20066
21178
|
style: {
|
|
20067
|
-
marginBottom: '8px'
|
|
21179
|
+
marginBottom: '8px',
|
|
21180
|
+
width: '100%'
|
|
20068
21181
|
},
|
|
20069
21182
|
disabled: disabled,
|
|
20070
21183
|
allowClear: false,
|
|
20071
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21184
|
+
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)],
|
|
20072
21185
|
onChange: function onChange(val) {
|
|
20073
21186
|
return changeSystemOrderHandle(val);
|
|
20074
21187
|
},
|
|
20075
21188
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20076
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21189
|
+
}, ((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) {
|
|
20077
21190
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21191
|
+
className: styles$5.systemNoDisabled,
|
|
20078
21192
|
key: item.billNo,
|
|
20079
21193
|
value: item.billNo,
|
|
20080
|
-
label: item.billNo
|
|
20081
|
-
|
|
21194
|
+
label: item.billNo,
|
|
21195
|
+
disabled: item.cancel
|
|
21196
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20082
21197
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20083
21198
|
className: "gutter-row",
|
|
20084
21199
|
xs: {
|
|
20085
|
-
span:
|
|
21200
|
+
span: 12
|
|
20086
21201
|
},
|
|
20087
21202
|
sm: {
|
|
20088
|
-
span:
|
|
21203
|
+
span: 4
|
|
20089
21204
|
}
|
|
20090
21205
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20091
21206
|
style: {
|
|
20092
|
-
marginBottom: '8px'
|
|
21207
|
+
marginBottom: '8px',
|
|
21208
|
+
width: '100%'
|
|
20093
21209
|
},
|
|
20094
|
-
disabled: disabled,
|
|
21210
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20095
21211
|
allowClear: false,
|
|
20096
21212
|
options: reasonList,
|
|
20097
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21213
|
+
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)],
|
|
20098
21214
|
onChange: function onChange(val) {
|
|
20099
21215
|
return changeTypeHandle(val);
|
|
20100
21216
|
}
|
|
@@ -20108,7 +21224,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20108
21224
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20109
21225
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20110
21226
|
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$
|
|
21227
|
+
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
21228
|
onChange: function onChange(val) {
|
|
20113
21229
|
return changeGoodHandle(val);
|
|
20114
21230
|
},
|
|
@@ -20123,7 +21239,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20123
21239
|
})));
|
|
20124
21240
|
};
|
|
20125
21241
|
|
|
20126
|
-
var _excluded$
|
|
21242
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20127
21243
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20128
21244
|
var typeMap$5 = {
|
|
20129
21245
|
GY_RETURN_GOODS: {
|
|
@@ -20145,14 +21261,15 @@ var typeMap$5 = {
|
|
|
20145
21261
|
}
|
|
20146
21262
|
};
|
|
20147
21263
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20148
|
-
var _typeMap$
|
|
21264
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20149
21265
|
var value = props.value,
|
|
20150
21266
|
onChange = props.onChange,
|
|
20151
21267
|
_props$reasonList = props.reasonList,
|
|
20152
21268
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20153
21269
|
disabled = props.disabled,
|
|
20154
21270
|
type = props.type,
|
|
20155
|
-
|
|
21271
|
+
isSettingConfig = props.isSettingConfig,
|
|
21272
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20156
21273
|
var valueRef = useRef({});
|
|
20157
21274
|
var getOrderFlag = useRef(false);
|
|
20158
21275
|
var _useState = useState(false),
|
|
@@ -20215,7 +21332,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20215
21332
|
while (1) switch (_context.prev = _context.next) {
|
|
20216
21333
|
case 0:
|
|
20217
21334
|
(_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;
|
|
21335
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20219
21336
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20220
21337
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20221
21338
|
var billNo = _ref2.billNo,
|
|
@@ -20237,10 +21354,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20237
21354
|
shopCode: shopCode
|
|
20238
21355
|
});
|
|
20239
21356
|
});
|
|
20240
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21357
|
+
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
21358
|
showOrderInfo: showOrderInfo,
|
|
20242
21359
|
orders: orders
|
|
20243
|
-
}))));
|
|
21360
|
+
})), _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
21361
|
});
|
|
20245
21362
|
case 1:
|
|
20246
21363
|
case "end":
|
|
@@ -20253,7 +21370,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20253
21370
|
};
|
|
20254
21371
|
}();
|
|
20255
21372
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20256
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21373
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20257
21374
|
var newValue = _objectSpread2({}, value);
|
|
20258
21375
|
// 原订单商品
|
|
20259
21376
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20264,49 +21381,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20264
21381
|
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
21382
|
return skuList.includes(item.uuid);
|
|
20266
21383
|
});
|
|
20267
|
-
console.log('商品发生变化', newValue[
|
|
21384
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20268
21385
|
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$
|
|
21386
|
+
}, [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
21387
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20271
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21388
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20272
21389
|
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$
|
|
21390
|
+
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
21391
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20275
21392
|
var newValue = _objectSpread2({}, value);
|
|
20276
|
-
newValue[(_typeMap$
|
|
21393
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20277
21394
|
if (typeName === '1') {
|
|
20278
|
-
var _typeMap$
|
|
20279
|
-
newValue[(_typeMap$
|
|
21395
|
+
var _typeMap$type12;
|
|
21396
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20280
21397
|
mode: isStrict
|
|
20281
21398
|
});
|
|
20282
21399
|
} else if (typeName === '2') {
|
|
20283
|
-
var _typeMap$
|
|
21400
|
+
var _typeMap$type13;
|
|
20284
21401
|
// 切换到非原单,清空列表
|
|
20285
|
-
newValue[(_typeMap$
|
|
21402
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20286
21403
|
}
|
|
20287
21404
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20288
21405
|
};
|
|
20289
21406
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20290
|
-
var _typeMap$
|
|
21407
|
+
var _typeMap$type14;
|
|
20291
21408
|
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$
|
|
21409
|
+
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) {
|
|
21410
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21411
|
+
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;
|
|
21412
|
+
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
21413
|
return item;
|
|
20297
21414
|
});
|
|
20298
21415
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20299
21416
|
};
|
|
20300
21417
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20301
|
-
var _typeMap$
|
|
21418
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20302
21419
|
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$
|
|
21420
|
+
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;
|
|
21421
|
+
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])) {
|
|
21422
|
+
var _typeMap$type19;
|
|
21423
|
+
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)] = [];
|
|
21424
|
+
} 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])) {
|
|
21425
|
+
var _typeMap$type21;
|
|
21426
|
+
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
21427
|
mode: isStrict,
|
|
20311
21428
|
sysOrderNo: val
|
|
20312
21429
|
});
|
|
@@ -20314,11 +21431,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20314
21431
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20315
21432
|
};
|
|
20316
21433
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20317
|
-
var _typeMap$
|
|
21434
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20318
21435
|
var mode = _ref4.mode,
|
|
20319
21436
|
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$
|
|
21437
|
+
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];
|
|
21438
|
+
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
21439
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20323
21440
|
return order.code === systemOrderNo;
|
|
20324
21441
|
});
|
|
@@ -20329,62 +21446,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20329
21446
|
}) : goodDetails;
|
|
20330
21447
|
};
|
|
20331
21448
|
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$
|
|
21449
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21450
|
+
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
21451
|
setIsStrict(mode);
|
|
20335
21452
|
if (!isOriginalOrder) return;
|
|
20336
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21453
|
+
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
21454
|
mode: mode
|
|
20338
21455
|
}))));
|
|
20339
21456
|
};
|
|
20340
21457
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20341
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21458
|
+
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];
|
|
20342
21459
|
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20343
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21460
|
+
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]);
|
|
20344
21461
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20345
21462
|
gutter: 8,
|
|
20346
21463
|
wrap: true
|
|
20347
21464
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20348
21465
|
className: "gutter-row",
|
|
20349
21466
|
xs: {
|
|
20350
|
-
span:
|
|
21467
|
+
span: 12
|
|
20351
21468
|
},
|
|
20352
21469
|
sm: {
|
|
20353
|
-
span:
|
|
21470
|
+
span: 8
|
|
20354
21471
|
}
|
|
20355
21472
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20356
21473
|
style: {
|
|
20357
|
-
marginBottom: '8px'
|
|
21474
|
+
marginBottom: '8px',
|
|
21475
|
+
width: '100%'
|
|
20358
21476
|
},
|
|
20359
21477
|
disabled: disabled,
|
|
20360
21478
|
allowClear: false,
|
|
20361
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21479
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20362
21480
|
onChange: function onChange(val) {
|
|
20363
21481
|
return changeSystemOrderHandle(val);
|
|
20364
21482
|
},
|
|
20365
21483
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20366
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21484
|
+
}, ((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) {
|
|
20367
21485
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21486
|
+
className: styles$5.systemNoDisabled,
|
|
20368
21487
|
key: item.billNo,
|
|
20369
21488
|
value: item.billNo,
|
|
20370
|
-
label: item.billNo
|
|
20371
|
-
|
|
21489
|
+
label: item.billNo,
|
|
21490
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21491
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20372
21492
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20373
21493
|
className: "gutter-row",
|
|
20374
21494
|
xs: {
|
|
20375
|
-
span:
|
|
21495
|
+
span: 12
|
|
20376
21496
|
},
|
|
20377
21497
|
sm: {
|
|
20378
|
-
span:
|
|
21498
|
+
span: 4
|
|
20379
21499
|
}
|
|
20380
21500
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20381
21501
|
style: {
|
|
20382
|
-
marginBottom: '8px'
|
|
21502
|
+
marginBottom: '8px',
|
|
21503
|
+
width: '100%'
|
|
20383
21504
|
},
|
|
20384
|
-
disabled: disabled,
|
|
21505
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20385
21506
|
allowClear: false,
|
|
20386
21507
|
options: reasonList,
|
|
20387
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21508
|
+
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)],
|
|
20388
21509
|
onChange: function onChange(val) {
|
|
20389
21510
|
return changeTypeHandle(val);
|
|
20390
21511
|
}
|
|
@@ -20396,7 +21517,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20396
21517
|
canUpdateNumber: showChangeBtn,
|
|
20397
21518
|
showChangeBtn: showChangeBtn,
|
|
20398
21519
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20399
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21520
|
+
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)],
|
|
20400
21521
|
onChange: function onChange(val) {
|
|
20401
21522
|
return changeGoodHandle(val);
|
|
20402
21523
|
},
|
|
@@ -20413,4 +21534,247 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20413
21534
|
})));
|
|
20414
21535
|
};
|
|
20415
21536
|
|
|
20416
|
-
|
|
21537
|
+
var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
21538
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21539
|
+
styleInject(css_248z$d);
|
|
21540
|
+
|
|
21541
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21542
|
+
var Dragger$1 = Upload.Dragger;
|
|
21543
|
+
var fn$4 = function fn() {
|
|
21544
|
+
return void 0;
|
|
21545
|
+
};
|
|
21546
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21547
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21548
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21549
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21550
|
+
_ref$maxSize = _ref.maxSize,
|
|
21551
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21552
|
+
_ref$onChange = _ref.onChange,
|
|
21553
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21554
|
+
_ref$value = _ref.value,
|
|
21555
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21556
|
+
_ref$disabled = _ref.disabled,
|
|
21557
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21558
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21559
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21560
|
+
_ref$canDownload = _ref.canDownload,
|
|
21561
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21562
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21563
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21564
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21565
|
+
var _useState = useState(false),
|
|
21566
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21567
|
+
visible = _useState2[0],
|
|
21568
|
+
setVisible = _useState2[1];
|
|
21569
|
+
var _useState3 = useState(''),
|
|
21570
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21571
|
+
fileUrl = _useState4[0],
|
|
21572
|
+
setFileUrl = _useState4[1];
|
|
21573
|
+
var _useState5 = useState(''),
|
|
21574
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21575
|
+
fileType = _useState6[0],
|
|
21576
|
+
setFileType = _useState6[1];
|
|
21577
|
+
var _useState7 = useState(''),
|
|
21578
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21579
|
+
fileName = _useState8[0],
|
|
21580
|
+
setFileName = _useState8[1];
|
|
21581
|
+
var valueRef = useRef(value);
|
|
21582
|
+
var uploadCount = useRef(0);
|
|
21583
|
+
var _useState9 = useState(false),
|
|
21584
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21585
|
+
uploading = _useState10[0],
|
|
21586
|
+
setUploading = _useState10[1];
|
|
21587
|
+
var fileList = useMemo(function () {
|
|
21588
|
+
return value.map(function (t, i) {
|
|
21589
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21590
|
+
percent: 100,
|
|
21591
|
+
uid: i + ''
|
|
21592
|
+
});
|
|
21593
|
+
});
|
|
21594
|
+
}, [value]);
|
|
21595
|
+
useEffect(function () {
|
|
21596
|
+
valueRef.current = value;
|
|
21597
|
+
}, [value]);
|
|
21598
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21599
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21600
|
+
var formData, fileName, _yield$request, success, data;
|
|
21601
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21602
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21603
|
+
case 0:
|
|
21604
|
+
setUploading(true);
|
|
21605
|
+
uploadCount.current++;
|
|
21606
|
+
formData = new FormData();
|
|
21607
|
+
formData.append('file', file);
|
|
21608
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21609
|
+
formData.append('fileName', fileName);
|
|
21610
|
+
_context.prev = 6;
|
|
21611
|
+
_context.next = 9;
|
|
21612
|
+
return request(actionUrl, {
|
|
21613
|
+
method: 'post',
|
|
21614
|
+
body: formData
|
|
21615
|
+
});
|
|
21616
|
+
case 9:
|
|
21617
|
+
_yield$request = _context.sent;
|
|
21618
|
+
success = _yield$request.success;
|
|
21619
|
+
data = _yield$request.data;
|
|
21620
|
+
if (success) {
|
|
21621
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21622
|
+
kmVideoName: file.name,
|
|
21623
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21624
|
+
}]));
|
|
21625
|
+
}
|
|
21626
|
+
_context.next = 18;
|
|
21627
|
+
break;
|
|
21628
|
+
case 15:
|
|
21629
|
+
_context.prev = 15;
|
|
21630
|
+
_context.t0 = _context["catch"](6);
|
|
21631
|
+
message.error('文件上传失败');
|
|
21632
|
+
case 18:
|
|
21633
|
+
_context.prev = 18;
|
|
21634
|
+
uploadCount.current--;
|
|
21635
|
+
if (uploadCount.current < 1) {
|
|
21636
|
+
setUploading(false);
|
|
21637
|
+
}
|
|
21638
|
+
return _context.finish(18);
|
|
21639
|
+
case 22:
|
|
21640
|
+
case "end":
|
|
21641
|
+
return _context.stop();
|
|
21642
|
+
}
|
|
21643
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21644
|
+
}));
|
|
21645
|
+
return function asyncUpload(_x) {
|
|
21646
|
+
return _ref2.apply(this, arguments);
|
|
21647
|
+
};
|
|
21648
|
+
}();
|
|
21649
|
+
var download = function download(url, name) {
|
|
21650
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21651
|
+
window.open(url);
|
|
21652
|
+
return;
|
|
21653
|
+
}
|
|
21654
|
+
fetch(url).then(function (res) {
|
|
21655
|
+
return res.blob();
|
|
21656
|
+
}).then(function (blob) {
|
|
21657
|
+
var a = document.createElement('a');
|
|
21658
|
+
document.body.appendChild(a);
|
|
21659
|
+
a.style.display = 'none';
|
|
21660
|
+
var url = window.URL.createObjectURL(blob);
|
|
21661
|
+
a.href = url;
|
|
21662
|
+
a.download = name;
|
|
21663
|
+
a.click();
|
|
21664
|
+
document.body.removeChild(a);
|
|
21665
|
+
window.URL.revokeObjectURL(url);
|
|
21666
|
+
});
|
|
21667
|
+
};
|
|
21668
|
+
var handleChange = function handleChange(list) {
|
|
21669
|
+
valueRef.current = list;
|
|
21670
|
+
onChange(list);
|
|
21671
|
+
};
|
|
21672
|
+
// 手动上传模式, 一直返回false
|
|
21673
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21674
|
+
// console.log('beforeUpload', file);
|
|
21675
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21676
|
+
// TODO: 批量提交的时候
|
|
21677
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21678
|
+
message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21679
|
+
return Upload.LIST_IGNORE;
|
|
21680
|
+
}
|
|
21681
|
+
if (!size) {
|
|
21682
|
+
message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21683
|
+
return Upload.LIST_IGNORE;
|
|
21684
|
+
}
|
|
21685
|
+
asyncUpload(file);
|
|
21686
|
+
return Upload.LIST_IGNORE;
|
|
21687
|
+
};
|
|
21688
|
+
var onRemove = function onRemove(file) {
|
|
21689
|
+
var newValue = value.filter(function (item) {
|
|
21690
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21691
|
+
});
|
|
21692
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21693
|
+
};
|
|
21694
|
+
var onPreview = function onPreview(file) {
|
|
21695
|
+
var _file$url;
|
|
21696
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21697
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21698
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21699
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21700
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21701
|
+
setFileType('video');
|
|
21702
|
+
setVisible(true);
|
|
21703
|
+
} else {
|
|
21704
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21705
|
+
}
|
|
21706
|
+
};
|
|
21707
|
+
var handleCancel = function handleCancel() {
|
|
21708
|
+
setFileUrl('');
|
|
21709
|
+
setFileName('');
|
|
21710
|
+
setVisible(false);
|
|
21711
|
+
};
|
|
21712
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
21713
|
+
spinning: uploading
|
|
21714
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
21715
|
+
className: styles$6.tips
|
|
21716
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
|
|
21717
|
+
className: styles$6.imageBox
|
|
21718
|
+
}, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
|
|
21719
|
+
disabled: disabled,
|
|
21720
|
+
multiple: true,
|
|
21721
|
+
name: "file",
|
|
21722
|
+
maxCount: maxCount,
|
|
21723
|
+
beforeUpload: beforeUpload,
|
|
21724
|
+
onPreview: onPreview,
|
|
21725
|
+
fileList: fileList.map(function (item) {
|
|
21726
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21727
|
+
url: item.kmVideoUrl,
|
|
21728
|
+
name: item.kmVideoName
|
|
21729
|
+
});
|
|
21730
|
+
}),
|
|
21731
|
+
onRemove: onRemove,
|
|
21732
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21733
|
+
iconRender: function iconRender(file) {
|
|
21734
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
21735
|
+
align: "center"
|
|
21736
|
+
}, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
|
|
21737
|
+
style: {
|
|
21738
|
+
fontSize: 16
|
|
21739
|
+
}
|
|
21740
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21741
|
+
}
|
|
21742
|
+
}, resetProps), /*#__PURE__*/React.createElement("span", {
|
|
21743
|
+
className: styles$6.addBtn
|
|
21744
|
+
}, "+"), /*#__PURE__*/React.createElement("p", {
|
|
21745
|
+
className: styles$6.addBtn
|
|
21746
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
|
|
21747
|
+
visible: visible,
|
|
21748
|
+
title: fileName,
|
|
21749
|
+
footer: null,
|
|
21750
|
+
onCancel: handleCancel
|
|
21751
|
+
}, canDownload ? /*#__PURE__*/React.createElement(Button, {
|
|
21752
|
+
type: "link",
|
|
21753
|
+
onClick: function onClick() {
|
|
21754
|
+
return download(fileUrl, fileName);
|
|
21755
|
+
}
|
|
21756
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
21757
|
+
text: fileUrl,
|
|
21758
|
+
onCopy: function onCopy() {
|
|
21759
|
+
message.success('复制成功');
|
|
21760
|
+
}
|
|
21761
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
21762
|
+
type: "link"
|
|
21763
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
21764
|
+
alt: "example",
|
|
21765
|
+
style: {
|
|
21766
|
+
width: '100%'
|
|
21767
|
+
},
|
|
21768
|
+
src: fileUrl
|
|
21769
|
+
}) : /*#__PURE__*/React.createElement("video", {
|
|
21770
|
+
style: {
|
|
21771
|
+
width: '100%',
|
|
21772
|
+
height: '100%'
|
|
21773
|
+
},
|
|
21774
|
+
autoPlay: true,
|
|
21775
|
+
controls: true,
|
|
21776
|
+
src: fileUrl
|
|
21777
|
+
}))));
|
|
21778
|
+
};
|
|
21779
|
+
|
|
21780
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|