@kmkf-fe-packages/basic-components 0.26.0 → 0.26.1-beta.0

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
- setOptions(options);
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,
@@ -10036,6 +10038,64 @@ 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("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
+
10039
10099
  var LogisticsTrajectory = function LogisticsTrajectory(props) {
10040
10100
  var showField = props.showField,
10041
10101
  _props$value = props.value,
@@ -13499,7 +13559,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
13499
13559
  changeOrderInfo[type] = val;
13500
13560
  var newList = _toConsumableArray(value);
13501
13561
  newList[changeIndex] = changeOrderInfo;
13502
- console.log(newList, val, type);
13562
+ // console.log(newList, val, type);
13503
13563
  onChange === null || onChange === void 0 ? void 0 : onChange(newList);
13504
13564
  };
13505
13565
  //判断是否是单个且没有商品数据
@@ -13575,7 +13635,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13575
13635
  }, [1, 2].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
13576
13636
  };
13577
13637
  var changeHandle = function changeHandle(val, valType) {
13578
- console.log(val, valType);
13579
13638
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
13580
13639
  changeOrderInfo[valType] = val;
13581
13640
  if (val !== failValue) {
@@ -13708,4 +13767,4 @@ var CalculationInput = function CalculationInput(props) {
13708
13767
  }, config === null || config === void 0 ? void 0 : config.unit));
13709
13768
  };
13710
13769
 
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 };
13770
+ 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
- setOptions(options);
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,
@@ -10047,6 +10049,64 @@ 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("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
+
10050
10110
  var LogisticsTrajectory = function LogisticsTrajectory(props) {
10051
10111
  var showField = props.showField,
10052
10112
  _props$value = props.value,
@@ -13510,7 +13570,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
13510
13570
  changeOrderInfo[type] = val;
13511
13571
  var newList = _toConsumableArray(value);
13512
13572
  newList[changeIndex] = changeOrderInfo;
13513
- console.log(newList, val, type);
13573
+ // console.log(newList, val, type);
13514
13574
  onChange === null || onChange === void 0 ? void 0 : onChange(newList);
13515
13575
  };
13516
13576
  //判断是否是单个且没有商品数据
@@ -13586,7 +13646,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13586
13646
  }, [1, 2].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
13587
13647
  };
13588
13648
  var changeHandle = function changeHandle(val, valType) {
13589
- console.log(val, valType);
13590
13649
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
13591
13650
  changeOrderInfo[valType] = val;
13592
13651
  if (val !== failValue) {
@@ -13759,6 +13818,7 @@ exports.Invoice = Invoice;
13759
13818
  exports.JstGoods = jstGoods;
13760
13819
  exports.JstItemList = ItemList;
13761
13820
  exports.LogisticsInterception = LogisticsInterception;
13821
+ exports.LogisticsMoreInterception = LogisticsMoreInterception;
13762
13822
  exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
13763
13823
  exports.LogisticsTrajectory = LogisticsTrajectory;
13764
13824
  exports.MsgStatus = MsgStatus;
@@ -14,7 +14,6 @@ interface LogisticsInterceptionValueType {
14
14
  }
15
15
  interface LogisticsInterceptionProps {
16
16
  value: Partial<LogisticsInterceptionValueType>;
17
- logisticsOptions: any[];
18
17
  expressInterceptData: any[];
19
18
  required: boolean;
20
19
  disabled: boolean;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LogisticsMoreInterception: (props: any) => React.JSX.Element;
3
+ export default LogisticsMoreInterception;
@@ -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.0",
3
+ "version": "0.26.1-beta.0",
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.0",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.26.1-beta.0",
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": "fc3cec9daee2efddf45a4c4ff9a81b13b1e89aec"
67
+ "gitHead": "6076021dddd379f70de619adfa2217a16b712f14"
68
68
  }