@kmkf-fe-packages/services-components 0.28.2-alpha.1 → 0.28.2-alpha.3
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
|
-
|
|
5
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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/dist/esm/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export { default as MsgStatus } from "./components/MsgStatus";
|
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as CommonInput } from "./components/CommonInput";
|
|
78
78
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
79
|
+
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
79
80
|
export { factory } from "./factory";
|
|
80
81
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
81
82
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -76,6 +76,8 @@ export { default as MsgStatus } from "./components/MsgStatus";
|
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as CommonInput } from "./components/CommonInput";
|
|
78
78
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
79
|
+
// TODO: ERP 打款工单使用
|
|
80
|
+
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
79
81
|
export { factory } from "./factory";
|
|
80
82
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
81
83
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.28.2-alpha.
|
|
3
|
+
"version": "0.28.2-alpha.3",
|
|
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": "
|
|
40
|
+
"gitHead": "23bbebd5a7b3612aa00b278878ae6b310758d6dd",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|