@kmkf-fe-packages/basic-components 1.0.0 → 1.0.1-rc.1
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 +515 -228
- package/dist/index.js +515 -226
- package/dist/src/bs/component/model/WdtGoodList.d.ts +40 -0
- package/dist/src/business/LogisticsInterception/index.d.ts +1 -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", "type"];
|
|
7578
7578
|
function ApaasLogistics(props) {
|
|
7579
7579
|
var value = props.value,
|
|
7580
7580
|
onChange = props.onChange,
|
|
7581
|
+
type = props.type,
|
|
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(type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
|
|
7594
7595
|
setOptions(express.expressData || []);
|
|
7595
7596
|
case 2:
|
|
7596
7597
|
case "end":
|
|
@@ -9844,7 +9845,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9844
9845
|
interceptReceiverMobile: undefined,
|
|
9845
9846
|
interceptLogisticsStatus: undefined,
|
|
9846
9847
|
interceptLogisticsStatusOther: undefined,
|
|
9847
|
-
interceptLogisticsSnapshot: undefined
|
|
9848
|
+
interceptLogisticsSnapshot: undefined,
|
|
9849
|
+
qySelfInterceptLogisticsStatus: undefined
|
|
9848
9850
|
});
|
|
9849
9851
|
}
|
|
9850
9852
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
@@ -9989,6 +9991,26 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9989
9991
|
onChange: function onChange(e) {
|
|
9990
9992
|
return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
|
|
9991
9993
|
}
|
|
9994
|
+
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
9995
|
+
label: '拦截状态',
|
|
9996
|
+
key: 'qySelfInterceptLogisticsStatus'
|
|
9997
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9998
|
+
value: value === null || value === void 0 ? void 0 : value.qySelfInterceptLogisticsStatus,
|
|
9999
|
+
disabled: true,
|
|
10000
|
+
style: {
|
|
10001
|
+
width: '200px'
|
|
10002
|
+
},
|
|
10003
|
+
placeholder: "\u62E6\u622A\u72B6\u6001",
|
|
10004
|
+
onChange: function onChange(val) {
|
|
10005
|
+
return changeHandle(val, 'qySelfInterceptLogisticsStatus');
|
|
10006
|
+
},
|
|
10007
|
+
options: [{
|
|
10008
|
+
label: '拦截成功',
|
|
10009
|
+
value: '拦截成功'
|
|
10010
|
+
}, {
|
|
10011
|
+
label: '拦截失败',
|
|
10012
|
+
value: '拦截失败'
|
|
10013
|
+
}]
|
|
9992
10014
|
})));
|
|
9993
10015
|
};
|
|
9994
10016
|
|
|
@@ -10413,7 +10435,7 @@ var typeInitValueMap = {
|
|
|
10413
10435
|
}]
|
|
10414
10436
|
};
|
|
10415
10437
|
var jstGoods = function jstGoods(props) {
|
|
10416
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10438
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
10417
10439
|
var _props$value = props.value,
|
|
10418
10440
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10419
10441
|
onChange = props.onChange,
|
|
@@ -10421,11 +10443,15 @@ var jstGoods = function jstGoods(props) {
|
|
|
10421
10443
|
_props$type = props.type,
|
|
10422
10444
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10423
10445
|
_props$showField = props.showField,
|
|
10424
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10446
|
+
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10447
|
+
_props$componentType = props.componentType,
|
|
10448
|
+
componentType = _props$componentType === void 0 ? '' : _props$componentType;
|
|
10425
10449
|
var _useState = React.useState(0),
|
|
10426
10450
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10427
10451
|
changeIndex = _useState2[0],
|
|
10428
10452
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10453
|
+
var _useSendData = kmkfUtils.useSendData(componentType === 'WDT_SEND_GOOD' ? 'wdt' : ''),
|
|
10454
|
+
wdtSendOptions = _useSendData.sendData;
|
|
10429
10455
|
React.useEffect(function () {
|
|
10430
10456
|
//没有值塞个默认值
|
|
10431
10457
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
@@ -10452,6 +10478,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10452
10478
|
}), /*#__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
10479
|
}));
|
|
10454
10480
|
};
|
|
10481
|
+
var handleSelected = function handleSelected(val, type, option) {
|
|
10482
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10483
|
+
changeOrderInfo[type] = val;
|
|
10484
|
+
changeOrderInfo['sendId'] = option.warehouseNo;
|
|
10485
|
+
var newList = _toConsumableArray(value);
|
|
10486
|
+
newList[changeIndex] = changeOrderInfo;
|
|
10487
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10488
|
+
};
|
|
10489
|
+
var filterOption = function filterOption(input, option) {
|
|
10490
|
+
var _option$label;
|
|
10491
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10492
|
+
};
|
|
10455
10493
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10456
10494
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10457
10495
|
changeOrderInfo[type] = val;
|
|
@@ -10493,7 +10531,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
10493
10531
|
style: {
|
|
10494
10532
|
minWidth: '100px',
|
|
10495
10533
|
maxWidth: '180px'
|
|
10496
|
-
}
|
|
10534
|
+
},
|
|
10535
|
+
type: componentType
|
|
10497
10536
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10498
10537
|
disabled: disabled,
|
|
10499
10538
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
@@ -10522,20 +10561,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
10522
10561
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10523
10562
|
},
|
|
10524
10563
|
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.
|
|
10564
|
+
}), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
10565
|
+
style: {
|
|
10566
|
+
minWidth: '100px',
|
|
10567
|
+
maxWidth: '180px'
|
|
10568
|
+
},
|
|
10569
|
+
disabled: disabled,
|
|
10570
|
+
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10571
|
+
showSearch: true,
|
|
10572
|
+
options: wdtSendOptions,
|
|
10573
|
+
filterOption: filterOption,
|
|
10574
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10575
|
+
onChange: function onChange(value, option) {
|
|
10576
|
+
return handleSelected(value, 'sendName', option);
|
|
10577
|
+
}
|
|
10578
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10526
10579
|
disabled: disabled,
|
|
10527
10580
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10528
10581
|
onChange: function onChange(e) {
|
|
10529
10582
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10530
10583
|
},
|
|
10531
|
-
value: (_value$
|
|
10532
|
-
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10584
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10585
|
+
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10533
10586
|
disabled: disabled,
|
|
10534
10587
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10535
10588
|
onChange: function onChange(e) {
|
|
10536
10589
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10537
10590
|
},
|
|
10538
|
-
value: (_value$
|
|
10591
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
10539
10592
|
})) : null) : null);
|
|
10540
10593
|
};
|
|
10541
10594
|
|
|
@@ -11102,6 +11155,12 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11102
11155
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11103
11156
|
|
|
11104
11157
|
var RangePicker = antd.DatePicker.RangePicker;
|
|
11158
|
+
var getWdtListProduct = function getWdtListProduct(data) {
|
|
11159
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11160
|
+
method: 'post',
|
|
11161
|
+
data: data
|
|
11162
|
+
});
|
|
11163
|
+
};
|
|
11105
11164
|
var columns$1 = [{
|
|
11106
11165
|
dataIndex: 'index',
|
|
11107
11166
|
title: 'NO',
|
|
@@ -11176,226 +11235,174 @@ var expandedColumns = [{
|
|
|
11176
11235
|
title: '会员价',
|
|
11177
11236
|
width: 140
|
|
11178
11237
|
}];
|
|
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),
|
|
11238
|
+
var getInitTime = function getInitTime() {
|
|
11239
|
+
var initStartTime = hooks().subtract(30, 'd').hours(0).minutes(0).seconds(0);
|
|
11240
|
+
var initEndTime = hooks().hours(23).minutes(59).seconds(59);
|
|
11241
|
+
return [initStartTime, initEndTime];
|
|
11242
|
+
};
|
|
11243
|
+
var GoodList = function GoodList(props, ref) {
|
|
11244
|
+
var _useState = React.useState([]),
|
|
11205
11245
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
var _useState3 = React.useState(
|
|
11246
|
+
selectList = _useState2[0],
|
|
11247
|
+
setSelect = _useState2[1];
|
|
11248
|
+
var _useState3 = React.useState(1),
|
|
11209
11249
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
var _useState5 = React.useState(
|
|
11213
|
-
_useState6 = _slicedToArray(_useState5,
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
var _useState7 = React.useState(1),
|
|
11250
|
+
pageNo = _useState4[0],
|
|
11251
|
+
setPageNo = _useState4[1];
|
|
11252
|
+
var _useState5 = React.useState(10),
|
|
11253
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
11254
|
+
pageSize = _useState6[0];
|
|
11255
|
+
var _useState7 = React.useState([]),
|
|
11217
11256
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
var _useState9 = React.useState(
|
|
11221
|
-
_useState10 = _slicedToArray(_useState9,
|
|
11222
|
-
|
|
11223
|
-
|
|
11257
|
+
goodList = _useState8[0],
|
|
11258
|
+
setGoodList = _useState8[1];
|
|
11259
|
+
var _useState9 = React.useState(false),
|
|
11260
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11261
|
+
loading = _useState10[0],
|
|
11262
|
+
setLoading = _useState10[1];
|
|
11263
|
+
var _useState11 = React.useState(0),
|
|
11224
11264
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
var _useState13 = React.useState(
|
|
11265
|
+
total = _useState12[0],
|
|
11266
|
+
setTotal = _useState12[1];
|
|
11267
|
+
var _useState13 = React.useState(null),
|
|
11228
11268
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11269
|
+
dates = _useState14[0],
|
|
11270
|
+
setDates = _useState14[1];
|
|
11271
|
+
React.useImperativeHandle(ref, function () {
|
|
11272
|
+
return {
|
|
11273
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
11274
|
+
return selectList;
|
|
11275
|
+
}
|
|
11276
|
+
};
|
|
11277
|
+
});
|
|
11235
11278
|
var displaySelectList = React.useMemo(function () {
|
|
11236
11279
|
return selectList.map(function (item, i) {
|
|
11237
11280
|
item.index = i + 1;
|
|
11238
11281
|
return item;
|
|
11239
11282
|
});
|
|
11240
11283
|
}, [selectList]);
|
|
11241
|
-
React.useEffect(function () {
|
|
11242
|
-
if (visible) {
|
|
11243
|
-
queryItems();
|
|
11244
|
-
}
|
|
11245
|
-
}, [pageNo, visible]);
|
|
11246
11284
|
var _Form$useForm = antd.Form.useForm(),
|
|
11247
11285
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11248
11286
|
form = _Form$useForm2[0];
|
|
11249
|
-
//选择页码
|
|
11250
|
-
var pageChange = function pageChange(page) {
|
|
11251
|
-
setPageNo(page);
|
|
11252
|
-
};
|
|
11253
11287
|
/**
|
|
11254
11288
|
* 查询商品
|
|
11255
11289
|
*/
|
|
11256
11290
|
var queryItems = /*#__PURE__*/function () {
|
|
11257
11291
|
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;
|
|
11292
|
+
var _formData$dateTimePic, _formData$dateTimePic2, _formData$dateTimePic3, _formData$dateTimePic4, _formData$dateTimePic5, _formData$dateTimePic6, formData, _getInitTime, _getInitTime2, start, end, startTime, endTime, newTime, earliest, params;
|
|
11278
11293
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11279
11294
|
while (1) switch (_context.prev = _context.next) {
|
|
11280
11295
|
case 0:
|
|
11281
|
-
|
|
11282
|
-
_context.prev = 1;
|
|
11296
|
+
_context.prev = 0;
|
|
11283
11297
|
setLoading(true);
|
|
11284
11298
|
formData = form.getFieldsValue();
|
|
11285
|
-
|
|
11286
|
-
|
|
11299
|
+
_getInitTime = getInitTime(), _getInitTime2 = _slicedToArray(_getInitTime, 2), start = _getInitTime2[0], end = _getInitTime2[1];
|
|
11300
|
+
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');
|
|
11301
|
+
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');
|
|
11302
|
+
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11303
|
+
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11304
|
+
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11305
|
+
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11306
|
+
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11307
|
+
}
|
|
11308
|
+
// 30天内
|
|
11309
|
+
earliest = hooks(endTime).subtract(30, 'd');
|
|
11310
|
+
if (earliest.diff(hooks(startTime), 'seconds') > 0) {
|
|
11311
|
+
startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
|
|
11312
|
+
}
|
|
11287
11313
|
params = {
|
|
11288
|
-
// shopCode: shopCode,
|
|
11289
11314
|
pageSize: pageSize,
|
|
11290
11315
|
pageNo: pageNo - 1,
|
|
11291
|
-
goodNo:
|
|
11316
|
+
goodNo: formData.goodNo || null,
|
|
11317
|
+
specNo: formData.specNo || null,
|
|
11292
11318
|
startTime: startTime,
|
|
11293
11319
|
endTime: endTime
|
|
11294
11320
|
};
|
|
11295
|
-
_context.next =
|
|
11296
|
-
return
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11321
|
+
_context.next = 14;
|
|
11322
|
+
return getWdtListProduct(params).then(function (res) {
|
|
11323
|
+
if (res.success) {
|
|
11324
|
+
var _res$data = res.data,
|
|
11325
|
+
_res$data$productList = _res$data.productList,
|
|
11326
|
+
productList = _res$data$productList === void 0 ? [] : _res$data$productList,
|
|
11327
|
+
_res$data$total = _res$data.total,
|
|
11328
|
+
_total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
11329
|
+
var newProducts = productList.map(function (item, index) {
|
|
11330
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11331
|
+
index: index + 1
|
|
11332
|
+
});
|
|
11307
11333
|
});
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11334
|
+
setGoodList(newProducts);
|
|
11335
|
+
if (pageNo === 1) {
|
|
11336
|
+
setTotal(_total);
|
|
11337
|
+
}
|
|
11338
|
+
} else {
|
|
11339
|
+
var _res$data2;
|
|
11340
|
+
setGoodList([]);
|
|
11341
|
+
setTotal(0);
|
|
11342
|
+
antd.message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
|
|
11312
11343
|
}
|
|
11313
|
-
}
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
case 12:
|
|
11319
|
-
_context.prev = 12;
|
|
11344
|
+
}).catch(function (e) {
|
|
11345
|
+
console.log(e);
|
|
11346
|
+
});
|
|
11347
|
+
case 14:
|
|
11348
|
+
_context.prev = 14;
|
|
11320
11349
|
setLoading(false);
|
|
11321
|
-
return _context.finish(
|
|
11322
|
-
case
|
|
11350
|
+
return _context.finish(14);
|
|
11351
|
+
case 17:
|
|
11323
11352
|
case "end":
|
|
11324
11353
|
return _context.stop();
|
|
11325
11354
|
}
|
|
11326
|
-
}, _callee, null, [[
|
|
11355
|
+
}, _callee, null, [[0,, 14, 17]]);
|
|
11327
11356
|
}));
|
|
11328
11357
|
return function queryItems() {
|
|
11329
11358
|
return _ref.apply(this, arguments);
|
|
11330
11359
|
};
|
|
11331
11360
|
}();
|
|
11332
|
-
var
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11361
|
+
var disabledDate = function disabledDate(current) {
|
|
11362
|
+
var today = hooks(hooks().format('YYYY-MM-DD'));
|
|
11363
|
+
var currentDay = hooks(current.format('YYYY-MM-DD'));
|
|
11364
|
+
if (currentDay.diff(today, 'days') > 0) {
|
|
11365
|
+
return true;
|
|
11366
|
+
}
|
|
11367
|
+
if (!dates) {
|
|
11368
|
+
return false;
|
|
11369
|
+
}
|
|
11370
|
+
var tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
|
|
11371
|
+
var tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
|
|
11372
|
+
return !!tooEarly || !!tooLate;
|
|
11373
|
+
};
|
|
11374
|
+
var onOpenChange = function onOpenChange(open) {
|
|
11375
|
+
if (open) {
|
|
11376
|
+
setDates([null, null]);
|
|
11377
|
+
} else {
|
|
11378
|
+
setDates(null);
|
|
11379
|
+
}
|
|
11344
11380
|
};
|
|
11345
11381
|
var onReset = function onReset() {
|
|
11346
|
-
form.resetFields();
|
|
11347
11382
|
form.setFieldsValue({
|
|
11348
|
-
dateTimePicker:
|
|
11349
|
-
|
|
11383
|
+
dateTimePicker: getInitTime(),
|
|
11384
|
+
goodNo: '',
|
|
11385
|
+
specNo: ''
|
|
11350
11386
|
});
|
|
11351
11387
|
setPageNo(function (prev) {
|
|
11352
|
-
if (prev === 1
|
|
11388
|
+
if (prev === 1) {
|
|
11353
11389
|
queryItems();
|
|
11354
11390
|
}
|
|
11355
11391
|
return 1;
|
|
11356
11392
|
});
|
|
11357
11393
|
};
|
|
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) {
|
|
11394
|
+
var handleDelete = function handleDelete(record) {
|
|
11385
11395
|
var newSelectList = selectList.filter(function (item) {
|
|
11386
11396
|
return item.specId !== record.specId;
|
|
11387
11397
|
});
|
|
11388
11398
|
setSelect(_toConsumableArray(newSelectList));
|
|
11389
|
-
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11390
|
-
return item.specId;
|
|
11391
|
-
})));
|
|
11392
11399
|
};
|
|
11393
11400
|
var displaySelectedColumns = [{
|
|
11394
11401
|
dataIndex: 'operation',
|
|
11395
11402
|
title: '',
|
|
11396
11403
|
ellipsis: true,
|
|
11397
11404
|
width: 50,
|
|
11398
|
-
render: function render(_, record
|
|
11405
|
+
render: function render(_, record) {
|
|
11399
11406
|
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11400
11407
|
onClick: function onClick() {
|
|
11401
11408
|
return handleDelete(record);
|
|
@@ -11426,8 +11433,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11426
11433
|
}];
|
|
11427
11434
|
var expandedRowSelection = {
|
|
11428
11435
|
fixed: true,
|
|
11429
|
-
selectedRowKeys:
|
|
11430
|
-
|
|
11436
|
+
selectedRowKeys: selectList.map(function (item) {
|
|
11437
|
+
return item.specId;
|
|
11438
|
+
}),
|
|
11439
|
+
onSelect: function onSelect(record, selected) {
|
|
11431
11440
|
var tempList = [];
|
|
11432
11441
|
if (selected) {
|
|
11433
11442
|
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
@@ -11437,9 +11446,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11437
11446
|
});
|
|
11438
11447
|
}
|
|
11439
11448
|
setSelect(_toConsumableArray(tempList));
|
|
11440
|
-
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11441
|
-
return item.specId;
|
|
11442
|
-
})));
|
|
11443
11449
|
},
|
|
11444
11450
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11445
11451
|
var tempAllList = [];
|
|
@@ -11453,15 +11459,12 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11453
11459
|
});
|
|
11454
11460
|
}
|
|
11455
11461
|
setSelect(_toConsumableArray(tempAllList));
|
|
11456
|
-
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11457
|
-
return item.specId;
|
|
11458
|
-
})));
|
|
11459
11462
|
}
|
|
11460
11463
|
};
|
|
11461
|
-
var expandedRowRender = function expandedRowRender(record
|
|
11464
|
+
var expandedRowRender = function expandedRowRender(record) {
|
|
11462
11465
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11463
|
-
rowKey:
|
|
11464
|
-
size:
|
|
11466
|
+
rowKey: "specId",
|
|
11467
|
+
size: "small",
|
|
11465
11468
|
columns: expandedColumns,
|
|
11466
11469
|
dataSource: record.itemDetailList || [],
|
|
11467
11470
|
pagination: false,
|
|
@@ -11471,43 +11474,61 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11471
11474
|
}
|
|
11472
11475
|
});
|
|
11473
11476
|
};
|
|
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, {
|
|
11477
|
+
React__default['default'].useEffect(function () {
|
|
11478
|
+
queryItems();
|
|
11479
|
+
}, []);
|
|
11480
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11486
11481
|
layout: "inline",
|
|
11487
11482
|
form: form,
|
|
11488
|
-
onFinish:
|
|
11489
|
-
onValuesChange: onValuesChange,
|
|
11483
|
+
onFinish: queryItems,
|
|
11490
11484
|
initialValues: {
|
|
11491
|
-
|
|
11485
|
+
goodNo: '',
|
|
11486
|
+
specNo: '',
|
|
11487
|
+
dateTimePicker: getInitTime()
|
|
11492
11488
|
}
|
|
11493
11489
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11494
|
-
name: "dateTimePicker"
|
|
11490
|
+
name: "dateTimePicker",
|
|
11491
|
+
style: {
|
|
11492
|
+
marginBottom: '12px'
|
|
11493
|
+
}
|
|
11495
11494
|
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11496
11495
|
style: {
|
|
11497
|
-
width: '
|
|
11496
|
+
width: '240px'
|
|
11498
11497
|
},
|
|
11499
11498
|
placeholder: ['开始日期', '结束日期'],
|
|
11500
|
-
showTime:
|
|
11501
|
-
|
|
11499
|
+
showTime: false,
|
|
11500
|
+
disabledDate: disabledDate,
|
|
11501
|
+
onCalendarChange: function onCalendarChange(val) {
|
|
11502
|
+
return setDates(val);
|
|
11503
|
+
},
|
|
11504
|
+
onOpenChange: onOpenChange
|
|
11502
11505
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11503
|
-
name: "
|
|
11506
|
+
name: "goodNo",
|
|
11507
|
+
style: {
|
|
11508
|
+
marginBottom: '12px'
|
|
11509
|
+
}
|
|
11504
11510
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11505
11511
|
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11506
11512
|
allowClear: true,
|
|
11507
11513
|
style: {
|
|
11508
11514
|
width: 150
|
|
11509
11515
|
}
|
|
11510
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item,
|
|
11516
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11517
|
+
name: "specNo",
|
|
11518
|
+
style: {
|
|
11519
|
+
marginBottom: '12px'
|
|
11520
|
+
}
|
|
11521
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11522
|
+
placeholder: "\u5546\u54C1SKU\u7F16\u7801",
|
|
11523
|
+
allowClear: true,
|
|
11524
|
+
style: {
|
|
11525
|
+
width: 150
|
|
11526
|
+
}
|
|
11527
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11528
|
+
style: {
|
|
11529
|
+
marginBottom: '12px'
|
|
11530
|
+
}
|
|
11531
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11511
11532
|
type: "primary",
|
|
11512
11533
|
htmlType: "submit",
|
|
11513
11534
|
style: {
|
|
@@ -11517,10 +11538,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11517
11538
|
onClick: onReset
|
|
11518
11539
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11519
11540
|
style: {
|
|
11520
|
-
marginTop: '
|
|
11541
|
+
marginTop: '4px'
|
|
11521
11542
|
}
|
|
11522
11543
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11523
|
-
rowKey:
|
|
11544
|
+
rowKey: "goodNo",
|
|
11524
11545
|
columns: columns$1,
|
|
11525
11546
|
dataSource: goodList,
|
|
11526
11547
|
loading: loading,
|
|
@@ -11537,14 +11558,14 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11537
11558
|
current: pageNo,
|
|
11538
11559
|
pageSize: pageSize,
|
|
11539
11560
|
pageSizeOptions: [],
|
|
11540
|
-
onChange:
|
|
11561
|
+
onChange: setPageNo
|
|
11541
11562
|
}
|
|
11542
11563
|
})), !!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
11564
|
style: {
|
|
11544
11565
|
marginTop: '16px'
|
|
11545
11566
|
}
|
|
11546
11567
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11547
|
-
rowKey:
|
|
11568
|
+
rowKey: "specId",
|
|
11548
11569
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11549
11570
|
dataSource: displaySelectList,
|
|
11550
11571
|
pagination: false,
|
|
@@ -11555,7 +11576,48 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11555
11576
|
style: {
|
|
11556
11577
|
width: '100%'
|
|
11557
11578
|
}
|
|
11558
|
-
}))))
|
|
11579
|
+
}))));
|
|
11580
|
+
};
|
|
11581
|
+
var WdtGoodList = /*#__PURE__*/React.forwardRef(GoodList);
|
|
11582
|
+
|
|
11583
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11584
|
+
React.useImperativeHandle(ref, function () {
|
|
11585
|
+
return {
|
|
11586
|
+
open: function open() {
|
|
11587
|
+
setVisible(true);
|
|
11588
|
+
}
|
|
11589
|
+
};
|
|
11590
|
+
});
|
|
11591
|
+
var onSubmit = props.onSubmit,
|
|
11592
|
+
width = props.width;
|
|
11593
|
+
var _useState = React.useState(false),
|
|
11594
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11595
|
+
visible = _useState2[0],
|
|
11596
|
+
setVisible = _useState2[1];
|
|
11597
|
+
var wdtGoodListRef = React.useRef(null);
|
|
11598
|
+
var _onCancel = function onCancel() {
|
|
11599
|
+
setVisible(false);
|
|
11600
|
+
};
|
|
11601
|
+
var onOk = function onOk() {
|
|
11602
|
+
var _wdtGoodListRef$curre;
|
|
11603
|
+
var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
|
|
11604
|
+
onSubmit(selectedList);
|
|
11605
|
+
_onCancel();
|
|
11606
|
+
};
|
|
11607
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11608
|
+
title: '选择商品',
|
|
11609
|
+
okText: '确认',
|
|
11610
|
+
cancelText: '取消',
|
|
11611
|
+
visible: visible,
|
|
11612
|
+
width: width || 850,
|
|
11613
|
+
onCancel: function onCancel() {
|
|
11614
|
+
_onCancel();
|
|
11615
|
+
},
|
|
11616
|
+
onOk: onOk,
|
|
11617
|
+
wrapClassName: "goodModal"
|
|
11618
|
+
}, /*#__PURE__*/React__default['default'].createElement(WdtGoodList, {
|
|
11619
|
+
ref: wdtGoodListRef
|
|
11620
|
+
})));
|
|
11559
11621
|
};
|
|
11560
11622
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11561
11623
|
|
|
@@ -12342,20 +12404,6 @@ var typeMap = {
|
|
|
12342
12404
|
money: 'money',
|
|
12343
12405
|
share: 'share'
|
|
12344
12406
|
}
|
|
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
12407
|
}
|
|
12360
12408
|
};
|
|
12361
12409
|
var BsReissue = function BsReissue(props) {
|
|
@@ -12958,6 +13006,245 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12958
13006
|
}));
|
|
12959
13007
|
};
|
|
12960
13008
|
|
|
13009
|
+
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
13010
|
+
var typeMap$1 = {
|
|
13011
|
+
WDT_REISSUE_GOODS: {
|
|
13012
|
+
key: 'wdtReissueGoods',
|
|
13013
|
+
name: '旺店通',
|
|
13014
|
+
typeName: 'wdtReissueType',
|
|
13015
|
+
wdtSystemOrder: 'wdtSystemOrder',
|
|
13016
|
+
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
13017
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
13018
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
13019
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
13020
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13021
|
+
reissueType: 'wdtReissueType',
|
|
13022
|
+
formatDefaultField: {
|
|
13023
|
+
money: 'orderPrice',
|
|
13024
|
+
share: 'sharePrice'
|
|
13025
|
+
}
|
|
13026
|
+
}
|
|
13027
|
+
};
|
|
13028
|
+
var wdtReissue = function wdtReissue(props) {
|
|
13029
|
+
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13030
|
+
var value = props.value,
|
|
13031
|
+
onChange = props.onChange,
|
|
13032
|
+
_props$reasonList = props.reasonList,
|
|
13033
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13034
|
+
disabled = props.disabled,
|
|
13035
|
+
type = props.type,
|
|
13036
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13037
|
+
var valueRef = React.useRef({});
|
|
13038
|
+
React.useEffect(function () {
|
|
13039
|
+
var _typeMap$type, _typeMap$type4;
|
|
13040
|
+
valueRef.current = value;
|
|
13041
|
+
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) {
|
|
13042
|
+
if (disabled) return;
|
|
13043
|
+
if (value) {
|
|
13044
|
+
var _typeMap$type2, _typeMap$type3;
|
|
13045
|
+
var newValue = _objectSpread2({}, value);
|
|
13046
|
+
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) {
|
|
13047
|
+
return item.sku !== data;
|
|
13048
|
+
});
|
|
13049
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13050
|
+
}
|
|
13051
|
+
});
|
|
13052
|
+
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) {
|
|
13053
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13054
|
+
shopCode: data.shopCode
|
|
13055
|
+
}));
|
|
13056
|
+
});
|
|
13057
|
+
}, [value, disabled]);
|
|
13058
|
+
React.useEffect(function () {
|
|
13059
|
+
var _value$orders, _value$showOrderInfo;
|
|
13060
|
+
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)) {
|
|
13061
|
+
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13062
|
+
getWdtOrderList(value.orderNo);
|
|
13063
|
+
}
|
|
13064
|
+
}
|
|
13065
|
+
return;
|
|
13066
|
+
}, [value]);
|
|
13067
|
+
React.useEffect(function () {
|
|
13068
|
+
var _typeMap$type5;
|
|
13069
|
+
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];
|
|
13070
|
+
if (wdtSystemOrderNo) {
|
|
13071
|
+
var _value$typeMap$type$t, _typeMap$type6;
|
|
13072
|
+
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])) {
|
|
13073
|
+
getGoodItems(wdtSystemOrderNo);
|
|
13074
|
+
}
|
|
13075
|
+
}
|
|
13076
|
+
return;
|
|
13077
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13078
|
+
React.useEffect(function () {
|
|
13079
|
+
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13080
|
+
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];
|
|
13081
|
+
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];
|
|
13082
|
+
if (['1'].includes(typeName)) {
|
|
13083
|
+
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13084
|
+
} else if (['2'].includes(typeName)) {
|
|
13085
|
+
var _typeMap$type10;
|
|
13086
|
+
var newValue = _objectSpread2({}, value);
|
|
13087
|
+
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)] = [];
|
|
13088
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13089
|
+
}
|
|
13090
|
+
return;
|
|
13091
|
+
}, [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]]);
|
|
13092
|
+
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13093
|
+
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13094
|
+
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;
|
|
13095
|
+
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13096
|
+
return orderItem.billNo === wdtSystemOrderNo;
|
|
13097
|
+
});
|
|
13098
|
+
if (order) {
|
|
13099
|
+
var _typeMap$type13, _order$goodDetails;
|
|
13100
|
+
var newValue = _objectSpread2({}, value);
|
|
13101
|
+
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) {
|
|
13102
|
+
var _typeMap$type14, _typeMap$type15;
|
|
13103
|
+
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;
|
|
13104
|
+
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;
|
|
13105
|
+
item.canUpdateNumber = true;
|
|
13106
|
+
return item;
|
|
13107
|
+
});
|
|
13108
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13109
|
+
}
|
|
13110
|
+
};
|
|
13111
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13112
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13113
|
+
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13114
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13115
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13116
|
+
case 0:
|
|
13117
|
+
_context.next = 2;
|
|
13118
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13119
|
+
method: 'post',
|
|
13120
|
+
data: {
|
|
13121
|
+
billNo: orderNo
|
|
13122
|
+
}
|
|
13123
|
+
});
|
|
13124
|
+
case 2:
|
|
13125
|
+
_yield$request = _context.sent;
|
|
13126
|
+
success = _yield$request.success;
|
|
13127
|
+
data = _yield$request.data;
|
|
13128
|
+
if (success) {
|
|
13129
|
+
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13130
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13131
|
+
billNo: item.tradeNo,
|
|
13132
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13133
|
+
billTag: item.tagName
|
|
13134
|
+
});
|
|
13135
|
+
});
|
|
13136
|
+
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13137
|
+
return {
|
|
13138
|
+
billNo: item.tradeNo,
|
|
13139
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13140
|
+
billTag: item.tagName
|
|
13141
|
+
};
|
|
13142
|
+
});
|
|
13143
|
+
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]), {}, {
|
|
13144
|
+
showOrderInfo: showOrderInfo,
|
|
13145
|
+
orders: orders
|
|
13146
|
+
}))));
|
|
13147
|
+
}
|
|
13148
|
+
case 6:
|
|
13149
|
+
case "end":
|
|
13150
|
+
return _context.stop();
|
|
13151
|
+
}
|
|
13152
|
+
}, _callee);
|
|
13153
|
+
}));
|
|
13154
|
+
return function getWdtOrderList(_x) {
|
|
13155
|
+
return _ref2.apply(this, arguments);
|
|
13156
|
+
};
|
|
13157
|
+
}();
|
|
13158
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13159
|
+
var _typeMap$type18, _typeMap$type19;
|
|
13160
|
+
var newValue = _objectSpread2({}, value);
|
|
13161
|
+
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;
|
|
13162
|
+
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)] = [];
|
|
13163
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13164
|
+
valueRef.current = newValue;
|
|
13165
|
+
// if (['2'].includes(val[0])) {
|
|
13166
|
+
// onChange?.(newValue);
|
|
13167
|
+
// valueRef.current = newValue;
|
|
13168
|
+
// }
|
|
13169
|
+
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13170
|
+
// val: val[0],
|
|
13171
|
+
// goodValue: newValue,
|
|
13172
|
+
// });
|
|
13173
|
+
};
|
|
13174
|
+
|
|
13175
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13176
|
+
var _typeMap$type20;
|
|
13177
|
+
var newValue = _objectSpread2({}, value);
|
|
13178
|
+
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) {
|
|
13179
|
+
var _typeMap$type21, _typeMap$type22;
|
|
13180
|
+
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;
|
|
13181
|
+
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;
|
|
13182
|
+
return item;
|
|
13183
|
+
});
|
|
13184
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13185
|
+
};
|
|
13186
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13187
|
+
var _typeMap$type23;
|
|
13188
|
+
var newValue = _objectSpread2({}, value);
|
|
13189
|
+
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;
|
|
13190
|
+
console.log('changeSystemOrderHandle', val, newValue);
|
|
13191
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13192
|
+
};
|
|
13193
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13194
|
+
var showChangeBtn = React.useMemo(function () {
|
|
13195
|
+
var _typeMap$type24;
|
|
13196
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13197
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13198
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13199
|
+
gutter: 8
|
|
13200
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13201
|
+
className: "gutter-row",
|
|
13202
|
+
span: 6
|
|
13203
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13204
|
+
style: {
|
|
13205
|
+
marginBottom: '8px'
|
|
13206
|
+
},
|
|
13207
|
+
disabled: disabled,
|
|
13208
|
+
allowClear: false,
|
|
13209
|
+
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)],
|
|
13210
|
+
onChange: function onChange(val) {
|
|
13211
|
+
return changeSystemOrderHandle(val);
|
|
13212
|
+
}
|
|
13213
|
+
}, ((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) {
|
|
13214
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
13215
|
+
key: item.billNo,
|
|
13216
|
+
value: item.billNo,
|
|
13217
|
+
label: item.billNo
|
|
13218
|
+
}, item.billNo);
|
|
13219
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13220
|
+
className: "gutter-row",
|
|
13221
|
+
span: 6
|
|
13222
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13223
|
+
style: {
|
|
13224
|
+
marginBottom: '8px'
|
|
13225
|
+
},
|
|
13226
|
+
disabled: disabled,
|
|
13227
|
+
allowClear: false,
|
|
13228
|
+
options: reasonList,
|
|
13229
|
+
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)],
|
|
13230
|
+
onChange: function onChange(val) {
|
|
13231
|
+
return changeTypeHandle(val);
|
|
13232
|
+
}
|
|
13233
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13234
|
+
key: 'reissueGoods'
|
|
13235
|
+
}, other), {}, {
|
|
13236
|
+
type: type,
|
|
13237
|
+
disabled: disabled,
|
|
13238
|
+
canUpdateNumber: showChangeBtn,
|
|
13239
|
+
showChangeBtn: showChangeBtn,
|
|
13240
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13241
|
+
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)],
|
|
13242
|
+
onChange: function onChange(val) {
|
|
13243
|
+
return changeGoodHandle(val);
|
|
13244
|
+
}
|
|
13245
|
+
})));
|
|
13246
|
+
};
|
|
13247
|
+
|
|
12961
13248
|
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
13249
|
styleInject(css_248z$a);
|
|
12963
13250
|
|
|
@@ -13434,12 +13721,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13434
13721
|
};
|
|
13435
13722
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
13436
13723
|
|
|
13437
|
-
var _excluded$
|
|
13724
|
+
var _excluded$h = ["onChange", "value", "failValue"];
|
|
13438
13725
|
function CommonStatus(props) {
|
|
13439
13726
|
var onChange = props.onChange,
|
|
13440
13727
|
value = props.value,
|
|
13441
13728
|
failValue = props.failValue,
|
|
13442
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13729
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13443
13730
|
var changeHandle = function changeHandle(val) {
|
|
13444
13731
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13445
13732
|
status: val,
|
|
@@ -13558,7 +13845,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13558
13845
|
})) : null) : null);
|
|
13559
13846
|
};
|
|
13560
13847
|
|
|
13561
|
-
var _excluded$
|
|
13848
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13562
13849
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13563
13850
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13564
13851
|
var _props$value = props.value,
|
|
@@ -13568,7 +13855,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13568
13855
|
failValue = props.failValue,
|
|
13569
13856
|
_props$type = props.type,
|
|
13570
13857
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13571
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13858
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13572
13859
|
var _useState = React.useState(0),
|
|
13573
13860
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13574
13861
|
changeIndex = _useState2[0],
|
|
@@ -13634,7 +13921,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13634
13921
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13635
13922
|
};
|
|
13636
13923
|
|
|
13637
|
-
var _excluded$
|
|
13924
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13638
13925
|
var msgTypeCh = {
|
|
13639
13926
|
ding: '钉钉',
|
|
13640
13927
|
wechat: '微信',
|
|
@@ -13650,7 +13937,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13650
13937
|
failValue = props.failValue,
|
|
13651
13938
|
_props$type = props.type,
|
|
13652
13939
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13653
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13940
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
13654
13941
|
var _useState = React.useState(0),
|
|
13655
13942
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13656
13943
|
changeIndex = _useState2[0],
|
|
@@ -13773,4 +14060,6 @@ exports.Supplier = Supplier;
|
|
|
13773
14060
|
exports.TBGoodId = TBGoodId;
|
|
13774
14061
|
exports.TBGoodSerial = TBGoodSerial;
|
|
13775
14062
|
exports.TradeId = TradeId;
|
|
14063
|
+
exports.WdtGoodList = WdtGoodList;
|
|
14064
|
+
exports.WdtReissue = wdtReissue;
|
|
13776
14065
|
exports.WlnGoods = WlnGoods;
|