@kmkf-fe-packages/basic-components 1.22.1-beta.60 → 1.22.1-beta.62

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
@@ -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, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
@@ -7361,7 +7361,8 @@ var Province = function Province(props) {
7361
7361
  var mapping = {
7362
7362
  workOrder: AddressData.getInstance(),
7363
7363
  bs: BsAddressData.getInstance(),
7364
- wdt: WdtAddressData.getInstance()
7364
+ wdt: WdtAddressData.getInstance(),
7365
+ gy: GyAddressData.getInstance()
7365
7366
  };
7366
7367
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7367
7368
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7466,6 +7467,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7466
7467
  var addressData = (type && {
7467
7468
  bs: BsAddressData,
7468
7469
  wdt: WdtAddressData,
7470
+ gy: GyAddressData,
7469
7471
  workOrder: AddressData
7470
7472
  }[type] || AddressData).getInstance();
7471
7473
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
@@ -7547,11 +7549,13 @@ function ApaasPosting(props) {
7547
7549
  });
7548
7550
  }
7549
7551
 
7550
- var _excluded$a = ["value", "onChange", "platformType"];
7552
+ var _excluded$a = ["value", "onChange", "platformType", "type"];
7551
7553
  function ApaasLogistics(props) {
7552
7554
  var value = props.value,
7553
7555
  onChange = props.onChange,
7554
7556
  platformType = props.platformType,
7557
+ _props$type = props.type,
7558
+ type = _props$type === void 0 ? 'select' : _props$type,
7555
7559
  other = _objectWithoutProperties(props, _excluded$a);
7556
7560
  var _useState = useState([]),
7557
7561
  _useState2 = _slicedToArray(_useState, 2),
@@ -7582,7 +7586,14 @@ function ApaasLogistics(props) {
7582
7586
  isFirst.current = true;
7583
7587
  }
7584
7588
  }, []);
7585
- return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
7589
+ var handleInputChange = function handleInputChange(e) {
7590
+ var val = e.target.value;
7591
+ onChange === null || onChange === void 0 ? void 0 : onChange(val);
7592
+ };
7593
+ return type === 'input' ? /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
7594
+ value: value,
7595
+ onChange: handleInputChange
7596
+ })) : /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
7586
7597
  value: value,
7587
7598
  onChange: onChange,
7588
7599
  options: option,
@@ -11019,6 +11030,7 @@ var jstGoods = function jstGoods(props) {
11019
11030
  setChangeIndex = _useState2[1]; //选中的包裹
11020
11031
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
11021
11032
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11033
+ var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11022
11034
  useEffect(function () {
11023
11035
  //没有值塞个默认值
11024
11036
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11092,24 +11104,32 @@ var jstGoods = function jstGoods(props) {
11092
11104
  return setChangeIndex(index);
11093
11105
  }
11094
11106
  }, "\u5305\u88F9".concat(index + 1)));
11095
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
11107
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11108
+ type: logisticsType,
11096
11109
  disabled: disabled,
11097
11110
  placeholder: "\u7269\u6D41\u516C\u53F8",
11098
11111
  onChange: function onChange(val) {
11099
- return changeInputHandle(val, 'logisticsCompany');
11112
+ if (logisticsType === 'input') {
11113
+ changeInputHandle(null, 'logisticsCompany');
11114
+ changeInputHandle(val, 'logisticsCompanyName');
11115
+ } else {
11116
+ changeInputHandle(val, 'logisticsCompany');
11117
+ }
11100
11118
  },
11101
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.logisticsCompany,
11119
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11120
+ }, logisticsType === 'input' ? {} : {
11102
11121
  showSearch: true,
11122
+ dropdownMatchSelectWidth: false,
11103
11123
  filterOption: function filterOption(input, option) {
11104
11124
  return option.label.includes(input);
11105
- },
11106
- dropdownMatchSelectWidth: false,
11125
+ }
11126
+ }), {}, {
11107
11127
  style: {
11108
11128
  minWidth: '100px',
11109
11129
  maxWidth: '180px'
11110
11130
  },
11111
11131
  platformType: platformType
11112
- }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11132
+ })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11113
11133
  disabled: disabled,
