@kmkf-fe-packages/basic-components 2.10.9-beta.13 → 2.10.9-beta.15

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, 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, 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';
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';
@@ -8632,7 +8632,7 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
8632
8632
  address = every(address, function (item) {
8633
8633
  return !item;
8634
8634
  }) ? [] : address;
8635
- var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey'];
8635
+ var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
8636
8636
  var map = subFields.reduce(function (cur, nxt) {
8637
8637
  return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8638
8638
  }, {});
@@ -13471,6 +13471,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13471
13471
  setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
13472
13472
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
13473
13473
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13474
+ useEffect(function () {
13475
+ if (!isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && (value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode) !== undefined) {
13476
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13477
+ interceptLogisticsCustomerCode: undefined
13478
+ }));
13479
+ }
13480
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode]);
13474
13481
  //拦截类型切换 需要清空派送地址
13475
13482
  useEffect(function () {
13476
13483
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) return;
@@ -13533,6 +13540,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13533
13540
  }
13534
13541
  return isShow;
13535
13542
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13543
+ var showCustomerCode = useMemo(function () {
13544
+ return isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
13545
+ }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13536
13546
  //判断是否能修改物流信息
13537
13547
  var isEdit = useMemo(function () {
13538
13548
  var company = expressInterceptData.find(function (item) {
@@ -13559,6 +13569,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13559
13569
  });
13560
13570
  });
13561
13571
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13572
+ var customerCodeOptions = useMemo(function () {
13573
+ return getJdCustomerCodeOptions(LogisticsAddressOptions, value === null || value === void 0 ? void 0 : value.interceptCompany);
13574
+ }, [LogisticsAddressOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13562
13575
  var returnValue = useMemo(function () {
13563
13576
  var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
13564
13577
  var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
@@ -13614,9 +13627,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13614
13627
  // userSecretKey: '12345678',
13615
13628
  // },
13616
13629
  // ];
13617
- var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13618
- return item.cpCode === val && item.userKCode;
13619
- });
13620
13630
  newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
13621
13631
  interceptCompany: val,
13622
13632
  interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
@@ -13635,7 +13645,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
13635
13645
  },
13636
13646
  interceptLogisticsApiStatusReason: undefined,
13637
13647
  interceptLogisticsUserKCode: undefined,
13638
- interceptLogisticsUserSecretKey: undefined
13648
+ interceptLogisticsUserSecretKey: undefined,
13649
+ interceptLogisticsCustomerCode: undefined
13639
13650
  });
13640
13651
  }
13641
13652
  if (type === 'interceptLogisticsApiStatus') {
@@ -13716,7 +13727,37 @@ var LogisticsInterception = function LogisticsInterception(props) {
13716
13727
  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');
13717
13728
  },
13718
13729
  value: value === null || value === void 0 ? void 0 : value.interceptCode
13719
- }))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13730
+ }))), /*#__PURE__*/React.createElement(Item, {
13731
+ label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801", platform === 'pc' ? /*#__PURE__*/React.createElement(React.Fragment, null, "\uFF1A", /*#__PURE__*/React.createElement(Typography.Link, {
13732
+ style: {
13733
+ cursor: 'pointer'
13734
+ },
13735
+ onClick: function onClick() {
13736
+ return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
13737
+ type: 'interceptConfig'
13738
+ }));
13739
+ }
13740
+ }, 'K码/EBU码配置>>')) : null),
13741
+ required: showCustomerCode,
13742
+ key: 'interceptLogisticsCustomerCode',
13743
+ hidden: !showCustomerCode
13744
+ }, /*#__PURE__*/React.createElement(Select, {
13745
+ disabled: disabled,
13746
+ placeholder: "\u9009\u62E9\u5BA2\u6237\u7F16\u7801",
13747
+ notFoundContent: "\u6682\u65E0\u5BA2\u6237\u7F16\u7801\u914D\u7F6E\uFF0C\u8BF7\u5148\u524D\u5F80K\u7801/EBU\u7801\u914D\u7F6E>>",
13748
+ showSearch: true,
13749
+ style: {
13750
+ width: '200px'
13751
+ },
13752
+ onChange: function onChange(val) {
13753
+ return changeHandle(val, 'interceptLogisticsCustomerCode');
13754
+ },
13755
+ options: customerCodeOptions,
13756
+ value: value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode,
13757
+ filterOption: function filterOption(input, option) {
13758
+ return option.label.includes(input);
13759
+ }
13760
+ })), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
13720
13761
  label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
