@kmkf-fe-packages/kmkf-work-order-service-component 1.19.4-beta.0 → 1.19.4

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.
@@ -29,7 +29,7 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, grou
29
29
  import 'moment/locale/zh-cn';
30
30
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
31
31
  // 重复检验不需要展示在顶部的
32
- INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
32
+ INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
33
33
  import { replaceCheck, orderDetail, queryLabelByTradeId } from "../../../model/servers/api";
34
34
  import { factory } from '@kmkf-fe-packages/services-components';
35
35
  import { getExpression, formatDisplayConfig, isNull, LabelData } from '@kmkf-fe-packages/kmkf-utils';
@@ -648,13 +648,6 @@ var FormRender = function FormRender(props, ref) {
648
648
  form: form
649
649
  });
650
650
  }
651
- if (workOrderComponentType === 'BS_E3_SYSTEM_ORDER') {
652
- bsE3SystemOrderBackValues({
653
- templateList: templateDetail,
654
- value: value,
655
- form: form
656
- });
657
- }
658
651
  if (logisticsMappingConfig && ['INPUT', 'EXPRESS_LOGISTICS_SELECT', 'BS_LOGISTICS'].includes(workOrderComponentType)) {
659
652
  setLogisticsInfo({
660
653
  logisticsMappingConfig: logisticsMappingConfig,
@@ -709,7 +702,7 @@ var FormRender = function FormRender(props, ref) {
709
702
  setShopId(val);
710
703
  // 清空表单字段
711
704
  var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
712
- if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS', 'WDT_RETURN_GOODS', 'WDT_EXCHANGE_GOODS', 'KM_SEND_GOOD', 'BS_E3_SYSTEM_ORDER'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
705
+ if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS', 'WDT_RETURN_GOODS', 'WDT_EXCHANGE_GOODS', 'KM_SEND_GOOD'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
713
706
  cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
714
707
  }
715
708
  return cur;
@@ -3,7 +3,6 @@ export declare const COMMON_HOST = "https://kefu.kuaimai.com";
3
3
  export declare const HD_HOST = "https://kefuab.kuaimai.com";
4
4
  interface LoginProps {
5
5
  loginCallBack?: (val: any) => void;
6
- clickImgCallBack?: () => void;
7
6
  }
8
7
  declare const ProviderLogin: (props: LoginProps) => React.JSX.Element;
9
8
  export default ProviderLogin;
@@ -21,8 +21,7 @@ import styles from "./index.module.less";
21
21
  export var COMMON_HOST = 'https://kefu.kuaimai.com';
22
22
  export var HD_HOST = 'https://kefuab.kuaimai.com';
23
23
  var Login = function Login(props) {
24
- var loginCallBack = props.loginCallBack,
25
- clickImgCallBack = props.clickImgCallBack;
24
+ var loginCallBack = props.loginCallBack;
26
25
  var _useState = useState(''),
27
26
  _useState2 = _slicedToArray(_useState, 2),
28
27
  name = _useState2[0],
@@ -249,8 +248,7 @@ var Login = function Login(props) {
249
248
  className: styles.logo
250
249
  }, /*#__PURE__*/React.createElement("img", {
251
250
  src: logo,
252
- alt: "logo",
253
- onClick: clickImgCallBack
251
+ alt: "logo"
254
252
  })), /*#__PURE__*/React.createElement(Form, {
255
253
  className: styles.container
256
254
  }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
@@ -97,7 +97,6 @@ export declare const deleteCacheOrder: ({ templateList, values, nodeId, flowTemp
97
97
  unDeleteOrderInfo: boolean;
98
98
  }) => void;
99
99
  export declare const bsSystemOrderBackValues: ({ templateList, value, form }: any) => void;
100
- export declare const bsE3SystemOrderBackValues: ({ templateList, value, form }: any) => void;
101
100
  export declare const wlnSystemOrderBackValues: ({ templateList, value, form }: any) => void;
102
101
  export declare const wdtSystemOrderBackValues: ({ templateList, value, form }: any) => void;
103
102
  export declare const getMappingConfigByTemplateDetail: (templateDetail: {
@@ -19,9 +19,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
19
19
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
20
20
  import { get, every, maxBy, last, cloneDeep, isEqual, set } from 'lodash';
21
21
  import V from 'voca';
22
- import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail, wdtOrderDetail, bsE3OrderDetail } from "../../model/servers/api";
22
+ import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail, wdtOrderDetail } from "../../model/servers/api";
23
23
  import moment from 'moment';
24
- import { AddressData, ExpressData, ExpressInterceptData, orderBackFormValues, bsOrderBackFormValues, bsE3OrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, bsE3OrderTransform, wlnOrderTransform, wdtOrderTransform, filterBsE3Orders, filterWdtOrders, unTransField, transMultSelectOptions } from '@kmkf-fe-packages/kmkf-utils';
24
+ import { AddressData, ExpressData, ExpressInterceptData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, wdtOrderTransform, filterWdtOrders, unTransField, transMultSelectOptions } from '@kmkf-fe-packages/kmkf-utils';
25
25
  import Monitor from 'kmkf-monitor';
26
26
  import { PlatForm } from "../../model/flowTemplateDetail/types";
27
27
  import cache from "../cache";
@@ -871,7 +871,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
871
871
  }),
872
872
  name: item.name
873
873
  });
874
- } else if (['BS_GOODS', 'WDT_GOODS', 'BS_E3_GOODS'].includes(item.workOrderComponentType)) {
874
+ } else if (['BS_GOODS', 'WDT_GOODS'].includes(item.workOrderComponentType)) {
875
875
  var gooodsMap = {
876
876
  BS_GOODS: {
877
877
  type: 'bsGoods',
@@ -880,10 +880,6 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
880
880
  WDT_GOODS: {
881
881
  type: 'wdtGoods',
882
882
  shopCode: 'shopCode'
883
- },
884
- BS_E3_GOODS: {
885
- type: 'bsE3Goods',
886
- shopCode: 'shopCode'
887
883
  }
888
884
  };
889
885
  var goods = get(nowData, "".concat(item.uniqueKey), {});
@@ -1052,16 +1048,9 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
1052
1048
  content: get(nowData, "".concat(item.uniqueKey, ".postingReceiverMobile"), ''),
1053
1049
  name: item.name
1054
1050
  });
1055
- } else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER', 'BS_E3_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
1051
+ } else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
1056
1052
  var selectIds = get(nowData, "".concat(item.uniqueKey, ".selectIds"), '');
