@kmkf-fe-packages/basic-components 0.27.1-test.4 → 0.27.1-test.8
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 +8 -15
- package/dist/index.js +7 -14
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
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
|
-
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData,
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, useSendData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
@@ -7563,10 +7563,11 @@ function ApaasPosting(props) {
|
|
|
7563
7563
|
});
|
|
7564
7564
|
}
|
|
7565
7565
|
|
|
7566
|
-
var _excluded$a = ["value", "onChange"];
|
|
7566
|
+
var _excluded$a = ["value", "onChange", "type"];
|
|
7567
7567
|
function ApaasLogistics(props) {
|
|
7568
7568
|
var value = props.value,
|
|
7569
7569
|
onChange = props.onChange,
|
|
7570
|
+
type = props.type,
|
|
7570
7571
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7571
7572
|
var _useState = useState([]),
|
|
7572
7573
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7579,7 +7580,7 @@ function ApaasLogistics(props) {
|
|
|
7579
7580
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7580
7581
|
while (1) switch (_context.prev = _context.next) {
|
|
7581
7582
|
case 0:
|
|
7582
|
-
express = ExpressData.getInstance();
|
|
7583
|
+
express = ExpressData.getInstance(type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
|
|
7583
7584
|
setOptions(express.expressData || []);
|
|
7584
7585
|
case 2:
|
|
7585
7586
|
case "end":
|
|
@@ -10417,23 +10418,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
10417
10418
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10418
10419
|
changeIndex = _useState2[0],
|
|
10419
10420
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10420
|
-
var
|
|
10421
|
-
|
|
10422
|
-
wdtSendOptions = _useState4[0],
|
|
10423
|
-
setSendOptions = _useState4[1];
|
|
10421
|
+
var _useSendData = useSendData(componentType === 'WDT_SEND_GOOD' ? 'wdt' : ''),
|
|
10422
|
+
wdtSendOptions = _useSendData.sendData;
|
|
10424
10423
|
useEffect(function () {
|
|
10425
10424
|
//没有值塞个默认值
|
|
10426
10425
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10427
10426
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10428
10427
|
}
|
|
10429
10428
|
}, [value, type]);
|
|
10430
|
-
useEffect(function () {
|
|
10431
|
-
if (type === 3 && componentType === 'WDT_SEND_GOOD' && ['sendName', 'all'].includes(showField)) {
|
|
10432
|
-
WDT.getWarehouseDataAsync().then(setSendOptions).catch(function (e) {
|
|
10433
|
-
message.error((e === null || e === void 0 ? void 0 : e.message) || '获取发货仓数据失败,请刷新重试');
|
|
10434
|
-
});
|
|
10435
|
-
}
|
|
10436
|
-
}, []);
|
|
10437
10429
|
var content = function content(item, index) {
|
|
10438
10430
|
return /*#__PURE__*/React.createElement("div", {
|
|
10439
10431
|
style: {
|
|
@@ -10507,7 +10499,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
10507
10499
|
style: {
|
|
10508
10500
|
minWidth: '100px',
|
|
10509
10501
|
maxWidth: '180px'
|
|
10510
|
-
}
|
|
10502
|
+
},
|
|
10503
|
+
type: componentType
|
|
10511
10504
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
10512
10505
|
disabled: disabled,
|
|
10513
10506
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
package/dist/index.js
CHANGED
|
@@ -7574,10 +7574,11 @@ function ApaasPosting(props) {
|
|
|
7574
7574
|
});
|
|
7575
7575
|
}
|
|
7576
7576
|
|
|
7577
|
-
var _excluded$a = ["value", "onChange"];
|
|
7577
|
+
var _excluded$a = ["value", "onChange", "type"];
|
|
7578
7578
|
function ApaasLogistics(props) {
|
|
7579
7579
|
var value = props.value,
|
|
7580
7580
|
onChange = props.onChange,
|
|
7581
|
+
type = props.type,
|
|
7581
7582
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7582
7583
|
var _useState = React.useState([]),
|
|
7583
7584
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7590,7 +7591,7 @@ function ApaasLogistics(props) {
|
|
|
7590
7591
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7591
7592
|
while (1) switch (_context.prev = _context.next) {
|
|
7592
7593
|
case 0:
|
|
7593
|
-
express = kmkfUtils.ExpressData.getInstance();
|
|
7594
|
+
express = kmkfUtils.ExpressData.getInstance(type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
|
|
7594
7595
|
setOptions(express.expressData || []);
|
|
7595
7596
|
case 2:
|
|
7596
7597
|
case "end":
|
|
@@ -10428,23 +10429,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
10428
10429
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10429
10430
|
changeIndex = _useState2[0],
|
|
10430
10431
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10431
|
-
var
|
|
10432
|
-
|
|
10433
|
-
wdtSendOptions = _useState4[0],
|
|
10434
|
-
setSendOptions = _useState4[1];
|
|
10432
|
+
var _useSendData = kmkfUtils.useSendData(componentType === 'WDT_SEND_GOOD' ? 'wdt' : ''),
|
|
10433
|
+
wdtSendOptions = _useSendData.sendData;
|
|
10435
10434
|
React.useEffect(function () {
|
|
10436
10435
|
//没有值塞个默认值
|
|
10437
10436
|
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10438
10437
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10439
10438
|
}
|
|
10440
10439
|
}, [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
|
-
}, []);
|
|
10448
10440
|
var content = function content(item, index) {
|
|
10449
10441
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10450
10442
|
style: {
|
|
@@ -10518,7 +10510,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
10518
10510
|
style: {
|
|
10519
10511
|
minWidth: '100px',
|
|
10520
10512
|
maxWidth: '180px'
|
|
10521
|
-
}
|
|
10513
|
+
},
|
|
10514
|
+
type: componentType
|
|
10522
10515
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10523
10516
|
disabled: disabled,
|
|
10524
10517
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.27.1-test.
|
|
3
|
+
"version": "0.27.1-test.8",
|
|
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.27.1-test.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.8",
|
|
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": "79152b18e9f8e50a947afa54628538a09b70b900"
|
|
68
68
|
}
|