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

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,9 +1,9 @@
1
1
  import React, { useState, useMemo, useEffect, useRef, forwardRef, useImperativeHandle, useCallback } from 'react';
2
- import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate as Rate$1, Form, Popover, Tooltip, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Empty, Tag } from 'antd';
2
+ import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate as Rate$1, Form, Popover, Tooltip, Table, Tabs, ConfigProvider, Pagination, Typography, Empty, Skeleton, Tag } from 'antd';
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';
@@ -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'];
8633
+ var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
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,7 +13417,6 @@ 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()) || [];
13421
13420
  var address = AddressData.getInstance();
13422
13421
  var _props$value = props.value,
13423
13422
  value = _props$value === void 0 ? {} : _props$value,
@@ -13455,6 +13454,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
13455
13454
  _useState8 = _slicedToArray(_useState7, 2),
13456
13455
  isInterface = _useState8[0],
13457
13456
  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];
13458
13463
  useEffect(function () {
13459
13464
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
13460
13465
  setTypeOptions([]);
@@ -13469,6 +13474,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13469
13474
  setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
13470
13475
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
13471
13476
  }, [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]);
13472
13484
  //拦截类型切换 需要清空派送地址
13473
13485
  useEffect(function () {
13474
13486
  if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) return;
@@ -13531,6 +13543,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13531
13543
  }
13532
13544
  return isShow;
13533
13545
  }, [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]);
13534
13549
  //判断是否能修改物流信息
13535
13550
  var isEdit = useMemo(function () {
13536
13551
  var company = expressInterceptData.find(function (item) {
@@ -13542,13 +13557,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13542
13557
  var baseFieldDisabled = disabled || isEdit && !canEditPreCreateBaseFields;
13543
13558
  //退回地址列表
13544
13559
  var logisticsAddressOptions = useMemo(function () {
13545
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13560
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13546
13561
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
13547
13562
  });
13548
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
13563
+ }, [logisticsAddressData, value === null || value === void 0 ? void 0 : value.interceptCompany]);
13549
13564
  // K码列表
13550
13565
  var kCodeList = useMemo(function () {
13551
- return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13566
+ return logisticsAddressData === null || logisticsAddressData === void 0 ? void 0 : logisticsAddressData.filter(function (item) {
13552
13567
  return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
13553
13568
  }).map(function (item) {
13554
13569
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -13556,7 +13571,44 @@ var LogisticsInterception = function LogisticsInterception(props) {
13556
13571
  label: item === null || item === void 0 ? void 0 : item.userKCode
13557
13572
  });
13558
13573
  });
13559
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
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
+ }();
13560
13612
  var returnValue = useMemo(function () {
13561
13613
  var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
13562
13614
  var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
@@ -13612,9 +13664,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
13612
13664
  // userSecretKey: '12345678',
13613
13665
  // },
13614
13666
  // ];
13615
- var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
13616
- return item.cpCode === val && item.userKCode;
13617
- });
13618
13667
  newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
13619
13668
  interceptCompany: val,
13620
13669
  interceptType: (_defaultInterceptType = defaultInterceptType) === null || _defaultInterceptType === void 0 ? void 0 : _defaultInterceptType.value,
@@ -13633,7 +13682,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
13633
13682
  },
13634
13683
  interceptLogisticsApiStatusReason: undefined,
13635
13684
  interceptLogisticsUserKCode: undefined,
13636
- interceptLogisticsUserSecretKey: undefined
13685
+ interceptLogisticsUserSecretKey: undefined,
13686
+ interceptLogisticsCustomerCode: undefined
13637
13687
  });
13638
13688
  }
