@kmkf-fe-packages/basic-components 0.27.1-test.0 → 0.27.1-test.3
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 +249 -213
- package/dist/index.js +248 -213
- package/dist/src/index.d.ts +0 -2
- package/dist/src/jst/Goods/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/src/bs/component/model/WdtGoodList.d.ts +0 -40
package/dist/index.esm.js
CHANGED
|
@@ -10402,7 +10402,7 @@ var typeInitValueMap = {
|
|
|
10402
10402
|
}]
|
|
10403
10403
|
};
|
|
10404
10404
|
var jstGoods = function jstGoods(props) {
|
|
10405
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
10405
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
|
|
10406
10406
|
var _props$value = props.value,
|
|
10407
10407
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10408
10408
|
onChange = props.onChange,
|
|
@@ -10410,7 +10410,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10410
10410
|
_props$type = props.type,
|
|
10411
10411
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
10412
10412
|
_props$showField = props.showField,
|
|
10413
|
-
showField = _props$showField === void 0 ? '' : _props$showField
|
|
10413
|
+
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10414
|
+
_props$componentType = props.componentType,
|
|
10415
|
+
componentType = _props$componentType === void 0 ? '' : _props$componentType;
|
|
10414
10416
|
var _useState = useState(0),
|
|
10415
10417
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10416
10418
|
changeIndex = _useState2[0],
|
|
@@ -10441,9 +10443,25 @@ var jstGoods = function jstGoods(props) {
|
|
|
10441
10443
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10442
10444
|
}));
|
|
10443
10445
|
};
|
|
10446
|
+
var handleSelected = function handleSelected(val, type, option) {
|
|
10447
|
+
console.log('[ val ] >', val);
|
|
10448
|
+
console.log('[ option ] >', option);
|
|
10449
|
+
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10450
|
+
changeOrderInfo[type] = val;
|
|
10451
|
+
changeOrderInfo['sendId'] = option.warehouseNo;
|
|
10452
|
+
var newList = _toConsumableArray(value);
|
|
10453
|
+
newList[changeIndex] = changeOrderInfo;
|
|
10454
|
+
console.log('[ newList ] >', newList);
|
|
10455
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
10456
|
+
};
|
|
10457
|
+
var filterOption = function filterOption(input, option) {
|
|
10458
|
+
var _option$label;
|
|
10459
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
|
|
10460
|
+
};
|
|
10444
10461
|
var changeInputHandle = function changeInputHandle(val, type) {
|
|
10445
10462
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10446
10463
|
changeOrderInfo[type] = val;
|
|
10464
|
+
changeOrderInfo['sendId'] = val;
|
|
10447
10465
|
var newList = _toConsumableArray(value);
|
|
10448
10466
|
newList[changeIndex] = changeOrderInfo;
|
|
10449
10467
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -10453,6 +10471,19 @@ var jstGoods = function jstGoods(props) {
|
|
|
10453
10471
|
var _value$, _value$$items;
|
|
10454
10472
|
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);
|
|
10455
10473
|
}, [value]);
|
|
10474
|
+
var wdtOptions = [{
|
|
10475
|
+
label: '测测你',
|
|
10476
|
+
value: '1',
|
|
10477
|
+
warehouseNo: 111111
|
|
10478
|
+
}, {
|
|
10479
|
+
label: 'ceshi',
|
|
10480
|
+
value: '2222',
|
|
10481
|
+
warehouseNo: 1111112222
|
|
10482
|
+
}, {
|
|
10483
|
+
label: 'hhhhhh',
|
|
10484
|
+
value: '13333',
|
|
10485
|
+
warehouseNo: 1111113333
|
|
10486
|
+
}];
|
|
10456
10487
|
return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, {
|
|
10457
10488
|
wrap: true
|
|
10458
10489
|
}, (value || []).map(function (item, index) {
|
|
@@ -10511,20 +10542,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
10511
10542
|
return changeInputHandle(e.target.value, 'sendId');
|
|
10512
10543
|
},
|
|
10513
10544
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
10514
|
-
}), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(
|
|
10545
|
+
}), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React.createElement(Select, {
|
|
10546
|
+
style: {
|
|
10547
|
+
minWidth: '100px',
|
|
10548
|
+
maxWidth: '180px'
|
|
10549
|
+
},
|
|
10550
|
+
disabled: disabled,
|
|
10551
|
+
placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10552
|
+
showSearch: true,
|
|
10553
|
+
options: wdtOptions,
|
|
10554
|
+
filterOption: filterOption,
|
|
10555
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
|
|
10556
|
+
onChange: function onChange(value, option) {
|
|
10557
|
+
return handleSelected(value, 'sendName', option);
|
|
10558
|
+
}
|
|
10559
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
10515
10560
|
disabled: disabled,
|
|
10516
10561
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
|
|
10517
10562
|
onChange: function onChange(e) {
|
|
10518
10563
|
return changeInputHandle(e.target.value, 'sendName');
|
|
10519
10564
|
},
|
|
10520
|
-
value: (_value$
|
|
10521
|
-
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
10565
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
|
|
10566
|
+
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
10522
10567
|
disabled: disabled,
|
|
10523
10568
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
10524
10569
|
onChange: function onChange(e) {
|
|
10525
10570
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
10526
10571
|
},
|
|
10527
|
-
value: (_value$
|
|
10572
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
|
|
10528
10573
|
})) : null) : null);
|
|
10529
10574
|
};
|
|
10530
10575
|
|
|
@@ -11091,12 +11136,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11091
11136
|
var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
|
|
11092
11137
|
|
|
11093
11138
|
var RangePicker = DatePicker.RangePicker;
|
|
11094
|
-
var getWdtListProduct = function getWdtListProduct(data) {
|
|
11095
|
-
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11096
|
-
method: 'post',
|
|
11097
|
-
data: data
|
|
11098
|
-
});
|
|
11099
|
-
};
|
|
11100
11139
|
var columns$1 = [{
|
|
11101
11140
|
dataIndex: 'index',
|
|
11102
11141
|
title: 'NO',
|
|
@@ -11171,173 +11210,226 @@ var expandedColumns = [{
|
|
|
11171
11210
|
title: '会员价',
|
|
11172
11211
|
width: 140
|
|
11173
11212
|
}];
|
|
11174
|
-
var
|
|
11175
|
-
|
|
11176
|
-
var
|
|
11177
|
-
|
|
11178
|
-
};
|
|
11179
|
-
var GoodList = function GoodList(props, ref) {
|
|
11180
|
-
var _useState = useState([]),
|
|
11181
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11182
|
-
selectList = _useState2[0],
|
|
11183
|
-
setSelect = _useState2[1];
|
|
11184
|
-
var _useState3 = useState(1),
|
|
11185
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
11186
|
-
pageNo = _useState4[0],
|
|
11187
|
-
setPageNo = _useState4[1];
|
|
11188
|
-
var _useState5 = useState(20),
|
|
11189
|
-
_useState6 = _slicedToArray(_useState5, 1),
|
|
11190
|
-
pageSize = _useState6[0];
|
|
11191
|
-
var _useState7 = useState([]),
|
|
11192
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
11193
|
-
goodList = _useState8[0],
|
|
11194
|
-
setGoodList = _useState8[1];
|
|
11195
|
-
var _useState9 = useState(false),
|
|
11196
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
11197
|
-
loading = _useState10[0],
|
|
11198
|
-
setLoading = _useState10[1];
|
|
11199
|
-
var _useState11 = useState(0),
|
|
11200
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
11201
|
-
total = _useState12[0],
|
|
11202
|
-
setTotal = _useState12[1];
|
|
11203
|
-
var _useState13 = useState(null),
|
|
11204
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
11205
|
-
dates = _useState14[0],
|
|
11206
|
-
setDates = _useState14[1];
|
|
11213
|
+
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11214
|
+
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11215
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11216
|
+
var initEndTime = hooks();
|
|
11207
11217
|
useImperativeHandle(ref, function () {
|
|
11208
11218
|
return {
|
|
11209
|
-
|
|
11210
|
-
|
|
11219
|
+
open: function open(shopCode) {
|
|
11220
|
+
setVisible(true);
|
|
11221
|
+
setPageNo(1);
|
|
11222
|
+
setSelect([]);
|
|
11223
|
+
setSelectIds([]);
|
|
11224
|
+
form.setFieldsValue({
|
|
11225
|
+
dateTimePicker: [initStartTime, initEndTime],
|
|
11226
|
+
code: ''
|
|
11227
|
+
});
|
|
11228
|
+
// getShopList();
|
|
11211
11229
|
}
|
|
11212
11230
|
};
|
|
11213
11231
|
});
|
|
11232
|
+
|
|
11233
|
+
var onSubmit = props.onSubmit,
|
|
11234
|
+
shopId = props.shopId,
|
|
11235
|
+
shopList = props.shopList,
|
|
11236
|
+
width = props.width,
|
|
11237
|
+
companyKey = props.companyKey;
|
|
11238
|
+
var _useState = useState(false),
|
|
11239
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11240
|
+
visible = _useState2[0],
|
|
11241
|
+
setVisible = _useState2[1];
|
|
11242
|
+
var _useState3 = useState([]),
|
|
11243
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11244
|
+
selectList = _useState4[0],
|
|
11245
|
+
setSelect = _useState4[1];
|
|
11246
|
+
var _useState5 = useState([]),
|
|
11247
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11248
|
+
selectIds = _useState6[0],
|
|
11249
|
+
setSelectIds = _useState6[1];
|
|
11250
|
+
var _useState7 = useState(1),
|
|
11251
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11252
|
+
pageNo = _useState8[0],
|
|
11253
|
+
setPageNo = _useState8[1];
|
|
11254
|
+
var _useState9 = useState(20),
|
|
11255
|
+
_useState10 = _slicedToArray(_useState9, 1),
|
|
11256
|
+
pageSize = _useState10[0];
|
|
11257
|
+
var _useState11 = useState([]),
|
|
11258
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11259
|
+
goodList = _useState12[0],
|
|
11260
|
+
setGoodList = _useState12[1];
|
|
11261
|
+
var _useState13 = useState(false),
|
|
11262
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
11263
|
+
loading = _useState14[0],
|
|
11264
|
+
setLoading = _useState14[1];
|
|
11265
|
+
var _useState15 = useState(0),
|
|
11266
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
11267
|
+
total = _useState16[0],
|
|
11268
|
+
setTotal = _useState16[1];
|
|
11214
11269
|
var displaySelectList = useMemo(function () {
|
|
11215
11270
|
return selectList.map(function (item, i) {
|
|
11216
11271
|
item.index = i + 1;
|
|
11217
11272
|
return item;
|
|
11218
11273
|
});
|
|
11219
11274
|
}, [selectList]);
|
|
11275
|
+
useEffect(function () {
|
|
11276
|
+
if (visible) {
|
|
11277
|
+
queryItems();
|
|
11278
|
+
}
|
|
11279
|
+
}, [pageNo, visible]);
|
|
11220
11280
|
var _Form$useForm = Form.useForm(),
|
|
11221
11281
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
11222
11282
|
form = _Form$useForm2[0];
|
|
11283
|
+
//选择页码
|
|
11284
|
+
var pageChange = function pageChange(page) {
|
|
11285
|
+
setPageNo(page);
|
|
11286
|
+
};
|
|
11223
11287
|
/**
|
|
11224
11288
|
* 查询商品
|
|
11225
11289
|
*/
|
|
11226
11290
|
var queryItems = /*#__PURE__*/function () {
|
|
11227
11291
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11228
|
-
var
|
|
11292
|
+
var search,
|
|
11293
|
+
_formData$dateTimePic,
|
|
11294
|
+
_formData$dateTimePic2,
|
|
11295
|
+
_formData$dateTimePic3,
|
|
11296
|
+
_formData$dateTimePic4,
|
|
11297
|
+
_formData$dateTimePic5,
|
|
11298
|
+
_formData$dateTimePic6,
|
|
11299
|
+
formData,
|
|
11300
|
+
startTime,
|
|
11301
|
+
endTime,
|
|
11302
|
+
params,
|
|
11303
|
+
res,
|
|
11304
|
+
_res$data,
|
|
11305
|
+
_res$data$productList,
|
|
11306
|
+
productList,
|
|
11307
|
+
_res$data$total,
|
|
11308
|
+
_total,
|
|
11309
|
+
errorMsg,
|
|
11310
|
+
newProducts,
|
|
11311
|
+
_args = arguments;
|
|
11229
11312
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11230
11313
|
while (1) switch (_context.prev = _context.next) {
|
|
11231
11314
|
case 0:
|
|
11232
|
-
|
|
11315
|
+
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
11316
|
+
_context.prev = 1;
|
|
11233
11317
|
setLoading(true);
|
|
11234
11318
|
formData = form.getFieldsValue();
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
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');
|
|
11238
|
-
endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
|
|
11239
|
-
newTime = hooks(); // 只能选比现在早的时间
|
|
11240
|
-
if (hooks(endTime).diff(newTime, 'seconds') > 0) {
|
|
11241
|
-
endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
|
|
11242
|
-
}
|
|
11243
|
-
// 30天内
|
|
11244
|
-
earliest = hooks(endTime).subtract(30, 'd');
|
|
11245
|
-
if (earliest.diff(hooks(startTime), 'seconds') > 0) {
|
|
11246
|
-
startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
|
|
11247
|
-
}
|
|
11319
|
+
startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, dateFormat)) || hooks().subtract(30, 'd').format(dateFormat);
|
|
11320
|
+
endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, dateFormat)) || hooks().format(dateFormat);
|
|
11248
11321
|
params = {
|
|
11322
|
+
// shopCode: shopCode,
|
|
11249
11323
|
pageSize: pageSize,
|
|
11250
11324
|
pageNo: pageNo - 1,
|
|
11251
|
-
goodNo:
|
|
11252
|
-
specNo: formData.specNo || null,
|
|
11325
|
+
goodNo: search.code,
|
|
11253
11326
|
startTime: startTime,
|
|
11254
11327
|
endTime: endTime
|
|
11255
11328
|
};
|
|
11256
|
-
_context.next =
|
|
11257
|
-
return
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11329
|
+
_context.next = 9;
|
|
11330
|
+
return extendRequest('/qy/gdfw/product/wdtListProduct', {
|
|
11331
|
+
method: 'post',
|
|
11332
|
+
data: params
|
|
11333
|
+
});
|
|
11334
|
+
case 9:
|
|
11335
|
+
res = _context.sent;
|
|
11336
|
+
_res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total, errorMsg = _res$data.errorMsg;
|
|
11337
|
+
if (res.success) {
|
|
11338
|
+
newProducts = productList.map(function (item, index) {
|
|
11339
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11340
|
+
index: index + 1
|
|
11268
11341
|
});
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
} else {
|
|
11274
|
-
var _res$data2;
|
|
11275
|
-
setGoodList([]);
|
|
11276
|
-
setTotal(0);
|
|
11277
|
-
message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
|
|
11342
|
+
});
|
|
11343
|
+
setGoodList(_toConsumableArray(newProducts));
|
|
11344
|
+
if (pageNo === 1) {
|
|
11345
|
+
setTotal(_total);
|
|
11278
11346
|
}
|
|
11279
|
-
}
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11347
|
+
} else {
|
|
11348
|
+
setGoodList([]);
|
|
11349
|
+
setTotal(0);
|
|
11350
|
+
message.error(errorMsg || res.message);
|
|
11351
|
+
}
|
|
11352
|
+
case 12:
|
|
11353
|
+
_context.prev = 12;
|
|
11284
11354
|
setLoading(false);
|
|
11285
|
-
return _context.finish(
|
|
11286
|
-
case
|
|
11355
|
+
return _context.finish(12);
|
|
11356
|
+
case 15:
|
|
11287
11357
|
case "end":
|
|
11288
11358
|
return _context.stop();
|
|
11289
11359
|
}
|
|
11290
|
-
}, _callee, null, [[
|
|
11360
|
+
}, _callee, null, [[1,, 12, 15]]);
|
|
11291
11361
|
}));
|
|
11292
11362
|
return function queryItems() {
|
|
11293
11363
|
return _ref.apply(this, arguments);
|
|
11294
11364
|
};
|
|
11295
11365
|
}();
|
|
11296
|
-
var
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
};
|
|
11309
|
-
var onOpenChange = function onOpenChange(open) {
|
|
11310
|
-
if (open) {
|
|
11311
|
-
setDates([null, null]);
|
|
11312
|
-
} else {
|
|
11313
|
-
setDates(null);
|
|
11314
|
-
}
|
|
11366
|
+
var _onCancel = function onCancel() {
|
|
11367
|
+
setVisible(false);
|
|
11368
|
+
};
|
|
11369
|
+
var onOk = function onOk() {
|
|
11370
|
+
onSubmit(selectList);
|
|
11371
|
+
_onCancel();
|
|
11372
|
+
};
|
|
11373
|
+
var onFinish = function onFinish(fieldsValue) {
|
|
11374
|
+
var searchValue = {
|
|
11375
|
+
code: fieldsValue.code
|
|
11376
|
+
};
|
|
11377
|
+
queryItems(searchValue);
|
|
11315
11378
|
};
|
|
11316
11379
|
var onReset = function onReset() {
|
|
11380
|
+
form.resetFields();
|
|
11317
11381
|
form.setFieldsValue({
|
|
11318
|
-
dateTimePicker:
|
|
11319
|
-
|
|
11320
|
-
specNo: ''
|
|
11382
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11383
|
+
code: ''
|
|
11321
11384
|
});
|
|
11322
11385
|
setPageNo(function (prev) {
|
|
11323
|
-
if (prev === 1) {
|
|
11386
|
+
if (prev === 1 && visible) {
|
|
11324
11387
|
queryItems();
|
|
11325
11388
|
}
|
|
11326
11389
|
return 1;
|
|
11327
11390
|
});
|
|
11328
11391
|
};
|
|
11329
|
-
|
|
11392
|
+
// const getShopList = async () => {
|
|
11393
|
+
// const { success, data } = await request('/qy/diamond/getConfigInfo', {
|
|
11394
|
+
// method: 'get',
|
|
11395
|
+
// params: {
|
|
11396
|
+
// key: 'company-third-shop-info',
|
|
11397
|
+
// },
|
|
11398
|
+
// });
|
|
11399
|
+
// const obj: any = JSON.parse(data || '{}');
|
|
11400
|
+
// if (success) {
|
|
11401
|
+
// const list = (obj?.[companyKey] || []).map((item: any) => {
|
|
11402
|
+
// return {
|
|
11403
|
+
// label: item.shopName,
|
|
11404
|
+
// value: item.shopCode,
|
|
11405
|
+
// };
|
|
11406
|
+
// });
|
|
11407
|
+
// setShopList(list);
|
|
11408
|
+
// }
|
|
11409
|
+
// };
|
|
11410
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
11411
|
+
if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
|
|
11412
|
+
queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
|
|
11413
|
+
pubsub.publish('changeShopCode', {
|
|
11414
|
+
shopCode: changedValues.shopId
|
|
11415
|
+
});
|
|
11416
|
+
}
|
|
11417
|
+
};
|
|
11418
|
+
var handleDelete = function handleDelete(record, index) {
|
|
11330
11419
|
var newSelectList = selectList.filter(function (item) {
|
|
11331
11420
|
return item.specId !== record.specId;
|
|
11332
11421
|
});
|
|
11333
11422
|
setSelect(_toConsumableArray(newSelectList));
|
|
11423
|
+
setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
|
|
11424
|
+
return item.specId;
|
|
11425
|
+
})));
|
|
11334
11426
|
};
|
|
11335
11427
|
var displaySelectedColumns = [{
|
|
11336
11428
|
dataIndex: 'operation',
|
|
11337
11429
|
title: '',
|
|
11338
11430
|
ellipsis: true,
|
|
11339
11431
|
width: 50,
|
|
11340
|
-
render: function render(_, record) {
|
|
11432
|
+
render: function render(_, record, index) {
|
|
11341
11433
|
return /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
11342
11434
|
onClick: function onClick() {
|
|
11343
11435
|
return handleDelete(record);
|
|
@@ -11368,10 +11460,8 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11368
11460
|
}];
|
|
11369
11461
|
var expandedRowSelection = {
|
|
11370
11462
|
fixed: true,
|
|
11371
|
-
selectedRowKeys:
|
|
11372
|
-
|
|
11373
|
-
}),
|
|
11374
|
-
onSelect: function onSelect(record, selected) {
|
|
11463
|
+
selectedRowKeys: selectIds,
|
|
11464
|
+
onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
|
|
11375
11465
|
var tempList = [];
|
|
11376
11466
|
if (selected) {
|
|
11377
11467
|
tempList = [].concat(_toConsumableArray(selectList), [record]);
|
|
@@ -11381,6 +11471,9 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11381
11471
|
});
|
|
11382
11472
|
}
|
|
11383
11473
|
setSelect(_toConsumableArray(tempList));
|
|
11474
|
+
setSelectIds(_toConsumableArray(tempList.map(function (item) {
|
|
11475
|
+
return item.specId;
|
|
11476
|
+
})));
|
|
11384
11477
|
},
|
|
11385
11478
|
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
11386
11479
|
var tempAllList = [];
|
|
@@ -11394,12 +11487,15 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11394
11487
|
});
|
|
11395
11488
|
}
|
|
11396
11489
|
setSelect(_toConsumableArray(tempAllList));
|
|
11490
|
+
setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
|
|
11491
|
+
return item.specId;
|
|
11492
|
+
})));
|
|
11397
11493
|
}
|
|
11398
11494
|
};
|
|
11399
|
-
var expandedRowRender = function expandedRowRender(record) {
|
|
11495
|
+
var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
|
|
11400
11496
|
return /*#__PURE__*/React.createElement(Table, {
|
|
11401
|
-
rowKey:
|
|
11402
|
-
size:
|
|
11497
|
+
rowKey: 'specId',
|
|
11498
|
+
size: 'small',
|
|
11403
11499
|
columns: expandedColumns,
|
|
11404
11500
|
dataSource: record.itemDetailList || [],
|
|
11405
11501
|
pagination: false,
|
|
@@ -11409,61 +11505,43 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11409
11505
|
}
|
|
11410
11506
|
});
|
|
11411
11507
|
};
|
|
11412
|
-
React.
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11508
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
11509
|
+
title: '选择商品',
|
|
11510
|
+
okText: '确认',
|
|
11511
|
+
cancelText: '取消',
|
|
11512
|
+
visible: visible,
|
|
11513
|
+
width: width || 850,
|
|
11514
|
+
onCancel: function onCancel() {
|
|
11515
|
+
_onCancel();
|
|
11516
|
+
},
|
|
11517
|
+
onOk: onOk,
|
|
11518
|
+
wrapClassName: "goodModal"
|
|
11519
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
11416
11520
|
layout: "inline",
|
|
11417
11521
|
form: form,
|
|
11418
|
-
onFinish:
|
|
11522
|
+
onFinish: onFinish,
|
|
11523
|
+
onValuesChange: onValuesChange,
|
|
11419
11524
|
initialValues: {
|
|
11420
|
-
|
|
11421
|
-
specNo: '',
|
|
11422
|
-
dateTimePicker: getInitTime()
|
|
11525
|
+
code: ''
|
|
11423
11526
|
}
|
|
11424
11527
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
11425
|
-
name: "dateTimePicker"
|
|
11426
|
-
style: {
|
|
11427
|
-
marginBottom: '12px'
|
|
11428
|
-
}
|
|
11528
|
+
name: "dateTimePicker"
|
|
11429
11529
|
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
11430
11530
|
style: {
|
|
11431
|
-
width: '
|
|
11531
|
+
width: '350px'
|
|
11432
11532
|
},
|
|
11433
11533
|
placeholder: ['开始日期', '结束日期'],
|
|
11434
|
-
showTime:
|
|
11435
|
-
|
|
11436
|
-
onCalendarChange: function onCalendarChange(val) {
|
|
11437
|
-
return setDates(val);
|
|
11438
|
-
},
|
|
11439
|
-
onOpenChange: onOpenChange
|
|
11534
|
+
showTime: true,
|
|
11535
|
+
defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
|
|
11440
11536
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11441
|
-
name: "
|
|
11442
|
-
style: {
|
|
11443
|
-
marginBottom: '12px'
|
|
11444
|
-
}
|
|
11537
|
+
name: "code"
|
|
11445
11538
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11446
11539
|
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11447
11540
|
allowClear: true,
|
|
11448
11541
|
style: {
|
|
11449
11542
|
width: 150
|
|
11450
11543
|
}
|
|
11451
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11452
|
-
name: "specNo",
|
|
11453
|
-
style: {
|
|
11454
|
-
marginBottom: '12px'
|
|
11455
|
-
}
|
|
11456
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
11457
|
-
placeholder: "\u5546\u54C1SKU\u7F16\u7801",
|
|
11458
|
-
allowClear: true,
|
|
11459
|
-
style: {
|
|
11460
|
-
width: 150
|
|
11461
|
-
}
|
|
11462
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11463
|
-
style: {
|
|
11464
|
-
marginBottom: '12px'
|
|
11465
|
-
}
|
|
11466
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
11544
|
+
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
11467
11545
|
type: "primary",
|
|
11468
11546
|
htmlType: "submit",
|
|
11469
11547
|
style: {
|
|
@@ -11473,10 +11551,10 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11473
11551
|
onClick: onReset
|
|
11474
11552
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
11475
11553
|
style: {
|
|
11476
|
-
marginTop: '
|
|
11554
|
+
marginTop: '16px'
|
|
11477
11555
|
}
|
|
11478
11556
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
11479
|
-
rowKey:
|
|
11557
|
+
rowKey: 'goodNo',
|
|
11480
11558
|
columns: columns$1,
|
|
11481
11559
|
dataSource: goodList,
|
|
11482
11560
|
loading: loading,
|
|
@@ -11493,14 +11571,14 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11493
11571
|
current: pageNo,
|
|
11494
11572
|
pageSize: pageSize,
|
|
11495
11573
|
pageSizeOptions: [],
|
|
11496
|
-
onChange:
|
|
11574
|
+
onChange: pageChange
|
|
11497
11575
|
}
|
|
11498
11576
|
})), !!selectList.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React.createElement("div", {
|
|
11499
11577
|
style: {
|
|
11500
11578
|
marginTop: '16px'
|
|
11501
11579
|
}
|
|
11502
11580
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
11503
|
-
rowKey:
|
|
11581
|
+
rowKey: 'specId',
|
|
11504
11582
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11505
11583
|
dataSource: displaySelectList,
|
|
11506
11584
|
pagination: false,
|
|
@@ -11511,48 +11589,7 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11511
11589
|
style: {
|
|
11512
11590
|
width: '100%'
|
|
11513
11591
|
}
|
|
11514
|
-
}))));
|
|
11515
|
-
};
|
|
11516
|
-
var WdtGoodList = /*#__PURE__*/forwardRef(GoodList);
|
|
11517
|
-
|
|
11518
|
-
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11519
|
-
useImperativeHandle(ref, function () {
|
|
11520
|
-
return {
|
|
11521
|
-
open: function open() {
|
|
11522
|
-
setVisible(true);
|
|
11523
|
-
}
|
|
11524
|
-
};
|
|
11525
|
-
});
|
|
11526
|
-
var onSubmit = props.onSubmit,
|
|
11527
|
-
width = props.width;
|
|
11528
|
-
var _useState = useState(false),
|
|
11529
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11530
|
-
visible = _useState2[0],
|
|
11531
|
-
setVisible = _useState2[1];
|
|
11532
|
-
var wdtGoodListRef = useRef(null);
|
|
11533
|
-
var _onCancel = function onCancel() {
|
|
11534
|
-
setVisible(false);
|
|
11535
|
-
};
|
|
11536
|
-
var onOk = function onOk() {
|
|
11537
|
-
var _wdtGoodListRef$curre;
|
|
11538
|
-
var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
|
|
11539
|
-
onSubmit(selectedList);
|
|
11540
|
-
_onCancel();
|
|
11541
|
-
};
|
|
11542
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
11543
|
-
title: '选择商品',
|
|
11544
|
-
okText: '确认',
|
|
11545
|
-
cancelText: '取消',
|
|
11546
|
-
visible: visible,
|
|
11547
|
-
width: width || 850,
|
|
11548
|
-
onCancel: function onCancel() {
|
|
11549
|
-
_onCancel();
|
|
11550
|
-
},
|
|
11551
|
-
onOk: onOk,
|
|
11552
|
-
wrapClassName: "goodModal"
|
|
11553
|
-
}, /*#__PURE__*/React.createElement(WdtGoodList, {
|
|
11554
|
-
ref: wdtGoodListRef
|
|
11555
|
-
})));
|
|
11592
|
+
})))));
|
|
11556
11593
|
};
|
|
11557
11594
|
var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
|
|
11558
11595
|
|
|
@@ -13508,7 +13545,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13508
13545
|
changeOrderInfo[type] = val;
|
|
13509
13546
|
var newList = _toConsumableArray(value);
|
|
13510
13547
|
newList[changeIndex] = changeOrderInfo;
|
|
13511
|
-
console.log(newList, val, type);
|
|
13548
|
+
// console.log(newList, val, type);
|
|
13512
13549
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
13513
13550
|
};
|
|
13514
13551
|
//判断是否是单个且没有商品数据
|
|
@@ -13584,7 +13621,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13584
13621
|
}, [1, 2].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
13585
13622
|
};
|
|
13586
13623
|
var changeHandle = function changeHandle(val, valType) {
|
|
13587
|
-
console.log(val, valType);
|
|
13588
13624
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
13589
13625
|
changeOrderInfo[valType] = val;
|
|
13590
13626
|
if (val !== failValue) {
|
|
@@ -13717,4 +13753,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
13717
13753
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
13718
13754
|
};
|
|
13719
13755
|
|
|
13720
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId,
|
|
13756
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|