@bit-sun/business-component 1.2.2 → 2.0.1

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 (30) hide show
  1. package/.umirc.ts +31 -16
  2. package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
  3. package/dist/components/Business/SearchSelect/common.d.ts +5 -1
  4. package/dist/components/Business/SearchSelect/utils.d.ts +2 -1
  5. package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
  6. package/dist/components/Business/TreeSearchSelect/utils.d.ts +2 -0
  7. package/dist/components/Functional/{DataValidation/DataImport.d.ts → DataImport/index.d.ts} +2 -2
  8. package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -0
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.esm.js +907 -41
  11. package/dist/index.js +909 -41
  12. package/dist/utils/CheckOneUser/index.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/src/components/Business/CommodityEntry/index.md +2 -2
  15. package/src/components/Business/CommodityEntry/index.tsx +1 -1
  16. package/src/components/Business/SearchSelect/BusinessUtils.ts +85 -6
  17. package/src/components/Business/SearchSelect/common.ts +20 -1
  18. package/src/components/Business/SearchSelect/index.md +60 -30
  19. package/src/components/Business/SearchSelect/index.tsx +2 -1
  20. package/src/components/Business/SearchSelect/utils.ts +27 -2
  21. package/src/components/Business/TreeSearchSelect/index.md +126 -0
  22. package/src/components/Business/TreeSearchSelect/index.tsx +34 -0
  23. package/src/components/Business/TreeSearchSelect/utils.ts +60 -0
  24. package/src/components/Functional/DataImport/index.less +63 -0
  25. package/src/components/Functional/DataImport/index.md +44 -0
  26. package/src/components/Functional/{DataValidation/DataImport.tsx → DataImport/index.tsx} +3 -3
  27. package/src/components/Functional/SearchSelect/index.tsx +24 -7
  28. package/src/components/Functional/TreeSearchSelect/index.md +47 -0
  29. package/src/components/Functional/TreeSearchSelect/index.tsx +148 -0
  30. package/src/index.ts +8 -1
package/dist/index.esm.js CHANGED
@@ -33,6 +33,387 @@ function _objectSpread2(target) {
33
33
  return target;
34
34
  }
35
35
 