13639
13689
  if (type === 'interceptLogisticsApiStatus') {
@@ -13713,7 +13763,41 @@ var LogisticsInterception = function LogisticsInterception(props) {
13713
13763
  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');
13714
13764
  },
13715
13765
  value: value === null || value === void 0 ? void 0 : value.interceptCode
13716
- }))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
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, {
13717
13801
  label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
13718
13802
  style: {
13719
13803
  cursor: 'pointer'
@@ -13758,7 +13842,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13758
13842
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
13759
13843
  }))), /*#__PURE__*/React.createElement(Item, {
13760
13844
  label: '拦截类型',
13761
- required: required,
13845
+ required: required && !showCustomerCode,
13762
13846
  key: 'interceptType'
13763
13847
  }, /*#__PURE__*/React.createElement(Select, {
13764
13848
  disabled: baseFieldDisabled,
@@ -16271,11 +16355,17 @@ var OptionalInput = function OptionalInput(props) {
16271
16355
  });
16272
16356
  }
16273
16357
  };
16358
+ var handleBlur = function handleBlur(event) {
16359
+ var nextTarget = event.relatedTarget;
16360
+ if (nextTarget && event.currentTarget.contains(nextTarget)) return;
16361
+ if (typeof onBlur === 'function') onBlur(event);
16362
+ };
16274
16363
  return /*#__PURE__*/React.createElement("div", {
16275
16364
  style: {
16276
16365
  display: 'flex',
16277
16366
  alignItems: 'center'
16278
- }
16367
+ },
16368
+ onBlur: handleBlur
16279
16369
  }, /*#__PURE__*/React.createElement(Select, {
16280
16370
  className: "optional-input-select",
16281
16371
  style: {
@@ -16283,8 +16373,7 @@ var OptionalInput = function OptionalInput(props) {
16283
16373
  },
16284
16374
  options: compareSymbolList,
16285
16375
  onChange: handleSelectChange,
16286
- value: (value === null || value === void 0 ? void 0 : value.type) || 'like',
16287
- onBlur: onBlur
16376
+ value: (value === null || value === void 0 ? void 0 : value.type) || 'like'
16288
16377
  }), /*#__PURE__*/React.createElement(Input, _objectSpread2({
16289
16378
  style: {
16290
16379
  width: '150px'
@@ -16293,11 +16382,34 @@ var OptionalInput = function OptionalInput(props) {
16293
16382
  placeholder: placeholder,
16294
16383
  onChange: handleInputChange,
16295
16384
  onPressEnter: onPressEnter,
16296
- onBlur: onBlur,
16297
16385
  value: value === null || value === void 0 ? void 0 : value.inputValue
16298
16386
  }, formItemProps)));
16299
16387
  };
16300
16388
 
16389
+ var transformFormData = function transformFormData(formData) {
16390
+ var conditionList = [];
16391
+ for (var key in formData) {
16392
+ if (formData[key]) {
16393
+ var _formData$key, _formData$key2, _formData$key3, _formData$key4;
16394
+ var value = ((_formData$key = formData[key]) === null || _formData$key === void 0 ? void 0 : _formData$key.type) ? (_formData$key2 = formData[key]) === null || _formData$key2 === void 0 ? void 0 : _formData$key2.inputValue : formData[key];
16395
+ var compareSymbol = ((_formData$key3 = formData[key]) === null || _formData$key3 === void 0 ? void 0 : _formData$key3.type) ? (_formData$key4 = formData[key]) === null || _formData$key4 === void 0 ? void 0 : _formData$key4.type : Array.isArray(value) ? 'eq' : 'like';
16396
+ if (!isNull(value)) {
16397
+ conditionList.push({
16398
+ leftValue: key,
16399
+ compareSymbol: compareSymbol,
16400
+ rightValue: value
16401
+ });
16402
+ }
16403
+ }
16404
+ }
16405
+ return conditionList;
16406
+ };
16407
+ var shouldSubmitOnBlur = function shouldSubmitOnBlur(relatedTarget) {
16408
+ var _target$closest;
16409
+ var target = relatedTarget;
16410
+ return !(target === null || target === void 0 ? void 0 : (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, '.search-form-actions'));
16411
+ };
16412
+
16301
16413
  function SearchForm(_ref) {
16302
16414
  var searchFormData = _ref.searchFormData,
16303
16415
  form = _ref.form,
@@ -16332,6 +16444,10 @@ function SearchForm(_ref) {
16332
16444
  return _ref2.apply(this, arguments);
16333
16445
  };
16334
16446
  }();
16447
+ var submitFormOnBlur = function submitFormOnBlur(event) {
16448
+ if (!shouldSubmitOnBlur(event.relatedTarget)) return;
16449
+ submitForm();
16450
+ };
16335
16451
  return /*#__PURE__*/React.createElement(Form, {
16336
16452
  layout: "inline",
16337
16453
  form: form,
@@ -16353,9 +16469,7 @@ function SearchForm(_ref) {
16353
16469
  onPressEnter: function onPressEnter() {
16354
16470
  return submitForm();
16355
16471
  },
16356
- onBlur: function onBlur() {
16357
- return submitForm();
16358
- },
16472
+ onBlur: submitFormOnBlur,
16359
16473
  placeholder: label,
16360
16474
  formItemProps: formItemProps
16361
16475
  }) : type === 'select' ? /*#__PURE__*/React.createElement(Select, _objectSpread2({
@@ -16365,9 +16479,7 @@ function SearchForm(_ref) {
16365
16479
  style: {
16366
16480
  width: 150
16367
16481
  },
16368
- onBlur: function onBlur() {
16369
- return submitForm();
16370
- }
16482
+ onBlur: submitFormOnBlur
16371
16483
  }, formItemProps)) : /*#__PURE__*/React.createElement(Input, _objectSpread2({
16372
16484
  placeholder: label,
16373
16485
  allowClear: true,
@@ -16377,9 +16489,7 @@ function SearchForm(_ref) {
16377
16489
  onPressEnter: function onPressEnter() {
16378
16490
  return submitForm();
16379
16491
  },
16380
- onBlur: function onBlur() {
16381
- return submitForm();
16382
- }
16492
+ onBlur: submitFormOnBlur
16383
16493
  }, formItemProps)));
16384
16494
  }), /*#__PURE__*/React.createElement(Form.Item, {
16385
16495
  style: {
@@ -16399,21 +16509,200 @@ function SearchForm(_ref) {
16399
16509
  }, "\u91CD\u7F6E")));
16400
16510
  }