1057
1053
  var showOrderInfo = get(nowData, "".concat(item.uniqueKey, ".showOrderInfo"), []);
1058
- var type = item.workOrderComponentType;
1059
- var keyMap = {
1060
- BS_SYSTEM_ORDER: 'billNo',
1061
- WLN_SYSTEM_ORDER: 'billNo',
1062
- WDT_SYSTEM_ORDER: 'billNo',
1063
- BS_E3_SYSTEM_ORDER: 'orderSn'
1064
- };
1065
1054
  contentVoList.push({
1066
1055
  uniqueKey: "".concat(item.uniqueKey, "_").concat(systemOrderMap[item.workOrderComponentType].no),
1067
1056
  content: get(nowData, "".concat(item.uniqueKey, ".orderNo"), ''),
@@ -1074,7 +1063,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
1074
1063
  uniqueKey: "".concat(item.uniqueKey, "_").concat(systemOrderMap[item.workOrderComponentType].order),
1075
1064
  content: showOrderInfo.map(function (item) {
1076
1065
  return _objectSpread(_objectSpread({}, item), {}, {
1077
- select: (selectIds || []).includes(item === null || item === void 0 ? void 0 : item[keyMap[type]])
1066
+ select: (selectIds || []).includes(item.billNo)
1078
1067
  });
1079
1068
  }),
1080
1069
  name: item.name
@@ -1217,11 +1206,6 @@ var systemOrderMap = {
1217
1206
  no: 'wdtSystemOrderNo',
1218
1207
  ids: 'wdtSystemSelectIds',
1219
1208
  order: 'wdtSystemShowOrder'
1220
- },
1221
- BS_E3_SYSTEM_ORDER: {
1222
- no: 'bsE3SystemOrderNo',
1223
- ids: 'bsE3SystemSelectIds',
1224
- order: 'bsE3SystemShowOrder'
1225
1209
  }
1226
1210
  };
1227
1211
  var transDataSource = function transDataSource(templateColumns) {
@@ -1540,7 +1524,7 @@ var transDataSource = function transDataSource(templateColumns) {
1540
1524
  postingReceiverName: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverName")],
1541
1525
  postingReceiverMobile: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverMobile")]
1542
1526
  }));
1543
- } else if (['BS_GOODS', 'WDT_GOODS', 'BS_E3_GOODS'].includes(nex.workOrderComponentType)) {
1527
+ } else if (['BS_GOODS', 'WDT_GOODS'].includes(nex.workOrderComponentType)) {
1544
1528
  var _values2;
1545
1529
  var gooodsMap = {
1546
1530
  BS_GOODS: {
@@ -1550,10 +1534,6 @@ var transDataSource = function transDataSource(templateColumns) {
1550
1534
  WDT_GOODS: {
1551
1535
  type: 'wdtGoods',
1552
1536
  shopCode: 'shopCode'
1553
- },
1554
- BS_E3_GOODS: {
1555
- type: 'bsE3Goods',
1556
- shopCode: 'shopCode'
1557
1537
  }
1558
1538
  };
1559
1539
  var _values = (_values2 = {}, _defineProperty(_values2, gooodsMap[nex.workOrderComponentType].type, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].type)], [])), _defineProperty(_values2, gooodsMap[nex.workOrderComponentType].shopCode, item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].shopCode)]), _values2);
@@ -1575,24 +1555,6 @@ var transDataSource = function transDataSource(templateColumns) {
1575
1555
  _values.selectIds = selectIds;
1576
1556
  _values.orderNo = orderNo;
1577
1557
  }
1578
- if (nex.workOrderComponentType === 'BS_E3_GOODS') {
1579
- var _selectIds = [];
1580
- var _orderNo = '';
1581
- var _tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
1582
- return col.workOrderComponentType === 'TRADE_ID_INPUT';
1583
- });
1584
- if (_tradeId) {
1585
- _orderNo = item.jsonMap["".concat(_tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[_tradeId.workOrderComponentType])];
1586
- }
1587
- var bsE3SystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
1588
- return col.workOrderComponentType === 'BS_E3_SYSTEM_ORDER';
1589
- });
1590
- if (bsE3SystemOrder) {
1591
- _selectIds = jsonParseSecurity(item.jsonMap["".concat(bsE3SystemOrder.uniqueKey, "_").concat(systemOrderMap[bsE3SystemOrder.workOrderComponentType].ids)], []);
1592
- }
1593
- _values.selectIds = _selectIds;
1594
- _values.orderNo = _orderNo;
1595
- }
1596
1558
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _values));
1597
1559
  } else if (nex.workOrderComponentType === 'BS_REISSUE_GOODS') {
1598
1560
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
@@ -1663,7 +1625,7 @@ var transDataSource = function transDataSource(templateColumns) {
1663
1625
  }
1664
1626
  };
1665
1627
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)], [])), _defineProperty(_$concat, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)], [])), _defineProperty(_$concat, returnGoodsMap[compType].shopCodeKey, item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey)]), _$concat)));
1666
- } else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER', 'BS_E3_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
1628
+ } else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
1667
1629
  var _systemOrderMap = {
1668
1630
  BS_SYSTEM_ORDER: {
1669
1631
  no: 'bsSystemOrderNo',
@@ -1679,11 +1641,6 @@ var transDataSource = function transDataSource(templateColumns) {
1679
1641
  no: 'wdtSystemOrderNo',
1680
1642
  ids: 'wdtSystemSelectIds',
1681
1643
  order: 'wdtSystemShowOrder'
1682
- },
1683
- BS_E3_SYSTEM_ORDER: {
1684
- no: 'bsE3SystemOrderNo',
1685
- ids: 'bsE3SystemSelectIds',
1686
- order: 'bsE3SystemShowOrder'
1687
1644
  }
1688
1645
  };
1689
1646
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
@@ -1725,16 +1682,16 @@ var transDataSource = function transDataSource(templateColumns) {
1725
1682
  shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
1726
1683
  }));
1727
1684
  } else if (nex.workOrderComponentType === 'WDT_REISSUE_GOODS') {
1728
- var _orderNo2 = '';
1729
- var _tradeId2 = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
1685
+ var _orderNo = '';
1686
+ var _tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
1730
1687
  return col.workOrderComponentType === 'TRADE_ID_INPUT';
1731
1688
  });
