@kmkf-fe-packages/basic-components 2.10.18-rc.0 → 2.10.18

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, Image, InputNumber, Input, Select, Upload, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, PlusSquareOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, VideoCameraTwoTone } 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, GyAddressData, JstAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, isJdLogisticsCompany, getJdCustomerCodeOptions, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, DxdSuppliersData, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterJkyOrders, JKY_ORDER_FROM_MAP, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, getJkyLogisticInfo, filterKmOrders, getSystemShowHead, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, PLATFORM_AFTER_SALES_ORDER_CONFIG, DXD_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateJkyGoodsHandle, updateDxdGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, DxdSuppliersData, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterJkyOrders, JKY_ORDER_FROM_MAP, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, getJkyLogisticInfo, filterKmOrders, getSystemShowHead, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, PLATFORM_AFTER_SALES_ORDER_CONFIG, DXD_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateJkyGoodsHandle, updateDxdGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import every from 'lodash/every';
8
8
  import maxBy from 'lodash/maxBy';
9
9
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } from 'lodash';
@@ -8630,7 +8630,7 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
8630
8630
  address = every(address, function (item) {
8631
8631
  return !item;
8632
8632
  }) ? [] : address;
8633
- var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
8633
+ var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey'];
8634
8634
  var map = subFields.reduce(function (cur, nxt) {
8635
8635
  return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8636
8636
  }, {});
@@ -13417,6 +13417,7 @@ var Item = Form.Item;
13417
13417
  var LogisticsInterception = function LogisticsInterception(props) {
13418
13418
  var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5;
13419
13419
  var LogisticsAddress = LogisticsAddressData.getInstance();
13420
+ var LogisticsAddressOptions = (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13420
13421
  var address = AddressData.getInstance();
13421
13422
  var _props$value = props.value,
13422
13423
  value = _props$value === void 0 ? {} : _props$value,
@@ -13454,12 +13455,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13454
13455
  _useState8 = _slicedToArray(_useState7, 2),
13455
13456
  isInterface = _useState8[0],
13456
13457
  setIsInterface = _useState8[1];
13457
- var _useState9 = useState(function () {
13458
- return (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13459
- }),
13460
- _useState10 = _slicedToArray(_useState9, 2),
13461
- logisticsAddressData = _useState10[0],
13462
- setLogisticsAddressData = _useState10[1];
13463
13458
  useEffect(function () {
13464
13459
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
13465
13460
  setTypeOptions([]);
@@ -13474,13 +13469,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13474
13469
  setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
13475
13470
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
13476
13471
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13477
- useEffect(function () {
13478
- if (!isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && (value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode) !== undefined) {
13479
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13480
- interceptLogisticsCustomerCode: undefined
13481
- }));
13482
- }
13483
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode]);
13484
13472
  //拦截类型切换 需要清空派送地址
13485
13473
  useEffect(function () {
13486
13474
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) return;
@@ -13543,9 +13531,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13543
13531
  }
13544
13532
  return isShow;
13545
13533
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13546
- var showCustomerCode = useMemo(function () {
13547
- return isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
13548
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13549
13534
  //判断是否能修改物流信息
13550
13535
  var isEdit = useMemo(function () {
13551
13536
  var company = expressInterceptData.find(function (item) {
@@ -13557,13 +13542,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13557
13542
  var baseFieldDisabled = disabled || isEdit && !canEditPreCreateBaseFields;
13558
13543
  //退回地址列表
13559
13544
  var logisticsAddressOptions = useMemo(function () {
13560
- return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13545
+ return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13561
13546
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
13562
13547
  });
13563
- }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13548
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13564
13549
  // K码列表
13565
13550
  var kCodeList = useMemo(function () {
13566
- return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13551
+ return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13567
13552
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
13568
13553
  }).map(function (item) {
13569
13554
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -13571,44 +13556,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13571
13556
  label: item === null || item === void 0 ? void 0 : item.userKCode
13572
13557
  });
13573
13558
  });
13574
- }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13575
- var customerCodeOptions = useMemo(function () {
13576
- return getJdCustomerCodeOptions(logisticsAddressData);
13577
- }, [logisticsAddressData]);
13578
- var refreshLogisticsAddressOptions = /*#__PURE__*/function () {
13579
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
13580
- var _yield$request, data, latestData;
13581
- return _regeneratorRuntime().wrap(function _callee$(_context) {
13582
- while (1) switch (_context.prev = _context.next) {
13583
- case 0:
13584
- _context.prev = 0;
13585
- _context.next = 3;
13586
- return request$1({
13587
- url: '/qy/userConfig/listLogisticsAddress',
13588
- method: 'get',
13589
- data: {}
13590
- });
13591
- case 3:
13592
- _yield$request = _context.sent;
13593
- data = _yield$request.data;
13594
- latestData = data || [];
13595
- LogisticsAddress.setaddressData(latestData);
13596
- setLogisticsAddressData(latestData);
13597
- _context.next = 12;
13598
- break;
13599
- case 10:
13600
- _context.prev = 10;
13601
- _context.t0 = _context["catch"](0);
13602
- case 12:
13603
- case "end":
13604
- return _context.stop();
13605
- }
13606
- }, _callee, null, [[0, 10]]);
13607
- }));
13608
- return function refreshLogisticsAddressOptions() {
13609
- return _ref.apply(this, arguments);
13610
- };
13611
- }();
13559
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13612
13560
  var returnValue = useMemo(function () {
13613
13561
  var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
13614
13562
  var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
@@ -13664,6 +13612,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13664
13612
  // userSecretKey: '12345678',
13665
13613
  // },
13666
13614
  // ];
13615
+ var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13616
+ return item.cpCode === val && item.userKCode;
13617
+ });
13667
13618
  newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
13668
13619
  interceptCompany: val,
13669
13620
  interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
@@ -13682,8 +13633,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13682
13633
  },