16401
16511
 
16402
- var transformFormData = function transformFormData(formData) {
16403
- var conditionList = [];
16404
- for (var key in formData) {
16405
- if (formData[key]) {
16406
- var _formData$key, _formData$key2, _formData$key3, _formData$key4;
16407
- var value = ((_formData$key = formData[key]) === null || _formData$key === void 0 ? void 0 : _formData$key.type) ? (_formData$key2 = formData[key]) === null || _formData$key2 === void 0 ? void 0 : _formData$key2.inputValue : formData[key];
16408
- var compareSymbol = ((_formData$key3 = formData[key]) === null || _formData$key3 === void 0 ? void 0 : _formData$key3.type) ? (_formData$key4 = formData[key]) === null || _formData$key4 === void 0 ? void 0 : _formData$key4.type : Array.isArray(value) ? 'eq' : 'like';
16409
- conditionList.push({
16410
- leftValue: key,
16411
- compareSymbol: compareSymbol,
16412
- rightValue: value
16512
+ var ACTION_CONFIG = {
16513
+ JST_ERP: [{
16514
+ sourceField: 'styleCode',
16515
+ requestField: 'styleCodes'
16516
+ }, {
16517
+ sourceField: 'goodNo',
16518
+ requestField: 'goodNos'
16519
+ }],
16520
+ WLN_ERP: [{
16521
+ sourceField: 'goodNo',
16522
+ requestField: 'goodNos'
16523
+ }, {
16524
+ sourceField: 'specNo',
16525
+ requestField: 'skuCodes'
16526
+ }],
16527
+ WDT_ERP: [{
16528
+ sourceField: 'goodNo',
16529
+ requestField: 'goodNos'
16530
+ }, {
16531
+ sourceField: 'skuCode',
16532
+ requestField: 'skuCodes'
16533
+ }],
16534
+ GY_ERP: [{
16535
+ sourceField: 'goodNo',
16536
+ requestField: 'goodNos'
16537
+ }],
16538
+ JY_ERP: [{
16539
+ sourceField: 'goodNo',
16540
+ requestField: 'goodNos'
16541
+ }, {
16542
+ sourceField: 'skuCode',
16543
+ requestField: 'skuCodes'
16544
+ }],
16545
+ KM_ERP: [{
16546
+ sourceField: 'goodNo',
16547
+ requestField: 'goodNos'
16548
+ }, {
16549
+ sourceField: 'skuCode',
16550
+ requestField: 'skuCodes'
16551
+ }]
16552
+ };
16553
+ var getSearchValue = function getSearchValue(value) {
16554
+ var _value$inputValue;
16555
+ var inputValue = (_value$inputValue = value === null || value === void 0 ? void 0 : value.inputValue) !== null && _value$inputValue !== void 0 ? _value$inputValue : value;
16556
+ if (inputValue === undefined || inputValue === null) return '';
16557
+ return String(inputValue).trim();
16558
+ };
16559
+ var getSkuType = function getSkuType(platform, formData) {
16560
+ if (platform !== 'JST_ERP' && platform !== 'WLN_ERP') return undefined;
16561
+ var values = Array.isArray(formData.skuType) ? formData.skuType : [formData.skuType];
16562
+ var skuTypes = values.filter(function (value) {
16563
+ return value === 'normal' || value === 'combine';
16564
+ });
16565
+ return skuTypes.length === 1 ? skuTypes[0] : undefined;
16566
+ };
16567
+ var getReSyncActions = function getReSyncActions(platform, total, formData) {
16568
+ if (total !== 0) return [];
16569
+ var skuType = getSkuType(platform, formData);
16570
+ var requestData = _objectSpread2({
16571
+ platform: platform
16572
+ }, skuType ? {
16573
+ skuType: skuType
16574
+ } : {});
16575
+ var values = [];
16576
+ ACTION_CONFIG[platform].forEach(function (config) {
16577
+ var value = getSearchValue(formData[config.sourceField]);
16578
+ if (!value) return;
16579
+ requestData[config.requestField] = [value];
16580
+ values.push(value);
16581
+ });
16582
+ if (!values.length) return [];
16583
+ return [{
16584
+ key: 'goods',
16585
+ label: '同步商品',
16586
+ targetName: '商品',
16587
+ value: values.join('、'),
16588
+ requestData: requestData
16589
+ }];
16590
+ };
16591
+
16592
+ var useGoodsReSyncQuery = function useGoodsReSyncQuery(service) {
16593
+ var _React$useState = React.useState({
16594
+ total: null,
16595
+ formData: {}
16596
+ }),
16597
+ _React$useState2 = _slicedToArray(_React$useState, 2),
16598
+ queryState = _React$useState2[0],
16599
+ setQueryState = _React$useState2[1];
16600
+ var serviceWithReSyncState = React.useCallback(function (pagination, formData) {
16601
+ var currentFormData = formData;
16602
+ setQueryState({
16603
+ total: null,
16604
+ formData: currentFormData
16605
+ });
16606
+ return service(pagination, formData).then(function (result) {
16607
+ setQueryState({
16608
+ total: result.total,
16609
+ formData: currentFormData
16413
16610
  });
16414
- }
16415
- }
16416
- return conditionList;
16611
+ return result;
16612
+ }, function (error) {
16613
+ setQueryState({
16614
+ total: null,
16615
+ formData: currentFormData
16616
+ });
16617
+ throw error;
16618
+ });
16619
+ }, [service]);
16620
+ return [serviceWithReSyncState, queryState];
16621
+ };
16622
+ var getErrorMessage = function getErrorMessage(error, action) {
16623
+ var _error$data;
16624
+ return (error === null || error === void 0 ? void 0 : (_error$data = error.data) === null || _error$data === void 0 ? void 0 : _error$data.message) || (error === null || error === void 0 ? void 0 : error.message) || "".concat(action.label, "\u5931\u8D25");
16625
+ };
16626
+ var GoodsReSync = function GoodsReSync(_ref) {
16627
+ var platform = _ref.platform,
16628
+ queryState = _ref.queryState,
16629
+ onSuccess = _ref.onSuccess;
16630
+ var _React$useState3 = React.useState(null),
16631
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
16632
+ loadingAction = _React$useState4[0],
16633
+ setLoadingAction = _React$useState4[1];
16634
+ var actions = getReSyncActions(platform, queryState.total, queryState.formData);
16635
+ var handleReSync = function handleReSync(action) {
16636
+ Modal.confirm({
16637
+ title: "\u786E\u8BA4".concat(action.label),
16638
+ content: "\u5C06\u4ECE ERP \u91CD\u65B0\u62C9\u53D6".concat(action.targetName, "\u201C").concat(action.value, "\u201D\u5E76\u8986\u76D6\u672C\u5730\u6570\u636E"),
16639
+ okText: '确认同步',
16640
+ cancelText: '取消',
16641
+ onOk: function () {
16642
+ var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
16643
+ var response;
16644
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
16645
+ while (1) switch (_context.prev = _context.next) {
16646
+ case 0:
16647
+ setLoadingAction(action.key);
16648
+ _context.prev = 1;
16649
+ _context.next = 4;
16650
+ return extendRequest('/qy/gdfw/product/reSync', {
16651
+ method: 'post',
16652
+ timeout: 60000,
16653
+ data: action.requestData
16654
+ });
16655
+ case 4:
16656
+ response = _context.sent;
16657
+ if (!((response === null || response === void 0 ? void 0 : response.success) === false)) {
16658
+ _context.next = 7;
16659
+ break;
16660
+ }
16661
+ throw new Error(response.message || "".concat(action.label, "\u5931\u8D25"));
16662
+ case 7:
16663
+ message.success((response === null || response === void 0 ? void 0 : response.message) || "".concat(action.label, "\u6210\u529F"));
16664
+ _context.next = 10;
16665
+ return onSuccess();
16666
+ case 10:
16667
+ _context.next = 16;
16668
+ break;
16669
+ case 12:
16670
+ _context.prev = 12;
16671
+ _context.t0 = _context["catch"](1);
16672
+ message.error(getErrorMessage(_context.t0, action));
16673
+ throw _context.t0;
16674
+ case 16:
16675
+ _context.prev = 16;
16676
+ setLoadingAction(null);
16677
+ return _context.finish(16);
16678
+ case 19:
16679
+ case "end":
16680
+ return _context.stop();
16681
+ }
16682
+ }, _callee, null, [[1, 12, 16, 19]]);
16683
+ }));
16684
+ function onOk() {
16685
+ return _onOk.apply(this, arguments);
16686
+ }
16687
+ return onOk;
16688
+ }()
16689
+ });
16690
+ };
16691
+ return /*#__PURE__*/React.createElement(Empty, {
16692
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
16693
+ description: actions.length ? /*#__PURE__*/React.createElement(Space, {
16694
+ size: 8
16695
+ }, actions.map(function (action) {
16696
+ return /*#__PURE__*/React.createElement(Button, {
16697
+ key: action.key,
16698
+ loading: loadingAction === action.key,
16699
+ disabled: loadingAction !== null && loadingAction !== action.key,
16700
+ onClick: function onClick() {
16701
+ return handleReSync(action);
16702
+ }
16703
+ }, action.label);
16704
+ })) : '暂无数据'
16705
+ });
16417
16706
  };