36
+ function _regeneratorRuntime() {
37
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
38
+
39
+ _regeneratorRuntime = function () {
40
+ return exports;
41
+ };
42
+
43
+ var exports = {},
44
+ Op = Object.prototype,
45
+ hasOwn = Op.hasOwnProperty,
46
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
47
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
48
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
49
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
50
+
51
+ function define(obj, key, value) {
52
+ return Object.defineProperty(obj, key, {
53
+ value: value,
54
+ enumerable: !0,
55
+ configurable: !0,
56
+ writable: !0
57
+ }), obj[key];
58
+ }
59
+
60
+ try {
61
+ define({}, "");
62
+ } catch (err) {
63
+ define = function (obj, key, value) {
64
+ return obj[key] = value;
65
+ };
66
+ }
67
+
68
+ function wrap(innerFn, outerFn, self, tryLocsList) {
69
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
70
+ generator = Object.create(protoGenerator.prototype),
71
+ context = new Context(tryLocsList || []);
72
+ return generator._invoke = function (innerFn, self, context) {
73
+ var state = "suspendedStart";
74
+ return function (method, arg) {
75
+ if ("executing" === state) throw new Error("Generator is already running");
76
+
77
+ if ("completed" === state) {
78
+ if ("throw" === method) throw arg;
79
+ return doneResult();
80
+ }
81
+
82
+ for (context.method = method, context.arg = arg;;) {
83
+ var delegate = context.delegate;
84
+
85
+ if (delegate) {
86
+ var delegateResult = maybeInvokeDelegate(delegate, context);
87
+
88
+ if (delegateResult) {
89
+ if (delegateResult === ContinueSentinel) continue;
90
+ return delegateResult;
91
+ }
92
+ }
93
+
94
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
95
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
96
+ context.dispatchException(context.arg);
97
+ } else "return" === context.method && context.abrupt("return", context.arg);
98
+ state = "executing";
99
+ var record = tryCatch(innerFn, self, context);
100
+
101
+ if ("normal" === record.type) {
102
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
103
+ return {
104
+ value: record.arg,
105
+ done: context.done
106
+ };
107
+ }
108
+
109
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
110
+ }
111
+ };
112
+ }(innerFn, self, context), generator;
113
+ }
114
+
115
+ function tryCatch(fn, obj, arg) {
116
+ try {
117
+ return {
118
+ type: "normal",
119
+ arg: fn.call(obj, arg)
120
+ };
121
+ } catch (err) {
122
+ return {
123
+ type: "throw",
124
+ arg: err
125
+ };
126
+ }
127
+ }
128
+
129
+ exports.wrap = wrap;
130
+ var ContinueSentinel = {};
131
+
132
+ function Generator() {}
133
+
134
+ function GeneratorFunction() {}
135
+
136
+ function GeneratorFunctionPrototype() {}
137
+
138
+ var IteratorPrototype = {};
139
+ define(IteratorPrototype, iteratorSymbol, function () {
140
+ return this;
141
+ });
142
+ var getProto = Object.getPrototypeOf,
143
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
144
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
145
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
146
+
147
+ function defineIteratorMethods(prototype) {
148
+ ["next", "throw", "return"].forEach(function (method) {
149
+ define(prototype, method, function (arg) {
150
+ return this._invoke(method, arg);
151
+ });
152
+ });
153
+ }
154
+
155
+ function AsyncIterator(generator, PromiseImpl) {
156
+ function invoke(method, arg, resolve, reject) {
157
+ var record = tryCatch(generator[method], generator, arg);
158
+
159
+ if ("throw" !== record.type) {
160
+ var result = record.arg,
161
+ value = result.value;
162
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
163
+ invoke("next", value, resolve, reject);
164
+ }, function (err) {
165
+ invoke("throw", err, resolve, reject);
166
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
167
+ result.value = unwrapped, resolve(result);
168
+ }, function (error) {
169
+ return invoke("throw", error, resolve, reject);
170
+ });
171
+ }
172
+
173
+ reject(record.arg);
174
+ }
175
+
176
+ var previousPromise;
177
+
178
+ this._invoke = function (method, arg) {
179
+ function callInvokeWithMethodAndArg() {
180
+ return new PromiseImpl(function (resolve, reject) {
181
+ invoke(method, arg, resolve, reject);
182
+ });
183
+ }
184
+
185
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
186
+ };
187
+ }
188
+
189
+ function maybeInvokeDelegate(delegate, context) {
190
+ var method = delegate.iterator[context.method];
191
+
192
+ if (undefined === method) {
193
+ if (context.delegate = null, "throw" === context.method) {
194
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
195
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
196
+ }
197
+
198
+ return ContinueSentinel;
199
+ }
200
+
201
+ var record = tryCatch(method, delegate.iterator, context.arg);
202
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
203
+ var info = record.arg;
204
+ 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);
205
+ }
206
+
207
+ function pushTryEntry(locs) {
208
+ var entry = {
209
+ tryLoc: locs[0]
210
+ };
211
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
212
+ }
213
+
214
+ function resetTryEntry(entry) {
215
+ var record = entry.completion || {};
216
+ record.type = "normal", delete record.arg, entry.completion = record;
217
+ }
218
+
219
+ function Context(tryLocsList) {
220
+ this.tryEntries = [{
221
+ tryLoc: "root"
222
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
223
+ }
224
+
225
+ function values(iterable) {
226
+ if (iterable) {
227
+ var iteratorMethod = iterable[iteratorSymbol];
228
+ if (iteratorMethod) return iteratorMethod.call(iterable);
229
+ if ("function" == typeof iterable.next) return iterable;
230
+
231
+ if (!isNaN(iterable.length)) {
232
+ var i = -1,
233
+ next = function next() {
234
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
235
+
236
+ return next.value = undefined, next.done = !0, next;
237
+ };
238
+
239
+ return next.next = next;
240
+ }
241
+ }
242
+
243
+ return {
244
+ next: doneResult
245
+ };
246
+ }
247
+
248
+ function doneResult() {
249
+ return {
250
+ value: undefined,
251
+ done: !0
252
+ };
253
+ }
254
+
255
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
256
+ var ctor = "function" == typeof genFun && genFun.constructor;
257
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
258
+ }, exports.mark = function (genFun) {
259
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
260
+ }, exports.awrap = function (arg) {
261
+ return {
262
+ __await: arg
263
+ };
264
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
265
+ return this;
266
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
267
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
268
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
269
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
270
+ return result.done ? result.value : iter.next();
271
+ });
272
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
273
+ return this;
274
+ }), define(Gp, "toString", function () {
275
+ return "[object Generator]";
276
+ }), exports.keys = function (object) {
277
+ var keys = [];
278
+
279
+ for (var key in object) keys.push(key);
280
+
281
+ return keys.reverse(), function next() {
282
+ for (; keys.length;) {
283
+ var key = keys.pop();
284
+ if (key in object) return next.value = key, next.done = !1, next;
285
+ }
286
+
287
+ return next.done = !0, next;
288
+ };
289
+ }, exports.values = values, Context.prototype = {
290
+ constructor: Context,
291
+ reset: function (skipTempReset) {
292
+ 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);
293
+ },
294
+ stop: function () {
295
+ this.done = !0;
296
+ var rootRecord = this.tryEntries[0].completion;
297
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
298
+ return this.rval;
299
+ },
300
+ dispatchException: function (exception) {
301
+ if (this.done) throw exception;
302
+ var context = this;
303
+
304
+ function handle(loc, caught) {
305
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
306
+ }
307
+
308
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
309
+ var entry = this.tryEntries[i],
310
+ record = entry.completion;
311
+ if ("root" === entry.tryLoc) return handle("end");
312
+
313
+ if (entry.tryLoc <= this.prev) {
314
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
315
+ hasFinally = hasOwn.call(entry, "finallyLoc");
316
+
317
+ if (hasCatch && hasFinally) {
318
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
319
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
320
+ } else if (hasCatch) {
321
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
322
+ } else {
323
+ if (!hasFinally) throw new Error("try statement without catch or finally");
324
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
325
+ }
326
+ }
327
+ }
328
+ },
329
+ abrupt: function (type, arg) {
330
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
331
+ var entry = this.tryEntries[i];
332
+
333
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
334
+ var finallyEntry = entry;
335
+ break;
336
+ }
337
+ }
338
+
339
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
340
+ var record = finallyEntry ? finallyEntry.completion : {};
341
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
342
+ },
343
+ complete: function (record, afterLoc) {
344
+ if ("throw" === record.type) throw record.arg;
345
+ 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;
346
+ },
347
+ finish: function (finallyLoc) {
348
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
349
+ var entry = this.tryEntries[i];
350
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
351
+ }
352
+ },
353
+ catch: function (tryLoc) {
354
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
355
+ var entry = this.tryEntries[i];
356
+
357
+ if (entry.tryLoc === tryLoc) {
358
+ var record = entry.completion;
359
+
360
+ if ("throw" === record.type) {
361
+ var thrown = record.arg;
362
+ resetTryEntry(entry);
363
+ }
364
+
365
+ return thrown;
366
+ }
367
+ }
368
+
369
+ throw new Error("illegal catch attempt");
370
+ },
371
+ delegateYield: function (iterable, resultName, nextLoc) {
372
+ return this.delegate = {
373
+ iterator: values(iterable),
374
+ resultName: resultName,
375
+ nextLoc: nextLoc
376
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
377
+ }
378
+ }, exports;
379
+ }
380
+
381
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
382
+ try {
383
+ var info = gen[key](arg);
384
+ var value = info.value;
385
+ } catch (error) {
386
+ reject(error);
387
+ return;
388
+ }
389
+
390
+ if (info.done) {
391
+ resolve(value);
392
+ } else {
393
+ Promise.resolve(value).then(_next, _throw);
394
+ }
395
+ }
396
+
397
+ function _asyncToGenerator(fn) {
398
+ return function () {
399
+ var self = this,
400
+ args = arguments;
401
+ return new Promise(function (resolve, reject) {
402
+ var gen = fn.apply(self, args);
403
+
404
+ function _next(value) {
405
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
406
+ }
407
+
408
+ function _throw(err) {
409
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
410
+ }
411
+
412
+ _next(undefined);
413
+ });
414
+ };
415
+ }
416
+
36
417
  function _classCallCheck(instance, Constructor) {
37
418
  if (!(instance instanceof Constructor)) {
38
419
  throw new TypeError("Cannot call a class as a function");
@@ -92,18 +473,17 @@ function _inherits(subClass, superClass) {
92
473
  }
93
474
 
94
475
  function _getPrototypeOf(o) {
95
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
476
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
96
477
  return o.__proto__ || Object.getPrototypeOf(o);
97
478
  };
98
479
  return _getPrototypeOf(o);
99
480
  }
100
481
 
101
482
  function _setPrototypeOf(o, p) {
102
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
483
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
103
484
  o.__proto__ = p;
104
485
  return o;
105
486
  };
106
-
107
487
  return _setPrototypeOf(o, p);
108
488
  }