1732
- if (_tradeId2) {
1733
- _orderNo2 = item.jsonMap["".concat(_tradeId2.uniqueKey, "_").concat(updateWorkTypeKeys[_tradeId2.workOrderComponentType])];
1689
+ if (_tradeId) {
1690
+ _orderNo = item.jsonMap["".concat(_tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[_tradeId.workOrderComponentType])];
1734
1691
  }
1735
1692
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
1736
1693
  wdtSystemOrder: {
1737
- orderNo: _orderNo2
1694
+ orderNo: _orderNo
1738
1695
  },
1739
1696
  wdtReissueType: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueType")], ['1']),
1740
1697
  wdtReissueGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueGoods")], []),
@@ -1767,7 +1724,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
1767
1724
  //订单返填
1768
1725
  export var orderBack = /*#__PURE__*/function () {
1769
1726
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
1770
- var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasBsE3, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsE3Orders, bsInfo, wlnInfo, bsE3Info, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread59, _cacheOrderInfo;
1727
+ var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, _wdtOrders$trades, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread59, _cacheOrderInfo;
1771
1728
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1772
1729
  while (1) switch (_context.prev = _context.next) {
1773
1730
  case 0:
@@ -1786,19 +1743,18 @@ export var orderBack = /*#__PURE__*/function () {
1786
1743
  // 'WDT_DEPOSIT',
1787
1744
  // 'WDT_POSTING',
1788
1745
  // 'WDT_DELIVERY_NO',
1789
- ]); // 判断是否有旺店通组件 有就请求bsE3订单接口
1790
- hasBsE3 = HasFilterHandle(templateDetail, ['BS_E3_SYSTEM_ORDER', 'BS_E3_GOODS']); //判断是否有万里牛组件 有就请求wln订单接口
1746
+ ]); //判断是否有万里牛组件 有就请求wln订单接口
1791
1747
  hasWln = HasFilterHandle(templateDetail, ['WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD']); //如果不是对接店铺且百胜组件都没有
1792
1748
  if (!(!JOIN_SHOP && !hasBs && !hasWln && !hasWdt)) {
1793
- _context.next = 8;
1749
+ _context.next = 7;
1794
1750
  break;
1795
1751
  }
1796
1752
  return _context.abrupt("return");
1797
- case 8:
1753
+ case 7:
1798
1754
  _ref3 = shopList.find(function (item) {
1799
1755
  return item.shopId == shopId;
1800
1756
  }) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick;
1801
- _context.prev = 9;
1757
+ _context.prev = 8;
1802
1758
  promise = [];
1803
1759
  if (!JOIN_SHOP) {
1804
1760
  promise.push(new Promise(function (resolve) {
@@ -1858,33 +1814,21 @@ export var orderBack = /*#__PURE__*/function () {
1858
1814
  resolve([]);
1859
1815
  }));
1860
1816
  }
1861
- if (hasBsE3) {
1862
- promise.push(bsE3OrderDetail({
1863
- billNo: order_no
1864
- }));
1865
- } else {
1866
- promise.push(new Promise(function (resolve) {
1867
- resolve([]);
1868
- }));
1869
- }
1870
- _context.next = 20;
1817
+ _context.next = 18;
1871
1818
  return Promise.allSettled(promise);
1872
- case 20:
1819
+ case 18:
1873
1820
  _yield$Promise$allSet = _context.sent;
1874
- _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 6);
1821
+ _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 5);
1875
1822
  data = _yield$Promise$allSet2[0];
1876
1823
  jstOrder = _yield$Promise$allSet2[1];
1877
1824
  bsOrder = _yield$Promise$allSet2[2];
1878
1825
  wlnOrder = _yield$Promise$allSet2[3];
1879
1826
  wdtOrder = _yield$Promise$allSet2[4];
1880
- bsE3Order = _yield$Promise$allSet2[5];
1881
1827
  orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
1882
1828
  jstInfo = (jstOrder === null || jstOrder === void 0 ? void 0 : (_jstOrder$value = jstOrder.value) === null || _jstOrder$value === void 0 ? void 0 : (_jstOrder$value$data = _jstOrder$value.data) === null || _jstOrder$value$data === void 0 ? void 0 : _jstOrder$value$data.orders) || [];
1883
1829
  bsOrders = (bsOrder === null || bsOrder === void 0 ? void 0 : (_bsOrder$value = bsOrder.value) === null || _bsOrder$value === void 0 ? void 0 : _bsOrder$value.data) || {};
1884
1830
  wlnOrders = (wlnOrder === null || wlnOrder === void 0 ? void 0 : (_wlnOrder$value = wlnOrder.value) === null || _wlnOrder$value === void 0 ? void 0 : _wlnOrder$value.data) || {};
1885
1831
  wdtOrders = (wdtOrder === null || wdtOrder === void 0 ? void 0 : (_wdtOrder$value = wdtOrder.value) === null || _wdtOrder$value === void 0 ? void 0 : _wdtOrder$value.data) || {};
1886
- bsE3Orders = (bsE3Order === null || bsE3Order === void 0 ? void 0 : (_bsE3Order$value = bsE3Order.value) === null || _bsE3Order$value === void 0 ? void 0 : _bsE3Order$value.data) || {};
1887
- bsE3Orders.orderList = filterBsE3Orders(bsE3Orders, order_no);
1888
1832
  wdtOrders.trades = filterWdtOrders(wdtOrders, order_no);
1889
1833
  Monitor.automaticReport({
1890
1834
  message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders), ",wdt\u4FE1\u606F:").concat(JSON.stringify(wdtOrders))
@@ -1895,11 +1839,7 @@ export var orderBack = /*#__PURE__*/function () {
1895
1839
  });
1896
1840
  }
1897
1841
  bsInfo = bsOrderTransform(bsOrders || {});