16418
16707
 
16419
16708
  var getTableData = function getTableData(_ref, formData) {
@@ -16473,13 +16762,16 @@ var GoodList = function GoodList(props, ref) {
16473
16762
  var _Form$useForm = Form.useForm(),
16474
16763
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
16475
16764
  form = _Form$useForm2[0];
16476
- var _useAntdTable = useAntdTable(getTableData, {
16765
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData),
16766
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
16767
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
16768
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
16769
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
16477
16770
  defaultPageSize: 10,
16478
16771
  form: form
16479
16772
  }),
16480
16773
  tableProps = _useAntdTable.tableProps,
16481
- search = _useAntdTable.search,
16482
- params = _useAntdTable.params;
16774
+ search = _useAntdTable.search;
16483
16775
  var submit = search.submit,
16484
16776
  reset = search.reset;
16485
16777
  var setGoodBrandList = function setGoodBrandList() {
@@ -16670,6 +16962,13 @@ var GoodList = function GoodList(props, ref) {
16670
16962
  y: 250
16671
16963
  }
16672
16964
  }, tableProps), {}, {
16965
+ locale: {
16966
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
16967
+ platform: "WDT_ERP",
16968
+ queryState: reSyncQueryState,
16969
+ onSuccess: submit
16970
+ })
16971
+ },
16673
16972
  size: "small"