109
489
 
@@ -2259,6 +2639,9 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2259
2639
  return DataValidation;
2260
2640
  }(React.Component);
2261
2641
 
2642
+ 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";
2643
+ styleInject(css_248z$1);
2644
+
2262
2645
  var _excluded$3 = ["flag", "checkResults"],
2263
2646
  _excluded2$1 = ["flag", "checkResults"];
2264
2647
 
@@ -2311,15 +2694,15 @@ var filterLetters$1 = function filterLetters(i) {
2311
2694
  }
2312
2695
  };
2313
2696
 
2314
- var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2315
- _inherits(DataValidation, _React$Component);
2697
+ var DataImport = /*#__PURE__*/function (_React$Component) {
2698
+ _inherits(DataImport, _React$Component);
2316
2699
 
2317
- var _super = _createSuper(DataValidation);
2700
+ var _super = _createSuper(DataImport);
2318
2701
 
2319
- function DataValidation(props) {
2702
+ function DataImport(props) {
2320
2703
  var _this;
2321
2704
 
2322
- _classCallCheck(this, DataValidation);
2705
+ _classCallCheck(this, DataImport);
2323
2706
 
2324
2707
  _this = _super.call(this, props);
2325
2708
 
@@ -2784,7 +3167,7 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2784
3167
  });
2785
3168
  } else {
2786
3169
  itemsTemp$1 = props.columns.map(function (item, index) {
2787
- if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
3170
+ if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataImport component, please fix this error"));
2788
3171
  return {
2789
3172
  id: "item-0".concat(index),
2790
3173
  content: mapping$1.get(item),
@@ -2809,7 +3192,7 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2809
3192
  return _this;
2810
3193
  }
2811
3194
 
2812
- _createClass(DataValidation, [{
3195
+ _createClass(DataImport, [{
2813
3196
  key: "onDragEnd",
2814
3197
  value: function onDragEnd(result) {
2815
3198
  // dropped outside the list
@@ -2889,11 +3272,11 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2889
3272
  }
2890
3273
  }]);
2891
3274
 
2892
- return DataValidation;
3275
+ return DataImport;
2893
3276
  }(React.Component);
2894
3277
 
2895
- var css_248z$1 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
2896
- styleInject(css_248z$1);
3278
+ var css_248z$2 = ".query_input_show {\n display: flex;\n}\n.query_input_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.query_input_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.query_input_wrapper {\n display: flex;\n}\n.query_input_wrapper_left {\n width: 100px;\n}\n.query_input_wrapper_right {\n color: #9e9e9e;\n}\n.query_input_textArea {\n margin-top: 15px;\n}\n";
3279
+ styleInject(css_248z$2);
2897
3280
 
2898
3281
  var QueryMutipleInput = function QueryMutipleInput(_ref) {
2899
3282
  var onValueChange = _ref.onValueChange;
@@ -3024,8 +3407,8 @@ function ToCDB(str) {
3024
3407
  return tmp;
3025
3408
  }
3026
3409
 
3027
- var css_248z$2 = ".search_select_show {\n display: flex;\n}\n.search_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.search_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_wrapper {\n position: relative;\n display: flex;\n min-height: 60vh;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n}\n.search_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.search_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_left {\n width: 28%;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-left: 20px;\n}\n.search_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.search_select_wrapper_right {\n width: 70%;\n margin-left: 1%;\n}\n.search_select_wrapper_right1 {\n width: 100%;\n margin-left: 20px;\n}\n.search_select_wrapper_right,\n.search_select_wrapper_right1 {\n overflow-x: auto;\n}\n.search_select_wrapper .select_list_columns {\n width: 100%;\n height: calc(60vh - 60px);\n overflow-y: auto;\n border: 1px solid #d8d8d8;\n}\n.search_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.search_select_wrapper .select_list_columns_formItems {\n padding: 0 20px;\n}\n.search_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px 0px;\n justify-content: flex-end;\n}\n.search_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 34px;\n line-height: 32px;\n background-color: #eee;\n margin-bottom: 10px;\n padding: 0 12px;\n}\n.search_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n";
3028
- styleInject(css_248z$2);
3410
+ var css_248z$3 = ".search_select_show {\n display: flex;\n}\n.search_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.search_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_wrapper {\n position: relative;\n display: flex;\n min-height: 60vh;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n}\n.search_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.search_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.search_select_wrapper_left {\n width: 28%;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-left: 20px;\n}\n.search_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.search_select_wrapper_right {\n width: 70%;\n margin-left: 1%;\n}\n.search_select_wrapper_right1 {\n width: 100%;\n margin-left: 20px;\n}\n.search_select_wrapper_right,\n.search_select_wrapper_right1 {\n overflow-x: auto;\n}\n.search_select_wrapper .select_list_columns {\n width: 100%;\n height: calc(60vh - 60px);\n overflow-y: auto;\n border: 1px solid #d8d8d8;\n}\n.search_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.search_select_wrapper .select_list_columns_formItems {\n padding: 0 20px;\n}\n.search_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px 0px;\n justify-content: flex-end;\n}\n.search_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 34px;\n line-height: 32px;\n background-color: #eee;\n margin-bottom: 10px;\n padding: 0 12px;\n}\n.search_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n";
3411
+ styleInject(css_248z$3);
3029
3412
 
3030
3413
  var Option = Select.Option;
3031
3414
 
@@ -3069,6 +3452,7 @@ var SearchSelect = function SearchSelect(props) {
3069
3452
 
3070
3453
  var currentPage = 1;
3071
3454
  var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
3455
+ var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
3072
3456
 
3073
3457
  var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
3074
3458
  // 以下属性不可更改----设计配置项
@@ -3125,7 +3509,7 @@ var SearchSelect = function SearchSelect(props) {
3125
3509
  var searchParams = {};
3126
3510
 
3127
3511
  if (typeof selectParamsKey === 'string') {
3128
- searchParams = _defineProperty({}, selectParamsKey, v ? initVal : searchValue);
3512
+ searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
3129
3513
  }
3130
3514
 
3131
3515
  if (Array.isArray(selectParamsKey)) {
@@ -3135,7 +3519,6 @@ var SearchSelect = function SearchSelect(props) {
3135
3519
  } // 防抖函数 待定
3136
3520
 
3137
3521
 
3138
- // 防抖函数 待定
3139
3522
  getData(searchParams);
3140
3523
  }, {
3141
3524
  wait: 1000
@@ -3320,10 +3703,12 @@ var SearchSelect = function SearchSelect(props) {
3320
3703
  }, otherParams), fixedParam), params);
3321
3704
 
3322
3705
  axios.get("".concat(url, "?").concat(stringify(queryParams))).then(function (result) {
3706
+ var _result, _result2;
3707
+
3323
3708
  setFetching(false);
3324
3709
  result = result.data;
3325
3710
 
3326
- if (result.status !== '0') {
3711
+ 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') {
3327
3712
  message.error(result.msg);
3328
3713
  return;
3329
3714
  }
@@ -3445,7 +3830,6 @@ var SearchSelect = function SearchSelect(props) {
3445
3830
  useEffect(function () {
3446
3831
  if (value) {
3447
3832
  setPopValue(value);
3448
- onChange(value);
3449
3833
  }
3450
3834
  }, [value]);
3451
3835
  useEffect(function () {
@@ -3514,9 +3898,9 @@ var SearchSelect = function SearchSelect(props) {
3514
3898
  if (labelInValue) {
3515
3899
  var formatResult = value.map(function (i) {
3516
3900
  return {
3517
- key: i.code,
3518
- label: i.name,
3519
- value: i.code
3901
+ key: i[mappingValueField],
3902
+ label: i[mappingTextField],
3903
+ value: i[mappingValueField]
3520
3904
  };
3521
3905
  });
3522
3906
  onChange(selectMode ? formatResult : formatResult[0]);
@@ -3695,6 +4079,11 @@ var SearchSelect = function SearchSelect(props) {
3695
4079
  selectedRowKeys: selectedRowKeys,
3696
4080
  onChange: function onChange(sks, srs) {
3697
4081
  onChangeSelectedKeys(sks, srs);
4082
+ },
4083
+ getCheckboxProps: function getCheckboxProps() {
4084
+ return {
4085
+ disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
4086
+ };
3698
4087
  }
3699
4088
  };
3700
4089
 
@@ -3715,7 +4104,7 @@ var SearchSelect = function SearchSelect(props) {
3715
4104
  var formItem = function formItem(list) {
3716
4105
  if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
3717
4106
  return list.map(function (i) {
3718
- var _i$field, _i$field3, _i$field5;
4107
+ var _i$field, _i$field3, _i$field5, _i$field6, _i$field7;
3719
4108
 
3720
4109
  if ((i === null || i === void 0 ? void 0 : i.type) === 'select' || (i === null || i === void 0 ? void 0 : (_i$field = i.field) === null || _i$field === void 0 ? void 0 : _i$field.type) === 'select') {
3721
4110
  var _i$field2, _i$initialSource;
@@ -3752,12 +4141,24 @@ var SearchSelect = function SearchSelect(props) {
3752
4141
  }, i === null || i === void 0 ? void 0 : (_i$field4 = i.field) === null || _i$field4 === void 0 ? void 0 : _i$field4.props)));
3753
4142
  }
3754
4143
 
3755
- if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect') {
4144
+ if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect' || (i === null || i === void 0 ? void 0 : (_i$field5 = i.field) === null || _i$field5 === void 0 ? void 0 : _i$field5.type) === 'businessSearchSelect') {
3756
4145
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Item, {
3757
4146
  name: i.name,
3758
4147
  label: i.label,
3759
4148
  key: i.name
3760
4149
  }, /*#__PURE__*/React.createElement(BusinessSearchSelect$1, _objectSpread2({}, i.field.props))));
4150
+ }
4151
+
4152
+ if ((i === null || i === void 0 ? void 0 : i.type) === 'multipleQueryInput' || (i === null || i === void 0 ? void 0 : (_i$field6 = i.field) === null || _i$field6 === void 0 ? void 0 : _i$field6.type) === 'multipleQueryInput') {
4153
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Item, {
4154
+ name: i.name,
4155
+ label: i.label,
4156
+ key: i.name
4157
+ }, /*#__PURE__*/React.createElement(QueryMutipleInput, {
4158
+ onValueChange: function onValueChange(value) {
4159
+ form.setFieldsValue(_defineProperty({}, i.name, value));
4160
+ }
4161
+ })));
3761
4162
  } // 默认type是input
3762
4163
 
3763
4164
 
@@ -3772,7 +4173,7 @@ var SearchSelect = function SearchSelect(props) {
3772
4173
  placeholder: "\u8BF7\u8F93\u5165",
3773
4174
  allowClear: true,
3774
4175
  maxLength: 100
3775
- }, i === null || i === void 0 ? void 0 : (_i$field5 = i.field) === null || _i$field5 === void 0 ? void 0 : _i$field5.props)));
4176
+ }, i === null || i === void 0 ? void 0 : (_i$field7 = i.field) === null || _i$field7 === void 0 ? void 0 : _i$field7.props)));
3776
4177
  });
