@kmkf-fe-packages/basic-components 1.0.4-rc.5 → 1.0.4
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 +227 -493
- package/dist/index.js +225 -493
- package/dist/src/index.d.ts +0 -3
- package/dist/src/jst/Goods/index.d.ts +0 -1
- package/package.json +3 -3
- package/dist/src/bs/component/model/WdtGoodList.d.ts +0 -40
- package/dist/src/wdt/Reissue/index.d.ts +0 -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, LogisticsAddressData,
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, 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';
|
|
@@ -7563,11 +7563,10 @@ function ApaasPosting(props) {
|
|
|
7563
7563
|
});
|
|
7564
7564
|
}
|
|
7565
7565
|
|
|
7566
|
-
var _excluded$a = ["value", "onChange"
|
|
7566
|
+
var _excluded$a = ["value", "onChange"];
|
|
7567
7567
|
function ApaasLogistics(props) {
|
|
7568
7568
|
var value = props.value,
|
|
7569
7569
|
onChange = props.onChange,
|
|
7570
|
-
platformType = props.platformType,
|
|
7571
7570
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7572
7571
|
var _useState = useState([]),
|
|
7573
7572
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7580,7 +7579,7 @@ function ApaasLogistics(props) {
|
|
|
7580
7579
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7581
7580
|
while (1) switch (_context.prev = _context.next) {
|
|
7582
7581
|
case 0:
|
|
7583
|
-
express = ExpressData.getInstance(
|
|
7582
|
+
express = ExpressData.getInstance();
|
|
7584
7583
|
setOptions(express.expressData || []);
|
|
7585
7584
|
case 2:
|
|
7586
7585
|
case "end":
|
|
@@ -10424,7 +10423,7 @@ var typeInitValueMap = {
|
|
|
10424
10423
|
}]
|
|
10425
10424
|
};
|
|
10426
10425
|
var jstGoods = function jstGoods(props) {
|
|
10427
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7
|
|
10426
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10428
10427
|
var _props$value = props.value,
|
|
10429
10428
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10430
10429
|
onChange = props.onChange,
|
|
@@ -10432,14 +10431,11 @@ var jstGoods = function jstGoods(props) {
|
|
|
10432
10431
|
_props$type = props.type,
|
|
10433
10432
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10434
10433
|
_props$showField = props.showField,
|
|
10435
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10436
|
-
_props$platformType = props.platformType,
|
|
10437
|
-
platformType = _props$platformType === void 0 ? 'default' : _props$platformType;
|
|
10434
|
+
showField = _props$showField === void 0 ? '' : _props$showField;
|
|
10438
10435
|
var _useState = useState(0),
|
|
10439
10436
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10440
10437
|
changeIndex = _useState2[0],
|
|
10441
10438
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10442
|
-
var wdtSendOptions = WdtSendData.getInstance().wdtSendData || [];
|
|
10443
10439
|
useEffect(function () {
|
|
10444
10440
|
//没有值塞个默认值
|
|
10445
10441
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
@@ -10466,18 +10462,6 @@ var jstGoods = function jstGoods(props) {
|
|
|
10466
10462
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10467
10463
|
}));
|
|
10468
10464
|
};
|
|
10469
|
-
var handleSelected = function handleSelected(val, type, option) {
|
|
10470
|
-
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10471
|
-
changeOrderInfo[type] = val;
|
|
10472
|
-
changeOrderInfo['sendId'] = option.value;
|
|
10473
|
-
var newList = _toConsumableArray(value);
|
|
10474
|
-
newList[changeIndex] = changeOrderInfo;
|
|
10475
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10476
|
-
};
|
|
10477
|
-
var filterOption = function filterOption(input, option) {
|
|
10478
|
-
var _option$label;
|
|
10479
|
-
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10480
|
-
};
|
|
10481
10465
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10482
10466
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10483
10467
|
changeOrderInfo[type] = val;
|
|
@@ -10516,12 +10500,10 @@ var jstGoods = function jstGoods(props) {
|
|
|
10516
10500
|
filterOption: function filterOption(input, option) {
|
|
10517
10501
|
return option.label.includes(input);
|
|
10518
10502
|
},
|
|
10519
|
-
dropdownMatchSelectWidth: false,
|
|
10520
10503
|
style: {
|
|
10521
10504
|
minWidth: '100px',
|
|
10522
10505
|
maxWidth: '180px'
|
|
10523
|
-
}
|
|
10524
|
-
platformType: platformType
|
|
10506
|
+
}
|
|
10525
10507
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
10526
10508
|
disabled: disabled,
|
|
10527
10509
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
@@ -10550,34 +10532,20 @@ var jstGoods = function jstGoods(props) {
|
|
|
10550
10532
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10551
10533
|
},
|
|
10552
10534
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
10553
|
-
}), ['sendName', 'all'].includes(showField) &&
|
|
10554
|
-
style: {
|
|
10555
|
-
minWidth: '100px',
|
|
10556
|
-
maxWidth: '180px'
|
|
10557
|
-
},
|
|
10558
|
-
disabled: disabled,
|
|
10559
|
-
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10560
|
-
showSearch: true,
|
|
10561
|
-
options: wdtSendOptions,
|
|
10562
|
-
filterOption: filterOption,
|
|
10563
|
-
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10564
|
-
onChange: function onChange(value, option) {
|
|
10565
|
-
return handleSelected(value, 'sendName', option);
|
|
10566
|
-
}
|
|
10567
|
-
}) : /*#__PURE__*/React.createElement(Input, {
|
|
10535
|
+
}), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
10568
10536
|
disabled: disabled,
|
|
10569
10537
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10570
10538
|
onChange: function onChange(e) {
|
|
10571
10539
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10572
10540
|
},
|
|
10573
|
-
value: (_value$
|
|
10574
|
-
}))
|
|
10541
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
|
|
10542
|
+
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
10575
10543
|
disabled: disabled,
|
|
10576
10544
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10577
10545
|
onChange: function onChange(e) {
|
|
10578
10546
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10579
10547
|
},
|
|
10580
|
-
value: (_value$
|
|
10548
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10581
10549
|
})) : null) : null);
|
|
10582
10550
|
};
|
|
10583
10551
|
|
|
@@ -11144,12 +11112,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11144
11112
|
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
11145
11113
|
|
|
11146
11114
|
var RangePicker = DatePicker.RangePicker;
|
|
11147
|
-
var getWdtListProduct = function getWdtListProduct(data) {
|
|
11148
|
-
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11149
|
-
method: 'post',
|
|
11150
|
-
data: data
|
|
11151
|
-
});
|
|
11152
|
-
};
|
|
11153
11115
|
var columns$1 = [{
|
|
11154
11116
|
dataIndex: 'index',
|
|
11155
11117
|
title: 'NO',
|
|
@@ -11224,174 +11186,226 @@ var expandedColumns = [{
|
|
|
11224
11186
|
title: '会员价',
|
|
11225
11187
|
width: 140
|
|
11226
11188
|
}];
|
|
11227
|
-
var
|
|
11228
|
-
|
|
11229
|
-
var
|
|
11230
|
-
|
|
11231
|
-
};
|
|
11232
|
-
var GoodList = function GoodList(props, ref) {
|
|
11233
|
-
var _useState = useState([]),
|
|
11234
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11235
|
-
selectList = _useState2[0],
|
|
11236
|
-
setSelect = _useState2[1];
|
|
11237
|
-
var _useState3 = useState(1),
|
|
11238
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
11239
|
-
pageNo = _useState4[0],
|
|
11240
|
-
setPageNo = _useState4[1];
|
|
11241
|
-
var _useState5 = useState(10),
|
|
11242
|
-
_useState6 = _slicedToArray(_useState5, 1),
|
|
11243
|
-
pageSize = _useState6[0];
|
|
11244
|
-
var _useState7 = useState([]),
|
|
11245
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
11246
|
-
goodList = _useState8[0],
|
|
11247
|
-
setGoodList = _useState8[1];
|
|
11248
|
-
var _useState9 = useState(false),
|
|
11249
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
11250
|
-
loading = _useState10[0],
|
|
11251
|
-
setLoading = _useState10[1];
|
|
11252
|
-
var _useState11 = useState(0),
|
|
11253
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
11254
|
-
total = _useState12[0],
|
|
11255
|
-
setTotal = _useState12[1];
|
|
11256
|
-
var _useState13 = useState(null),
|
|
11257
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
11258
|
-
dates = _useState14[0],
|
|
11259
|
-
setDates = _useState14[1];
|
|
11189
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11190
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11191
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11192
|
+
var initEndTime = hooks();
|
|
11260
11193
|
useImperativeHandle(ref, function () {
|
|
11261
11194
|
return {
|
|
11262
|
-
|
|
11263
|
-
|
|
11195
|
+
open: function open(shopCode) {
|
|
11196
|
+
setVisible(true);
|
|
11197
|
+
setPageNo(1);
|
|
11198
|
+
setSelect([]);
|
|
11199
|
+
setSelectIds([]);
|
|
11200
|
+
form.setFieldsValue({
|
|
11201
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11202
|
+
code: ''
|
|
11203
|
+
});
|
|
11204
|
+
// getShopList();
|
|
11264
11205
|
}
|
|
11265
11206
|
};
|
|
11266
11207
|
});
|
|
11208
|
+
|
|
11209
|
+
var onSubmit = props.onSubmit,
|
|
11210
|
+
shopId = props.shopId,
|
|
11211
|
+
shopList = props.shopList,
|
|
11212
|
+
width = props.width,
|
|
11213
|
+
companyKey = props.companyKey;
|
|
11214
|
+
var _useState = useState(false),
|
|
11215
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11216
|
+
visible = _useState2[0],
|
|
11217
|
+
setVisible = _useState2[1];
|
|
11218
|
+
var _useState3 = useState([]),
|
|
11219
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11220
|
+
selectList = _useState4[0],
|
|
11221
|
+
setSelect = _useState4[1];
|
|
11222
|
+
var _useState5 = useState([]),
|
|
11223
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11224
|
+
selectIds = _useState6[0],
|
|
11225
|
+
setSelectIds = _useState6[1];
|
|
11226
|
+
var _useState7 = useState(1),
|
|
11227
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11228
|
+
pageNo = _useState8[0],
|
|
11229
|
+
setPageNo = _useState8[1];
|
|
11230
|
+
var _useState9 = useState(20),
|
|
11231
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11232
|
+
pageSize = _useState10[0];
|
|
11233
|
+
var _useState11 = useState([]),
|
|
11234
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11235
|
+
goodList = _useState12[0],
|
|
11236
|
+
setGoodList = _useState12[1];
|
|
11237
|
+
var _useState13 = useState(false),
|
|
11238
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11239
|
+
loading = _useState14[0],
|
|
11240
|
+
setLoading = _useState14[1];
|
|
11241
|
+
var _useState15 = useState(0),
|
|
11242
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11243
|
+
total = _useState16[0],
|
|
11244
|
+
setTotal = _useState16[1];
|
|
11267
11245
|
var displaySelectList = useMemo(function () {
|
|
11268
11246
|
return selectList.map(function (item, i) {
|
|
11269
11247
|
item.index = i + 1;
|
|
11270
11248
|
return item;
|
|
11271
11249
|
});
|
|
11272
11250
|
}, [selectList]);
|
|
11251
|
+
useEffect(function () {
|
|
11252
|
+
if (visible) {
|
|
11253
|
+
queryItems();
|
|
11254
|
+
}
|
|
11255
|
+
}, [pageNo, visible]);
|
|
11273
11256
|
var _Form$useForm = Form.useForm(),
|
|
11274
11257
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11275
11258
|
form = _Form$useForm2[0];
|
|
11259
|
+
//选择页码
|
|
11260
|
+
var pageChange = function pageChange(page) {
|
|
11261
|
+
setPageNo(page);
|
|
11262
|
+
};
|
|
11276
11263
|
/**
|
|
11277
11264
|
* 查询商品
|
|
11278
11265
|
*/
|
|
11279
11266
|
var queryItems = /*#__PURE__*/function () {
|
|
11280
11267
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11281
|
-
var
|
|
11268
|
+
var search,
|
|
11269
|
+
_formData$dateTimePic,
|
|
11270
|
+
_formData$dateTimePic2,
|
|
11271
|
+
_formData$dateTimePic3,
|
|
11272
|
+
_formData$dateTimePic4,
|
|
11273
|
+
_formData$dateTimePic5,
|
|
11274
|
+
_formData$dateTimePic6,
|
|
11275
|
+
formData,
|
|
11276
|
+
startTime,
|
|
11277
|
+
endTime,
|
|
11278
|
+
params,
|
|
11279
|
+
res,
|
|
11280
|
+
_res$data,
|
|
11281
|
+
_res$data$productList,
|
|
11282
|
+
productList,
|
|
11283
|
+
_res$data$total,
|
|
11284
|
+
_total,
|
|
11285
|
+
errorMsg,
|
|
11286
|
+
newProducts,
|
|
11287
|
+
_args = arguments;
|
|
11282
11288
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11283
11289
|
while (1) switch (_context.prev = _context.next) {
|
|
11284
11290
|
case 0:
|
|
11285
|
-
|
|
11291
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11292
|
+
_context.prev = 1;
|
|
11286
11293
|
setLoading(true);
|
|
11287
11294
|
formData = form.getFieldsValue();
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
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, 'YYYY-MM-DD HH:mm:ss')) || end.format('YYYY-MM-DD HH:mm:ss');
|
|
11291
|
-
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11292
|
-
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11293
|
-
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11294
|
-
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11295
|
-
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11296
|
-
}
|
|
11297
|
-
// 30天内
|
|
11298
|
-
earliest = hooks(endTime).subtract(30, 'd');
|
|
11299
|
-
if (earliest.diff(hooks(startTime), 'seconds') > 0) {
|
|
11300
|
-
startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
|
|
11301
|
-
}
|
|
11295
|
+
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(30, 'd').format(dateFormat);
|
|
11296
|
+
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);
|
|
11302
11297
|
params = {
|
|
11298
|
+
// shopCode: shopCode,
|
|
11303
11299
|
pageSize: pageSize,
|
|
11304
11300
|
pageNo: pageNo - 1,
|
|
11305
|
-
goodNo:
|
|
11306
|
-
specNo: formData.specNo || null,
|
|
11301
|
+
goodNo: search.code,
|
|
11307
11302
|
startTime: startTime,
|
|
11308
11303
|
endTime: endTime
|
|
11309
11304
|
};
|
|
11310
|
-
_context.next =
|
|
11311
|
-
return
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11305
|
+
_context.next = 9;
|
|
11306
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11307
|
+
method: 'post',
|
|
11308
|
+
data: params
|
|
11309
|
+
});
|
|
11310
|
+
case 9:
|
|
11311
|
+
res = _context.sent;
|
|
11312
|
+
_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;
|
|
11313
|
+
if (res.success) {
|
|
11314
|
+
newProducts = productList.map(function (item, index) {
|
|
11315
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11316
|
+
index: index + 1
|
|
11322
11317
|
});
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
} else {
|
|
11328
|
-
var _res$data2;
|
|
11329
|
-
setGoodList([]);
|
|
11330
|
-
setTotal(0);
|
|
11331
|
-
message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
|
|
11318
|
+
});
|
|
11319
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11320
|
+
if (pageNo === 1) {
|
|
11321
|
+
setTotal(_total);
|
|
11332
11322
|
}
|
|
11333
|
-
}
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11323
|
+
} else {
|
|
11324
|
+
setGoodList([]);
|
|
11325
|
+
setTotal(0);
|
|
11326
|
+
message.error(errorMsg || res.message);
|
|
11327
|
+
}
|
|
11328
|
+
case 12:
|
|
11329
|
+
_context.prev = 12;
|
|
11338
11330
|
setLoading(false);
|
|
11339
|
-
return _context.finish(
|
|
11340
|
-
case
|
|
11331
|
+
return _context.finish(12);
|
|
11332
|
+
case 15:
|
|
11341
11333
|
case "end":
|
|
11342
11334
|
return _context.stop();
|
|
11343
11335
|
}
|
|
11344
|
-
}, _callee, null, [[
|
|
11336
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11345
11337
|
}));
|
|
11346
11338
|
return function queryItems() {
|
|
11347
11339
|
return _ref.apply(this, arguments);
|
|
11348
11340
|
};
|
|
11349
11341
|
}();
|
|
11350
|
-
var
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
};
|
|
11363
|
-
var onOpenChange = function onOpenChange(open) {
|
|
11364
|
-
if (open) {
|
|
11365
|
-
setDates([null, null]);
|
|
11366
|
-
} else {
|
|
11367
|
-
setDates(null);
|
|
11368
|
-
}
|
|
11342
|
+
var _onCancel = function onCancel() {
|
|
11343
|
+
setVisible(false);
|
|
11344
|
+
};
|
|
11345
|
+
var onOk = function onOk() {
|
|
11346
|
+
onSubmit(selectList);
|
|
11347
|
+
_onCancel();
|
|
11348
|
+
};
|
|
11349
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11350
|
+
var searchValue = {
|
|
11351
|
+
code: fieldsValue.code
|
|
11352
|
+
};
|
|
11353
|
+
queryItems(searchValue);
|
|
11369
11354
|
};
|
|
11370
11355
|
var onReset = function onReset() {
|
|
11356
|
+
form.resetFields();
|
|
11371
11357
|
form.setFieldsValue({
|
|
11372
|
-
dateTimePicker:
|
|
11373
|
-
|
|
11374
|
-
specNo: ''
|
|
11358
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11359
|
+
code: ''
|
|
11375
11360
|
});
|
|
11376
11361
|
setPageNo(function (prev) {
|
|
11377
|
-
if (prev === 1) {
|
|
11362
|
+
if (prev === 1 && visible) {
|
|
11378
11363
|
queryItems();
|
|
11379
11364
|
}
|
|
11380
11365
|
return 1;
|
|
11381
11366
|
});
|
|
11382
11367
|
};
|
|
11383
|
-
|
|
11368
|
+
// const getShopList = async () => {
|
|
11369
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11370
|
+
// method: 'get',
|
|
11371
|
+
// params: {
|
|
11372
|
+
// key: 'company-third-shop-info',
|
|
11373
|
+
// },
|
|
11374
|
+
// });
|
|
11375
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11376
|
+
// if (success) {
|
|
11377
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11378
|
+
// return {
|
|
11379
|
+
// label: item.shopName,
|
|
11380
|
+
// value: item.shopCode,
|
|
11381
|
+
// };
|
|
11382
|
+
// });
|
|
11383
|
+
// setShopList(list);
|
|
11384
|
+
// }
|
|
11385
|
+
// };
|
|
11386
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11387
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11388
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11389
|
+
pubsub.publish('changeShopCode', {
|
|
11390
|
+
shopCode: changedValues.shopId
|
|
11391
|
+
});
|
|
11392
|
+
}
|
|
11393
|
+
};
|
|
11394
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11384
11395
|
var newSelectList = selectList.filter(function (item) {
|
|
11385
11396
|
return item.specId !== record.specId;
|
|
11386
11397
|
});
|
|
11387
11398
|
setSelect(_toConsumableArray(newSelectList));
|
|
11399
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11400
|
+
return item.specId;
|
|
11401
|
+
})));
|
|
11388
11402
|
};
|
|
11389
11403
|
var displaySelectedColumns = [{
|
|
11390
11404
|
dataIndex: 'operation',
|
|
11391
11405
|
title: '',
|
|
11392
11406
|
ellipsis: true,
|
|
11393
11407
|
width: 50,
|
|
11394
|
-
render: function render(_, record) {
|
|
11408
|
+
render: function render(_, record, index) {
|
|
11395
11409
|
return /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
11396
11410
|
onClick: function onClick() {
|
|
11397
11411
|
return handleDelete(record);
|
|
@@ -11422,10 +11436,8 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11422
11436
|
}];
|
|
11423
11437
|
var expandedRowSelection = {
|
|
11424
11438
|
fixed: true,
|
|
11425
|
-
selectedRowKeys:
|
|
11426
|
-
|
|
11427
|
-
}),
|
|
11428
|
-
onSelect: function onSelect(record, selected) {
|
|
11439
|
+
selectedRowKeys: selectIds,
|
|
11440
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11429
11441
|
var tempList = [];
|
|
11430
11442
|
if (selected) {
|
|
11431
11443
|
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
@@ -11435,6 +11447,9 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11435
11447
|
});
|
|
11436
11448
|
}
|
|
11437
11449
|
setSelect(_toConsumableArray(tempList));
|
|
11450
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11451
|
+
return item.specId;
|
|
11452
|
+
})));
|
|
11438
11453
|
},
|
|
11439
11454
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11440
11455
|
var tempAllList = [];
|
|
@@ -11448,12 +11463,15 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11448
11463
|
});
|
|
11449
11464
|
}
|
|
11450
11465
|
setSelect(_toConsumableArray(tempAllList));
|
|
11466
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11467
|
+
return item.specId;
|
|
11468
|
+
})));
|
|
11451
11469
|
}
|
|
11452
11470
|
};
|
|
11453
|
-
var expandedRowRender = function expandedRowRender(record) {
|
|
11471
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11454
11472
|
return /*#__PURE__*/React.createElement(Table, {
|
|
11455
|
-
rowKey:
|
|
11456
|
-
size:
|
|
11473
|
+
rowKey: 'specId',
|
|
11474
|
+
size: 'small',
|
|
11457
11475
|
columns: expandedColumns,
|
|
11458
11476
|
dataSource: record.itemDetailList || [],
|
|
11459
11477
|
pagination: false,
|
|
@@ -11463,61 +11481,43 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11463
11481
|
}
|
|
11464
11482
|
});
|
|
11465
11483
|
};
|
|
11466
|
-
React.
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11484
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
11485
|
+
title: '选择商品',
|
|
11486
|
+
okText: '确认',
|
|
11487
|
+
cancelText: '取消',
|
|
11488
|
+
visible: visible,
|
|
11489
|
+
width: width || 850,
|
|
11490
|
+
onCancel: function onCancel() {
|
|
11491
|
+
_onCancel();
|
|
11492
|
+
},
|
|
11493
|
+
onOk: onOk,
|
|
11494
|
+
wrapClassName: "goodModal"
|
|
11495
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
11470
11496
|
layout: "inline",
|
|
11471
11497
|
form: form,
|
|
11472
|
-
onFinish:
|
|
11498
|
+
onFinish: onFinish,
|
|
11499
|
+
onValuesChange: onValuesChange,
|
|
11473
11500
|
initialValues: {
|
|
11474
|
-
|
|
11475
|
-
specNo: '',
|
|
11476
|
-
dateTimePicker: getInitTime()
|
|
11501
|
+
code: ''
|
|
11477
11502
|
}
|
|
11478
11503
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
11479
|
-
name: "dateTimePicker"
|
|
11480
|
-
style: {
|
|
11481
|
-
marginBottom: '12px'
|
|
11482
|
-
}
|
|
11504
|
+
name: "dateTimePicker"
|
|
11483
11505
|
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
11484
11506
|
style: {
|
|
11485
|
-
width: '
|
|
11507
|
+
width: '350px'
|
|
11486
11508
|
},
|
|
11487
11509
|
placeholder: ['开始日期', '结束日期'],
|
|
11488
|
-
showTime:
|
|
11489
|
-
|
|
11490
|
-
onCalendarChange: function onCalendarChange(val) {
|
|
11491
|
-
return setDates(val);
|
|
11492
|
-
},
|
|
11493
|
-
onOpenChange: onOpenChange
|
|
11510
|
+
showTime: true,
|
|
11511
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11494
11512
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11495
|
-
name: "
|
|
11496
|
-
style: {
|
|
11497
|
-
marginBottom: '12px'
|
|
11498
|
-
}
|
|
11513
|
+
name: "code"
|
|
11499
11514
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11500
11515
|
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11501
11516
|
allowClear: true,
|
|
11502
11517
|
style: {
|
|
11503
11518
|
width: 150
|
|
11504
11519
|
}
|
|
11505
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11506
|
-
name: "specNo",
|
|
11507
|
-
style: {
|
|
11508
|
-
marginBottom: '12px'
|
|
11509
|
-
}
|
|
11510
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
11511
|
-
placeholder: "\u5546\u54C1SKU\u7F16\u7801",
|
|
11512
|
-
allowClear: true,
|
|
11513
|
-
style: {
|
|
11514
|
-
width: 150
|
|
11515
|
-
}
|
|
11516
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11517
|
-
style: {
|
|
11518
|
-
marginBottom: '12px'
|
|
11519
|
-
}
|
|
11520
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
11520
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
11521
11521
|
type: "primary",
|
|
11522
11522
|
htmlType: "submit",
|
|
11523
11523
|
style: {
|
|
@@ -11527,10 +11527,10 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11527
11527
|
onClick: onReset
|
|
11528
11528
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
11529
11529
|
style: {
|
|
11530
|
-
marginTop: '
|
|
11530
|
+
marginTop: '16px'
|
|
11531
11531
|
}
|
|
11532
11532
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
11533
|
-
rowKey:
|
|
11533
|
+
rowKey: 'goodNo',
|
|
11534
11534
|
columns: columns$1,
|
|
11535
11535
|
dataSource: goodList,
|
|
11536
11536
|
loading: loading,
|
|
@@ -11547,14 +11547,14 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11547
11547
|
current: pageNo,
|
|
11548
11548
|
pageSize: pageSize,
|
|
11549
11549
|
pageSizeOptions: [],
|
|
11550
|
-
onChange:
|
|
11550
|
+
onChange: pageChange
|
|
11551
11551
|
}
|
|
11552
11552
|
})), !!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("div", {
|
|
11553
11553
|
style: {
|
|
11554
11554
|
marginTop: '16px'
|
|
11555
11555
|
}
|
|
11556
11556
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
11557
|
-
rowKey:
|
|
11557
|
+
rowKey: 'specId',
|
|
11558
11558
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11559
11559
|
dataSource: displaySelectList,
|
|
11560
11560
|
pagination: false,
|
|
@@ -11565,48 +11565,7 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11565
11565
|
style: {
|
|
11566
11566
|
width: '100%'
|
|
11567
11567
|
}
|
|
11568
|
-
}))));
|
|
11569
|
-
};
|
|
11570
|
-
var WdtGoodList = /*#__PURE__*/forwardRef(GoodList);
|
|
11571
|
-
|
|
11572
|
-
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11573
|
-
useImperativeHandle(ref, function () {
|
|
11574
|
-
return {
|
|
11575
|
-
open: function open() {
|
|
11576
|
-
setVisible(true);
|
|
11577
|
-
}
|
|
11578
|
-
};
|
|
11579
|
-
});
|
|
11580
|
-
var onSubmit = props.onSubmit,
|
|
11581
|
-
width = props.width;
|
|
11582
|
-
var _useState = useState(false),
|
|
11583
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11584
|
-
visible = _useState2[0],
|
|
11585
|
-
setVisible = _useState2[1];
|
|
11586
|
-
var wdtGoodListRef = useRef(null);
|
|
11587
|
-
var _onCancel = function onCancel() {
|
|
11588
|
-
setVisible(false);
|
|
11589
|
-
};
|
|
11590
|
-
var onOk = function onOk() {
|
|
11591
|
-
var _wdtGoodListRef$curre;
|
|
11592
|
-
var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
|
|
11593
|
-
onSubmit(selectedList);
|
|
11594
|
-
_onCancel();
|
|
11595
|
-
};
|
|
11596
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
11597
|
-
title: '选择商品',
|
|
11598
|
-
okText: '确认',
|
|
11599
|
-
cancelText: '取消',
|
|
11600
|
-
visible: visible,
|
|
11601
|
-
width: width || 850,
|
|
11602
|
-
onCancel: function onCancel() {
|
|
11603
|
-
_onCancel();
|
|
11604
|
-
},
|
|
11605
|
-
onOk: onOk,
|
|
11606
|
-
wrapClassName: "goodModal"
|
|
11607
|
-
}, /*#__PURE__*/React.createElement(WdtGoodList, {
|
|
11608
|
-
ref: wdtGoodListRef
|
|
11609
|
-
})));
|
|
11568
|
+
})))));
|
|
11610
11569
|
};
|
|
11611
11570
|
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
11612
11571
|
|
|
@@ -12393,6 +12352,20 @@ var typeMap = {
|
|
|
12393
12352
|
money: 'money',
|
|
12394
12353
|
share: 'share'
|
|
12395
12354
|
}
|
|
12355
|
+
},
|
|
12356
|
+
WDT_REISSUE_GOODS: {
|
|
12357
|
+
key: 'wdtReissueGoods',
|
|
12358
|
+
name: '旺店通',
|
|
12359
|
+
typeName: 'wdtReissueType',
|
|
12360
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12361
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12362
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12363
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
12364
|
+
reissueType: 'wdtReissueType',
|
|
12365
|
+
formatDefaultField: {
|
|
12366
|
+
money: 'orderPrice',
|
|
12367
|
+
share: 'sharePrice'
|
|
12368
|
+
}
|
|
12396
12369
|
}
|
|
12397
12370
|
};
|
|
12398
12371
|
var BsReissue = function BsReissue(props) {
|
|
@@ -12995,245 +12968,6 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12995
12968
|
}));
|
|
12996
12969
|
};
|
|
12997
12970
|
|
|
12998
|
-
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12999
|
-
var typeMap$1 = {
|
|
13000
|
-
WDT_REISSUE_GOODS: {
|
|
13001
|
-
key: 'wdtReissueGoods',
|
|
13002
|
-
name: '旺店通',
|
|
13003
|
-
typeName: 'wdtReissueType',
|
|
13004
|
-
wdtSystemOrder: 'wdtSystemOrder',
|
|
13005
|
-
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
13006
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
13007
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
13008
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
13009
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
13010
|
-
reissueType: 'wdtReissueType',
|
|
13011
|
-
formatDefaultField: {
|
|
13012
|
-
money: 'orderPrice',
|
|
13013
|
-
share: 'sharePrice'
|
|
13014
|
-
}
|
|
13015
|
-
}
|
|
13016
|
-
};
|
|
13017
|
-
var wdtReissue = function wdtReissue(props) {
|
|
13018
|
-
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13019
|
-
var value = props.value,
|
|
13020
|
-
onChange = props.onChange,
|
|
13021
|
-
_props$reasonList = props.reasonList,
|
|
13022
|
-
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13023
|
-
disabled = props.disabled,
|
|
13024
|
-
type = props.type,
|
|
13025
|
-
other = _objectWithoutProperties(props, _excluded$g);
|
|
13026
|
-
var valueRef = useRef({});
|
|
13027
|
-
useEffect(function () {
|
|
13028
|
-
var _typeMap$type, _typeMap$type4;
|
|
13029
|
-
valueRef.current = value;
|
|
13030
|
-
pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
|
|
13031
|
-
if (disabled) return;
|
|
13032
|
-
if (value) {
|
|
13033
|
-
var _typeMap$type2, _typeMap$type3;
|
|
13034
|
-
var newValue = _objectSpread2({}, value);
|
|
13035
|
-
newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
|
|
13036
|
-
return item.sku !== data;
|
|
13037
|
-
});
|
|
13038
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13039
|
-
}
|
|
13040
|
-
});
|
|
13041
|
-
pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
|
|
13042
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13043
|
-
shopCode: data.shopCode
|
|
13044
|
-
}));
|
|
13045
|
-
});
|
|
13046
|
-
}, [value, disabled]);
|
|
13047
|
-
useEffect(function () {
|
|
13048
|
-
var _value$orders, _value$showOrderInfo;
|
|
13049
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13050
|
-
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13051
|
-
getWdtOrderList(value.orderNo);
|
|
13052
|
-
}
|
|
13053
|
-
}
|
|
13054
|
-
return;
|
|
13055
|
-
}, [value]);
|
|
13056
|
-
useEffect(function () {
|
|
13057
|
-
var _typeMap$type5;
|
|
13058
|
-
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
|
|
13059
|
-
if (wdtSystemOrderNo) {
|
|
13060
|
-
var _value$typeMap$type$t, _typeMap$type6;
|
|
13061
|
-
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
|
|
13062
|
-
getGoodItems(wdtSystemOrderNo);
|
|
13063
|
-
}
|
|
13064
|
-
}
|
|
13065
|
-
return;
|
|
13066
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13067
|
-
useEffect(function () {
|
|
13068
|
-
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13069
|
-
var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
|
|
13070
|
-
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
|
|
13071
|
-
if (['1'].includes(typeName)) {
|
|
13072
|
-
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13073
|
-
} else if (['2'].includes(typeName)) {
|
|
13074
|
-
var _typeMap$type10;
|
|
13075
|
-
var newValue = _objectSpread2({}, value);
|
|
13076
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
|
|
13077
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13078
|
-
}
|
|
13079
|
-
return;
|
|
13080
|
-
}, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
|
|
13081
|
-
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13082
|
-
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13083
|
-
var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
|
|
13084
|
-
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13085
|
-
return orderItem.billNo === wdtSystemOrderNo;
|
|
13086
|
-
});
|
|
13087
|
-
if (order) {
|
|
13088
|
-
var _typeMap$type13, _order$goodDetails;
|
|
13089
|
-
var newValue = _objectSpread2({}, value);
|
|
13090
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
|
|
13091
|
-
var _typeMap$type14, _typeMap$type15;
|
|
13092
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
|
|
13093
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
|
|
13094
|
-
item.canUpdateNumber = true;
|
|
13095
|
-
return item;
|
|
13096
|
-
});
|
|
13097
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13098
|
-
}
|
|
13099
|
-
};
|
|
13100
|
-
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13101
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13102
|
-
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13103
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13104
|
-
while (1) switch (_context.prev = _context.next) {
|
|
13105
|
-
case 0:
|
|
13106
|
-
_context.next = 2;
|
|
13107
|
-
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13108
|
-
method: 'post',
|
|
13109
|
-
data: {
|
|
13110
|
-
billNo: orderNo
|
|
13111
|
-
}
|
|
13112
|
-
});
|
|
13113
|
-
case 2:
|
|
13114
|
-
_yield$request = _context.sent;
|
|
13115
|
-
success = _yield$request.success;
|
|
13116
|
-
data = _yield$request.data;
|
|
13117
|
-
if (success) {
|
|
13118
|
-
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13119
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13120
|
-
billNo: item.tradeNo,
|
|
13121
|
-
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13122
|
-
billTag: item.tagName
|
|
13123
|
-
});
|
|
13124
|
-
});
|
|
13125
|
-
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13126
|
-
return {
|
|
13127
|
-
billNo: item.tradeNo,
|
|
13128
|
-
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13129
|
-
billTag: item.tagName
|
|
13130
|
-
};
|
|
13131
|
-
});
|
|
13132
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
|
|
13133
|
-
showOrderInfo: showOrderInfo,
|
|
13134
|
-
orders: orders
|
|
13135
|
-
}))));
|
|
13136
|
-
}
|
|
13137
|
-
case 6:
|
|
13138
|
-
case "end":
|
|
13139
|
-
return _context.stop();
|
|
13140
|
-
}
|
|
13141
|
-
}, _callee);
|
|
13142
|
-
}));
|
|
13143
|
-
return function getWdtOrderList(_x) {
|
|
13144
|
-
return _ref2.apply(this, arguments);
|
|
13145
|
-
};
|
|
13146
|
-
}();
|
|
13147
|
-
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13148
|
-
var _typeMap$type18, _typeMap$type19;
|
|
13149
|
-
var newValue = _objectSpread2({}, value);
|
|
13150
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
|
|
13151
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
13152
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13153
|
-
valueRef.current = newValue;
|
|
13154
|
-
// if (['2'].includes(val[0])) {
|
|
13155
|
-
// onChange?.(newValue);
|
|
13156
|
-
// valueRef.current = newValue;
|
|
13157
|
-
// }
|
|
13158
|
-
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13159
|
-
// val: val[0],
|
|
13160
|
-
// goodValue: newValue,
|
|
13161
|
-
// });
|
|
13162
|
-
};
|
|
13163
|
-
|
|
13164
|
-
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13165
|
-
var _typeMap$type20;
|
|
13166
|
-
var newValue = _objectSpread2({}, value);
|
|
13167
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
|
|
13168
|
-
var _typeMap$type21, _typeMap$type22;
|
|
13169
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
|
|
13170
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
|
|
13171
|
-
return item;
|
|
13172
|
-
});
|
|
13173
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13174
|
-
};
|
|
13175
|
-
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13176
|
-
var _typeMap$type23;
|
|
13177
|
-
var newValue = _objectSpread2({}, value);
|
|
13178
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
|
|
13179
|
-
console.log('changeSystemOrderHandle', val, newValue);
|
|
13180
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13181
|
-
};
|
|
13182
|
-
//显示选择商品按钮 原单换不显示选择商品
|
|
13183
|
-
var showChangeBtn = useMemo(function () {
|
|
13184
|
-
var _typeMap$type24;
|
|
13185
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13186
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13187
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
13188
|
-
gutter: 8
|
|
13189
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
13190
|
-
className: "gutter-row",
|
|
13191
|
-
span: 6
|
|
13192
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
13193
|
-
style: {
|
|
13194
|
-
marginBottom: '8px'
|
|
13195
|
-
},
|
|
13196
|
-
disabled: disabled,
|
|
13197
|
-
allowClear: false,
|
|
13198
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
|
|
13199
|
-
onChange: function onChange(val) {
|
|
13200
|
-
return changeSystemOrderHandle(val);
|
|
13201
|
-
}
|
|
13202
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
|
|
13203
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
13204
|
-
key: item.billNo,
|
|
13205
|
-
value: item.billNo,
|
|
13206
|
-
label: item.billNo
|
|
13207
|
-
}, item.billNo);
|
|
13208
|
-
}))), /*#__PURE__*/React.createElement(Col, {
|
|
13209
|
-
className: "gutter-row",
|
|
13210
|
-
span: 6
|
|
13211
|
-
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
13212
|
-
style: {
|
|
13213
|
-
marginBottom: '8px'
|
|
13214
|
-
},
|
|
13215
|
-
disabled: disabled,
|
|
13216
|
-
allowClear: false,
|
|
13217
|
-
options: reasonList,
|
|
13218
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
13219
|
-
onChange: function onChange(val) {
|
|
13220
|
-
return changeTypeHandle(val);
|
|
13221
|
-
}
|
|
13222
|
-
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13223
|
-
key: 'reissueGoods'
|
|
13224
|
-
}, other), {}, {
|
|
13225
|
-
type: type,
|
|
13226
|
-
disabled: disabled,
|
|
13227
|
-
canUpdateNumber: showChangeBtn,
|
|
13228
|
-
showChangeBtn: showChangeBtn,
|
|
13229
|
-
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13230
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
13231
|
-
onChange: function onChange(val) {
|
|
13232
|
-
return changeGoodHandle(val);
|
|
13233
|
-
}
|
|
13234
|
-
})));
|
|
13235
|
-
};
|
|
13236
|
-
|
|
13237
12971
|
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";
|
|
13238
12972
|
styleInject(css_248z$a);
|
|
13239
12973
|
|
|
@@ -13710,12 +13444,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13710
13444
|
};
|
|
13711
13445
|
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
13712
13446
|
|
|
13713
|
-
var _excluded$
|
|
13447
|
+
var _excluded$g = ["onChange", "value", "failValue"];
|
|
13714
13448
|
function CommonStatus(props) {
|
|
13715
13449
|
var onChange = props.onChange,
|
|
13716
13450
|
value = props.value,
|
|
13717
13451
|
failValue = props.failValue,
|
|
13718
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13452
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13719
13453
|
var changeHandle = function changeHandle(val) {
|
|
13720
13454
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13721
13455
|
status: val,
|
|
@@ -13834,7 +13568,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13834
13568
|
})) : null) : null);
|
|
13835
13569
|
};
|
|
13836
13570
|
|
|
13837
|
-
var _excluded$
|
|
13571
|
+
var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13838
13572
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13839
13573
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13840
13574
|
var _props$value = props.value,
|
|
@@ -13844,7 +13578,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13844
13578
|
failValue = props.failValue,
|
|
13845
13579
|
_props$type = props.type,
|
|
13846
13580
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13847
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13581
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13848
13582
|
var _useState = useState(0),
|
|
13849
13583
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13850
13584
|
changeIndex = _useState2[0],
|
|
@@ -13910,7 +13644,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13910
13644
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13911
13645
|
};
|
|
13912
13646
|
|
|
13913
|
-
var _excluded$
|
|
13647
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13914
13648
|
var msgTypeCh = {
|
|
13915
13649
|
ding: '钉钉',
|
|
13916
13650
|
wechat: '微信',
|
|
@@ -13926,7 +13660,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13926
13660
|
failValue = props.failValue,
|
|
13927
13661
|
_props$type = props.type,
|
|
13928
13662
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13929
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13663
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13930
13664
|
var _useState = useState(0),
|
|
13931
13665
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13932
13666
|
changeIndex = _useState2[0],
|
|
@@ -13995,4 +13729,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
13995
13729
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
13996
13730
|
};
|
|
13997
13731
|
|
|
13998
|
-
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, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId,
|
|
13732
|
+
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, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|