@kmkf-fe-packages/basic-components 0.24.2-beta.0 → 0.24.2-beta.10
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
2
2
|
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Tabs, ConfigProvider, Pagination, Popover, Table } from 'antd';
|
|
3
|
-
import { EyeOutlined, DeleteOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
6
|
import { AddressData, BsAddressData, WdtAddressData, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
@@ -516,8 +516,18 @@ function ApaasInput(props) {
|
|
|
516
516
|
var isNumber = props.isNumber,
|
|
517
517
|
replaceWarn = props.replaceWarn,
|
|
518
518
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
519
|
+
var handleBlur = function handleBlur(e) {
|
|
520
|
+
// 去除头尾空格
|
|
521
|
+
e.target.value = e.target.value.trim();
|
|
522
|
+
var onChange = props.onChange,
|
|
523
|
+
onBlur = props.onBlur;
|
|
524
|
+
typeof onChange === 'function' && onChange(e);
|
|
525
|
+
typeof onBlur === 'function' && onBlur(e);
|
|
526
|
+
};
|
|
519
527
|
// @ts-ignore
|
|
520
|
-
return isNumber ? /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React.createElement(Input, _objectSpread2({}, other)
|
|
528
|
+
return isNumber ? /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
529
|
+
onBlur: handleBlur
|
|
530
|
+
}));
|
|
521
531
|
}
|
|
522
532
|
|
|
523
533
|
function ApaasInputNumber(props) {
|
|
@@ -7394,11 +7404,14 @@ var Province = function Province(props) {
|
|
|
7394
7404
|
workOrder: addressData
|
|
7395
7405
|
}[type] || addressData).addressOptions || [];
|
|
7396
7406
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7407
|
+
getBsAddress();
|
|
7397
7408
|
time.current = setTimeout(function () {
|
|
7398
7409
|
initPageSource();
|
|
7399
7410
|
}, 1000);
|
|
7400
7411
|
}
|
|
7401
|
-
|
|
7412
|
+
if (options.length) {
|
|
7413
|
+
setOptions(options);
|
|
7414
|
+
}
|
|
7402
7415
|
case 4:
|
|
7403
7416
|
case "end":
|
|
7404
7417
|
return _context.stop();
|
|
@@ -9734,7 +9747,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9734
9747
|
var address = AddressData.getInstance();
|
|
9735
9748
|
var _props$value = props.value,
|
|
9736
9749
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9737
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
9738
9750
|
_props$expressInterce = props.expressInterceptData,
|
|
9739
9751
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9740
9752
|
_props$required = props.required,
|
|
@@ -10026,6 +10038,64 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10026
10038
|
})));
|
|
10027
10039
|
};
|
|
10028
10040
|
|
|
10041
|
+
var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
10042
|
+
var required = props.required,
|
|
10043
|
+
expressInterceptData = props.expressInterceptData,
|
|
10044
|
+
_props$value = props.value,
|
|
10045
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
10046
|
+
disabled = props.disabled,
|
|
10047
|
+
onChange = props.onChange,
|
|
10048
|
+
isEditing = props.isEditing;
|
|
10049
|
+
var _useState = useState(0),
|
|
10050
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
10051
|
+
changeIndex = _useState2[0],
|
|
10052
|
+
setChangeIndex = _useState2[1];
|
|
10053
|
+
var handleChange = function handleChange(val, index) {
|
|
10054
|
+
var newValue = cloneDeep(value);
|
|
10055
|
+
newValue.splice(index, 1, val);
|
|
10056
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10057
|
+
};
|
|
10058
|
+
var handleDelete = function handleDelete(e, index) {
|
|
10059
|
+
e.stopPropagation();
|
|
10060
|
+
var newValue = cloneDeep(value);
|
|
10061
|
+
newValue.splice(index, 1);
|
|
10062
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10063
|
+
setChangeIndex(0);
|
|
10064
|
+
};
|
|
10065
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, {
|
|
10066
|
+
wrap: true
|
|
10067
|
+
}, value.length > 1 ? (value || []).map(function (item, index) {
|
|
10068
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
10069
|
+
style: {
|
|
10070
|
+
position: 'relative',
|
|
10071
|
+
color: changeIndex === index ? '#4569d4' : 'black',
|
|
10072
|
+
cursor: 'pointer'
|
|
10073
|
+
},
|
|
10074
|
+
onClick: function onClick() {
|
|
10075
|
+
return setChangeIndex(index);
|
|
10076
|
+
}
|
|
10077
|
+
}, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
|
10078
|
+
style: {
|
|
10079
|
+
position: 'absolute',
|
|
10080
|
+
right: '-7px',
|
|
10081
|
+
top: '-10px'
|
|
10082
|
+
},
|
|
10083
|
+
onClick: function onClick(e) {
|
|
10084
|
+
return handleDelete(e, index);
|
|
10085
|
+
}
|
|
10086
|
+
}) : null);
|
|
10087
|
+
}) : null), /*#__PURE__*/React.createElement(LogisticsInterception, {
|
|
10088
|
+
required: required,
|
|
10089
|
+
expressInterceptData: expressInterceptData,
|
|
10090
|
+
value: value[changeIndex],
|
|
10091
|
+
disabled: disabled,
|
|
10092
|
+
isEditing: false,
|
|
10093
|
+
onChange: function onChange(val) {
|
|
10094
|
+
return handleChange(val, changeIndex);
|
|
10095
|
+
}
|
|
10096
|
+
}));
|
|
10097
|
+
};
|
|
10098
|
+
|
|
10029
10099
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10030
10100
|
var showField = props.showField,
|
|
10031
10101
|
_props$value = props.value,
|
|
@@ -11089,15 +11159,16 @@ var columns$1 = [{
|
|
|
11089
11159
|
width: 25
|
|
11090
11160
|
}
|
|
11091
11161
|
}, index + 1);
|
|
11092
|
-
}
|
|
11162
|
+
},
|
|
11163
|
+
width: 100
|
|
11093
11164
|
}, {
|
|
11094
11165
|
dataIndex: 'goodName',
|
|
11095
11166
|
title: '商品名称',
|
|
11096
|
-
width:
|
|
11167
|
+
width: 250,
|
|
11097
11168
|
ellipsis: true
|
|
11098
11169
|
}, {
|
|
11099
11170
|
dataIndex: 'goodNo',
|
|
11100
|
-
title: '商品
|
|
11171
|
+
title: '商品SPU编码',
|
|
11101
11172
|
width: 200,
|
|
11102
11173
|
ellipsis: true
|
|
11103
11174
|
}, {
|
|
@@ -11108,17 +11179,17 @@ var columns$1 = [{
|
|
|
11108
11179
|
}, {
|
|
11109
11180
|
dataIndex: 'specCount',
|
|
11110
11181
|
title: '规格数',
|
|
11111
|
-
width:
|
|
11182
|
+
width: 100,
|
|
11112
11183
|
ellipsis: true
|
|
11113
11184
|
}];
|
|
11114
11185
|
var expandedColumns = [{
|
|
11115
11186
|
dataIndex: 'specName',
|
|
11116
|
-
title: '商品
|
|
11187
|
+
title: '商品SKU名称',
|
|
11117
11188
|
width: 200,
|
|
11118
11189
|
ellipsis: true
|
|
11119
11190
|
}, {
|
|
11120
11191
|
dataIndex: 'specNo',
|
|
11121
|
-
title: '商品
|
|
11192
|
+
title: '商品SKU编码',
|
|
11122
11193
|
width: 200,
|
|
11123
11194
|
ellipsis: true
|
|
11124
11195
|
}, {
|
|
@@ -11155,7 +11226,7 @@ var expandedColumns = [{
|
|
|
11155
11226
|
}];
|
|
11156
11227
|
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11157
11228
|
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11158
|
-
var initStartTime = hooks().subtract(
|
|
11229
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11159
11230
|
var initEndTime = hooks();
|
|
11160
11231
|
useImperativeHandle(ref, function () {
|
|
11161
11232
|
return {
|
|
@@ -11259,7 +11330,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11259
11330
|
_context.prev = 1;
|
|
11260
11331
|
setLoading(true);
|
|
11261
11332
|
formData = form.getFieldsValue();
|
|
11262
|
-
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(
|
|
11333
|
+
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);
|
|
11263
11334
|
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);
|
|
11264
11335
|
params = {
|
|
11265
11336
|
// shopCode: shopCode,
|
|
@@ -11322,7 +11393,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11322
11393
|
var onReset = function onReset() {
|
|
11323
11394
|
form.resetFields();
|
|
11324
11395
|
form.setFieldsValue({
|
|
11325
|
-
dateTimePicker: [hooks().subtract(
|
|
11396
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11326
11397
|
code: ''
|
|
11327
11398
|
});
|
|
11328
11399
|
setPageNo(function (prev) {
|
|
@@ -11370,6 +11441,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11370
11441
|
var displaySelectedColumns = [{
|
|
11371
11442
|
dataIndex: 'operation',
|
|
11372
11443
|
title: '',
|
|
11444
|
+
ellipsis: true,
|
|
11445
|
+
width: 50,
|
|
11373
11446
|
render: function render(_, record, index) {
|
|
11374
11447
|
return /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
11375
11448
|
onClick: function onClick() {
|
|
@@ -11380,6 +11453,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11380
11453
|
}, {
|
|
11381
11454
|
dataIndex: 'index',
|
|
11382
11455
|
title: 'NO',
|
|
11456
|
+
width: 100,
|
|
11383
11457
|
render: function render(val, record, index) {
|
|
11384
11458
|
return /*#__PURE__*/React.createElement("div", {
|
|
11385
11459
|
style: {
|
|
@@ -11387,6 +11461,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11387
11461
|
}
|
|
11388
11462
|
}, index + 1);
|
|
11389
11463
|
}
|
|
11464
|
+
}, {
|
|
11465
|
+
dataIndex: 'goodName',
|
|
11466
|
+
title: '商品名称',
|
|
11467
|
+
width: 250,
|
|
11468
|
+
ellipsis: true
|
|
11469
|
+
}, {
|
|
11470
|
+
dataIndex: 'goodNo',
|
|
11471
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11472
|
+
ellipsis: true,
|
|
11473
|
+
width: 200
|
|
11390
11474
|
}];
|
|
11391
11475
|
var expandedRowSelection = {
|
|
11392
11476
|
fixed: true,
|
|
@@ -11463,14 +11547,17 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11463
11547
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
11464
11548
|
name: "code"
|
|
11465
11549
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11466
|
-
placeholder: "\u5546\
|
|
11550
|
+
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11467
11551
|
allowClear: true,
|
|
11468
11552
|
style: {
|
|
11469
11553
|
width: 150
|
|
11470
11554
|
}
|
|
11471
11555
|
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
11472
11556
|
type: "primary",
|
|
11473
|
-
htmlType: "submit"
|
|
11557
|
+
htmlType: "submit",
|
|
11558
|
+
style: {
|
|
11559
|
+
marginRight: '8px'
|
|
11560
|
+
}
|
|
11474
11561
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
11475
11562
|
onClick: onReset
|
|
11476
11563
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -11483,7 +11570,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11483
11570
|
dataSource: goodList,
|
|
11484
11571
|
loading: loading,
|
|
11485
11572
|
scroll: {
|
|
11486
|
-
x:
|
|
11573
|
+
x: '100%',
|
|
11487
11574
|
y: 250
|
|
11488
11575
|
},
|
|
11489
11576
|
expandable: {
|
|
@@ -11497,13 +11584,17 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11497
11584
|
pageSizeOptions: [],
|
|
11498
11585
|
onChange: pageChange
|
|
11499
11586
|
}
|
|
11500
|
-
})), !!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(
|
|
11587
|
+
})), !!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", {
|
|
11588
|
+
style: {
|
|
11589
|
+
marginTop: '16px'
|
|
11590
|
+
}
|
|
11591
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
11501
11592
|
rowKey: 'specId',
|
|
11502
11593
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11503
11594
|
dataSource: displaySelectList,
|
|
11504
11595
|
pagination: false,
|
|
11505
11596
|
scroll: {
|
|
11506
|
-
x:
|
|
11597
|
+
x: '100%',
|
|
11507
11598
|
y: 250
|
|
11508
11599
|
},
|
|
11509
11600
|
style: {
|
|
@@ -11586,10 +11677,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11586
11677
|
width: 70
|
|
11587
11678
|
}, {
|
|
11588
11679
|
dataIndex: 'goodNo',
|
|
11589
|
-
title: "
|
|
11680
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11590
11681
|
align: 'center',
|
|
11591
11682
|
ellipsis: true,
|
|
11592
|
-
width:
|
|
11683
|
+
width: 180
|
|
11593
11684
|
}, {
|
|
11594
11685
|
dataIndex: 'goodName',
|
|
11595
11686
|
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
@@ -11604,13 +11695,13 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11604
11695
|
width: 100
|
|
11605
11696
|
}, {
|
|
11606
11697
|
dataIndex: 'specNo',
|
|
11607
|
-
title: "".concat(text, "
|
|
11698
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11608
11699
|
align: 'center',
|
|
11609
11700
|
ellipsis: true,
|
|
11610
|
-
width:
|
|
11701
|
+
width: 180
|
|
11611
11702
|
}, {
|
|
11612
11703
|
dataIndex: 'specName',
|
|
11613
|
-
title: "".concat(text, "
|
|
11704
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11614
11705
|
align: 'center',
|
|
11615
11706
|
ellipsis: true,
|
|
11616
11707
|
width: 250
|
|
@@ -12249,7 +12340,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
12249
12340
|
key: 'bsReturnGoods'
|
|
12250
12341
|
}, other), {}, {
|
|
12251
12342
|
disabled: disabled,
|
|
12252
|
-
showChangeBtn:
|
|
12343
|
+
showChangeBtn: false,
|
|
12253
12344
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12254
12345
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
|
|
12255
12346
|
onChange: function onChange(val) {
|
|
@@ -12524,7 +12615,7 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
12524
12615
|
}, other), {}, {
|
|
12525
12616
|
disabled: disabled,
|
|
12526
12617
|
canUpdateNumber: showChangeBtn,
|
|
12527
|
-
showChangeBtn:
|
|
12618
|
+
showChangeBtn: false,
|
|
12528
12619
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12529
12620
|
value: value === null || value === void 0 ? void 0 : value.bsReturnGoods,
|
|
12530
12621
|
onChange: function onChange(val) {
|
|
@@ -13674,4 +13765,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
13674
13765
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
13675
13766
|
};
|
|
13676
13767
|
|
|
13677
|
-
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, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|
|
13768
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -527,8 +527,18 @@ function ApaasInput(props) {
|
|
|
527
527
|
var isNumber = props.isNumber,
|
|
528
528
|
replaceWarn = props.replaceWarn,
|
|
529
529
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
530
|
+
var handleBlur = function handleBlur(e) {
|
|
531
|
+
// 去除头尾空格
|
|
532
|
+
e.target.value = e.target.value.trim();
|
|
533
|
+
var onChange = props.onChange,
|
|
534
|
+
onBlur = props.onBlur;
|
|
535
|
+
typeof onChange === 'function' && onChange(e);
|
|
536
|
+
typeof onBlur === 'function' && onBlur(e);
|
|
537
|
+
};
|
|
530
538
|
// @ts-ignore
|
|
531
|
-
return isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2({}, other)
|
|
539
|
+
return isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
540
|
+
onBlur: handleBlur
|
|
541
|
+
}));
|
|
532
542
|
}
|
|
533
543
|
|
|
534
544
|
function ApaasInputNumber(props) {
|
|
@@ -7405,11 +7415,14 @@ var Province = function Province(props) {
|
|
|
7405
7415
|
workOrder: addressData
|
|
7406
7416
|
}[type] || addressData).addressOptions || [];
|
|
7407
7417
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7418
|
+
getBsAddress();
|
|
7408
7419
|
time.current = setTimeout(function () {
|
|
7409
7420
|
initPageSource();
|
|
7410
7421
|
}, 1000);
|
|
7411
7422
|
}
|
|
7412
|
-
|
|
7423
|
+
if (options.length) {
|
|
7424
|
+
setOptions(options);
|
|
7425
|
+
}
|
|
7413
7426
|
case 4:
|
|
7414
7427
|
case "end":
|
|
7415
7428
|
return _context.stop();
|
|
@@ -9745,7 +9758,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9745
9758
|
var address = kmkfUtils.AddressData.getInstance();
|
|
9746
9759
|
var _props$value = props.value,
|
|
9747
9760
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9748
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
9749
9761
|
_props$expressInterce = props.expressInterceptData,
|
|
9750
9762
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9751
9763
|
_props$required = props.required,
|
|
@@ -10037,6 +10049,64 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10037
10049
|
})));
|
|
10038
10050
|
};
|
|
10039
10051
|
|
|
10052
|
+
var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
10053
|
+
var required = props.required,
|
|
10054
|
+
expressInterceptData = props.expressInterceptData,
|
|
10055
|
+
_props$value = props.value,
|
|
10056
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
10057
|
+
disabled = props.disabled,
|
|
10058
|
+
onChange = props.onChange,
|
|
10059
|
+
isEditing = props.isEditing;
|
|
10060
|
+
var _useState = React.useState(0),
|
|
10061
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
10062
|
+
changeIndex = _useState2[0],
|
|
10063
|
+
setChangeIndex = _useState2[1];
|
|
10064
|
+
var handleChange = function handleChange(val, index) {
|
|
10065
|
+
var newValue = lodash.cloneDeep(value);
|
|
10066
|
+
newValue.splice(index, 1, val);
|
|
10067
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10068
|
+
};
|
|
10069
|
+
var handleDelete = function handleDelete(e, index) {
|
|
10070
|
+
e.stopPropagation();
|
|
10071
|
+
var newValue = lodash.cloneDeep(value);
|
|
10072
|
+
newValue.splice(index, 1);
|
|
10073
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10074
|
+
setChangeIndex(0);
|
|
10075
|
+
};
|
|
10076
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
10077
|
+
wrap: true
|
|
10078
|
+
}, value.length > 1 ? (value || []).map(function (item, index) {
|
|
10079
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10080
|
+
style: {
|
|
10081
|
+
position: 'relative',
|
|
10082
|
+
color: changeIndex === index ? '#4569d4' : 'black',
|
|
10083
|
+
cursor: 'pointer'
|
|
10084
|
+
},
|
|
10085
|
+
onClick: function onClick() {
|
|
10086
|
+
return setChangeIndex(index);
|
|
10087
|
+
}
|
|
10088
|
+
}, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
|
|
10089
|
+
style: {
|
|
10090
|
+
position: 'absolute',
|
|
10091
|
+
right: '-7px',
|
|
10092
|
+
top: '-10px'
|
|
10093
|
+
},
|
|
10094
|
+
onClick: function onClick(e) {
|
|
10095
|
+
return handleDelete(e, index);
|
|
10096
|
+
}
|
|
10097
|
+
}) : null);
|
|
10098
|
+
}) : null), /*#__PURE__*/React__default['default'].createElement(LogisticsInterception, {
|
|
10099
|
+
required: required,
|
|
10100
|
+
expressInterceptData: expressInterceptData,
|
|
10101
|
+
value: value[changeIndex],
|
|
10102
|
+
disabled: disabled,
|
|
10103
|
+
isEditing: false,
|
|
10104
|
+
onChange: function onChange(val) {
|
|
10105
|
+
return handleChange(val, changeIndex);
|
|
10106
|
+
}
|
|
10107
|
+
}));
|
|
10108
|
+
};
|
|
10109
|
+
|
|
10040
10110
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10041
10111
|
var showField = props.showField,
|
|
10042
10112
|
_props$value = props.value,
|
|
@@ -11100,15 +11170,16 @@ var columns$1 = [{
|
|
|
11100
11170
|
width: 25
|
|
11101
11171
|
}
|
|
11102
11172
|
}, index + 1);
|
|
11103
|
-
}
|
|
11173
|
+
},
|
|
11174
|
+
width: 100
|
|
11104
11175
|
}, {
|
|
11105
11176
|
dataIndex: 'goodName',
|
|
11106
11177
|
title: '商品名称',
|
|
11107
|
-
width:
|
|
11178
|
+
width: 250,
|
|
11108
11179
|
ellipsis: true
|
|
11109
11180
|
}, {
|
|
11110
11181
|
dataIndex: 'goodNo',
|
|
11111
|
-
title: '商品
|
|
11182
|
+
title: '商品SPU编码',
|
|
11112
11183
|
width: 200,
|
|
11113
11184
|
ellipsis: true
|
|
11114
11185
|
}, {
|
|
@@ -11119,17 +11190,17 @@ var columns$1 = [{
|
|
|
11119
11190
|
}, {
|
|
11120
11191
|
dataIndex: 'specCount',
|
|
11121
11192
|
title: '规格数',
|
|
11122
|
-
width:
|
|
11193
|
+
width: 100,
|
|
11123
11194
|
ellipsis: true
|
|
11124
11195
|
}];
|
|
11125
11196
|
var expandedColumns = [{
|
|
11126
11197
|
dataIndex: 'specName',
|
|
11127
|
-
title: '商品
|
|
11198
|
+
title: '商品SKU名称',
|
|
11128
11199
|
width: 200,
|
|
11129
11200
|
ellipsis: true
|
|
11130
11201
|
}, {
|
|
11131
11202
|
dataIndex: 'specNo',
|
|
11132
|
-
title: '商品
|
|
11203
|
+
title: '商品SKU编码',
|
|
11133
11204
|
width: 200,
|
|
11134
11205
|
ellipsis: true
|
|
11135
11206
|
}, {
|
|
@@ -11166,7 +11237,7 @@ var expandedColumns = [{
|
|
|
11166
11237
|
}];
|
|
11167
11238
|
var dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
11168
11239
|
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
11169
|
-
var initStartTime = hooks().subtract(
|
|
11240
|
+
var initStartTime = hooks().subtract(30, 'd');
|
|
11170
11241
|
var initEndTime = hooks();
|
|
11171
11242
|
React.useImperativeHandle(ref, function () {
|
|
11172
11243
|
return {
|
|
@@ -11270,7 +11341,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11270
11341
|
_context.prev = 1;
|
|
11271
11342
|
setLoading(true);
|
|
11272
11343
|
formData = form.getFieldsValue();
|
|
11273
|
-
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(
|
|
11344
|
+
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);
|
|
11274
11345
|
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);
|
|
11275
11346
|
params = {
|
|
11276
11347
|
// shopCode: shopCode,
|
|
@@ -11333,7 +11404,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11333
11404
|
var onReset = function onReset() {
|
|
11334
11405
|
form.resetFields();
|
|
11335
11406
|
form.setFieldsValue({
|
|
11336
|
-
dateTimePicker: [hooks().subtract(
|
|
11407
|
+
dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
|
|
11337
11408
|
code: ''
|
|
11338
11409
|
});
|
|
11339
11410
|
setPageNo(function (prev) {
|
|
@@ -11381,6 +11452,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11381
11452
|
var displaySelectedColumns = [{
|
|
11382
11453
|
dataIndex: 'operation',
|
|
11383
11454
|
title: '',
|
|
11455
|
+
ellipsis: true,
|
|
11456
|
+
width: 50,
|
|
11384
11457
|
render: function render(_, record, index) {
|
|
11385
11458
|
return /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
11386
11459
|
onClick: function onClick() {
|
|
@@ -11391,6 +11464,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11391
11464
|
}, {
|
|
11392
11465
|
dataIndex: 'index',
|
|
11393
11466
|
title: 'NO',
|
|
11467
|
+
width: 100,
|
|
11394
11468
|
render: function render(val, record, index) {
|
|
11395
11469
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11396
11470
|
style: {
|
|
@@ -11398,6 +11472,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11398
11472
|
}
|
|
11399
11473
|
}, index + 1);
|
|
11400
11474
|
}
|
|
11475
|
+
}, {
|
|
11476
|
+
dataIndex: 'goodName',
|
|
11477
|
+
title: '商品名称',
|
|
11478
|
+
width: 250,
|
|
11479
|
+
ellipsis: true
|
|
11480
|
+
}, {
|
|
11481
|
+
dataIndex: 'goodNo',
|
|
11482
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11483
|
+
ellipsis: true,
|
|
11484
|
+
width: 200
|
|
11401
11485
|
}];
|
|
11402
11486
|
var expandedRowSelection = {
|
|
11403
11487
|
fixed: true,
|
|
@@ -11474,14 +11558,17 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11474
11558
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11475
11559
|
name: "code"
|
|
11476
11560
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11477
|
-
placeholder: "\u5546\
|
|
11561
|
+
placeholder: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11478
11562
|
allowClear: true,
|
|
11479
11563
|
style: {
|
|
11480
11564
|
width: 150
|
|
11481
11565
|
}
|
|
11482
11566
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11483
11567
|
type: "primary",
|
|
11484
|
-
htmlType: "submit"
|
|
11568
|
+
htmlType: "submit",
|
|
11569
|
+
style: {
|
|
11570
|
+
marginRight: '8px'
|
|
11571
|
+
}
|
|
11485
11572
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
11486
11573
|
onClick: onReset
|
|
11487
11574
|
}, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -11494,7 +11581,7 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11494
11581
|
dataSource: goodList,
|
|
11495
11582
|
loading: loading,
|
|
11496
11583
|
scroll: {
|
|
11497
|
-
x:
|
|
11584
|
+
x: '100%',
|
|
11498
11585
|
y: 250
|
|
11499
11586
|
},
|
|
11500
11587
|
expandable: {
|
|
@@ -11508,13 +11595,17 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
11508
11595
|
pageSizeOptions: [],
|
|
11509
11596
|
onChange: pageChange
|
|
11510
11597
|
}
|
|
11511
|
-
})), !!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(
|
|
11598
|
+
})), !!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", {
|
|
11599
|
+
style: {
|
|
11600
|
+
marginTop: '16px'
|
|
11601
|
+
}
|
|
11602
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11512
11603
|
rowKey: 'specId',
|
|
11513
11604
|
columns: [].concat(displaySelectedColumns, expandedColumns),
|
|
11514
11605
|
dataSource: displaySelectList,
|
|
11515
11606
|
pagination: false,
|
|
11516
11607
|
scroll: {
|
|
11517
|
-
x:
|
|
11608
|
+
x: '100%',
|
|
11518
11609
|
y: 250
|
|
11519
11610
|
},
|
|
11520
11611
|
style: {
|
|
@@ -11597,10 +11688,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11597
11688
|
width: 70
|
|
11598
11689
|
}, {
|
|
11599
11690
|
dataIndex: 'goodNo',
|
|
11600
|
-
title: "
|
|
11691
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11601
11692
|
align: 'center',
|
|
11602
11693
|
ellipsis: true,
|
|
11603
|
-
width:
|
|
11694
|
+
width: 180
|
|
11604
11695
|
}, {
|
|
11605
11696
|
dataIndex: 'goodName',
|
|
11606
11697
|
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
@@ -11615,13 +11706,13 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11615
11706
|
width: 100
|
|
11616
11707
|
}, {
|
|
11617
11708
|
dataIndex: 'specNo',
|
|
11618
|
-
title: "".concat(text, "
|
|
11709
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11619
11710
|
align: 'center',
|
|
11620
11711
|
ellipsis: true,
|
|
11621
|
-
width:
|
|
11712
|
+
width: 180
|
|
11622
11713
|
}, {
|
|
11623
11714
|
dataIndex: 'specName',
|
|
11624
|
-
title: "".concat(text, "
|
|
11715
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11625
11716
|
align: 'center',
|
|
11626
11717
|
ellipsis: true,
|
|
11627
11718
|
width: 250
|
|
@@ -12260,7 +12351,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
12260
12351
|
key: 'bsReturnGoods'
|
|
12261
12352
|
}, other), {}, {
|
|
12262
12353
|
disabled: disabled,
|
|
12263
|
-
showChangeBtn:
|
|
12354
|
+
showChangeBtn: false,
|
|
12264
12355
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12265
12356
|
value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
|
|
12266
12357
|
onChange: function onChange(val) {
|
|
@@ -12535,7 +12626,7 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
12535
12626
|
}, other), {}, {
|
|
12536
12627
|
disabled: disabled,
|
|
12537
12628
|
canUpdateNumber: showChangeBtn,
|
|
12538
|
-
showChangeBtn:
|
|
12629
|
+
showChangeBtn: false,
|
|
12539
12630
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
12540
12631
|
value: value === null || value === void 0 ? void 0 : value.bsReturnGoods,
|
|
12541
12632
|
onChange: function onChange(val) {
|
|
@@ -13725,6 +13816,7 @@ exports.Invoice = Invoice;
|
|
|
13725
13816
|
exports.JstGoods = jstGoods;
|
|
13726
13817
|
exports.JstItemList = ItemList;
|
|
13727
13818
|
exports.LogisticsInterception = LogisticsInterception;
|
|
13819
|
+
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
13728
13820
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
13729
13821
|
exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
13730
13822
|
exports.MsgStatus = MsgStatus;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { default as Invoice } from './business/Invoice';
|
|
|
32
32
|
export { default as Status } from './business/Status';
|
|
33
33
|
export { default as Payment } from './business/Payment';
|
|
34
34
|
export { default as LogisticsInterception } from './business/LogisticsInterception';
|
|
35
|
+
export { default as LogisticsMoreInterception } from './business/LogisticsMoreInterception';
|
|
35
36
|
export { default as LogisticsTrajectory } from './business/LogisticsTrajectory';
|
|
36
37
|
export { default as LogisticsMoreTrajectory } from './business/LogisticsMoreTrajectory';
|
|
37
38
|
export { default as Goods } from './common/Goods';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.24.2-beta.
|
|
3
|
+
"version": "0.24.2-beta.10",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.24.2-beta.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.24.2-beta.10",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"kmkf-monitor": "^0.8.8",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "8b0fc652b4d41aa56964a39fc7d274457a4af996"
|
|
68
68
|
}
|