@kmkf-fe-packages/basic-components 0.27.1-test.3 → 0.27.1-test.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +464 -236
- package/dist/index.js +464 -234
- package/dist/src/bs/component/model/WdtGoodList.d.ts +40 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/wdt/Reissue/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10428,12 +10428,23 @@ var jstGoods = function jstGoods(props) {
|
|
|
10428
10428
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10429
10429
|
changeIndex = _useState2[0],
|
|
10430
10430
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10431
|
+
var _useState3 = React.useState([]),
|
|
10432
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
10433
|
+
wdtSendOptions = _useState4[0],
|
|
10434
|
+
setSendOptions = _useState4[1];
|
|
10431
10435
|
React.useEffect(function () {
|
|
10432
10436
|
//没有值塞个默认值
|
|
10433
10437
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10434
10438
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10435
10439
|
}
|
|
10436
10440
|
}, [value, type]);
|
|
10441
|
+
React.useEffect(function () {
|
|
10442
|
+
if (type === 3 && componentType === 'WDT_SEND_GOOD' && ['sendName', 'all'].includes(showField)) {
|
|
10443
|
+
kmkfUtils.WDT.getWarehouseDataAsync().then(setSendOptions).catch(function (e) {
|
|
10444
|
+
antd.message.error((e === null || e === void 0 ? void 0 : e.message) || '获取发货仓数据失败,请刷新重试');
|
|
10445
|
+
});
|
|
10446
|
+
}
|
|
10447
|
+
}, []);
|
|
10437
10448
|
var content = function content(item, index) {
|
|
10438
10449
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10439
10450
|
style: {
|
|
@@ -10455,14 +10466,11 @@ var jstGoods = function jstGoods(props) {
|
|
|
10455
10466
|
}));
|
|
10456
10467
|
};
|
|
10457
10468
|
var handleSelected = function handleSelected(val, type, option) {
|
|
10458
|
-
console.log('[ val ] >', val);
|
|
10459
|
-
console.log('[ option ] >', option);
|
|
10460
10469
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10461
10470
|
changeOrderInfo[type] = val;
|
|
10462
10471
|
changeOrderInfo['sendId'] = option.warehouseNo;
|
|
10463
10472
|
var newList = _toConsumableArray(value);
|
|
10464
10473
|
newList[changeIndex] = changeOrderInfo;
|
|
10465
|
-
console.log('[ newList ] >', newList);
|
|
10466
10474
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10467
10475
|
};
|
|
10468
10476
|
var filterOption = function filterOption(input, option) {
|
|
@@ -10472,7 +10480,6 @@ var jstGoods = function jstGoods(props) {
|
|
|
10472
10480
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10473
10481
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10474
10482
|
changeOrderInfo[type] = val;
|
|
10475
|
-
changeOrderInfo['sendId'] = val;
|
|
10476
10483
|
var newList = _toConsumableArray(value);
|
|
10477
10484
|
newList[changeIndex] = changeOrderInfo;
|
|
10478
10485
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -10482,19 +10489,6 @@ var jstGoods = function jstGoods(props) {
|
|
|
10482
10489
|
var _value$, _value$$items;
|
|
10483
10490
|
return value && value.length === 1 && !((_value$ = value[0]) === null || _value$ === void 0 ? void 0 : (_value$$items = _value$.items) === null || _value$$items === void 0 ? void 0 : _value$$items.length);
|
|
10484
10491
|
}, [value]);
|
|
10485
|
-
var wdtOptions = [{
|
|
10486
|
-
label: '测测你',
|
|
10487
|
-
value: '1',
|
|
10488
|
-
warehouseNo: 111111
|
|
10489
|
-
}, {
|
|
10490
|
-
label: 'ceshi',
|
|
10491
|
-
value: '2222',
|
|
10492
|
-
warehouseNo: 1111112222
|
|
10493
|
-
}, {
|
|
10494
|
-
label: 'hhhhhh',
|
|
10495
|
-
value: '13333',
|
|
10496
|
-
warehouseNo: 1111113333
|
|
10497
|
-
}];
|
|
10498
10492
|
return /*#__PURE__*/React__default['default'].createElement("div", null, !isSingle ? /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
10499
10493
|
wrap: true
|
|
10500
10494
|
}, (value || []).map(function (item, index) {
|
|
@@ -10561,7 +10555,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10561
10555
|
disabled: disabled,
|
|
10562
10556
|
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10563
10557
|
showSearch: true,
|
|
10564
|
-
options:
|
|
10558
|
+
options: wdtSendOptions,
|
|
10565
10559
|
filterOption: filterOption,
|
|
10566
10560
|
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10567
10561
|
onChange: function onChange(value, option) {
|
|
@@ -11147,6 +11141,12 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11147
11141
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11148
11142
|
|
|
11149
11143
|
var RangePicker = antd.DatePicker.RangePicker;
|
|
11144
|
+
var getWdtListProduct = function getWdtListProduct(data) {
|
|
11145
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11146
|
+
method: 'post',
|
|
11147
|
+
data: data
|
|
11148
|
+
});
|
|
11149
|
+
};
|
|
11150
11150
|
var columns$1 = [{
|
|
11151
11151
|
dataIndex: 'index',
|
|
11152
11152
|
title: 'NO',
|
|
@@ -11221,226 +11221,174 @@ var expandedColumns = [{
|
|
|
11221
11221
|
title: '会员价',
|
|
11222
11222
|
width: 140
|
|
11223
11223
|
}];
|
|
11224
|
-
var
|
|
11225
|
-
var
|
|
11226
|
-
var
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
setVisible(true);
|
|
11232
|
-
setPageNo(1);
|
|
11233
|
-
setSelect([]);
|
|
11234
|
-
setSelectIds([]);
|
|
11235
|
-
form.setFieldsValue({
|
|
11236
|
-
dateTimePicker: [initStartTime, initEndTime],
|
|
11237
|
-
code: ''
|
|
11238
|
-
});
|
|
11239
|
-
// getShopList();
|
|
11240
|
-
}
|
|
11241
|
-
};
|
|
11242
|
-
});
|
|
11243
|
-
|
|
11244
|
-
var onSubmit = props.onSubmit,
|
|
11245
|
-
shopId = props.shopId,
|
|
11246
|
-
shopList = props.shopList,
|
|
11247
|
-
width = props.width,
|
|
11248
|
-
companyKey = props.companyKey;
|
|
11249
|
-
var _useState = React.useState(false),
|
|
11224
|
+
var getInitTime = function getInitTime() {
|
|
11225
|
+
var initStartTime = hooks().subtract(30, 'd').hours(0).minutes(0).seconds(0);
|
|
11226
|
+
var initEndTime = hooks().hours(23).minutes(59).seconds(59);
|
|
11227
|
+
return [initStartTime, initEndTime];
|
|
11228
|
+
};
|
|
11229
|
+
var GoodList = function GoodList(props, ref) {
|
|
11230
|
+
var _useState = React.useState([]),
|
|
11250
11231
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
var _useState3 = React.useState(
|
|
11232
|
+
selectList = _useState2[0],
|
|
11233
|
+
setSelect = _useState2[1];
|
|
11234
|
+
var _useState3 = React.useState(1),
|
|
11254
11235
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
var _useState5 = React.useState(
|
|
11258
|
-
_useState6 = _slicedToArray(_useState5,
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
var _useState7 = React.useState(1),
|
|
11236
|
+
pageNo = _useState4[0],
|
|
11237
|
+
setPageNo = _useState4[1];
|
|
11238
|
+
var _useState5 = React.useState(10),
|
|
11239
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
11240
|
+
pageSize = _useState6[0];
|
|
11241
|
+
var _useState7 = React.useState([]),
|
|
11262
11242
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
var _useState9 = React.useState(
|
|
11266
|
-
_useState10 = _slicedToArray(_useState9,
|
|
11267
|
-
|
|
11268
|
-
|
|
11243
|
+
goodList = _useState8[0],
|
|
11244
|
+
setGoodList = _useState8[1];
|
|
11245
|
+
var _useState9 = React.useState(false),
|
|
11246
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11247
|
+
loading = _useState10[0],
|
|
11248
|
+
setLoading = _useState10[1];
|
|
11249
|
+
var _useState11 = React.useState(0),
|
|
11269
11250
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
var _useState13 = React.useState(
|
|
11251
|
+
total = _useState12[0],
|
|
11252
|
+
setTotal = _useState12[1];
|
|
11253
|
+
var _useState13 = React.useState(null),
|
|
11273
11254
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11255
|
+
dates = _useState14[0],
|
|
11256
|
+
setDates = _useState14[1];
|
|
11257
|
+
React.useImperativeHandle(ref, function () {
|
|
11258
|
+
return {
|
|
11259
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
11260
|
+
return selectList;
|
|
11261
|
+
}
|
|
11262
|
+
};
|
|
11263
|
+
});
|
|
11280
11264
|
var displaySelectList = React.useMemo(function () {
|
|
11281
11265
|
return selectList.map(function (item, i) {
|
|
11282
11266
|
item.index = i + 1;
|
|
11283
11267
|
return item;
|
|
11284
11268
|
});
|
|
11285
11269
|
}, [selectList]);
|
|
11286
|
-
React.useEffect(function () {
|
|
11287
|
-
if (visible) {
|
|
11288
|
-
queryItems();
|
|
11289
|
-
}
|
|
11290
|
-
}, [pageNo, visible]);
|
|
11291
11270
|
var _Form$useForm = antd.Form.useForm(),
|
|
11292
11271
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11293
11272
|
form = _Form$useForm2[0];
|
|
11294
|
-
//选择页码
|
|
11295
|
-
var pageChange = function pageChange(page) {
|
|
11296
|
-
setPageNo(page);
|
|
11297
|
-
};
|
|
11298
11273
|
/**
|
|
11299
11274
|
* 查询商品
|
|
11300
11275
|
*/
|
|
11301
11276
|
var queryItems = /*#__PURE__*/function () {
|
|
11302
11277
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11303
|
-
var
|
|
11304
|
-
_formData$dateTimePic,
|
|
11305
|
-
_formData$dateTimePic2,
|
|
11306
|
-
_formData$dateTimePic3,
|
|
11307
|
-
_formData$dateTimePic4,
|
|
11308
|
-
_formData$dateTimePic5,
|
|
11309
|
-
_formData$dateTimePic6,
|
|
11310
|
-
formData,
|
|
11311
|
-
startTime,
|
|
11312
|
-
endTime,
|
|
11313
|
-
params,
|
|
11314
|
-
res,
|
|
11315
|
-
_res$data,
|
|
11316
|
-
_res$data$productList,
|
|
11317
|
-
productList,
|
|
11318
|
-
_res$data$total,
|
|
11319
|
-
_total,
|
|
11320
|
-
errorMsg,
|
|
11321
|
-
newProducts,
|
|
11322
|
-
_args = arguments;
|
|
11278
|
+
var _formData$dateTimePic, _formData$dateTimePic2, _formData$dateTimePic3, _formData$dateTimePic4, _formData$dateTimePic5, _formData$dateTimePic6, formData, _getInitTime, _getInitTime2, start, end, startTime, endTime, newTime, earliest, params;
|
|
11323
11279
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11324
11280
|
while (1) switch (_context.prev = _context.next) {
|
|
11325
11281
|
case 0:
|
|
11326
|
-
|
|
11327
|
-
_context.prev = 1;
|
|
11282
|
+
_context.prev = 0;
|
|
11328
11283
|
setLoading(true);
|
|
11329
11284
|
formData = form.getFieldsValue();
|
|
11330
|
-
|
|
11331
|
-
|
|
11285
|
+
_getInitTime = getInitTime(), _getInitTime2 = _slicedToArray(_getInitTime, 2), start = _getInitTime2[0], end = _getInitTime2[1];
|
|
11286
|
+
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');
|
|
11287
|
+
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');
|
|
11288
|
+
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11289
|
+
// PS: 故意推前3分钟,不然极端情况下,接口会报错
|
|
11290
|
+
newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
|
|
11291
|
+
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11292
|
+
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11293
|
+
}
|
|
11294
|
+
// 30天内
|
|
11295
|
+
earliest = hooks(endTime).subtract(30, 'd');
|
|
11296
|
+
if (earliest.diff(hooks(startTime), 'seconds') > 0) {
|
|
11297
|
+
startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
|
|
11298
|
+
}
|
|
11332
11299
|
params = {
|
|
11333
|
-
// shopCode: shopCode,
|
|
11334
11300
|
pageSize: pageSize,
|
|
11335
11301
|
pageNo: pageNo - 1,
|
|
11336
|
-
goodNo:
|
|
11302
|
+
goodNo: formData.goodNo || null,
|
|
11303
|
+
specNo: formData.specNo || null,
|
|
11337
11304
|
startTime: startTime,
|
|
11338
11305
|
endTime: endTime
|
|
11339
11306
|
};
|
|
11340
|
-
_context.next =
|
|
11341
|
-
return
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11307
|
+
_context.next = 14;
|
|
11308
|
+
return getWdtListProduct(params).then(function (res) {
|
|
11309
|
+
if (res.success) {
|
|
11310
|
+
var _res$data = res.data,
|
|
11311
|
+
_res$data$productList = _res$data.productList,
|
|
11312
|
+
productList = _res$data$productList === void 0 ? [] : _res$data$productList,
|
|
11313
|
+
_res$data$total = _res$data.total,
|
|
11314
|
+
_total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
11315
|
+
var newProducts = productList.map(function (item, index) {
|
|
11316
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11317
|
+
index: index + 1
|
|
11318
|
+
});
|
|
11352
11319
|
});
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11320
|
+
setGoodList(newProducts);
|
|
11321
|
+
if (pageNo === 1) {
|
|
11322
|
+
setTotal(_total);
|
|
11323
|
+
}
|
|
11324
|
+
} else {
|
|
11325
|
+
var _res$data2;
|
|
11326
|
+
setGoodList([]);
|
|
11327
|
+
setTotal(0);
|
|
11328
|
+
antd.message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
|
|
11357
11329
|
}
|
|
11358
|
-
}
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
case 12:
|
|
11364
|
-
_context.prev = 12;
|
|
11330
|
+
}).catch(function (e) {
|
|
11331
|
+
console.log(e);
|
|
11332
|
+
});
|
|
11333
|
+
case 14:
|
|
11334
|
+
_context.prev = 14;
|
|
11365
11335
|
setLoading(false);
|
|
11366
|
-
return _context.finish(
|
|
11367
|
-
case
|
|
11336
|
+
return _context.finish(14);
|
|
11337
|
+
case 17:
|
|
11368
11338
|
case "end":
|
|
11369
11339
|
return _context.stop();
|
|
11370
11340
|
}
|
|
11371
|
-
}, _callee, null, [[
|
|
11341
|
+
}, _callee, null, [[0,, 14, 17]]);
|
|
11372
11342
|
}));
|
|
11373
11343
|
return function queryItems() {
|
|
11374
11344
|
return _ref.apply(this, arguments);
|
|
11375
11345
|
};
|
|
11376
11346
|
}();
|
|
11377
|
-
var
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11347
|
+
var disabledDate = function disabledDate(current) {
|
|
11348
|
+
var today = hooks(hooks().format('YYYY-MM-DD'));
|
|
11349
|
+
var currentDay = hooks(current.format('YYYY-MM-DD'));
|
|
11350
|
+
if (currentDay.diff(today, 'days') > 0) {
|
|
11351
|
+
return true;
|
|
11352
|
+
}
|
|
11353
|
+
if (!dates) {
|
|
11354
|
+
return false;
|
|
11355
|
+
}
|
|
11356
|
+
var tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
|
|
11357
|
+
var tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
|
|
11358
|
+
return !!tooEarly || !!tooLate;
|
|
11359
|
+
};
|
|
11360
|
+
var onOpenChange = function onOpenChange(open) {
|
|
11361
|
+
if (open) {
|
|
11362
|
+
setDates([null, null]);
|
|
11363
|
+
} else {
|
|
11364
|
+
setDates(null);
|
|
11365
|
+
}
|
|
11389
11366
|
};
|
|
11390
11367
|
var onReset = function onReset() {
|
|
11391
|
-
form.resetFields();
|
|
11392
11368
|
form.setFieldsValue({
|
|
11393
|
-
dateTimePicker:
|
|
11394
|
-
|
|
11369
|
+
dateTimePicker: getInitTime(),
|
|
11370
|
+
goodNo: '',
|
|
11371
|
+
specNo: ''
|
|
11395
11372
|
});
|
|
11396
11373
|
setPageNo(function (prev) {
|
|
11397
|
-
if (prev === 1
|
|
11374
|
+
if (prev === 1) {
|
|
11398
11375
|
queryItems();
|
|
11399
11376
|
}
|
|
11400
11377
|
return 1;
|
|
11401
11378
|
});
|
|
11402
11379
|
};
|
|
11403
|
-
|
|
11404
|
-
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11405
|
-
// method: 'get',
|
|
11406
|
-
// params: {
|
|
11407
|
-
// key: 'company-third-shop-info',
|
|
11408
|
-
// },
|
|
11409
|
-
// });
|
|
11410
|
-
// const obj: any = JSON.parse(data || '{}');
|
|
11411
|
-
// if (success) {
|
|
11412
|
-
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11413
|
-
// return {
|
|
11414
|
-
// label: item.shopName,
|
|
11415
|
-
// value: item.shopCode,
|
|
11416
|
-
// };
|
|
11417
|
-
// });
|
|
11418
|
-
// setShopList(list);
|
|
11419
|
-
// }
|
|
11420
|
-
// };
|
|
11421
|
-
var onValuesChange = function onValuesChange(changedValues) {
|
|
11422
|
-
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11423
|
-
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11424
|
-
pubsub__default['default'].publish('changeShopCode', {
|
|
11425
|
-
shopCode: changedValues.shopId
|
|
11426
|
-
});
|
|
11427
|
-
}
|
|
11428
|
-
};
|
|
11429
|
-
var handleDelete = function handleDelete(record, index) {
|
|
11380
|
+
var handleDelete = function handleDelete(record) {
|
|
11430
11381
|
var newSelectList = selectList.filter(function (item) {
|
|
11431
11382
|
return item.specId !== record.specId;
|
|
11432
11383
|
});
|
|
11433
11384
|
setSelect(_toConsumableArray(newSelectList));
|
|
11434
|
-
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11435
|
-
return item.specId;
|
|
11436
|
-
})));
|
|
11437
11385
|
};
|
|
11438
11386
|
var displaySelectedColumns = [{
|
|
11439
11387
|
dataIndex: 'operation',
|
|
11440
11388
|
title: '',
|
|
11441
11389
|
ellipsis: true,
|
|
11442
11390
|
width: 50,
|
|
11443
|
-
render: function render(_, record
|
|
11391
|
+
render: function render(_, record) {
|
|
11444
11392
|
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11445
11393
|
onClick: function onClick() {
|
|
11446
11394
|
return handleDelete(record);
|
|
@@ -11471,8 +11419,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11471
11419
|
}];
|
|
11472
11420
|
var expandedRowSelection = {
|
|
11473
11421
|
fixed: true,
|
|
11474
|
-
selectedRowKeys:
|
|
11475
|
-
|
|
11422
|
+
selectedRowKeys: selectList.map(function (item) {
|
|
11423
|
+
return item.specId;
|
|
11424
|
+
}),
|
|
11425
|
+
onSelect: function onSelect(record, selected) {
|
|
11476
11426
|
var tempList = [];
|
|
11477
11427
|
if (selected) {
|
|
11478
11428
|
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
@@ -11482,9 +11432,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11482
11432
|
});
|
|
11483
11433
|
}
|
|
11484
11434
|
setSelect(_toConsumableArray(tempList));
|
|
11485
|
-
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11486
|
-
return item.specId;
|
|
11487
|
-
})));
|
|
11488
11435
|
},
|
|
11489
11436
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11490
11437
|
var tempAllList = [];
|
|
@@ -11498,15 +11445,12 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11498
11445
|
});
|
|
11499
11446
|
}
|
|
11500
11447
|
setSelect(_toConsumableArray(tempAllList));
|
|
11501
|
-
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11502
|
-
return item.specId;
|
|
11503
|
-
})));
|
|
11504
11448
|
}
|
|
11505
11449
|
};
|
|
11506
|
-
var expandedRowRender = function expandedRowRender(record
|
|
11450
|
+
var expandedRowRender = function expandedRowRender(record) {
|
|
11507
11451
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11508
|
-
rowKey:
|
|
11509
|
-
size:
|
|
11452
|
+
rowKey: "specId",
|
|
11453
|
+
size: "small",
|
|
11510
11454
|
columns: expandedColumns,
|
|
11511
11455
|
dataSource: record.itemDetailList || [],
|
|
11512
11456
|
pagination: false,
|
|
@@ -11516,43 +11460,61 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11516
11460
|
}
|
|
11517
11461
|
});
|
|
11518
11462
|
};
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
visible: visible,
|
|
11524
|
-
width: width || 850,
|
|
11525
|
-
onCancel: function onCancel() {
|
|
11526
|
-
_onCancel();
|
|
11527
|
-
},
|
|
11528
|
-
onOk: onOk,
|
|
11529
|
-
wrapClassName: "goodModal"
|
|
11530
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11463
|
+
React__default['default'].useEffect(function () {
|
|
11464
|
+
queryItems();
|
|
11465
|
+
}, []);
|
|
11466
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11531
11467
|
layout: "inline",
|
|
11532
11468
|
form: form,
|
|
11533
|
-
onFinish:
|
|
11534
|
-
onValuesChange: onValuesChange,
|
|
11469
|
+
onFinish: queryItems,
|
|
11535
11470
|
initialValues: {
|
|
11536
|
-
|
|
11471
|
+
goodNo: '',
|
|
11472
|
+
specNo: '',
|
|
11473
|
+
dateTimePicker: getInitTime()
|
|
11537
11474
|
}
|
|
11538
11475
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11539
|
-
name: "dateTimePicker"
|
|
11476
|
+
name: "dateTimePicker",
|
|
11477
|
+
style: {
|
|
11478
|
+
marginBottom: '12px'
|
|
11479
|
+
}
|
|
11540
11480
|
}, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
11541
11481
|
style: {
|
|
11542
|
-
width: '
|
|
11482
|
+
width: '240px'
|
|
11543
11483
|
},
|
|
11544
11484
|
placeholder: ['开始日期', '结束日期'],
|
|
11545
|
-
showTime:
|
|
11546
|
-
|
|
11485
|
+
showTime: false,
|
|
11486
|
+
disabledDate: disabledDate,
|
|
11487
|
+
onCalendarChange: function onCalendarChange(val) {
|
|
11488
|
+
return setDates(val);
|
|
11489
|
+
},
|
|
11490
|
+
onOpenChange: onOpenChange
|
|
11547
11491
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11548
|
-
name: "
|
|
11492
|
+
name: "goodNo",
|
|
11493
|
+
style: {
|
|
11494
|
+
marginBottom: '12px'
|
|
11495
|
+
}
|
|
11549
11496
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11550
11497
|
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11551
11498
|
allowClear: true,
|
|
11552
11499
|
style: {
|
|
11553
11500
|
width: 150
|
|
11554
11501
|
}
|
|
11555
|
-
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item,
|
|
11502
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11503
|
+
name: "specNo",
|
|
11504
|
+
style: {
|
|
11505
|
+
marginBottom: '12px'
|
|
11506
|
+
}
|
|
11507
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11508
|
+
placeholder: "\u5546\u54C1SKU\u7F16\u7801",
|
|
11509
|
+
allowClear: true,
|
|
11510
|
+
style: {
|
|
11511
|
+
width: 150
|
|
11512
|
+
}
|
|
11513
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11514
|
+
style: {
|
|
11515
|
+
marginBottom: '12px'
|
|
11516
|
+
}
|
|
11517
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11556
11518
|
type: "primary",
|
|
11557
11519
|
htmlType: "submit",
|
|
11558
11520
|
style: {
|
|
@@ -11562,10 +11524,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11562
11524
|
onClick: onReset
|
|
11563
11525
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11564
11526
|
style: {
|
|
11565
|
-
marginTop: '
|
|
11527
|
+
marginTop: '4px'
|
|
11566
11528
|
}
|
|
11567
11529
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11568
|
-
rowKey:
|
|
11530
|
+
rowKey: "goodNo",
|
|
11569
11531
|
columns: columns$1,
|
|
11570
11532
|
dataSource: goodList,
|
|
11571
11533
|
loading: loading,
|
|
@@ -11582,14 +11544,14 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11582
11544
|
current: pageNo,
|
|
11583
11545
|
pageSize: pageSize,
|
|
11584
11546
|
pageSizeOptions: [],
|
|
11585
|
-
onChange:
|
|
11547
|
+
onChange: setPageNo
|
|
11586
11548
|
}
|
|
11587
11549
|
})), !!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", {
|
|
11588
11550
|
style: {
|
|
11589
11551
|
marginTop: '16px'
|
|
11590
11552
|
}
|
|
11591
11553
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11592
|
-
rowKey:
|
|
11554
|
+
rowKey: "specId",
|
|
11593
11555
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11594
11556
|
dataSource: displaySelectList,
|
|
11595
11557
|
pagination: false,
|
|
@@ -11600,7 +11562,48 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11600
11562
|
style: {
|
|
11601
11563
|
width: '100%'
|
|
11602
11564
|
}
|
|
11603
|
-
}))))
|
|
11565
|
+
}))));
|
|
11566
|
+
};
|
|
11567
|
+
var WdtGoodList = /*#__PURE__*/React.forwardRef(GoodList);
|
|
11568
|
+
|
|
11569
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11570
|
+
React.useImperativeHandle(ref, function () {
|
|
11571
|
+
return {
|
|
11572
|
+
open: function open() {
|
|
11573
|
+
setVisible(true);
|
|
11574
|
+
}
|
|
11575
|
+
};
|
|
11576
|
+
});
|
|
11577
|
+
var onSubmit = props.onSubmit,
|
|
11578
|
+
width = props.width;
|
|
11579
|
+
var _useState = React.useState(false),
|
|
11580
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11581
|
+
visible = _useState2[0],
|
|
11582
|
+
setVisible = _useState2[1];
|
|
11583
|
+
var wdtGoodListRef = React.useRef(null);
|
|
11584
|
+
var _onCancel = function onCancel() {
|
|
11585
|
+
setVisible(false);
|
|
11586
|
+
};
|
|
11587
|
+
var onOk = function onOk() {
|
|
11588
|
+
var _wdtGoodListRef$curre;
|
|
11589
|
+
var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
|
|
11590
|
+
onSubmit(selectedList);
|
|
11591
|
+
_onCancel();
|
|
11592
|
+
};
|
|
11593
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
11594
|
+
title: '选择商品',
|
|
11595
|
+
okText: '确认',
|
|
11596
|
+
cancelText: '取消',
|
|
11597
|
+
visible: visible,
|
|
11598
|
+
width: width || 850,
|
|
11599
|
+
onCancel: function onCancel() {
|
|
11600
|
+
_onCancel();
|
|
11601
|
+
},
|
|
11602
|
+
onOk: onOk,
|
|
11603
|
+
wrapClassName: "goodModal"
|
|
11604
|
+
}, /*#__PURE__*/React__default['default'].createElement(WdtGoodList, {
|
|
11605
|
+
ref: wdtGoodListRef
|
|
11606
|
+
})));
|
|
11604
11607
|
};
|
|
11605
11608
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
11606
11609
|
|
|
@@ -12387,20 +12390,6 @@ var typeMap = {
|
|
|
12387
12390
|
money: 'money',
|
|
12388
12391
|
share: 'share'
|
|
12389
12392
|
}
|
|
12390
|
-
},
|
|
12391
|
-
WDT_REISSUE_GOODS: {
|
|
12392
|
-
key: 'wdtReissueGoods',
|
|
12393
|
-
name: '旺店通',
|
|
12394
|
-
typeName: 'wdtReissueType',
|
|
12395
|
-
reissueSelectList: 'wdtReissueSelectList',
|
|
12396
|
-
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
12397
|
-
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
12398
|
-
changeShopCode: 'wdtChangeShopCode',
|
|
12399
|
-
reissueType: 'wdtReissueType',
|
|
12400
|
-
formatDefaultField: {
|
|
12401
|
-
money: 'orderPrice',
|
|
12402
|
-
share: 'sharePrice'
|
|
12403
|
-
}
|
|
12404
12393
|
}
|
|
12405
12394
|
};
|
|
12406
12395
|
var BsReissue = function BsReissue(props) {
|
|
@@ -13003,6 +12992,245 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13003
12992
|
}));
|
|
13004
12993
|
};
|
|
13005
12994
|
|
|
12995
|
+
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
12996
|
+
var typeMap$1 = {
|
|
12997
|
+
WDT_REISSUE_GOODS: {
|
|
12998
|
+
key: 'wdtReissueGoods',
|
|
12999
|
+
name: '旺店通',
|
|
13000
|
+
typeName: 'wdtReissueType',
|
|
13001
|
+
wdtSystemOrder: 'wdtSystemOrder',
|
|
13002
|
+
wdtSystemOrderNo: 'wdtSystemOrderNo',
|
|
13003
|
+
reissueSelectList: 'wdtReissueSelectList',
|
|
13004
|
+
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
13005
|
+
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
13006
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13007
|
+
reissueType: 'wdtReissueType',
|
|
13008
|
+
formatDefaultField: {
|
|
13009
|
+
money: 'orderPrice',
|
|
13010
|
+
share: 'sharePrice'
|
|
13011
|
+
}
|
|
13012
|
+
}
|
|
13013
|
+
};
|
|
13014
|
+
var wdtReissue = function wdtReissue(props) {
|
|
13015
|
+
var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
13016
|
+
var value = props.value,
|
|
13017
|
+
onChange = props.onChange,
|
|
13018
|
+
_props$reasonList = props.reasonList,
|
|
13019
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13020
|
+
disabled = props.disabled,
|
|
13021
|
+
type = props.type,
|
|
13022
|
+
other = _objectWithoutProperties(props, _excluded$g);
|
|
13023
|
+
var valueRef = React.useRef({});
|
|
13024
|
+
React.useEffect(function () {
|
|
13025
|
+
var _typeMap$type, _typeMap$type4;
|
|
13026
|
+
valueRef.current = value;
|
|
13027
|
+
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) {
|
|
13028
|
+
if (disabled) return;
|
|
13029
|
+
if (value) {
|
|
13030
|
+
var _typeMap$type2, _typeMap$type3;
|
|
13031
|
+
var newValue = _objectSpread2({}, value);
|
|
13032
|
+
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) {
|
|
13033
|
+
return item.sku !== data;
|
|
13034
|
+
});
|
|
13035
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13036
|
+
}
|
|
13037
|
+
});
|
|
13038
|
+
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) {
|
|
13039
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13040
|
+
shopCode: data.shopCode
|
|
13041
|
+
}));
|
|
13042
|
+
});
|
|
13043
|
+
}, [value, disabled]);
|
|
13044
|
+
React.useEffect(function () {
|
|
13045
|
+
var _value$orders, _value$showOrderInfo;
|
|
13046
|
+
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)) {
|
|
13047
|
+
if (type === 'WDT_SYSTEM_ORDER') {
|
|
13048
|
+
getWdtOrderList(value.orderNo);
|
|
13049
|
+
}
|
|
13050
|
+
}
|
|
13051
|
+
return;
|
|
13052
|
+
}, [value]);
|
|
13053
|
+
React.useEffect(function () {
|
|
13054
|
+
var _typeMap$type5;
|
|
13055
|
+
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];
|
|
13056
|
+
if (wdtSystemOrderNo) {
|
|
13057
|
+
var _value$typeMap$type$t, _typeMap$type6;
|
|
13058
|
+
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])) {
|
|
13059
|
+
getGoodItems(wdtSystemOrderNo);
|
|
13060
|
+
}
|
|
13061
|
+
}
|
|
13062
|
+
return;
|
|
13063
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
|
|
13064
|
+
React.useEffect(function () {
|
|
13065
|
+
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
13066
|
+
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];
|
|
13067
|
+
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];
|
|
13068
|
+
if (['1'].includes(typeName)) {
|
|
13069
|
+
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
13070
|
+
} else if (['2'].includes(typeName)) {
|
|
13071
|
+
var _typeMap$type10;
|
|
13072
|
+
var newValue = _objectSpread2({}, value);
|
|
13073
|
+
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)] = [];
|
|
13074
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13075
|
+
}
|
|
13076
|
+
return;
|
|
13077
|
+
}, [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]]);
|
|
13078
|
+
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
13079
|
+
var _value$typeMap$type$w, _typeMap$type12, _ref;
|
|
13080
|
+
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;
|
|
13081
|
+
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
13082
|
+
return orderItem.billNo === wdtSystemOrderNo;
|
|
13083
|
+
});
|
|
13084
|
+
if (order) {
|
|
13085
|
+
var _typeMap$type13, _order$goodDetails;
|
|
13086
|
+
var newValue = _objectSpread2({}, value);
|
|
13087
|
+
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) {
|
|
13088
|
+
var _typeMap$type14, _typeMap$type15;
|
|
13089
|
+
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;
|
|
13090
|
+
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;
|
|
13091
|
+
item.canUpdateNumber = true;
|
|
13092
|
+
return item;
|
|
13093
|
+
});
|
|
13094
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13095
|
+
}
|
|
13096
|
+
};
|
|
13097
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13098
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
13099
|
+
var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
|
|
13100
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13101
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13102
|
+
case 0:
|
|
13103
|
+
_context.next = 2;
|
|
13104
|
+
return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13105
|
+
method: 'post',
|
|
13106
|
+
data: {
|
|
13107
|
+
billNo: orderNo
|
|
13108
|
+
}
|
|
13109
|
+
});
|
|
13110
|
+
case 2:
|
|
13111
|
+
_yield$request = _context.sent;
|
|
13112
|
+
success = _yield$request.success;
|
|
13113
|
+
data = _yield$request.data;
|
|
13114
|
+
if (success) {
|
|
13115
|
+
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
13116
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13117
|
+
billNo: item.tradeNo,
|
|
13118
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13119
|
+
billTag: item.tagName
|
|
13120
|
+
});
|
|
13121
|
+
});
|
|
13122
|
+
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
13123
|
+
return {
|
|
13124
|
+
billNo: item.tradeNo,
|
|
13125
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13126
|
+
billTag: item.tagName
|
|
13127
|
+
};
|
|
13128
|
+
});
|
|
13129
|
+
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]), {}, {
|
|
13130
|
+
showOrderInfo: showOrderInfo,
|
|
13131
|
+
orders: orders
|
|
13132
|
+
}))));
|
|
13133
|
+
}
|
|
13134
|
+
case 6:
|
|
13135
|
+
case "end":
|
|
13136
|
+
return _context.stop();
|
|
13137
|
+
}
|
|
13138
|
+
}, _callee);
|
|
13139
|
+
}));
|
|
13140
|
+
return function getWdtOrderList(_x) {
|
|
13141
|
+
return _ref2.apply(this, arguments);
|
|
13142
|
+
};
|
|
13143
|
+
}();
|
|
13144
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13145
|
+
var _typeMap$type18, _typeMap$type19;
|
|
13146
|
+
var newValue = _objectSpread2({}, value);
|
|
13147
|
+
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;
|
|
13148
|
+
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)] = [];
|
|
13149
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13150
|
+
valueRef.current = newValue;
|
|
13151
|
+
// if (['2'].includes(val[0])) {
|
|
13152
|
+
// onChange?.(newValue);
|
|
13153
|
+
// valueRef.current = newValue;
|
|
13154
|
+
// }
|
|
13155
|
+
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
13156
|
+
// val: val[0],
|
|
13157
|
+
// goodValue: newValue,
|
|
13158
|
+
// });
|
|
13159
|
+
};
|
|
13160
|
+
|
|
13161
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13162
|
+
var _typeMap$type20;
|
|
13163
|
+
var newValue = _objectSpread2({}, value);
|
|
13164
|
+
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) {
|
|
13165
|
+
var _typeMap$type21, _typeMap$type22;
|
|
13166
|
+
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;
|
|
13167
|
+
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;
|
|
13168
|
+
return item;
|
|
13169
|
+
});
|
|
13170
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13171
|
+
};
|
|
13172
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
13173
|
+
var _typeMap$type23;
|
|
13174
|
+
var newValue = _objectSpread2({}, value);
|
|
13175
|
+
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;
|
|
13176
|
+
console.log('changeSystemOrderHandle', val, newValue);
|
|
13177
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13178
|
+
};
|
|
13179
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13180
|
+
var showChangeBtn = React.useMemo(function () {
|
|
13181
|
+
var _typeMap$type24;
|
|
13182
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
|
|
13183
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
|
|
13184
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13185
|
+
gutter: 8
|
|
13186
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13187
|
+
className: "gutter-row",
|
|
13188
|
+
span: 6
|
|
13189
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13190
|
+
style: {
|
|
13191
|
+
marginBottom: '8px'
|
|
13192
|
+
},
|
|
13193
|
+
disabled: disabled,
|
|
13194
|
+
allowClear: false,
|
|
13195
|
+
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)],
|
|
13196
|
+
onChange: function onChange(val) {
|
|
13197
|
+
return changeSystemOrderHandle(val);
|
|
13198
|
+
}
|
|
13199
|
+
}, ((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) {
|
|
13200
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
13201
|
+
key: item.billNo,
|
|
13202
|
+
value: item.billNo,
|
|
13203
|
+
label: item.billNo
|
|
13204
|
+
}, item.billNo);
|
|
13205
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13206
|
+
className: "gutter-row",
|
|
13207
|
+
span: 6
|
|
13208
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13209
|
+
style: {
|
|
13210
|
+
marginBottom: '8px'
|
|
13211
|
+
},
|
|
13212
|
+
disabled: disabled,
|
|
13213
|
+
allowClear: false,
|
|
13214
|
+
options: reasonList,
|
|
13215
|
+
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)],
|
|
13216
|
+
onChange: function onChange(val) {
|
|
13217
|
+
return changeTypeHandle(val);
|
|
13218
|
+
}
|
|
13219
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13220
|
+
key: 'reissueGoods'
|
|
13221
|
+
}, other), {}, {
|
|
13222
|
+
type: type,
|
|
13223
|
+
disabled: disabled,
|
|
13224
|
+
canUpdateNumber: showChangeBtn,
|
|
13225
|
+
showChangeBtn: showChangeBtn,
|
|
13226
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13227
|
+
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)],
|
|
13228
|
+
onChange: function onChange(val) {
|
|
13229
|
+
return changeGoodHandle(val);
|
|
13230
|
+
}
|
|
13231
|
+
})));
|
|
13232
|
+
};
|
|
13233
|
+
|
|
13006
13234
|
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";
|
|
13007
13235
|
styleInject(css_248z$a);
|
|
13008
13236
|
|
|
@@ -13479,12 +13707,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
13479
13707
|
};
|
|
13480
13708
|
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
13481
13709
|
|
|
13482
|
-
var _excluded$
|
|
13710
|
+
var _excluded$h = ["onChange", "value", "failValue"];
|
|
13483
13711
|
function CommonStatus(props) {
|
|
13484
13712
|
var onChange = props.onChange,
|
|
13485
13713
|
value = props.value,
|
|
13486
13714
|
failValue = props.failValue,
|
|
13487
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13715
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
13488
13716
|
var changeHandle = function changeHandle(val) {
|
|
13489
13717
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
13490
13718
|
status: val,
|
|
@@ -13603,7 +13831,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13603
13831
|
})) : null) : null);
|
|
13604
13832
|
};
|
|
13605
13833
|
|
|
13606
|
-
var _excluded$
|
|
13834
|
+
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13607
13835
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
13608
13836
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
13609
13837
|
var _props$value = props.value,
|
|
@@ -13613,7 +13841,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13613
13841
|
failValue = props.failValue,
|
|
13614
13842
|
_props$type = props.type,
|
|
13615
13843
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13616
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13844
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
13617
13845
|
var _useState = React.useState(0),
|
|
13618
13846
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13619
13847
|
changeIndex = _useState2[0],
|
|
@@ -13679,7 +13907,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13679
13907
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
13680
13908
|
};
|
|
13681
13909
|
|
|
13682
|
-
var _excluded$
|
|
13910
|
+
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
13683
13911
|
var msgTypeCh = {
|
|
13684
13912
|
ding: '钉钉',
|
|
13685
13913
|
wechat: '微信',
|
|
@@ -13695,7 +13923,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
13695
13923
|
failValue = props.failValue,
|
|
13696
13924
|
_props$type = props.type,
|
|
13697
13925
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
13698
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
13926
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
13699
13927
|
var _useState = React.useState(0),
|
|
13700
13928
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13701
13929
|
changeIndex = _useState2[0],
|
|
@@ -13818,4 +14046,6 @@ exports.Supplier = Supplier;
|
|
|
13818
14046
|
exports.TBGoodId = TBGoodId;
|
|
13819
14047
|
exports.TBGoodSerial = TBGoodSerial;
|
|
13820
14048
|
exports.TradeId = TradeId;
|
|
14049
|
+
exports.WdtGoodList = WdtGoodList;
|
|
14050
|
+
exports.WdtReissue = wdtReissue;
|
|
13821
14051
|
exports.WlnGoods = WlnGoods;
|