16674
16973
  }))), /*#__PURE__*/React.createElement(Popover, {
16675
16974
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -16814,13 +17113,16 @@ var GoodList$1 = function GoodList(props, ref) {
16814
17113
  var _Form$useForm = Form.useForm(),
16815
17114
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
16816
17115
  form = _Form$useForm2[0];
16817
- var _useAntdTable = useAntdTable(getTableData$1, {
17116
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$1),
17117
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
17118
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
17119
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
17120
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
16818
17121
  defaultPageSize: 10,
16819
17122
  form: form
16820
17123
  }),
16821
17124
  tableProps = _useAntdTable.tableProps,
16822
- search = _useAntdTable.search,
16823
- params = _useAntdTable.params;
17125
+ search = _useAntdTable.search;
16824
17126
  var submit = search.submit,
16825
17127
  reset = search.reset;
16826
17128
  var rowSelection = {
@@ -16922,7 +17224,7 @@ var GoodList$1 = function GoodList(props, ref) {
16922
17224
  style: {
16923
17225
  marginTop: '4px'
16924
17226
  }
16925
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
17227
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
16926
17228
  className: "GoodModalColumns",
16927
17229
  rowSelection: rowSelection,
16928
17230
  rowKey: "goodNo",
@@ -16932,7 +17234,15 @@ var GoodList$1 = function GoodList(props, ref) {
16932
17234
  y: 250
16933
17235
  },
16934
17236
  size: "small"
16935
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
17237
+ }, tableProps), {}, {
17238
+ locale: {
17239
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
17240
+ platform: "JST_ERP",
17241
+ queryState: reSyncQueryState,
17242
+ onSuccess: submit
17243
+ })
17244
+ }
17245
+ }))), /*#__PURE__*/React.createElement(Popover, {
16936
17246
  getPopupContainer: function getPopupContainer(triggerNode) {
16937
17247
  return triggerNode.parentElement;
16938
17248
  },
@@ -17305,13 +17615,16 @@ var GoodList$3 = function GoodList(props, ref) {
17305
17615
  var _Form$useForm = Form.useForm(),
17306
17616
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
17307
17617
  form = _Form$useForm2[0];
17308
- var _useAntdTable = useAntdTable(getTableData$3, {
17618
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$3),
17619
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
17620
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
17621
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
17622
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
17309
17623
  defaultPageSize: 10,
17310
17624
  form: form
17311
17625
  }),
17312
17626
  tableProps = _useAntdTable.tableProps,
17313
- search = _useAntdTable.search,
17314
- params = _useAntdTable.params;
17627
+ search = _useAntdTable.search;
17315
17628
  var submit = search.submit,
17316
17629
  reset = search.reset;
17317
17630
  var rowSelection = {
@@ -17413,7 +17726,7 @@ var GoodList$3 = function GoodList(props, ref) {
17413
17726
  style: {
17414
17727
  marginTop: '4px'
17415
17728
  }
17416
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
17729
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
17417
17730
  className: "GoodModalColumns",
17418
17731
  rowSelection: rowSelection,
17419
17732
  rowKey: rowCheckKey,
@@ -17423,7 +17736,15 @@ var GoodList$3 = function GoodList(props, ref) {
17423
17736
  y: 250
17424
17737
  },
17425
17738
  size: "small"
17426
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
17739
+ }, tableProps), {}, {
17740
+ locale: {
17741
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
17742
+ platform: "KM_ERP",
17743
+ queryState: reSyncQueryState,
17744
+ onSuccess: submit
17745
+ })
17746
+ }
17747
+ }))), /*#__PURE__*/React.createElement(Popover, {
17427
17748
  getPopupContainer: function getPopupContainer(triggerNode) {
17428
17749
  return triggerNode.parentElement;
17429
17750
  },
@@ -17555,13 +17876,16 @@ var GoodList$4 = function GoodList(props, ref) {
17555
17876
  var _Form$useForm = Form.useForm(),
17556
17877
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
17557
17878
  form = _Form$useForm2[0];
17558
- var _useAntdTable = useAntdTable(getTableData$4, {
17879
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$4),
17880
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
17881
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
17882
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
17883
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
17559
17884
  defaultPageSize: 10,
17560
17885
  form: form
17561
17886
  }),
17562
17887
  tableProps = _useAntdTable.tableProps,
17563
- search = _useAntdTable.search,
17564
- params = _useAntdTable.params;
17888
+ search = _useAntdTable.search;
17565
17889
  var submit = search.submit,
17566
17890
  reset = search.reset;
17567
17891
  var rowSelection = {
@@ -17664,6 +17988,13 @@ var GoodList$4 = function GoodList(props, ref) {
17664
17988
  y: 250
17665
17989
  }
17666
17990
  }, tableProps), {}, {
17991
+ locale: {
17992
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
17993
+ platform: "GY_ERP",
17994
+ queryState: reSyncQueryState,
17995
+ onSuccess: submit
17996
+ })
17997
+ },
17667
17998
  size: "small"
