@kmkf-fe-packages/services-components 0.28.2-alpha.1 → 0.28.2-alpha.2

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.
@@ -1,8 +1,8 @@
1
1
  import React, { SetStateAction } from 'react';
2
2
  import { Dispatch } from 'react';
3
3
  declare const ErpContext: React.Context<{
4
- subOrderList: Array<any>;
5
- setSubOrderList: Dispatch<SetStateAction<Array<never>>>;
4
+ orderList: Record<string, any>;
5
+ setOrderList: Dispatch<SetStateAction<Record<string, any>>>;
6
6
  currentOrderDetail: Record<string, any>;
7
7
  setCurrentOrderDetail: Dispatch<SetStateAction<Record<string, any>>>;
8
8
  buyerId: string;
@@ -7,9 +7,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { createContext, useState } from 'react';
8
8
  // 配合着ErpTradeId 组件使用
9
9
  var ErpContext = /*#__PURE__*/createContext({
10
- subOrderList: [],
11
- setSubOrderList: function setSubOrderList() {
12
- return [];
10
+ orderList: {},
11
+ setOrderList: function setOrderList() {
12
+ return void 0;
13
13
  },
14
14
  currentOrderDetail: {},
15
15
  setCurrentOrderDetail: function setCurrentOrderDetail() {
@@ -30,10 +30,10 @@ var ErpContext = /*#__PURE__*/createContext({
30
30
  });
31
31
  var ErpProvider = function ErpProvider(_ref) {
32
32
  var children = _ref.children;
33
- var _useState = useState([]),
33
+ var _useState = useState({}),
34
34
  _useState2 = _slicedToArray(_useState, 2),
35
- subOrderList = _useState2[0],
36
- setSubOrderList = _useState2[1];
35
+ orderList = _useState2[0],
36
+ setOrderList = _useState2[1];
37
37
  var _useState3 = useState({}),
38
38
  _useState4 = _slicedToArray(_useState3, 2),
39
39
  currentOrderDetail = _useState4[0],
@@ -52,8 +52,8 @@ var ErpProvider = function ErpProvider(_ref) {
52
52
  setGlobalLoading = _useState10[1];
53
53
  return /*#__PURE__*/React.createElement(ErpContext.Provider, {
54
54
  value: {
55
- subOrderList: subOrderList,
56
- setSubOrderList: setSubOrderList,
55
+ orderList: orderList,
56
+ setOrderList: setOrderList,
57
57
  currentOrderDetail: currentOrderDetail,
58
58
  setCurrentOrderDetail: setCurrentOrderDetail,
59
59
  buyerId: buyerId,
@@ -75,7 +75,7 @@ var Card = function Card(_ref) {
75
75
  var SubOrderList = function SubOrderList(_ref2) {
76
76
  var subList = _ref2.subList;
77
77
  var _useContext = useContext(ErpScenes.ErpContext),
78
- subOrderList = _useContext.subOrderList,
78
+ orderList = _useContext.orderList,
79
79
  setGlobalLoading = _useContext.setGlobalLoading,
80
80
  setBuyerId = _useContext.setBuyerId,
81
81
  setCurrentOrderDetail = _useContext.setCurrentOrderDetail;
@@ -85,7 +85,7 @@ var SubOrderList = function SubOrderList(_ref2) {
85
85
  setValue = _useState2[1];
86
86
  var handleChange = function handleChange(e) {
87
87
  setValue(e.target.value);
88
- var selectOrder = get(subOrderList, "orderList.".concat(e.target.value), {});
88
+ var selectOrder = get(orderList, "orderList.".concat(e.target.value), {});
89
89
  // 如果是抖音的订单,需要根据这个订单号去获取买家id
90
90
  if (selectOrder.shopSource === 'fxg') {
91
91
  setGlobalLoading(true);
@@ -118,9 +118,10 @@ var OrderNum = function OrderNum(_ref3) {
118
118
  onChange = _ref3.onChange;
119
119
  var _useContext2 = useContext(ErpScenes.ErpContext),
120
120
  visible = _useContext2.subOrderListVisible,
121
- subList = _useContext2.subOrderList,
121
+ orderList = _useContext2.orderList,
122
122
  setGlobalLoading = _useContext2.setGlobalLoading,
123
123
  setSubOrderListVisible = _useContext2.setSubOrderListVisible;
124
+ var subList = orderList.orderList;
124
125
  var handleQueryOrderDetail = function handleQueryOrderDetail() {
125
126
  if (!value) return;
126
127
  setGlobalLoading(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.28.2-alpha.1",
3
+ "version": "0.28.2-alpha.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "e05898cc93b5d09d48e1eb82ee39e45bfcd23af8",
40
+ "gitHead": "9e1f8645c6586ef6e7356f6597c1ce56a660e2c2",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }