@kmkf-fe-packages/basic-components 0.28.2-rc.8 → 0.28.3-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/dist/index.esm.js +494 -228
- package/dist/index.js +494 -226
- package/dist/src/bs/component/model/WdtGoodList.d.ts +40 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/jst/Goods/index.d.ts +1 -0
- package/dist/src/wdt/Reissue/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7574,10 +7574,11 @@ function ApaasPosting(props) {
|
|
|
7574
7574
|
});
|
|
7575
7575
|
}
|
|
7576
7576
|
|
|
7577
|
-
var _excluded$a = ["value", "onChange"];
|
|
7577
|
+
var _excluded$a = ["value", "onChange", "platformType"];
|
|
7578
7578
|
function ApaasLogistics(props) {
|
|
7579
7579
|
var value = props.value,
|
|
7580
7580
|
onChange = props.onChange,
|
|
7581
|
+
platformType = props.platformType,
|
|
7581
7582
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7582
7583
|
var _useState = React.useState([]),
|
|
7583
7584
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7590,7 +7591,7 @@ function ApaasLogistics(props) {
|
|
|
7590
7591
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7591
7592
|
while (1) switch (_context.prev = _context.next) {
|
|
7592
7593
|
case 0:
|
|
7593
|
-
express = kmkfUtils.ExpressData.getInstance();
|
|
7594
|
+
express = kmkfUtils.ExpressData.getInstance(platformType);
|
|
7594
7595
|
setOptions(express.expressData || []);
|
|
7595
7596
|
case 2:
|
|
7596
7597
|
case "end":
|
|
@@ -10413,7 +10414,7 @@ var typeInitValueMap = {
|
|
|
10413
10414
|
}]
|
|
10414
10415
|
};
|
|
10415
10416
|
var jstGoods = function jstGoods(props) {
|
|
10416
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10417
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
10417
10418
|
var _props$value = props.value,
|
|
10418
10419
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10419
10420
|
onChange = props.onChange,
|
|
@@ -10421,11 +10422,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
10421
10422
|
_props$type = props.type,
|
|
10422
10423
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10423
10424
|
_props$showField = props.showField,
|
|
10424
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10425
|
+
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10426
|
+
_props$platformType = props.platformType,
|
|
10427
|
+
platformType = _props$platformType === void 0 ? 'default' : _props$platformType;
|
|
10425
10428
|
var _useState = React.useState(0),
|
|
10426
10429
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10427
10430
|
changeIndex = _useState2[0],
|
|
10428
10431
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10432
|
+
var wdtSendOptions = kmkfUtils.WdtSendData.getInstance().wdtSendData || [];
|
|
10429
10433
|
React.useEffect(function () {
|
|
10430
10434
|
//没有值塞个默认值
|
|
10431
10435
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
@@ -10452,6 +10456,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10452
10456
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", null, t.title), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10453
10457
|
}));
|
|
10454
10458
|
};
|
|
10459
|
+
var handleSelected = function handleSelected(val, type, option) {
|
|
10460
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10461
|
+
changeOrderInfo[type] = val;
|
|
10462
|
+
changeOrderInfo['sendId'] = option.value;
|
|
10463
|
+
var newList = _toConsumableArray(value);
|
|
10464
|
+
newList[changeIndex] = changeOrderInfo;
|
|
10465
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10466
|
+
};
|
|
10467
|
+
var filterOption = function filterOption(input, option) {
|
|
10468
|
+
var _option$label;
|
|
10469
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10470
|
+
};
|
|
10455
10471
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10456
10472
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10457
10473
|
changeOrderInfo[type] = val;
|
|
@@ -10490,10 +10506,12 @@ var jstGoods = function jstGoods(props) {
|
|
|
10490
10506
|
filterOption: function filterOption(input, option) {
|
|
10491
10507
|
return option.label.includes(input);
|
|
10492
10508
|
},
|
|
10509
|
+
dropdownMatchSelectWidth: false,
|
|
10493
10510
|
style: {
|
|
10494
10511
|
minWidth: '100px',
|
|
10495
10512
|
maxWidth: '180px'
|
|
10496
|
-
}
|
|
10513
|
+
},
|
|
10514
|
+
platformType: platformType
|
|
10497
10515
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10498
10516
|
disabled: disabled,
|
|
10499
10517
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
@@ -10522,20 +10540,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
10522
10540
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10523
10541
|
},
|
|
10524
10542
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
10525
|
-
}), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.
|
|
10543
|
+
}), ['sendName', 'all'].includes(showField) && (platformType === 'wdt' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
10544
|
+
style: {
|
|
10545
|
+
minWidth: '100px',
|
|
10546
|
+
maxWidth: '180px'
|
|
10547
|
+
},
|
|
10548
|
+
disabled: disabled,
|
|
10549
|
+
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10550
|
+
showSearch: true,
|
|
10551
|
+
options: wdtSendOptions,
|
|
10552
|
+
filterOption: filterOption,
|
|
10553
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10554
|
+
onChange: function onChange(value, option) {
|
|
10555
|
+
return handleSelected(value, 'sendName', option);
|
|
10556
|
+
}
|
|
10557
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10526
10558
|
disabled: disabled,
|
|
10527
10559
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10528
10560
|
onChange: function onChange(e) {
|
|
10529
10561
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10530
10562
|
},
|
|
10531
|
-
value: (_value$
|
|
10532
|
-
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10563
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10564
|
+
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10533
10565
|
disabled: disabled,
|
|
10534
10566
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10535
10567
|
onChange: function onChange(e) {
|
|
10536
10568
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10537
10569
|
},
|
|
10538
|
-
value: (_value$
|
|
10570
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
10539
10571
|
})) : null) : null);
|
|
10540
10572
|
};
|
|
10541
10573
|
|
|
@@ -11102,6 +11134,12 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11102
11134
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11103
11135
|
|
|
11104
11136
|
var RangePicker = antd.DatePicker.RangePicker;
|
|
11137
|
+
var getWdtListProduct = function getWdtListProduct(data) {
|
|
11138
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11139
|
+
method: 'post',
|
|
11140
|
+
data: data
|
|
11141
|
+
});
|
|
11142
|
+
};
|
|
11105
11143
|
var columns$1 = [{
|
|
11106
11144
|
dataIndex: 'index',
|
|
11107
11145
|
title: 'NO',
|
|
@@ -11176,226 +11214,174 @@ var expandedColumns = [{
|
|
|
11176
11214
|
title: '会员价',
|
|
11177
11215
|
width: 140
|
|
11178
11216
|
}];
|
|
11179
|
-
var
|
|
11180
|
-
var
|
|
11181
|
-
var
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
setVisible(true);
|
|
11187
|
-
setPageNo(1);
|
|
11188
|
-
setSelect([]);
|
|
11189
|
-
setSelectIds([]);
|
|
11190
|
-
form.setFieldsValue({
|
|
11191
|
-
dateTimePicker: [initStartTime, initEndTime],
|
|
11192
|
-
code: ''
|
|
11193
|
-
});
|
|
11194
|
-
// getShopList();
|
|
11195
|
-
}
|
|
11196
|
-
};
|
|
11197
|
-
});
|
|
11198
|
-
|
|
11199
|
-
var onSubmit = props.onSubmit,
|
|
11200
|
-
shopId = props.shopId,
|
|
11201
|
-
shopList = props.shopList,
|
|
11202
|
-
width = props.width,
|
|
11203
|
-
companyKey = props.companyKey;
|
|
11204
|
-
var _useState = React.useState(false),
|
|
11217
|
+
var getInitTime = function getInitTime() {
|
|
11218
|
+
var initStartTime = hooks().subtract(30, 'd').hours(0).minutes(0).seconds(0);
|
|
11219
|
+
var initEndTime = hooks().hours(23).minutes(59).seconds(59);
|
|
11220
|
+
return [initStartTime, initEndTime];
|
|
11221
|
+
};
|
|
11222
|
+
var GoodList = function GoodList(props, ref) {
|
|
11223
|
+
var _useState = React.useState([]),
|
|
11205
11224
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
var _useState3 = React.useState(
|
|
11225
|
+
selectList = _useState2[0],
|
|
11226
|
+
setSelect = _useState2[1];
|
|
11227
|
+
var _useState3 = React.useState(1),
|
|
11209
11228
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
var _useState5 = React.useState(
|
|
11213
|
-
_useState6 = _slicedToArray(_useState5,
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
var _useState7 = React.useState(1),
|
|
11229
|
+
pageNo = _useState4[0],
|
|
11230
|
+
setPageNo = _useState4[1];
|
|
11231
|
+
var _useState5 = React.useState(10),
|
|
11232
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
11233
|
+
pageSize = _useState6[0];
|
|
11234
|
+
var _useState7 = React.useState([]),
|
|
11217
11235
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
var _useState9 = React.useState(
|
|
11221
|
-
_useState10 = _slicedToArray(_useState9,
|
|
11222
|
-
|
|
11223
|
-
|
|
11236
|
+
goodList = _useState8[0],
|
|
11237
|
+
setGoodList = _useState8[1];
|
|
11238
|
+
var _useState9 = React.useState(false),
|
|
11239
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11240
|
+
loading = _useState10[0],
|
|
11241
|
+
setLoading = _useState10[1];
|
|
11242
|
+
var _useState11 = React.useState(0),
|
|
11224
11243
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
var _useState13 = React.useState(
|
|
11244
|
+
total = _useState12[0],
|
|
11245
|
+
setTotal = _useState12[1];
|
|
11246
|
+
var _useState13 = React.useState(null),
|
|
11228
11247
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11248
|
+
dates = _useState14[0],
|
|
11249
|
+
setDates = _useState14[1];
|
|
11250
|
+
React.useImperativeHandle(ref, function () {
|
|
11251
|
+
return {
|
|
11252
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
11253
|
+
return selectList;
|
|
11254
|
+
}
|
|
11255
|
+
};
|
|
11256
|
+
});
|
|
11235
11257
|
var displaySelectList = React.useMemo(function () {
|
|
11236
11258
|
return selectList.map(function (item, i) {
|
|
11237
11259
|
item.index = i + 1;
|
|
11238
11260
|
return item;
|
|
11239
11261
|
});
|
|
11240
11262
|
}, [selectList]);
|
|
11241
|
-
React.useEffect(function () {
|
|
11242
|
-
if (visible) {
|
|
11243
|
-
queryItems();
|
|
11244
|
-
}
|
|
11245
|
-
}, [pageNo, visible]);
|
|
11246
11263
|
var _Form$useForm = antd.Form.useForm(),
|
|
11247
11264
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11248
11265
|
form = _Form$useForm2[0];
|
|
11249
|
-
//选择页码
|
|
11250
|
-
var pageChange = function pageChange(page) {
|
|
11251
|
-
setPageNo(page);
|
|
11252
|
-
};
|
|
11253
11266
|
/**
|
|
11254
11267
|
* 查询商品
|
|
11255
11268
|
*/
|
|
11256
11269
|
var queryItems = /*#__PURE__*/function () {
|
|
11257
11270
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11258
|
-
var
|
|
11259
|
-
_formData$dateTimePic,
|
|
11260
|
-
_formData$dateTimePic2,
|
|
11261
|
-
_formData$dateTimePic3,
|
|
11262
|
-
_formData$dateTimePic4,
|
|
11263
|
-
_formData$dateTimePic5,
|
|
11264
|
-
_formData$dateTimePic6,
|
|
11265
|
-
formData,
|
|
11266
|
-
startTime,
|
|
11267
|
-
endTime,
|
|
11268
|
-
params,
|
|
11269
|
-
res,
|
|
11270
|
-
_res$data,
|
|
11271
|
-
_res$data$productList,
|
|
11272
|
-
productList,
|
|
11273
|
-
_res$data$total,
|
|
11274
|
-
_total,
|
|
11275
|
-
errorMsg,
|
|
11276
|
-
newProducts,
|
|
11277
|
-
_args = arguments;
|
|
11271
|
+
var _formData$dateTimePic, _formData$dateTimePic2, _formData$dateTimePic3, _formData$dateTimePic4, _formData$dateTimePic5, _formData$dateTimePic6, formData, _getInitTime, _getInitTime2, start, end, startTime, endTime, newTime, earliest, params;
|
|
11278
11272
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11279
11273
|
while (1) switch (_context.prev = _context.next) {
|
|
11280
11274
|
case 0:
|
|
11281
|
-
|
|
11282
|
-
_context.prev = 1;
|
|
11275
|
+
_context.prev = 0;
|
|
11283
11276
|
setLoading(true);
|
|
11284
11277
|
formData = form.getFieldsValue();
|
|
11285
|
-
|
|
11286
|
-
|
|
11278
|
+
_getInitTime = getInitTime(), _getInitTime2 = _slicedToArray(_getInitTime, 2), start = _getInitTime2[0], end = _getInitTime2[1];
|
|
11279
|
+
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, 'YYYY-MM-DD HH:mm:ss')) || start.format('YYYY-MM-DD HH:mm:ss');
|
|
11280
|
+
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');
|
|
11281
|
+
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11282
|
+
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11283
|
+
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11284
|
+
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11285
|
+
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11286
|
+
}
|
|
11287
|
+
// 30天内
|
|
11288
|
+
earliest = hooks(endTime).subtract(30, 'd');
|
|
11289
|
+
if (earliest.diff(hooks(startTime), 'seconds') > 0) {
|
|
11290
|
+
startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
|
|
11291
|
+
}
|
|
11287
11292
|
params = {
|
|
11288
|
-
// shopCode: shopCode,
|
|
11289
11293
|
pageSize: pageSize,
|
|
11290
11294
|
pageNo: pageNo - 1,
|
|
11291
|
-
goodNo:
|
|
11295
|
+
goodNo: formData.goodNo || null,
|
|
11296
|
+
specNo: formData.specNo || null,
|
|
11292
11297
|
startTime: startTime,
|
|
11293
11298
|
endTime: endTime
|
|
11294
11299
|
};
|
|
11295
|
-
_context.next =
|
|
11296
|
-
return
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11300
|
+
_context.next = 14;
|
|
11301
|
+
return getWdtListProduct(params).then(function (res) {
|
|
11302
|
+
if (res.success) {
|
|
11303
|
+
var _res$data = res.data,
|
|
11304
|
+
_res$data$productList = _res$data.productList,
|
|
11305
|
+
productList = _res$data$productList === void 0 ? [] : _res$data$productList,
|
|
11306
|
+
_res$data$total = _res$data.total,
|
|
11307
|
+
_total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
11308
|
+
var newProducts = productList.map(function (item, index) {
|
|
11309
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11310
|
+
index: index + 1
|
|
11311
|
+
});
|
|
11307
11312
|
});
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11313
|
+
setGoodList(newProducts);
|
|
11314
|
+
if (pageNo === 1) {
|
|
11315
|
+
setTotal(_total);
|
|
11316
|
+
}
|
|
11317
|
+
} else {
|
|
11318
|
+
var _res$data2;
|
|
11319
|
+
setGoodList([]);
|
|
11320
|
+
setTotal(0);
|
|
11321
|
+
antd.message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
|
|
11312
11322
|
}
|
|
11313
|
-
}
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
case 12:
|
|
11319
|
-
_context.prev = 12;
|
|
11323
|
+
}).catch(function (e) {
|
|
11324
|
+
console.log(e);
|
|
11325
|
+
});
|
|
11326
|
+
case 14:
|
|
11327
|
+
_context.prev = 14;
|
|
11320
11328
|
setLoading(false);
|
|
11321
|
-
return _context.finish(
|
|
11322
|
-
case
|
|
11329
|
+
return _context.finish(14);
|
|
11330
|
+
case 17:
|
|
11323
11331
|
case "end":
|
|
11324
11332
|
return _context.stop();
|
|
11325
11333
|
}
|
|
11326
|
-
}, _callee, null, [[
|
|
11334
|
+
}, _callee, null, [[0,, 14, 17]]);
|
|
11327
11335
|
}));
|
|
11328
11336
|
return function queryItems() {
|
|
11329
11337
|
return _ref.apply(this, arguments);
|
|
11330
11338
|
};
|
|
11331
11339
|
}();
|
|
11332
|
-
var
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11340
|
+
var disabledDate = function disabledDate(current) {
|
|
11341
|
+
var today = hooks(hooks().format('YYYY-MM-DD'));
|
|
11342
|
+
var currentDay = hooks(current.format('YYYY-MM-DD'));
|
|
11343
|
+
if (currentDay.diff(today, 'days') > 0) {
|
|
11344
|
+
return true;
|
|
11345
|
+
}
|
|
11346
|
+
if (!dates) {
|
|
11347
|
+
return false;
|
|
11348
|
+
}
|
|
11349
|
+
var tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
|
|
11350
|
+
var tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
|
|
11351
|
+
return !!tooEarly || !!tooLate;
|
|
11352
|
+
};
|
|
11353
|
+
var onOpenChange = function onOpenChange(open) {
|
|
11354
|
+
if (open) {
|
|
11355
|
+
setDates([null, null]);
|
|
11356
|
+
} else {
|
|
11357
|
+
setDates(null);
|
|
11358
|
+
}
|
|
11344
11359
|
};
|
|
11345
11360
|
var onReset = function onReset() {
|
|
11346
|
-
form.resetFields();
|
|
11347
11361
|
form.setFieldsValue({
|
|
11348
|
-
dateTimePicker:
|
|
11349
|
-
|
|
11362
|
+
dateTimePicker: getInitTime(),
|
|
11363
|
+
goodNo: '',
|
|
11364
|
+
specNo: ''
|
|
11350
11365
|
});
|
|
11351
11366
|
setPageNo(function (prev) {
|
|
11352
|
-
if (prev === 1
|
|
11367
|
+
if (prev === 1) {
|
|
11353
11368
|
queryItems();
|
|
11354
11369
|
}
|
|
11355
11370
|
return 1;
|
|
11356
11371
|
});
|
|
11357
11372
|
};
|
|
11358
|
-
|
|
11359
|
-
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11360
|
-
// method: 'get',
|
|
11361
|
-
// params: {
|
|
11362
|
-
// key: 'company-third-shop-info',
|
|
11363
|
-
// },
|
|
11364
|
-
// });
|
|
11365
|
-
// const obj: any = JSON.parse(data || '{}');
|
|
11366
|
-
// if (success) {
|
|
11367
|
-
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11368
|
-
// return {
|
|
11369
|
-
// label: item.shopName,
|
|
11370
|
-
// value: item.shopCode,
|
|
11371
|
-
// };
|
|
11372
|
-
// });
|
|
11373
|
-
// setShopList(list);
|
|
11374
|
-
// }
|
|
11375
|
-
// };
|
|
11376
|
-
var onValuesChange = function onValuesChange(changedValues) {
|
|
11377
|
-
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11378
|
-
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11379
|
-
pubsub__default['default'].publish('changeShopCode', {
|
|
11380
|
-
shopCode: changedValues.shopId
|
|
11381
|
-
});
|
|
11382
|
-
}
|
|
11383
|
-
};
|
|
11384
|
-
var handleDelete = function handleDelete(record, index) {
|
|
11373
|
+
var handleDelete = function handleDelete(record) {
|
|
11385
11374
|
var newSelectList = selectList.filter(function (item) {
|
|
11386
11375
|
return item.specId !== record.specId;
|
|
11387
11376
|
});
|
|
11388
11377
|
setSelect(_toConsumableArray(newSelectList));
|
|
11389
|
-
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11390
|
-
return item.specId;
|
|
11391
|
-
})));
|
|
11392
11378
|
};
|
|
11393
11379
|
var displaySelectedColumns = [{
|
|
11394
11380
|
dataIndex: 'operation',
|
|
11395
11381
|
title: '',
|
|
11396
11382
|
ellipsis: true,
|
|
11397
11383
|
width: 50,
|
|
11398
|
-
render: function render(_, record
|
|
11384
|
+
render: function render(_, record) {
|
|
11399
11385
|
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11400
11386
|
onClick: function onClick() {
|
|
11401
11387
|
return handleDelete(record);
|
|
@@ -11426,8 +11412,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11426
11412
|
}];
|
|
11427
11413
|
var expandedRowSelection = {
|
|
11428
11414
|
fixed: true,
|
|
11429
|
-
selectedRowKeys:
|
|
11430
|
-
|
|
11415
|
+
selectedRowKeys: selectList.map(function (item) {
|
|
11416
|
+
return item.specId;
|
|
11417
|
+
}),
|
|
11418
|
+
onSelect: function onSelect(record, selected) {
|
|
11431
11419
|
var tempList = [];
|
|
11432
11420
|
if (selected) {
|
|
11433
11421
|
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
@@ -11437,9 +11425,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11437
11425
|
});
|
|
11438
11426
|
}
|
|
11439
11427
|
setSelect(_toConsumableArray(tempList));
|
|
11440
|
-
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11441
|
-
return item.specId;
|
|
11442
|
-
})));
|
|
11443
11428
|
},
|
|
11444
11429
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11445
11430
|
var tempAllList = [];
|
|
@@ -11453,15 +11438,12 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11453
11438
|
});
|
|
11454
11439
|
}
|
|
11455
11440
|
setSelect(_toConsumableArray(tempAllList));
|
|
11456
|
-
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11457
|
-
return item.specId;
|
|
11458
|
-
})));
|
|
11459
11441
|
}
|
|
11460
11442
|
};
|
|
11461
|
-
var expandedRowRender = function expandedRowRender(record
|
|
11443
|
+
var expandedRowRender = function expandedRowRender(record) {
|
|
11462
11444
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11463
|
-
rowKey:
|
|
11464
|
-
size:
|
|
11445
|
+
rowKey: "specId",
|
|
11446
|
+
size: "small",
|
|
11465
11447
|
columns: expandedColumns,
|
|
11466
11448
|
dataSource: record.itemDetailList || [],
|
|
11467
11449
|
pagination: false,
|
|
@@ -11471,43 +11453,61 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11471
11453
|
}
|
|
11472
11454
|
});
|
|
11473
11455
|
};
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
visible: visible,
|
|
11479
|
-
width: width || 850,
|
|
11480
|
-
onCancel: function onCancel() {
|
|
11481
|
-
_onCancel();
|
|
11482
|
-
},
|
|
11483
|
-
onOk: onOk,
|
|
11484
|
-
wrapClassName: "goodModal"
|
|
11485
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11456
|
+
React__default['default'].useEffect(function () {
|
|
11457
|
+
queryItems();
|
|
11458
|
+
}, []);
|
|
11459
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11486
11460
|
layout: "inline",
|
|
11487
11461
|
form: form,
|
|
11488
|
-
onFinish:
|
|
11489
|
-
onValuesChange: onValuesChange,
|
|
11462
|
+
onFinish: queryItems,
|
|
11490
11463
|
initialValues: {
|
|
11491
|
-
|
|
11464
|
+
goodNo: '',
|
|
11465
|
+
specNo: '',
|
|
11466
|
+
dateTimePicker: getInitTime()
|
|
11492
11467
|
}
|
|
11493
11468
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11494
|
-
name: "dateTimePicker"
|
|
11469
|
+
name: "dateTimePicker",
|
|
11470
|
+
style: {
|
|
11471
|
+
marginBottom: '12px'
|
|
11472
|
+
}
|
|
11495
11473
|
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11496
11474
|
style: {
|
|
11497
|
-
width: '
|
|
11475
|
+
width: '240px'
|
|
11498
11476
|
},
|
|
11499
11477
|
placeholder: ['开始日期', '结束日期'],
|
|
11500
|
-
showTime:
|
|
11501
|
-
|
|
11478
|
+
showTime: false,
|
|
11479
|
+
disabledDate: disabledDate,
|
|
11480
|
+
onCalendarChange: function onCalendarChange(val) {
|
|
11481
|
+
return setDates(val);
|
|
11482
|
+
},
|
|
11483
|
+
onOpenChange: onOpenChange
|
|
11502
11484
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11503
|
-
name: "
|
|
11485
|
+
name: "goodNo",
|
|
11486
|
+
style: {
|
|
11487
|
+
marginBottom: '12px'
|
|
11488
|
+
}
|
|
11504
11489
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11505
11490
|
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11506
11491
|
allowClear: true,
|
|
11507
11492
|
style: {
|
|
11508
11493
|
width: 150
|
|
11509
11494
|
}
|
|
11510
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item,
|
|
11495
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11496
|
+
name: "specNo",
|
|
11497
|
+
style: {
|
|
11498
|
+
marginBottom: '12px'
|
|
11499
|
+
}
|
|
11500
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11501
|
+
placeholder: "\u5546\u54C1SKU\u7F16\u7801",
|
|
11502
|
+
allowClear: true,
|
|
11503
|
+
style: {
|
|
11504
|
+
width: 150
|
|
11505
|
+
}
|
|
11506
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11507
|
+
style: {
|
|
11508
|
+
marginBottom: '12px'
|
|
11509
|
+
}
|
|
11510
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11511
11511
|
type: "primary",
|
|
11512
11512
|
htmlType: "submit",
|
|
11513
11513
|
style: {
|
|
@@ -11517,10 +11517,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11517
11517
|
onClick: onReset
|
|
11518
11518
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11519
11519
|
style: {
|
|
11520
|
-
marginTop: '
|
|
11520
|
+
marginTop: '4px'
|
|
11521
11521
|
}
|
|
11522
11522
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11523
|
-
rowKey:
|
|
11523
|
+
rowKey: "goodNo",
|
|
11524
11524
|
columns: columns$1,
|
|
11525
11525
|
dataSource: goodList,
|
|
11526
11526
|
loading: loading,
|
|
@@ -11537,14 +11537,14 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11537
11537
|
current: pageNo,
|
|
11538
11538
|
pageSize: pageSize,
|
|
11539
11539
|
pageSizeOptions: [],
|
|
11540
|
-
onChange:
|
|
11540
|
+
onChange: setPageNo
|
|
11541
11541
|
}
|
|
11542
11542
|
})), !!selectList.length && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11543
11543
|
style: {
|
|
11544
11544
|
marginTop: '16px'
|
|
11545
11545
|
}
|
|
11546
11546
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11547
|
-
rowKey:
|
|
11547
|
+
rowKey: "specId",
|
|
11548
11548
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11549
11549
|
dataSource: displaySelectList,
|
|
11550
11550
|
pagination: false,
|
|
@@ -11555,7 +11555,48 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11555
11555
|
style: {
|
|
11556
11556
|
width: '100%'
|
|
11557
11557
|
}
|
|
11558
|
-
}))))
|
|
11558
|
+
}))));
|
|
11559
|
+
};
|
|
11560
|
+
var WdtGoodList = /*#__PURE__*/React.forwardRef(GoodList);
|
|
11561
|
+
|
|
11562
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11563
|
+
React.useImperativeHandle(ref, function () {
|
|
11564
|
+
return {
|
|
11565
|
+
open: function open() {
|
|
11566
|
+
setVisible(true);
|
|
11567
|
+
}
|
|
11568
|
+
};
|
|
11569
|
+
});
|
|
11570
|
+
var onSubmit = props.onSubmit,
|
|
11571
|
+
width = props.width;
|
|
11572
|
+
var _useState = React.useState(false),
|
|
11573
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11574
|
+
visible = _useState2[0],
|
|
11575
|
+
setVisible = _useState2[1];
|
|
11576
|
+
var wdtGoodListRef = React.useRef(null);
|
|
11577
|
+
var _onCancel = function onCancel() {
|
|
11578
|
+
setVisible(false);
|
|
11579
|
+
};
|
|
11580
|
+
var onOk = function onOk() {
|
|
11581
|
+
var _wdtGoodListRef$curre;
|
|
11582
|
+
var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
|
|
11583
|
+
onSubmit(selectedList);
|
|
11584
|
+
_onCancel();
|
|
11585
|
+
};
|
|
11586
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11587
|
+
title: '选择商品',
|
|
11588
|
+
okText: '确认',
|
|
11589
|
+
cancelText: '取消',
|
|
11590
|
+
visible: visible,
|
|
11591
|
+
width: width || 850,
|
|
11592
|
+
onCancel: function onCancel() {
|
|
11593
|
+
_onCancel();
|
|
11594
|
+
},
|
|
11595
|
+
onOk: onOk,
|
|
11596
|
+
wrapClassName: "goodModal"
|
|
11597
|
+
}, /*#__PURE__*/React__default['default'].createElement(WdtGoodList, {
|
|
11598
|
+
ref: wdtGoodListRef
|
|
11599
|
+
})));
|
|
11559
11600
|
};
|
|
11560
11601
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11561
11602
|
|
|
@@ -12342,20 +12383,6 @@ var typeMap = {
|
|
|
12342
12383
|
money: 'money',
|
|
12343
12384
|
share: 'share'
|
|
12344
12385
|
}
|
|
12345
|
-
},
|
|
12346
|
-
WDT_REISSUE_GOODS: {
|
|
12347
|
-
key: 'wdtReissueGoods',
|
|
12348
|
-
name: '旺店通',
|
|
12349
|
-
typeName: 'wdtReissueType',
|
|
12350
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12351
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12352
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12353
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12354
|
-
reissueType: 'wdtReissueType',
|
|
12355
|
-
formatDefaultField: {
|
|
12356
|
-
money: 'orderPrice',
|
|
12357
|
-
share: 'sharePrice'
|
|
12358
|
-
}
|
|
12359
12386
|
}
|
|
12360
12387
|
};
|
|
12361
12388
|
var BsReissue = function BsReissue(props) {
|
|
@@ -12609,7 +12636,7 @@ var index$1 = (function (props) {
|
|
|
12609
12636
|
getWdtOrderList(value.orderNo);
|
|
12610
12637
|
}
|
|
12611
12638
|
}
|
|
12612
|
-
}, [value, type]);
|
|
12639
|
+
}, [value === null || value === void 0 ? void 0 : value.orderNo, type]);
|
|
12613
12640
|
var columns = React.useMemo(function () {
|
|
12614
12641
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12615
12642
|
return [{
|
|
@@ -12958,6 +12985,245 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12958
12985
|
}));
|
|
12959
12986
|
};
|
|
12960
12987
|
|
|
12988
|
+
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12989
|
+
var typeMap$1 = {
|
|
12990
|
+
WDT_REISSUE_GOODS: {
|
|
12991
|
+
key: 'wdtReissueGoods',
|
|
12992
|
+
name: '旺店通',
|
|
12993
|
+
typeName: 'wdtReissueType',
|
|
12994
|
+
wdtSystemOrder: 'wdtSystemOrder',
|
|
12995
|
+
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
12996
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
12997
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12998
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12999
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13000
|
+
reissueType: 'wdtReissueType',
|
|
13001
|
+
formatDefaultField: {
|
|
13002
|
+
money: 'orderPrice',
|
|
13003
|
+
share: 'sharePrice'
|
|
13004
|
+
}
|
|
13005
|
+
}
|
|
13006
|
+
};
|
|
13007
|
+
var wdtReissue = function wdtReissue(props) {
|
|
13008
|
+
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13009
|
+
var value = props.value,
|
|
13010
|
+
onChange = props.onChange,
|
|
13011
|
+
_props$reasonList = props.reasonList,
|
|
13012
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13013
|
+
disabled = props.disabled,
|
|
13014
|
+
type = props.type,
|
|
13015
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13016
|
+
var valueRef = React.useRef({});
|
|
13017
|
+
React.useEffect(function () {
|
|
13018
|
+
var _typeMap$type, _typeMap$type4;
|
|
13019
|
+
valueRef.current = value;
|
|
13020
|
+
pubsub__default['default'].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) {
|
|
13021
|
+
if (disabled) return;
|
|
13022
|
+
if (value) {
|
|
13023
|
+
var _typeMap$type2, _typeMap$type3;
|
|
13024
|
+
var newValue = _objectSpread2({}, value);
|
|
13025
|
+
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) {
|
|
13026
|
+
return item.sku !== data;
|
|
13027
|
+
});
|
|
13028
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13029
|
+
}
|
|
13030
|
+
});
|
|
13031
|
+
pubsub__default['default'].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) {
|
|
13032
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13033
|
+
shopCode: data.shopCode
|
|
13034
|
+
}));
|
|
13035
|
+
});
|
|
13036
|
+
}, [value, disabled]);
|
|
13037
|
+
React.useEffect(function () {
|
|
13038
|
+
var _value$orders, _value$showOrderInfo;
|
|
13039
|
+
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)) {
|
|
13040
|
+
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13041
|
+
getWdtOrderList(value.orderNo);
|
|
13042
|
+
}
|
|
13043
|
+
}
|
|
13044
|
+
return;
|
|
13045
|
+
}, [value]);
|
|
13046
|
+
React.useEffect(function () {
|
|
13047
|
+
var _typeMap$type5;
|
|
13048
|
+
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];
|
|
13049
|
+
if (wdtSystemOrderNo) {
|
|
13050
|
+
var _value$typeMap$type$t, _typeMap$type6;
|
|
13051
|
+
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])) {
|
|
13052
|
+
getGoodItems(wdtSystemOrderNo);
|
|
13053
|
+
}
|
|
13054
|
+
}
|
|
13055
|
+
return;
|
|
13056
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13057
|
+
React.useEffect(function () {
|
|
13058
|
+
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13059
|
+
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];
|
|
13060
|
+
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];
|
|
13061
|
+
if (['1'].includes(typeName)) {
|
|
13062
|
+
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13063
|
+
} else if (['2'].includes(typeName)) {
|
|
13064
|
+
var _typeMap$type10;
|
|
13065
|
+
var newValue = _objectSpread2({}, value);
|
|
13066
|
+
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)] = [];
|
|
13067
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13068
|
+
}
|
|
13069
|
+
return;
|
|
13070
|
+
}, [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]]);
|
|
13071
|
+
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13072
|
+
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13073
|
+
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;
|
|
13074
|
+
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13075
|
+
return orderItem.billNo === wdtSystemOrderNo;
|
|
13076
|
+
});
|
|
13077
|
+
if (order) {
|
|
13078
|
+
var _typeMap$type13, _order$goodDetails;
|
|
13079
|
+
var newValue = _objectSpread2({}, value);
|
|
13080
|
+
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) {
|
|
13081
|
+
var _typeMap$type14, _typeMap$type15;
|
|
13082
|
+
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;
|
|
13083
|
+
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;
|
|
13084
|
+
item.canUpdateNumber = true;
|
|
13085
|
+
return item;
|
|
13086
|
+
});
|
|
13087
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13088
|
+
}
|
|
13089
|
+
};
|
|
13090
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13091
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13092
|
+
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13093
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13094
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13095
|
+
case 0:
|
|
13096
|
+
_context.next = 2;
|
|
13097
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13098
|
+
method: 'post',
|
|
13099
|
+
data: {
|
|
13100
|
+
billNo: orderNo
|
|
13101
|
+
}
|
|
13102
|
+
});
|
|
13103
|
+
case 2:
|
|
13104
|
+
_yield$request = _context.sent;
|
|
13105
|
+
success = _yield$request.success;
|
|
13106
|
+
data = _yield$request.data;
|
|
13107
|
+
if (success) {
|
|
13108
|
+
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13109
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13110
|
+
billNo: item.tradeNo,
|
|
13111
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13112
|
+
billTag: item.tagName
|
|
13113
|
+
});
|
|
13114
|
+
});
|
|
13115
|
+
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13116
|
+
return {
|
|
13117
|
+
billNo: item.tradeNo,
|
|
13118
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13119
|
+
billTag: item.tagName
|
|
13120
|
+
};
|
|
13121
|
+
});
|
|
13122
|
+
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]), {}, {
|
|
13123
|
+
showOrderInfo: showOrderInfo,
|
|
13124
|
+
orders: orders
|
|
13125
|
+
}))));
|
|
13126
|
+
}
|
|
13127
|
+
case 6:
|
|
13128
|
+
case "end":
|
|
13129
|
+
return _context.stop();
|
|
13130
|
+
}
|
|
13131
|
+
}, _callee);
|
|
13132
|
+
}));
|
|
13133
|
+
return function getWdtOrderList(_x) {
|
|
13134
|
+
return _ref2.apply(this, arguments);
|
|
13135
|
+
};
|
|
13136
|
+
}();
|
|
13137
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13138
|
+
var _typeMap$type18, _typeMap$type19;
|
|
13139
|
+
var newValue = _objectSpread2({}, value);
|
|
13140
|
+
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;
|
|
13141
|
+
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)] = [];
|
|
13142
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13143
|
+
valueRef.current = newValue;
|
|
13144
|
+
// if (['2'].includes(val[0])) {
|
|
13145
|
+
// onChange?.(newValue);
|
|
13146
|
+
// valueRef.current = newValue;
|
|
13147
|
+
// }
|
|
13148
|
+
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13149
|
+
// val: val[0],
|
|
13150
|
+
// goodValue: newValue,
|
|
13151
|
+
// });
|
|
13152
|
+
};
|
|
13153
|
+
|
|
13154
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13155
|
+
var _typeMap$type20;
|
|
13156
|
+
var newValue = _objectSpread2({}, value);
|
|
13157
|
+
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) {
|
|
13158
|
+
var _typeMap$type21, _typeMap$type22;
|
|
13159
|
+
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;
|
|
13160
|
+
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;
|
|
13161
|
+
return item;
|
|
13162
|
+
});
|
|
13163
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13164
|
+
};
|
|
13165
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13166
|
+
var _typeMap$type23;
|
|
13167
|
+
var newValue = _objectSpread2({}, value);
|
|
13168
|
+
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;
|
|
13169
|
+
console.log('changeSystemOrderHandle', val, newValue);
|
|
13170
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13171
|
+
};
|
|
13172
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13173
|
+
var showChangeBtn = React.useMemo(function () {
|
|
13174
|
+
var _typeMap$type24;
|
|
13175
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13176
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13177
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13178
|
+
gutter: 8
|
|
13179
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13180
|
+
className: "gutter-row",
|
|
13181
|
+
span: 6
|
|
13182
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13183
|
+
style: {
|
|
13184
|
+
marginBottom: '8px'
|
|
13185
|
+
},
|
|
13186
|
+
disabled: disabled,
|
|
13187
|
+
allowClear: false,
|
|
13188
|
+
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)],
|
|
13189
|
+
onChange: function onChange(val) {
|
|
13190
|
+
return changeSystemOrderHandle(val);
|
|
13191
|
+
}
|
|
13192
|
+
}, ((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) {
|
|
13193
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
13194
|
+
key: item.billNo,
|
|
13195
|
+
value: item.billNo,
|
|
13196
|
+
label: item.billNo
|
|
13197
|
+
}, item.billNo);
|
|
13198
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13199
|
+
className: "gutter-row",
|
|
13200
|
+
span: 6
|
|
13201
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13202
|
+
style: {
|
|
13203
|
+
marginBottom: '8px'
|
|
13204
|
+
},
|
|
13205
|
+
disabled: disabled,
|
|
13206
|
+
allowClear: false,
|
|
13207
|
+
options: reasonList,
|
|
13208
|
+
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)],
|
|
13209
|
+
onChange: function onChange(val) {
|
|
13210
|
+
return changeTypeHandle(val);
|
|
13211
|
+
}
|
|
13212
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13213
|
+
key: 'reissueGoods'
|
|
13214
|
+
}, other), {}, {
|
|
13215
|
+
type: type,
|
|
13216
|
+
disabled: disabled,
|
|
13217
|
+
canUpdateNumber: showChangeBtn,
|
|
13218
|
+
showChangeBtn: showChangeBtn,
|
|
13219
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13220
|
+
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)],
|
|
13221
|
+
onChange: function onChange(val) {
|
|
13222
|
+
return changeGoodHandle(val);
|
|
13223
|
+
}
|
|
13224
|
+
})));
|
|
13225
|
+
};
|
|
13226
|
+
|
|
12961
13227
|
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";
|
|
12962
13228
|
styleInject(css_248z$a);
|
|
12963
13229
|
|
|
@@ -13434,12 +13700,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13434
13700
|
};
|
|
13435
13701
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
13436
13702
|
|
|
13437
|
-
var _excluded$
|
|
13703
|
+
var _excluded$h = ["onChange", "value", "failValue"];
|
|
13438
13704
|
function CommonStatus(props) {
|
|
13439
13705
|
var onChange = props.onChange,
|
|
13440
13706
|
value = props.value,
|
|
13441
13707
|
failValue = props.failValue,
|
|
13442
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13708
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13443
13709
|
var changeHandle = function changeHandle(val) {
|
|
13444
13710
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13445
13711
|
status: val,
|
|
@@ -13558,7 +13824,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13558
13824
|
})) : null) : null);
|
|
13559
13825
|
};
|
|
13560
13826
|
|
|
13561
|
-
var _excluded$
|
|
13827
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13562
13828
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13563
13829
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13564
13830
|
var _props$value = props.value,
|
|
@@ -13568,7 +13834,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13568
13834
|
failValue = props.failValue,
|
|
13569
13835
|
_props$type = props.type,
|
|
13570
13836
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13571
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13837
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13572
13838
|
var _useState = React.useState(0),
|
|
13573
13839
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13574
13840
|
changeIndex = _useState2[0],
|
|
@@ -13634,7 +13900,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13634
13900
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13635
13901
|
};
|
|
13636
13902
|
|
|
13637
|
-
var _excluded$
|
|
13903
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13638
13904
|
var msgTypeCh = {
|
|
13639
13905
|
ding: '钉钉',
|
|
13640
13906
|
wechat: '微信',
|
|
@@ -13650,7 +13916,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13650
13916
|
failValue = props.failValue,
|
|
13651
13917
|
_props$type = props.type,
|
|
13652
13918
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13653
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13919
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
13654
13920
|
var _useState = React.useState(0),
|
|
13655
13921
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13656
13922
|
changeIndex = _useState2[0],
|
|
@@ -13773,4 +14039,6 @@ exports.Supplier = Supplier;
|
|
|
13773
14039
|
exports.TBGoodId = TBGoodId;
|
|
13774
14040
|
exports.TBGoodSerial = TBGoodSerial;
|
|
13775
14041
|
exports.TradeId = TradeId;
|
|
14042
|
+
exports.WdtGoodList = WdtGoodList;
|
|
14043
|
+
exports.WdtReissue = wdtReissue;
|
|
13776
14044
|
exports.WlnGoods = WlnGoods;
|