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