@kmkf-fe-packages/services-components 2.0.2-beta.1 → 2.0.2-beta.11
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/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +11 -6
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +18 -23
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +18 -21
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +21 -21
- package/dist/esm/components/BS/BsLogistics/index.js +1 -1
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryAllLogisticsCompany" | "queryLabel";
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryAllLogisticsCompany" | "queryLabel" | "queryKMLogisticsCompany" | "queryKMSendData";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList, notJudgedErp, }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,8 +15,8 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState, useMemo } from "react";
|
|
17
17
|
import { Skeleton, Button, Alert, Space, message } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany } from "../../service/api";
|
|
19
|
-
import { servers } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryKMLogisticsCompany } from "../../service/api";
|
|
19
|
+
import { servers, SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
|
|
20
20
|
import useGetErpLogisticsCompany from "./orderQuery/useGetErpLogisticsCompany";
|
|
21
21
|
import useGetErpSendData from "./orderQuery/useGetErpSendData";
|
|
22
22
|
import useGetErpAddressData from "./orderQuery/useGetErpAddressData";
|
|
@@ -36,7 +36,13 @@ var Global = function Global(_ref) {
|
|
|
36
36
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
37
|
loading = _useState4[0],
|
|
38
38
|
setLoading = _useState4[1];
|
|
39
|
+
useEffect(function () {
|
|
40
|
+
initDataSource();
|
|
41
|
+
}, []);
|
|
39
42
|
|
|
43
|
+
/**
|
|
44
|
+
* 需要hasErpData判断
|
|
45
|
+
* **/
|
|
40
46
|
//获取Erp物流公司信息
|
|
41
47
|
var _useGetErpLogisticsCo = useGetErpLogisticsCompany(notJudgedErp),
|
|
42
48
|
_useGetErpLogisticsCo2 = _slicedToArray(_useGetErpLogisticsCo, 2),
|
|
@@ -120,7 +126,9 @@ var Global = function Global(_ref) {
|
|
|
120
126
|
queryLogisticsAddressData: queryLogisticsAddressData,
|
|
121
127
|
queryPlatData: queryPlatData,
|
|
122
128
|
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
123
|
-
queryLabel: queryLabel
|
|
129
|
+
queryLabel: queryLabel,
|
|
130
|
+
queryKMLogisticsCompany: queryKMLogisticsCompany,
|
|
131
|
+
queryKMSendData: SendDataCenter.getInstance("km").fetchData
|
|
124
132
|
};
|
|
125
133
|
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
126
134
|
promises = [];
|
|
@@ -158,9 +166,6 @@ var Global = function Global(_ref) {
|
|
|
158
166
|
return _ref3.apply(this, arguments);
|
|
159
167
|
};
|
|
160
168
|
}();
|
|
161
|
-
useEffect(function () {
|
|
162
|
-
initDataSource();
|
|
163
|
-
}, []);
|
|
164
169
|
if (allState === "loading") {
|
|
165
170
|
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
166
171
|
active: true,
|
|
@@ -8,9 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
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
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
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import {
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
12
12
|
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
-
import { useUpdateEffect } from "ahooks";
|
|
14
13
|
import { servers } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
14
|
function useGetErpAddressData(notJudgedErp) {
|
|
16
15
|
var _useState = useState("loading"),
|
|
@@ -18,47 +17,43 @@ function useGetErpAddressData(notJudgedErp) {
|
|
|
18
17
|
globalState = _useState2[0],
|
|
19
18
|
setGlobalState = _useState2[1];
|
|
20
19
|
var hasErpData = useGetHasErpData();
|
|
21
|
-
useUpdateEffect(function () {
|
|
22
|
-
if (!notJudgedErp) {
|
|
23
|
-
asyncQueryData(hasErpData, notJudgedErp);
|
|
24
|
-
}
|
|
25
|
-
}, [hasErpData, notJudgedErp]);
|
|
26
20
|
useEffect(function () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}, [notJudgedErp]);
|
|
21
|
+
asyncQueryData(hasErpData, notJudgedErp);
|
|
22
|
+
}, [hasErpData, notJudgedErp]);
|
|
31
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
32
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp) {
|
|
24
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
33
25
|
var hasBs, hasWdt, hasGy, promises;
|
|
34
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
35
27
|
while (1) switch (_context.prev = _context.next) {
|
|
36
28
|
case 0:
|
|
29
|
+
if (!isReload) {
|
|
30
|
+
setGlobalState("loading");
|
|
31
|
+
}
|
|
37
32
|
hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
38
33
|
promises = [];
|
|
39
34
|
if (hasBs || notJudgedErp) promises.push(servers.queryBsAddressData);
|
|
40
35
|
if (hasWdt || notJudgedErp) promises.push(servers.queryWdtAddressData);
|
|
41
36
|
if (hasGy || notJudgedErp) promises.push(servers.queryGyAddressData);
|
|
42
|
-
_context.prev =
|
|
43
|
-
_context.next =
|
|
37
|
+
_context.prev = 6;
|
|
38
|
+
_context.next = 9;
|
|
44
39
|
return Promise.all(promises.map(function (promise) {
|
|
45
40
|
return promise();
|
|
46
41
|
}));
|
|
47
|
-
case
|
|
42
|
+
case 9:
|
|
48
43
|
setGlobalState("success");
|
|
49
|
-
_context.next =
|
|
44
|
+
_context.next = 15;
|
|
50
45
|
break;
|
|
51
|
-
case
|
|
52
|
-
_context.prev =
|
|
53
|
-
_context.t0 = _context["catch"](
|
|
46
|
+
case 12:
|
|
47
|
+
_context.prev = 12;
|
|
48
|
+
_context.t0 = _context["catch"](6);
|
|
54
49
|
setGlobalState("failed");
|
|
55
|
-
case
|
|
50
|
+
case 15:
|
|
56
51
|
case "end":
|
|
57
52
|
return _context.stop();
|
|
58
53
|
}
|
|
59
|
-
}, _callee, null, [[
|
|
54
|
+
}, _callee, null, [[6, 12]]);
|
|
60
55
|
}));
|
|
61
|
-
return function asyncQueryData(_x2, _x3) {
|
|
56
|
+
return function asyncQueryData(_x2, _x3, _x4) {
|
|
62
57
|
return _ref.apply(this, arguments);
|
|
63
58
|
};
|
|
64
59
|
}();
|
|
@@ -68,7 +63,7 @@ function useGetErpAddressData(notJudgedErp) {
|
|
|
68
63
|
while (1) switch (_context2.prev = _context2.next) {
|
|
69
64
|
case 0:
|
|
70
65
|
_context2.next = 2;
|
|
71
|
-
return asyncQueryData(hasErpData, notJudgedErp);
|
|
66
|
+
return asyncQueryData(hasErpData, notJudgedErp, true);
|
|
72
67
|
case 2:
|
|
73
68
|
case "end":
|
|
74
69
|
return _context2.stop();
|
|
@@ -10,54 +10,51 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
-
import {
|
|
14
|
-
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryKMLogisticsCompany } from "../../../service/api";
|
|
13
|
+
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany } from "../../../service/api";
|
|
15
14
|
function useGetErpLogisticsCompany(notJudgedErp) {
|
|
16
15
|
var _useState = useState("loading"),
|
|
17
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
17
|
globalState = _useState2[0],
|
|
19
18
|
setGlobalState = _useState2[1];
|
|
20
19
|
var hasErpData = useGetHasErpData();
|
|
21
|
-
|
|
20
|
+
useEffect(function () {
|
|
22
21
|
asyncQueryData(hasErpData, notJudgedErp);
|
|
23
22
|
}, [hasErpData, notJudgedErp]);
|
|
24
|
-
useEffect(function () {
|
|
25
|
-
if (notJudgedErp) {
|
|
26
|
-
asyncQueryData({}, notJudgedErp);
|
|
27
|
-
}
|
|
28
|
-
}, [notJudgedErp]);
|
|
29
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
30
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp) {
|
|
24
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
31
25
|
var hasWdt, hasE3, hasJst, hasWln, promises;
|
|
32
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
27
|
while (1) switch (_context.prev = _context.next) {
|
|
34
28
|
case 0:
|
|
29
|
+
if (!isReload) {
|
|
30
|
+
setGlobalState("loading");
|
|
31
|
+
}
|
|
35
32
|
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln;
|
|
36
|
-
promises = [
|
|
33
|
+
promises = [];
|
|
37
34
|
if (hasWdt || notJudgedErp) promises.push(queryWdtLogisticsCompany);
|
|
38
35
|
if (hasE3 || notJudgedErp) promises.push(queryBsE3LogisticsCompany);
|
|
39
36
|
if (hasJst || notJudgedErp) promises.push(queryJSTLogisticsCompany);
|
|
40
37
|
if (hasWln || notJudgedErp) promises.push(queryWLNLogisticsCompany);
|
|
41
|
-
_context.prev =
|
|
42
|
-
_context.next =
|
|
38
|
+
_context.prev = 7;
|
|
39
|
+
_context.next = 10;
|
|
43
40
|
return Promise.all(promises.map(function (promise) {
|
|
44
41
|
return promise();
|
|
45
42
|
}));
|
|
46
|
-
case
|
|
43
|
+
case 10:
|
|
47
44
|
setGlobalState("success");
|
|
48
|
-
_context.next =
|
|
45
|
+
_context.next = 16;
|
|
49
46
|
break;
|
|
50
|
-
case
|
|
51
|
-
_context.prev =
|
|
52
|
-
_context.t0 = _context["catch"](
|
|
47
|
+
case 13:
|
|
48
|
+
_context.prev = 13;
|
|
49
|
+
_context.t0 = _context["catch"](7);
|
|
53
50
|
setGlobalState("failed");
|
|
54
|
-
case
|
|
51
|
+
case 16:
|
|
55
52
|
case "end":
|
|
56
53
|
return _context.stop();
|
|
57
54
|
}
|
|
58
|
-
}, _callee, null, [[
|
|
55
|
+
}, _callee, null, [[7, 13]]);
|
|
59
56
|
}));
|
|
60
|
-
return function asyncQueryData(_x2, _x3) {
|
|
57
|
+
return function asyncQueryData(_x2, _x3, _x4) {
|
|
61
58
|
return _ref.apply(this, arguments);
|
|
62
59
|
};
|
|
63
60
|
}();
|
|
@@ -67,7 +64,7 @@ function useGetErpLogisticsCompany(notJudgedErp) {
|
|
|
67
64
|
while (1) switch (_context2.prev = _context2.next) {
|
|
68
65
|
case 0:
|
|
69
66
|
_context2.next = 2;
|
|
70
|
-
return asyncQueryData(hasErpData, notJudgedErp);
|
|
67
|
+
return asyncQueryData(hasErpData, notJudgedErp, true);
|
|
71
68
|
case 2:
|
|
72
69
|
case "end":
|
|
73
70
|
return _context2.stop();
|
|
@@ -10,7 +10,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
-
import { useUpdateEffect } from "ahooks";
|
|
14
13
|
import { SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
14
|
function useGetErpSendData(notJudgedErp) {
|
|
16
15
|
var _useState = useState("loading"),
|
|
@@ -18,41 +17,42 @@ function useGetErpSendData(notJudgedErp) {
|
|
|
18
17
|
globalState = _useState2[0],
|
|
19
18
|
setGlobalState = _useState2[1];
|
|
20
19
|
var hasErpData = useGetHasErpData();
|
|
21
|
-
|
|
20
|
+
useEffect(function () {
|
|
22
21
|
asyncQueryData(hasErpData, notJudgedErp);
|
|
23
22
|
}, [hasErpData, notJudgedErp]);
|
|
24
|
-
useEffect(function () {
|
|
25
|
-
if (notJudgedErp) {
|
|
26
|
-
asyncQueryData({}, notJudgedErp);
|
|
27
|
-
}
|
|
28
|
-
}, [notJudgedErp]);
|
|
29
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
30
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp) {
|
|
31
|
-
var promises;
|
|
24
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
25
|
+
var hasWdt, hasGy, promises;
|
|
32
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
27
|
while (1) switch (_context.prev = _context.next) {
|
|
34
28
|
case 0:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
if (!isReload) {
|
|
30
|
+
setGlobalState("loading");
|
|
31
|
+
}
|
|
32
|
+
_context.prev = 1;
|
|
33
|
+
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
34
|
+
promises = [];
|
|
35
|
+
if (hasWdt || notJudgedErp) promises.push(SendDataCenter.getInstance("wdt").fetchData);
|
|
36
|
+
if (hasGy || notJudgedErp) promises.push(SendDataCenter.getInstance("gy").fetchData);
|
|
37
|
+
_context.next = 8;
|
|
38
38
|
return Promise.all(promises.map(function (promise) {
|
|
39
39
|
return promise();
|
|
40
40
|
}));
|
|
41
|
-
case
|
|
41
|
+
case 8:
|
|
42
42
|
setGlobalState("success");
|
|
43
|
-
_context.next =
|
|
43
|
+
_context.next = 14;
|
|
44
44
|
break;
|
|
45
|
-
case
|
|
46
|
-
_context.prev =
|
|
47
|
-
_context.t0 = _context["catch"](
|
|
45
|
+
case 11:
|
|
46
|
+
_context.prev = 11;
|
|
47
|
+
_context.t0 = _context["catch"](1);
|
|
48
48
|
setGlobalState("failed");
|
|
49
|
-
case
|
|
49
|
+
case 14:
|
|
50
50
|
case "end":
|
|
51
51
|
return _context.stop();
|
|
52
52
|
}
|
|
53
|
-
}, _callee, null, [[
|
|
53
|
+
}, _callee, null, [[1, 11]]);
|
|
54
54
|
}));
|
|
55
|
-
return function asyncQueryData(_x2, _x3) {
|
|
55
|
+
return function asyncQueryData(_x2, _x3, _x4) {
|
|
56
56
|
return _ref.apply(this, arguments);
|
|
57
57
|
};
|
|
58
58
|
}();
|
|
@@ -62,7 +62,7 @@ function useGetErpSendData(notJudgedErp) {
|
|
|
62
62
|
while (1) switch (_context2.prev = _context2.next) {
|
|
63
63
|
case 0:
|
|
64
64
|
_context2.next = 2;
|
|
65
|
-
return asyncQueryData(hasErpData, notJudgedErp);
|
|
65
|
+
return asyncQueryData(hasErpData, notJudgedErp, true);
|
|
66
66
|
case 2:
|
|
67
67
|
case "end":
|
|
68
68
|
return _context2.stop();
|
|
@@ -65,7 +65,7 @@ var typeMap = {
|
|
|
65
65
|
company: "kmLogisticsCompany",
|
|
66
66
|
code: "kmLogisticsCode",
|
|
67
67
|
platformType: "km",
|
|
68
|
-
companyDataType: "
|
|
68
|
+
companyDataType: "whetherItIncludes"
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, GyGoods, BsE3Reissue, MemberLevel } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => FlowWorkOrderStatus | BasicInput | JstSendGood | MsgStatus | ReissueLogistics | StatusSelect | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | FlowWorkOrderStatus | BasicInput | JstSendGood | MsgStatus | ReissueLogistics | StatusSelect | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.11",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.0.2-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.2-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.2-beta.11",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.2-beta.11",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "21782d3b8414985428e92694f856b899fc105fdc",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __assign = this && this.__assign || function () {
|
|
4
|
-
__assign = Object.assign || function (t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
exports.__esModule = true;
|
|
14
|
-
var react_1 = require("react");
|
|
15
|
-
var GetFormItem_1 = require("../../GetFormItem");
|
|
16
|
-
var Common_1 = require("../../Common");
|
|
17
|
-
var index_1 = require("../common/index");
|
|
18
|
-
var ItemView_1 = require("../../../commonComponents/ItemView");
|
|
19
|
-
var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
|
|
20
|
-
var basic_components_1 = require("@kmkf-fe-packages/basic-components");
|
|
21
|
-
var constant_1 = require("../../../constant");
|
|
22
|
-
var BsGoods = /** @class */function () {
|
|
23
|
-
function BsGoods(options) {
|
|
24
|
-
var _this = this;
|
|
25
|
-
var _a;
|
|
26
|
-
this.renderClient = function (record) {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
console.log("in renderclient");
|
|
29
|
-
return !kmkf_utils_1.isNull(record === null || record === void 0 ? void 0 : record["" + _this.id]) ? react_1["default"].createElement(react_1["default"].Fragment, null, react_1["default"].createElement(ItemView_1["default"], {
|
|
30
|
-
id: _this.id,
|
|
31
|
-
label: _this.name,
|
|
32
|
-
value: react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
33
|
-
list: ((_a = record === null || record === void 0 ? void 0 : record["" + _this.id]) === null || _a === void 0 ? void 0 : _a.bsGoods) || [],
|
|
34
|
-
showHeader: ((_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.showHeader) || []
|
|
35
|
-
})
|
|
36
|
-
})) : null;
|
|
37
|
-
};
|
|
38
|
-
this.renderPc = function () {
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
this.renderLog = function (r) {
|
|
42
|
-
var _a;
|
|
43
|
-
console.log("in renderclient");
|
|
44
|
-
if (kmkf_utils_1.isNull(r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"])) return null;
|
|
45
|
-
return react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
46
|
-
list: (r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"]) || [],
|
|
47
|
-
showHeader: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showHeader) || []
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
this.getComponentValue = function (r) {
|
|
51
|
-
return r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"];
|
|
52
|
-
};
|
|
53
|
-
this.renderExport = function () {
|
|
54
|
-
return null;
|
|
55
|
-
};
|
|
56
|
-
this.editRender = function (p) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f;
|
|
58
|
-
console.log("in renderclient");
|
|
59
|
-
return react_1["default"].createElement(GetFormItem_1["default"], {
|
|
60
|
-
title: _this.name,
|
|
61
|
-
name: _this.id,
|
|
62
|
-
rules: _this.rules,
|
|
63
|
-
required: false,
|
|
64
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
65
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
66
|
-
tooltip: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showTooltip) ? (_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.tooltip : "",
|
|
67
|
-
component: react_1["default"].createElement(basic_components_1.BsGoods, __assign({}, _this.componentConfig, {
|
|
68
|
-
maxLength: ((_c = _this.componentConfig) === null || _c === void 0 ? void 0 : _c.maxLength) || 20,
|
|
69
|
-
shopId: (_d = _this.effects) === null || _d === void 0 ? void 0 : _d.shopId,
|
|
70
|
-
shopList: ((_e = _this.effects) === null || _e === void 0 ? void 0 : _e.shopList) || [],
|
|
71
|
-
companyKey: (_f = _this.effects) === null || _f === void 0 ? void 0 : _f.companyKey,
|
|
72
|
-
width: "90%"
|
|
73
|
-
}))
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
this.filterConfig = function (item) {
|
|
77
|
-
return [{
|
|
78
|
-
searchDefaultConditions: constant_1.SYMBOL.like,
|
|
79
|
-
type: item.type,
|
|
80
|
-
id: item.id + "_bsGoods",
|
|
81
|
-
name: item.name,
|
|
82
|
-
filterComponentType: "Input"
|
|
83
|
-
}];
|
|
84
|
-
};
|
|
85
|
-
this.name = options.name;
|
|
86
|
-
this.id = options.id;
|
|
87
|
-
this.sortField = options.id + "_bsGoods";
|
|
88
|
-
this.formField = options.id + "_bsGoods";
|
|
89
|
-
this.type = options.type;
|
|
90
|
-
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
91
|
-
this.isCombinationComponent = true;
|
|
92
|
-
this.canSort = false;
|
|
93
|
-
this.bsGoods = new index_1.BsHeaderGood(__assign(__assign({}, options), {
|
|
94
|
-
id: options.id + "_bsGoods",
|
|
95
|
-
name: "商品信息"
|
|
96
|
-
}));
|
|
97
|
-
this.children = [this.bsGoods];
|
|
98
|
-
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
99
|
-
this.rules = ((_a = this === null || this === void 0 ? void 0 : this.componentConfig) === null || _a === void 0 ? void 0 : _a.required) ? [{
|
|
100
|
-
required: true,
|
|
101
|
-
validator: function validator(_, value) {
|
|
102
|
-
var _a;
|
|
103
|
-
if (!value || !((_a = value === null || value === void 0 ? void 0 : value.bsGoods) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
104
|
-
return Promise.reject(new Error("请选择bs商品"));
|
|
105
|
-
}
|
|
106
|
-
return Promise.resolve();
|
|
107
|
-
}
|
|
108
|
-
}] : [];
|
|
109
|
-
this.dataType = "object";
|
|
110
|
-
}
|
|
111
|
-
return BsGoods;
|
|
112
|
-
}();
|
|
113
|
-
exports["default"] = BsGoods;
|