3777
4178
  } else {
3778
4179
  return null;
@@ -3967,7 +4368,8 @@ var SearchSelect = function SearchSelect(props) {
3967
4368
  }, /*#__PURE__*/React.createElement(Checkbox, {
3968
4369
  indeterminate: indeterminate,
3969
4370
  checked: checkedAll,
3970
- onChange: onChangeCheckAll
4371
+ onChange: onChangeCheckAll,
4372
+ disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
3971
4373
  }), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
3972
4374
  };
3973
4375
 
@@ -3978,6 +4380,19 @@ var shopFileType = [{
3978
4380
  text: "线下",
3979
4381
  value: 'offline'
3980
4382
  }];
4383
+ var shopFile2Type = [{
4384
+ text: "第三方线上",
4385
+ value: 'online'
4386
+ }, {
4387
+ text: "线下",
4388
+ value: 'offline'
4389
+ }, {
4390
+ text: "自营B2B",
4391
+ value: 'B2B'
4392
+ }, {
4393
+ text: "自营B2C",
4394
+ value: 'B2C'
4395
+ }];
3981
4396
  var arrivalPaySupportList = [{
3982
4397
  text: "支持",
3983
4398
  value: 1
@@ -4044,11 +4459,11 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
4044
4459
  var loadSelectSource = function loadSelectSource(url, params) {
4045
4460
  return new Promise(function (resolve, reject) {
4046
4461
  axios.get("".concat(url, "?").concat(stringify(params))).then(function (result) {
4047
- var _result;
4462
+ var _result, _result2;
4048
4463
 
4049
4464
  result = result.data;
4050
4465
 
4051
- if (result.status && result.status !== '0' || ((_result = result) === null || _result === void 0 ? void 0 : _result.code) && result.code !== '000000') {
4466
+ 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') {
4052
4467
  message.error(result.msg);
4053
4468
  return;
4054
4469
  }
@@ -4060,6 +4475,48 @@ var loadSelectSource = function loadSelectSource(url, params) {
4060
4475
  });
4061
4476
  };
4062
4477
 
4478
+ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
4479
+ var result;
4480
+
4481
+ switch (type) {
4482
+ case 'supplier2':
4483
+ case 'customer2':
4484
+ case 'shopFile2':
4485
+ result = '/channel-manage';
4486
+ break;
4487
+
4488
+ case 'skuCommodity':
4489
+ case 'skuPropertyValue':
4490
+ case 'spuCommodity':
4491
+ result = '/items';
4492
+ break;
4493
+
4494
+ case 'physicalWarehouse':
4495
+ case 'realWarehouse':
4496
+ case 'virtualWarehouse':
4497
+ case 'channelWarehouse':
4498
+ result = '/stock';
4499
+ break;
4500
+
4501
+ case 'inventoryOrg2':
4502
+ case 'purchaseOrg':
4503
+ case 'salesOrg':
4504
+ case 'employee2':
4505
+ result = '/user';
4506
+ break;
4507
+
4508
+ case 'deliveryMode':
4509
+ result = '/basic';
4510
+ break;
4511
+
4512
+ default:
4513
+ result = '/bop/api';
4514
+ break;
4515
+ }
4516
+
4517
+ return result;
4518
+ };
4519
+
4063
4520
  var _getDictionarySource;
4064
4521
  var hasDictSharingType = (_getDictionarySource = getDictionarySource('UC000013')) === null || _getDictionarySource === void 0 ? void 0 : _getDictionarySource.length;
4065
4522
  var sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType;
@@ -4087,7 +4544,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4087
4544
 
4088
4545
  var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['code', 'name'];
4089
4546
  var data = reData && ((_reData$position = reData[position]) === null || _reData$position === void 0 ? void 0 : _reData$position.data);
4090
- var list = Array.isArray(data) ? data : (data === null || data === void 0 ? void 0 : data.items) || (data === null || data === void 0 ? void 0 : data.list) || [];
4547
+ var list = Array.isArray(data) ? data : (data === null || data === void 0 ? void 0 : data.items) || (data === null || data === void 0 ? void 0 : data.list) || (data === null || data === void 0 ? void 0 : data.children) || [];
4091
4548
  var formatData = (list === null || list === void 0 ? void 0 : list.length) ? list.map(function (v) {
4092
4549
  return {
4093
4550
  text: v[resKeyValue[1]],
@@ -4134,7 +4591,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4134
4591
  tableColumns: []
4135
4592
  }, modalTableBusProps);
4136
4593
 
4137
- var needModalTable = true; // 供应商选择器
4594
+ var needModalTable = (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable) !== undefined ? modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable : true; // 供应商选择器
4138
4595
 
4139
4596
  if (type === 'supplier') {
4140
4597
  tableSearchForm = [{
@@ -4334,7 +4791,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4334
4791
  mappingTextShowTextField: ['name', 'propertyNameAndValue'],
4335
4792
  otherParams: {
4336
4793
  'qp-approveStatus-eq': 1,
4337
- 'qp-type-eq': 10,
4794
+ // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
4338
4795
  sorter: 'desc-id'
4339
4796
  },
4340
4797
  sourceName: 'skuCode'
@@ -4346,8 +4803,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4346
4803
  name: 'qp-name-like',
4347
4804
  label: 'SKU名称'
4348
4805
  }, {
4349
- name: 'qp-skuCode-like',
4350
- label: 'SKU编码'
4806
+ name: 'qp-skuCode-in',
4807
+ label: 'SKU编码',
4808
+ field: {
4809
+ type: 'multipleQueryInput',
4810
+ props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
4811
+ }
4351
4812
  }, requestConfig.url.includes('v2') ? {
4352
4813
  name: 'qp-code-like',
4353
4814
  label: '国际条码'
@@ -4447,8 +4908,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4447
4908
  name: 'qp-name-like',
4448
4909
  label: 'SKU名称'
4449
4910
  }, {
4450
- name: 'qp-skuCode-like',
4451
- label: 'SKU编码'
4911
+ name: 'qp-skuCode-in',
4912
+ label: 'SKU编码',
4913
+ field: {
4914
+ type: 'multipleQueryInput',
4915
+ props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
4916
+ }
4452
4917
  }, {
4453
4918
  name: 'qp-barCode-like',
4454
4919
  label: '国际条码'
@@ -4525,7 +4990,8 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4525
4990
  }];
4526
4991
  Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
4527
4992
  pageSize: 5000,
4528
- currentPage: 1
4993
+ currentPage: 1,
4994
+ 'ctl-withAuth': true
4529
4995
  }), loadSelectSource("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
4530
4996
  pageSize: 5000,
4531
4997
  currentPage: 1
@@ -4687,7 +5153,8 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4687
5153
  }];
4688
5154
  Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
4689
5155
  pageSize: 5000,
4690
- currentPage: 1
5156
+ currentPage: 1,
5157
+ 'ctl-withAuth': true
4691
5158
  }), loadSelectSource("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
4692
5159
  pageSize: 5000,
4693
5160
  currentPage: 1
@@ -4896,6 +5363,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4896
5363
  mappingTextField: 'name',
4897
5364
  mappingValueField: 'code',
4898
5365
  otherParams: {
5366
+ 'qp-status-eq': 10,
4899
5367
  sorter: 'desc-id'
4900
5368
  },
4901
5369
  sourceName: 'customCode'
@@ -5251,6 +5719,83 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
5251
5719
  dataIndex: 'accountingName'
5252
5720
  }]