11114
11134
  placeholder: "\u7269\u6D41\u5355\u53F7",
11115
11135
  onChange: function onChange(e) {
@@ -15385,7 +15405,8 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
15385
15405
  billType: item.orderTypeName,
15386
15406
  billTag: item.tagName,
15387
15407
  tradeTagName: item.tradeTagName,
15388
- deliveryState: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
15408
+ deliveryState: item.deliveryState,
15409
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
15389
15410
  });
15390
15411
  });
15391
15412
  }
@@ -15818,7 +15839,8 @@ var index$1 = (function (props) {
15818
15839
  billType: billType,
15819
15840
  billTag: billTag,
15820
15841
  tradeTagName: tradeTagName,
15821
- deliveryState: GY_DELIVERY_STATE_MAPPING[deliveryState]
15842
+ deliveryState: deliveryState,
15843
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
15822
15844
  };
15823
15845
  })
15824
15846
  }));
@@ -17763,7 +17785,8 @@ var GyReissue = function GyReissue(props) {
17763
17785
  billType: billType,
17764
17786
  billTag: billTag,
17765
17787
  tradeTagName: tradeTagName,
17766
- deliveryState: GY_DELIVERY_STATE_MAPPING[deliveryState]
17788
+ deliveryState: deliveryState,
17789
+ deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
17767
17790
  });
17768
17791
  });
17769
17792
  onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
package/dist/index.js CHANGED
@@ -7373,7 +7373,8 @@ var Province = function Province(props) {
7373
7373
  var mapping = {
7374
7374
  workOrder: kmkfUtils.AddressData.getInstance(),
7375
7375
  bs: kmkfUtils.BsAddressData.getInstance(),
7376
- wdt: kmkfUtils.WdtAddressData.getInstance()
7376
+ wdt: kmkfUtils.WdtAddressData.getInstance(),
7377
+ gy: kmkfUtils.GyAddressData.getInstance()
7377
7378
  };
7378
7379
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7379
7380
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7478,6 +7479,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7478
7479
  var addressData = (type && {
7479
7480
  bs: kmkfUtils.BsAddressData,
7480
7481
  wdt: kmkfUtils.WdtAddressData,
7482
+ gy: kmkfUtils.GyAddressData,
7481
7483
  workOrder: kmkfUtils.AddressData
7482
7484
  }[type] || kmkfUtils.AddressData).getInstance();
7483
7485
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
@@ -7559,11 +7561,13 @@ function ApaasPosting(props) {
7559
7561
  });
7560
7562
  }
7561
7563
 
7562
- var _excluded$a = ["value", "onChange", "platformType"];
7564
+ var _excluded$a = ["value", "onChange", "platformType", "type"];
7563
7565
  function ApaasLogistics(props) {
7564
7566
  var value = props.value,
7565
7567
  onChange = props.onChange,
7566
7568
  platformType = props.platformType,
7569
+ _props$type = props.type,
7570
+ type = _props$type === void 0 ? 'select' : _props$type,
7567
7571
  other = _objectWithoutProperties(props, _excluded$a);
7568
7572
  var _useState = React.useState([]),
7569
7573
  _useState2 = _slicedToArray(_useState, 2),
@@ -7594,7 +7598,14 @@ function ApaasLogistics(props) {
7594
7598
  isFirst.current = true;
7595
7599
  }
7596
7600
  }, []);
7597
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
7601
+ var handleInputChange = function handleInputChange(e) {
7602
+ var val = e.target.value;
7603
+ onChange === null || onChange === void 0 ? void 0 : onChange(val);
7604
+ };
7605
+ return type === 'input' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
7606
+ value: value,
7607
+ onChange: handleInputChange
7608
+ })) : /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
7598
7609
  value: value,
