@kmkf-fe-packages/services-components 2.0.19-beta.1 → 2.0.19-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/hook/useGetHasErpData.js +7 -2
- package/dist/esm/commonComponents/GlobalContext/index.js +10 -4
- package/dist/esm/components/LogisticsInterception/index.d.ts +0 -6
- package/dist/esm/components/LogisticsInterception/index.js +27 -13
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +0 -4
- package/dist/esm/components/LogisticsMoreInterception/index.js +17 -9
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -18,9 +18,14 @@ var getTemplate = function getTemplate(companyUserConfig) {
|
|
|
18
18
|
};
|
|
19
19
|
function useGetHasErpData(reduxData) {
|
|
20
20
|
var companyUserConfig = useMemo(function () {
|
|
21
|
-
var _ref, _reduxData$main$userI, _reduxData$main, _reduxData$workOrder, _userInfo$companyUser;
|
|
21
|
+
var _ref, _ref2, _reduxData$main$userI, _reduxData$main, _reduxData$workOrder, _reduxData$global, _userInfo$companyUser;
|
|
22
22
|
// console.log("companyUserConfig--reduxData", reduxData);
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* main - pc
|
|
25
|
+
* workOrder - 除千牛工作台外所有插件端
|
|
26
|
+
* global - 千牛工作台
|
|
27
|
+
* **/
|
|
28
|
+
var userInfo = (_ref = (_ref2 = (_reduxData$main$userI = reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : _reduxData$main.userInfo) !== null && _reduxData$main$userI !== void 0 ? _reduxData$main$userI : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : _reduxData$workOrder.userInfo) !== null && _ref2 !== void 0 ? _ref2 : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : _reduxData$global.userInfo) !== null && _ref !== void 0 ? _ref : {};
|
|
24
29
|
var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
|
|
25
30
|
if (typeof companyUserConfig === "string") {
|
|
26
31
|
try {
|
|
@@ -41,6 +41,12 @@ var Global = function Global(_ref) {
|
|
|
41
41
|
loading = _useState4[0],
|
|
42
42
|
setLoading = _useState4[1];
|
|
43
43
|
var reduxDataMap = useMemo(function () {
|
|
44
|
+
try {
|
|
45
|
+
var _ref2, _ref3, _reduxData$main$userI, _reduxData$main, _reduxData$main$userI2, _reduxData$workOrder, _reduxData$workOrder$, _reduxData$global, _reduxData$global$use;
|
|
46
|
+
sessionStorage.setItem("companyKey_test", (_ref2 = (_ref3 = (_reduxData$main$userI = reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : (_reduxData$main$userI2 = _reduxData$main.userInfo) === null || _reduxData$main$userI2 === void 0 ? void 0 : _reduxData$main$userI2.companyKey) !== null && _reduxData$main$userI !== void 0 ? _reduxData$main$userI : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : (_reduxData$workOrder$ = _reduxData$workOrder.userInfo) === null || _reduxData$workOrder$ === void 0 ? void 0 : _reduxData$workOrder$.companyKey) !== null && _ref3 !== void 0 ? _ref3 : reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : (_reduxData$global$use = _reduxData$global.userInfo) === null || _reduxData$global$use === void 0 ? void 0 : _reduxData$global$use.companyKey) !== null && _ref2 !== void 0 ? _ref2 : "");
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.log("companyKey_test_error", error);
|
|
49
|
+
}
|
|
44
50
|
return reduxData;
|
|
45
51
|
}, [JSON.stringify(reduxData)]);
|
|
46
52
|
useEffect(function () {
|
|
@@ -72,7 +78,7 @@ var Global = function Global(_ref) {
|
|
|
72
78
|
return "success";
|
|
73
79
|
}, [globalState, logisticsCompanyState, sendDataState, addressDataState]);
|
|
74
80
|
var reloadData = /*#__PURE__*/function () {
|
|
75
|
-
var
|
|
81
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
76
82
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
77
83
|
while (1) switch (_context.prev = _context.next) {
|
|
78
84
|
case 0:
|
|
@@ -118,11 +124,11 @@ var Global = function Global(_ref) {
|
|
|
118
124
|
}, _callee);
|
|
119
125
|
}));
|
|
120
126
|
return function reloadData() {
|
|
121
|
-
return
|
|
127
|
+
return _ref4.apply(this, arguments);
|
|
122
128
|
};
|
|
123
129
|
}();
|
|
124
130
|
var initDataSource = /*#__PURE__*/function () {
|
|
125
|
-
var
|
|
131
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
126
132
|
var mapping, mergeMapping, promises, _Object$keys, _Object$keys2, _Object$keys2$filter, _promises;
|
|
127
133
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
128
134
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -170,7 +176,7 @@ var Global = function Global(_ref) {
|
|
|
170
176
|
}, _callee2, null, [[4, 10]]);
|
|
171
177
|
}));
|
|
172
178
|
return function initDataSource() {
|
|
173
|
-
return
|
|
179
|
+
return _ref5.apply(this, arguments);
|
|
174
180
|
};
|
|
175
181
|
}();
|
|
176
182
|
if (allState === "loading") {
|
|
@@ -10,8 +10,6 @@ import InterceptState from "./InterceptState";
|
|
|
10
10
|
import InterceptApiStatus from "./InterceptApiStatus";
|
|
11
11
|
import Express from "../Express";
|
|
12
12
|
import ExpressCode from "../ExpressCode";
|
|
13
|
-
import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
14
|
-
import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
15
13
|
declare class Logistics implements ComponentInterface {
|
|
16
14
|
name: string;
|
|
17
15
|
columnHeader: string | JSX.Element;
|
|
@@ -25,8 +23,6 @@ declare class Logistics implements ComponentInterface {
|
|
|
25
23
|
interceptLogisticsStatus: InterceptStatus;
|
|
26
24
|
interceptApiStatus: InterceptApiStatus;
|
|
27
25
|
interceptSenderMobile: InterceptSenderMobile;
|
|
28
|
-
interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
|
|
29
|
-
interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
|
|
30
26
|
interceptSnapshot: InterceptSnapshot;
|
|
31
27
|
interceptState: InterceptState;
|
|
32
28
|
isCombinationComponent: boolean;
|
|
@@ -60,8 +56,6 @@ declare class Logistics implements ComponentInterface {
|
|
|
60
56
|
};
|
|
61
57
|
interceptSnapshot: any;
|
|
62
58
|
interceptState: any;
|
|
63
|
-
interceptLogisticsUserKCode: any;
|
|
64
|
-
interceptLogisticsUserSecretKey: any;
|
|
65
59
|
};
|
|
66
60
|
renderPc: () => null;
|
|
67
61
|
renderExport: () => null;
|
|
@@ -22,9 +22,14 @@ import InterceptApiStatus from "./InterceptApiStatus";
|
|
|
22
22
|
import Express from "../Express";
|
|
23
23
|
import ExpressCode from "../ExpressCode";
|
|
24
24
|
import ColumnHeader from "./columnHeader";
|
|
25
|
-
import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
26
|
-
import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
27
|
-
|
|
25
|
+
// import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
26
|
+
// import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
27
|
+
// import interceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
28
|
+
var Logistics = /*#__PURE__*/_createClass(
|
|
29
|
+
// interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
|
|
30
|
+
// interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
|
|
31
|
+
|
|
32
|
+
function Logistics(options) {
|
|
28
33
|
var _this = this;
|
|
29
34
|
_classCallCheck(this, Logistics);
|
|
30
35
|
_defineProperty(this, "name", void 0);
|
|
@@ -39,8 +44,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
39
44
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
40
45
|
_defineProperty(this, "interceptApiStatus", void 0);
|
|
41
46
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
42
|
-
_defineProperty(this, "interceptLogisticsUserKCode", void 0);
|
|
43
|
-
_defineProperty(this, "interceptLogisticsUserSecretKey", void 0);
|
|
44
47
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
45
48
|
_defineProperty(this, "interceptState", void 0);
|
|
46
49
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
@@ -55,7 +58,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
55
58
|
_defineProperty(this, "effects", void 0);
|
|
56
59
|
_defineProperty(this, "dataType", void 0);
|
|
57
60
|
_defineProperty(this, "renderClient", function (record) {
|
|
58
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record)
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
59
62
|
});
|
|
60
63
|
_defineProperty(this, "renderLog", function (record) {
|
|
61
64
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
@@ -70,9 +73,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
70
73
|
interceptApiStatus: _this.interceptApiStatus.getComponentValue(r),
|
|
71
74
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
72
75
|
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
73
|
-
interceptState: _this.interceptState.getComponentValue(r)
|
|
74
|
-
interceptLogisticsUserKCode:
|
|
75
|
-
|
|
76
|
+
interceptState: _this.interceptState.getComponentValue(r)
|
|
77
|
+
// interceptLogisticsUserKCode:
|
|
78
|
+
// this.interceptLogisticsUserKCode.getComponentValue(r),
|
|
79
|
+
// interceptLogisticsUserSecretKey:
|
|
80
|
+
// this.interceptLogisticsUserSecretKey.getComponentValue(r),
|
|
76
81
|
};
|
|
77
82
|
});
|
|
78
83
|
_defineProperty(this, "renderPc", function () {
|
|
@@ -107,7 +112,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
107
112
|
subKey: "interceptCompany"
|
|
108
113
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
109
114
|
subKey: "interceptCode"
|
|
110
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)
|
|
115
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)
|
|
116
|
+
// this.interceptLogisticsUserKCode.filterConfig(item),
|
|
117
|
+
// this.interceptLogisticsUserSecretKey.filterConfig(item),
|
|
118
|
+
];
|
|
111
119
|
});
|
|
112
120
|
this.name = options.name;
|
|
113
121
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -129,8 +137,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
129
137
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
130
138
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
131
139
|
this.interceptState = new InterceptState(options);
|
|
132
|
-
this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
133
|
-
|
|
140
|
+
// this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
141
|
+
// options,
|
|
142
|
+
// );
|
|
143
|
+
// this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
|
|
134
144
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
135
145
|
id: "".concat(options.id, "_interceptCompany"),
|
|
136
146
|
name: "物流信息"
|
|
@@ -142,7 +152,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
142
152
|
this.isCombinationComponent = true;
|
|
143
153
|
this.canSort = false;
|
|
144
154
|
this.dataType = "object";
|
|
145
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState
|
|
155
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState
|
|
156
|
+
// this.interceptLogisticsUserKCode,
|
|
157
|
+
// this.interceptLogisticsUserSecretKey,
|
|
158
|
+
];
|
|
159
|
+
|
|
146
160
|
this.rules = [{
|
|
147
161
|
validator: function validator(_, value) {
|
|
148
162
|
var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre, _value$interceptSende;
|
|
@@ -9,8 +9,6 @@ import InterceptStatus from "./InterceptStatus";
|
|
|
9
9
|
import InterceptCode from "./interceptCode";
|
|
10
10
|
import InterceptApiStatus from "./InterceptApiStatus";
|
|
11
11
|
import Express from "./interceptCompany";
|
|
12
|
-
import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
13
|
-
import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
14
12
|
declare class Logistics implements ComponentInterface {
|
|
15
13
|
name: string;
|
|
16
14
|
columnHeader: string | JSX.Element;
|
|
@@ -25,8 +23,6 @@ declare class Logistics implements ComponentInterface {
|
|
|
25
23
|
interceptApiStatus: InterceptApiStatus;
|
|
26
24
|
interceptSenderMobile: InterceptSenderMobile;
|
|
27
25
|
interceptSnapshot: InterceptSnapshot;
|
|
28
|
-
interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
|
|
29
|
-
interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
|
|
30
26
|
isCombinationComponent: boolean;
|
|
31
27
|
formField: string;
|
|
32
28
|
canSort: boolean;
|
|
@@ -25,9 +25,13 @@ import Express from "./interceptCompany";
|
|
|
25
25
|
import ColumnHeader from "./columnHeader";
|
|
26
26
|
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
27
27
|
import CopyText from "../../commonComponents/CopyText";
|
|
28
|
-
import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
29
|
-
import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
30
|
-
var Logistics = /*#__PURE__*/_createClass(
|
|
28
|
+
// import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
29
|
+
// import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
30
|
+
var Logistics = /*#__PURE__*/_createClass(
|
|
31
|
+
// interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
|
|
32
|
+
// interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
|
|
33
|
+
|
|
34
|
+
function Logistics(options) {
|
|
31
35
|
var _this = this,
|
|
32
36
|
_this$componentConfig5,
|
|
33
37
|
_this$componentConfig6;
|
|
@@ -45,8 +49,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
45
49
|
_defineProperty(this, "interceptApiStatus", void 0);
|
|
46
50
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
47
51
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
48
|
-
_defineProperty(this, "interceptLogisticsUserKCode", void 0);
|
|
49
|
-
_defineProperty(this, "interceptLogisticsUserSecretKey", void 0);
|
|
50
52
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
51
53
|
_defineProperty(this, "formField", void 0);
|
|
52
54
|
_defineProperty(this, "canSort", void 0);
|
|
@@ -80,7 +82,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
80
82
|
style: {
|
|
81
83
|
color: "red"
|
|
82
84
|
}
|
|
83
|
-
}, (_item$interceptLogist2 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist2 === void 0 ? void 0 : _item$interceptLogist2.status, " \u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : /*#__PURE__*/React.createElement("span", null, (_item$interceptLogist4 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist4 === void 0 ? void 0 : _item$interceptLogist4.status)) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null
|
|
85
|
+
}, (_item$interceptLogist2 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist2 === void 0 ? void 0 : _item$interceptLogist2.status, " \u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : /*#__PURE__*/React.createElement("span", null, (_item$interceptLogist4 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist4 === void 0 ? void 0 : _item$interceptLogist4.status)) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null);
|
|
84
86
|
}));
|
|
85
87
|
});
|
|
86
88
|
_defineProperty(this, "renderClient", function (record) {
|
|
@@ -145,8 +147,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
145
147
|
this.interceptApiStatus = new InterceptApiStatus(options);
|
|
146
148
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
147
149
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
148
|
-
this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
|
|
149
|
-
this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
150
|
+
// this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
|
|
151
|
+
// this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
152
|
+
// options
|
|
153
|
+
// );
|
|
150
154
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
151
155
|
id: "".concat(options.id, "_logisticsInterceptCompanyList"),
|
|
152
156
|
name: "物流信息"
|
|
@@ -158,7 +162,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
158
162
|
this.isCombinationComponent = true;
|
|
159
163
|
this.canSort = false;
|
|
160
164
|
this.dataType = "object";
|
|
161
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot
|
|
165
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot
|
|
166
|
+
// this.interceptLogisticsUserKCode,
|
|
167
|
+
// this.interceptLogisticsUserSecretKey,
|
|
168
|
+
];
|
|
169
|
+
|
|
162
170
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
163
171
|
required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
|
|
164
172
|
validator: function validator(_, value) {
|
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, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => GyReturn | JstSendGood | LogisticsInterception | LogisticsMoreInterception | MsgStatus | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | 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 | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | 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.19-beta.
|
|
3
|
+
"version": "2.0.19-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.19-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.19-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.19-beta.11",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.19-beta.10",
|
|
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": "a27807137c01b6ecc8862ba520486a9b8fe8fe01",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var react_redux_1 = require("react-redux");
|
|
6
|
-
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
-
var getTemplate = function getTemplate(companyUserConfig) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
9
|
-
return JSON.stringify({
|
|
10
|
-
hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
|
|
11
|
-
hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
|
|
12
|
-
hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
|
|
13
|
-
hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
|
|
14
|
-
hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
|
|
15
|
-
hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
function useGetHasErpData() {
|
|
19
|
-
var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
|
|
20
|
-
var _a, _b, _c, _d;
|
|
21
|
-
console.log("state--useSelector", state);
|
|
22
|
-
/**
|
|
23
|
-
* pc main
|
|
24
|
-
* 端 workOrder
|
|
25
|
-
* **/
|
|
26
|
-
return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
|
|
27
|
-
}], function (state) {
|
|
28
|
-
var _a;
|
|
29
|
-
var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
|
|
30
|
-
if (typeof companyUserConfig === "string") {
|
|
31
|
-
try {
|
|
32
|
-
companyUserConfig = JSON.parse(companyUserConfig);
|
|
33
|
-
} catch (e) {
|
|
34
|
-
console.error("companyUserConfig转换异常", companyUserConfig);
|
|
35
|
-
companyUserConfig = {};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return companyUserConfig;
|
|
39
|
-
}));
|
|
40
|
-
var _a = react_1.useState(getTemplate({})),
|
|
41
|
-
hasErpDataJson = _a[0],
|
|
42
|
-
setHasErpDataJson = _a[1];
|
|
43
|
-
react_1.useEffect(function () {
|
|
44
|
-
setHasErpDataJson(getTemplate(companyUserConfig));
|
|
45
|
-
console.log("companyUserConfig---", companyUserConfig);
|
|
46
|
-
}, [companyUserConfig]);
|
|
47
|
-
var hasErpData = react_1.useMemo(function () {
|
|
48
|
-
return JSON.parse(hasErpDataJson);
|
|
49
|
-
}, [hasErpDataJson]);
|
|
50
|
-
return hasErpData;
|
|
51
|
-
}
|
|
52
|
-
exports["default"] = useGetHasErpData;
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4
|
-
function adopt(value) {
|
|
5
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
6
|
-
resolve(value);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.next(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function rejected(value) {
|
|
18
|
-
try {
|
|
19
|
-
step(generator["throw"](value));
|
|
20
|
-
} catch (e) {
|
|
21
|
-
reject(e);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function step(result) {
|
|
25
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26
|
-
}
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __generator = this && this.__generator || function (thisArg, body) {
|
|
31
|
-
var _ = {
|
|
32
|
-
label: 0,
|
|
33
|
-
sent: function sent() {
|
|
34
|
-
if (t[0] & 1) throw t[1];
|
|
35
|
-
return t[1];
|
|
36
|
-
},
|
|
37
|
-
trys: [],
|
|
38
|
-
ops: []
|
|
39
|
-
},
|
|
40
|
-
f,
|
|
41
|
-
y,
|
|
42
|
-
t,
|
|
43
|
-
g;
|
|
44
|
-
return g = {
|
|
45
|
-
next: verb(0),
|
|
46
|
-
"throw": verb(1),
|
|
47
|
-
"return": verb(2)
|
|
48
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
49
|
-
return this;
|
|
50
|
-
}), g;
|
|
51
|
-
function verb(n) {
|
|
52
|
-
return function (v) {
|
|
53
|
-
return step([n, v]);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function step(op) {
|
|
57
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
58
|
-
while (_) try {
|
|
59
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
60
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
61
|
-
switch (op[0]) {
|
|
62
|
-
case 0:
|
|
63
|
-
case 1:
|
|
64
|
-
t = op;
|
|
65
|
-
break;
|
|
66
|
-
case 4:
|
|
67
|
-
_.label++;
|
|
68
|
-
return {
|
|
69
|
-
value: op[1],
|
|
70
|
-
done: false
|
|
71
|
-
};
|
|
72
|
-
case 5:
|
|
73
|
-
_.label++;
|
|
74
|
-
y = op[1];
|
|
75
|
-
op = [0];
|
|
76
|
-
continue;
|
|
77
|
-
case 7:
|
|
78
|
-
op = _.ops.pop();
|
|
79
|
-
_.trys.pop();
|
|
80
|
-
continue;
|
|
81
|
-
default:
|
|
82
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
83
|
-
_ = 0;
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
87
|
-
_.label = op[1];
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
91
|
-
_.label = t[1];
|
|
92
|
-
t = op;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
if (t && _.label < t[2]) {
|
|
96
|
-
_.label = t[2];
|
|
97
|
-
_.ops.push(op);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
if (t[2]) _.ops.pop();
|
|
101
|
-
_.trys.pop();
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
op = body.call(thisArg, _);
|
|
105
|
-
} catch (e) {
|
|
106
|
-
op = [6, e];
|
|
107
|
-
y = 0;
|
|
108
|
-
} finally {
|
|
109
|
-
f = t = 0;
|
|
110
|
-
}
|
|
111
|
-
if (op[0] & 5) throw op[1];
|
|
112
|
-
return {
|
|
113
|
-
value: op[0] ? op[1] : void 0,
|
|
114
|
-
done: true
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
exports.__esModule = true;
|
|
119
|
-
var react_1 = require("react");
|
|
120
|
-
var useGetHasErpData_1 = require("../hook/useGetHasErpData");
|
|
121
|
-
var ahooks_1 = require("ahooks");
|
|
122
|
-
var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
|
|
123
|
-
function useGetErpAddressData(notJudgedErp) {
|
|
124
|
-
var _this = this;
|
|
125
|
-
var _a = react_1.useState("loading"),
|
|
126
|
-
globalState = _a[0],
|
|
127
|
-
setGlobalState = _a[1];
|
|
128
|
-
var hasErpData = useGetHasErpData_1["default"]();
|
|
129
|
-
ahooks_1.useUpdateEffect(function () {
|
|
130
|
-
asyncQueryData(hasErpData, notJudgedErp);
|
|
131
|
-
}, [hasErpData, notJudgedErp]);
|
|
132
|
-
var asyncQueryData = function asyncQueryData(hasErpData, notJudgedErp) {
|
|
133
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
134
|
-
var hasBs, hasWdt, hasGy, promises, e_1;
|
|
135
|
-
return __generator(this, function (_a) {
|
|
136
|
-
switch (_a.label) {
|
|
137
|
-
case 0:
|
|
138
|
-
hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
139
|
-
promises = [];
|
|
140
|
-
if (hasBs || notJudgedErp) promises.push(kmkf_utils_1.servers.queryBsAddressData);
|
|
141
|
-
if (hasWdt || notJudgedErp) promises.push(kmkf_utils_1.servers.queryWdtAddressData);
|
|
142
|
-
if (hasGy || notJudgedErp) promises.push(kmkf_utils_1.servers.queryGyAddressData);
|
|
143
|
-
_a.label = 1;
|
|
144
|
-
case 1:
|
|
145
|
-
_a.trys.push([1, 3,, 4]);
|
|
146
|
-
return [4 /*yield*/, Promise.all(promises.map(function (promise) {
|
|
147
|
-
return promise();
|
|
148
|
-
}))];
|
|
149
|
-
case 2:
|
|
150
|
-
_a.sent();
|
|
151
|
-
setGlobalState("success");
|
|
152
|
-
return [3 /*break*/, 4];
|
|
153
|
-
case 3:
|
|
154
|
-
e_1 = _a.sent();
|
|
155
|
-
setGlobalState("failed");
|
|
156
|
-
return [3 /*break*/, 4];
|
|
157
|
-
case 4:
|
|
158
|
-
return [2 /*return*/];
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
var onReload = function onReload() {
|
|
165
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
166
|
-
return __generator(this, function (_a) {
|
|
167
|
-
switch (_a.label) {
|
|
168
|
-
case 0:
|
|
169
|
-
return [4 /*yield*/, asyncQueryData(hasErpData, notJudgedErp)];
|
|
170
|
-
case 1:
|
|
171
|
-
_a.sent();
|
|
172
|
-
return [2 /*return*/];
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
return [globalState, onReload];
|
|
179
|
-
}
|
|
180
|
-
exports["default"] = useGetErpAddressData;
|