@kmkf-fe-packages/basic-components 2.0.0-rc.12 → 2.0.0-rc.14
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 +1270 -340
- package/dist/index.js +1270 -339
- package/dist/src/apaas/ApaasLogistics/index.d.ts +1 -0
- package/dist/src/bs/component/model/GyGoodsList.d.ts +36 -0
- package/dist/src/bs/component/model/GyGoodsModal.d.ts +12 -0
- package/dist/src/constants/bs.d.ts +3 -0
- package/dist/src/constants/defaultColumns.d.ts +3 -0
- package/dist/src/constants/gy.d.ts +3 -0
- package/dist/src/gy/Reissue/index.d.ts +3 -0
- package/dist/src/gy/common/index.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/jst/Goods/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } 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, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG,
|
|
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, 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, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -7361,7 +7361,8 @@ var Province = function Province(props) {
|
|
|
7361
7361
|
var mapping = {
|
|
7362
7362
|
workOrder: AddressData.getInstance(),
|
|
7363
7363
|
bs: BsAddressData.getInstance(),
|
|
7364
|
-
wdt: WdtAddressData.getInstance()
|
|
7364
|
+
wdt: WdtAddressData.getInstance(),
|
|
7365
|
+
gy: GyAddressData.getInstance()
|
|
7365
7366
|
};
|
|
7366
7367
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7367
7368
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7466,6 +7467,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7466
7467
|
var addressData = (type && {
|
|
7467
7468
|
bs: BsAddressData,
|
|
7468
7469
|
wdt: WdtAddressData,
|
|
7470
|
+
gy: GyAddressData,
|
|
7469
7471
|
workOrder: AddressData
|
|
7470
7472
|
}[type] || AddressData).getInstance();
|
|
7471
7473
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -7547,11 +7549,13 @@ function ApaasPosting(props) {
|
|
|
7547
7549
|
});
|
|
7548
7550
|
}
|
|
7549
7551
|
|
|
7550
|
-
var _excluded$a = ["value", "onChange", "platformType"];
|
|
7552
|
+
var _excluded$a = ["value", "onChange", "platformType", "type"];
|
|
7551
7553
|
function ApaasLogistics(props) {
|
|
7552
7554
|
var value = props.value,
|
|
7553
7555
|
onChange = props.onChange,
|
|
7554
7556
|
platformType = props.platformType,
|
|
7557
|
+
_props$type = props.type,
|
|
7558
|
+
type = _props$type === void 0 ? 'select' : _props$type,
|
|
7555
7559
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7556
7560
|
var _useState = useState([]),
|
|
7557
7561
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7582,7 +7586,14 @@ function ApaasLogistics(props) {
|
|
|
7582
7586
|
isFirst.current = true;
|
|
7583
7587
|
}
|
|
7584
7588
|
}, []);
|
|
7585
|
-
|
|
7589
|
+
var handleInputChange = function handleInputChange(e) {
|
|
7590
|
+
var val = e.target.value;
|
|
7591
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
7592
|
+
};
|
|
7593
|
+
return type === 'input' ? /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7594
|
+
value: value,
|
|
7595
|
+
onChange: handleInputChange
|
|
7596
|
+
})) : /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7586
7597
|
value: value,
|
|
7587
7598
|
onChange: onChange,
|
|
7588
7599
|
options: option,
|
|
@@ -8116,11 +8127,6 @@ function ApaasAddress(props) {
|
|
|
8116
8127
|
};
|
|
8117
8128
|
var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
8118
8129
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
8119
|
-
// params.address = [
|
|
8120
|
-
// addressData.getProCodeByName(val?.province),
|
|
8121
|
-
// addressData.getProCodeByName(val?.city),
|
|
8122
|
-
// addressData.getProCodeByName(val?.district),
|
|
8123
|
-
// ];
|
|
8124
8130
|
params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
|
|
8125
8131
|
}
|
|
8126
8132
|
onChange === null || onChange === void 0 ? void 0 : onChange(params);
|
|
@@ -11012,13 +11018,15 @@ var jstGoods = function jstGoods(props) {
|
|
|
11012
11018
|
_props$showField = props.showField,
|
|
11013
11019
|
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
11014
11020
|
_props$platformType = props.platformType,
|
|
11015
|
-
platformType = _props$platformType === void 0 ? 'default' : _props$platformType
|
|
11021
|
+
platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
|
|
11022
|
+
onlyShowFieldSelect = props.onlyShowFieldSelect;
|
|
11016
11023
|
var _useState = useState(0),
|
|
11017
11024
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11018
11025
|
changeIndex = _useState2[0],
|
|
11019
11026
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11020
11027
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
11021
|
-
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
11028
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11029
|
+
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
11022
11030
|
useEffect(function () {
|
|
11023
11031
|
//没有值塞个默认值
|
|
11024
11032
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
@@ -11050,10 +11058,12 @@ var jstGoods = function jstGoods(props) {
|
|
|
11050
11058
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
11051
11059
|
}));
|
|
11052
11060
|
};
|
|
11053
|
-
var handleSelected = function handleSelected(val, type, option) {
|
|
11061
|
+
var handleSelected = function handleSelected(val, type, option, onlyShowFieldSelect) {
|
|
11054
11062
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
11055
11063
|
changeOrderInfo[type] = val;
|
|
11056
|
-
|
|
11064
|
+
if (!onlyShowFieldSelect) {
|
|
11065
|
+
changeOrderInfo['sendId'] = option.value;
|
|
11066
|
+
}
|
|
11057
11067
|
if (isSelectName && type === 'sendName') {
|
|
11058
11068
|
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
11059
11069
|
}
|
|
@@ -11092,24 +11102,32 @@ var jstGoods = function jstGoods(props) {
|
|
|
11092
11102
|
return setChangeIndex(index);
|
|
11093
11103
|
}
|
|
11094
11104
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11095
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
11105
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
|
|
11106
|
+
type: logisticsType,
|
|
11096
11107
|
disabled: disabled,
|
|
11097
11108
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11098
11109
|
onChange: function onChange(val) {
|
|
11099
|
-
|
|
11110
|
+
if (logisticsType === 'input') {
|
|
11111
|
+
changeInputHandle(null, 'logisticsCompany');
|
|
11112
|
+
changeInputHandle(val, 'logisticsCompanyName');
|
|
11113
|
+
} else {
|
|
11114
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11115
|
+
}
|
|
11100
11116
|
},
|
|
11101
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex
|
|
11117
|
+
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
|
|
11118
|
+
}, logisticsType === 'input' ? {} : {
|
|
11102
11119
|
showSearch: true,
|
|
11120
|
+
dropdownMatchSelectWidth: false,
|
|
11103
11121
|
filterOption: function filterOption(input, option) {
|
|
11104
11122
|
return option.label.includes(input);
|
|
11105
|
-
}
|
|
11106
|
-
|
|
11123
|
+
}
|
|
11124
|
+
}), {}, {
|
|
11107
11125
|
style: {
|
|
11108
11126
|
minWidth: '100px',
|
|
11109
11127
|
maxWidth: '180px'
|
|
11110
11128
|
},
|
|
11111
11129
|
platformType: platformType
|
|
11112
|
-
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11130
|
+
})) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11113
11131
|
disabled: disabled,
|
|
11114
11132
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11115
11133
|
onChange: function onChange(e) {
|
|
@@ -11149,7 +11167,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11149
11167
|
filterOption: filterOption,
|
|
11150
11168
|
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11151
11169
|
onChange: function onChange(value, option) {
|
|
11152
|
-
return handleSelected(value, 'sendName', option);
|
|
11170
|
+
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11153
11171
|
}
|
|
11154
11172
|
}) : /*#__PURE__*/React.createElement(Input, {
|
|
11155
11173
|
disabled: disabled,
|
|
@@ -12493,102 +12511,435 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12493
12511
|
};
|
|
12494
12512
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12495
12513
|
|
|
12496
|
-
var
|
|
12497
|
-
var
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
},
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
width: 150
|
|
12535
|
-
}, {
|
|
12536
|
-
dataIndex: 'colorCode',
|
|
12537
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
12538
|
-
width: 150
|
|
12539
|
-
}, {
|
|
12540
|
-
dataIndex: 'sizeName',
|
|
12541
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12542
|
-
width: 150
|
|
12543
|
-
}, {
|
|
12544
|
-
dataIndex: 'sizeCode',
|
|
12545
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12546
|
-
width: 150
|
|
12547
|
-
}, {
|
|
12548
|
-
dataIndex: 'brandName',
|
|
12549
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
12550
|
-
width: 150
|
|
12551
|
-
}, {
|
|
12552
|
-
dataIndex: 'goodsNumber',
|
|
12553
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12554
|
-
width: 150
|
|
12555
|
-
}, {
|
|
12556
|
-
dataIndex: 'goodsPrice',
|
|
12557
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12558
|
-
width: 150
|
|
12559
|
-
}, {
|
|
12560
|
-
dataIndex: 'shopPrice',
|
|
12561
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12562
|
-
width: 150
|
|
12563
|
-
}, {
|
|
12564
|
-
dataIndex: 'isGift',
|
|
12565
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
12566
|
-
width: 150,
|
|
12567
|
-
render: function render(val) {
|
|
12568
|
-
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12514
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12515
|
+
var current = _ref.current,
|
|
12516
|
+
pageSize = _ref.pageSize;
|
|
12517
|
+
var data = {
|
|
12518
|
+
skuName: formData.skuName || null,
|
|
12519
|
+
skuCode: formData.skuCode || null,
|
|
12520
|
+
goodName: formData.goodName || null,
|
|
12521
|
+
goodNo: formData.goodNo || null
|
|
12522
|
+
};
|
|
12523
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12524
|
+
method: 'post',
|
|
12525
|
+
data: _objectSpread2({
|
|
12526
|
+
pageSize: pageSize,
|
|
12527
|
+
pageNo: current,
|
|
12528
|
+
platform: 'GY_ERP'
|
|
12529
|
+
}, data)
|
|
12530
|
+
}).then(function (res) {
|
|
12531
|
+
var _res$data = res.data,
|
|
12532
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12533
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12534
|
+
_res$data$total = _res$data.total,
|
|
12535
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12536
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12537
|
+
return _objectSpread2({}, item);
|
|
12538
|
+
});
|
|
12539
|
+
return {
|
|
12540
|
+
total: total,
|
|
12541
|
+
list: newProducts
|
|
12542
|
+
};
|
|
12543
|
+
});
|
|
12544
|
+
};
|
|
12545
|
+
var columns$3 = [{
|
|
12546
|
+
dataIndex: 'index',
|
|
12547
|
+
title: 'NO',
|
|
12548
|
+
render: function render(val, record, index) {
|
|
12549
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12550
|
+
style: {
|
|
12551
|
+
width: 25
|
|
12569
12552
|
}
|
|
12570
|
-
}
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12553
|
+
}, index + 1);
|
|
12554
|
+
},
|
|
12555
|
+
width: 80
|
|
12556
|
+
}, {
|
|
12557
|
+
dataIndex: 'specName',
|
|
12558
|
+
title: 'SKU名称',
|
|
12559
|
+
width: 250,
|
|
12560
|
+
ellipsis: true
|
|
12561
|
+
}, {
|
|
12562
|
+
dataIndex: 'specNo',
|
|
12563
|
+
title: 'SKU编码',
|
|
12564
|
+
width: 200,
|
|
12565
|
+
ellipsis: true
|
|
12566
|
+
}, {
|
|
12567
|
+
dataIndex: 'goodName',
|
|
12568
|
+
title: '商品名称',
|
|
12569
|
+
width: 250,
|
|
12570
|
+
ellipsis: true
|
|
12571
|
+
}, {
|
|
12572
|
+
dataIndex: 'goodShortName',
|
|
12573
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12574
|
+
ellipsis: true,
|
|
12575
|
+
width: 250
|
|
12576
|
+
}, {
|
|
12577
|
+
dataIndex: 'goodNo',
|
|
12578
|
+
title: '商品编码',
|
|
12579
|
+
width: 200,
|
|
12580
|
+
ellipsis: true
|
|
12581
|
+
}, {
|
|
12582
|
+
dataIndex: 'goodPicUrl',
|
|
12583
|
+
title: '商品图片',
|
|
12584
|
+
width: 100,
|
|
12585
|
+
render: function render(picUrl) {
|
|
12586
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
12587
|
+
style: {
|
|
12588
|
+
width: '40px',
|
|
12589
|
+
height: '40px',
|
|
12590
|
+
objectFit: 'contain'
|
|
12591
|
+
},
|
|
12592
|
+
src: picUrl
|
|
12593
|
+
});
|
|
12594
|
+
}
|
|
12595
|
+
}, {
|
|
12596
|
+
dataIndex: 'brandName',
|
|
12597
|
+
title: '品牌名称',
|
|
12598
|
+
width: 200,
|
|
12599
|
+
ellipsis: true
|
|
12600
|
+
}, {
|
|
12601
|
+
dataIndex: 'retailPrice',
|
|
12602
|
+
title: "\u6807\u51C6\u552E\u4EF7",
|
|
12603
|
+
ellipsis: true,
|
|
12604
|
+
width: 100
|
|
12605
|
+
}, {
|
|
12606
|
+
dataIndex: 'costPrice',
|
|
12607
|
+
title: "\u6210\u672C\u4EF7",
|
|
12608
|
+
ellipsis: true,
|
|
12609
|
+
width: 100
|
|
12610
|
+
}];
|
|
12611
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12612
|
+
var _useState = useState([]),
|
|
12613
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12614
|
+
selectList = _useState2[0],
|
|
12615
|
+
setSelect = _useState2[1];
|
|
12616
|
+
var _useState3 = useState([]),
|
|
12617
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12618
|
+
selectIds = _useState4[0],
|
|
12619
|
+
setSelectIds = _useState4[1];
|
|
12620
|
+
useImperativeHandle(ref, function () {
|
|
12621
|
+
return {
|
|
12622
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12623
|
+
return selectList;
|
|
12624
|
+
}
|
|
12625
|
+
};
|
|
12626
|
+
});
|
|
12627
|
+
var _Form$useForm = Form.useForm(),
|
|
12628
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12629
|
+
form = _Form$useForm2[0];
|
|
12630
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
12631
|
+
defaultPageSize: 10,
|
|
12632
|
+
form: form
|
|
12633
|
+
}),
|
|
12634
|
+
tableProps = _useAntdTable.tableProps,
|
|
12635
|
+
search = _useAntdTable.search,
|
|
12636
|
+
params = _useAntdTable.params;
|
|
12637
|
+
var submit = search.submit,
|
|
12638
|
+
reset = search.reset;
|
|
12639
|
+
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12640
|
+
layout: "inline",
|
|
12641
|
+
form: form
|
|
12642
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12643
|
+
name: "skuName",
|
|
12644
|
+
style: {
|
|
12645
|
+
marginBottom: '12px'
|
|
12646
|
+
}
|
|
12647
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12648
|
+
placeholder: "\u5546\u54C1sku\u540D\u79F0",
|
|
12649
|
+
allowClear: true,
|
|
12650
|
+
style: {
|
|
12577
12651
|
width: 150
|
|
12578
|
-
}
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12652
|
+
}
|
|
12653
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12654
|
+
name: "skuCode",
|
|
12655
|
+
style: {
|
|
12656
|
+
marginBottom: '12px'
|
|
12657
|
+
}
|
|
12658
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12659
|
+
placeholder: "\u5546\u54C1sku\u7F16\u7801",
|
|
12660
|
+
allowClear: true,
|
|
12661
|
+
style: {
|
|
12583
12662
|
width: 150
|
|
12584
|
-
}
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12663
|
+
}
|
|
12664
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12665
|
+
name: "goodName",
|
|
12666
|
+
style: {
|
|
12667
|
+
marginBottom: '12px'
|
|
12668
|
+
}
|
|
12669
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12670
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12671
|
+
allowClear: true,
|
|
12672
|
+
style: {
|
|
12589
12673
|
width: 150
|
|
12590
|
-
}
|
|
12591
|
-
|
|
12674
|
+
}
|
|
12675
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12676
|
+
name: "goodNo",
|
|
12677
|
+
style: {
|
|
12678
|
+
marginBottom: '12px'
|
|
12679
|
+
}
|
|
12680
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12681
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12682
|
+
allowClear: true,
|
|
12683
|
+
style: {
|
|
12684
|
+
width: 150
|
|
12685
|
+
}
|
|
12686
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12687
|
+
style: {
|
|
12688
|
+
marginBottom: '12px'
|
|
12689
|
+
}
|
|
12690
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12691
|
+
type: "primary",
|
|
12692
|
+
style: {
|
|
12693
|
+
marginRight: '8px'
|
|
12694
|
+
},
|
|
12695
|
+
onClick: submit
|
|
12696
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12697
|
+
onClick: reset
|
|
12698
|
+
}, "\u91CD\u7F6E")));
|
|
12699
|
+
var rowSelection = {
|
|
12700
|
+
selectedRowKeys: selectIds,
|
|
12701
|
+
fixed: true,
|
|
12702
|
+
onSelect: function onSelect(record, selected) {
|
|
12703
|
+
if (selected) {
|
|
12704
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12705
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12706
|
+
} else {
|
|
12707
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12708
|
+
return t !== record.specNo;
|
|
12709
|
+
}));
|
|
12710
|
+
setSelect(selectList.filter(function (t) {
|
|
12711
|
+
return t.specNo !== record.specNo;
|
|
12712
|
+
}));
|
|
12713
|
+
}
|
|
12714
|
+
},
|
|
12715
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12716
|
+
if (selected) {
|
|
12717
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12718
|
+
return t.specNo;
|
|
12719
|
+
}))));
|
|
12720
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12721
|
+
} else {
|
|
12722
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12723
|
+
return t.specNo;
|
|
12724
|
+
})));
|
|
12725
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12726
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12727
|
+
});
|
|
12728
|
+
setSelect(list);
|
|
12729
|
+
}
|
|
12730
|
+
}
|
|
12731
|
+
};
|
|
12732
|
+
var showTable = function showTable() {
|
|
12733
|
+
var handleDelete = function handleDelete(record) {
|
|
12734
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12735
|
+
return t !== record.specNo;
|
|
12736
|
+
}));
|
|
12737
|
+
setSelect(selectList.filter(function (t) {
|
|
12738
|
+
return t.specNo !== record.specNo;
|
|
12739
|
+
}));
|
|
12740
|
+
};
|
|
12741
|
+
var showColumns = [{
|
|
12742
|
+
dataIndex: '',
|
|
12743
|
+
title: "\u64CD\u4F5C",
|
|
12744
|
+
ellipsis: true,
|
|
12745
|
+
width: 100,
|
|
12746
|
+
render: function render(val, record) {
|
|
12747
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
12748
|
+
type: "link",
|
|
12749
|
+
onClick: function onClick() {
|
|
12750
|
+
return handleDelete(record);
|
|
12751
|
+
}
|
|
12752
|
+
}, "\u5220\u9664");
|
|
12753
|
+
}
|
|
12754
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
12755
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12756
|
+
style: {
|
|
12757
|
+
width: '100%',
|
|
12758
|
+
maxWidth: '387px'
|
|
12759
|
+
}
|
|
12760
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
12761
|
+
columns: showColumns,
|
|
12762
|
+
rowKey: 'specNo',
|
|
12763
|
+
dataSource: selectList,
|
|
12764
|
+
scroll: {
|
|
12765
|
+
x: '100%',
|
|
12766
|
+
y: 250
|
|
12767
|
+
},
|
|
12768
|
+
pagination: {
|
|
12769
|
+
size: 'small',
|
|
12770
|
+
total: selectIds.length,
|
|
12771
|
+
pageSize: 10,
|
|
12772
|
+
showSizeChanger: false
|
|
12773
|
+
}
|
|
12774
|
+
})) : null;
|
|
12775
|
+
};
|
|
12776
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12777
|
+
style: {
|
|
12778
|
+
marginTop: '4px'
|
|
12779
|
+
}
|
|
12780
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12781
|
+
rowSelection: rowSelection,
|
|
12782
|
+
rowKey: "specNo",
|
|
12783
|
+
columns: columns$3,
|
|
12784
|
+
scroll: {
|
|
12785
|
+
x: '100%',
|
|
12786
|
+
y: 250
|
|
12787
|
+
}
|
|
12788
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12789
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12790
|
+
return triggerNode.parentElement;
|
|
12791
|
+
},
|
|
12792
|
+
content: showTable(),
|
|
12793
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12794
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12795
|
+
danger: true,
|
|
12796
|
+
type: "text"
|
|
12797
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12798
|
+
};
|
|
12799
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
12800
|
+
|
|
12801
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12802
|
+
useImperativeHandle(ref, function () {
|
|
12803
|
+
return {
|
|
12804
|
+
open: function open() {
|
|
12805
|
+
setVisible(true);
|
|
12806
|
+
}
|
|
12807
|
+
};
|
|
12808
|
+
});
|
|
12809
|
+
var onSubmit = props.onSubmit,
|
|
12810
|
+
width = props.width;
|
|
12811
|
+
var _useState = useState(false),
|
|
12812
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12813
|
+
visible = _useState2[0],
|
|
12814
|
+
setVisible = _useState2[1];
|
|
12815
|
+
var gyGoodsListRef = useRef(null);
|
|
12816
|
+
var _onCancel = function onCancel() {
|
|
12817
|
+
setVisible(false);
|
|
12818
|
+
};
|
|
12819
|
+
var onOk = function onOk() {
|
|
12820
|
+
var _gyGoodsListRef$curre;
|
|
12821
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12822
|
+
onSubmit(selectedList);
|
|
12823
|
+
_onCancel();
|
|
12824
|
+
};
|
|
12825
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12826
|
+
title: '选择商品',
|
|
12827
|
+
okText: '确认',
|
|
12828
|
+
cancelText: '取消',
|
|
12829
|
+
visible: visible,
|
|
12830
|
+
width: width || 850,
|
|
12831
|
+
onCancel: function onCancel() {
|
|
12832
|
+
_onCancel();
|
|
12833
|
+
},
|
|
12834
|
+
onOk: onOk,
|
|
12835
|
+
wrapClassName: "goodModal"
|
|
12836
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
12837
|
+
ref: gyGoodsListRef
|
|
12838
|
+
})));
|
|
12839
|
+
};
|
|
12840
|
+
var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
12841
|
+
|
|
12842
|
+
var getColumns = function getColumns(_ref) {
|
|
12843
|
+
var _ref$text = _ref.text,
|
|
12844
|
+
disabled = _ref.disabled,
|
|
12845
|
+
updateHandle = _ref.updateHandle;
|
|
12846
|
+
return {
|
|
12847
|
+
//百胜E3补发商品
|
|
12848
|
+
BS_E3_REISSUE_GOODS: [{
|
|
12849
|
+
dataIndex: 'sku',
|
|
12850
|
+
title: "SKU",
|
|
12851
|
+
width: 150
|
|
12852
|
+
}, {
|
|
12853
|
+
dataIndex: 'skuId',
|
|
12854
|
+
title: "SKU ID",
|
|
12855
|
+
width: 150
|
|
12856
|
+
}, {
|
|
12857
|
+
dataIndex: 'goodsName',
|
|
12858
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12859
|
+
width: 150
|
|
12860
|
+
}, {
|
|
12861
|
+
dataIndex: 'goodsShortName',
|
|
12862
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12863
|
+
width: 150
|
|
12864
|
+
}, {
|
|
12865
|
+
dataIndex: 'picPath',
|
|
12866
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12867
|
+
width: 150,
|
|
12868
|
+
render: function render(val) {
|
|
12869
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12870
|
+
width: 60,
|
|
12871
|
+
src: val
|
|
12872
|
+
});
|
|
12873
|
+
}
|
|
12874
|
+
}, {
|
|
12875
|
+
dataIndex: 'goodsSn',
|
|
12876
|
+
title: "\u8D27\u53F7",
|
|
12877
|
+
width: 150
|
|
12878
|
+
}, {
|
|
12879
|
+
dataIndex: 'goodsId',
|
|
12880
|
+
title: "\u8D27\u53F7ID",
|
|
12881
|
+
width: 150
|
|
12882
|
+
}, {
|
|
12883
|
+
dataIndex: 'colorName',
|
|
12884
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12885
|
+
width: 150
|
|
12886
|
+
}, {
|
|
12887
|
+
dataIndex: 'colorCode',
|
|
12888
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12889
|
+
width: 150
|
|
12890
|
+
}, {
|
|
12891
|
+
dataIndex: 'sizeName',
|
|
12892
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12893
|
+
width: 150
|
|
12894
|
+
}, {
|
|
12895
|
+
dataIndex: 'sizeCode',
|
|
12896
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12897
|
+
width: 150
|
|
12898
|
+
}, {
|
|
12899
|
+
dataIndex: 'brandName',
|
|
12900
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12901
|
+
width: 150
|
|
12902
|
+
}, {
|
|
12903
|
+
dataIndex: 'goodsNumber',
|
|
12904
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12905
|
+
width: 150
|
|
12906
|
+
}, {
|
|
12907
|
+
dataIndex: 'goodsPrice',
|
|
12908
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12909
|
+
width: 150
|
|
12910
|
+
}, {
|
|
12911
|
+
dataIndex: 'shopPrice',
|
|
12912
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12913
|
+
width: 150
|
|
12914
|
+
}, {
|
|
12915
|
+
dataIndex: 'isGift',
|
|
12916
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12917
|
+
width: 150,
|
|
12918
|
+
render: function render(val) {
|
|
12919
|
+
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12920
|
+
}
|
|
12921
|
+
}],
|
|
12922
|
+
//百胜E3商品信息
|
|
12923
|
+
BS_E3_GOODS: [{
|
|
12924
|
+
dataIndex: 'sku',
|
|
12925
|
+
title: "SKU",
|
|
12926
|
+
align: 'center',
|
|
12927
|
+
ellipsis: true,
|
|
12928
|
+
width: 150
|
|
12929
|
+
}, {
|
|
12930
|
+
dataIndex: 'skuId',
|
|
12931
|
+
title: "SKU ID",
|
|
12932
|
+
align: 'center',
|
|
12933
|
+
ellipsis: true,
|
|
12934
|
+
width: 150
|
|
12935
|
+
}, {
|
|
12936
|
+
dataIndex: 'goodsName',
|
|
12937
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12938
|
+
align: 'center',
|
|
12939
|
+
ellipsis: true,
|
|
12940
|
+
width: 150
|
|
12941
|
+
}, {
|
|
12942
|
+
dataIndex: 'goodsShortName',
|
|
12592
12943
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12593
12944
|
align: 'center',
|
|
12594
12945
|
ellipsis: true,
|
|
@@ -12749,7 +13100,17 @@ var getColumns = function getColumns(_ref) {
|
|
|
12749
13100
|
render: function render(val) {
|
|
12750
13101
|
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
12751
13102
|
}
|
|
12752
|
-
}]
|
|
13103
|
+
}]
|
|
13104
|
+
};
|
|
13105
|
+
};
|
|
13106
|
+
|
|
13107
|
+
var getColumns$1 = function getColumns(_ref) {
|
|
13108
|
+
var _ref$text = _ref.text,
|
|
13109
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13110
|
+
disabled = _ref.disabled,
|
|
13111
|
+
updateHandle = _ref.updateHandle;
|
|
13112
|
+
return {
|
|
13113
|
+
//bs商品信息
|
|
12753
13114
|
BS_GOODS: [{
|
|
12754
13115
|
dataIndex: 'mark',
|
|
12755
13116
|
title: "\u5546\u54C1\u6807\u8BB0",
|
|
@@ -12916,7 +13277,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
|
12916
13277
|
});
|
|
12917
13278
|
};
|
|
12918
13279
|
|
|
12919
|
-
var getColumns$
|
|
13280
|
+
var getColumns$2 = function getColumns(_ref) {
|
|
12920
13281
|
var _ref$text = _ref.text,
|
|
12921
13282
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
12922
13283
|
disabled = _ref.disabled,
|
|
@@ -13292,74 +13653,269 @@ var getColumns$1 = function getColumns(_ref) {
|
|
|
13292
13653
|
style: {
|
|
13293
13654
|
width: 70
|
|
13294
13655
|
},
|
|
13295
|
-
options: options,
|
|
13656
|
+
options: options,
|
|
13657
|
+
value: val,
|
|
13658
|
+
onChange: function onChange(value) {
|
|
13659
|
+
return updateHandle(value, index, 'type');
|
|
13660
|
+
}
|
|
13661
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13662
|
+
}
|
|
13663
|
+
}]
|
|
13664
|
+
};
|
|
13665
|
+
};
|
|
13666
|
+
|
|
13667
|
+
var getColumns$3 = function getColumns(_ref) {
|
|
13668
|
+
var _ref$text = _ref.text,
|
|
13669
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13670
|
+
disabled = _ref.disabled,
|
|
13671
|
+
updateHandle = _ref.updateHandle;
|
|
13672
|
+
return {
|
|
13673
|
+
//万里牛商品信息
|
|
13674
|
+
WLN_GOODS: [{
|
|
13675
|
+
dataIndex: 'skuName',
|
|
13676
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13677
|
+
align: 'center',
|
|
13678
|
+
ellipsis: true,
|
|
13679
|
+
width: 250
|
|
13680
|
+
}, {
|
|
13681
|
+
dataIndex: 'sku',
|
|
13682
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13683
|
+
align: 'center',
|
|
13684
|
+
ellipsis: true,
|
|
13685
|
+
width: 100
|
|
13686
|
+
}, {
|
|
13687
|
+
dataIndex: 'name',
|
|
13688
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13689
|
+
align: 'center',
|
|
13690
|
+
ellipsis: true,
|
|
13691
|
+
width: 250
|
|
13692
|
+
}, {
|
|
13693
|
+
dataIndex: 'pic',
|
|
13694
|
+
title: "\u56FE\u7247",
|
|
13695
|
+
align: 'center',
|
|
13696
|
+
ellipsis: true,
|
|
13697
|
+
width: 100,
|
|
13698
|
+
render: function render(val) {
|
|
13699
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
13700
|
+
width: 60,
|
|
13701
|
+
src: val
|
|
13702
|
+
});
|
|
13703
|
+
}
|
|
13704
|
+
}, {
|
|
13705
|
+
dataIndex: 'code',
|
|
13706
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13707
|
+
align: 'center',
|
|
13708
|
+
ellipsis: true,
|
|
13709
|
+
width: 100
|
|
13710
|
+
}, {
|
|
13711
|
+
dataIndex: 'money',
|
|
13712
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13713
|
+
align: 'center',
|
|
13714
|
+
ellipsis: true,
|
|
13715
|
+
width: 100
|
|
13716
|
+
}, {
|
|
13717
|
+
dataIndex: 'number',
|
|
13718
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13719
|
+
align: 'center',
|
|
13720
|
+
ellipsis: true,
|
|
13721
|
+
width: 100,
|
|
13722
|
+
render: function render(val, record, index) {
|
|
13723
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13724
|
+
style: {
|
|
13725
|
+
width: 70
|
|
13726
|
+
},
|
|
13727
|
+
value: val,
|
|
13728
|
+
min: 1,
|
|
13729
|
+
precision: 0,
|
|
13730
|
+
onChange: function onChange(num) {
|
|
13731
|
+
return updateHandle(num, index, 'number');
|
|
13732
|
+
}
|
|
13733
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13734
|
+
}
|
|
13735
|
+
}, {
|
|
13736
|
+
dataIndex: 'share',
|
|
13737
|
+
title: "\u5206\u644A\u4EF7",
|
|
13738
|
+
align: 'center',
|
|
13739
|
+
ellipsis: true,
|
|
13740
|
+
width: 70
|
|
13741
|
+
}, {
|
|
13742
|
+
dataIndex: 'type',
|
|
13743
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13744
|
+
align: 'center',
|
|
13745
|
+
ellipsis: true,
|
|
13746
|
+
width: 100
|
|
13747
|
+
}]
|
|
13748
|
+
};
|
|
13749
|
+
};
|
|
13750
|
+
|
|
13751
|
+
var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
13752
|
+
if (typeof value === 'number') return true;
|
|
13753
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
13754
|
+
return false;
|
|
13755
|
+
};
|
|
13756
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
13757
|
+
if (isNull(val)) return null;
|
|
13758
|
+
return val ? '是' : '否';
|
|
13759
|
+
};
|
|
13760
|
+
var getColumns$4 = function getColumns(_ref) {
|
|
13761
|
+
var _ref$text = _ref.text,
|
|
13762
|
+
disabled = _ref.disabled,
|
|
13763
|
+
updateHandle = _ref.updateHandle,
|
|
13764
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
13765
|
+
return {
|
|
13766
|
+
//管易商品信息
|
|
13767
|
+
GY_GOODS: [{
|
|
13768
|
+
dataIndex: 'goodName',
|
|
13769
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13770
|
+
width: 150
|
|
13771
|
+
}, {
|
|
13772
|
+
dataIndex: 'goodShortName',
|
|
13773
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13774
|
+
width: 150
|
|
13775
|
+
}, {
|
|
13776
|
+
dataIndex: 'goodNo',
|
|
13777
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13778
|
+
width: 200
|
|
13779
|
+
}, {
|
|
13780
|
+
dataIndex: 'specName',
|
|
13781
|
+
title: "SKU\u540D\u79F0",
|
|
13782
|
+
align: 'center',
|
|
13783
|
+
ellipsis: true,
|
|
13784
|
+
width: 250
|
|
13785
|
+
}, {
|
|
13786
|
+
dataIndex: 'specNo',
|
|
13787
|
+
title: "SKU\u7F16\u7801",
|
|
13788
|
+
align: 'center',
|
|
13789
|
+
ellipsis: true,
|
|
13790
|
+
width: 150
|
|
13791
|
+
}, {
|
|
13792
|
+
dataIndex: 'qty',
|
|
13793
|
+
title: "\u6570\u91CF",
|
|
13794
|
+
width: 100,
|
|
13795
|
+
render: function render(val, record, index) {
|
|
13796
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13797
|
+
style: {
|
|
13798
|
+
width: 70
|
|
13799
|
+
},
|
|
13296
13800
|
value: val,
|
|
13297
|
-
|
|
13298
|
-
|
|
13801
|
+
min: 1,
|
|
13802
|
+
precision: 0,
|
|
13803
|
+
onChange: function onChange(num) {
|
|
13804
|
+
updateDataHandle({
|
|
13805
|
+
qty: num,
|
|
13806
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13807
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13808
|
+
}, index);
|
|
13299
13809
|
}
|
|
13300
13810
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13301
13811
|
}
|
|
13302
|
-
}]
|
|
13303
|
-
};
|
|
13304
|
-
};
|
|
13305
|
-
|
|
13306
|
-
var getColumns$2 = function getColumns(_ref) {
|
|
13307
|
-
var _ref$text = _ref.text,
|
|
13308
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13309
|
-
disabled = _ref.disabled,
|
|
13310
|
-
updateHandle = _ref.updateHandle;
|
|
13311
|
-
return {
|
|
13312
|
-
//万里牛商品信息
|
|
13313
|
-
WLN_GOODS: [{
|
|
13314
|
-
dataIndex: 'skuName',
|
|
13315
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13316
|
-
align: 'center',
|
|
13317
|
-
ellipsis: true,
|
|
13318
|
-
width: 250
|
|
13319
13812
|
}, {
|
|
13320
|
-
dataIndex: '
|
|
13321
|
-
title: "
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13813
|
+
dataIndex: 'price',
|
|
13814
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13815
|
+
width: 150,
|
|
13816
|
+
render: function render(val, record, index) {
|
|
13817
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13818
|
+
style: {
|
|
13819
|
+
width: 130
|
|
13820
|
+
},
|
|
13821
|
+
value: val,
|
|
13822
|
+
min: 0,
|
|
13823
|
+
precision: 2,
|
|
13824
|
+
onChange: function onChange(num) {
|
|
13825
|
+
updateDataHandle({
|
|
13826
|
+
price: num,
|
|
13827
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13828
|
+
}, index);
|
|
13829
|
+
}
|
|
13830
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13831
|
+
}
|
|
13325
13832
|
}, {
|
|
13326
|
-
dataIndex: '
|
|
13327
|
-
title: "
|
|
13328
|
-
|
|
13329
|
-
ellipsis: true,
|
|
13330
|
-
width: 250
|
|
13833
|
+
dataIndex: 'amount',
|
|
13834
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13835
|
+
width: 150
|
|
13331
13836
|
}, {
|
|
13332
|
-
dataIndex: '
|
|
13333
|
-
title: "\
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13837
|
+
dataIndex: 'originPrice',
|
|
13838
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13839
|
+
width: 150
|
|
13840
|
+
}, {
|
|
13841
|
+
dataIndex: 'originAmount',
|
|
13842
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13843
|
+
width: 150
|
|
13844
|
+
}, {
|
|
13845
|
+
dataIndex: 'discountFee',
|
|
13846
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
13847
|
+
width: 150
|
|
13848
|
+
}, {
|
|
13849
|
+
dataIndex: 'amountAfter',
|
|
13850
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
13851
|
+
width: 150
|
|
13852
|
+
}, {
|
|
13853
|
+
dataIndex: 'cancel',
|
|
13854
|
+
title: "\u662F\u5426\u53D6\u6D88",
|
|
13855
|
+
width: 150,
|
|
13337
13856
|
render: function render(val) {
|
|
13338
|
-
return /*#__PURE__*/React.createElement(
|
|
13339
|
-
width: 60,
|
|
13340
|
-
src: val
|
|
13341
|
-
});
|
|
13857
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13342
13858
|
}
|
|
13343
13859
|
}, {
|
|
13344
|
-
dataIndex: '
|
|
13345
|
-
title: "
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13860
|
+
dataIndex: 'isGift',
|
|
13861
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13862
|
+
width: 150,
|
|
13863
|
+
render: function render(val, record, index) {
|
|
13864
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13865
|
+
value: val,
|
|
13866
|
+
onChange: function onChange(value) {
|
|
13867
|
+
updateHandle(value, index, 'isGift');
|
|
13868
|
+
},
|
|
13869
|
+
options: [{
|
|
13870
|
+
label: '是',
|
|
13871
|
+
value: 1
|
|
13872
|
+
}, {
|
|
13873
|
+
label: '否',
|
|
13874
|
+
value: 0
|
|
13875
|
+
}]
|
|
13876
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13877
|
+
}
|
|
13349
13878
|
}, {
|
|
13350
|
-
dataIndex: '
|
|
13351
|
-
title: "\
|
|
13879
|
+
dataIndex: 'skuNote',
|
|
13880
|
+
title: "\u5546\u54C1\u5907\u6CE8",
|
|
13881
|
+
width: 150
|
|
13882
|
+
}].map(function (item) {
|
|
13883
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13884
|
+
align: 'center',
|
|
13885
|
+
ellipsis: true
|
|
13886
|
+
});
|
|
13887
|
+
}),
|
|
13888
|
+
//管易补发商品信息
|
|
13889
|
+
GY_REISSUE_GOODS: [{
|
|
13890
|
+
dataIndex: 'goodName',
|
|
13891
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13892
|
+
width: 150
|
|
13893
|
+
}, {
|
|
13894
|
+
dataIndex: 'goodShortName',
|
|
13895
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13896
|
+
width: 150
|
|
13897
|
+
}, {
|
|
13898
|
+
dataIndex: 'goodNo',
|
|
13899
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13900
|
+
width: 200
|
|
13901
|
+
}, {
|
|
13902
|
+
dataIndex: 'specName',
|
|
13903
|
+
title: "SKU\u540D\u79F0",
|
|
13352
13904
|
align: 'center',
|
|
13353
13905
|
ellipsis: true,
|
|
13354
|
-
width:
|
|
13906
|
+
width: 250
|
|
13355
13907
|
}, {
|
|
13356
|
-
dataIndex: '
|
|
13357
|
-
title: "
|
|
13908
|
+
dataIndex: 'specNo',
|
|
13909
|
+
title: "SKU\u7F16\u7801",
|
|
13358
13910
|
align: 'center',
|
|
13359
13911
|
ellipsis: true,
|
|
13912
|
+
width: 150
|
|
13913
|
+
}, {
|
|
13914
|
+
dataIndex: 'qty',
|
|
13915
|
+
title: "\u6570\u91CF",
|
|
13360
13916
|
width: 100,
|
|
13361
13917
|
render: function render(val, record, index) {
|
|
13362
|
-
return record.
|
|
13918
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13363
13919
|
style: {
|
|
13364
13920
|
width: 70
|
|
13365
13921
|
},
|
|
@@ -13367,45 +13923,81 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
13367
13923
|
min: 1,
|
|
13368
13924
|
precision: 0,
|
|
13369
13925
|
onChange: function onChange(num) {
|
|
13370
|
-
|
|
13926
|
+
updateDataHandle({
|
|
13927
|
+
qty: num,
|
|
13928
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13929
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13930
|
+
}, index);
|
|
13371
13931
|
}
|
|
13372
13932
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13373
13933
|
}
|
|
13374
13934
|
}, {
|
|
13375
|
-
dataIndex: '
|
|
13376
|
-
title: "\
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13935
|
+
dataIndex: 'price',
|
|
13936
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13937
|
+
width: 150,
|
|
13938
|
+
render: function render(val, record, index) {
|
|
13939
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13940
|
+
style: {
|
|
13941
|
+
width: 130
|
|
13942
|
+
},
|
|
13943
|
+
value: val,
|
|
13944
|
+
min: 0,
|
|
13945
|
+
precision: 2,
|
|
13946
|
+
onChange: function onChange(num) {
|
|
13947
|
+
updateDataHandle({
|
|
13948
|
+
price: num,
|
|
13949
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13950
|
+
}, index);
|
|
13951
|
+
}
|
|
13952
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13953
|
+
}
|
|
13380
13954
|
}, {
|
|
13381
|
-
dataIndex: '
|
|
13382
|
-
title: "\
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
|
|
13955
|
+
dataIndex: 'amount',
|
|
13956
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13957
|
+
width: 150
|
|
13958
|
+
}, {
|
|
13959
|
+
dataIndex: 'originPrice',
|
|
13960
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13961
|
+
width: 150
|
|
13962
|
+
}, {
|
|
13963
|
+
dataIndex: 'originAmount',
|
|
13964
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13965
|
+
width: 150
|
|
13966
|
+
}, {
|
|
13967
|
+
dataIndex: 'isGift',
|
|
13968
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13969
|
+
width: 150,
|
|
13970
|
+
render: function render(val, record, index) {
|
|
13971
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13972
|
+
value: val,
|
|
13973
|
+
onChange: function onChange(value) {
|
|
13974
|
+
updateHandle(value, index, 'isGift');
|
|
13975
|
+
},
|
|
13976
|
+
options: [{
|
|
13977
|
+
label: '是',
|
|
13978
|
+
value: 1
|
|
13979
|
+
}, {
|
|
13980
|
+
label: '否',
|
|
13981
|
+
value: 0
|
|
13982
|
+
}]
|
|
13983
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13984
|
+
}
|
|
13985
|
+
}].map(function (item) {
|
|
13986
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13987
|
+
align: 'center',
|
|
13988
|
+
ellipsis: true
|
|
13989
|
+
});
|
|
13990
|
+
})
|
|
13387
13991
|
};
|
|
13388
13992
|
};
|
|
13389
13993
|
|
|
13390
|
-
var
|
|
13391
|
-
var _ref =
|
|
13392
|
-
_ref$text = _ref.text,
|
|
13994
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
13995
|
+
var _ref$text = _ref.text,
|
|
13393
13996
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13394
13997
|
disabled = _ref.disabled,
|
|
13395
13998
|
updateHandle = _ref.updateHandle;
|
|
13396
|
-
return
|
|
13397
|
-
|
|
13398
|
-
disabled: disabled,
|
|
13399
|
-
updateHandle: updateHandle
|
|
13400
|
-
})), getColumns$1({
|
|
13401
|
-
text: text,
|
|
13402
|
-
disabled: disabled,
|
|
13403
|
-
updateHandle: updateHandle
|
|
13404
|
-
})), getColumns$2({
|
|
13405
|
-
text: text,
|
|
13406
|
-
disabled: disabled,
|
|
13407
|
-
updateHandle: updateHandle
|
|
13408
|
-
})), {}, {
|
|
13999
|
+
return {
|
|
14000
|
+
//bs商品信息
|
|
13409
14001
|
default: [{
|
|
13410
14002
|
dataIndex: 'mark',
|
|
13411
14003
|
title: "\u5546\u54C1\u6807\u8BB0",
|
|
@@ -13502,6 +14094,43 @@ var getColumnsMap = function getColumnsMap(args) {
|
|
|
13502
14094
|
ellipsis: true,
|
|
13503
14095
|
width: 100
|
|
13504
14096
|
}]
|
|
14097
|
+
};
|
|
14098
|
+
};
|
|
14099
|
+
|
|
14100
|
+
var getColumnsMap = function getColumnsMap(args) {
|
|
14101
|
+
var _ref = args || {},
|
|
14102
|
+
_ref$text = _ref.text,
|
|
14103
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14104
|
+
disabled = _ref.disabled,
|
|
14105
|
+
updateHandle = _ref.updateHandle,
|
|
14106
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
14107
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14108
|
+
text: text,
|
|
14109
|
+
disabled: disabled,
|
|
14110
|
+
updateHandle: updateHandle
|
|
14111
|
+
})), getColumns({
|
|
14112
|
+
text: text,
|
|
14113
|
+
disabled: disabled,
|
|
14114
|
+
updateHandle: updateHandle
|
|
14115
|
+
})), getColumns$2({
|
|
14116
|
+
text: text,
|
|
14117
|
+
disabled: disabled,
|
|
14118
|
+
updateHandle: updateHandle
|
|
14119
|
+
})), getColumns$3({
|
|
14120
|
+
text: text,
|
|
14121
|
+
disabled: disabled,
|
|
14122
|
+
updateHandle: updateHandle
|
|
14123
|
+
})), getColumns$4({
|
|
14124
|
+
text: text,
|
|
14125
|
+
disabled: disabled,
|
|
14126
|
+
updateHandle: updateHandle,
|
|
14127
|
+
updateDataHandle: updateDataHandle
|
|
14128
|
+
})), {}, {
|
|
14129
|
+
default: getColumns$5({
|
|
14130
|
+
text: text,
|
|
14131
|
+
disabled: disabled,
|
|
14132
|
+
updateHandle: updateHandle
|
|
14133
|
+
})['default']
|
|
13505
14134
|
});
|
|
13506
14135
|
};
|
|
13507
14136
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -13659,6 +14288,9 @@ var getButtonText = function getButtonText() {
|
|
|
13659
14288
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
13660
14289
|
return '选择旺店通商品';
|
|
13661
14290
|
}
|
|
14291
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14292
|
+
return '选择管易ERP商品';
|
|
14293
|
+
}
|
|
13662
14294
|
return '选择商品';
|
|
13663
14295
|
};
|
|
13664
14296
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -13750,6 +14382,12 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13750
14382
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
13751
14383
|
}
|
|
13752
14384
|
};
|
|
14385
|
+
var updateDataHandle = function updateDataHandle(data, index) {
|
|
14386
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
14387
|
+
value[index] = _objectSpread2(_objectSpread2({}, value[index]), data);
|
|
14388
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
14389
|
+
}
|
|
14390
|
+
};
|
|
13753
14391
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
13754
14392
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
13755
14393
|
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
@@ -13762,11 +14400,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13762
14400
|
case 'BS_E3_GOODS':
|
|
13763
14401
|
case 'BS_GOODS':
|
|
13764
14402
|
case 'WLN_GOODS':
|
|
14403
|
+
case 'GY_GOODS':
|
|
14404
|
+
case 'GY_REISSUE_GOODS':
|
|
13765
14405
|
{
|
|
13766
14406
|
columns = getColumnsMap({
|
|
13767
14407
|
text: text,
|
|
13768
14408
|
disabled: disabled,
|
|
13769
|
-
updateHandle: updateHandle
|
|
14409
|
+
updateHandle: updateHandle,
|
|
14410
|
+
updateDataHandle: updateDataHandle
|
|
13770
14411
|
})[type];
|
|
13771
14412
|
}
|
|
13772
14413
|
break;
|
|
@@ -13792,7 +14433,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13792
14433
|
columns = getColumnsMap({
|
|
13793
14434
|
text: text,
|
|
13794
14435
|
disabled: disabled,
|
|
13795
|
-
updateHandle: updateHandle
|
|
14436
|
+
updateHandle: updateHandle,
|
|
14437
|
+
updateDataHandle: updateDataHandle
|
|
13796
14438
|
})['default'];
|
|
13797
14439
|
}
|
|
13798
14440
|
return columns;
|
|
@@ -13915,6 +14557,28 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13915
14557
|
canUpdateNumber: canUpdateNumber
|
|
13916
14558
|
});
|
|
13917
14559
|
});
|
|
14560
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14561
|
+
newList = list.map(function (item) {
|
|
14562
|
+
var goodName = item.goodName,
|
|
14563
|
+
goodShortName = item.goodShortName,
|
|
14564
|
+
goodNo = item.goodNo,
|
|
14565
|
+
specName = item.specName,
|
|
14566
|
+
specNo = item.specNo,
|
|
14567
|
+
retailPrice = item.retailPrice;
|
|
14568
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14569
|
+
uuid: uuid(),
|
|
14570
|
+
canDelete: true,
|
|
14571
|
+
canEdit: true,
|
|
14572
|
+
qty: 1,
|
|
14573
|
+
goodName: goodName,
|
|
14574
|
+
goodShortName: goodShortName,
|
|
14575
|
+
goodNo: goodNo,
|
|
14576
|
+
specName: specName,
|
|
14577
|
+
specNo: specNo,
|
|
14578
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
14579
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
14580
|
+
});
|
|
14581
|
+
});
|
|
13918
14582
|
} else {
|
|
13919
14583
|
newList = list.map(function (item) {
|
|
13920
14584
|
var goodsId = item.goodsId,
|
|
@@ -14010,6 +14674,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
14010
14674
|
shopId: shopId,
|
|
14011
14675
|
maxLength: maxLength,
|
|
14012
14676
|
companyKey: companyKey
|
|
14677
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
|
|
14678
|
+
ref: refModal,
|
|
14679
|
+
onSubmit: onSubmit,
|
|
14680
|
+
width: width,
|
|
14681
|
+
shopList: shopList,
|
|
14682
|
+
shopId: shopId,
|
|
14683
|
+
maxLength: maxLength,
|
|
14684
|
+
companyKey: companyKey
|
|
14013
14685
|
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
14014
14686
|
ref: refModal,
|
|
14015
14687
|
onSubmit: onSubmit,
|
|
@@ -14701,19 +15373,66 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
14701
15373
|
});
|
|
14702
15374
|
singletonMap$1.set(orderNo, p);
|
|
14703
15375
|
}
|
|
14704
|
-
return singletonMap$1.get(orderNo);
|
|
15376
|
+
return singletonMap$1.get(orderNo);
|
|
15377
|
+
};
|
|
15378
|
+
var bsE3Utils = {
|
|
15379
|
+
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
15380
|
+
};
|
|
15381
|
+
|
|
15382
|
+
var singletonMap$2 = new Map();
|
|
15383
|
+
var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
15384
|
+
if (!singletonMap$2.has(orderNo)) {
|
|
15385
|
+
var p = new Promise(function (resolve, reject) {
|
|
15386
|
+
var doReject = function doReject(err) {
|
|
15387
|
+
// 清空掉错误的请求记录
|
|
15388
|
+
singletonMap$2.delete(orderNo);
|
|
15389
|
+
reject(err);
|
|
15390
|
+
};
|
|
15391
|
+
extendRequest('/qy/gdfw/oms/gyOrderDetail', {
|
|
15392
|
+
method: 'post',
|
|
15393
|
+
data: {
|
|
15394
|
+
tid: orderNo
|
|
15395
|
+
}
|
|
15396
|
+
}).then(function (res) {
|
|
15397
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
15398
|
+
var _res$data;
|
|
15399
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) {
|
|
15400
|
+
res.data.trades = filterGyOrders(res === null || res === void 0 ? void 0 : res.data, orderNo).map(function (item) {
|
|
15401
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
15402
|
+
billNo: item.code,
|
|
15403
|
+
billType: item.orderTypeName,
|
|
15404
|
+
billTag: item.tagName,
|
|
15405
|
+
tradeTagName: item.tradeTagName,
|
|
15406
|
+
deliveryState: item.deliveryState,
|
|
15407
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
15408
|
+
});
|
|
15409
|
+
});
|
|
15410
|
+
}
|
|
15411
|
+
resolve(res.data);
|
|
15412
|
+
// 延迟10秒清除,保证订单的时效性
|
|
15413
|
+
setTimeout(function () {
|
|
15414
|
+
singletonMap$2.delete(orderNo);
|
|
15415
|
+
}, 1000 * 10);
|
|
15416
|
+
} else {
|
|
15417
|
+
doReject(res);
|
|
15418
|
+
}
|
|
15419
|
+
}).catch(doReject);
|
|
15420
|
+
});
|
|
15421
|
+
singletonMap$2.set(orderNo, p);
|
|
15422
|
+
}
|
|
15423
|
+
return singletonMap$2.get(orderNo);
|
|
14705
15424
|
};
|
|
14706
|
-
var
|
|
14707
|
-
|
|
15425
|
+
var gyUtils = {
|
|
15426
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
14708
15427
|
};
|
|
14709
15428
|
|
|
14710
|
-
var singletonMap$
|
|
15429
|
+
var singletonMap$3 = new Map();
|
|
14711
15430
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
14712
|
-
if (!singletonMap$
|
|
15431
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
14713
15432
|
var p = new Promise(function (resolve, reject) {
|
|
14714
15433
|
var doReject = function doReject(err) {
|
|
14715
15434
|
// 清空掉错误的请求记录
|
|
14716
|
-
singletonMap$
|
|
15435
|
+
singletonMap$3.delete(orderNo);
|
|
14717
15436
|
reject(err);
|
|
14718
15437
|
};
|
|
14719
15438
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -14739,151 +15458,36 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14739
15458
|
}
|
|
14740
15459
|
// 延迟10秒清除,保证订单的时效性
|
|
14741
15460
|
setTimeout(function () {
|
|
14742
|
-
singletonMap$
|
|
15461
|
+
singletonMap$3.delete(orderNo);
|
|
14743
15462
|
}, 1000 * 10);
|
|
14744
15463
|
} else {
|
|
14745
15464
|
doReject(data);
|
|
14746
15465
|
}
|
|
14747
15466
|
}).catch(doReject);
|
|
14748
15467
|
});
|
|
14749
|
-
singletonMap$
|
|
15468
|
+
singletonMap$3.set(orderNo, p);
|
|
14750
15469
|
}
|
|
14751
|
-
return singletonMap$
|
|
15470
|
+
return singletonMap$3.get(orderNo);
|
|
14752
15471
|
};
|
|
14753
15472
|
var kmUtils = {
|
|
14754
15473
|
getOrderListSingleton: getOrderListSingleton
|
|
14755
15474
|
};
|
|
14756
15475
|
|
|
14757
15476
|
var columnsMap = {
|
|
14758
|
-
BS_SYSTEM_ORDER:
|
|
14759
|
-
title: '单据类型',
|
|
14760
|
-
dataIndex: 'billType',
|
|
14761
|
-
width: 150
|
|
14762
|
-
}, {
|
|
14763
|
-
title: '系统订单号',
|
|
14764
|
-
dataIndex: 'billNo',
|
|
14765
|
-
width: 150
|
|
14766
|
-
}, {
|
|
14767
|
-
title: '标签',
|
|
14768
|
-
dataIndex: 'billTag',
|
|
14769
|
-
width: 150
|
|
14770
|
-
}, {
|
|
14771
|
-
title: '主播名称',
|
|
14772
|
-
dataIndex: 'authorName',
|
|
14773
|
-
width: 150
|
|
14774
|
-
}, {
|
|
14775
|
-
title: '主播ID',
|
|
14776
|
-
dataIndex: 'authorId',
|
|
14777
|
-
width: 150
|
|
14778
|
-
}
|
|
14779
|
-
// {
|
|
14780
|
-
// title: '直播活动',
|
|
14781
|
-
// dataIndex: 'liveActivites',
|
|
14782
|
-
// width: 150,
|
|
14783
|
-
// },
|
|
14784
|
-
],
|
|
14785
|
-
|
|
15477
|
+
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
14786
15478
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
14787
|
-
WLN_SYSTEM_ORDER:
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
}, {
|
|
14792
|
-
title: '系统订单号',
|
|
14793
|
-
dataIndex: 'billNo',
|
|
14794
|
-
width: 150
|
|
14795
|
-
}, {
|
|
14796
|
-
title: '标记',
|
|
14797
|
-
dataIndex: 'billTag',
|
|
14798
|
-
width: 150
|
|
14799
|
-
}],
|
|
14800
|
-
WDT_SYSTEM_ORDER: [{
|
|
14801
|
-
title: '订单类型',
|
|
14802
|
-
dataIndex: 'billType',
|
|
14803
|
-
width: 150
|
|
14804
|
-
}, {
|
|
14805
|
-
title: '系统订单号',
|
|
14806
|
-
dataIndex: 'billNo',
|
|
14807
|
-
width: 150
|
|
14808
|
-
}, {
|
|
14809
|
-
title: '订单标签',
|
|
14810
|
-
dataIndex: 'billTag',
|
|
14811
|
-
width: 150
|
|
14812
|
-
}],
|
|
14813
|
-
BS_E3_SYSTEM_ORDER: [{
|
|
14814
|
-
title: '系统订单号',
|
|
14815
|
-
dataIndex: 'orderSn',
|
|
14816
|
-
width: 150,
|
|
14817
|
-
ellipsis: true
|
|
14818
|
-
}, {
|
|
14819
|
-
title: '订单状态',
|
|
14820
|
-
dataIndex: 'orderStatus',
|
|
14821
|
-
width: 100,
|
|
14822
|
-
ellipsis: true,
|
|
14823
|
-
render: function render(val) {
|
|
14824
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
|
|
14825
|
-
}
|
|
14826
|
-
}, {
|
|
14827
|
-
title: '是否被拆分',
|
|
14828
|
-
dataIndex: 'isSplit',
|
|
14829
|
-
width: 100,
|
|
14830
|
-
ellipsis: true,
|
|
14831
|
-
render: function render(val) {
|
|
14832
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14833
|
-
}
|
|
14834
|
-
}, {
|
|
14835
|
-
title: '是否拆分子单',
|
|
14836
|
-
dataIndex: 'isSplitNew',
|
|
14837
|
-
width: 100,
|
|
14838
|
-
ellipsis: true,
|
|
14839
|
-
render: function render(val) {
|
|
14840
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14841
|
-
}
|
|
14842
|
-
}, {
|
|
14843
|
-
title: '是否被合并',
|
|
14844
|
-
dataIndex: 'isCombine',
|
|
14845
|
-
width: 100,
|
|
14846
|
-
ellipsis: true,
|
|
14847
|
-
render: function render(val) {
|
|
14848
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14849
|
-
}
|
|
14850
|
-
}, {
|
|
14851
|
-
title: '是否合并新单',
|
|
14852
|
-
dataIndex: 'isCombineNew',
|
|
14853
|
-
width: 100,
|
|
14854
|
-
ellipsis: true,
|
|
14855
|
-
render: function render(val) {
|
|
14856
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14857
|
-
}
|
|
14858
|
-
}, {
|
|
14859
|
-
title: '是否复制单',
|
|
14860
|
-
dataIndex: 'isCopy',
|
|
14861
|
-
width: 100,
|
|
14862
|
-
ellipsis: true,
|
|
14863
|
-
render: function render(val) {
|
|
14864
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14865
|
-
}
|
|
14866
|
-
}, {
|
|
14867
|
-
title: '是否换货单',
|
|
14868
|
-
dataIndex: 'isExchangeOrder',
|
|
14869
|
-
width: 100,
|
|
14870
|
-
ellipsis: true,
|
|
14871
|
-
render: function render(val) {
|
|
14872
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14873
|
-
}
|
|
14874
|
-
}, {
|
|
14875
|
-
title: '订单备注',
|
|
14876
|
-
dataIndex: 'orderMsg',
|
|
14877
|
-
width: 150,
|
|
14878
|
-
ellipsis: true
|
|
14879
|
-
}]
|
|
15479
|
+
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
15480
|
+
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
15481
|
+
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
15482
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
14880
15483
|
};
|
|
14881
15484
|
var rowKeyMap = {
|
|
14882
15485
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14883
15486
|
KM_SYSTEM_ORDER: 'billNo',
|
|
14884
15487
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14885
15488
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14886
|
-
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
15489
|
+
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15490
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
14887
15491
|
};
|
|
14888
15492
|
var index$1 = (function (props) {
|
|
14889
15493
|
var value = props.value,
|
|
@@ -14905,6 +15509,9 @@ var index$1 = (function (props) {
|
|
|
14905
15509
|
getWdtOrderList(value.orderNo);
|
|
14906
15510
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14907
15511
|
getBsE3OrderList(value.orderNo);
|
|
15512
|
+
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15513
|
+
console.log('触发gy--getGyOrderList--1');
|
|
15514
|
+
getGyOrderList(value.orderNo);
|
|
14908
15515
|
}
|
|
14909
15516
|
}
|
|
14910
15517
|
}, [value, type]);
|
|
@@ -15091,6 +15698,45 @@ var index$1 = (function (props) {
|
|
|
15091
15698
|
return _ref6.apply(this, arguments);
|
|
15092
15699
|
};
|
|
15093
15700
|
}();
|
|
15701
|
+
var getGyOrderList = /*#__PURE__*/function () {
|
|
15702
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15703
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15704
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15705
|
+
case 0:
|
|
15706
|
+
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15707
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
15708
|
+
return getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
|
|
15709
|
+
});
|
|
15710
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15711
|
+
orders: trades,
|
|
15712
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15713
|
+
var billNo = _ref9.billNo,
|
|
15714
|
+
billType = _ref9.billType,
|
|
15715
|
+
billTag = _ref9.billTag,
|
|
15716
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15717
|
+
deliveryState = _ref9.deliveryState;
|
|
15718
|
+
return {
|
|
15719
|
+
billNo: billNo,
|
|
15720
|
+
billType: billType,
|
|
15721
|
+
billTag: billTag,
|
|
15722
|
+
tradeTagName: tradeTagName,
|
|
15723
|
+
deliveryState: deliveryState,
|
|
15724
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
15725
|
+
};
|
|
15726
|
+
})
|
|
15727
|
+
}));
|
|
15728
|
+
});
|
|
15729
|
+
onceRef.current = false;
|
|
15730
|
+
case 2:
|
|
15731
|
+
case "end":
|
|
15732
|
+
return _context6.stop();
|
|
15733
|
+
}
|
|
15734
|
+
}, _callee6);
|
|
15735
|
+
}));
|
|
15736
|
+
return function getGyOrderList(_x6) {
|
|
15737
|
+
return _ref8.apply(this, arguments);
|
|
15738
|
+
};
|
|
15739
|
+
}();
|
|
15094
15740
|
var rowSelection = {
|
|
15095
15741
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
15096
15742
|
fixed: true,
|
|
@@ -15107,7 +15753,24 @@ var index$1 = (function (props) {
|
|
|
15107
15753
|
};
|
|
15108
15754
|
}
|
|
15109
15755
|
};
|
|
15110
|
-
|
|
15756
|
+
// useEffect(() => {
|
|
15757
|
+
// const dom = document.querySelector(
|
|
15758
|
+
// `.${type}_SYSTEM_ORDER_COMPONENT .ant-table-content`,
|
|
15759
|
+
// );
|
|
15760
|
+
// //解决列表出现横向滚动条时选择数据造成行内闪烁问题
|
|
15761
|
+
// if (
|
|
15762
|
+
// (value?.selectIds || []).length > 0 &&
|
|
15763
|
+
// dom &&
|
|
15764
|
+
// dom.scrollWidth > dom.clientWidth &&
|
|
15765
|
+
// dom.scrollLeft === 0
|
|
15766
|
+
// ) {
|
|
15767
|
+
// console.log(dom.scrollWidth > dom.clientWidth, dom.scrollLeft === 0);
|
|
15768
|
+
// dom.scrollLeft = 1;
|
|
15769
|
+
// }
|
|
15770
|
+
// }, [JSON.stringify(value?.selectIds || [])]);
|
|
15771
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15772
|
+
className: "".concat(type, "_SYSTEM_ORDER_COMPONENT")
|
|
15773
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
15111
15774
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
15112
15775
|
columns: columns,
|
|
15113
15776
|
rowSelection: rowSelection,
|
|
@@ -15115,12 +15778,12 @@ var index$1 = (function (props) {
|
|
|
15115
15778
|
size: "small",
|
|
15116
15779
|
pagination: false,
|
|
15117
15780
|
scroll: {
|
|
15118
|
-
x: '
|
|
15781
|
+
x: 'max-content'
|
|
15119
15782
|
},
|
|
15120
15783
|
locale: {
|
|
15121
15784
|
emptyText: '暂无数据'
|
|
15122
15785
|
}
|
|
15123
|
-
});
|
|
15786
|
+
}));
|
|
15124
15787
|
});
|
|
15125
15788
|
|
|
15126
15789
|
var WlnGoods = function WlnGoods(props) {
|
|
@@ -15146,13 +15809,14 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
15146
15809
|
};
|
|
15147
15810
|
|
|
15148
15811
|
var componentMap$1 = {
|
|
15149
|
-
|
|
15812
|
+
WDT_GOODS: {
|
|
15150
15813
|
type: 'wdt',
|
|
15151
15814
|
key: 'wdtGoods',
|
|
15152
15815
|
name: '旺店通',
|
|
15153
15816
|
orderNo: 'srcTid',
|
|
15154
15817
|
goodDetailOrderNo: 'srcTid',
|
|
15155
15818
|
eventNameMap: {
|
|
15819
|
+
// pubsub 事件
|
|
15156
15820
|
type: 'wdtType',
|
|
15157
15821
|
updateGoodsHandle: updateWdtGoodsHandle,
|
|
15158
15822
|
selectListReturn: 'wdtSelectListReturn',
|
|
@@ -15170,13 +15834,14 @@ var componentMap$1 = {
|
|
|
15170
15834
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
15171
15835
|
}
|
|
15172
15836
|
},
|
|
15173
|
-
|
|
15837
|
+
BS_E3_GOODS: {
|
|
15174
15838
|
type: 'e3',
|
|
15175
15839
|
key: 'bsE3Goods',
|
|
15176
15840
|
name: '百胜E3',
|
|
15177
15841
|
orderNo: 'dealCode',
|
|
15178
15842
|
goodDetailOrderNo: 'originalDealCode',
|
|
15179
15843
|
eventNameMap: {
|
|
15844
|
+
// pubsub 事件
|
|
15180
15845
|
type: 'bsE3Type',
|
|
15181
15846
|
updateGoodsHandle: updateBsE3GoodsHandle,
|
|
15182
15847
|
selectListReturn: 'bsE3SelectListReturn',
|
|
@@ -15193,6 +15858,31 @@ var componentMap$1 = {
|
|
|
15193
15858
|
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
15194
15859
|
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
15195
15860
|
}
|
|
15861
|
+
},
|
|
15862
|
+
GY_GOODS: {
|
|
15863
|
+
type: 'gy',
|
|
15864
|
+
key: 'gyGoods',
|
|
15865
|
+
name: '管易',
|
|
15866
|
+
orderNo: 'dealCode',
|
|
15867
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
15868
|
+
eventNameMap: {
|
|
15869
|
+
// pubsub 事件
|
|
15870
|
+
type: 'gyType',
|
|
15871
|
+
updateGoodsHandle: updateGyGoodsHandle,
|
|
15872
|
+
selectListReturn: 'gySelectListReturn',
|
|
15873
|
+
selectList: 'gySelectList',
|
|
15874
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
15875
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
15876
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
15877
|
+
changeShopCode: 'gyChangeShopCode',
|
|
15878
|
+
reissueType: 'gyReissueType',
|
|
15879
|
+
returnType: 'gyReturnType',
|
|
15880
|
+
returnSelectListReturn: 'gyReturnSelectListReturn',
|
|
15881
|
+
returnSelectList: 'gyReturnSelectList',
|
|
15882
|
+
deleteGood: 'gyDeleteGood',
|
|
15883
|
+
returnDeleteGood: 'gyReturnDeleteGood',
|
|
15884
|
+
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
15885
|
+
}
|
|
15196
15886
|
}
|
|
15197
15887
|
};
|
|
15198
15888
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -16595,15 +17285,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
16595
17285
|
};
|
|
16596
17286
|
|
|
16597
17287
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
16598
|
-
var msgTypeCh = {
|
|
16599
|
-
ding: '钉钉',
|
|
16600
|
-
wechat: '微信',
|
|
16601
|
-
qq: 'QQ',
|
|
16602
|
-
qywx: '企业微信',
|
|
16603
|
-
YZDKH: '邮政拦截',
|
|
16604
|
-
YT: '圆通拦截',
|
|
16605
|
-
feishu: '飞书'
|
|
16606
|
-
};
|
|
16607
17288
|
var MsgStatus = function MsgStatus(props) {
|
|
16608
17289
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
16609
17290
|
var _props$value = props.value,
|
|
@@ -16916,4 +17597,253 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16916
17597
|
})));
|
|
16917
17598
|
};
|
|
16918
17599
|
|
|
16919
|
-
|
|
17600
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17601
|
+
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17602
|
+
var typeMap$3 = {
|
|
17603
|
+
GY_REISSUE_GOODS: {
|
|
17604
|
+
key: 'gyReissueGoods',
|
|
17605
|
+
name: '管易',
|
|
17606
|
+
typeName: 'gyReissueType',
|
|
17607
|
+
systemOrder: 'gySystemOrder',
|
|
17608
|
+
systemOrderNo: 'gySystemOrderNo',
|
|
17609
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
17610
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
17611
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
17612
|
+
changeShopCode: 'gyChangeShopCode',
|
|
17613
|
+
reissueType: 'gyReissueType',
|
|
17614
|
+
formatDefaultField: {
|
|
17615
|
+
money: 'orderPrice',
|
|
17616
|
+
share: 'sharePrice'
|
|
17617
|
+
},
|
|
17618
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
17619
|
+
}
|
|
17620
|
+
};
|
|
17621
|
+
var GyReissue = function GyReissue(props) {
|
|
17622
|
+
var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
17623
|
+
var value = props.value,
|
|
17624
|
+
onChange = props.onChange,
|
|
17625
|
+
_props$reasonList = props.reasonList,
|
|
17626
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17627
|
+
disabled = props.disabled,
|
|
17628
|
+
type = props.type,
|
|
17629
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17630
|
+
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
|
|
17631
|
+
var _order$platformCode;
|
|
17632
|
+
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
17633
|
+
});
|
|
17634
|
+
var getOrderFlag = useRef(false);
|
|
17635
|
+
var _useState = useState(false),
|
|
17636
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17637
|
+
isStrict = _useState2[0],
|
|
17638
|
+
setIsStrict = _useState2[1];
|
|
17639
|
+
useEffect(function () {
|
|
17640
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17641
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[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$3[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)) {
|
|
17642
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17643
|
+
getOrderFlag.current = true;
|
|
17644
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[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);
|
|
17645
|
+
}
|
|
17646
|
+
return;
|
|
17647
|
+
}, [value]);
|
|
17648
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17649
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17650
|
+
var _typeMap$type4;
|
|
17651
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17652
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17653
|
+
case 0:
|
|
17654
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17655
|
+
var _typeMap$type5, _typeMap$type6;
|
|
17656
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17657
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
17658
|
+
var billNo = _ref2.billNo,
|
|
17659
|
+
billType = _ref2.billType,
|
|
17660
|
+
billTag = _ref2.billTag,
|
|
17661
|
+
tradeTagName = _ref2.tradeTagName,
|
|
17662
|
+
deliveryState = _ref2.deliveryState,
|
|
17663
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
17664
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17665
|
+
billNo: billNo,
|
|
17666
|
+
billType: billType,
|
|
17667
|
+
billTag: billTag,
|
|
17668
|
+
tradeTagName: tradeTagName,
|
|
17669
|
+
deliveryState: deliveryState,
|
|
17670
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17671
|
+
});
|
|
17672
|
+
});
|
|
17673
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
17674
|
+
showOrderInfo: showOrderInfo,
|
|
17675
|
+
orders: orders
|
|
17676
|
+
}))));
|
|
17677
|
+
});
|
|
17678
|
+
case 1:
|
|
17679
|
+
case "end":
|
|
17680
|
+
return _context.stop();
|
|
17681
|
+
}
|
|
17682
|
+
}, _callee);
|
|
17683
|
+
}));
|
|
17684
|
+
return function getOrderList(_x) {
|
|
17685
|
+
return _ref.apply(this, arguments);
|
|
17686
|
+
};
|
|
17687
|
+
}();
|
|
17688
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17689
|
+
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17690
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17691
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
17692
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17693
|
+
var newValue = _objectSpread2({}, value);
|
|
17694
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17695
|
+
if (typeName === '1') {
|
|
17696
|
+
var _typeMap$type9;
|
|
17697
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17698
|
+
mode: isStrict
|
|
17699
|
+
});
|
|
17700
|
+
} else if (typeName === '2') {
|
|
17701
|
+
var _typeMap$type10;
|
|
17702
|
+
// 切换到非原单,清空列表
|
|
17703
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17704
|
+
}
|
|
17705
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17706
|
+
};
|
|
17707
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17708
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17709
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
17710
|
+
setIsStrict(mode);
|
|
17711
|
+
if (!isOriginalOrder) return;
|
|
17712
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
17713
|
+
mode: mode
|
|
17714
|
+
}))));
|
|
17715
|
+
};
|
|
17716
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17717
|
+
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17718
|
+
var mode = _ref3.mode,
|
|
17719
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17720
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
17721
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
17722
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17723
|
+
return order.code === systemOrderNo;
|
|
17724
|
+
});
|
|
17725
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length) ? updateGyGoodsHandle([order]) : [];
|
|
17726
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17727
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17728
|
+
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
17729
|
+
}) : goodDetails;
|
|
17730
|
+
};
|
|
17731
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17732
|
+
var _typeMap$type15;
|
|
17733
|
+
var newValue = _objectSpread2({}, value);
|
|
17734
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
17735
|
+
var _typeMap$type16, _typeMap$type17;
|
|
17736
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
17737
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
17738
|
+
return item;
|
|
17739
|
+
});
|
|
17740
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17741
|
+
};
|
|
17742
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17743
|
+
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17744
|
+
var newValue = _objectSpread2({}, value);
|
|
17745
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
17746
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
17747
|
+
var _typeMap$type20;
|
|
17748
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
17749
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
17750
|
+
var _typeMap$type22;
|
|
17751
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
17752
|
+
mode: isStrict,
|
|
17753
|
+
sysOrderNo: val
|
|
17754
|
+
});
|
|
17755
|
+
}
|
|
17756
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17757
|
+
};
|
|
17758
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17759
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
17760
|
+
var newValue = _objectSpread2({}, value);
|
|
17761
|
+
// 原订单商品
|
|
17762
|
+
var originTradeGoodList = getGoodDetails({
|
|
17763
|
+
mode: isStrict
|
|
17764
|
+
}) || [];
|
|
17765
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17766
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
17767
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17768
|
+
return skuList.includes(item.uuid);
|
|
17769
|
+
});
|
|
17770
|
+
console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
17771
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17772
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
17773
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17774
|
+
var showChangeBtn = useMemo(function () {
|
|
17775
|
+
var _typeMap$type27;
|
|
17776
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17777
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17778
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17779
|
+
gutter: 8,
|
|
17780
|
+
wrap: true
|
|
17781
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
17782
|
+
className: "gutter-row",
|
|
17783
|
+
xs: {
|
|
17784
|
+
span: 11
|
|
17785
|
+
},
|
|
17786
|
+
sm: {
|
|
17787
|
+
span: 6
|
|
17788
|
+
}
|
|
17789
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
17790
|
+
style: {
|
|
17791
|
+
marginBottom: '8px'
|
|
17792
|
+
},
|
|
17793
|
+
disabled: disabled,
|
|
17794
|
+
allowClear: false,
|
|
17795
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
17796
|
+
onChange: function onChange(val) {
|
|
17797
|
+
return changeSystemOrderHandle(val);
|
|
17798
|
+
},
|
|
17799
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17800
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
17801
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17802
|
+
key: item.billNo,
|
|
17803
|
+
value: item.billNo,
|
|
17804
|
+
label: item.billNo
|
|
17805
|
+
}, item.billNo);
|
|
17806
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17807
|
+
className: "gutter-row",
|
|
17808
|
+
xs: {
|
|
17809
|
+
span: 11
|
|
17810
|
+
},
|
|
17811
|
+
sm: {
|
|
17812
|
+
span: 6
|
|
17813
|
+
}
|
|
17814
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17815
|
+
style: {
|
|
17816
|
+
marginBottom: '8px'
|
|
17817
|
+
},
|
|
17818
|
+
disabled: disabled,
|
|
17819
|
+
allowClear: false,
|
|
17820
|
+
options: reasonList,
|
|
17821
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
17822
|
+
onChange: function onChange(val) {
|
|
17823
|
+
return changeTypeHandle(val);
|
|
17824
|
+
}
|
|
17825
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17826
|
+
key: 'reissueGoods'
|
|
17827
|
+
}, other), {}, {
|
|
17828
|
+
type: type,
|
|
17829
|
+
disabled: disabled,
|
|
17830
|
+
canUpdateNumber: showChangeBtn,
|
|
17831
|
+
showChangeBtn: showChangeBtn,
|
|
17832
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17833
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
17834
|
+
onChange: function onChange(val) {
|
|
17835
|
+
return changeGoodHandle(val);
|
|
17836
|
+
},
|
|
17837
|
+
onModeChange: handleModeChange,
|
|
17838
|
+
showModeBtn: showModeBtn,
|
|
17839
|
+
isStrict: isStrict,
|
|
17840
|
+
tradeGoods: {
|
|
17841
|
+
originDataSource: getGoodDetails({
|
|
17842
|
+
mode: isStrict
|
|
17843
|
+
}),
|
|
17844
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17845
|
+
}
|
|
17846
|
+
})));
|
|
17847
|
+
};
|
|
17848
|
+
|
|
17849
|
+
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, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
|