@kmkf-fe-packages/basic-components 2.10.9-beta.20 → 2.10.9-beta.22

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.
Files changed (2) hide show
  1. package/dist/index.esm.js +56 -9
  2. package/package.json +3 -3
package/dist/index.esm.js CHANGED
@@ -13419,7 +13419,6 @@ var Item = Form.Item;
13419
13419
  var LogisticsInterception = function LogisticsInterception(props) {
13420
13420
  var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5;
13421
13421
  var LogisticsAddress = LogisticsAddressData.getInstance();
13422
- var LogisticsAddressOptions = (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13423
13422
  var address = AddressData.getInstance();
13424
13423
  var _props$value = props.value,
13425
13424
  value = _props$value === void 0 ? {} : _props$value,
@@ -13457,6 +13456,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
13457
13456
  _useState8 = _slicedToArray(_useState7, 2),
13458
13457
  isInterface = _useState8[0],
13459
13458
  setIsInterface = _useState8[1];
13459
+ var _useState9 = useState(function () {
13460
+ return (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
13461
+ }),
13462
+ _useState10 = _slicedToArray(_useState9, 2),
13463
+ logisticsAddressData = _useState10[0],
13464
+ setLogisticsAddressData = _useState10[1];
13460
13465
  useEffect(function () {
13461
13466
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
13462
13467
  setTypeOptions([]);
@@ -13554,13 +13559,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13554
13559
  var baseFieldDisabled = disabled || isEdit && !canEditPreCreateBaseFields;
13555
13560
  //退回地址列表
13556
13561
  var logisticsAddressOptions = useMemo(function () {
13557
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13562
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13558
13563
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
13559
13564
  });
13560
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13565
+ }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13561
13566
  // K码列表
13562
13567
  var kCodeList = useMemo(function () {
13563
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13568
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13564
13569
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
13565
13570
  }).map(function (item) {
13566
13571
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -13568,10 +13573,45 @@ var LogisticsInterception = function LogisticsInterception(props) {
13568
13573
  label: item === null || item === void 0 ? void 0 : item.userKCode
13569
13574
  });
13570
13575
  });
13571
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13576
+ }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13572
13577
  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]);
13578
+ return getJdCustomerCodeOptions(logisticsAddressData);
13579
+ }, [logisticsAddressData]);
13580
+ var refreshLogisticsAddressOptions = /*#__PURE__*/function () {
13581
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
13582
+ var _yield$request, data, latestData;
13583
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13584
+ while (1) switch (_context.prev = _context.next) {
13585
+ case 0:
13586
+ _context.prev = 0;
13587
+ _context.next = 3;
13588
+ return request$1({
13589
+ url: '/qy/userConfig/listLogisticsAddress',
13590
+ method: 'get',
13591
+ data: {}
13592
+ });
13593
+ case 3:
13594
+ _yield$request = _context.sent;
13595
+ data = _yield$request.data;
13596
+ latestData = data || [];
13597
+ LogisticsAddress.setaddressData(latestData);
13598
+ setLogisticsAddressData(latestData);
13599
+ _context.next = 13;
13600
+ break;
13601
+ case 10:
13602
+ _context.prev = 10;
13603
+ _context.t0 = _context["catch"](0);
13604
+ console.log(_context.t0);
13605
+ case 13:
13606
+ case "end":
13607
+ return _context.stop();
13608
+ }
13609
+ }, _callee, null, [[0, 10]]);
13610
+ }));
13611
+ return function refreshLogisticsAddressOptions() {
13612
+ return _ref.apply(this, arguments);
13613
+ };
13614
+ }();
13575
13615
  var returnValue = useMemo(function () {
13576
13616
  var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
13577
13617
  var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
@@ -13734,7 +13774,10 @@ var LogisticsInterception = function LogisticsInterception(props) {
13734
13774
  },
13735
13775
  onClick: function onClick() {
13736
13776
  return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
13737
- type: 'interceptConfig'
13777
+ type: 'interceptConfig',
13778
+ state: {
13779
+ tab: 'JDLCodeRelation'
13780
+ }
13738
13781
  }));
13739
13782
  }
13740
13783
  }, 'K码/EBU码配置>>')) : null),
@@ -13752,6 +13795,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13752
13795
  onChange: function onChange(val) {
13753
13796
  return changeHandle(val, 'interceptLogisticsCustomerCode');
13754
13797
  },
13798
+ onFocus: refreshLogisticsAddressOptions,
13755
13799
  options: customerCodeOptions,
13756
13800
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsCustomerCode,
13757
13801
  filterOption: function filterOption(input, option) {
@@ -22886,7 +22930,10 @@ var getColumns$5 = function getColumns() {
22886
22930
  width: 150,
22887
22931
  align: 'center',
22888
22932
  ellipsis: true,
22889
- render: renderTextEllipsis
22933
+ render: renderTextEllipsis,
22934
+ conditionOptionsSetting: {
22935
+ dataType: 'number'
22936
+ }
22890
22937
  }, {
22891
22938
  dataIndex: 'rQty',
22892
22939
  title: "\u5B9E\u6536\u9000\u8D27\u6570\u91CF",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.9-beta.20",
3
+ "version": "2.10.9-beta.22",
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.20",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.22",
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": "6261fb46d01f2b7d9d58992ce851fa25866a60eb"
69
+ "gitHead": "249700cbc5513c3d8cb8599594262cc204ced2c8"
70
70
  }