1898
- wlnInfo = wlnOrderTransform(wlnOrders || {});
1899
- bsE3Info = bsE3OrderTransform(_objectSpread(_objectSpread({}, bsE3Orders), {}, {
1900
- componentList: templateDetail.componentDtoList,
1901
- orderNo: order_no
1902
- }), form);
1842
+ wlnInfo = wlnOrderTransform(wlnOrders || {}); // const wdtInfo = wdtOrderTransform(wdtOrders || {});
1903
1843
  wdtInfo = wdtOrderTransform(_objectSpread(_objectSpread({}, wdtOrders), {}, {
1904
1844
  componentList: templateDetail.componentDtoList,
1905
1845
  orderNo: order_no
@@ -1920,15 +1860,6 @@ export var orderBack = /*#__PURE__*/function () {
1920
1860
  deliveryNo: ''
1921
1861
  }];
1922
1862
  }
1923
- if ((bsE3Orders === null || bsE3Orders === void 0 ? void 0 : (_bsE3Orders$orderList = bsE3Orders.orderList) === null || _bsE3Orders$orderList === void 0 ? void 0 : _bsE3Orders$orderList.length) > 1) {
1924
- bsE3Info.bsE3Goods = _objectSpread(_objectSpread({}, bsE3Info.bsE3Goods), {}, {
1925
- bsE3Goods: []
1926
- });
1927
- // bsInfo.bsLogistics = [{ logisticsCompany: null, logisticsCode: '' }];
1928
- // bsInfo.bsSendGood = [{ sendId: '', sendName: '' }];
1929
- // bsInfo.bsDeliveryNo = [{ deliveryNo: '' }];
1930
- }
1931
-
1932
1863
  if ((wlnOrders === null || wlnOrders === void 0 ? void 0 : (_wlnOrders$orders = wlnOrders.orders) === null || _wlnOrders$orders === void 0 ? void 0 : _wlnOrders$orders.length) > 1) {
1933
1864
  wlnInfo.wlnGoods = _objectSpread(_objectSpread({}, wlnInfo.wlnGoods), {}, {
1934
1865
  wlnGoods: []
@@ -1964,8 +1895,7 @@ export var orderBack = /*#__PURE__*/function () {
1964
1895
  jstItemList: jstInfo,
1965
1896
  bsOrder: bsInfo,
1966
1897
  wlnOrder: wlnInfo,
1967
- wdtOrder: wdtInfo,
1968
- bsE3Order: bsE3Info
1898
+ wdtOrder: wdtInfo
1969
1899
  }); //抖音数据特殊处理
1970
1900
  if (shopSourceStr === 'FXG') {
1971
1901
  detail = updateDYDetails(detail);
@@ -1976,7 +1906,7 @@ export var orderBack = /*#__PURE__*/function () {
1976
1906
  hasSelectItem = HasErpItemSelectHandle(templateDetail);
1977
1907
  erpPromiseList = [];
1978
1908
  if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
1979
- _context.next = 64;
1909
+ _context.next = 57;
1980
1910
  break;
1981
1911
  }
1982
1912
  list = detail['itemList'];
@@ -1994,10 +1924,10 @@ export var orderBack = /*#__PURE__*/function () {
1994
1924
  resolve({});
1995
1925
  });
1996
1926
  });
1997
- _context.prev = 54;
1998
- _context.next = 57;
1927
+ _context.prev = 47;
1928
+ _context.next = 50;
1999
1929
  return Promise.all(promises);
2000
- case 57:
1930
+ case 50:
2001
1931
  erpPromiseList = _context.sent;
2002
1932
  detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
2003
1933
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -2007,13 +1937,13 @@ export var orderBack = /*#__PURE__*/function () {
2007
1937
  })
2008
1938
  });
2009
1939
  });
2010
- _context.next = 64;
1940
+ _context.next = 57;
2011
1941
  break;
2012
- case 61:
2013
- _context.prev = 61;
2014
- _context.t0 = _context["catch"](54);
1942
+ case 54:
1943
+ _context.prev = 54;
1944
+ _context.t0 = _context["catch"](47);
2015
1945
  console.error('调用erp获取宝贝编码错误', _context.t0);
2016
- case 64:
1946
+ case 57:
2017
1947
  // console.log('detail', detail);
2018
1948
  values = orderBackFormValues({
2019
1949
  detail: detail,
@@ -2022,10 +1952,7 @@ export var orderBack = /*#__PURE__*/function () {
2022
1952
  templateDetail: templateDetail,
2023
1953
  type: type,
2024
1954
  fromQNCreateWorkOrderByOrderNo: fromQNCreateWorkOrderByOrderNo
2025
- });
2026
- console.log('formValue', formValue);
2027
- console.log('values', values);
2028
- //新建的情况下订单返填不能清空打款信息
1955
+ }); //新建的情况下订单返填不能清空打款信息
2029
1956
  if (type !== 'edit') {
2030
1957
  paymentUniqueKey = templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$compo = templateDetail.componentDtoList.find(function (item) {
2031
1958
  return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
@@ -2047,17 +1974,17 @@ export var orderBack = /*#__PURE__*/function () {
2047
1974
  // console.log('orderback', values);
2048
1975
  form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
2049
1976
  callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
2050
- _context.next = 75;
1977
+ _context.next = 66;
2051
1978
  break;
2052
- case 72:
2053
- _context.prev = 72;
2054
- _context.t1 = _context["catch"](9);
1979
+ case 63:
1980
+ _context.prev = 63;
1981
+ _context.t1 = _context["catch"](8);
2055
1982
  console.error(_context.t1);
2056
- case 75:
1983
+ case 66:
2057
1984
  case "end":
2058
1985
  return _context.stop();
2059
1986
  }
2060
- }, _callee, null, [[9, 72], [54, 61]]);
1987
+ }, _callee, null, [[8, 63], [47, 54]]);
2061
1988
  }));
2062
1989
  return function orderBack(_x) {
2063
1990
  return _ref2.apply(this, arguments);
@@ -2382,10 +2309,6 @@ export var reversalFormValues = function reversalFormValues() {
2382
2309
  prv["".concat(next.uniqueKey, "_wdtGoods")] = JSON.stringify(values[next.uniqueKey]['wdtGoods']);
2383
2310
  prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
2384
2311
  break;
2385
- case 'BS_E3_GOODS':
2386
- prv["".concat(next.uniqueKey, "_bsE3Goods")] = JSON.stringify(values[next.uniqueKey]['_bsE3Goods']);
2387
- prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
2388
- break;
2389
2312
  }
2390
2313
  return prv;
2391
2314
  }, {});
@@ -2441,45 +2364,16 @@ export var bsSystemOrderBackValues = function bsSystemOrderBackValues(_ref6) {
2441
2364
  });
2442
2365
  form.setFieldsValue(values);
2443
2366
  };