7599
7610
  onChange: onChange,
7600
7611
  options: option,
@@ -11031,6 +11042,7 @@ var jstGoods = function jstGoods(props) {
11031
11042
  setChangeIndex = _useState2[1]; //选中的包裹
11032
11043
  var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
11033
11044
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11045
+ var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11034
11046
  React.useEffect(function () {
11035
11047
  //没有值塞个默认值
11036
11048
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11104,24 +11116,32 @@ var jstGoods = function jstGoods(props) {
11104
11116
  return setChangeIndex(index);
11105
11117
  }
11106
11118
  }, "\u5305\u88F9".concat(index + 1)));
11107
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
11119
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11120
+ type: logisticsType,
11108
11121
  disabled: disabled,
11109
11122
  placeholder: "\u7269\u6D41\u516C\u53F8",
11110
11123
  onChange: function onChange(val) {
11111
- return changeInputHandle(val, 'logisticsCompany');
11124
+ if (logisticsType === 'input') {
11125
+ changeInputHandle(null, 'logisticsCompany');
11126
+ changeInputHandle(val, 'logisticsCompanyName');
11127
+ } else {
11128
+ changeInputHandle(val, 'logisticsCompany');
11129
+ }
11112
11130
  },
11113
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.logisticsCompany,
11131
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11132
+ }, logisticsType === 'input' ? {} : {
11114
11133
  showSearch: true,
11134
+ dropdownMatchSelectWidth: false,
11115
11135
  filterOption: function filterOption(input, option) {
11116
11136
  return option.label.includes(input);
11117
- },
11118
- dropdownMatchSelectWidth: false,
11137
+ }
11138
+ }), {}, {
11119
11139
  style: {
11120
11140
  minWidth: '100px',
11121
11141
  maxWidth: '180px'
11122
11142
  },
11123
11143
  platformType: platformType
11124
- }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11144
+ })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11125
11145
  disabled: disabled,
11126
11146
  placeholder: "\u7269\u6D41\u5355\u53F7",
11127
11147
  onChange: function onChange(e) {
@@ -15397,7 +15417,8 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
15397
15417
  billType: item.orderTypeName,
15398
15418
  billTag: item.tagName,
15399
15419
  tradeTagName: item.tradeTagName,
15400
- deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
15420
+ deliveryState: item.deliveryState,
15421
+ deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
15401
15422
  });
15402
15423
  });
15403
15424
  }
@@ -15830,7 +15851,8 @@ var index$1 = (function (props) {
15830
15851
  billType: billType,
15831
15852
  billTag: billTag,
15832
15853
  tradeTagName: tradeTagName,
15833
- deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
15854
+ deliveryState: deliveryState,
15855
+ deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
15834
15856
  };
15835
15857
  })
15836
15858
  }));
@@ -17775,7 +17797,8 @@ var GyReissue = function GyReissue(props) {
17775
17797
  billType: billType,
17776
17798
  billTag: billTag,
17777
17799
  tradeTagName: tradeTagName,
17778
- deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
17800
+ deliveryState: deliveryState,
17801
+ deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
17779
17802
  });
17780
17803
  });
17781
17804
  onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface ApaasLogisticsProps {
3
+ type?: 'select' | 'input';
3
4
  value: any;
4
5
  onChange: (val: any) => void;
5
6
  [propName: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "1.22.1-beta.60",
3
+ "version": "1.22.1-beta.62",
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": "1.22.1-beta.60",
23
+ "@kmkf-fe-packages/kmkf-utils": "1.22.1-beta.62",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.9",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "4294b9ce062ebadf9b41a69e74d2904b58632ef8"
68
+ "gitHead": "8292bf6d7b28318d4475d2ddf1ed82ee90d23b77"
69
69
  }