@bit-sun/business-component 2.3.28 → 2.4.0

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.
Files changed (29) hide show
  1. package/dist/index.esm.js +592 -456
  2. package/dist/index.js +592 -456
  3. package/dist/utils/CustomLoginInfo.d.ts +10 -0
  4. package/dist/utils/requestUtils.d.ts +28 -0
  5. package/dist/utils/utils.d.ts +0 -6
  6. package/package.json +1 -1
  7. package/src/components/Business/AddSelectBusiness/index.tsx +3 -2
  8. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -7
  9. package/src/components/Business/BsSulaQueryTable/index.tsx +11 -8
  10. package/src/components/Business/BsSulaQueryTable/setting.tsx +7 -5
  11. package/src/components/Business/JsonQueryTable/components/Formula.tsx +3 -2
  12. package/src/components/Business/JsonQueryTable/index.tsx +8 -6
  13. package/src/components/Business/SearchSelect/utils.ts +2 -1
  14. package/src/components/Business/columnSettingTable/columnSetting.tsx +5 -4
  15. package/src/components/Business/columnSettingTable/index.tsx +3 -2
  16. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +3 -2
  17. package/src/components/Functional/AddSelect/helps.ts +2 -1
  18. package/src/components/Functional/AddSelect/index.tsx +3 -2
  19. package/src/components/Functional/BillEntry/index.tsx +3 -2
  20. package/src/components/Functional/DataImport/index.tsx +2 -1
  21. package/src/components/Functional/DataValidation/index.tsx +2 -1
  22. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +2 -1
  23. package/src/components/Functional/SearchSelect/index.tsx +10 -9
  24. package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
  25. package/src/components/Solution/RuleComponent/ruleFiled.js +2 -1
  26. package/src/plugin/TableColumnSetting/index.tsx +4 -3
  27. package/src/utils/CustomLoginInfo.ts +39 -0
  28. package/src/utils/requestUtils.ts +139 -7
  29. package/src/utils/utils.ts +0 -21
package/dist/index.js CHANGED
@@ -44,474 +44,363 @@ var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize);
44
44
  var castArray__default = /*#__PURE__*/_interopDefaultLegacy(castArray);
45
45
  var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray$1);
46
46
 