2444
- // bs e3商品信息返填
2445
- export var bsE3SystemOrderBackValues = function bsE3SystemOrderBackValues(_ref7) {
2446
- var _templateList$compone2, _templateList$compone3;
2367
+
2368
+ //wln商品信息返填
2369
+ export var wlnSystemOrderBackValues = function wlnSystemOrderBackValues(_ref7) {
2370
+ var _templateList$compone2;
2447
2371
  var templateList = _ref7.templateList,
2448
2372
  value = _ref7.value,
2449
2373
  form = _ref7.form;
2450
2374
  //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
2451
2375
  if (!(value !== null && value !== void 0 && value.selectedRows)) return;
2452
- var bsE3GoodsComponent = (_templateList$compone2 = templateList.componentDtoList) === null || _templateList$compone2 === void 0 ? void 0 : _templateList$compone2.filter(function (item) {
2453
- return ['BS_E3_GOODS', 'LOGISTICS_TRAJECTORY_MORE', 'LOGISTICS_INTERCEPTION_MORE'].includes(item.workOrderComponentType);
2454
- });
2455
- if (!(bsE3GoodsComponent !== null && bsE3GoodsComponent !== void 0 && bsE3GoodsComponent.length)) return;
2456
- var tIdCom = (_templateList$compone3 = templateList.componentDtoList) === null || _templateList$compone3 === void 0 ? void 0 : _templateList$compone3.find(function (item) {
2457
- return item.workOrderComponentType === 'TRADE_ID_INPUT';
2458
- });
2459
- var orderNo = tIdCom !== null && tIdCom !== void 0 && tIdCom.uniqueKey ? form.getFieldValue(tIdCom.uniqueKey) : null;
2460
- var bsE3GoodsValue = form.getFieldValue(bsE3GoodsComponent[0].uniqueKey);
2461
- var orderInfo = bsE3OrderTransform({
2462
- orderList: value.selectedRows,
2463
- shopCode: bsE3GoodsValue.shopCode,
2464
- componentList: templateList.componentDtoList,
2465
- orderNo: orderNo
2466
- }, form);
2467
- var values = bsE3OrderBackFormValues(orderInfo, {
2468
- componentDtoList: bsE3GoodsComponent
2469
- });
2470
- console.log('values', values);
2471
- form.setFieldsValue(values);
2472
- };
2473
-
2474
- //wln商品信息返填
2475
- export var wlnSystemOrderBackValues = function wlnSystemOrderBackValues(_ref8) {
2476
- var _templateList$compone4;
2477
- var templateList = _ref8.templateList,
2478
- value = _ref8.value,
2479
- form = _ref8.form;
2480
- //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
2481
- if (!(value !== null && value !== void 0 && value.selectedRows)) return;
2482
- var bsGoodsComponent = (_templateList$compone4 = templateList.componentDtoList) === null || _templateList$compone4 === void 0 ? void 0 : _templateList$compone4.filter(function (item) {
2376
+ var bsGoodsComponent = (_templateList$compone2 = templateList.componentDtoList) === null || _templateList$compone2 === void 0 ? void 0 : _templateList$compone2.filter(function (item) {
2483
2377
  return ['WLN_GOODS', 'WLN_SEND_GOOD', 'WLN_LOGISTICS'].includes(item.workOrderComponentType);
2484
2378
  });
2485
2379
  if (!(bsGoodsComponent !== null && bsGoodsComponent !== void 0 && bsGoodsComponent.length)) return;
@@ -2495,18 +2389,18 @@ export var wlnSystemOrderBackValues = function wlnSystemOrderBackValues(_ref8) {
2495
2389
  };
2496
2390
 
2497
2391
  // wdt商品信息返填
2498
- export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref9) {
2499
- var _templateList$compone5, _templateList$compone6;
2500
- var templateList = _ref9.templateList,
2501
- value = _ref9.value,
2502
- form = _ref9.form;
2392
+ export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref8) {
2393
+ var _templateList$compone3, _templateList$compone4;
2394
+ var templateList = _ref8.templateList,
2395
+ value = _ref8.value,
2396
+ form = _ref8.form;
2503
2397
  //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
2504
2398
  if (!(value !== null && value !== void 0 && value.selectedRows)) return;
2505
- var wdtGoodsComponent = (_templateList$compone5 = templateList.componentDtoList) === null || _templateList$compone5 === void 0 ? void 0 : _templateList$compone5.filter(function (item) {
2399
+ var wdtGoodsComponent = (_templateList$compone3 = templateList.componentDtoList) === null || _templateList$compone3 === void 0 ? void 0 : _templateList$compone3.filter(function (item) {
2506
2400
  return ['WDT_GOODS', 'WDT_DELIVERY_NO', 'WDT_SEND_GOOD', 'WDT_LOGISTICS'].includes(item.workOrderComponentType) && !item.notOrderBack;
2507
2401
  });
2508
2402
  if (!(wdtGoodsComponent !== null && wdtGoodsComponent !== void 0 && wdtGoodsComponent.length)) return;
2509
- var tIdCom = (_templateList$compone6 = templateList.componentDtoList) === null || _templateList$compone6 === void 0 ? void 0 : _templateList$compone6.find(function (item) {
2403
+ var tIdCom = (_templateList$compone4 = templateList.componentDtoList) === null || _templateList$compone4 === void 0 ? void 0 : _templateList$compone4.find(function (item) {
2510
2404
  return item.workOrderComponentType === 'TRADE_ID_INPUT';
2511
2405
  });
2512
2406
  var orderNo = tIdCom !== null && tIdCom !== void 0 && tIdCom.uniqueKey ? form.getFieldValue(tIdCom.uniqueKey) : null;
@@ -2667,12 +2561,12 @@ export var transformWorkOrderDetail = function transformWorkOrderDetail(detail)
2667
2561
  };
2668
2562
 
2669
2563
  // 返填物流轨迹信息
2670
- export var setLogisticsInfo = function setLogisticsInfo(_ref10) {
2671
- var logisticsMappingConfig = _ref10.logisticsMappingConfig,
2672
- uniqueKey = _ref10.uniqueKey,
2673
- workOrderComponentType = _ref10.workOrderComponentType,
2674
- value = _ref10.value,
2675
- form = _ref10.form;
2564
+ export var setLogisticsInfo = function setLogisticsInfo(_ref9) {
2565
+ var logisticsMappingConfig = _ref9.logisticsMappingConfig,
2566
+ uniqueKey = _ref9.uniqueKey,
2567
+ workOrderComponentType = _ref9.workOrderComponentType,
2568
+ value = _ref9.value,
2569
+ form = _ref9.form;
2676
2570
  var values = logisticsMappingConfig.reduce(function (prv, next) {
2677
2571
  var logisticsValues = form.getFieldValue(next.uniqueKey);
2678
2572
  var componentConfig = next.componentConfig;
@@ -1,6 +1,5 @@
1
1
  export { default as WorkOrder } from './WorkOrder';
2
2
  export { default as Login } from './Login';
3
- export { default as LoginNew } from './LoginNew';
4
3
  export { default as SingleShopWorkOrder } from './SingleShopWorkOrder';
5
4
  export { default as FormRender } from './FormRender';
6
5
  export { default as FormRenderTemplateId } from './FormRenderTemplateId';
package/dist/esm/index.js CHANGED
@@ -10,7 +10,6 @@
10
10
  */
11
11
  export { default as WorkOrder } from "./WorkOrder";
12
12
  export { default as Login } from "./Login";
13
- export { default as LoginNew } from "./LoginNew";
14
13
  export { default as SingleShopWorkOrder } from "./SingleShopWorkOrder";
15
14
  export { default as FormRender } from "./FormRender";
16
15
  export { default as FormRenderTemplateId } from "./FormRenderTemplateId";
@@ -27,16 +27,6 @@ export declare const fetchLogin: import("@reduxjs/toolkit").AsyncThunk<any, Logi
27
27
  fulfilledMeta?: unknown;
28
28
  rejectedMeta?: unknown;
29
29
  }>;
30
- export declare const fetchLoginNew: import("@reduxjs/toolkit").AsyncThunk<any, LoginParams, {
31
- state?: unknown;
32
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
33
- extra?: unknown;
34
- rejectValue?: unknown;
35
- serializedErrorType?: unknown;
36
- pendingMeta?: unknown;
37
- fulfilledMeta?: unknown;
38
- rejectedMeta?: unknown;
39
- }>;
40
30
  export declare const fetchShopList: import("@reduxjs/toolkit").AsyncThunk<any, void, {
41
31
  state?: unknown;
42
32
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -13,7 +13,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
13
13
  * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
14
14
  */
15
15
  import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
16
- import { grayWhiteListApi, login, loginNew, queryShopList, logOut } from "./servers/api";
16
+ import { grayWhiteListApi, login, queryShopList, logOut } from "./servers/api";
17
17
  var initialState = {
18
18
  loading: false,
19
19
  // 登陆用户信息
@@ -77,58 +77,37 @@ export var fetchLogin = createAsyncThunk('login/login', /*#__PURE__*/function ()
77
77
  return _ref2.apply(this, arguments);
78
78
  };
79
79
  }());
80
- export var fetchLoginNew = createAsyncThunk('login/loginNew', /*#__PURE__*/function () {
81
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
82
- var response;
83
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
84
- while (1) switch (_context3.prev = _context3.next) {
85
- case 0:
86
- _context3.next = 2;
87
- return loginNew(data);
88
- case 2:
89
- response = _context3.sent;
90
- return _context3.abrupt("return", response);
91
- case 4:
92
- case "end":
93
- return _context3.stop();
94
- }
95
- }, _callee3);
96
- }));
97
- return function (_x3) {
98
- return _ref3.apply(this, arguments);
99
- };
100
- }());
101
- export var fetchShopList = createAsyncThunk('login/queryShopList', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
80
+ export var fetchShopList = createAsyncThunk('login/queryShopList', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
102
81
  var response;
103
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
104
- while (1) switch (_context4.prev = _context4.next) {
82
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
83
+ while (1) switch (_context3.prev = _context3.next) {
105
84
  case 0:
106
- _context4.next = 2;
85
+ _context3.next = 2;
107
86
  return queryShopList();
108
87
  case 2:
109
- response = _context4.sent;
110
- return _context4.abrupt("return", response.data);
88
+ response = _context3.sent;
89
+ return _context3.abrupt("return", response.data);
111
90
  case 4:
112
91
  case "end":
113
- return _context4.stop();
92
+ return _context3.stop();
114
93
  }
115
- }, _callee4);
94
+ }, _callee3);
116
95
  })));