17668
17999
  }))), /*#__PURE__*/React.createElement(Popover, {
17669
18000
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -19247,13 +19578,16 @@ var GoodList$5 = function GoodList(props, ref) {
19247
19578
  var _Form$useForm = Form.useForm(),
19248
19579
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
19249
19580
  form = _Form$useForm2[0];
19250
- var _useAntdTable = useAntdTable(getTableData$5, {
19581
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$5),
19582
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
19583
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
19584
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
19585
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
19251
19586
  defaultPageSize: 10,
19252
19587
  form: form
19253
19588
  }),
19254
19589
  tableProps = _useAntdTable.tableProps,
19255
- search = _useAntdTable.search,
19256
- params = _useAntdTable.params;
19590
+ search = _useAntdTable.search;
19257
19591
  var submit = search.submit,
19258
19592
  reset = search.reset;
19259
19593
  var rowSelection = {
@@ -19355,7 +19689,7 @@ var GoodList$5 = function GoodList(props, ref) {
19355
19689
  style: {
19356
19690
  marginTop: '4px'
19357
19691
  }
19358
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
19692
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
19359
19693
  className: "GoodModalColumns",
19360
19694
  rowSelection: rowSelection,
19361
19695
  rowKey: "id",
@@ -19365,7 +19699,15 @@ var GoodList$5 = function GoodList(props, ref) {
19365
19699
  y: 250
19366
19700
  },
19367
19701
  size: "small"
19368
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
19702
+ }, tableProps), {}, {
19703
+ locale: {
19704
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
19705
+ platform: "WLN_ERP",
19706
+ queryState: reSyncQueryState,
19707
+ onSuccess: submit
19708
+ })
19709
+ }
19710
+ }))), /*#__PURE__*/React.createElement(Popover, {
19369
19711
  getPopupContainer: function getPopupContainer(triggerNode) {
19370
19712
  return triggerNode.parentElement;
19371
19713
  },
@@ -19494,13 +19836,16 @@ var GoodList$6 = function GoodList(props, ref) {
19494
19836
  var _Form$useForm = Form.useForm(),
19495
19837
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
19496
19838
  form = _Form$useForm2[0];
19497
- var _useAntdTable = useAntdTable(getTableData$6, {
19839
+ var _useGoodsReSyncQuery = useGoodsReSyncQuery(getTableData$6),
19840
+ _useGoodsReSyncQuery2 = _slicedToArray(_useGoodsReSyncQuery, 2),
19841
+ getTableDataWithReSync = _useGoodsReSyncQuery2[0],
19842
+ reSyncQueryState = _useGoodsReSyncQuery2[1];
19843
+ var _useAntdTable = useAntdTable(getTableDataWithReSync, {
19498
19844
  defaultPageSize: 10,
19499
19845
  form: form
19500
19846
  }),
19501
19847
  tableProps = _useAntdTable.tableProps,
19502
- search = _useAntdTable.search,
19503
- params = _useAntdTable.params;
19848
+ search = _useAntdTable.search;
19504
19849
  var submit = search.submit,
19505
19850
  reset = search.reset;
19506
19851
  var rowSelection = {
@@ -19602,7 +19947,7 @@ var GoodList$6 = function GoodList(props, ref) {
19602
19947
  style: {
19603
19948
  marginTop: '4px'
19604
19949
  }
19605
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
19950
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
19606
19951
  className: "GoodModalColumns",
19607
19952
  rowSelection: rowSelection,
19608
19953
  rowKey: "id",
@@ -19612,7 +19957,15 @@ var GoodList$6 = function GoodList(props, ref) {
19612
19957
  y: 250
19613
19958
  },
19614
19959
  size: "small"
19615
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
19960
+ }, tableProps), {}, {
19961
+ locale: {
19962
+ emptyText: /*#__PURE__*/React.createElement(GoodsReSync, {
19963
+ platform: "JY_ERP",
19964
+ queryState: reSyncQueryState,
19965
+ onSuccess: submit
19966
+ })
19967
+ }
19968
+ }))), /*#__PURE__*/React.createElement(Popover, {
19616
19969
  getPopupContainer: function getPopupContainer(triggerNode) {
19617
19970
  return triggerNode.parentElement;
19618
19971
  },
@@ -22819,6 +23172,7 @@ var getColumns$5 = function getColumns() {
22819
23172
  }, {
22820
23173
  dataIndex: 'qty',
22821
23174
  title: "\u7533\u8BF7\u6570\u91CF",
23175
+ conditionTitle: "\u7533\u8BF7\u603B\u6570\u91CF",
22822
23176
  width: 150,
22823
23177
  align: 'center',
22824
23178
  ellipsis: true,
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { type ReSyncPlatform } from './utils';
3
+ export type ReSyncQueryState = {
4
+ total: number | null;
5
+ formData: Record<string, any>;
6
+ };
7
+ type QueryService<TFormData, TResult extends {
8
+ total: number;
9
+ }> = (pagination: any, formData: TFormData) => Promise<TResult>;
10
+ export declare const useGoodsReSyncQuery: <TFormData, TResult extends {
11
+ total: number;
12
+ }>(service: QueryService<TFormData, TResult>) => readonly [(pagination: any, formData: TFormData) => Promise<TResult>, ReSyncQueryState];
13
+ type Props = {
14
+ platform: ReSyncPlatform;
15
+ queryState: ReSyncQueryState;
16
+ onSuccess: () => void | Promise<void>;
17
+ };
18
+ declare const GoodsReSync: ({ platform, queryState, onSuccess }: Props) => React.JSX.Element;
19
+ export default GoodsReSync;
@@ -0,0 +1,15 @@
1
+ export type ReSyncPlatform = 'JST_ERP' | 'WLN_ERP' | 'WDT_ERP' | 'GY_ERP' | 'JY_ERP' | 'KM_ERP';
2
+ export type ReSyncAction = {
3
+ key: 'goods';
4
+ label: '同步商品';
5
+ targetName: '商品';
6
+ value: string;
7
+ requestData: {
8
+ platform: ReSyncPlatform;
9
+ goodNos?: string[];
10
+ skuCodes?: string[];
11
+ styleCodes?: string[];
12
+ skuType?: 'normal' | 'combine';
13
+ };
14
+ };
15
+ export declare const getReSyncActions: (platform: ReSyncPlatform, total: number | null, formData: Record<string, any>) => ReSyncAction[];
@@ -3,3 +3,4 @@ export declare const transformFormData: (formData: Record<string, any>) => {
3
3
  compareSymbol: any;
4
4
  rightValue: any;
5
5
  }[];
6
+ export declare const shouldSubmitOnBlur: (relatedTarget: EventTarget | null) => boolean;
@@ -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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.17",
3
+ "version": "2.10.18-rc.1",
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.17",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.18-rc.1",
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": "211a683cc107ee6ac1889660707f5b9074a7a8ad"
69
+ "gitHead": "33f416d689e64ffcb4d28c23a649cd8538da4946"
70
70
  }