13683
13634
  interceptLogisticsApiStatusReason: undefined,
13684
13635
  interceptLogisticsUserKCode: undefined,
13685
- interceptLogisticsUserSecretKey: undefined,
13686
- interceptLogisticsCustomerCode: undefined
13636
+ interceptLogisticsUserSecretKey: undefined
13687
13637
  });
13688
13638
  }
13689
13639
  if (type === 'interceptLogisticsApiStatus') {
@@ -13763,41 +13713,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13763
13713
  return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'interceptCode');
13764
13714
  },
13765
13715
  value: value === null || value === void 0 ? void 0 : value.interceptCode
13766
- }))), /*#__PURE__*/React.createElement(Item, {
13767
- label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801", platform === 'pc' ? /*#__PURE__*/React.createElement(React.Fragment, null, "\uFF1A", /*#__PURE__*/React.createElement(Typography.Link, {
13768
- style: {
13769
- cursor: 'pointer'
13770
- },
13771
- onClick: function onClick() {
13772
- return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
13773
- type: 'interceptConfig',
13774
- state: {
13775
- tab: 'JDLCodeRelation'
13776
- }
13777
- }));
13778
- }
13779
- }, 'K码/EBU码配置>>')) : null),
13780
- required: showCustomerCode,
13781
- key: 'interceptLogisticsCustomerCode',
13782
- hidden: !showCustomerCode
13783
- }, /*#__PURE__*/React.createElement(Select, {
13784
- disabled: disabled,
13785
- placeholder: "\u9009\u62E9\u5BA2\u6237\u7F16\u7801",
13786
- notFoundContent: "\u6682\u65E0\u5BA2\u6237\u7F16\u7801\u914D\u7F6E\uFF0C\u8BF7\u5148\u524D\u5F80K\u7801/EBU\u7801\u914D\u7F6E>>",
13787
- showSearch: true,
13788
- style: {
13789
- width: '200px'
13790
- },
13791
- onChange: function onChange(val) {
13792
- return changeHandle(val, 'interceptLogisticsCustomerCode');
13793
- },
13794
- onFocus: refreshLogisticsAddressOptions,
13795
- options: customerCodeOptions,
13796
- value: value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode,
13797
- filterOption: function filterOption(input, option) {
13798
- return option.label.includes(input);
13799
- }
13800
- })), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13716
+ }))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13801
13717
  label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
13802
13718
  style: {
13803
13719
  cursor: 'pointer'
@@ -13842,7 +13758,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13842
13758
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
13843
13759
  }))), /*#__PURE__*/React.createElement(Item, {
13844
13760
  label: '拦截类型',
13845
- required: required && !showCustomerCode,
13761
+ required: required,
13846
13762
  key: 'interceptType'
13847
13763
  }, /*#__PURE__*/React.createElement(Select, {
13848
13764
  disabled: baseFieldDisabled,
@@ -19,7 +19,6 @@ interface LogisticsInterceptionValueType {
19
19
  interceptLogisticsApiStatusReason: string;
20
20
  interceptLogisticsUserKCode: string;
21
21
  interceptLogisticsUserSecretKey: string;
22
- interceptLogisticsCustomerCode: string;
23
22
  }
24
23
  interface LogisticsInterceptionProps {
25
24
  value: Partial<LogisticsInterceptionValueType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.18-rc.0",
3
+ "version": "2.10.18",
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": "2.10.18-rc.0",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.18",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "e3685738e3d1d8182972135f59f9041227602789"
69
+ "gitHead": "d7783cafaa84b93e5f6a84605a6cef1f8d3945b7"
70
70
  }