47
- var ENUM = {
48
- // 浏览器缓存信息
49
- BROWSER_CACHE: {
50
- COLUMN_CONDITION: 'columnCondition',
51
- MAIN_AUTH_CODES: 'menuAuth_mainProject',
52
- LIMIT_MENU_DATA: 'limitedMenuData',
53
- USER_INFO: 'userInfo',
54
- DICT_CODES: 'dicData',
55
- CHILD_APP_BACK: 'child_app_back',
56
- SEARCH_FIELDS_CONDITION: 'searchFieldsCondition' //表格搜索项信息缓存
57
- }
58
- };
59
-
60
- var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
61
- // 存储表头
62
- var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
63
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
64
- var configArray = JSON.parse(config);
65
- var currentSetting = configArray.filter(function (item) {
66
- return item.code === tableCode;
67
- });
68
- if (currentSetting.length) {
69
- currentSetting[0].detail = JSON.stringify(configvalue);
70
- } else {
71
- configArray.push({
72
- "code": tableCode,
73
- "detail": JSON.stringify(configvalue)
74
- });
75
- }
76
- localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
77
- };
78
- // 取表头
79
- var getConfigTableColumns = function getConfigTableColumns(tableCode) {
80
- if (!tableCode) return [];
81
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
82
- var configArray = JSON.parse(config);
83
- var configSetting = configArray.filter(function (item) {
84
- return item.code === tableCode;
85
- });
86
- if (configSetting.length) {
87
- return JSON.parse(configSetting[0].detail || '[]');
88
- }
89
- return [];
90
- };
91
- var getCurrentTenantId = function getCurrentTenantId() {
92
- return localStorage.getItem('current_tenant_id') || 1;
93
- };
94
- function getEmployeeId() {
95
- var _resposne$employeeRes;
96
- return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
97
- }
98
- function getEmployeeCode() {
99
- var _resposne$employeeRes2;
100
- return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
101
- }
102
- function getSessionId() {
103
- return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
104
- }
105
- function getAccountId() {
106
- var _resposne$accountPers;
107
- return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
108
- }
109
- function getUserId() {
110
- var _resposne$accountPers2;
111
- return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
112
- }
113
- function getAccountID() {
114
- var _resposne$accountPers3;
115
- return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
116
- }
117
- function getUserName() {
118
- var _resposne$accountPers4;
119
- return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
120
- }
121
- function handleUserPhone() {
122
- var _resposne$person;
123
- var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
124
- var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
125
- return enStr;
126
- }
127
-
128
- function handleRequestAuthHeader(config) {
129
- var _config$url, _config$url2;
130
- // https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
131
- // 例:x-biz-code=STORE_CODE
132
- // 物理仓选择组件
133
- if ((config === null || config === void 0 ? void 0 : (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('/stock/physicalWarehouse?')) > -1) {
134
- config.headers['x-biz-code'] = 'PW_STOCK_CODE';
135
- }
136
- // 逻辑仓选择组件
137
- if ((config === null || config === void 0 ? void 0 : (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/stock/realWarehouse?')) > -1) {
138
- config.headers['x-biz-code'] = 'RW_STOCK_CODE';
139
- }
140
- }
141
- // 处理请求头
142
- var handleRequestHeader = function handleRequestHeader(config) {
143
- config.headers['sso-sessionid'] = getSessionId();
144
- config.headers['x-account-id'] = getAccountId();
145
- config.headers['x-employee-id'] = getEmployeeId();
146
- config.headers['x-tenant-id'] = getCurrentTenantId();
147
- if (localStorage.getItem('x-user-auth-context')) {
148
- config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
149
- }
150
- handleRequestAuthHeader(config);
151
- };
152
- // 拦截器
153
- axios__default['default'].interceptors.request.use(function (config) {
154
- handleRequestHeader(config);
155
- return config;
156
- });
157
-
158
- function _iterableToArrayLimit(arr, i) {
159
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
160
- if (null != _i) {
161
- var _s,
162
- _e,
163
- _x,
164
- _r,
165
- _arr = [],
166
- _n = !0,
167
- _d = !1;
47
+ function _iterableToArrayLimit(r, l) {
48
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
49
+ if (null != t) {
50
+ var e,
51
+ n,
52
+ i,
53
+ u,
54
+ a = [],
55
+ f = !0,
56
+ o = !1;
168
57
  try {
169
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
170
- if (Object(_i) !== _i) return;
171
- _n = !1;
172
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
173
- } catch (err) {
174
- _d = !0, _e = err;
58
+ if (i = (t = t.call(r)).next, 0 === l) {
59
+ if (Object(t) !== t) return;
60
+ f = !1;
61
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
62
+ } catch (r) {
63
+ o = !0, n = r;
175
64
  } finally {
176
65
  try {
177
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
66
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
178
67
  } finally {
179
- if (_d) throw _e;
68
+ if (o) throw n;
180
69
  }
181
70
  }
182
- return _arr;
71
+ return a;
183
72
  }
184
73
  }
185
- function ownKeys(object, enumerableOnly) {
186
- var keys = Object.keys(object);
74
+ function ownKeys(e, r) {
75
+ var t = Object.keys(e);
187
76
  if (Object.getOwnPropertySymbols) {
188
- var symbols = Object.getOwnPropertySymbols(object);
189
- enumerableOnly && (symbols = symbols.filter(function (sym) {
190
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
191
- })), keys.push.apply(keys, symbols);
77
+ var o = Object.getOwnPropertySymbols(e);
78
+ r && (o = o.filter(function (r) {
79
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
80
+ })), t.push.apply(t, o);
192
81
  }
193
- return keys;
82
+ return t;
194
83
  }
195
- function _objectSpread2(target) {
196
- for (var i = 1; i < arguments.length; i++) {
197
- var source = null != arguments[i] ? arguments[i] : {};
198
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
199
- _defineProperty(target, key, source[key]);
200
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
201
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
84
+ function _objectSpread2(e) {
85
+ for (var r = 1; r < arguments.length; r++) {
86
+ var t = null != arguments[r] ? arguments[r] : {};
87
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
88
+ _defineProperty(e, r, t[r]);
89
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
90
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
202
91
  });
203
92
  }
204
- return target;
93
+ return e;
205
94
  }
206
95
  function _regeneratorRuntime() {
207
96
  _regeneratorRuntime = function () {
208
- return exports;
97
+ return e;
209
98
  };
210
- var exports = {},
211
- Op = Object.prototype,
212
- hasOwn = Op.hasOwnProperty,
213
- defineProperty = Object.defineProperty || function (obj, key, desc) {
214
- obj[key] = desc.value;
99
+ var t,
100
+ e = {},
101
+ r = Object.prototype,
102
+ n = r.hasOwnProperty,
103
+ o = Object.defineProperty || function (t, e, r) {
104
+ t[e] = r.value;
215
105
  },
216
- $Symbol = "function" == typeof Symbol ? Symbol : {},
217
- iteratorSymbol = $Symbol.iterator || "@@iterator",
218
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
219
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
220
- function define(obj, key, value) {
221
- return Object.defineProperty(obj, key, {
222
- value: value,
106
+ i = "function" == typeof Symbol ? Symbol : {},
107
+ a = i.iterator || "@@iterator",
108
+ c = i.asyncIterator || "@@asyncIterator",
109
+ u = i.toStringTag || "@@toStringTag";
110
+ function define(t, e, r) {
111
+ return Object.defineProperty(t, e, {
112
+ value: r,
223
113
  enumerable: !0,
224
114
  configurable: !0,
225
115
  writable: !0
226
- }), obj[key];
116
+ }), t[e];
227
117
  }
228
118
  try {
229
119
  define({}, "");
230
- } catch (err) {
231
- define = function (obj, key, value) {
232
- return obj[key] = value;
120
+ } catch (t) {
121
+ define = function (t, e, r) {
122
+ return t[e] = r;
233
123
  };
234
124
  }
235
- function wrap(innerFn, outerFn, self, tryLocsList) {
236
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
237
- generator = Object.create(protoGenerator.prototype),
238
- context = new Context(tryLocsList || []);
239
- return defineProperty(generator, "_invoke", {
240
- value: makeInvokeMethod(innerFn, self, context)
241
- }), generator;
125
+ function wrap(t, e, r, n) {
126
+ var i = e && e.prototype instanceof Generator ? e : Generator,
127
+ a = Object.create(i.prototype),
128
+ c = new Context(n || []);
129
+ return o(a, "_invoke", {
130
+ value: makeInvokeMethod(t, r, c)
131
+ }), a;
242
132
  }
243
- function tryCatch(fn, obj, arg) {
133
+ function tryCatch(t, e, r) {
244
134
  try {
245
135
  return {
246
136
  type: "normal",
247
- arg: fn.call(obj, arg)
137
+ arg: t.call(e, r)
248
138
  };
249
- } catch (err) {
139
+ } catch (t) {
250
140
  return {
251
141
  type: "throw",
252
- arg: err
142
+ arg: t
253
143
  };
254
144
  }
255
145
  }
256
- exports.wrap = wrap;
257
- var ContinueSentinel = {};
146
+ e.wrap = wrap;
147
+ var h = "suspendedStart",
148
+ l = "suspendedYield",
149
+ f = "executing",
150
+ s = "completed",
151
+ y = {};
258
152
  function Generator() {}
259
153
  function GeneratorFunction() {}
260
154
  function GeneratorFunctionPrototype() {}
261
- var IteratorPrototype = {};
262
- define(IteratorPrototype, iteratorSymbol, function () {
155
+ var p = {};
156
+ define(p, a, function () {
263
157
  return this;
264
158
  });
265
- var getProto = Object.getPrototypeOf,
266
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
267
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
268
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
269
- function defineIteratorMethods(prototype) {
270
- ["next", "throw", "return"].forEach(function (method) {
271
- define(prototype, method, function (arg) {
272
- return this._invoke(method, arg);
159
+ var d = Object.getPrototypeOf,
160
+ v = d && d(d(values([])));
161
+ v && v !== r && n.call(v, a) && (p = v);
162
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
163
+ function defineIteratorMethods(t) {
164
+ ["next", "throw", "return"].forEach(function (e) {
165
+ define(t, e, function (t) {
166
+ return this._invoke(e, t);
273
167
  });
274
168
  });
275
169
  }
276
- function AsyncIterator(generator, PromiseImpl) {
277
- function invoke(method, arg, resolve, reject) {
278
- var record = tryCatch(generator[method], generator, arg);
279
- if ("throw" !== record.type) {
280
- var result = record.arg,
281
- value = result.value;
282
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
283
- invoke("next", value, resolve, reject);
284
- }, function (err) {
285
- invoke("throw", err, resolve, reject);
286
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
287
- result.value = unwrapped, resolve(result);
288
- }, function (error) {
289
- return invoke("throw", error, resolve, reject);
170
+ function AsyncIterator(t, e) {
171
+ function invoke(r, o, i, a) {
172
+ var c = tryCatch(t[r], t, o);
173
+ if ("throw" !== c.type) {
174
+ var u = c.arg,
175
+ h = u.value;
176
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
177
+ invoke("next", t, i, a);
178
+ }, function (t) {
179
+ invoke("throw", t, i, a);
180
+ }) : e.resolve(h).then(function (t) {
181
+ u.value = t, i(u);
182
+ }, function (t) {
183
+ return invoke("throw", t, i, a);
290
184
  });
291
185
  }
292
- reject(record.arg);
186
+ a(c.arg);
293
187
  }
294
- var previousPromise;
295
- defineProperty(this, "_invoke", {
296
- value: function (method, arg) {
188
+ var r;
189
+ o(this, "_invoke", {
190
+ value: function (t, n) {
297
191
  function callInvokeWithMethodAndArg() {
298
- return new PromiseImpl(function (resolve, reject) {
299
- invoke(method, arg, resolve, reject);
192
+ return new e(function (e, r) {
193
+ invoke(t, n, e, r);
300
194
  });
301
195
  }
302
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
196
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
303
197
  }
304
198
  });
305
199
  }
306
- function makeInvokeMethod(innerFn, self, context) {
307
- var state = "suspendedStart";
308
- return function (method, arg) {
309
- if ("executing" === state) throw new Error("Generator is already running");
310
- if ("completed" === state) {
311
- if ("throw" === method) throw arg;
312
- return doneResult();
313
- }
314
- for (context.method = method, context.arg = arg;;) {
315
- var delegate = context.delegate;
316
- if (delegate) {
317
- var delegateResult = maybeInvokeDelegate(delegate, context);
318
- if (delegateResult) {
319
- if (delegateResult === ContinueSentinel) continue;
320
- return delegateResult;
200
+ function makeInvokeMethod(e, r, n) {
201
+ var o = h;
202
+ return function (i, a) {
203
+ if (o === f) throw new Error("Generator is already running");
204
+ if (o === s) {
205
+ if ("throw" === i) throw a;
206
+ return {
207
+ value: t,
208
+ done: !0
209
+ };
210
+ }
211
+ for (n.method = i, n.arg = a;;) {
212
+ var c = n.delegate;
213
+ if (c) {
214
+ var u = maybeInvokeDelegate(c, n);
215
+ if (u) {
216
+ if (u === y) continue;
217
+ return u;
321
218
  }
322
219
  }
323
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
324
- if ("suspendedStart" === state) throw state = "completed", context.arg;
325
- context.dispatchException(context.arg);
326
- } else "return" === context.method && context.abrupt("return", context.arg);
327
- state = "executing";
328
- var record = tryCatch(innerFn, self, context);
329
- if ("normal" === record.type) {
330
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
220
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
221
+ if (o === h) throw o = s, n.arg;
222
+ n.dispatchException(n.arg);
223
+ } else "return" === n.method && n.abrupt("return", n.arg);
224
+ o = f;
225
+ var p = tryCatch(e, r, n);
226
+ if ("normal" === p.type) {
227
+ if (o = n.done ? s : l, p.arg === y) continue;
331
228
  return {
332
- value: record.arg,
333
- done: context.done
229
+ value: p.arg,
230
+ done: n.done
334
231
  };
335
232
  }
336
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
233
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
337
234
  }
338
235
  };
339
236
  }
340
- function maybeInvokeDelegate(delegate, context) {
341
- var methodName = context.method,
342
- method = delegate.iterator[methodName];
343
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
344
- var record = tryCatch(method, delegate.iterator, context.arg);
345
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
346
- var info = record.arg;
347
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
348
- }
349
- function pushTryEntry(locs) {
350
- var entry = {
351
- tryLoc: locs[0]
237
+ function maybeInvokeDelegate(e, r) {
238
+ var n = r.method,
239
+ o = e.iterator[n];
240
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
241
+ var i = tryCatch(o, e.iterator, r.arg);
242
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
243
+ var a = i.arg;
244
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
245
+ }
246
+ function pushTryEntry(t) {
247
+ var e = {
248
+ tryLoc: t[0]
352
249
  };
353
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
250
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
354
251
  }
355
- function resetTryEntry(entry) {
356
- var record = entry.completion || {};
357
- record.type = "normal", delete record.arg, entry.completion = record;
252
+ function resetTryEntry(t) {
253
+ var e = t.completion || {};
254
+ e.type = "normal", delete e.arg, t.completion = e;
358
255
  }
359
- function Context(tryLocsList) {
256
+ function Context(t) {
360
257
  this.tryEntries = [{
361
258
  tryLoc: "root"
362
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
363
- }
364
- function values(iterable) {
365
- if (iterable) {
366
- var iteratorMethod = iterable[iteratorSymbol];
367
- if (iteratorMethod) return iteratorMethod.call(iterable);
368
- if ("function" == typeof iterable.next) return iterable;
369
- if (!isNaN(iterable.length)) {
370
- var i = -1,
371
- next = function next() {
372
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
373
- return next.value = undefined, next.done = !0, next;
259
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
260
+ }
261
+ function values(e) {
262
+ if (e || "" === e) {
263
+ var r = e[a];
264
+ if (r) return r.call(e);
265
+ if ("function" == typeof e.next) return e;
266
+ if (!isNaN(e.length)) {
267
+ var o = -1,
268
+ i = function next() {
269
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
270
+ return next.value = t, next.done = !0, next;
374
271
  };
375
- return next.next = next;
272
+ return i.next = i;
376
273
  }
377
274
  }
378
- return {
379
- next: doneResult
380
- };
381
- }
382
- function doneResult() {
383
- return {
384
- value: undefined,
385
- done: !0
386
- };
275
+ throw new TypeError(typeof e + " is not iterable");
387
276
  }
388
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
277
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
389
278
  value: GeneratorFunctionPrototype,
390
279
  configurable: !0
391
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
280
+ }), o(GeneratorFunctionPrototype, "constructor", {
392
281
  value: GeneratorFunction,
393
282
  configurable: !0
394
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
395
- var ctor = "function" == typeof genFun && genFun.constructor;
396
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
397
- }, exports.mark = function (genFun) {
398
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
399
- }, exports.awrap = function (arg) {
283
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
284
+ var e = "function" == typeof t && t.constructor;
285
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
286
+ }, e.mark = function (t) {
287
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
288
+ }, e.awrap = function (t) {
400
289
  return {
401
- __await: arg
290
+ __await: t
402
291
  };
403
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
292
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
404
293
  return this;
405
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
406
- void 0 === PromiseImpl && (PromiseImpl = Promise);
407
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
408
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
409
- return result.done ? result.value : iter.next();
294
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
295
+ void 0 === i && (i = Promise);
296
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
297
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
298
+ return t.done ? t.value : a.next();
410
299
  });
411
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
300
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
412
301
  return this;
413
- }), define(Gp, "toString", function () {
302
+ }), define(g, "toString", function () {
414
303
  return "[object Generator]";
415
- }), exports.keys = function (val) {
416
- var object = Object(val),
417
- keys = [];
418
- for (var key in object) keys.push(key);
419
- return keys.reverse(), function next() {
420
- for (; keys.length;) {
421
- var key = keys.pop();
422
- if (key in object) return next.value = key, next.done = !1, next;
304
+ }), e.keys = function (t) {
305
+ var e = Object(t),
306
+ r = [];
307
+ for (var n in e) r.push(n);
308
+ return r.reverse(), function next() {
309
+ for (; r.length;) {
310
+ var t = r.pop();
311
+ if (t in e) return next.value = t, next.done = !1, next;
423
312
  }
424
313
  return next.done = !0, next;
425
314
  };
426
- }, exports.values = values, Context.prototype = {
315
+ }, e.values = values, Context.prototype = {
427
316
  constructor: Context,
428
- reset: function (skipTempReset) {
429
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
317
+ reset: function (e) {
318
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
430
319
  },
431
320
  stop: function () {
432
321
  this.done = !0;
433
- var rootRecord = this.tryEntries[0].completion;
434
- if ("throw" === rootRecord.type) throw rootRecord.arg;
322
+ var t = this.tryEntries[0].completion;
323
+ if ("throw" === t.type) throw t.arg;
435
324
  return this.rval;
436
325
  },
437
- dispatchException: function (exception) {
438
- if (this.done) throw exception;
439
- var context = this;
440
- function handle(loc, caught) {
441
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
442
- }
443
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
444
- var entry = this.tryEntries[i],
445
- record = entry.completion;
446
- if ("root" === entry.tryLoc) return handle("end");
447
- if (entry.tryLoc <= this.prev) {
448
- var hasCatch = hasOwn.call(entry, "catchLoc"),
449
- hasFinally = hasOwn.call(entry, "finallyLoc");
450
- if (hasCatch && hasFinally) {
451
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
452
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
453
- } else if (hasCatch) {
454
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
326
+ dispatchException: function (e) {
327
+ if (this.done) throw e;
328
+ var r = this;
329
+ function handle(n, o) {
330
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
331
+ }
332
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
333
+ var i = this.tryEntries[o],
334
+ a = i.completion;
335
+ if ("root" === i.tryLoc) return handle("end");
336
+ if (i.tryLoc <= this.prev) {
337
+ var c = n.call(i, "catchLoc"),
338
+ u = n.call(i, "finallyLoc");
339
+ if (c && u) {
340
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
341
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
342
+ } else if (c) {
343
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
455
344
  } else {
456
- if (!hasFinally) throw new Error("try statement without catch or finally");
457
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
345
+ if (!u) throw new Error("try statement without catch or finally");
346
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
458
347
  }
459
348
  }
460
349
  }
461
350
  },
462
- abrupt: function (type, arg) {
463
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
464
- var entry = this.tryEntries[i];
465
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
466
- var finallyEntry = entry;
351
+ abrupt: function (t, e) {
352
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
353
+ var o = this.tryEntries[r];
354
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
355
+ var i = o;
467
356
  break;
468
357
  }
469
358
  }
470
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
471
- var record = finallyEntry ? finallyEntry.completion : {};
472
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
359
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
360
+ var a = i ? i.completion : {};
361
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
473
362
  },
474
- complete: function (record, afterLoc) {
475
- if ("throw" === record.type) throw record.arg;
476
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
363
+ complete: function (t, e) {
364
+ if ("throw" === t.type) throw t.arg;
365
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
477
366
  },
478
- finish: function (finallyLoc) {
479
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
480
- var entry = this.tryEntries[i];
481
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
367
+ finish: function (t) {
368
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
369
+ var r = this.tryEntries[e];
370
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
482
371
  }
483
372
  },
484
- catch: function (tryLoc) {
485
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
486
- var entry = this.tryEntries[i];
487
- if (entry.tryLoc === tryLoc) {
488
- var record = entry.completion;
489
- if ("throw" === record.type) {
490
- var thrown = record.arg;
491
- resetTryEntry(entry);
373
+ catch: function (t) {
374
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
375
+ var r = this.tryEntries[e];
376
+ if (r.tryLoc === t) {
377
+ var n = r.completion;
378
+ if ("throw" === n.type) {
379
+ var o = n.arg;
380
+ resetTryEntry(r);
492
381
  }
493
- return thrown;
382
+ return o;
494
383
  }
495
384
  }
496
385
  throw new Error("illegal catch attempt");
497
386
  },
498
- delegateYield: function (iterable, resultName, nextLoc) {
387
+ delegateYield: function (e, r, n) {
499
388
  return this.delegate = {
500
- iterator: values(iterable),
501
- resultName: resultName,
502
- nextLoc: nextLoc
503
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
389
+ iterator: values(e),
390
+ resultName: r,
391
+ nextLoc: n
392
+ }, "next" === this.method && (this.arg = t), y;
504
393
  }
505
- }, exports;
394
+ }, e;
506
395
  }
507
- function _typeof(obj) {
396
+ function _typeof(o) {
508
397
  "@babel/helpers - typeof";
509
398
 
510
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
511
- return typeof obj;
512
- } : function (obj) {
513
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
514
- }, _typeof(obj);
399
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
400
+ return typeof o;
401
+ } : function (o) {
402
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
403
+ }, _typeof(o);
515
404
  }
516
405
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
517
406
  try {
@@ -743,6 +632,266 @@ function _toPropertyKey(arg) {
743
632
  return typeof key === "symbol" ? key : String(key);
744
633
  }
745
634
 
635
+ var ENUM = {
636
+ // 浏览器缓存信息
637
+ BROWSER_CACHE: {
638
+ COLUMN_CONDITION: 'columnCondition',
639
+ MAIN_AUTH_CODES: 'menuAuth_mainProject',
640
+ LIMIT_MENU_DATA: 'limitedMenuData',
641
+ USER_INFO: 'userInfo',
642
+ DICT_CODES: 'dicData',
643
+ CHILD_APP_BACK: 'child_app_back',
644
+ SEARCH_FIELDS_CONDITION: 'searchFieldsCondition' //表格搜索项信息缓存
645
+ }
646
+ };
647
+
648
+ var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
649
+ // 存储表头
650
+ var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
651
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
652
+ var configArray = JSON.parse(config);
653
+ var currentSetting = configArray.filter(function (item) {
654
+ return item.code === tableCode;
655
+ });
656
+ if (currentSetting.length) {
657
+ currentSetting[0].detail = JSON.stringify(configvalue);
658
+ } else {
659
+ configArray.push({
660
+ "code": tableCode,
661
+ "detail": JSON.stringify(configvalue)
662
+ });
663
+ }
664
+ localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
665
+ };
666
+ // 取表头
667
+ var getConfigTableColumns = function getConfigTableColumns(tableCode) {
668
+ if (!tableCode) return [];
669
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
670
+ var configArray = JSON.parse(config);
671
+ var configSetting = configArray.filter(function (item) {
672
+ return item.code === tableCode;
673
+ });
674
+ if (configSetting.length) {
675
+ return JSON.parse(configSetting[0].detail || '[]');
676
+ }
677
+ return [];
678
+ };
679
+ var getCurrentTenantId = function getCurrentTenantId() {
680
+ return localStorage.getItem('current_tenant_id') || 1;
681
+ };
682
+ function getEmployeeId() {
683
+ var _resposne$employeeRes;
684
+ return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
685
+ }
686
+ function getEmployeeCode() {
687
+ var _resposne$employeeRes2;
688
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
689
+ }
690
+ function getSessionId() {
691
+ return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
692
+ }
693
+ function getAccountId() {
694
+ var _resposne$accountPers;
695
+ return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
696
+ }
697
+ function getUserId() {
698
+ var _resposne$accountPers2;
699
+ return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
700
+ }
701
+ function getAccountID() {
702
+ var _resposne$accountPers3;
703
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
704
+ }
705
+ function getUserName() {
706
+ var _resposne$accountPers4;
707
+ return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
708
+ }
709
+ function handleUserPhone() {
710
+ var _resposne$person;
711
+ var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
712
+ var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
713
+ return enStr;
714
+ }
715
+
716
+ var resposne$1 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
717
+ //--------赢家项目登录信息---------
718
+ function getEekaSessionId() {
719
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
720
+ }
721
+ function getEekaAccountId() {
722
+ var _resposne$personDetai;
723
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai = resposne$1.personDetailResDto) === null || _resposne$personDetai === void 0 ? void 0 : _resposne$personDetai.accountId) || -1;
724
+ }
725
+ function getEekaEmployeeId() {
726
+ var _resposne$personDetai2;
727
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai2 = resposne$1.personDetailResDto) === null || _resposne$personDetai2 === void 0 ? void 0 : _resposne$personDetai2.employeeId) || 2;
728
+ }
729
+ function getEekaTenantId() {
730
+ var _resposne$personDetai3;
731
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai3 = resposne$1.personDetailResDto) === null || _resposne$personDetai3 === void 0 ? void 0 : _resposne$personDetai3.tenantId) || 1;
732
+ }
733
+ function getEekaToken() {
734
+ return resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token;
735
+ }
736
+ //--------赢家项目登录信息---------
737
+ //--------国药项目登录信息---------
738
+ function getGuoyaoshukeSessionId() {
739
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
740
+ }
741
+ function getGuoyaoshukeAccountId() {
742
+ var _resposne$accountPers;
743
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$accountPers = resposne$1.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
744
+ }
745
+ function getGuoyaoshukeEmployeeId() {
746
+ var _resposne$employeeRes;
747
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$employeeRes = resposne$1.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
748
+ }
749
+ function getGuoyaoshukeToken() {
750
+ return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token) || '';
751
+ }
752
+ //--------国药项目登录信息---------
753
+
754
+ function handleRequestAuthHeader(config) {
755
+ var _config$url, _config$url2;
756
+ // https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
757
+ // 例:x-biz-code=STORE_CODE
758
+ // 物理仓选择组件
759
+ if ((config === null || config === void 0 ? void 0 : (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('/stock/physicalWarehouse?')) > -1) {
760
+ config.headers['x-biz-code'] = 'PW_STOCK_CODE';
761
+ }
762
+ // 逻辑仓选择组件
763
+ if ((config === null || config === void 0 ? void 0 : (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/stock/realWarehouse?')) > -1) {
764
+ config.headers['x-biz-code'] = 'RW_STOCK_CODE';
765
+ }
766
+ }
767
+ /*
768
+ * 获取当前组件服务项目
769
+ * */
770
+ var getCurrentUseProject = function getCurrentUseProject() {
771
+ var project = 'BitSun';
772
+ var hostname = window.location.hostname;
773
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('omni')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('eeka')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('koradior')) > -1) {
774
+ project = 'YingJia';
775
+ }
776
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('guoyaoshuke')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('10.31.249.136')) > -1) {
777
+ project = 'GuoYao';
778
+ }
779
+ return project;
780
+ };
781
+ /*
782
+ * 处理一般请求头
783
+ * @param {*} config 请求参数配置
784
+ * */
785
+ var handleCommonHeader = function handleCommonHeader() {
786
+ var commonHeaders = {};
787
+ var defaultHeaders = {
788
+ 'sso-sessionid': getSessionId(),
789
+ 'x-account-id': getAccountId(),
790
+ 'x-employee-id': getEmployeeId(),
791
+ 'x-tenant-id': getCurrentTenantId()
792
+ };
793
+ var type = getCurrentUseProject();
794
+ switch (type) {
795
+ case 'YingJia':
796
+ commonHeaders = {
797
+ 'x-sso-sessionid': getEekaSessionId(),
798
+ 'x-account-id': getEekaAccountId(),
799
+ 'x-employee-id': getEekaEmployeeId(),
800
+ 'x-tenant-id': getEekaTenantId(),
801
+ 'x-user-token': getEekaToken()
802
+ };
803
+ break;
804
+ case 'GuoYao':
805
+ commonHeaders = {
806
+ 'sso-sessionid': getGuoyaoshukeSessionId(),
807
+ 'gksk-account-id': getGuoyaoshukeAccountId(),
808
+ 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
809
+ 'gksk-tenant-id': getCurrentTenantId(),
810
+ 'gksk-user-token': getGuoyaoshukeToken()
811
+ };
812
+ break;
813
+ default:
814
+ commonHeaders = defaultHeaders;
815
+ break;
816
+ }
817
+ return commonHeaders;
818
+ };
819
+ /*
820
+ * 处理请求头方法-包含一般请求头、权限请求头。组件默认统一处理一遍,若组件使用处需要可以单独在组件处传参进来处理
821
+ * @param {*} config 请求参数配置
822
+ * */
823
+ var handleRequestHeader = function handleRequestHeader(config) {
824
+ var commonHeaders = handleCommonHeader();
825
+ if (localStorage.getItem('x-user-auth-context')) {
826
+ // @ts-ignore
827
+ defaultHeaders['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
828
+ }
829
+ !!!config.headers['x-biz-code'] && handleRequestAuthHeader(config);
830
+ config.headers = _objectSpread2(_objectSpread2({}, commonHeaders), config.headers);
831
+ };
832
+ // 拦截器
833
+ axios__default['default'].interceptors.request.use(function (config) {
834
+ handleRequestHeader(config);
835
+ return config;
836
+ });
837
+ /**
838
+ * 处理请求路径前缀/请求路径等使用不一的问题
839
+ * @param {*} defaultUrl 默认请求路径
840
+ * @param {*} defaultPreFix 默认请求路径的前缀
841
+ * @param {*} config 更改请求前缀/路径集合
842
+ * 示例:
843
+ * appRequestConfig: {
844
+ * '/appConfig/saveUserOrder': ['/api/user-manage'],
845
+ * '/appConfig/saveQueryCriteria': ['/api/user-manage']
846
+ * }
847
+ */
848
+ var handleRequestUrl = function handleRequestUrl(defaultPreFix, defaultUrl, config) {
849
+ var _Object$keys;
850
+ var rUrl = "".concat(defaultPreFix).concat(defaultUrl);
851
+ if (config && ((_Object$keys = Object.keys(config || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
852
+ var value = config[defaultUrl] || [];
853
+ var newPreFix = value[0] || defaultPreFix;
854
+ var newUrl = value[1] || defaultUrl;
855
+ rUrl = "".concat(newPreFix).concat(newUrl);
856
+ }
857
+ return rUrl;
858
+ };
859
+ /**
860
+ * 处理错误请求
861
+ * @param {*} response 返回结果
862
+ * @param {*} needBackError 是否需要将错误回传到页面单独处理
863
+ */
864
+ function handleError(response, needBackError) {
865
+ if (judgeIsRequestError(response)) {
866
+ if (response && !needBackError) {
867
+ // @ts-ignore
868
+ response.msg && message.error(response.msg);
869
+ }
870
+ return false;
871
+ }
872
+ return true;
873
+ }
874
+ /**
875
+ * 判断为请求错误
876
+ * @param {*} res 响应体
877
+ * */
878
+ var judgeIsRequestError = function judgeIsRequestError(res) {
879
+ if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && (res.code !== '000000' || res.code !== '0')) {
880
+ return true;
881
+ }
882
+ return false;
883
+ };
884
+ /**
885
+ * 判断为请求成功
886
+ * @param {*} res 响应体
887
+ * */
888
+ var judgeIsRequestSuccess = function judgeIsRequestSuccess(res) {
889
+ if ((res === null || res === void 0 ? void 0 : res.status) === '0' || (res === null || res === void 0 ? void 0 : res.code) === '000000' || (res === null || res === void 0 ? void 0 : res.code) === '0') {
890
+ return true;
891
+ }
892
+ return false;
893
+ };
894
+
746
895
  var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
747
896
  var errorMessage = _objectSpread2({
748
897
  showTips: true,
@@ -1283,22 +1432,6 @@ var judgeIsEmpty = function judgeIsEmpty(value) {
1283
1432
  }
1284
1433
  return false;
1285
1434
  };
1286
- /**
1287
- * 处理错误请求
1288
- * @param {*} response 返回结果
1289
- * @param {*} needBackError 是否需要将错误回传到页面单独处理
1290
- */
1291
- function handleError(response, needBackError) {
1292
- // @ts-ignore
1293
- if (!response || (response.code ? response.code !== '000000' : response.status !== '0')) {
1294
- if (response && !needBackError) {
1295
- // @ts-ignore
1296
- response.msg && message.error(response.msg);
1297
- }
1298
- return false;
1299
- }
1300
- return true;
1301
- }
1302
1435
 
1303
1436
  var css_248z$1 = ".luckysheet {\n overflow: hidden;\n}\n.luckysheet .luckysheet-work-area.luckysheet-noselected-text {\n display: none;\n}\n.sheet_table_top {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_top .menu_item_text {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.sheet_table_footer {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_text {\n color: #8f8f8f;\n}\n.sheet_table_dnd_text {\n background: #f2f2f2;\n border: 1px solid #d8d8d8;\n display: inline-block;\n width: 100px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n";
1304
1437
  styleInject(css_248z$1);
@@ -1623,7 +1756,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1623
1756
  checkStockNum: isCheckStockNum
1624
1757
  })).then(function (result) {
1625
1758
  result = result.data;
1626
- if (result.status !== '0') {
1759
+ if (judgeIsRequestError(result)) {
1627
1760
  antd.message.error(result.msg);
1628
1761
  return;
1629
1762
  }
@@ -2190,7 +2323,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
2190
2323
  data: resultData
2191
2324
  }).then(function (result) {
2192
2325
  result = result.data;
2193
- if (result.status !== '0') {
2326
+ if (judgeIsRequestError(result)) {
2194
2327
  antd.message.error(result.msg);
2195
2328
  return;
2196
2329
  }
@@ -2900,10 +3033,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2900
3033
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams)), {
2901
3034
  headers: _objectSpread2({}, extralHeaders)
2902
3035
  }).then(function (result) {
2903
- var _result, _result2;
2904
3036
  setFetching(false);
2905
3037
  result = result.data;
2906
- if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
3038
+ if (judgeIsRequestError(result)) {
2907
3039
  antd.message.error(result.msg);
2908
3040
  return;
2909
3041
  }
@@ -3633,7 +3765,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
3633
3765
  onSearchSort: false
3634
3766
  };
3635
3767
  _this.patchUserColumnConfig = function (config) {
3636
- var tableCode = _this.props.tableCode;
3768
+ var _this$props = _this.props,
3769
+ tableCode = _this$props.tableCode,
3770
+ appRequestConfig = _this$props.appRequestConfig;
3637
3771
  if (!tableCode) return;
3638
3772
  var configvalue = config.map(function (item) {
3639
3773
  return {
@@ -3645,15 +3779,14 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
3645
3779
  };
3646
3780
  });
3647
3781
  axios__default['default']({
3648
- url: '/user/appConfig/saveUserOrder',
3782
+ url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
3649
3783
  method: 'POST',
3650
3784
  data: {
3651
3785
  "code": tableCode,
3652
3786
  "detail": JSON.stringify(configvalue)
3653
3787
  }
3654
3788
  }).then(function (res) {
3655
- var _res$data;
3656
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
3789
+ if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
3657
3790
  setConfigTableColumns(configvalue, tableCode);
3658
3791
  } else {
3659
3792
  antd.message.error('保存表头列自定义失败,请稍后尝试');
@@ -3661,10 +3794,10 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
3661
3794
  });
3662
3795
  };
3663
3796
  _this.setInitValue = function (datasource) {
3664
- var _this$props = _this.props,
3665
- _this$props$showColum = _this$props.showColumns,
3666
- showColumns = _this$props$showColum === void 0 ? [] : _this$props$showColum,
3667
- tableCode = _this$props.tableCode;
3797
+ var _this$props2 = _this.props,
3798
+ _this$props2$showColu = _this$props2.showColumns,
3799
+ showColumns = _this$props2$showColu === void 0 ? [] : _this$props2$showColu,
3800
+ tableCode = _this$props2.tableCode;
3668
3801
  // 获取当前列表定义数据
3669
3802
  var columnConfig = getConfigTableColumns(tableCode);
3670
3803
  var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
@@ -3920,9 +4053,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
3920
4053
  var oldIndex = _ref.oldIndex,
3921
4054
  newIndex = _ref.newIndex;
3922
4055
  var sortDataSource = _this.state.sortDataSource;
3923
- var _this$props2 = _this.props,
3924
- value = _this$props2.value,
3925
- setValue = _this$props2.setValue;
4056
+ var _this$props3 = _this.props,
4057
+ value = _this$props3.value,
4058
+ setValue = _this$props3.setValue;
3926
4059
  // if (sortDataSource[oldIndex]['fixed']) {
3927
4060
  // message.warning('固定列不可移动');
3928
4061
  // return;
@@ -4033,8 +4166,8 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
4033
4166
  _createClass(TableColumnSetting, [{
4034
4167
  key: "componentWillReceiveProps",
4035
4168
  value: function componentWillReceiveProps(nextProps) {
4036
- var _this$props3, _this$props4;
4037
- if (((_this$props3 = this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.datasource) && JSON.stringify((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
4169
+ var _this$props4, _this$props5;
4170
+ if (((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource) && JSON.stringify((_this$props5 = this.props) === null || _this$props5 === void 0 ? void 0 : _this$props5.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
4038
4171
  this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
4039
4172
  }
4040
4173
  }
@@ -4293,9 +4426,8 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
4293
4426
  var loadSelectSource = function loadSelectSource(url, params) {
4294
4427
  return new Promise(function (resolve, reject) {
4295
4428
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
4296
- var _result, _result2;
4297
4429
  result = result.data;
4298
- if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
4430
+ if (judgeIsRequestError(result)) {
4299
4431
  antd.message.error(result.msg);
4300
4432
  resolve(result);
4301
4433
  return;
@@ -4362,9 +4494,8 @@ var _excluded$3 = ["onResize", "width"];
4362
4494
  var checkSpuMatchCode = function checkSpuMatchCode(data) {
4363
4495
  return new Promise(function (resolve, reject) {
4364
4496
  axios__default['default'].post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
4365
- var _result, _result2;
4366
4497
  result = result.data;
4367
- if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
4498
+ if (judgeIsRequestError(result)) {
4368
4499
  antd.message.error(result.msg);
4369
4500
  reject(false);
4370
4501
  return;
@@ -5004,10 +5135,9 @@ var AddSelect = function AddSelect(props) {
5004
5135
  currentPage: currentPage
5005
5136
  }, otherParams), fixedParam), params);
5006
5137
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams))).then(function (result) {
5007
- var _result3, _result4;
5008
5138
  setFetching(false);
5009
5139
  result = result.data;
5010
- if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
5140
+ if (judgeIsRequestError(result)) {
5011
5141
  antd.message.error(result.msg);
5012
5142
  return;
5013
5143
  }
@@ -5687,7 +5817,7 @@ var InputElement = function InputElement(_ref) {
5687
5817
  var data = _ref2.data,
5688
5818
  status = _ref2.status;
5689
5819
  if (status === 200) {
5690
- if (data.status === '0') {
5820
+ if (judgeIsRequestSuccess(data)) {
5691
5821
  var resultData = data.data.items.map(function (item, index) {
5692
5822
  return _objectSpread2(_objectSpread2({}, item), {}, {
5693
5823
  index: index
@@ -6378,7 +6508,7 @@ var BillEntry = function BillEntry(_ref3) {
6378
6508
  checkStockNum: isCheckStockNum
6379
6509
  })).then(function (result) {
6380
6510
  result = result.data;
6381
- if (result.status !== '0') {
6511
+ if (judgeIsRequestError(result)) {
6382
6512
  antd.message.error(result.msg);
6383
6513
  return {
6384
6514
  flag: false
@@ -6662,9 +6792,8 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
6662
6792
  var loadSelectSource$1 = function loadSelectSource(url, params) {
6663
6793
  return new Promise(function (resolve, reject) {
6664
6794
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
6665
- var _result, _result2;
6666
6795
  result = result.data;
6667
- if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
6796
+ if (judgeIsRequestError(result)) {
6668
6797
  antd.message.error(result.msg);
6669
6798
  return;
6670
6799
  }
@@ -9247,9 +9376,8 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9247
9376
  React.useEffect(function () {
9248
9377
  // type: 1 尺码组; 2 配码组
9249
9378
  axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
9250
- var _result, _result2;
9251
9379
  result = result.data;
9252
- if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
9380
+ if (judgeIsRequestError(result)) {
9253
9381
  antd.message.error(result.msg);
9254
9382
  return;
9255
9383
  }
@@ -9568,9 +9696,8 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9568
9696
  if (parProps === null || parProps === void 0 ? void 0 : parProps.isSingleColor) {
9569
9697
  // type: 1 尺码组; 2 配码组
9570
9698
  axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
9571
- var _result3, _result4;
9572
9699
  result = result.data;
9573
- if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
9700
+ if (judgeIsRequestError(result)) {
9574
9701
  antd.message.error(result.msg);
9575
9702
  return;
9576
9703
  }
@@ -10080,7 +10207,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
10080
10207
  while (1) switch (_context.prev = _context.next) {
10081
10208
  case 0:
10082
10209
  resData = (res === null || res === void 0 ? void 0 : res.data) || [];
10083
- if (!(resData.status === '0' || resData.code === '000000')) {
10210
+ if (!judgeIsRequestSuccess(resData)) {
10084
10211
  _context.next = 13;
10085
10212
  break;
10086
10213
  }
@@ -10544,7 +10671,7 @@ var ExportIcon = function ExportIcon(_ref) {
10544
10671
  data: requestData
10545
10672
  }, others)).then(function (result) {
10546
10673
  result = result.data;
10547
- if (result.code !== '000000') {
10674
+ if (judgeIsRequestError(result)) {
10548
10675
  var _result;
10549
10676
  antd.message.error((_result = result) === null || _result === void 0 ? void 0 : _result.msg);
10550
10677
  return;
@@ -10591,7 +10718,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
10591
10718
  onSearchSort: false
10592
10719
  };
10593
10720
  _this.patchUserColumnConfig = function (config) {
10594
- var tableCode = _this.props.tableCode;
10721
+ var _this$props = _this.props,
10722
+ tableCode = _this$props.tableCode,
10723
+ appRequestConfig = _this$props.appRequestConfig;
10595
10724
  if (!tableCode) return;
10596
10725
  var configvalue = config.map(function (item) {
10597
10726
  return {
@@ -10603,15 +10732,14 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
10603
10732
  };
10604
10733
  });
10605
10734
  axios__default['default']({
10606
- url: '/user/appConfig/saveUserOrder',
10735
+ url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
10607
10736
  method: 'POST',
10608
10737
  data: {
10609
10738
  "code": tableCode,
10610
10739
  "detail": JSON.stringify(configvalue)
10611
10740
  }
10612
10741
  }).then(function (res) {
10613
- var _res$data;
10614
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
10742
+ if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
10615
10743
  _this.patchConfigToLocalstorage(configvalue, tableCode);
10616
10744
  } else {
10617
10745
  antd.message.error('保存表头列自定义失败,请稍后尝试');
@@ -10892,9 +11020,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
10892
11020
  var oldIndex = _ref.oldIndex,
10893
11021
  newIndex = _ref.newIndex;
10894
11022
  var sortDataSource = _this.state.sortDataSource;
10895
- var _this$props = _this.props,
10896
- value = _this$props.value,
10897
- setValue = _this$props.setValue;
11023
+ var _this$props2 = _this.props,
11024
+ value = _this$props2.value,
11025
+ setValue = _this$props2.setValue;
10898
11026
  // if (sortDataSource[oldIndex]['fixed']) {
10899
11027
  // message.warning('固定列不可移动');
10900
11028
  // return;
@@ -11018,8 +11146,8 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
11018
11146
  _createClass(SortableTable, [{
11019
11147
  key: "componentWillReceiveProps",
11020
11148
  value: function componentWillReceiveProps(nextProps) {
11021
- var _this$props2, _this$props3;
11022
- if (((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : _this$props2.datasource) && JSON.stringify((_this$props3 = this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
11149
+ var _this$props3, _this$props4;
11150
+ if (((_this$props3 = this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.datasource) && JSON.stringify((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
11023
11151
  this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
11024
11152
  }
11025
11153
  }
@@ -11193,7 +11321,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
11193
11321
  }(React__default['default'].Component);
11194
11322
 
11195
11323
  var _excluded$8 = ["onResize", "width"],
11196
- _excluded2$3 = ["style", "columns", "tableCode", "summary", "dynamicColumns", "scroll"];
11324
+ _excluded2$3 = ["style", "columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
11197
11325
  var Text = antd.Typography.Text;
11198
11326
  var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11199
11327
  _inherits(ColumnSettingSulaTable, _React$Component);
@@ -11357,6 +11485,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11357
11485
  style = _this$props3$style === void 0 ? null : _this$props3$style,
11358
11486
  columns = _this$props3.columns,
11359
11487
  tableCode = _this$props3.tableCode,
11488
+ appRequestConfig = _this$props3.appRequestConfig,
11360
11489
  _this$props3$summary = _this$props3.summary,
11361
11490
  summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
11362
11491
  _this$props3$dynamicC = _this$props3.dynamicColumns,
@@ -11421,7 +11550,8 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11421
11550
  setShowColumns: this.setShowColumns,
11422
11551
  showColumns: this.state.showColumns,
11423
11552
  datasource: columns || [],
11424
- tableCode: tableCode
11553
+ tableCode: tableCode,
11554
+ appRequestConfig: appRequestConfig
11425
11555
  }))), /*#__PURE__*/React__default['default'].createElement(bssula.Table, _objectSpread2({
11426
11556
  ref: this.sulaTableRef,
11427
11557
  style: style,
@@ -11438,7 +11568,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
11438
11568
  }(React__default['default'].Component);
11439
11569
 
11440
11570
  var _excluded$9 = ["onResize", "width"],
11441
- _excluded2$4 = ["columns", "tableCode", "summary", "dynamicColumns", "scroll"];
11571
+ _excluded2$4 = ["columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
11442
11572
  var Text$1 = antd.Typography.Text;
11443
11573
  var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
11444
11574
  _inherits(ColumnSettingTable, _React$Component);
@@ -11598,6 +11728,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
11598
11728
  var _this$props3 = this.props,
11599
11729
  columns = _this$props3.columns,
11600
11730
  tableCode = _this$props3.tableCode,
11731
+ appRequestConfig = _this$props3.appRequestConfig,
11601
11732
  _this$props3$summary = _this$props3.summary,
11602
11733
  summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
11603
11734
  _this$props3$dynamicC = _this$props3.dynamicColumns,
@@ -11662,7 +11793,8 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
11662
11793
  setShowColumns: this.setShowColumns,
11663
11794
  showColumns: this.state.showColumns,
11664
11795
  datasource: columns || [],
11665
- tableCode: tableCode
11796
+ tableCode: tableCode,
11797
+ appRequestConfig: appRequestConfig
11666
11798
  }))), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
11667
11799
  columns: showCol,
11668
11800
  components: {
@@ -12162,6 +12294,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12162
12294
  bsTableCode: '' //设置table 列的标识
12163
12295
  };
12164
12296
  _this.patchUserColumnConfig = function (config) {
12297
+ var appRequestConfig = _this.props.appRequestConfig;
12165
12298
  var that = _assertThisInitialized(_this);
12166
12299
  var configvalue = config ? config.map(function (item) {
12167
12300
  return {
@@ -12174,15 +12307,14 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12174
12307
  }) : '';
12175
12308
  return new Promise(function (resolve, reject) {
12176
12309
  axios__default['default']({
12177
- url: '/user/appConfig/saveUserOrder',
12310
+ url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
12178
12311
  method: 'POST',
12179
12312
  data: {
12180
12313
  code: that.state.bsTableCode,
12181
12314
  detail: configvalue ? JSON.stringify(configvalue) : ''
12182
12315
  }
12183
12316
  }).then(function (res) {
12184
- var _res$data;
12185
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
12317
+ if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
12186
12318
  _this.patchConfigToLocalstorage(configvalue);
12187
12319
  resolve({
12188
12320
  status: '0'
@@ -12521,7 +12653,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12521
12653
  }))
12522
12654
  }, function () {
12523
12655
  _this.handleOk().then(function (res) {
12524
- if (res.status === '0') {
12656
+ if (judgeIsRequestSuccess(res)) {
12525
12657
  antd.message.success( /*#__PURE__*/React__default['default'].createElement("span", null, "\u5B57\u6BB5\u5DF2\u9690\u85CF\uFF0C\u5982\u9700\u91CD\u65B0\u663E\u793A\u8BF7\u524D\u5F80", /*#__PURE__*/React__default['default'].createElement(antd.Typography.Link, {
12526
12658
  underline: true,
12527
12659
  onClick: _this.showModal
@@ -12914,6 +13046,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
12914
13046
  bsTableCode: '' //设置table 列的标识
12915
13047
  };
12916
13048
  _this.patchUserSearchFieldsConfig = function (config) {
13049
+ var appRequestConfig = _this.props.appRequestConfig;
12917
13050
  var that = _assertThisInitialized(_this);
12918
13051
  var configvalue = config ? config.map(function (item) {
12919
13052
  return {
@@ -12922,15 +13055,14 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
12922
13055
  };
12923
13056
  }) : '';
12924
13057
  axios__default['default']({
12925
- url: '/user/appConfig/saveQueryCriteria',
13058
+ url: handleRequestUrl('/user', '/appConfig/saveQueryCriteria', appRequestConfig),
12926
13059
  method: 'POST',
12927
13060
  data: {
12928
13061
  code: that.state.bsTableCode,
12929
13062
  detail: configvalue ? JSON.stringify(configvalue) : ''
12930
13063
  }
12931
13064
  }).then(function (res) {
12932
- var _res$data;
12933
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
13065
+ if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
12934
13066
  _this.patchConfigToLocalstorage(configvalue);
12935
13067
  } else {
12936
13068
  antd.message.error('保存搜索项自定义失败,请稍后尝试');
@@ -13444,7 +13576,8 @@ var BsSulaQueryTable = (function (props) {
13444
13576
  setShowSearchFields = _useState14[1]; //搜索项字段
13445
13577
  var _props$isPage = props.isPage,
13446
13578
  pagination = props.pagination,
13447
- tableCode = props.tableCode;
13579
+ tableCode = props.tableCode,
13580
+ appRequestConfig = props.appRequestConfig;
13448
13581
  var _useState15 = React.useState('100vh'),
13449
13582
  _useState16 = _slicedToArray(_useState15, 2),
13450
13583
  height = _useState16[0],
@@ -13719,7 +13852,8 @@ var BsSulaQueryTable = (function (props) {
13719
13852
  setShowSearchFields: setShowSearchFields,
13720
13853
  showSearchFields: showSearchFields,
13721
13854
  datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
13722
- bsTableCode: bsTableCode
13855
+ bsTableCode: bsTableCode,
13856
+ appRequestConfig: appRequestConfig
13723
13857
  }))),
13724
13858
  placement: "bottomRight"
13725
13859
  }, /*#__PURE__*/React__default['default'].createElement("span", {
@@ -13831,7 +13965,8 @@ var BsSulaQueryTable = (function (props) {
13831
13965
  var memoConfig = React.useMemo(function () {
13832
13966
  return _objectSpread2(_objectSpread2({}, config), {}, {
13833
13967
  summary: props.summary,
13834
- statusMapping: props.statusMapping
13968
+ statusMapping: props.statusMapping,
13969
+ appRequestConfig: props.appRequestConfig
13835
13970
  });
13836
13971
  }, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
13837
13972
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(MemoQueryTable, _objectSpread2({}, memoConfig)), /*#__PURE__*/React__default['default'].createElement(SortableTable$1, {
@@ -13840,6 +13975,7 @@ var BsSulaQueryTable = (function (props) {
13840
13975
  showColumn: showColumn,
13841
13976
  datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
13842
13977
  bsTableCode: bsTableCode,
13978
+ appRequestConfig: appRequestConfig,
13843
13979
  onlyModal: true
13844
13980
  }));
13845
13981
  });
@@ -13950,23 +14086,24 @@ var searchMenuData = function searchMenuData(router, name, callBack) {
13950
14086
  var setMenuTreeData = function setMenuTreeData(routesData) {
13951
14087
  var authButton = localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) ? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES)) : [];
13952
14088
  var _loop = function _loop(i) {
13953
- if (routesData[i].hideInMenu) {
13954
- routesData.splice(i, 1);
13955
- return "continue";
13956
- }
13957
- if (routesData[i].code && authButton.every(function (item) {
13958
- return routesData[i].code != item;
13959
- })) {
13960
- routesData.splice(i, 1);
13961
- return "continue";
13962
- }
13963
- if (routesData[i].children) {
13964
- setMenuTreeData(routesData[i].children);
13965
- }
13966
- };
14089
+ if (routesData[i].hideInMenu) {
14090
+ routesData.splice(i, 1);
14091
+ return 0; // continue
14092
+ }
14093
+ if (routesData[i].code && authButton.every(function (item) {
14094
+ return routesData[i].code != item;
14095
+ })) {
14096
+ routesData.splice(i, 1);
14097
+ return 0; // continue
14098
+ }
14099
+ if (routesData[i].children) {
14100
+ setMenuTreeData(routesData[i].children);
14101
+ }
14102
+ },
14103
+ _ret;
13967
14104
  for (var i = routesData.length - 1; i >= 0; i--) {
13968
- var _ret = _loop(i);
13969
- if (_ret === "continue") continue;
14105
+ _ret = _loop(i);
14106
+ if (_ret === 0) continue;
13970
14107
  }
13971
14108
  };
13972
14109
  var setLoginOutPath = function setLoginOutPath() {
@@ -24134,7 +24271,7 @@ var App = function App(_ref) {
24134
24271
  converter: function converter(_ref2) {
24135
24272
  var response = _ref2.response,
24136
24273
  data = _ref2.data;
24137
- if (response.code === '000000') {
24274
+ if (judgeIsRequestSuccess(response)) {
24138
24275
  // UpdateFiedList(data.filter(item => item.valueType == 20 || item.valueType == 21 || item.valueType == 22))
24139
24276
  var resData = data.filter(function (item) {
24140
24277
  return item.inputType != 40 && (item.valueType == 20 || item.valueType == 21 || item.valueType == 22);
@@ -26127,10 +26264,9 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
26127
26264
  Promise.all([axios__default['default'].get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(pageType))]).then(function (_ref2) {
26128
26265
  var _ref3 = _slicedToArray(_ref2, 1),
26129
26266
  res = _ref3[0];
26130
- var _ref4 = (res === null || res === void 0 ? void 0 : res.data) || {},
26131
- code = _ref4.code,
26132
- data = _ref4.data;
26133
- if (code === '000000') {
26267
+ var resD = (res === null || res === void 0 ? void 0 : res.data) || {};
26268
+ var data = resD.data;
26269
+ if (judgeIsRequestError(resD)) {
26134
26270
  if (data) {
26135
26271
  var businessType = data.businessType,
26136
26272
  fieldGroup = data.code,
@@ -26151,15 +26287,15 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
26151
26287
  var axiosArr = detailTablesSetting.map(function (item) {
26152
26288
  return axios__default['default'].get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(item.tableCode));
26153
26289
  });
26154
- Promise.all(axiosArr).then(function (_ref5) {
26155
- var _ref6 = _toArray(_ref5),
26156
- resArr = _ref6.slice(0);
26290
+ Promise.all(axiosArr).then(function (_ref4) {
26291
+ var _ref5 = _toArray(_ref4),
26292
+ resArr = _ref5.slice(0);
26157
26293
  var configParams = {};
26158
26294
  detailTablesSetting.map(function (item, index) {
26159
26295
  var _resArr$index;
26160
- var _ref7 = ((_resArr$index = resArr[index]) === null || _resArr$index === void 0 ? void 0 : _resArr$index.data) || {},
26161
- code = _ref7.code,
26162
- data = _ref7.data;
26296
+ var _ref6 = ((_resArr$index = resArr[index]) === null || _resArr$index === void 0 ? void 0 : _resArr$index.data) || {},
26297
+ code = _ref6.code,
26298
+ data = _ref6.data;
26163
26299
  if (data) {
26164
26300
  var businessType = data.businessType,
26165
26301
  fieldGroup = data.code,