5253
5721
  }, modalTableBusProps);
5722
+ }
5723
+
5724
+ if (type === 'shopFile2') {
5725
+ var _JSON$parse, _JSON$parse$employeeR;
5726
+
5727
+ requestConfig = _objectSpread2({
5728
+ url: "".concat(prefixUrl.selectPrefix, "/store/page"),
5729
+ filter: 'qp-name,code-orGroup,like',
5730
+ mappingTextField: 'name',
5731
+ mappingValueField: 'code',
5732
+ otherParams: {
5733
+ sorter: 'desc-id'
5734
+ },
5735
+ sourceName: 'code'
5736
+ }, requestConfigProp);
5737
+ tableSearchForm = [{
5738
+ name: 'qp-name-like',
5739
+ label: '商店名称'
5740
+ }, {
5741
+ name: 'qp-code-like',
5742
+ label: '商店编码'
5743
+ }, {
5744
+ name: 'qp-type-in',
5745
+ type: 'select',
5746
+ label: '商店类型',
5747
+ initialSource: shopFile2Type
5748
+ }, {
5749
+ name: 'qp-orgCode-in',
5750
+ type: 'select',
5751
+ label: '所属销售组织',
5752
+ field: {
5753
+ type: 'select',
5754
+ props: {
5755
+ mode: 'multiple',
5756
+ notFoundContent: '暂无数据',
5757
+ allowClear: true,
5758
+ showSearch: true,
5759
+ showArrow: true,
5760
+ maxTagCount: 1,
5761
+ optionFilterProp: 'children',
5762
+ filterOption: function filterOption(input, option) {
5763
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
5764
+ }
5765
+ }
5766
+ }
5767
+ }];
5768
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
5769
+ 'qp-employeeCode-eq': (_JSON$parse = JSON.parse(localStorage.getItem('userInfo') || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$employeeR = _JSON$parse.employeeResVo) === null || _JSON$parse$employeeR === void 0 ? void 0 : _JSON$parse$employeeR.employeeNumber,
5770
+ 'qp-realOrg-eq': true,
5771
+ 'qp-status-eq': 10
5772
+ })]).then(function (x) {
5773
+ formatSource(x, 0, 3, tableSearchForm);
5774
+ });
5775
+ modalTableProps = _objectSpread2({
5776
+ modalTableTitle: '选择商店',
5777
+ tableSearchForm: tableSearchForm,
5778
+ tableColumns: [{
5779
+ title: '商店编码',
5780
+ dataIndex: 'code'
5781
+ }, {
5782
+ title: '商店名称',
5783
+ dataIndex: 'name'
5784
+ }, {
5785
+ title: '商店类型',
5786
+ dataIndex: 'type',
5787
+ render: function render(text) {
5788
+ var _shopFile2Type$find;
5789
+
5790
+ return (_shopFile2Type$find = shopFile2Type.find(function (i) {
5791
+ return i.value === text;
5792
+ })) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
5793
+ }
5794
+ }, {
5795
+ title: '所属销售组织',
5796
+ dataIndex: 'orgName'
5797
+ }]
5798
+ }, modalTableBusProps);
5254
5799
  } // 核算主体选择器(无弹窗)
