@kmkf-fe-packages/services-components 2.0.12-beta.22 → 2.0.12-beta.23
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/components/Common/index.js +1 -1
- package/dist/esm/components/CommonSystemOrder/index.js +2 -2
- package/dist/esm/components/CommonTradeId/index.js +1 -1
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +2 -0
- package/dist/esm/components/Public/ReissueGoods/index.js +29 -23
- package/dist/esm/components/Public/SystemOrderType/index.d.ts +26 -0
- package/dist/esm/components/Public/SystemOrderType/index.js +94 -0
- 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
|
@@ -733,7 +733,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
733
733
|
var key = item.msgType || "ding";
|
|
734
734
|
var formatMsgContent = /*#__PURE__*/React.createElement("span", {
|
|
735
735
|
key: index
|
|
736
|
-
}, msgTypeCh[key] || key, "-", item.ruleName, "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
736
|
+
}, msgTypeCh[key] || key, "-", item.ruleName ? "".concat(item.ruleName, "-") : "", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
737
737
|
return /*#__PURE__*/React.createElement("div", {
|
|
738
738
|
key: "wrap_".concat(index),
|
|
739
739
|
style: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
|
|
4
|
+
import SystemOrderType from '../SystemOrderType';
|
|
4
5
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
5
6
|
declare class PublicReissue implements ComponentInterface {
|
|
6
7
|
name: string;
|
|
@@ -18,6 +19,7 @@ declare class PublicReissue implements ComponentInterface {
|
|
|
18
19
|
bsType: BsType;
|
|
19
20
|
bsMemo: BsMemo;
|
|
20
21
|
systemOrderNo: SystemOrderNo;
|
|
22
|
+
systemOrderType: SystemOrderType;
|
|
21
23
|
reissueGoods: BsHeaderGood | CommonHeaderGoods;
|
|
22
24
|
constructor(options: PickOption);
|
|
23
25
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -15,7 +15,8 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
15
15
|
import { PublicReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
import { BsGoodsTable } from "../../Common/index";
|
|
18
|
-
import { BsType, BsMemo,
|
|
18
|
+
import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
|
|
19
|
+
import SystemOrderType from "../SystemOrderType";
|
|
19
20
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
21
|
function toNum(value) {
|
|
21
22
|
if (typeof value === "string") {
|
|
@@ -32,6 +33,7 @@ var typeMap = {
|
|
|
32
33
|
typeName: "jstReissueType",
|
|
33
34
|
remark: "jstReissueType_memo",
|
|
34
35
|
systemOrderNo: "jstSystemOrderNo",
|
|
36
|
+
systemOrderBillType: 'jstSystemOrderBillType',
|
|
35
37
|
errMsg: "请选择聚水潭补发商品",
|
|
36
38
|
name: "聚水潭",
|
|
37
39
|
validator: function validator(_rule, value) {
|
|
@@ -71,8 +73,9 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
71
73
|
_typeMap$options$type6,
|
|
72
74
|
_typeMap$options$type7,
|
|
73
75
|
_typeMap$options$type8,
|
|
76
|
+
_typeMap$options$type9,
|
|
74
77
|
_this$componentConfig6,
|
|
75
|
-
_typeMap$options$
|
|
78
|
+
_typeMap$options$type12;
|
|
76
79
|
_classCallCheck(this, PublicReissue);
|
|
77
80
|
_defineProperty(this, "name", void 0);
|
|
78
81
|
_defineProperty(this, "id", void 0);
|
|
@@ -89,10 +92,11 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
89
92
|
_defineProperty(this, "bsType", void 0);
|
|
90
93
|
_defineProperty(this, "bsMemo", void 0);
|
|
91
94
|
_defineProperty(this, "systemOrderNo", void 0);
|
|
95
|
+
_defineProperty(this, "systemOrderType", void 0);
|
|
92
96
|
_defineProperty(this, "reissueGoods", void 0);
|
|
93
97
|
_defineProperty(this, "renderClient", function (record) {
|
|
94
98
|
var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
|
|
95
|
-
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
99
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
96
100
|
id: _this.id,
|
|
97
101
|
label: _this.name,
|
|
98
102
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
@@ -106,19 +110,20 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
106
110
|
return null;
|
|
107
111
|
});
|
|
108
112
|
_defineProperty(this, "renderLog", function (r) {
|
|
109
|
-
var _r, _typeMap$_this$type3, _typeMap$_this$type4, _r2, _typeMap$_this$
|
|
110
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
111
|
-
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
113
|
+
var _r, _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5, _r2, _typeMap$_this$type6, _typeMap$_this$type7, _this$componentConfig2;
|
|
114
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.systemOrderBillType)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B:", _this.systemOrderType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
115
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)]) || [],
|
|
112
116
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
|
|
113
117
|
type: _this.type
|
|
114
118
|
})) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
|
|
115
119
|
});
|
|
116
120
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
117
|
-
var _typeMap$_this$
|
|
121
|
+
var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type10, _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type14, _typeMap$_this$type15;
|
|
118
122
|
var obj = {};
|
|
119
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
120
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
121
|
-
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$
|
|
123
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.typeName)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.typeName)];
|
|
124
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.key)];
|
|
125
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.systemOrderNo)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.systemOrderNo)];
|
|
126
|
+
obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.systemOrderBillType)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.systemOrderBillType)];
|
|
122
127
|
return obj;
|
|
123
128
|
});
|
|
124
129
|
_defineProperty(this, "renderExport", function () {
|
|
@@ -167,8 +172,8 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
167
172
|
},
|
|
168
173
|
filterFn: function filterFn(value) {
|
|
169
174
|
return function (i) {
|
|
170
|
-
var _typeMap$_this$
|
|
171
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$
|
|
175
|
+
var _typeMap$_this$type16;
|
|
176
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.typeName)), value);
|
|
172
177
|
};
|
|
173
178
|
}
|
|
174
179
|
}, {
|
|
@@ -205,29 +210,30 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
|
|
|
205
210
|
id: "".concat(options.id, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.remark),
|
|
206
211
|
name: "".concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.name, "\u8865\u53D1\u5907\u6CE8")
|
|
207
212
|
}));
|
|
208
|
-
this.
|
|
209
|
-
id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.
|
|
210
|
-
name: "
|
|
211
|
-
}))
|
|
212
|
-
|
|
213
|
+
this.systemOrderType = new SystemOrderType(_objectSpread(_objectSpread({}, options), {}, {
|
|
214
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.systemOrderBillType),
|
|
215
|
+
name: "".concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.name, "\u7CFB\u7EDF\u8BA2\u5355\u7C7B\u578B")
|
|
216
|
+
}));
|
|
217
|
+
this.reissueGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
218
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.key),
|
|
213
219
|
name: "商品信息"
|
|
214
220
|
}));
|
|
215
|
-
this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.reissueGoods];
|
|
221
|
+
this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.systemOrderType, this.reissueGoods];
|
|
216
222
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
217
223
|
var isRequired = this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required;
|
|
218
224
|
this.rules = [{
|
|
219
225
|
required: isRequired,
|
|
220
226
|
validator: function validator(_, value) {
|
|
221
|
-
var _value, _typeMap$options$
|
|
222
|
-
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$
|
|
223
|
-
var _typeMap$options$
|
|
224
|
-
return Promise.reject(new Error("".concat((_typeMap$options$
|
|
227
|
+
var _value, _typeMap$options$type10;
|
|
228
|
+
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
229
|
+
var _typeMap$options$type11;
|
|
230
|
+
return Promise.reject(new Error("".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.errMsg)));
|
|
225
231
|
}
|
|
226
232
|
return Promise.resolve();
|
|
227
233
|
}
|
|
228
234
|
}, {
|
|
229
235
|
required: isRequired,
|
|
230
|
-
validator: ((_typeMap$options$
|
|
236
|
+
validator: ((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.validator) || function () {
|
|
231
237
|
return Promise.resolve();
|
|
232
238
|
}
|
|
233
239
|
}];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class SystemOrderType implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
18
|
+
renderClient: (r: any) => React.JSX.Element | null;
|
|
19
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
+
getComponentValue: (r: Record) => any;
|
|
22
|
+
renderExport: (value: string, record: Record) => any;
|
|
23
|
+
editRender: () => null;
|
|
24
|
+
filterConfig: () => never[];
|
|
25
|
+
}
|
|
26
|
+
export default SystemOrderType;
|
|
@@ -0,0 +1,94 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
var componentType = {
|
|
18
|
+
JST_REISSUE_GOODS: "jstSystemOrderBillType"
|
|
19
|
+
};
|
|
20
|
+
var SystemOrderType = /*#__PURE__*/_createClass(function SystemOrderType(options) {
|
|
21
|
+
var _this = this;
|
|
22
|
+
_classCallCheck(this, SystemOrderType);
|
|
23
|
+
_defineProperty(this, "name", void 0);
|
|
24
|
+
_defineProperty(this, "id", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "type", void 0);
|
|
27
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
28
|
+
_defineProperty(this, "align", void 0);
|
|
29
|
+
_defineProperty(this, "width", void 0);
|
|
30
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
+
_defineProperty(this, "formField", void 0);
|
|
32
|
+
_defineProperty(this, "canSort", void 0);
|
|
33
|
+
_defineProperty(this, "children", void 0);
|
|
34
|
+
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "getParentId", function () {
|
|
36
|
+
var _this$id$split = _this.id.split("_"),
|
|
37
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
38
|
+
key = _this$id$split2[0],
|
|
39
|
+
name = _this$id$split2[1];
|
|
40
|
+
return "".concat(key, "_").concat(name);
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderClient", function (r) {
|
|
43
|
+
var _r$key;
|
|
44
|
+
var _this$getParentId$spl = _this.getParentId().split("_"),
|
|
45
|
+
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
46
|
+
key = _this$getParentId$spl2[0];
|
|
47
|
+
if (!(r !== null && r !== void 0 && r[key][componentType[_this.type]])) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
var text = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : _r$key[componentType[_this.type]] : "";
|
|
51
|
+
return !isNull(r === null || r === void 0 ? void 0 : r[key]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
52
|
+
id: _this.id,
|
|
53
|
+
label: _this.name,
|
|
54
|
+
value: text
|
|
55
|
+
}) : null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
58
|
+
var _this$getComponentVal;
|
|
59
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
62
|
+
var id = _this.getParentId();
|
|
63
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
64
|
+
return _this.renderPc(undefined, r);
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
+
var id = _this.getParentId();
|
|
68
|
+
var text = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : r[id] : "";
|
|
69
|
+
return text;
|
|
70
|
+
});
|
|
71
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
72
|
+
var _this$getComponentVal2;
|
|
73
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
74
|
+
});
|
|
75
|
+
_defineProperty(this, "editRender", function () {
|
|
76
|
+
return null;
|
|
77
|
+
});
|
|
78
|
+
_defineProperty(this, "filterConfig", function () {
|
|
79
|
+
return [];
|
|
80
|
+
});
|
|
81
|
+
this.name = options.name;
|
|
82
|
+
this.id = options.id;
|
|
83
|
+
this.sortField = options.id;
|
|
84
|
+
this.formField = options.id;
|
|
85
|
+
this.type = options.type;
|
|
86
|
+
this.componentConfig = options.componentConfig;
|
|
87
|
+
this.align = "left";
|
|
88
|
+
this.width = 140;
|
|
89
|
+
this.isCombinationComponent = false;
|
|
90
|
+
this.canSort = false;
|
|
91
|
+
this.dataType = "string";
|
|
92
|
+
this.children = [];
|
|
93
|
+
});
|
|
94
|
+
export default SystemOrderType;
|
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, GyGoods, BsE3Reissue, MemberLevel } 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) => CommonSystemOrder | GyReissue | JstSendGood | Label | MsgStatus | PublicReissueGoods | 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 | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | MemberLevel | AfterSalesOrderId | GyGoods;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.12-beta.
|
|
3
|
+
"version": "2.0.12-beta.23",
|
|
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.12-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.12-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.12-beta.23",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.12-beta.23",
|
|
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": "4aabf17e2b776525fea07c701a025e0be82cc915",
|
|
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;
|