117
- export var fetchLogOut = createAsyncThunk('login/logOut', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
96
+ export var fetchLogOut = createAsyncThunk('login/logOut', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
118
97
  var response;
119
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
120
- while (1) switch (_context5.prev = _context5.next) {
98
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
99
+ while (1) switch (_context4.prev = _context4.next) {
121
100
  case 0:
122
- _context5.next = 2;
101
+ _context4.next = 2;
123
102
  return logOut();
124
103
  case 2:
125
- response = _context5.sent;
126
- return _context5.abrupt("return", response.data);
104
+ response = _context4.sent;
105
+ return _context4.abrupt("return", response.data);
127
106
  case 4:
128
107
  case "end":
129
- return _context5.stop();
108
+ return _context4.stop();
130
109
  }
131
- }, _callee5);
110
+ }, _callee4);
132
111
  })));
133
112
  export var globalSlice = createSlice({
134
113
  name: 'login',
@@ -140,22 +119,22 @@ export var globalSlice = createSlice({
140
119
  closeLoading: function closeLoading(state) {
141
120
  state.loading = false;
142
121
  },
143
- setUserInfo: function setUserInfo(state, _ref6) {
144
- var payload = _ref6.payload;
122
+ setUserInfo: function setUserInfo(state, _ref5) {
123
+ var payload = _ref5.payload;
145
124
  state.userInfo = payload;
146
125
  },
147
- setShopList: function setShopList(state, _ref7) {
148
- var payload = _ref7.payload;
126
+ setShopList: function setShopList(state, _ref6) {
127
+ var payload = _ref6.payload;
149
128
  state.shopList = payload;
150
129
  },
151
- setPlatform: function setPlatform(state, _ref8) {
152
- var payload = _ref8.payload;
130
+ setPlatform: function setPlatform(state, _ref7) {
131
+ var payload = _ref7.payload;
153
132
  state.platform = payload;
154
133
  }
155
134
  },
156
135
  extraReducers: function extraReducers(builder) {
157
- builder.addCase(fetchShopList.fulfilled, function (state, _ref9) {
158
- var payload = _ref9.payload;
136
+ builder.addCase(fetchShopList.fulfilled, function (state, _ref8) {
137
+ var payload = _ref8.payload;
159
138
  state.shopList = payload.shopList;
160
139
  });
161
140
  }
@@ -36,10 +36,8 @@ export declare type LoginParams = {
36
36
  name: string;
37
37
  account: string;
38
38
  password: string;
39
- pageReturnType?: string;
40
39
  };
41
40
  export declare const login: (data: LoginParams) => Promise<any>;
42
- export declare const loginNew: (data: LoginParams) => Promise<any>;
43
41
  export declare const queryShopList: () => Promise<any>;
44
42
  export declare const deleteWorkOrder: (data: any) => Promise<any>;
45
43
  export declare const getThirdOpenUidByOrderNo: (data: any) => Promise<any>;
@@ -63,7 +61,6 @@ export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
63
61
  export declare const jstOrderDetail: (data: any) => Promise<any>;
64
62
  export declare const bsOrderDetail: (data: any) => Promise<any>;
65
63
  export declare const wdtOrderDetail: (data: any) => Promise<any>;
66
- export declare const bsE3OrderDetail: (data: any) => Promise<any>;
67
64
  export declare const getRepeatWorkOrderList: (data: any) => Promise<any>;
68
65
  export declare const logisticsInterceptCancel: (data: any) => Promise<any>;
69
66
  export declare const queryLogisticsTrack: (data: any) => Promise<any>;
@@ -217,15 +217,6 @@ export var login = function login(data) {
217
217
  data: data
218
218
  });
219
219
  };
220
-
221
- //登陆-新
222
- export var loginNew = function loginNew(data) {
223
- return request({
224
- url: '/qy/gdfw/company/login/new',
225
- method: 'post',
226
- data: data
227
- });
228
- };
229
220
  //获取店铺列表
230
221
  export var queryShopList = function queryShopList() {
231
222
  return request({
@@ -397,15 +388,6 @@ export var wdtOrderDetail = function wdtOrderDetail(data) {
397
388
  infoLevel: 'warning'
398
389
  });
399
390
  };
400
- // 百胜E3订单详情
401
- export var bsE3OrderDetail = function bsE3OrderDetail(data) {
402
- return request({
403
- url: '/qy/gdfw/order/bse3OrderDetail',
404
- method: 'post',
405
- data: data,
406
- infoLevel: 'warning'
407
- });
408
- };
409
391
 
410
392
  // 获取重复详情
411
393
  export var getRepeatWorkOrderList = function getRepeatWorkOrderList(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "1.19.4-beta.0",
3
+ "version": "1.19.4",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "1.19.4-beta.0",
36
- "@kmkf-fe-packages/kmkf-utils": "1.19.4-beta.0",
37
- "@kmkf-fe-packages/services-components": "1.19.4-beta.0",
35
+ "@kmkf-fe-packages/basic-components": "1.19.4",
36
+ "@kmkf-fe-packages/kmkf-utils": "1.19.4",
37
+ "@kmkf-fe-packages/services-components": "1.19.4",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "028de42b869ce07e95ab7a7166bf487cfdf0f93a",
76
+ "gitHead": "167a8b190ae6a8c52525e929e98fee86be390f4f",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export declare const COMMON_HOST = "https://kefu.kuaimai.com";
3
- export declare const HD_HOST = "https://kefuab.kuaimai.com";
4
- interface LoginProps {
5
- loginCallBack?: (val: any) => void;
6
- }
7
- declare const ProviderLogin: (props: LoginProps) => React.JSX.Element;
8
- export default ProviderLogin;
@@ -1,268 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useState, useMemo, useEffect } from 'react';
12
- import { Input, message, Form, Button } from 'antd';
13
- import md5 from 'js-md5';
14
- import { Provider } from 'react-redux';
15
- import store from "../model/store";
16
- import cache from "../common/cache";
17
- import { useAppDispatch } from "../model/hooks";
18
- import { fetchLoginNew, fetchShopList, setUserInfo } from "../model/login";
19
- import logo from "../assets/logo.svg";
20
- import styles from "./index.module.less";
21
- export var COMMON_HOST = 'https://kefu.kuaimai.com';
22
- export var HD_HOST = 'https://kefuab.kuaimai.com';
23
- var Login = function Login(props) {
24
- var loginCallBack = props.loginCallBack;
25
- var _useState = useState(''),
26
- _useState2 = _slicedToArray(_useState, 2),
27
- name = _useState2[0],
28
- setName = _useState2[1];
29
- var _useState3 = useState(''),
30
- _useState4 = _slicedToArray(_useState3, 2),
31
- account = _useState4[0],
32
- setAccount = _useState4[1];
33
- var _useState5 = useState(''),
34
- _useState6 = _slicedToArray(_useState5, 2),
35
- password = _useState6[0],
36
- setPassword = _useState6[1];
37
- var _useState7 = useState(false),
38
- _useState8 = _slicedToArray(_useState7, 2),
39
- loading = _useState8[0],
40
- setLoading = _useState8[1];
41
- // 直接登陆模式
42
- var _useState9 = useState(false),
43
- _useState10 = _slicedToArray(_useState9, 2),
44
- isDirectProcess = _useState10[0],
45
- setDirectProcess = _useState10[1];
46
- // 显示历史记录
47
- var _useState11 = useState(false),
48
- _useState12 = _slicedToArray(_useState11, 2),
49
- showRecommendPwdList = _useState12[0],
50
- setShowRecommendPwdList = _useState12[1];
51
- var dispatch = useAppDispatch();
52
- useEffect(function () {
53
- localStorage.removeItem('kmkf_kmgd_cookie');
54
- cache.setHost(COMMON_HOST);
55
- }, []);
56
- var processHistoryPwd = function processHistoryPwd(params) {
57
- var historyList = cache.getHistoryList();
58
- if (historyList.findIndex(function (item) {
59
- return item.account === params.account;
60
- }) < 0) {
61
- historyList.unshift(params);
62
- }
63
- cache.setHistoryList(historyList);
64
- };
65
- var changeProcessHistoryPwd = function changeProcessHistoryPwd(params) {
66
- var historyList = cache.getHistoryList();
67
- historyList = historyList.filter(function (item) {
68
- return item.account !== params.account;
69
- });
70
- historyList.unshift(params);
71
- cache.setHistoryList(historyList);
72
- };
73
- var onCompanyChange = function onCompanyChange(val) {
74
- if (isDirectProcess) {
75
- setDirectProcess(false);
76
- setPassword('');
77
- }
78
- setName(val);
79
- };
80
- var onAccountChange = function onAccountChange(val) {
81
- if (isDirectProcess) {
82
- setDirectProcess(false);
83
- setPassword('');
84
- }
85
- setAccount(val);
86
- };
87
- var handleLoginClick = /*#__PURE__*/function () {
88
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
89
- var isDirect,
90
- _args2 = arguments;
91
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
92
- while (1) switch (_context2.prev = _context2.next) {
93
- case 0:
94
- isDirect = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : false;
95
- if (name) {
96
- _context2.next = 4;
97
- break;
98
- }
99
- message.error('请输入公司名称');
100
- return _context2.abrupt("return");
101
- case 4:
102
- if (account) {
103
- _context2.next = 7;
104
- break;
105
- }
106
- message.error('请输入登录账号');
107
- return _context2.abrupt("return");
108
- case 7:
109
- if (password) {
110
- _context2.next = 10;
111
- break;
112
- }
113
- message.error('请输入密码');
114
- return _context2.abrupt("return");
115
- case 10:
116
- try {
117
- setLoading(true);
118
- dispatch(fetchLoginNew({
119
- name: name.trim(),
120
- account: account.trim(),
121
- password: isDirect ? password : md5(password),
122
- pageReturnType: 'client_jump'
123
- })).unwrap().then( /*#__PURE__*/function () {
124
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
125
- var data, success, _data$companyUser;
126
- return _regeneratorRuntime().wrap(function _callee$(_context) {
127
- while (1) switch (_context.prev = _context.next) {
128
- case 0:
129
- data = res.data, success = res.success; // console.log(data, success);
130
- if (isDirect) {
131
- processHistoryPwd({
132
- name: name,
133
- account: account,
134
- password: password
135
- });
136
- } else {
137
- changeProcessHistoryPwd({
138
- name: name,
139
- account: account,
140
- password: md5(password)
141
- });
142
- }
143
- if (!success) {
144
- _context.next = 10;
145
- break;
146
- }
147
- message.success('登录成功', 1.5);
148
- dispatch(setUserInfo(data === null || data === void 0 ? void 0 : data.companyUser));
149
- cache.setHost((data === null || data === void 0 ? void 0 : data.domain) || COMMON_HOST);
150
- cache.setCookie(data === null || data === void 0 ? void 0 : (_data$companyUser = data.companyUser) === null || _data$companyUser === void 0 ? void 0 : _data$companyUser.ckValue);
151
- _context.next = 9;
152
- return dispatch(fetchShopList());
153
- case 9:
154
- loginCallBack === null || loginCallBack === void 0 ? void 0 : loginCallBack({
155
- data: data
156
- });
157
- case 10:
158
- setLoading(false);
159
- case 11:
160
- case "end":
161
- return _context.stop();
162
- }
163
- }, _callee);
164
- }));
165
- return function (_x2) {
166
- return _ref2.apply(this, arguments);
167
- };
168
- }()).catch(function () {
169
- setLoading(false);
170
- });
171
- } catch (err) {
172
- setLoading(false);
173
- console.error(err);
174
- }
175
- case 11:
176
- case "end":
177
- return _context2.stop();
178
- }
179
- }, _callee2);
180
- }));
181
- return function handleLoginClick() {
182
- return _ref.apply(this, arguments);
183
- };
184
- }();
185
- var changeRecommendVisible = function changeRecommendVisible(flag) {
186
- setTimeout(function () {
187
- setShowRecommendPwdList(flag);
188
- }, 500);
189
- };
190
- var handleSelectHistoryRecord = function handleSelectHistoryRecord(item) {
191
- var itemName = item.name,
192
- itemAccount = item.account,
193
- itemPassword = item.password;
194
- setName(itemName);
195
- setAccount(itemAccount);
196
- setPassword(itemPassword);
197
- setDirectProcess(true);
198
- };
199
- var filteredHistoryList = useMemo(function () {
200
- var historyList = cache.getHistoryList();
201
- return historyList.filter(function (item) {
202
- if (account) {
203
- return item.account.includes(account);
204
- }
205
- return true;
206
- });
207
- }, [account]);
208
- return /*#__PURE__*/React.createElement("div", {
209
- className: styles.wrap
210
- }, /*#__PURE__*/React.createElement("div", {
211
- className: styles.logo
212
- }, /*#__PURE__*/React.createElement("img", {
213
- src: logo,
214
- alt: "logo"
215
- })), /*#__PURE__*/React.createElement(Form, {
216
- className: styles.container
217
- }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
218
- value: name,
219
- onChange: function onChange(e) {
220
- return onCompanyChange(e.target.value);
221
- },
222
- placeholder: "\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0"
223
- })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
224
- className: styles.recomConWrap
225
- }, /*#__PURE__*/React.createElement(Input, {
226
- onFocus: function onFocus() {
227
- return changeRecommendVisible(true);
228
- },
229
- onBlur: function onBlur() {
230
- return changeRecommendVisible(false);
231
- },
232
- value: account,
233
- onChange: function onChange(e) {
234
- return onAccountChange(e.target.value);
235
- },
236
- placeholder: "\u8BF7\u8F93\u5165\u767B\u5F55\u8D26\u53F7"
237
- }), showRecommendPwdList && filteredHistoryList.length > 0 && /*#__PURE__*/React.createElement("div", {
238
- className: styles.recomListCon
239
- }, /*#__PURE__*/React.createElement("ul", null, filteredHistoryList.map(function (item) {
240
- return /*#__PURE__*/React.createElement("li", {
241
- key: item.account,
242
- className: styles.recomListItem,
243
- onClick: function onClick() {
244
- return handleSelectHistoryRecord(item);
245
- }
246
- }, /*#__PURE__*/React.createElement("div", null, "\u4F01\u4E1A\u540D\u79F0\uFF1A", item.name), /*#__PURE__*/React.createElement("div", null, "\u767B\u5F55\u8D26\u53F7:", item.account));
247
- }))))), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
248
- value: password,
249
- type: "password",
250
- onChange: function onChange(e) {
251
- return setPassword(e.target.value);
252
- },
253
- placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801"
254
- }))), /*#__PURE__*/React.createElement(Button, {
255
- onClick: function onClick() {
256
- return handleLoginClick(isDirectProcess);
257
- },
258
- type: "primary",
259
- block: true,
260
- loading: loading
261
- }, "\u767B\u5F55"));
262
- };
263
- var ProviderLogin = function ProviderLogin(props) {
264
- return /*#__PURE__*/React.createElement(Provider, {
265
- store: store
266
- }, /*#__PURE__*/React.createElement(Login, props));
267
- };
268
- export default ProviderLogin;
@@ -1,45 +0,0 @@
1
- .wrap {
2
- width: 266px;
3
- margin: auto;
4
-
5
- .logo {
6
- display: flex;
7
- justify-content: center;
8
- margin-top: 146px;
9
- }
10
-
11
- .container {
12
- margin-top: 48px;
13
-
14
- ul {
15
- margin: 0px;
16
- padding: 0;
17
- list-style-type: none;
18
- }
19
- }
20
- }
21
-
22
- .recomConWrap {
23
- position: relative;
24
-
25
- .recomListCon {
26
- position: absolute;
27
- left: 28px;
28
- z-index: 2;
29
- width: 300px;
30
- max-height: 160px;
31
- overflow: auto;
32
- background-color: #fff;
33
-
34
- ul {
35
- margin: 0px;
36
- padding: 0;
37
- list-style-type: none;
38
- }
39
-
40
- .recomListItem {
41
- padding: 8px;
42
- cursor: pointer;
43
- }
44
- }
45
- }