5255
5800
 
5256
5801
 
@@ -5578,8 +6123,8 @@ var MemoSearchSelect = /*#__PURE__*/React.memo(SearchSelect);
5578
6123
  var BusinessSearchSelect = function BusinessSearchSelect(props) {
5579
6124
  var businessType = (props === null || props === void 0 ? void 0 : props.selectBusinessType) || 'supplier';
5580
6125
  var prefixUrl = (props === null || props === void 0 ? void 0 : props.prefixUrl) || {
5581
- selectPrefix: '/bop/api',
5582
- formSelectFix: '/bop/api'
6126
+ selectPrefix: handleDefaultPrefixUrl(businessType),
6127
+ formSelectFix: handleDefaultPrefixUrl(businessType)
5583
6128
  };
5584
6129
 
5585
6130
  var _commonFun = commonFun(businessType, prefixUrl, (props === null || props === void 0 ? void 0 : props.requestConfig) || {}, (props === null || props === void 0 ? void 0 : props.modalTableProps) || {}),
@@ -5620,7 +6165,7 @@ var CommodityEntry = function CommodityEntry(props) {
5620
6165
  _props$columns = props.columns,
5621
6166
  columns = _props$columns === void 0 ? ["skuCode", "quantity", "price"] : _props$columns,
5622
6167
  _props$validDataUrl = props.validDataUrl,
5623
- validDataUrl = _props$validDataUrl === void 0 ? "/bop/api/recordDetailImport/check" : _props$validDataUrl;
6168
+ validDataUrl = _props$validDataUrl === void 0 ? "/items/api/recordDetailImport/check" : _props$validDataUrl;
5624
6169
 
5625
6170
  var _useState = useState({
5626
6171
  maskClosable: false,
@@ -5743,6 +6288,321 @@ function getStorageVale(storageKeyString) {
5743
6288
  return "";
5744
6289
  }
5745
6290
 
6291
+ var TreeSearchSelect = function TreeSearchSelect(props) {
6292
+ var _useState = useState([]),
6293
+ _useState2 = _slicedToArray(_useState, 2),
6294
+ treeData = _useState2[0],
6295
+ setTreeData = _useState2[1];
6296
+
6297
+ var ctx = props.ctx,
6298
+ value = props.value,
6299
+ valueName = props.valueName,
6300
+ onChange = props.onChange,
6301
+ onChangeName = props.onChangeName,
6302
+ placeholder = props.placeholder,
6303
+ remoteSource = props.remoteSource,
6304
+ initialValue = props.initialValue,
6305
+ _props$treeCheckable = props.treeCheckable,
6306
+ treeCheckable = _props$treeCheckable === void 0 ? false : _props$treeCheckable,
6307
+ _props$showSearch = props.showSearch,
6308
+ showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
6309
+ _props$maxTagCount = props.maxTagCount,
6310
+ maxTagCount = _props$maxTagCount === void 0 ? 1 : _props$maxTagCount,
6311
+ _props$multiple = props.multiple,
6312
+ multiple = _props$multiple === void 0 ? false : _props$multiple,
6313
+ _props$isChoose = props.isChoose,
6314
+ isChoose = _props$isChoose === void 0 ? false : _props$isChoose,
6315
+ mode = props.mode,
6316
+ _getPopupContainer = props.getPopupContainer,
6317
+ _props$labelInValue = props.labelInValue,
6318
+ labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
6319
+ _props$showArrow = props.showArrow,
6320
+ showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
6321
+ _props$allowClear = props.allowClear,
6322
+ allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
6323
+ _props$showCheckedStr = props.showCheckedStrategy,
6324
+ showCheckedStrategy = _props$showCheckedStr === void 0 ? TreeSelect.SHOW_PARENT : _props$showCheckedStr,
6325
+ _props$style = props.style,
6326
+ style = _props$style === void 0 ? {
6327
+ width: '100%'
6328
+ } : _props$style,
6329
+ getTreeData = props.getTreeData;
6330
+ var url = remoteSource.url,
6331
+ _remoteSource$paramsK = remoteSource.paramsKey,
6332
+ paramsKey = _remoteSource$paramsK === void 0 ? 'qp-name-like' : _remoteSource$paramsK,
6333
+ _remoteSource$resKeyV = remoteSource.resKeyValue,
6334
+ resKeyValue = _remoteSource$resKeyV === void 0 ? ['id', 'name'] : _remoteSource$resKeyV,
6335
+ _remoteSource$initial = remoteSource.initialParams,
6336
+ initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial;
6337
+
6338
+ var mapSearchTree = function mapSearchTree(treeDataItem) {
6339
+ var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
6340
+ return {
6341
+ title: treeDataItem[resKeyValue[1]],
6342
+ key: treeDataItem[resKeyValue[0]],
6343
+ value: treeDataItem[resKeyValue[0]],
6344
+ parentId: treeDataItem.parent,
6345
+ data: _objectSpread2({}, treeDataItem),
6346
+ isLeaf: !haveChildren,
6347
+ disabled: isDisabled(haveChildren),
6348
+ children: haveChildren ? treeDataItem.children.map(function (i) {
6349
+ return mapSearchTree(i);
6350
+ }) : []
6351
+ };
6352
+ };
6353
+
6354
+ var isDisabled = function isDisabled(children) {
6355
+ if (isChoose) {
6356
+ return false;
6357
+ }
6358
+
6359
+ return children;
6360
+ };
6361
+ /* 实时查询 但是目前用的直接是完整数据源, 所以没有使用 */
6362
+
6363
+
6364
+ var handleSearch = function handleSearch(q) {
6365
+ var paramsData = _objectSpread2(_defineProperty({}, "".concat(paramsKey), q), initialParams);
6366
+
6367
+ axios.get("".concat(url, "?").concat(stringify(paramsData))).then( /*#__PURE__*/function () {
6368
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
6369
+ var _ctx$form;
6370
+
6371
+ var resData, coverData, data, dataList;
6372
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
6373
+ while (1) {
6374
+ switch (_context.prev = _context.next) {
6375
+ case 0:
6376
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
6377
+
6378
+ if (!(resData.status === '0')) {
6379
+ _context.next = 13;
6380
+ break;
6381
+ }
6382
+
6383
+ data = resData.data;
6384
+
6385
+ if (!remoteSource.converter) {
6386
+ _context.next = 9;
6387
+ break;
6388
+ }
6389
+
6390
+ _context.next = 6;
6391
+ return remoteSource.converter({
6392
+ data: [data]
6393
+ });
6394
+
6395
+ case 6:
6396
+ coverData = _context.sent;
6397
+ _context.next = 11;
6398
+ break;
6399
+
6400
+ case 9:
6401
+ dataList = data && Array.isArray(data) ? data : data && [data] || [];
6402
+ coverData = dataList.length && dataList.map(function (ites) {
6403
+ return mapSearchTree(ites);
6404
+ }) || [];
6405
+
6406
+ case 11:
6407
+ _context.next = 14;
6408
+ break;
6409
+
6410
+ case 13:
6411
+ coverData = [];
6412
+
6413
+ case 14:
6414
+ setTreeData(coverData);
6415
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
6416
+
6417
+ case 16:
6418
+ case "end":
6419
+ return _context.stop();
6420
+ }
6421
+ }
6422
+ }, _callee);
6423
+ }));
6424
+
6425
+ return function (_x) {
6426
+ return _ref.apply(this, arguments);
6427
+ };
6428
+ }());
6429
+ };
6430
+
6431
+ var handleChange = function handleChange(data, dataName) {
6432
+ var _ctx$form2;
6433
+
6434
+ onChange(data);
6435
+ onChangeName && onChangeName(dataName);
6436
+ getTreeData && getTreeData(treeData); // 把树节点暴露出去
6437
+
6438
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(ctx.name, data);
6439
+ };
6440
+
6441
+ useEffect(function () {
6442
+ handleSearch(initialValue);
6443
+ }, []);
6444
+
6445
+ var maxTagPlaceholder = function maxTagPlaceholder(selectedValues) {
6446
+ var _onClose = function onClose(e, item) {
6447
+ e.preventDefault();
6448
+ var newValue = labelInValue ? JSON.parse(JSON.stringify(value)).filter(function (i) {
6449
+ return i.value !== item.value;
6450
+ }) : JSON.parse(JSON.stringify(value)).filter(function (i) {
6451
+ return i !== item.value;
6452
+ });
6453
+ var newValueName = labelInValue ? null : JSON.parse(JSON.stringify(valueName)).filter(function (i) {
6454
+ return i !== item.label;
6455
+ });
6456
+ handleChange(newValue, newValueName);
6457
+ };
6458
+
6459
+ return /*#__PURE__*/React.createElement(Tooltip, {
6460
+ title: selectedValues.map(function (i) {
6461
+ return /*#__PURE__*/React.createElement(Tag, {
6462
+ closable: true,
6463
+ onClose: function onClose(e) {
6464
+ return _onClose(e, i);
6465
+ },
6466
+ style: {
6467
+ marginRight: 3,
6468
+ background: '#f5f5f5',
6469
+ height: '24px',
6470
+ border: '1px solid #f0f0f0'
6471
+ }
6472
+ }, i.label);
6473
+ })
6474
+ }, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
6475
+ };
6476
+
6477
+ return /*#__PURE__*/React.createElement("div", {
6478
+ className: 'tree_search_select'
6479
+ }, /*#__PURE__*/React.createElement(TreeSelect, {
6480
+ treeCheckable: treeCheckable,
6481
+ maxTagCount: maxTagCount,
6482
+ showSearch: showSearch,
6483
+ style: style,
6484
+ value: value,
6485
+ dropdownStyle: {
6486
+ maxHeight: 400,
6487
+ maxWidth: 100,
6488
+ overflow: 'auto'
6489
+ },
6490
+ treeData: treeData,
6491
+ placeholder: placeholder,
6492
+ allowClear: allowClear,
6493
+ labelInValue: labelInValue,
6494
+ showArrow: showArrow,
6495
+ showCheckedStrategy: showCheckedStrategy,
6496
+ treeNodeFilterProp: 'title',
6497
+ treeDefaultExpandAll: true,
6498
+ multiple: multiple,
6499
+ maxTagPlaceholder: maxTagPlaceholder,
6500
+ onChange: handleChange,
6501
+ disabled: mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
6502
+ getPopupContainer: function getPopupContainer() {
6503
+ return _getPopupContainer && _getPopupContainer() || document.body;
6504
+ }
6505
+ }));
6506
+ };
6507
+
6508
+ var handleDefaultProps = function handleDefaultProps(type) {
6509
+ var result = {};
6510
+
6511
+ switch (type) {
6512
+ case 'department':
6513
+ result = {
6514
+ treeCheckable: true,
6515
+ isChoose: true,
6516
+ remoteSource: {
6517
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6518
+ initialParams: {
6519
+ 'orgViewCode': 'administrative-organization-view'
6520
+ },
6521
+ resKeyValue: ['code', 'name']
6522
+ }
6523
+ };
6524
+ break;
6525
+
6526
+ case 'sales-organization':
6527
+ result = {
6528
+ isChoose: true,
6529
+ remoteSource: {
6530
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6531
+ initialParams: {
6532
+ 'orgViewCode': 'sales-organizational-view'
6533
+ },
6534
+ resKeyValue: ['code', 'name']
6535
+ }
6536
+ };
6537
+ break;
6538
+
6539
+ case 'purchase-organization':
6540
+ result = {
6541
+ isChoose: true,
6542
+ remoteSource: {
6543
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6544
+ initialParams: {
6545
+ 'orgViewCode': 'purchase-organizational-view'
6546
+ },
6547
+ resKeyValue: ['code', 'name']
6548
+ }
6549
+ };
6550
+ break;
6551
+
6552
+ case 'stock-organization':
6553
+ result = {
6554
+ isChoose: true,
6555
+ remoteSource: {
6556
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6557
+ initialParams: {
6558
+ 'orgViewCode': 'stock-organizational-view'
6559
+ },
6560
+ resKeyValue: ['code', 'name']
6561
+ }
6562
+ };
6563
+ break;
6564
+
6565
+ default:
6566
+ result = {
6567
+ treeCheckable: true,
6568
+ isChoose: true,
6569
+ remoteSource: {
6570
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6571
+ initialParams: {
6572
+ 'orgViewCode': 'administrative-organization-view'
6573
+ },
6574
+ resKeyValue: ['code', 'name']
6575
+ }
6576
+ };
6577
+ break;
6578
+ }
6579
+
6580
+ return result;
6581
+ };
6582
+
6583
+ var MemoTreeSearchSelect = /*#__PURE__*/React.memo(TreeSearchSelect);
6584
+
6585
+ var BusinessTreeSearchSelect = function BusinessTreeSearchSelect(props) {
6586
+ var businessType = (props === null || props === void 0 ? void 0 : props.businessType) || 'department';
6587
+ var handleBusinessProps = handleDefaultProps(businessType);
6588
+ var currentProps = useMemo(function () {
6589
+ return _objectSpread2(_objectSpread2({}, handleBusinessProps), props);
6590
+ }, [props === null || props === void 0 ? void 0 : props.value]);
6591
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MemoTreeSearchSelect, _objectSpread2({}, currentProps)));
6592
+ };
6593
+
6594
+ var index$1 = /*#__PURE__*/React.memo(BusinessTreeSearchSelect, function (props, nextProps) {
6595
+ if (props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
6596
+ return false;
6597
+ }
6598
+
6599
+ if (props && props.value !== nextProps.value) {
6600
+ return false;
6601
+ }
6602
+
6603
+ return true;
6604
+ });
6605
+
5746
6606
  /*
5747
6607
  * @Description:
5748
6608
  * @Author: rodchen
@@ -5753,5 +6613,11 @@ function getStorageVale(storageKeyString) {
5753
6613
 
5754
6614
  var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
5755
6615
  axios.defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
6616
+ axios.defaults.headers.common['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
6617
+
6618
+ if (localStorage.getItem('x-user-auth-context')) {
6619
+ // @ts-ignore
6620
+ axios.defaults.headers.common['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
6621
+ }
5756
6622
 
5757
- export { BusinessSearchSelect$1 as BusinessSearchSelect, index as CheckOneUser, CommodityEntry, DataValidation$1 as DataImport, DataValidation, QueryMutipleInput, SearchSelect };
6623
+ export { BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, CommodityEntry, DataImport, DataValidation, QueryMutipleInput, SearchSelect, TreeSearchSelect };