13721
13762
  style: {
13722
13763
  cursor: 'pointer'
@@ -13761,7 +13802,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13761
13802
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
13762
13803
  }))), /*#__PURE__*/React.createElement(Item, {
13763
13804
  label: '拦截类型',
13764
- required: required,
13805
+ required: required && !showCustomerCode,
13765
13806
  key: 'interceptType'
13766
13807
  }, /*#__PURE__*/React.createElement(Select, {
13767
13808
  disabled: baseFieldDisabled,
@@ -21253,17 +21294,18 @@ var getColumns$2 = function getColumns(_ref) {
21253
21294
  };
21254
21295
 
21255
21296
  var getYesOrNo$4 = function getYesOrNo(val) {
21297
+ var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['是', '否'];
21256
21298
  switch (val) {
21257
21299
  case true:
21258
21300
  case '1':
21259
21301
  case 1:
21260
- return '是';
21302
+ return content[0];
21261
21303
  case false:
21262
21304
  case '0':
21263
21305
  case 0:
21264
21306
  return '否';
21265
21307
  default:
21266
- return null;
21308
+ return content[1];
21267
21309
  }
21268
21310
  };
21269
21311
 
@@ -21462,7 +21504,7 @@ var getColumns$3 = function getColumns(_ref) {
21462
21504
  label: '非赠品',
21463
21505
  value: 0
21464
21506
  }]
21465
- }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
21507
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
21466
21508
  }
21467
21509
  }, {
21468
21510
  dataIndex: 'isPackage',
@@ -21694,7 +21736,7 @@ var getColumns$3 = function getColumns(_ref) {
21694
21736
  label: '非赠品',
21695
21737
  value: 0
21696
21738
  }]
21697
- }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
21739
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val, ['赠品', '非赠品']));
21698
21740
  }
21699
21741
  }, {
21700
21742
  dataIndex: 'isPackage',
@@ -27211,6 +27253,16 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
27211
27253
  }
27212
27254
  }).then(function (data) {
27213
27255
  if (data === null || data === void 0 ? void 0 : data.success) {
27256
+ var _data$data, _data$data$doOrders;
27257
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$doOrders = _data$data.doOrders) === null || _data$data$doOrders === void 0 ? void 0 : _data$data$doOrders.length) {
27258
+ var _data$data2;
27259
+ (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.doOrders.forEach(function (item) {
27260
+ item.platformOrderNo = data.platformOrderNo;
27261
+ item.shopCode = data.shopCode;
27262
+ item.shopName = data.shopName;
27263
+ item.split = data.split;
27264
+ });
27265
+ }
27214
27266
  resolve((data === null || data === void 0 ? void 0 : data.data) || {});
27215
27267
  // 延迟10秒清除,保证订单的时效性
27216
27268
  setTimeout(function () {
@@ -19,6 +19,7 @@ interface LogisticsInterceptionValueType {
19
19
  interceptLogisticsApiStatusReason: string;
20
20
  interceptLogisticsUserKCode: string;
21
21
  interceptLogisticsUserSecretKey: string;
22
+ interceptLogisticsCustomerCode: string;
22
23
  }
23
24
  interface LogisticsInterceptionProps {
24
25
  value: Partial<LogisticsInterceptionValueType>;
@@ -1 +1 @@
1
- export declare const getYesOrNo: (val: boolean | string | number) => "是" | "否" | null;
1
+ export declare const getYesOrNo: (val: boolean | string | number, content?: string[]) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.9-beta.13",
3
+ "version": "2.10.9-beta.15",
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.9-beta.12",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.15",
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": "e3f8d7e54fb659a27f9a5b4dce555178609caf1d"
69
+ "gitHead": "951c615176f420e82fd527c8f4b1245c922ebc74"
70
70
  }