@kmkf-fe-packages/basic-components 0.24.1-alpha.9 → 0.24.2-beta.0
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/README.md +1 -1
- package/dist/index.esm.js +981 -153
- package/dist/index.js +980 -151
- package/dist/src/bs/component/GoodItem/index.d.ts +1 -1
- package/dist/src/bs/component/model/WdtGoodsModal.d.ts +12 -0
- package/dist/src/common/CommonGoods/index.d.ts +3 -0
- package/dist/src/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, 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, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
@@ -7369,6 +7369,7 @@ function ApaasRate(props) {
|
|
|
7369
7369
|
|
|
7370
7370
|
var addressData = AddressData.getInstance();
|
|
7371
7371
|
var bsAddressData = BsAddressData.getInstance();
|
|
7372
|
+
var wdtAddressData = WdtAddressData.getInstance();
|
|
7372
7373
|
var Province = function Province(props) {
|
|
7373
7374
|
var _props$type = props.type,
|
|
7374
7375
|
type = _props$type === void 0 ? 'workOrder' : _props$type,
|
|
@@ -7387,7 +7388,11 @@ var Province = function Province(props) {
|
|
|
7387
7388
|
while (1) switch (_context.prev = _context.next) {
|
|
7388
7389
|
case 0:
|
|
7389
7390
|
num++;
|
|
7390
|
-
options =
|
|
7391
|
+
options = ({
|
|
7392
|
+
bs: bsAddressData,
|
|
7393
|
+
wdt: wdtAddressData,
|
|
7394
|
+
workOrder: addressData
|
|
7395
|
+
}[type] || addressData).addressOptions || [];
|
|
7391
7396
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7392
7397
|
time.current = setTimeout(function () {
|
|
7393
7398
|
initPageSource();
|
|
@@ -7526,7 +7531,11 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7526
7531
|
receiverMobile: val === null || val === void 0 ? void 0 : val.phone,
|
|
7527
7532
|
address: []
|
|
7528
7533
|
};
|
|
7529
|
-
var addressData = type
|
|
7534
|
+
var addressData = (type && {
|
|
7535
|
+
bs: BsAddressData,
|
|
7536
|
+
wdt: WdtAddressData,
|
|
7537
|
+
workOrder: AddressData
|
|
7538
|
+
}[type] || AddressData).getInstance();
|
|
7530
7539
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7531
7540
|
params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
|
|
7532
7541
|
}
|
|
@@ -8951,7 +8960,7 @@ var ChooseBaby = function ChooseBaby(props) {
|
|
|
8951
8960
|
}));
|
|
8952
8961
|
};
|
|
8953
8962
|
|
|
8954
|
-
var css_248z$6 = ".goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n.goodsBox.single-row .good-item.rich-item.with-pic,\n.goodsBox.single-row .good-item.rich-item.with-attr,\n.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n.good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n.good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n.good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n.good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n.good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n.good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n.good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n.good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.good-item.rich-item .good-attrs div {\n display: flex;\n}\n.good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n";
|
|
8963
|
+
var css_248z$6 = "#goods-wrap.goodsBox.single-row {\n max-height: 800px;\n overflow-y: auto;\n padding-top: 4px;\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-pic,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr,\n#goods-wrap.goodsBox.single-row .good-item.rich-item.with-attr.with-pic {\n flex-basis: 100%;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs {\n flex-grow: 1;\n flex-shrink: 1;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .good-item-attr {\n flex-grow: 1;\n flex-shrink: 1;\n max-width: 80px;\n width: 20px;\n flex-basis: 20px;\n}\n#goods-wrap.goodsBox.single-row .good-item.rich-item .good-attrs .ant-input {\n flex-shrink: 1;\n flex-grow: 1;\n width: 20px;\n flex-basis: 40px;\n}\n#goods-wrap .good-item.rich-item {\n position: relative;\n border: 1px solid #ccc;\n display: flex;\n flex-basis: 80px;\n flex-wrap: nowrap;\n margin: 0 10px 10px 0;\n padding: 4px;\n}\n#goods-wrap .good-item.rich-item.with-pic {\n flex-basis: 90px;\n}\n#goods-wrap .good-item.rich-item.with-attr {\n flex-basis: 150px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic {\n flex-basis: 238px;\n}\n#goods-wrap .good-item.rich-item.with-attr.with-pic .goods-imgBox {\n margin-right: 8px;\n}\n#goods-wrap .good-item.rich-item .good-item-attr {\n margin-right: 6px;\n width: 52px;\n flex-basis: 52px;\n}\n#goods-wrap .good-item.rich-item .good-img {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 0 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n#goods-wrap .good-item.rich-item .good-attrs {\n display: flex;\n flex-direction: column;\n font-size: 12px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#goods-wrap .good-item.rich-item .good-attrs .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n#goods-wrap .good-item.rich-item .good-attrs div {\n display: flex;\n}\n#goods-wrap .good-item.rich-item .good-attrs div:not(:first-child) {\n margin-top: 4px;\n}\n";
|
|
8955
8964
|
styleInject(css_248z$6);
|
|
8956
8965
|
|
|
8957
8966
|
var GoodItem = function GoodItem(props) {
|
|
@@ -9194,6 +9203,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9194
9203
|
className: "goods-uploaded-count"
|
|
9195
9204
|
}, imgList.length), "/", maxLength, "\u4E2A\u5B9D\u8D1D"), /*#__PURE__*/React.createElement("div", {
|
|
9196
9205
|
ref: boxRef,
|
|
9206
|
+
id: "goods-wrap",
|
|
9197
9207
|
className: "goodsBox goodsBox-item-horizontal--box".concat(isSingleRow ? ' single-row' : '')
|
|
9198
9208
|
}, imgList === null || imgList === void 0 ? void 0 : imgList.map(function (img, index) {
|
|
9199
9209
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10949,8 +10959,8 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
10949
10959
|
}];
|
|
10950
10960
|
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
10951
10961
|
style: {
|
|
10952
|
-
width: '
|
|
10953
|
-
maxWidth: '
|
|
10962
|
+
width: '100%',
|
|
10963
|
+
maxWidth: '387px'
|
|
10954
10964
|
}
|
|
10955
10965
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
10956
10966
|
columns: showColumns,
|
|
@@ -10978,7 +10988,10 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
10978
10988
|
_onCancel();
|
|
10979
10989
|
},
|
|
10980
10990
|
onOk: onOk,
|
|
10981
|
-
wrapClassName: "goodModal"
|
|
10991
|
+
wrapClassName: "goodModal",
|
|
10992
|
+
style: {
|
|
10993
|
+
top: 20
|
|
10994
|
+
}
|
|
10982
10995
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
10983
10996
|
layout: "inline",
|
|
10984
10997
|
form: form,
|
|
@@ -11054,6 +11067,9 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11054
11067
|
onChange: pageChange
|
|
11055
11068
|
}
|
|
11056
11069
|
}), /*#__PURE__*/React.createElement(Popover, {
|
|
11070
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
11071
|
+
return triggerNode.parentElement;
|
|
11072
|
+
},
|
|
11057
11073
|
content: showTable(),
|
|
11058
11074
|
title: "\u5DF2\u9009\u62E9".concat(selectIds.length, "\u4E2A\u5546\u54C1")
|
|
11059
11075
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -11063,6 +11079,440 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11063
11079
|
};
|
|
11064
11080
|
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
11065
11081
|
|
|
11082
|
+
var RangePicker = DatePicker.RangePicker;
|
|
11083
|
+
var columns$1 = [{
|
|
11084
|
+
dataIndex: 'index',
|
|
11085
|
+
title: 'NO',
|
|
11086
|
+
render: function render(val, record, index) {
|
|
11087
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11088
|
+
style: {
|
|
11089
|
+
width: 25
|
|
11090
|
+
}
|
|
11091
|
+
}, index + 1);
|
|
11092
|
+
}
|
|
11093
|
+
}, {
|
|
11094
|
+
dataIndex: 'goodName',
|
|
11095
|
+
title: '商品名称',
|
|
11096
|
+
width: 200,
|
|
11097
|
+
ellipsis: true
|
|
11098
|
+
}, {
|
|
11099
|
+
dataIndex: 'goodNo',
|
|
11100
|
+
title: '商品spu编码',
|
|
11101
|
+
width: 200,
|
|
11102
|
+
ellipsis: true
|
|
11103
|
+
}, {
|
|
11104
|
+
dataIndex: 'goodId',
|
|
11105
|
+
title: 'SPUID',
|
|
11106
|
+
width: 200,
|
|
11107
|
+
ellipsis: true
|
|
11108
|
+
}, {
|
|
11109
|
+
dataIndex: 'specCount',
|
|
11110
|
+
title: '规格数',
|
|
11111
|
+
width: 160,
|
|
11112
|
+
ellipsis: true
|
|
11113
|
+
}];
|
|
11114
|
+
var expandedColumns = [{
|
|
11115
|
+
dataIndex: 'specName',
|
|
11116
|
+
title: '商品sku名称',
|
|
11117
|
+
width: 200,
|
|
11118
|
+
ellipsis: true
|
|
11119
|
+
}, {
|
|
11120
|
+
dataIndex: 'specNo',
|
|
11121
|
+
title: '商品sku编码',
|
|
11122
|
+
width: 200,
|
|
11123
|
+
ellipsis: true
|
|
11124
|
+
}, {
|
|
11125
|
+
dataIndex: 'specId',
|
|
11126
|
+
title: 'SKUID',
|
|
11127
|
+
width: 200,
|
|
11128
|
+
ellipsis: true
|
|
11129
|
+
}, {
|
|
11130
|
+
dataIndex: 'imgUrl',
|
|
11131
|
+
title: '商品图片',
|
|
11132
|
+
width: 100,
|
|
11133
|
+
render: function render(picUrl) {
|
|
11134
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
11135
|
+
style: {
|
|
11136
|
+
width: '40px',
|
|
11137
|
+
height: '40px',
|
|
11138
|
+
objectFit: 'contain'
|
|
11139
|
+
},
|
|
11140
|
+
src: picUrl
|
|
11141
|
+
});
|
|
11142
|
+
}
|
|
11143
|
+
}, {
|
|
11144
|
+
dataIndex: 'marketPrice',
|
|
11145
|
+
title: '市场价',
|
|
11146
|
+
width: 140
|
|
11147
|
+
}, {
|
|
11148
|
+
dataIndex: 'retailPrice',
|
|
11149
|
+
title: '零售价',
|
|
11150
|
+
width: 140
|
|
11151
|
+
}, {
|
|
11152
|
+
dataIndex: 'memberPrice',
|
|
11153
|
+
title: '会员价',
|
|
11154
|
+
width: 140
|
|
11155
|
+
}];
|
|
11156
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11157
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11158
|
+
var initStartTime = hooks().subtract(1, 'M');
|
|
11159
|
+
var initEndTime = hooks();
|
|
11160
|
+
useImperativeHandle(ref, function () {
|
|
11161
|
+
return {
|
|
11162
|
+
open: function open(shopCode) {
|
|
11163
|
+
setVisible(true);
|
|
11164
|
+
setPageNo(1);
|
|
11165
|
+
setSelect([]);
|
|
11166
|
+
setSelectIds([]);
|
|
11167
|
+
form.setFieldsValue({
|
|
11168
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11169
|
+
code: ''
|
|
11170
|
+
});
|
|
11171
|
+
// getShopList();
|
|
11172
|
+
}
|
|
11173
|
+
};
|
|
11174
|
+
});
|
|
11175
|
+
|
|
11176
|
+
var onSubmit = props.onSubmit,
|
|
11177
|
+
shopId = props.shopId,
|
|
11178
|
+
shopList = props.shopList,
|
|
11179
|
+
width = props.width,
|
|
11180
|
+
companyKey = props.companyKey;
|
|
11181
|
+
var _useState = useState(false),
|
|
11182
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11183
|
+
visible = _useState2[0],
|
|
11184
|
+
setVisible = _useState2[1];
|
|
11185
|
+
var _useState3 = useState([]),
|
|
11186
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11187
|
+
selectList = _useState4[0],
|
|
11188
|
+
setSelect = _useState4[1];
|
|
11189
|
+
var _useState5 = useState([]),
|
|
11190
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11191
|
+
selectIds = _useState6[0],
|
|
11192
|
+
setSelectIds = _useState6[1];
|
|
11193
|
+
var _useState7 = useState(1),
|
|
11194
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11195
|
+
pageNo = _useState8[0],
|
|
11196
|
+
setPageNo = _useState8[1];
|
|
11197
|
+
var _useState9 = useState(20),
|
|
11198
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11199
|
+
pageSize = _useState10[0];
|
|
11200
|
+
var _useState11 = useState([]),
|
|
11201
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11202
|
+
goodList = _useState12[0],
|
|
11203
|
+
setGoodList = _useState12[1];
|
|
11204
|
+
var _useState13 = useState(false),
|
|
11205
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11206
|
+
loading = _useState14[0],
|
|
11207
|
+
setLoading = _useState14[1];
|
|
11208
|
+
var _useState15 = useState(0),
|
|
11209
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11210
|
+
total = _useState16[0],
|
|
11211
|
+
setTotal = _useState16[1];
|
|
11212
|
+
var displaySelectList = useMemo(function () {
|
|
11213
|
+
return selectList.map(function (item, i) {
|
|
11214
|
+
item.index = i + 1;
|
|
11215
|
+
return item;
|
|
11216
|
+
});
|
|
11217
|
+
}, [selectList]);
|
|
11218
|
+
useEffect(function () {
|
|
11219
|
+
if (visible) {
|
|
11220
|
+
queryItems();
|
|
11221
|
+
}
|
|
11222
|
+
}, [pageNo, visible]);
|
|
11223
|
+
var _Form$useForm = Form.useForm(),
|
|
11224
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11225
|
+
form = _Form$useForm2[0];
|
|
11226
|
+
//选择页码
|
|
11227
|
+
var pageChange = function pageChange(page) {
|
|
11228
|
+
setPageNo(page);
|
|
11229
|
+
};
|
|
11230
|
+
/**
|
|
11231
|
+
* 查询商品
|
|
11232
|
+
*/
|
|
11233
|
+
var queryItems = /*#__PURE__*/function () {
|
|
11234
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11235
|
+
var search,
|
|
11236
|
+
_formData$dateTimePic,
|
|
11237
|
+
_formData$dateTimePic2,
|
|
11238
|
+
_formData$dateTimePic3,
|
|
11239
|
+
_formData$dateTimePic4,
|
|
11240
|
+
_formData$dateTimePic5,
|
|
11241
|
+
_formData$dateTimePic6,
|
|
11242
|
+
formData,
|
|
11243
|
+
startTime,
|
|
11244
|
+
endTime,
|
|
11245
|
+
params,
|
|
11246
|
+
res,
|
|
11247
|
+
_res$data,
|
|
11248
|
+
_res$data$productList,
|
|
11249
|
+
productList,
|
|
11250
|
+
_res$data$total,
|
|
11251
|
+
_total,
|
|
11252
|
+
errorMsg,
|
|
11253
|
+
newProducts,
|
|
11254
|
+
_args = arguments;
|
|
11255
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11256
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11257
|
+
case 0:
|
|
11258
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11259
|
+
_context.prev = 1;
|
|
11260
|
+
setLoading(true);
|
|
11261
|
+
formData = form.getFieldsValue();
|
|
11262
|
+
startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, dateFormat)) || hooks().subtract(1, 'M').format(dateFormat);
|
|
11263
|
+
endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, dateFormat)) || hooks().format(dateFormat);
|
|
11264
|
+
params = {
|
|
11265
|
+
// shopCode: shopCode,
|
|
11266
|
+
pageSize: pageSize,
|
|
11267
|
+
pageNo: pageNo - 1,
|
|
11268
|
+
goodNo: search.code,
|
|
11269
|
+
startTime: startTime,
|
|
11270
|
+
endTime: endTime
|
|
11271
|
+
};
|
|
11272
|
+
_context.next = 9;
|
|
11273
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11274
|
+
method: 'post',
|
|
11275
|
+
data: params
|
|
11276
|
+
});
|
|
11277
|
+
case 9:
|
|
11278
|
+
res = _context.sent;
|
|
11279
|
+
_res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total, errorMsg = _res$data.errorMsg;
|
|
11280
|
+
if (res.success) {
|
|
11281
|
+
newProducts = productList.map(function (item, index) {
|
|
11282
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11283
|
+
index: index + 1
|
|
11284
|
+
});
|
|
11285
|
+
});
|
|
11286
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11287
|
+
if (pageNo === 1) {
|
|
11288
|
+
setTotal(_total);
|
|
11289
|
+
}
|
|
11290
|
+
} else {
|
|
11291
|
+
setGoodList([]);
|
|
11292
|
+
setTotal(0);
|
|
11293
|
+
message.error(errorMsg || res.message);
|
|
11294
|
+
}
|
|
11295
|
+
case 12:
|
|
11296
|
+
_context.prev = 12;
|
|
11297
|
+
setLoading(false);
|
|
11298
|
+
return _context.finish(12);
|
|
11299
|
+
case 15:
|
|
11300
|
+
case "end":
|
|
11301
|
+
return _context.stop();
|
|
11302
|
+
}
|
|
11303
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11304
|
+
}));
|
|
11305
|
+
return function queryItems() {
|
|
11306
|
+
return _ref.apply(this, arguments);
|
|
11307
|
+
};
|
|
11308
|
+
}();
|
|
11309
|
+
var _onCancel = function onCancel() {
|
|
11310
|
+
setVisible(false);
|
|
11311
|
+
};
|
|
11312
|
+
var onOk = function onOk() {
|
|
11313
|
+
onSubmit(selectList);
|
|
11314
|
+
_onCancel();
|
|
11315
|
+
};
|
|
11316
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11317
|
+
var searchValue = {
|
|
11318
|
+
code: fieldsValue.code
|
|
11319
|
+
};
|
|
11320
|
+
queryItems(searchValue);
|
|
11321
|
+
};
|
|
11322
|
+
var onReset = function onReset() {
|
|
11323
|
+
form.resetFields();
|
|
11324
|
+
form.setFieldsValue({
|
|
11325
|
+
dateTimePicker: [hooks().subtract(1, 'M'), hooks()],
|
|
11326
|
+
code: ''
|
|
11327
|
+
});
|
|
11328
|
+
setPageNo(function (prev) {
|
|
11329
|
+
if (prev === 1 && visible) {
|
|
11330
|
+
queryItems();
|
|
11331
|
+
}
|
|
11332
|
+
return 1;
|
|
11333
|
+
});
|
|
11334
|
+
};
|
|
11335
|
+
// const getShopList = async () => {
|
|
11336
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11337
|
+
// method: 'get',
|
|
11338
|
+
// params: {
|
|
11339
|
+
// key: 'company-third-shop-info',
|
|
11340
|
+
// },
|
|
11341
|
+
// });
|
|
11342
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11343
|
+
// if (success) {
|
|
11344
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11345
|
+
// return {
|
|
11346
|
+
// label: item.shopName,
|
|
11347
|
+
// value: item.shopCode,
|
|
11348
|
+
// };
|
|
11349
|
+
// });
|
|
11350
|
+
// setShopList(list);
|
|
11351
|
+
// }
|
|
11352
|
+
// };
|
|
11353
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11354
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11355
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11356
|
+
pubsub.publish('changeShopCode', {
|
|
11357
|
+
shopCode: changedValues.shopId
|
|
11358
|
+
});
|
|
11359
|
+
}
|
|
11360
|
+
};
|
|
11361
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11362
|
+
var newSelectList = selectList.filter(function (item) {
|
|
11363
|
+
return item.specId !== record.specId;
|
|
11364
|
+
});
|
|
11365
|
+
setSelect(_toConsumableArray(newSelectList));
|
|
11366
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11367
|
+
return item.specId;
|
|
11368
|
+
})));
|
|
11369
|
+
};
|
|
11370
|
+
var displaySelectedColumns = [{
|
|
11371
|
+
dataIndex: 'operation',
|
|
11372
|
+
title: '',
|
|
11373
|
+
render: function render(_, record, index) {
|
|
11374
|
+
return /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
11375
|
+
onClick: function onClick() {
|
|
11376
|
+
return handleDelete(record);
|
|
11377
|
+
}
|
|
11378
|
+
});
|
|
11379
|
+
}
|
|
11380
|
+
}, {
|
|
11381
|
+
dataIndex: 'index',
|
|
11382
|
+
title: 'NO',
|
|
11383
|
+
render: function render(val, record, index) {
|
|
11384
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11385
|
+
style: {
|
|
11386
|
+
width: 25
|
|
11387
|
+
}
|
|
11388
|
+
}, index + 1);
|
|
11389
|
+
}
|
|
11390
|
+
}];
|
|
11391
|
+
var expandedRowSelection = {
|
|
11392
|
+
fixed: true,
|
|
11393
|
+
selectedRowKeys: selectIds,
|
|
11394
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11395
|
+
var tempList = [];
|
|
11396
|
+
if (selected) {
|
|
11397
|
+
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
11398
|
+
} else {
|
|
11399
|
+
tempList = selectList.filter(function (item) {
|
|
11400
|
+
return item.specId !== record.specId;
|
|
11401
|
+
});
|
|
11402
|
+
}
|
|
11403
|
+
setSelect(_toConsumableArray(tempList));
|
|
11404
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11405
|
+
return item.specId;
|
|
11406
|
+
})));
|
|
11407
|
+
},
|
|
11408
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11409
|
+
var tempAllList = [];
|
|
11410
|
+
if (selected) {
|
|
11411
|
+
tempAllList = [].concat(_toConsumableArray(selectList), _toConsumableArray(selectedRows.filter(Boolean)));
|
|
11412
|
+
} else {
|
|
11413
|
+
tempAllList = selectList.filter(function (list) {
|
|
11414
|
+
return changeRows.filter(Boolean).every(function (item) {
|
|
11415
|
+
return list.specId !== item.specId;
|
|
11416
|
+
});
|
|
11417
|
+
});
|
|
11418
|
+
}
|
|
11419
|
+
setSelect(_toConsumableArray(tempAllList));
|
|
11420
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11421
|
+
return item.specId;
|
|
11422
|
+
})));
|
|
11423
|
+
}
|
|
11424
|
+
};
|
|
11425
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11426
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
11427
|
+
rowKey: 'specId',
|
|
11428
|
+
size: 'small',
|
|
11429
|
+
columns: expandedColumns,
|
|
11430
|
+
dataSource: record.itemDetailList || [],
|
|
11431
|
+
pagination: false,
|
|
11432
|
+
rowSelection: expandedRowSelection,
|
|
11433
|
+
scroll: {
|
|
11434
|
+
x: true
|
|
11435
|
+
}
|
|
11436
|
+
});
|
|
11437
|
+
};
|
|
11438
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
11439
|
+
title: '选择商品',
|
|
11440
|
+
okText: '确认',
|
|
11441
|
+
cancelText: '取消',
|
|
11442
|
+
visible: visible,
|
|
11443
|
+
width: width || 850,
|
|
11444
|
+
onCancel: function onCancel() {
|
|
11445
|
+
_onCancel();
|
|
11446
|
+
},
|
|
11447
|
+
onOk: onOk,
|
|
11448
|
+
wrapClassName: "goodModal"
|
|
11449
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
11450
|
+
layout: "inline",
|
|
11451
|
+
form: form,
|
|
11452
|
+
onFinish: onFinish,
|
|
11453
|
+
onValuesChange: onValuesChange,
|
|
11454
|
+
initialValues: {
|
|
11455
|
+
code: ''
|
|
11456
|
+
}
|
|
11457
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
11458
|
+
name: "dateTimePicker"
|
|
11459
|
+
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
11460
|
+
placeholder: ['开始日期', '结束日期'],
|
|
11461
|
+
showTime: true,
|
|
11462
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11463
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11464
|
+
name: "code"
|
|
11465
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
11466
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
11467
|
+
allowClear: true,
|
|
11468
|
+
style: {
|
|
11469
|
+
width: 150
|
|
11470
|
+
}
|
|
11471
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
11472
|
+
type: "primary",
|
|
11473
|
+
htmlType: "submit"
|
|
11474
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
11475
|
+
onClick: onReset
|
|
11476
|
+
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
11477
|
+
style: {
|
|
11478
|
+
marginTop: '16px'
|
|
11479
|
+
}
|
|
11480
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
11481
|
+
rowKey: 'goodNo',
|
|
11482
|
+
columns: columns$1,
|
|
11483
|
+
dataSource: goodList,
|
|
11484
|
+
loading: loading,
|
|
11485
|
+
scroll: {
|
|
11486
|
+
x: true,
|
|
11487
|
+
y: 250
|
|
11488
|
+
},
|
|
11489
|
+
expandable: {
|
|
11490
|
+
expandedRowRender: expandedRowRender
|
|
11491
|
+
},
|
|
11492
|
+
pagination: {
|
|
11493
|
+
size: 'small',
|
|
11494
|
+
total: total,
|
|
11495
|
+
current: pageNo,
|
|
11496
|
+
pageSize: pageSize,
|
|
11497
|
+
pageSizeOptions: [],
|
|
11498
|
+
onChange: pageChange
|
|
11499
|
+
}
|
|
11500
|
+
})), !!selectList.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Table, {
|
|
11501
|
+
rowKey: 'specId',
|
|
11502
|
+
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11503
|
+
dataSource: displaySelectList,
|
|
11504
|
+
pagination: false,
|
|
11505
|
+
scroll: {
|
|
11506
|
+
x: true,
|
|
11507
|
+
y: 250
|
|
11508
|
+
},
|
|
11509
|
+
style: {
|
|
11510
|
+
width: '100%'
|
|
11511
|
+
}
|
|
11512
|
+
})))));
|
|
11513
|
+
};
|
|
11514
|
+
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
11515
|
+
|
|
11066
11516
|
// interface GoodsItem {
|
|
11067
11517
|
// title: string;
|
|
11068
11518
|
// pic: string;
|
|
@@ -11073,6 +11523,7 @@ var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
|
11073
11523
|
var GoodItem$1 = function GoodItem(props) {
|
|
11074
11524
|
var _props$value = props.value,
|
|
11075
11525
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11526
|
+
type = props.type,
|
|
11076
11527
|
onChange = props.onChange,
|
|
11077
11528
|
disabled = props.disabled,
|
|
11078
11529
|
_props$showHeader = props.showHeader,
|
|
@@ -11120,105 +11571,214 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11120
11571
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11121
11572
|
}
|
|
11122
11573
|
};
|
|
11123
|
-
|
|
11124
|
-
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11574
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
11125
11575
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11126
|
-
return
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
value: '是'
|
|
11137
|
-
}, {
|
|
11138
|
-
label: '否',
|
|
11139
|
-
value: '否'
|
|
11140
|
-
}],
|
|
11141
|
-
disabled: disabled,
|
|
11142
|
-
value: val,
|
|
11143
|
-
onChange: function onChange(val) {
|
|
11144
|
-
return updateHandle(val, index, 'mark');
|
|
11145
|
-
}
|
|
11146
|
-
});
|
|
11147
|
-
}
|
|
11148
|
-
}, {
|
|
11149
|
-
dataIndex: 'skuName',
|
|
11150
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11151
|
-
align: 'center',
|
|
11152
|
-
ellipsis: true,
|
|
11153
|
-
width: 250
|
|
11154
|
-
}, {
|
|
11155
|
-
dataIndex: 'sku',
|
|
11156
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11157
|
-
align: 'center',
|
|
11158
|
-
ellipsis: true,
|
|
11159
|
-
width: 100
|
|
11160
|
-
}, {
|
|
11161
|
-
dataIndex: 'name',
|
|
11162
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
11163
|
-
align: 'center',
|
|
11164
|
-
ellipsis: true,
|
|
11165
|
-
width: 250
|
|
11166
|
-
}, {
|
|
11167
|
-
dataIndex: 'pic',
|
|
11168
|
-
title: "\u56FE\u7247",
|
|
11169
|
-
align: 'center',
|
|
11170
|
-
ellipsis: true,
|
|
11171
|
-
width: 100,
|
|
11172
|
-
render: function render(val) {
|
|
11173
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
11174
|
-
width: 60,
|
|
11175
|
-
src: val
|
|
11176
|
-
});
|
|
11177
|
-
}
|
|
11178
|
-
}, {
|
|
11179
|
-
dataIndex: 'code',
|
|
11180
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
11181
|
-
align: 'center',
|
|
11182
|
-
ellipsis: true,
|
|
11183
|
-
width: 100
|
|
11184
|
-
}, {
|
|
11185
|
-
dataIndex: 'money',
|
|
11186
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11187
|
-
align: 'center',
|
|
11188
|
-
ellipsis: true,
|
|
11189
|
-
width: 100
|
|
11190
|
-
}, {
|
|
11191
|
-
dataIndex: 'number',
|
|
11192
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
11193
|
-
align: 'center',
|
|
11194
|
-
ellipsis: true,
|
|
11195
|
-
width: 100,
|
|
11196
|
-
render: function render(val, record, index) {
|
|
11197
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11198
|
-
style: {
|
|
11576
|
+
return function (type) {
|
|
11577
|
+
var columns = [];
|
|
11578
|
+
switch (type) {
|
|
11579
|
+
case 'WDT_REISSUE_GOODS':
|
|
11580
|
+
case 'WDT_GOODS':
|
|
11581
|
+
columns = [{
|
|
11582
|
+
dataIndex: 'goodId',
|
|
11583
|
+
title: "SPUID",
|
|
11584
|
+
align: 'center',
|
|
11585
|
+
ellipsis: true,
|
|
11199
11586
|
width: 70
|
|
11587
|
+
}, {
|
|
11588
|
+
dataIndex: 'goodNo',
|
|
11589
|
+
title: "SPU\u5546\u54C1\u7F16\u7801",
|
|
11590
|
+
align: 'center',
|
|
11591
|
+
ellipsis: true,
|
|
11592
|
+
width: 100
|
|
11593
|
+
}, {
|
|
11594
|
+
dataIndex: 'goodName',
|
|
11595
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11596
|
+
align: 'center',
|
|
11597
|
+
ellipsis: true,
|
|
11598
|
+
width: 250
|
|
11599
|
+
}, {
|
|
11600
|
+
dataIndex: 'specId',
|
|
11601
|
+
title: "".concat(text, "SKUID"),
|
|
11602
|
+
align: 'center',
|
|
11603
|
+
ellipsis: true,
|
|
11604
|
+
width: 100
|
|
11605
|
+
}, {
|
|
11606
|
+
dataIndex: 'specNo',
|
|
11607
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11608
|
+
align: 'center',
|
|
11609
|
+
ellipsis: true,
|
|
11610
|
+
width: 100
|
|
11611
|
+
}, {
|
|
11612
|
+
dataIndex: 'specName',
|
|
11613
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11614
|
+
align: 'center',
|
|
11615
|
+
ellipsis: true,
|
|
11616
|
+
width: 250
|
|
11617
|
+
}, {
|
|
11618
|
+
dataIndex: 'orderPrice',
|
|
11619
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
11620
|
+
align: 'center',
|
|
11621
|
+
ellipsis: true,
|
|
11622
|
+
width: 100
|
|
11623
|
+
}, {
|
|
11624
|
+
dataIndex: 'num',
|
|
11625
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11626
|
+
align: 'center',
|
|
11627
|
+
ellipsis: true,
|
|
11628
|
+
width: 100,
|
|
11629
|
+
render: function render(val, record, index) {
|
|
11630
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11631
|
+
style: {
|
|
11632
|
+
width: 70
|
|
11633
|
+
},
|
|
11634
|
+
value: val,
|
|
11635
|
+
min: 0,
|
|
11636
|
+
precision: 0,
|
|
11637
|
+
onChange: function onChange(num) {
|
|
11638
|
+
return updateHandle(num, index, 'num');
|
|
11639
|
+
}
|
|
11640
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11641
|
+
}
|
|
11200
11642
|
},
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11643
|
+
// {
|
|
11644
|
+
// dataIndex: 'actualNum',
|
|
11645
|
+
// title: `${text}实发数量`,
|
|
11646
|
+
// align: 'center',
|
|
11647
|
+
// ellipsis: true,
|
|
11648
|
+
// width: 100,
|
|
11649
|
+
// },
|
|
11650
|
+
{
|
|
11651
|
+
dataIndex: 'sharePrice',
|
|
11652
|
+
title: "\u5206\u644A\u4EF7",
|
|
11653
|
+
align: 'center',
|
|
11654
|
+
ellipsis: true,
|
|
11655
|
+
width: 70
|
|
11656
|
+
}, {
|
|
11657
|
+
dataIndex: 'giftType',
|
|
11658
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11659
|
+
align: 'center',
|
|
11660
|
+
ellipsis: true,
|
|
11661
|
+
width: 100,
|
|
11662
|
+
render: function render(val) {
|
|
11663
|
+
var giftTypeMap = {
|
|
11664
|
+
0: '非赠品',
|
|
11665
|
+
1: '自动赠送',
|
|
11666
|
+
2: '手工赠送',
|
|
11667
|
+
3: '回购自动送赠品',
|
|
11668
|
+
4: '前N有礼送赠品',
|
|
11669
|
+
6: '天猫优仓赠品',
|
|
11670
|
+
7: '淘宝CRM会员送赠'
|
|
11671
|
+
};
|
|
11672
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
11673
|
+
}
|
|
11674
|
+
}];
|
|
11675
|
+
break;
|
|
11676
|
+
default:
|
|
11677
|
+
columns = [{
|
|
11678
|
+
dataIndex: 'mark',
|
|
11679
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
11680
|
+
align: 'center',
|
|
11681
|
+
ellipsis: true,
|
|
11682
|
+
width: 70,
|
|
11683
|
+
render: function render(val, record, index) {
|
|
11684
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
11685
|
+
options: [{
|
|
11686
|
+
label: '是',
|
|
11687
|
+
value: '是'
|
|
11688
|
+
}, {
|
|
11689
|
+
label: '否',
|
|
11690
|
+
value: '否'
|
|
11691
|
+
}],
|
|
11692
|
+
disabled: disabled,
|
|
11693
|
+
value: val,
|
|
11694
|
+
onChange: function onChange(val) {
|
|
11695
|
+
return updateHandle(val, index, 'mark');
|
|
11696
|
+
}
|
|
11697
|
+
});
|
|
11698
|
+
}
|
|
11699
|
+
}, {
|
|
11700
|
+
dataIndex: 'skuName',
|
|
11701
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
11702
|
+
align: 'center',
|
|
11703
|
+
ellipsis: true,
|
|
11704
|
+
width: 250
|
|
11705
|
+
}, {
|
|
11706
|
+
dataIndex: 'sku',
|
|
11707
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
11708
|
+
align: 'center',
|
|
11709
|
+
ellipsis: true,
|
|
11710
|
+
width: 100
|
|
11711
|
+
}, {
|
|
11712
|
+
dataIndex: 'name',
|
|
11713
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
11714
|
+
align: 'center',
|
|
11715
|
+
ellipsis: true,
|
|
11716
|
+
width: 250
|
|
11717
|
+
}, {
|
|
11718
|
+
dataIndex: 'pic',
|
|
11719
|
+
title: "\u56FE\u7247",
|
|
11720
|
+
align: 'center',
|
|
11721
|
+
ellipsis: true,
|
|
11722
|
+
width: 100,
|
|
11723
|
+
render: function render(val) {
|
|
11724
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
11725
|
+
width: 60,
|
|
11726
|
+
src: val
|
|
11727
|
+
});
|
|
11728
|
+
}
|
|
11729
|
+
}, {
|
|
11730
|
+
dataIndex: 'code',
|
|
11731
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
11732
|
+
align: 'center',
|
|
11733
|
+
ellipsis: true,
|
|
11734
|
+
width: 100
|
|
11735
|
+
}, {
|
|
11736
|
+
dataIndex: 'money',
|
|
11737
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
11738
|
+
align: 'center',
|
|
11739
|
+
ellipsis: true,
|
|
11740
|
+
width: 100
|
|
11741
|
+
}, {
|
|
11742
|
+
dataIndex: 'number',
|
|
11743
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
11744
|
+
align: 'center',
|
|
11745
|
+
ellipsis: true,
|
|
11746
|
+
width: 100,
|
|
11747
|
+
render: function render(val, record, index) {
|
|
11748
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11749
|
+
style: {
|
|
11750
|
+
width: 70
|
|
11751
|
+
},
|
|
11752
|
+
value: val,
|
|
11753
|
+
min: 0,
|
|
11754
|
+
precision: 0,
|
|
11755
|
+
onChange: function onChange(num) {
|
|
11756
|
+
return updateHandle(num, index, 'number');
|
|
11757
|
+
}
|
|
11758
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11759
|
+
}
|
|
11760
|
+
}, {
|
|
11761
|
+
dataIndex: 'share',
|
|
11762
|
+
title: "\u5206\u644A\u4EF7",
|
|
11763
|
+
align: 'center',
|
|
11764
|
+
ellipsis: true,
|
|
11765
|
+
width: 70
|
|
11766
|
+
}, {
|
|
11767
|
+
dataIndex: 'type',
|
|
11768
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11769
|
+
align: 'center',
|
|
11770
|
+
ellipsis: true,
|
|
11771
|
+
width: 100
|
|
11772
|
+
}];
|
|
11208
11773
|
}
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
11218
|
-
align: 'center',
|
|
11219
|
-
ellipsis: true,
|
|
11220
|
-
width: 100
|
|
11221
|
-
}];
|
|
11774
|
+
return columns;
|
|
11775
|
+
};
|
|
11776
|
+
};
|
|
11777
|
+
//商品信息
|
|
11778
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
11779
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11780
|
+
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
11781
|
+
return COLUMNS_INFO(type);
|
|
11222
11782
|
};
|
|
11223
11783
|
var newColumns = useMemo(function () {
|
|
11224
11784
|
var columnList = [{
|
|
@@ -11253,30 +11813,43 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11253
11813
|
return columnList;
|
|
11254
11814
|
}, [showHeader, value, disabled]);
|
|
11255
11815
|
var onSubmit = function onSubmit(list) {
|
|
11256
|
-
var newList =
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11816
|
+
var newList = [];
|
|
11817
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
11818
|
+
newList = list.map(function (item) {
|
|
11819
|
+
item.uuid = uuid();
|
|
11820
|
+
item.canDelete = true;
|
|
11821
|
+
item.num = 1;
|
|
11822
|
+
item.orderPrice = 0;
|
|
11823
|
+
item.sharePrice = 0;
|
|
11824
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
11825
|
+
return item;
|
|
11826
|
+
});
|
|
11827
|
+
} else {
|
|
11828
|
+
newList = list.map(function (item) {
|
|
11829
|
+
var goodsId = item.goodsId,
|
|
11830
|
+
name = item.name,
|
|
11831
|
+
code = item.code,
|
|
11832
|
+
skuCode = item.skuCode,
|
|
11833
|
+
marketPrice = item.marketPrice,
|
|
11834
|
+
skuName = item.skuName;
|
|
11835
|
+
return {
|
|
11836
|
+
id: goodsId,
|
|
11837
|
+
mark: '是',
|
|
11838
|
+
pic: '',
|
|
11839
|
+
skuName: skuName,
|
|
11840
|
+
name: name,
|
|
11841
|
+
code: code,
|
|
11842
|
+
sku: skuCode,
|
|
11843
|
+
money: marketPrice || 0,
|
|
11844
|
+
share: marketPrice || 0,
|
|
11845
|
+
number: 1,
|
|
11846
|
+
type: '',
|
|
11847
|
+
uuid: uuid(),
|
|
11848
|
+
canDelete: true,
|
|
11849
|
+
canUpdateNumber: canUpdateNumber
|
|
11850
|
+
};
|
|
11851
|
+
});
|
|
11852
|
+
}
|
|
11280
11853
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
11281
11854
|
};
|
|
11282
11855
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -11319,7 +11892,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11319
11892
|
locale: {
|
|
11320
11893
|
emptyText: '暂无数据'
|
|
11321
11894
|
}
|
|
11322
|
-
})), /*#__PURE__*/React.createElement(
|
|
11895
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
11896
|
+
ref: refModal,
|
|
11897
|
+
onSubmit: onSubmit,
|
|
11898
|
+
width: width,
|
|
11899
|
+
shopList: shopList,
|
|
11900
|
+
shopId: shopId,
|
|
11901
|
+
maxLength: maxLength,
|
|
11902
|
+
companyKey: companyKey
|
|
11903
|
+
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
11323
11904
|
ref: refModal,
|
|
11324
11905
|
onSubmit: onSubmit,
|
|
11325
11906
|
width: width,
|
|
@@ -11700,25 +12281,60 @@ var BsExchange = function BsExchange(props) {
|
|
|
11700
12281
|
}))) : null);
|
|
11701
12282
|
};
|
|
11702
12283
|
|
|
11703
|
-
var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
|
|
12284
|
+
var _excluded$e = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12285
|
+
var typeMap = {
|
|
12286
|
+
BS_REISSUE_GOODS: {
|
|
12287
|
+
key: 'bsReissueGoods',
|
|
12288
|
+
name: 'bs',
|
|
12289
|
+
typeName: 'bsReissueType',
|
|
12290
|
+
reissueSelectList: 'reissueSelectList',
|
|
12291
|
+
reissueSelectListReturn: 'reissueSelectListReturn',
|
|
12292
|
+
reissueDeleteGood: 'reissueDeleteGood',
|
|
12293
|
+
changeShopCode: 'changeShopCode',
|
|
12294
|
+
reissueType: 'reissueType',
|
|
12295
|
+
formatDefaultField: {
|
|
12296
|
+
money: 'money',
|
|
12297
|
+
share: 'share'
|
|
12298
|
+
}
|
|
12299
|
+
},
|
|
12300
|
+
WDT_REISSUE_GOODS: {
|
|
12301
|
+
key: 'wdtReissueGoods',
|
|
12302
|
+
name: '旺店通',
|
|
12303
|
+
typeName: 'wdtReissueType',
|
|
12304
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12305
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12306
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12307
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12308
|
+
reissueType: 'wdtReissueType',
|
|
12309
|
+
formatDefaultField: {
|
|
12310
|
+
money: 'orderPrice',
|
|
12311
|
+
share: 'sharePrice'
|
|
12312
|
+
}
|
|
12313
|
+
}
|
|
12314
|
+
};
|
|
11704
12315
|
var BsReissue = function BsReissue(props) {
|
|
12316
|
+
var _typeMap$type20, _typeMap$type21, _typeMap$type22;
|
|
11705
12317
|
var value = props.value,
|
|
11706
12318
|
onChange = props.onChange,
|
|
11707
12319
|
_props$reasonList = props.reasonList,
|
|
11708
12320
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
11709
12321
|
disabled = props.disabled,
|
|
12322
|
+
type = props.type,
|
|
11710
12323
|
other = _objectWithoutProperties(props, _excluded$e);
|
|
11711
12324
|
var valueRef = useRef({});
|
|
11712
12325
|
useEffect(function () {
|
|
11713
|
-
|
|
12326
|
+
var _typeMap$type;
|
|
12327
|
+
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type = typeMap[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueSelectList), function (_, data) {
|
|
12328
|
+
var _typeMap$type2;
|
|
11714
12329
|
// console.log('reissueSelectList', data);
|
|
11715
12330
|
if (disabled) return;
|
|
11716
12331
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11717
12332
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11718
12333
|
});
|
|
11719
|
-
newValue.
|
|
11720
|
-
|
|
11721
|
-
item.
|
|
12334
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type2 = typeMap[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
12335
|
+
var _typeMap$type3, _typeMap$type4;
|
|
12336
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type3 = typeMap[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.formatDefaultField.money)] = 0;
|
|
12337
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type4 = typeMap[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.formatDefaultField.share)] = 0;
|
|
11722
12338
|
item.canUpdateNumber = true;
|
|
11723
12339
|
return item;
|
|
11724
12340
|
});
|
|
@@ -11726,15 +12342,18 @@ var BsReissue = function BsReissue(props) {
|
|
|
11726
12342
|
});
|
|
11727
12343
|
}, []);
|
|
11728
12344
|
useEffect(function () {
|
|
11729
|
-
|
|
12345
|
+
var _typeMap$type5;
|
|
12346
|
+
pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type5 = typeMap[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.reissueSelectListReturn), function (_, data) {
|
|
12347
|
+
var _typeMap$type6;
|
|
11730
12348
|
// console.log('reissueSelectListReturn', data);
|
|
11731
12349
|
if (disabled) return;
|
|
11732
12350
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
11733
12351
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
11734
12352
|
});
|
|
11735
|
-
newValue.
|
|
11736
|
-
|
|
11737
|
-
item.
|
|
12353
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type6 = typeMap[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key)] = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
|
|
12354
|
+
var _typeMap$type7, _typeMap$type8;
|
|
12355
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type7 = typeMap[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.formatDefaultField.money)] = 0;
|
|
12356
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type8 = typeMap[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.formatDefaultField.share)] = 0;
|
|
11738
12357
|
item.canUpdateNumber = true;
|
|
11739
12358
|
return item;
|
|
11740
12359
|
});
|
|
@@ -11742,50 +12361,55 @@ var BsReissue = function BsReissue(props) {
|
|
|
11742
12361
|
});
|
|
11743
12362
|
}, []);
|
|
11744
12363
|
useEffect(function () {
|
|
12364
|
+
var _typeMap$type9, _typeMap$type12;
|
|
11745
12365
|
valueRef.current = value;
|
|
11746
|
-
pubsub.subscribeOnce(
|
|
12366
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type9 = typeMap[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.reissueDeleteGood), function (_, data) {
|
|
11747
12367
|
if (disabled) return;
|
|
11748
12368
|
if (value) {
|
|
12369
|
+
var _typeMap$type10, _typeMap$type11;
|
|
11749
12370
|
var newValue = _objectSpread2({}, value);
|
|
11750
|
-
newValue.
|
|
12371
|
+
newValue["".concat((_typeMap$type10 = typeMap[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type11 = typeMap[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key)].filter(function (item) {
|
|
11751
12372
|
return item.sku !== data;
|
|
11752
12373
|
});
|
|
11753
12374
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11754
12375
|
}
|
|
11755
12376
|
});
|
|
11756
|
-
pubsub.subscribeOnce(
|
|
12377
|
+
pubsub.subscribeOnce("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type12 = typeMap[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.changeShopCode), function (type, data) {
|
|
11757
12378
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11758
12379
|
shopCode: data.shopCode
|
|
11759
12380
|
}));
|
|
11760
12381
|
});
|
|
11761
12382
|
}, [value, disabled]);
|
|
11762
12383
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
12384
|
+
var _typeMap$type13, _typeMap$type14, _typeMap$type15;
|
|
11763
12385
|
var newValue = _objectSpread2({}, value);
|
|
11764
|
-
newValue[
|
|
11765
|
-
newValue.
|
|
12386
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type13 = typeMap[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName)] = val;
|
|
12387
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type14 = typeMap[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = [];
|
|
11766
12388
|
if (['2', '4'].includes(val[0])) {
|
|
11767
12389
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11768
12390
|
valueRef.current = newValue;
|
|
11769
12391
|
}
|
|
11770
|
-
pubsub.publish(
|
|
12392
|
+
pubsub.publish("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type15 = typeMap[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.reissueType), {
|
|
11771
12393
|
val: val[0],
|
|
11772
12394
|
goodValue: newValue
|
|
11773
12395
|
});
|
|
11774
12396
|
};
|
|
11775
12397
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
12398
|
+
var _typeMap$type16;
|
|
11776
12399
|
var newValue = _objectSpread2({}, value);
|
|
11777
|
-
newValue[
|
|
11778
|
-
|
|
11779
|
-
item.
|
|
12400
|
+
newValue["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type16 = typeMap[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key)] = (val || []).map(function (item) {
|
|
12401
|
+
var _typeMap$type17, _typeMap$type18;
|
|
12402
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type17 = typeMap[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.money)] = 0;
|
|
12403
|
+
item["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type18 = typeMap[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.share)] = 0;
|
|
11780
12404
|
return item;
|
|
11781
12405
|
});
|
|
11782
12406
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
11783
12407
|
};
|
|
11784
12408
|
//显示选择商品按钮 原单换不显示选择商品
|
|
11785
12409
|
var showChangeBtn = useMemo(function () {
|
|
11786
|
-
var _value$
|
|
11787
|
-
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value
|
|
11788
|
-
}, [value === null || value === void 0 ? void 0 : value.
|
|
12410
|
+
var _value, _typeMap$type19;
|
|
12411
|
+
return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type19 = typeMap[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName)]) === null || _value === void 0 ? void 0 : _value[0]);
|
|
12412
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]]);
|
|
11789
12413
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
11790
12414
|
style: {
|
|
11791
12415
|
marginBottom: '8px'
|
|
@@ -11793,18 +12417,19 @@ var BsReissue = function BsReissue(props) {
|
|
|
11793
12417
|
disabled: disabled,
|
|
11794
12418
|
allowClear: false,
|
|
11795
12419
|
options: reasonList,
|
|
11796
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12420
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type21 = typeMap[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName)],
|
|
11797
12421
|
onChange: function onChange(val) {
|
|
11798
12422
|
return changeTypeHandle(val);
|
|
11799
12423
|
}
|
|
11800
12424
|
}), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
11801
12425
|
key: 'reissueGoods'
|
|
11802
12426
|
}, other), {}, {
|
|
12427
|
+
type: type,
|
|
11803
12428
|
disabled: disabled,
|
|
11804
12429
|
canUpdateNumber: showChangeBtn,
|
|
11805
12430
|
showChangeBtn: showChangeBtn,
|
|
11806
12431
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11807
|
-
value: value === null || value === void 0 ? void 0 : value.
|
|
12432
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type22 = typeMap[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)],
|
|
11808
12433
|
onChange: function onChange(val) {
|
|
11809
12434
|
return changeGoodHandle(val);
|
|
11810
12435
|
}
|
|
@@ -11916,6 +12541,10 @@ var columnsNameMap = {
|
|
|
11916
12541
|
WLN_SYSTEM_ORDER: {
|
|
11917
12542
|
typeName: '订单类型',
|
|
11918
12543
|
tagName: '标记'
|
|
12544
|
+
},
|
|
12545
|
+
WDT_SYSTEM_ORDER: {
|
|
12546
|
+
typeName: '订单类型',
|
|
12547
|
+
tagName: '订单标签'
|
|
11919
12548
|
}
|
|
11920
12549
|
};
|
|
11921
12550
|
var index$1 = (function (props) {
|
|
@@ -11930,6 +12559,8 @@ var index$1 = (function (props) {
|
|
|
11930
12559
|
getOrderList(value.orderNo);
|
|
11931
12560
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11932
12561
|
getWlnOrderList(value.orderNo);
|
|
12562
|
+
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
12563
|
+
getWdtOrderList(value.orderNo);
|
|
11933
12564
|
}
|
|
11934
12565
|
}
|
|
11935
12566
|
}, [value, type]);
|
|
@@ -12030,6 +12661,51 @@ var index$1 = (function (props) {
|
|
|
12030
12661
|
return _ref2.apply(this, arguments);
|
|
12031
12662
|
};
|
|
12032
12663
|
}();
|
|
12664
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12665
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12666
|
+
var _yield$request3, success, data;
|
|
12667
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12668
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
12669
|
+
case 0:
|
|
12670
|
+
_context3.next = 2;
|
|
12671
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
12672
|
+
method: 'post',
|
|
12673
|
+
data: {
|
|
12674
|
+
billNo: orderNo
|
|
12675
|
+
}
|
|
12676
|
+
});
|
|
12677
|
+
case 2:
|
|
12678
|
+
_yield$request3 = _context3.sent;
|
|
12679
|
+
success = _yield$request3.success;
|
|
12680
|
+
data = _yield$request3.data;
|
|
12681
|
+
if (success) {
|
|
12682
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12683
|
+
orders: ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
12684
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12685
|
+
billNo: item.tradeNo,
|
|
12686
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12687
|
+
billTag: item.tagName
|
|
12688
|
+
});
|
|
12689
|
+
}),
|
|
12690
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
12691
|
+
return {
|
|
12692
|
+
billNo: item.tradeNo,
|
|
12693
|
+
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12694
|
+
billTag: item.tagName
|
|
12695
|
+
};
|
|
12696
|
+
})
|
|
12697
|
+
}));
|
|
12698
|
+
}
|
|
12699
|
+
case 6:
|
|
12700
|
+
case "end":
|
|
12701
|
+
return _context3.stop();
|
|
12702
|
+
}
|
|
12703
|
+
}, _callee3);
|
|
12704
|
+
}));
|
|
12705
|
+
return function getWdtOrderList(_x3) {
|
|
12706
|
+
return _ref3.apply(this, arguments);
|
|
12707
|
+
};
|
|
12708
|
+
}();
|
|
12033
12709
|
var rowSelection = {
|
|
12034
12710
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
12035
12711
|
fixed: true,
|
|
@@ -12084,13 +12760,165 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
12084
12760
|
}));
|
|
12085
12761
|
};
|
|
12086
12762
|
|
|
12763
|
+
var componentMap$1 = {
|
|
12764
|
+
'WDT_GOODS': {
|
|
12765
|
+
type: 'wdt',
|
|
12766
|
+
key: 'wdtGoods',
|
|
12767
|
+
name: '旺店通',
|
|
12768
|
+
eventNameMap: {
|
|
12769
|
+
type: 'wdtType',
|
|
12770
|
+
selectListReturn: 'wdtSelectListReturn',
|
|
12771
|
+
selectList: 'wdtSelectList',
|
|
12772
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12773
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12774
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12775
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12776
|
+
reissueType: 'wdtReissueType',
|
|
12777
|
+
returnType: 'wdtReturnType',
|
|
12778
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
12779
|
+
deleteGood: 'wdtDeleteGood',
|
|
12780
|
+
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
12781
|
+
}
|
|
12782
|
+
}
|
|
12783
|
+
};
|
|
12784
|
+
var CommonGoods = function CommonGoods(props) {
|
|
12785
|
+
var _withInfo$current3, _withInfo$current4;
|
|
12786
|
+
var value = props.value,
|
|
12787
|
+
disabled = props.disabled,
|
|
12788
|
+
onChange = props.onChange,
|
|
12789
|
+
compType = props.type;
|
|
12790
|
+
var _useState = useState(false),
|
|
12791
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12792
|
+
tableSelect = _useState2[0],
|
|
12793
|
+
setTableSelect = _useState2[1];
|
|
12794
|
+
var withInfo = useRef(null);
|
|
12795
|
+
var valueRef = useRef(null);
|
|
12796
|
+
useEffect(function () {
|
|
12797
|
+
valueRef.current = value;
|
|
12798
|
+
}, [value]);
|
|
12799
|
+
useEffect(function () {
|
|
12800
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
12801
|
+
if (disabled) return;
|
|
12802
|
+
// console.log(type, data);
|
|
12803
|
+
withInfo.current = {
|
|
12804
|
+
type: type,
|
|
12805
|
+
val: data.val,
|
|
12806
|
+
goodValue: data.goodValue
|
|
12807
|
+
};
|
|
12808
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12809
|
+
if (['1', '3'].includes(data.val)) {
|
|
12810
|
+
var _valueRef$current, _valueRef$current2;
|
|
12811
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.selectListReturn, {
|
|
12812
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$1[compType].key]) || []),
|
|
12813
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
|
|
12814
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12815
|
+
});
|
|
12816
|
+
}
|
|
12817
|
+
});
|
|
12818
|
+
//补发
|
|
12819
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
|
|
12820
|
+
if (disabled) return;
|
|
12821
|
+
withInfo.current = {
|
|
12822
|
+
type: type,
|
|
12823
|
+
val: data.val,
|
|
12824
|
+
goodValue: data.goodValue
|
|
12825
|
+
};
|
|
12826
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12827
|
+
if (['1', '3'].includes(data.val)) {
|
|
12828
|
+
var _valueRef$current3, _valueRef$current4;
|
|
12829
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
|
|
12830
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3[componentMap$1[compType].key]) || []),
|
|
12831
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
|
|
12832
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12833
|
+
});
|
|
12834
|
+
}
|
|
12835
|
+
});
|
|
12836
|
+
//退货
|
|
12837
|
+
pubsub.subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
|
|
12838
|
+
if (disabled) return;
|
|
12839
|
+
withInfo.current = {
|
|
12840
|
+
type: type,
|
|
12841
|
+
val: data.val,
|
|
12842
|
+
goodValue: data.goodValue
|
|
12843
|
+
};
|
|
12844
|
+
setTableSelect(['2', '4'].includes(data.val));
|
|
12845
|
+
if (['1', '3'].includes(data.val)) {
|
|
12846
|
+
var _valueRef$current5, _valueRef$current6;
|
|
12847
|
+
pubsub.publish(componentMap$1[type].eventNameMap.returnSelectListReturn, {
|
|
12848
|
+
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5[componentMap$1[compType].key]) || []),
|
|
12849
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12850
|
+
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
12851
|
+
});
|
|
12852
|
+
}
|
|
12853
|
+
});
|
|
12854
|
+
pubsub.subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
12855
|
+
// console.log(data);
|
|
12856
|
+
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
12857
|
+
shopCode: data.shopCode
|
|
12858
|
+
}));
|
|
12859
|
+
});
|
|
12860
|
+
return function () {
|
|
12861
|
+
pubsub.clearAllSubscriptions();
|
|
12862
|
+
};
|
|
12863
|
+
}, [disabled]);
|
|
12864
|
+
var _onSelect = function onSelect(list) {
|
|
12865
|
+
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12866
|
+
if (disabled) return;
|
|
12867
|
+
var newList = cloneDeep(list);
|
|
12868
|
+
var typeMap = _defineProperty({
|
|
12869
|
+
// type: componentMap[compType].eventNameMap.selectList,
|
|
12870
|
+
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12871
|
+
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12872
|
+
type: componentMap$1[compType].eventNameMap.selectList
|
|
12873
|
+
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
12874
|
+
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12875
|
+
// console.log('onSelect', type, withInfo.current, newList);
|
|
12876
|
+
pubsub.publish(type, {
|
|
12877
|
+
type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
|
|
12878
|
+
list: newList.map(function (item) {
|
|
12879
|
+
item.canDelete = true;
|
|
12880
|
+
return item;
|
|
12881
|
+
}),
|
|
12882
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
12883
|
+
goodValue: withInfo.current.goodValue
|
|
12884
|
+
});
|
|
12885
|
+
};
|
|
12886
|
+
var _onDelete = function onDelete(item) {
|
|
12887
|
+
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
12888
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12889
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12890
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
12891
|
+
};
|
|
12892
|
+
var changeHandle = function changeHandle(list) {
|
|
12893
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
12894
|
+
};
|
|
12895
|
+
return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
12896
|
+
key: componentMap$1[compType].key
|
|
12897
|
+
}, props), {}, {
|
|
12898
|
+
disabled: disabled,
|
|
12899
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
|
|
12900
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12901
|
+
tableSelect: ['2', '4'].includes(withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current3 = withInfo.current) === null || _withInfo$current3 === void 0 ? void 0 : _withInfo$current3.val),
|
|
12902
|
+
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
12903
|
+
onSelect: function onSelect(list) {
|
|
12904
|
+
return _onSelect(list);
|
|
12905
|
+
},
|
|
12906
|
+
onDelete: function onDelete(item) {
|
|
12907
|
+
return _onDelete(item);
|
|
12908
|
+
},
|
|
12909
|
+
onChange: function onChange(val) {
|
|
12910
|
+
return changeHandle(val);
|
|
12911
|
+
}
|
|
12912
|
+
}));
|
|
12913
|
+
};
|
|
12914
|
+
|
|
12087
12915
|
var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
12088
12916
|
styleInject(css_248z$a);
|
|
12089
12917
|
|
|
12090
12918
|
var TabPane$1 = Tabs.TabPane;
|
|
12091
12919
|
var Option$2 = Select.Option;
|
|
12092
12920
|
var Search$1 = Input.Search;
|
|
12093
|
-
var GoodsModal$
|
|
12921
|
+
var GoodsModal$4 = function GoodsModal(props) {
|
|
12094
12922
|
var onSubmit = props.onSubmit,
|
|
12095
12923
|
_onCancel = props.onCancel,
|
|
12096
12924
|
visible = props.visible,
|
|
@@ -12541,7 +13369,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
12541
13369
|
};
|
|
12542
13370
|
return /*#__PURE__*/React.createElement("div", {
|
|
12543
13371
|
className: "goodsBox"
|
|
12544
|
-
}, /*#__PURE__*/React.createElement(GoodsModal$
|
|
13372
|
+
}, /*#__PURE__*/React.createElement(GoodsModal$4, {
|
|
12545
13373
|
visible: visible,
|
|
12546
13374
|
onSubmit: onSubmit,
|
|
12547
13375
|
type: type,
|
|
@@ -12846,4 +13674,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
12846
13674
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
12847
13675
|
};
|
|
12848
13676
|
|
|
12849
|
-
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|
|
13677
|
+
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|