@kmkf-fe-packages/basic-components 0.26.0 → 0.26.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
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';
|
|
@@ -7404,11 +7404,14 @@ var Province = function Province(props) {
|
|
|
7404
7404
|
workOrder: addressData
|
|
7405
7405
|
}[type] || addressData).addressOptions || [];
|
|
7406
7406
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7407
|
+
getBsAddress();
|
|
7407
7408
|
time.current = setTimeout(function () {
|
|
7408
7409
|
initPageSource();
|
|
7409
7410
|
}, 1000);
|
|
7410
7411
|
}
|
|
7411
|
-
|
|
7412
|
+
if (options.length) {
|
|
7413
|
+
setOptions(options);
|
|
7414
|
+
}
|
|
7412
7415
|
case 4:
|
|
7413
7416
|
case "end":
|
|
7414
7417
|
return _context.stop();
|
|
@@ -9744,7 +9747,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9744
9747
|
var address = AddressData.getInstance();
|
|
9745
9748
|
var _props$value = props.value,
|
|
9746
9749
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9747
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
9748
9750
|
_props$expressInterce = props.expressInterceptData,
|
|
9749
9751
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9750
9752
|
_props$required = props.required,
|
|
@@ -9773,7 +9775,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9773
9775
|
var firstIn = useRef(true);
|
|
9774
9776
|
useEffect(function () {
|
|
9775
9777
|
//存入第一次的物流地址,防止非对接物流切换成对接物流后无法编辑
|
|
9776
|
-
if (firstIn.current &&
|
|
9778
|
+
if (firstIn.current && (value === null || value === void 0 ? void 0 : value.interceptCompany)) {
|
|
9777
9779
|
setInitCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
9778
9780
|
firstIn.current = false;
|
|
9779
9781
|
}
|
|
@@ -10036,6 +10038,67 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10036
10038
|
})));
|
|
10037
10039
|
};
|
|
10038
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(React.Fragment, null, /*#__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), value.length > 1 ? (value || []).map(function (item, index) {
|
|
10088
|
+
return changeIndex === index ? /*#__PURE__*/React.createElement(LogisticsInterception, {
|
|
10089
|
+
key: "logistics-".concat(index),
|
|
10090
|
+
required: required,
|
|
10091
|
+
expressInterceptData: expressInterceptData,
|
|
10092
|
+
value: item,
|
|
10093
|
+
disabled: disabled,
|
|
10094
|
+
isEditing: false,
|
|
10095
|
+
onChange: function onChange(val) {
|
|
10096
|
+
return handleChange(val, index);
|
|
10097
|
+
}
|
|
10098
|
+
}) : null;
|
|
10099
|
+
}) : null);
|
|
10100
|
+
};
|
|
10101
|
+
|
|
10039
10102
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10040
10103
|
var showField = props.showField,
|
|
10041
10104
|
_props$value = props.value,
|
|
@@ -13499,7 +13562,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13499
13562
|
changeOrderInfo[type] = val;
|
|
13500
13563
|
var newList = _toConsumableArray(value);
|
|
13501
13564
|
newList[changeIndex] = changeOrderInfo;
|
|
13502
|
-
console.log(newList, val, type);
|
|
13565
|
+
// console.log(newList, val, type);
|
|
13503
13566
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
13504
13567
|
};
|
|
13505
13568
|
//判断是否是单个且没有商品数据
|
|
@@ -13575,7 +13638,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13575
13638
|
}, [1, 2].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
13576
13639
|
};
|
|
13577
13640
|
var changeHandle = function changeHandle(val, valType) {
|
|
13578
|
-
console.log(val, valType);
|
|
13579
13641
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
13580
13642
|
changeOrderInfo[valType] = val;
|
|
13581
13643
|
if (val !== failValue) {
|
|
@@ -13708,4 +13770,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
13708
13770
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
13709
13771
|
};
|
|
13710
13772
|
|
|
13711
|
-
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 };
|
|
13773
|
+
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
|
@@ -7415,11 +7415,14 @@ var Province = function Province(props) {
|
|
|
7415
7415
|
workOrder: addressData
|
|
7416
7416
|
}[type] || addressData).addressOptions || [];
|
|
7417
7417
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7418
|
+
getBsAddress();
|
|
7418
7419
|
time.current = setTimeout(function () {
|
|
7419
7420
|
initPageSource();
|
|
7420
7421
|
}, 1000);
|
|
7421
7422
|
}
|
|
7422
|
-
|
|
7423
|
+
if (options.length) {
|
|
7424
|
+
setOptions(options);
|
|
7425
|
+
}
|
|
7423
7426
|
case 4:
|
|
7424
7427
|
case "end":
|
|
7425
7428
|
return _context.stop();
|
|
@@ -9755,7 +9758,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9755
9758
|
var address = kmkfUtils.AddressData.getInstance();
|
|
9756
9759
|
var _props$value = props.value,
|
|
9757
9760
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9758
|
-
_props$logisticsOptio = props.logisticsOptions,
|
|
9759
9761
|
_props$expressInterce = props.expressInterceptData,
|
|
9760
9762
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9761
9763
|
_props$required = props.required,
|
|
@@ -9784,7 +9786,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9784
9786
|
var firstIn = React.useRef(true);
|
|
9785
9787
|
React.useEffect(function () {
|
|
9786
9788
|
//存入第一次的物流地址,防止非对接物流切换成对接物流后无法编辑
|
|
9787
|
-
if (firstIn.current &&
|
|
9789
|
+
if (firstIn.current && (value === null || value === void 0 ? void 0 : value.interceptCompany)) {
|
|
9788
9790
|
setInitCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
9789
9791
|
firstIn.current = false;
|
|
9790
9792
|
}
|
|
@@ -10047,6 +10049,67 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10047
10049
|
})));
|
|
10048
10050
|
};
|
|
10049
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(React__default['default'].Fragment, null, /*#__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), value.length > 1 ? (value || []).map(function (item, index) {
|
|
10099
|
+
return changeIndex === index ? /*#__PURE__*/React__default['default'].createElement(LogisticsInterception, {
|
|
10100
|
+
key: "logistics-".concat(index),
|
|
10101
|
+
required: required,
|
|
10102
|
+
expressInterceptData: expressInterceptData,
|
|
10103
|
+
value: item,
|
|
10104
|
+
disabled: disabled,
|
|
10105
|
+
isEditing: false,
|
|
10106
|
+
onChange: function onChange(val) {
|
|
10107
|
+
return handleChange(val, index);
|
|
10108
|
+
}
|
|
10109
|
+
}) : null;
|
|
10110
|
+
}) : null);
|
|
10111
|
+
};
|
|
10112
|
+
|
|
10050
10113
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10051
10114
|
var showField = props.showField,
|
|
10052
10115
|
_props$value = props.value,
|
|
@@ -13510,7 +13573,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13510
13573
|
changeOrderInfo[type] = val;
|
|
13511
13574
|
var newList = _toConsumableArray(value);
|
|
13512
13575
|
newList[changeIndex] = changeOrderInfo;
|
|
13513
|
-
console.log(newList, val, type);
|
|
13576
|
+
// console.log(newList, val, type);
|
|
13514
13577
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
13515
13578
|
};
|
|
13516
13579
|
//判断是否是单个且没有商品数据
|
|
@@ -13586,7 +13649,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13586
13649
|
}, [1, 2].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
|
|
13587
13650
|
};
|
|
13588
13651
|
var changeHandle = function changeHandle(val, valType) {
|
|
13589
|
-
console.log(val, valType);
|
|
13590
13652
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
13591
13653
|
changeOrderInfo[valType] = val;
|
|
13592
13654
|
if (val !== failValue) {
|
|
@@ -13759,6 +13821,7 @@ exports.Invoice = Invoice;
|
|
|
13759
13821
|
exports.JstGoods = jstGoods;
|
|
13760
13822
|
exports.JstItemList = ItemList;
|
|
13761
13823
|
exports.LogisticsInterception = LogisticsInterception;
|
|
13824
|
+
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
13762
13825
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
13763
13826
|
exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
13764
13827
|
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.26.
|
|
3
|
+
"version": "0.26.1-beta.1",
|
|
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.26.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.26.1-beta.1",
|
|
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": "1c8d441453e71ad13b9f3d52f25bcd6d6b2a3635"
|
|
68
68
|
}
|