@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.js CHANGED
@@ -44,6 +44,387 @@ function _objectSpread2(target) {
44
44
  return target;
45
45
  }
46
46
 
47
+ function _regeneratorRuntime() {
48
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
49
+
50
+ _regeneratorRuntime = function () {
51
+ return exports;
52
+ };
53
+
54
+ var exports = {},
55
+ Op = Object.prototype,
56
+ hasOwn = Op.hasOwnProperty,
57
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
58
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
59
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
60
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
61
+
62
+ function define(obj, key, value) {
63
+ return Object.defineProperty(obj, key, {
64
+ value: value,
65
+ enumerable: !0,
66
+ configurable: !0,
67
+ writable: !0
68
+ }), obj[key];
69
+ }
70
+
71
+ try {
72
+ define({}, "");
73
+ } catch (err) {
74
+ define = function (obj, key, value) {
75
+ return obj[key] = value;
76
+ };
77
+ }
78
+
79
+ function wrap(innerFn, outerFn, self, tryLocsList) {
80
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
81
+ generator = Object.create(protoGenerator.prototype),
82
+ context = new Context(tryLocsList || []);
83
+ return generator._invoke = function (innerFn, self, context) {
84
+ var state = "suspendedStart";
85
+ return function (method, arg) {
86
+ if ("executing" === state) throw new Error("Generator is already running");
87
+
88
+ if ("completed" === state) {
89
+ if ("throw" === method) throw arg;
90
+ return doneResult();
91
+ }
92
+
93
+ for (context.method = method, context.arg = arg;;) {
94
+ var delegate = context.delegate;
95
+
96
+ if (delegate) {
97
+ var delegateResult = maybeInvokeDelegate(delegate, context);
98
+
99
+ if (delegateResult) {
100
+ if (delegateResult === ContinueSentinel) continue;
101
+ return delegateResult;
102
+ }
103
+ }
104
+
105
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
106
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
107
+ context.dispatchException(context.arg);
108
+ } else "return" === context.method && context.abrupt("return", context.arg);
109
+ state = "executing";
110
+ var record = tryCatch(innerFn, self, context);
111
+
112
+ if ("normal" === record.type) {
113
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
114
+ return {
115
+ value: record.arg,
116
+ done: context.done
117
+ };
118
+ }
119
+
120
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
121
+ }
122
+ };
123
+ }(innerFn, self, context), generator;
124
+ }
125
+
126
+ function tryCatch(fn, obj, arg) {
127
+ try {
128
+ return {
129
+ type: "normal",
130
+ arg: fn.call(obj, arg)
131
+ };
132
+ } catch (err) {
133
+ return {
134
+ type: "throw",
135
+ arg: err
136
+ };
137
+ }
138
+ }
139
+
140
+ exports.wrap = wrap;
141
+ var ContinueSentinel = {};
142
+
143
+ function Generator() {}
144
+
145
+ function GeneratorFunction() {}
146
+
147
+ function GeneratorFunctionPrototype() {}
148
+
149
+ var IteratorPrototype = {};
150
+ define(IteratorPrototype, iteratorSymbol, function () {
151
+ return this;
152
+ });
153
+ var getProto = Object.getPrototypeOf,
154
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
155
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
156
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
157
+
158
+ function defineIteratorMethods(prototype) {
159
+ ["next", "throw", "return"].forEach(function (method) {
160
+ define(prototype, method, function (arg) {
161
+ return this._invoke(method, arg);
162
+ });
163
+ });
164
+ }
165
+
166
+ function AsyncIterator(generator, PromiseImpl) {
167
+ function invoke(method, arg, resolve, reject) {
168
+ var record = tryCatch(generator[method], generator, arg);
169
+
170
+ if ("throw" !== record.type) {
171
+ var result = record.arg,
172
+ value = result.value;
173
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
174
+ invoke("next", value, resolve, reject);
175
+ }, function (err) {
176
+ invoke("throw", err, resolve, reject);
177
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
178
+ result.value = unwrapped, resolve(result);
179
+ }, function (error) {
180
+ return invoke("throw", error, resolve, reject);
181
+ });
182
+ }
183
+
184
+ reject(record.arg);
185
+ }
186
+
187
+ var previousPromise;
188
+
189
+ this._invoke = function (method, arg) {
190
+ function callInvokeWithMethodAndArg() {
191
+ return new PromiseImpl(function (resolve, reject) {
192
+ invoke(method, arg, resolve, reject);
193
+ });
194
+ }
195
+
196
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
197
+ };
198
+ }
199
+
200
+ function maybeInvokeDelegate(delegate, context) {
201
+ var method = delegate.iterator[context.method];
202
+
203
+ if (undefined === method) {
204
+ if (context.delegate = null, "throw" === context.method) {
205
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
206
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
207
+ }
208
+
209
+ return ContinueSentinel;
210
+ }
211
+
212
+ var record = tryCatch(method, delegate.iterator, context.arg);
213
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
214
+ var info = record.arg;
215
+ 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);
216
+ }
217
+
218
+ function pushTryEntry(locs) {
219
+ var entry = {
220
+ tryLoc: locs[0]
221
+ };
222
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
223
+ }
224
+
225
+ function resetTryEntry(entry) {
226
+ var record = entry.completion || {};
227
+ record.type = "normal", delete record.arg, entry.completion = record;
228
+ }
229
+
230
+ function Context(tryLocsList) {
231
+ this.tryEntries = [{
232
+ tryLoc: "root"
233
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
234
+ }
235
+
236
+ function values(iterable) {
237
+ if (iterable) {
238
+ var iteratorMethod = iterable[iteratorSymbol];
239
+ if (iteratorMethod) return iteratorMethod.call(iterable);
240
+ if ("function" == typeof iterable.next) return iterable;
241
+
242
+ if (!isNaN(iterable.length)) {
243
+ var i = -1,
244
+ next = function next() {
245
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
246
+
247
+ return next.value = undefined, next.done = !0, next;
248
+ };
249
+
250
+ return next.next = next;
251
+ }
252
+ }
253
+
254
+ return {
255
+ next: doneResult
256
+ };
257
+ }
258
+
259
+ function doneResult() {
260
+ return {
261
+ value: undefined,
262
+ done: !0
263
+ };
264
+ }
265
+
266
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
267
+ var ctor = "function" == typeof genFun && genFun.constructor;
268
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
269
+ }, exports.mark = function (genFun) {
270
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
271
+ }, exports.awrap = function (arg) {
272
+ return {
273
+ __await: arg
274
+ };
275
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
276
+ return this;
277
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
278
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
279
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
280
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
281
+ return result.done ? result.value : iter.next();
282
+ });
283
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
284
+ return this;
285
+ }), define(Gp, "toString", function () {
286
+ return "[object Generator]";
287
+ }), exports.keys = function (object) {
288
+ var keys = [];
289
+
290
+ for (var key in object) keys.push(key);
291
+
292
+ return keys.reverse(), function next() {
293
+ for (; keys.length;) {
294
+ var key = keys.pop();
295
+ if (key in object) return next.value = key, next.done = !1, next;
296
+ }
297
+
298
+ return next.done = !0, next;
299
+ };
300
+ }, exports.values = values, Context.prototype = {
301
+ constructor: Context,
302
+ reset: function (skipTempReset) {
303
+ 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);
304
+ },
305
+ stop: function () {
306
+ this.done = !0;
307
+ var rootRecord = this.tryEntries[0].completion;
308
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
309
+ return this.rval;
310
+ },
311
+ dispatchException: function (exception) {
312
+ if (this.done) throw exception;
313
+ var context = this;
314
+
315
+ function handle(loc, caught) {
316
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
317
+ }
318
+
319
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
320
+ var entry = this.tryEntries[i],
321
+ record = entry.completion;
322
+ if ("root" === entry.tryLoc) return handle("end");
323
+
324
+ if (entry.tryLoc <= this.prev) {
325
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
326
+ hasFinally = hasOwn.call(entry, "finallyLoc");
327
+
328
+ if (hasCatch && hasFinally) {
329
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
330
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
331
+ } else if (hasCatch) {
332
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
333
+ } else {
334
+ if (!hasFinally) throw new Error("try statement without catch or finally");
335
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
336
+ }
337
+ }
338
+ }
339
+ },
340
+ abrupt: function (type, arg) {
341
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
342
+ var entry = this.tryEntries[i];
343
+
344
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
345
+ var finallyEntry = entry;
346
+ break;
347
+ }
348
+ }
349
+
350
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
351
+ var record = finallyEntry ? finallyEntry.completion : {};
352
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
353
+ },
354
+ complete: function (record, afterLoc) {
355
+ if ("throw" === record.type) throw record.arg;
356
+ 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;
357
+ },
358
+ finish: function (finallyLoc) {
359
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
360
+ var entry = this.tryEntries[i];
361
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
362
+ }
363
+ },
364
+ catch: function (tryLoc) {
365
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
366
+ var entry = this.tryEntries[i];
367
+
368
+ if (entry.tryLoc === tryLoc) {
369
+ var record = entry.completion;
370
+
371
+ if ("throw" === record.type) {
372
+ var thrown = record.arg;
373
+ resetTryEntry(entry);
374
+ }
375
+
376
+ return thrown;
377
+ }
378
+ }
379
+
380
+ throw new Error("illegal catch attempt");
381
+ },
382
+ delegateYield: function (iterable, resultName, nextLoc) {
383
+ return this.delegate = {
384
+ iterator: values(iterable),
385
+ resultName: resultName,
386
+ nextLoc: nextLoc
387
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
388
+ }
389
+ }, exports;
390
+ }
391
+
392
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
393
+ try {
394
+ var info = gen[key](arg);
395
+ var value = info.value;
396
+ } catch (error) {
397
+ reject(error);
398
+ return;
399
+ }
400
+
401
+ if (info.done) {
402
+ resolve(value);
403
+ } else {
404
+ Promise.resolve(value).then(_next, _throw);
405
+ }
406
+ }
407
+
408
+ function _asyncToGenerator(fn) {
409
+ return function () {
410
+ var self = this,
411
+ args = arguments;
412
+ return new Promise(function (resolve, reject) {
413
+ var gen = fn.apply(self, args);
414
+
415
+ function _next(value) {
416
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
417
+ }
418
+
419
+ function _throw(err) {
420
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
421
+ }
422
+
423
+ _next(undefined);
424
+ });
425
+ };
426
+ }
427
+
47
428
  function _classCallCheck(instance, Constructor) {
48
429
  if (!(instance instanceof Constructor)) {
49
430
  throw new TypeError("Cannot call a class as a function");
@@ -103,18 +484,17 @@ function _inherits(subClass, superClass) {
103
484
  }
104
485
 
105
486
  function _getPrototypeOf(o) {
106
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
487
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
107
488
  return o.__proto__ || Object.getPrototypeOf(o);
108
489
  };
109
490
  return _getPrototypeOf(o);
110
491
  }
111
492
 
112
493
  function _setPrototypeOf(o, p) {
113
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
494
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
114
495
  o.__proto__ = p;
115
496
  return o;
116
497
  };
117
-
118
498
  return _setPrototypeOf(o, p);
119
499
  }
120
500
 
@@ -2270,6 +2650,9 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2270
2650
  return DataValidation;
2271
2651
  }(React__default['default'].Component);
2272
2652
 
2653
+ 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";
2654
+ styleInject(css_248z$1);
2655
+
2273
2656
  var _excluded$3 = ["flag", "checkResults"],
2274
2657
  _excluded2$1 = ["flag", "checkResults"];
2275
2658
 
@@ -2322,15 +2705,15 @@ var filterLetters$1 = function filterLetters(i) {
2322
2705
  }
2323
2706
  };
2324
2707
 
2325
- var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2326
- _inherits(DataValidation, _React$Component);
2708
+ var DataImport = /*#__PURE__*/function (_React$Component) {
2709
+ _inherits(DataImport, _React$Component);
2327
2710
 
2328
- var _super = _createSuper(DataValidation);
2711
+ var _super = _createSuper(DataImport);
2329
2712
 
2330
- function DataValidation(props) {
2713
+ function DataImport(props) {
2331
2714
  var _this;
2332
2715
 
2333
- _classCallCheck(this, DataValidation);
2716
+ _classCallCheck(this, DataImport);
2334
2717
 
2335
2718
  _this = _super.call(this, props);
2336
2719
 
@@ -2795,7 +3178,7 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2795
3178
  });
2796
3179
  } else {
2797
3180
  itemsTemp$1 = props.columns.map(function (item, index) {
2798
- if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
3181
+ if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataImport component, please fix this error"));
2799
3182
  return {
2800
3183
  id: "item-0".concat(index),
2801
3184
  content: mapping$1.get(item),
@@ -2820,7 +3203,7 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2820
3203
  return _this;
2821
3204
  }
2822
3205
 
2823
- _createClass(DataValidation, [{
3206
+ _createClass(DataImport, [{
2824
3207
  key: "onDragEnd",
2825
3208
  value: function onDragEnd(result) {
2826
3209
  // dropped outside the list
@@ -2900,11 +3283,11 @@ var DataValidation$1 = /*#__PURE__*/function (_React$Component) {
2900
3283
  }
2901
3284
  }]);
2902
3285
 
2903
- return DataValidation;
3286
+ return DataImport;
2904
3287
  }(React__default['default'].Component);
2905
3288
 
2906
- 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";
2907
- styleInject(css_248z$1);
3289
+ 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";
3290
+ styleInject(css_248z$2);
2908
3291
 
2909
3292
  var QueryMutipleInput = function QueryMutipleInput(_ref) {
2910
3293
  var onValueChange = _ref.onValueChange;
@@ -3035,8 +3418,8 @@ function ToCDB(str) {
3035
3418
  return tmp;
3036
3419
  }
3037
3420
 
3038
- 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";
3039
- styleInject(css_248z$2);
3421
+ 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";
3422
+ styleInject(css_248z$3);
3040
3423
 
3041
3424
  var Option = antd.Select.Option;
3042
3425
 
@@ -3080,6 +3463,7 @@ var SearchSelect = function SearchSelect(props) {
3080
3463
 
3081
3464
  var currentPage = 1;
3082
3465
  var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
3466
+ var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
3083
3467
 
3084
3468
  var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
3085
3469
  // 以下属性不可更改----设计配置项
@@ -3136,7 +3520,7 @@ var SearchSelect = function SearchSelect(props) {
3136
3520
  var searchParams = {};
3137
3521
 
3138
3522
  if (typeof selectParamsKey === 'string') {
3139
- searchParams = _defineProperty({}, selectParamsKey, v ? initVal : searchValue);
3523
+ searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
3140
3524
  }
3141
3525
 
3142
3526
  if (Array.isArray(selectParamsKey)) {
@@ -3146,7 +3530,6 @@ var SearchSelect = function SearchSelect(props) {
3146
3530
  } // 防抖函数 待定
3147
3531
 
3148
3532
 
3149
- // 防抖函数 待定
3150
3533
  getData(searchParams);
3151
3534
  }, {
3152
3535
  wait: 1000
@@ -3331,10 +3714,12 @@ var SearchSelect = function SearchSelect(props) {
3331
3714
  }, otherParams), fixedParam), params);
3332
3715
 
3333
3716
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams))).then(function (result) {
3717
+ var _result, _result2;
3718
+
3334
3719
  setFetching(false);
3335
3720
  result = result.data;
3336
3721
 
3337
- if (result.status !== '0') {
3722
+ 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') {
3338
3723
  antd.message.error(result.msg);
3339
3724
  return;
3340
3725
  }
@@ -3456,7 +3841,6 @@ var SearchSelect = function SearchSelect(props) {
3456
3841
  React.useEffect(function () {
3457
3842
  if (value) {
3458
3843
  setPopValue(value);
3459
- onChange(value);
3460
3844
  }
3461
3845
  }, [value]);
3462
3846
  React.useEffect(function () {
@@ -3525,9 +3909,9 @@ var SearchSelect = function SearchSelect(props) {
3525
3909
  if (labelInValue) {
3526
3910
  var formatResult = value.map(function (i) {
3527
3911
  return {
3528
- key: i.code,
3529
- label: i.name,
3530
- value: i.code
3912
+ key: i[mappingValueField],
3913
+ label: i[mappingTextField],
3914
+ value: i[mappingValueField]
3531
3915
  };
3532
3916
  });
3533
3917
  onChange(selectMode ? formatResult : formatResult[0]);
@@ -3706,6 +4090,11 @@ var SearchSelect = function SearchSelect(props) {
3706
4090
  selectedRowKeys: selectedRowKeys,
3707
4091
  onChange: function onChange(sks, srs) {
3708
4092
  onChangeSelectedKeys(sks, srs);
4093
+ },
4094
+ getCheckboxProps: function getCheckboxProps() {
4095
+ return {
4096
+ disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
4097
+ };
3709
4098
  }
3710
4099
  };
3711
4100
 
@@ -3726,7 +4115,7 @@ var SearchSelect = function SearchSelect(props) {
3726
4115
  var formItem = function formItem(list) {
3727
4116
  if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
3728
4117
  return list.map(function (i) {
3729
- var _i$field, _i$field3, _i$field5;
4118
+ var _i$field, _i$field3, _i$field5, _i$field6, _i$field7;
3730
4119
 
3731
4120
  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') {
3732
4121
  var _i$field2, _i$initialSource;
@@ -3763,12 +4152,24 @@ var SearchSelect = function SearchSelect(props) {
3763
4152
  }, i === null || i === void 0 ? void 0 : (_i$field4 = i.field) === null || _i$field4 === void 0 ? void 0 : _i$field4.props)));
3764
4153
  }
3765
4154
 
3766
- if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect') {
4155
+ 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') {
3767
4156
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
3768
4157
  name: i.name,
3769
4158
  label: i.label,
3770
4159
  key: i.name
3771
4160
  }, /*#__PURE__*/React__default['default'].createElement(BusinessSearchSelect$1, _objectSpread2({}, i.field.props))));
4161
+ }
4162
+
4163
+ 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') {
4164
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
4165
+ name: i.name,
4166
+ label: i.label,
4167
+ key: i.name
4168
+ }, /*#__PURE__*/React__default['default'].createElement(QueryMutipleInput, {
4169
+ onValueChange: function onValueChange(value) {
4170
+ form.setFieldsValue(_defineProperty({}, i.name, value));
4171
+ }
4172
+ })));
3772
4173
  } // 默认type是input
3773
4174
 
3774
4175
 
@@ -3783,7 +4184,7 @@ var SearchSelect = function SearchSelect(props) {
3783
4184
  placeholder: "\u8BF7\u8F93\u5165",
3784
4185
  allowClear: true,
3785
4186
  maxLength: 100
3786
- }, i === null || i === void 0 ? void 0 : (_i$field5 = i.field) === null || _i$field5 === void 0 ? void 0 : _i$field5.props)));
4187
+ }, i === null || i === void 0 ? void 0 : (_i$field7 = i.field) === null || _i$field7 === void 0 ? void 0 : _i$field7.props)));
3787
4188
  });
3788
4189
  } else {
3789
4190
  return null;
@@ -3978,7 +4379,8 @@ var SearchSelect = function SearchSelect(props) {
3978
4379
  }, /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
3979
4380
  indeterminate: indeterminate,
3980
4381
  checked: checkedAll,
3981
- onChange: onChangeCheckAll
4382
+ onChange: onChangeCheckAll,
4383
+ disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
3982
4384
  }), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
3983
4385
  };
3984
4386
 
@@ -3989,6 +4391,19 @@ var shopFileType = [{
3989
4391
  text: "线下",
3990
4392
  value: 'offline'
3991
4393
  }];
4394
+ var shopFile2Type = [{
4395
+ text: "第三方线上",
4396
+ value: 'online'
4397
+ }, {
4398
+ text: "线下",
4399
+ value: 'offline'
4400
+ }, {
4401
+ text: "自营B2B",
4402
+ value: 'B2B'
4403
+ }, {
4404
+ text: "自营B2C",
4405
+ value: 'B2C'
4406
+ }];
3992
4407
  var arrivalPaySupportList = [{
3993
4408
  text: "支持",
3994
4409
  value: 1
@@ -4055,11 +4470,11 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
4055
4470
  var loadSelectSource = function loadSelectSource(url, params) {
4056
4471
  return new Promise(function (resolve, reject) {
4057
4472
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
4058
- var _result;
4473
+ var _result, _result2;
4059
4474
 
4060
4475
  result = result.data;
4061
4476
 
4062
- if (result.status && result.status !== '0' || ((_result = result) === null || _result === void 0 ? void 0 : _result.code) && result.code !== '000000') {
4477
+ 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') {
4063
4478
  antd.message.error(result.msg);
4064
4479
  return;
4065
4480
  }
@@ -4071,6 +4486,48 @@ var loadSelectSource = function loadSelectSource(url, params) {
4071
4486
  });
4072
4487
  };
4073
4488
 
4489
+ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
4490
+ var result;
4491
+
4492
+ switch (type) {
4493
+ case 'supplier2':
4494
+ case 'customer2':
4495
+ case 'shopFile2':
4496
+ result = '/channel-manage';
4497
+ break;
4498
+
4499
+ case 'skuCommodity':
4500
+ case 'skuPropertyValue':
4501
+ case 'spuCommodity':
4502
+ result = '/items';
4503
+ break;
4504
+
4505
+ case 'physicalWarehouse':
4506
+ case 'realWarehouse':
4507
+ case 'virtualWarehouse':
4508
+ case 'channelWarehouse':
4509
+ result = '/stock';
4510
+ break;
4511
+
4512
+ case 'inventoryOrg2':
4513
+ case 'purchaseOrg':
4514
+ case 'salesOrg':
4515
+ case 'employee2':
4516
+ result = '/user';
4517
+ break;
4518
+
4519
+ case 'deliveryMode':
4520
+ result = '/basic';
4521
+ break;
4522
+
4523
+ default:
4524
+ result = '/bop/api';
4525
+ break;
4526
+ }
4527
+
4528
+ return result;
4529
+ };
4530
+
4074
4531
  var _getDictionarySource;
4075
4532
  var hasDictSharingType = (_getDictionarySource = getDictionarySource('UC000013')) === null || _getDictionarySource === void 0 ? void 0 : _getDictionarySource.length;
4076
4533
  var sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType;
@@ -4098,7 +4555,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4098
4555
 
4099
4556
  var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['code', 'name'];
4100
4557
  var data = reData && ((_reData$position = reData[position]) === null || _reData$position === void 0 ? void 0 : _reData$position.data);
4101
- var list = Array.isArray(data) ? data : (data === null || data === void 0 ? void 0 : data.items) || (data === null || data === void 0 ? void 0 : data.list) || [];
4558
+ 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) || [];
4102
4559
  var formatData = (list === null || list === void 0 ? void 0 : list.length) ? list.map(function (v) {
4103
4560
  return {
4104
4561
  text: v[resKeyValue[1]],
@@ -4145,7 +4602,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4145
4602
  tableColumns: []
4146
4603
  }, modalTableBusProps);
4147
4604
 
4148
- var needModalTable = true; // 供应商选择器
4605
+ var needModalTable = (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable) !== undefined ? modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable : true; // 供应商选择器
4149
4606
 
4150
4607
  if (type === 'supplier') {
4151
4608
  tableSearchForm = [{
@@ -4345,7 +4802,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4345
4802
  mappingTextShowTextField: ['name', 'propertyNameAndValue'],
4346
4803
  otherParams: {
4347
4804
  'qp-approveStatus-eq': 1,
4348
- 'qp-type-eq': 10,
4805
+ // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
4349
4806
  sorter: 'desc-id'
4350
4807
  },
4351
4808
  sourceName: 'skuCode'
@@ -4357,8 +4814,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4357
4814
  name: 'qp-name-like',
4358
4815
  label: 'SKU名称'
4359
4816
  }, {
4360
- name: 'qp-skuCode-like',
4361
- label: 'SKU编码'
4817
+ name: 'qp-skuCode-in',
4818
+ label: 'SKU编码',
4819
+ field: {
4820
+ type: 'multipleQueryInput',
4821
+ props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
4822
+ }
4362
4823
  }, requestConfig.url.includes('v2') ? {
4363
4824
  name: 'qp-code-like',
4364
4825
  label: '国际条码'
@@ -4458,8 +4919,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4458
4919
  name: 'qp-name-like',
4459
4920
  label: 'SKU名称'
4460
4921
  }, {
4461
- name: 'qp-skuCode-like',
4462
- label: 'SKU编码'
4922
+ name: 'qp-skuCode-in',
4923
+ label: 'SKU编码',
4924
+ field: {
4925
+ type: 'multipleQueryInput',
4926
+ props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
4927
+ }
4463
4928
  }, {
4464
4929
  name: 'qp-barCode-like',
4465
4930
  label: '国际条码'
@@ -4536,7 +5001,8 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4536
5001
  }];
4537
5002
  Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
4538
5003
  pageSize: 5000,
4539
- currentPage: 1
5004
+ currentPage: 1,
5005
+ 'ctl-withAuth': true
4540
5006
  }), loadSelectSource("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
4541
5007
  pageSize: 5000,
4542
5008
  currentPage: 1
@@ -4698,7 +5164,8 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4698
5164
  }];
4699
5165
  Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
4700
5166
  pageSize: 5000,
4701
- currentPage: 1
5167
+ currentPage: 1,
5168
+ 'ctl-withAuth': true
4702
5169
  }), loadSelectSource("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
4703
5170
  pageSize: 5000,
4704
5171
  currentPage: 1
@@ -4907,6 +5374,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4907
5374
  mappingTextField: 'name',
4908
5375
  mappingValueField: 'code',
4909
5376
  otherParams: {
5377
+ 'qp-status-eq': 10,
4910
5378
  sorter: 'desc-id'
4911
5379
  },
4912
5380
  sourceName: 'customCode'
@@ -5262,6 +5730,83 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
5262
5730
  dataIndex: 'accountingName'
5263
5731
  }]
5264
5732
  }, modalTableBusProps);
5733
+ }
5734
+
5735
+ if (type === 'shopFile2') {
5736
+ var _JSON$parse, _JSON$parse$employeeR;
5737
+
5738
+ requestConfig = _objectSpread2({
5739
+ url: "".concat(prefixUrl.selectPrefix, "/store/page"),
5740
+ filter: 'qp-name,code-orGroup,like',
5741
+ mappingTextField: 'name',
5742
+ mappingValueField: 'code',
5743
+ otherParams: {
5744
+ sorter: 'desc-id'
5745
+ },
5746
+ sourceName: 'code'
5747
+ }, requestConfigProp);
5748
+ tableSearchForm = [{
5749
+ name: 'qp-name-like',
5750
+ label: '商店名称'
5751
+ }, {
5752
+ name: 'qp-code-like',
5753
+ label: '商店编码'
5754
+ }, {
5755
+ name: 'qp-type-in',
5756
+ type: 'select',
5757
+ label: '商店类型',
5758
+ initialSource: shopFile2Type
5759
+ }, {
5760
+ name: 'qp-orgCode-in',
5761
+ type: 'select',
5762
+ label: '所属销售组织',
5763
+ field: {
5764
+ type: 'select',
5765
+ props: {
5766
+ mode: 'multiple',
5767
+ notFoundContent: '暂无数据',
5768
+ allowClear: true,
5769
+ showSearch: true,
5770
+ showArrow: true,
5771
+ maxTagCount: 1,
5772
+ optionFilterProp: 'children',
5773
+ filterOption: function filterOption(input, option) {
5774
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
5775
+ }
5776
+ }
5777
+ }
5778
+ }];
5779
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
5780
+ '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,
5781
+ 'qp-realOrg-eq': true,
5782
+ 'qp-status-eq': 10
5783
+ })]).then(function (x) {
5784
+ formatSource(x, 0, 3, tableSearchForm);
5785
+ });
5786
+ modalTableProps = _objectSpread2({
5787
+ modalTableTitle: '选择商店',
5788
+ tableSearchForm: tableSearchForm,
5789
+ tableColumns: [{
5790
+ title: '商店编码',
5791
+ dataIndex: 'code'
5792
+ }, {
5793
+ title: '商店名称',
5794
+ dataIndex: 'name'
5795
+ }, {
5796
+ title: '商店类型',
5797
+ dataIndex: 'type',
5798
+ render: function render(text) {
5799
+ var _shopFile2Type$find;
5800
+
5801
+ return (_shopFile2Type$find = shopFile2Type.find(function (i) {
5802
+ return i.value === text;
5803
+ })) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
5804
+ }
5805
+ }, {
5806
+ title: '所属销售组织',
5807
+ dataIndex: 'orgName'
5808
+ }]
5809
+ }, modalTableBusProps);
5265
5810
  } // 核算主体选择器(无弹窗)
5266
5811
 
5267
5812
 
@@ -5589,8 +6134,8 @@ var MemoSearchSelect = /*#__PURE__*/React__default['default'].memo(SearchSelect)
5589
6134
  var BusinessSearchSelect = function BusinessSearchSelect(props) {
5590
6135
  var businessType = (props === null || props === void 0 ? void 0 : props.selectBusinessType) || 'supplier';
5591
6136
  var prefixUrl = (props === null || props === void 0 ? void 0 : props.prefixUrl) || {
5592
- selectPrefix: '/bop/api',
5593
- formSelectFix: '/bop/api'
6137
+ selectPrefix: handleDefaultPrefixUrl(businessType),
6138
+ formSelectFix: handleDefaultPrefixUrl(businessType)
5594
6139
  };
5595
6140
 
5596
6141
  var _commonFun = commonFun(businessType, prefixUrl, (props === null || props === void 0 ? void 0 : props.requestConfig) || {}, (props === null || props === void 0 ? void 0 : props.modalTableProps) || {}),
@@ -5631,7 +6176,7 @@ var CommodityEntry = function CommodityEntry(props) {
5631
6176
  _props$columns = props.columns,
5632
6177
  columns = _props$columns === void 0 ? ["skuCode", "quantity", "price"] : _props$columns,
5633
6178
  _props$validDataUrl = props.validDataUrl,
5634
- validDataUrl = _props$validDataUrl === void 0 ? "/bop/api/recordDetailImport/check" : _props$validDataUrl;
6179
+ validDataUrl = _props$validDataUrl === void 0 ? "/items/api/recordDetailImport/check" : _props$validDataUrl;
5635
6180
 
5636
6181
  var _useState = React.useState({
5637
6182
  maskClosable: false,
@@ -5754,6 +6299,321 @@ function getStorageVale(storageKeyString) {
5754
6299
  return "";
5755
6300
  }
5756
6301
 
6302
+ var TreeSearchSelect = function TreeSearchSelect(props) {
6303
+ var _useState = React.useState([]),
6304
+ _useState2 = _slicedToArray(_useState, 2),
6305
+ treeData = _useState2[0],
6306
+ setTreeData = _useState2[1];
6307
+
6308
+ var ctx = props.ctx,
6309
+ value = props.value,
6310
+ valueName = props.valueName,
6311
+ onChange = props.onChange,
6312
+ onChangeName = props.onChangeName,
6313
+ placeholder = props.placeholder,
6314
+ remoteSource = props.remoteSource,
6315
+ initialValue = props.initialValue,
6316
+ _props$treeCheckable = props.treeCheckable,
6317
+ treeCheckable = _props$treeCheckable === void 0 ? false : _props$treeCheckable,
6318
+ _props$showSearch = props.showSearch,
6319
+ showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
6320
+ _props$maxTagCount = props.maxTagCount,
6321
+ maxTagCount = _props$maxTagCount === void 0 ? 1 : _props$maxTagCount,
6322
+ _props$multiple = props.multiple,
6323
+ multiple = _props$multiple === void 0 ? false : _props$multiple,
6324
+ _props$isChoose = props.isChoose,
6325
+ isChoose = _props$isChoose === void 0 ? false : _props$isChoose,
6326
+ mode = props.mode,
6327
+ _getPopupContainer = props.getPopupContainer,
6328
+ _props$labelInValue = props.labelInValue,
6329
+ labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
6330
+ _props$showArrow = props.showArrow,
6331
+ showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
6332
+ _props$allowClear = props.allowClear,
6333
+ allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
6334
+ _props$showCheckedStr = props.showCheckedStrategy,
6335
+ showCheckedStrategy = _props$showCheckedStr === void 0 ? antd.TreeSelect.SHOW_PARENT : _props$showCheckedStr,
6336
+ _props$style = props.style,
6337
+ style = _props$style === void 0 ? {
6338
+ width: '100%'
6339
+ } : _props$style,
6340
+ getTreeData = props.getTreeData;
6341
+ var url = remoteSource.url,
6342
+ _remoteSource$paramsK = remoteSource.paramsKey,
6343
+ paramsKey = _remoteSource$paramsK === void 0 ? 'qp-name-like' : _remoteSource$paramsK,
6344
+ _remoteSource$resKeyV = remoteSource.resKeyValue,
6345
+ resKeyValue = _remoteSource$resKeyV === void 0 ? ['id', 'name'] : _remoteSource$resKeyV,
6346
+ _remoteSource$initial = remoteSource.initialParams,
6347
+ initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial;
6348
+
6349
+ var mapSearchTree = function mapSearchTree(treeDataItem) {
6350
+ var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
6351
+ return {
6352
+ title: treeDataItem[resKeyValue[1]],
6353
+ key: treeDataItem[resKeyValue[0]],
6354
+ value: treeDataItem[resKeyValue[0]],
6355
+ parentId: treeDataItem.parent,
6356
+ data: _objectSpread2({}, treeDataItem),
6357
+ isLeaf: !haveChildren,
6358
+ disabled: isDisabled(haveChildren),
6359
+ children: haveChildren ? treeDataItem.children.map(function (i) {
6360
+ return mapSearchTree(i);
6361
+ }) : []
6362
+ };
6363
+ };
6364
+
6365
+ var isDisabled = function isDisabled(children) {
6366
+ if (isChoose) {
6367
+ return false;
6368
+ }
6369
+
6370
+ return children;
6371
+ };
6372
+ /* 实时查询 但是目前用的直接是完整数据源, 所以没有使用 */
6373
+
6374
+
6375
+ var handleSearch = function handleSearch(q) {
6376
+ var paramsData = _objectSpread2(_defineProperty({}, "".concat(paramsKey), q), initialParams);
6377
+
6378
+ axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(paramsData))).then( /*#__PURE__*/function () {
6379
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
6380
+ var _ctx$form;
6381
+
6382
+ var resData, coverData, data, dataList;
6383
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
6384
+ while (1) {
6385
+ switch (_context.prev = _context.next) {
6386
+ case 0:
6387
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
6388
+
6389
+ if (!(resData.status === '0')) {
6390
+ _context.next = 13;
6391
+ break;
6392
+ }
6393
+
6394
+ data = resData.data;
6395
+
6396
+ if (!remoteSource.converter) {
6397
+ _context.next = 9;
6398
+ break;
6399
+ }
6400
+
6401
+ _context.next = 6;
6402
+ return remoteSource.converter({
6403
+ data: [data]
6404
+ });
6405
+
6406
+ case 6:
6407
+ coverData = _context.sent;
6408
+ _context.next = 11;
6409
+ break;
6410
+
6411
+ case 9:
6412
+ dataList = data && Array.isArray(data) ? data : data && [data] || [];
6413
+ coverData = dataList.length && dataList.map(function (ites) {
6414
+ return mapSearchTree(ites);
6415
+ }) || [];
6416
+
6417
+ case 11:
6418
+ _context.next = 14;
6419
+ break;
6420
+
6421
+ case 13:
6422
+ coverData = [];
6423
+
6424
+ case 14:
6425
+ setTreeData(coverData);
6426
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
6427
+
6428
+ case 16:
6429
+ case "end":
6430
+ return _context.stop();
6431
+ }
6432
+ }
6433
+ }, _callee);
6434
+ }));
6435
+
6436
+ return function (_x) {
6437
+ return _ref.apply(this, arguments);
6438
+ };
6439
+ }());
6440
+ };
6441
+
6442
+ var handleChange = function handleChange(data, dataName) {
6443
+ var _ctx$form2;
6444
+
6445
+ onChange(data);
6446
+ onChangeName && onChangeName(dataName);
6447
+ getTreeData && getTreeData(treeData); // 把树节点暴露出去
6448
+
6449
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(ctx.name, data);
6450
+ };
6451
+
6452
+ React.useEffect(function () {
6453
+ handleSearch(initialValue);
6454
+ }, []);
6455
+
6456
+ var maxTagPlaceholder = function maxTagPlaceholder(selectedValues) {
6457
+ var _onClose = function onClose(e, item) {
6458
+ e.preventDefault();
6459
+ var newValue = labelInValue ? JSON.parse(JSON.stringify(value)).filter(function (i) {
6460
+ return i.value !== item.value;
6461
+ }) : JSON.parse(JSON.stringify(value)).filter(function (i) {
6462
+ return i !== item.value;
6463
+ });
6464
+ var newValueName = labelInValue ? null : JSON.parse(JSON.stringify(valueName)).filter(function (i) {
6465
+ return i !== item.label;
6466
+ });
6467
+ handleChange(newValue, newValueName);
6468
+ };
6469
+
6470
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
6471
+ title: selectedValues.map(function (i) {
6472
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tag, {
6473
+ closable: true,
6474
+ onClose: function onClose(e) {
6475
+ return _onClose(e, i);
6476
+ },
6477
+ style: {
6478
+ marginRight: 3,
6479
+ background: '#f5f5f5',
6480
+ height: '24px',
6481
+ border: '1px solid #f0f0f0'
6482
+ }
6483
+ }, i.label);
6484
+ })
6485
+ }, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
6486
+ };
6487
+
6488
+ return /*#__PURE__*/React__default['default'].createElement("div", {
6489
+ className: 'tree_search_select'
6490
+ }, /*#__PURE__*/React__default['default'].createElement(antd.TreeSelect, {
6491
+ treeCheckable: treeCheckable,
6492
+ maxTagCount: maxTagCount,
6493
+ showSearch: showSearch,
6494
+ style: style,
6495
+ value: value,
6496
+ dropdownStyle: {
6497
+ maxHeight: 400,
6498
+ maxWidth: 100,
6499
+ overflow: 'auto'
6500
+ },
6501
+ treeData: treeData,
6502
+ placeholder: placeholder,
6503
+ allowClear: allowClear,
6504
+ labelInValue: labelInValue,
6505
+ showArrow: showArrow,
6506
+ showCheckedStrategy: showCheckedStrategy,
6507
+ treeNodeFilterProp: 'title',
6508
+ treeDefaultExpandAll: true,
6509
+ multiple: multiple,
6510
+ maxTagPlaceholder: maxTagPlaceholder,
6511
+ onChange: handleChange,
6512
+ disabled: mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
6513
+ getPopupContainer: function getPopupContainer() {
6514
+ return _getPopupContainer && _getPopupContainer() || document.body;
6515
+ }
6516
+ }));
6517
+ };
6518
+
6519
+ var handleDefaultProps = function handleDefaultProps(type) {
6520
+ var result = {};
6521
+
6522
+ switch (type) {
6523
+ case 'department':
6524
+ result = {
6525
+ treeCheckable: true,
6526
+ isChoose: true,
6527
+ remoteSource: {
6528
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6529
+ initialParams: {
6530
+ 'orgViewCode': 'administrative-organization-view'
6531
+ },
6532
+ resKeyValue: ['code', 'name']
6533
+ }
6534
+ };
6535
+ break;
6536
+
6537
+ case 'sales-organization':
6538
+ result = {
6539
+ isChoose: true,
6540
+ remoteSource: {
6541
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6542
+ initialParams: {
6543
+ 'orgViewCode': 'sales-organizational-view'
6544
+ },
6545
+ resKeyValue: ['code', 'name']
6546
+ }
6547
+ };
6548
+ break;
6549
+
6550
+ case 'purchase-organization':
6551
+ result = {
6552
+ isChoose: true,
6553
+ remoteSource: {
6554
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6555
+ initialParams: {
6556
+ 'orgViewCode': 'purchase-organizational-view'
6557
+ },
6558
+ resKeyValue: ['code', 'name']
6559
+ }
6560
+ };
6561
+ break;
6562
+
6563
+ case 'stock-organization':
6564
+ result = {
6565
+ isChoose: true,
6566
+ remoteSource: {
6567
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6568
+ initialParams: {
6569
+ 'orgViewCode': 'stock-organizational-view'
6570
+ },
6571
+ resKeyValue: ['code', 'name']
6572
+ }
6573
+ };
6574
+ break;
6575
+
6576
+ default:
6577
+ result = {
6578
+ treeCheckable: true,
6579
+ isChoose: true,
6580
+ remoteSource: {
6581
+ url: "/user/orgViewNode/common/getTreeForOrgViewAndTenant",
6582
+ initialParams: {
6583
+ 'orgViewCode': 'administrative-organization-view'
6584
+ },
6585
+ resKeyValue: ['code', 'name']
6586
+ }
6587
+ };
6588
+ break;
6589
+ }
6590
+
6591
+ return result;
6592
+ };
6593
+
6594
+ var MemoTreeSearchSelect = /*#__PURE__*/React__default['default'].memo(TreeSearchSelect);
6595
+
6596
+ var BusinessTreeSearchSelect = function BusinessTreeSearchSelect(props) {
6597
+ var businessType = (props === null || props === void 0 ? void 0 : props.businessType) || 'department';
6598
+ var handleBusinessProps = handleDefaultProps(businessType);
6599
+ var currentProps = React.useMemo(function () {
6600
+ return _objectSpread2(_objectSpread2({}, handleBusinessProps), props);
6601
+ }, [props === null || props === void 0 ? void 0 : props.value]);
6602
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(MemoTreeSearchSelect, _objectSpread2({}, currentProps)));
6603
+ };
6604
+
6605
+ var index$1 = /*#__PURE__*/React__default['default'].memo(BusinessTreeSearchSelect, function (props, nextProps) {
6606
+ if (props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
6607
+ return false;
6608
+ }
6609
+
6610
+ if (props && props.value !== nextProps.value) {
6611
+ return false;
6612
+ }
6613
+
6614
+ return true;
6615
+ });
6616
+
5757
6617
  /*
5758
6618
  * @Description:
5759
6619
  * @Author: rodchen
@@ -5764,11 +6624,19 @@ function getStorageVale(storageKeyString) {
5764
6624
 
5765
6625
  var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
5766
6626
  axios__default['default'].defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
6627
+ axios__default['default'].defaults.headers.common['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
6628
+
6629
+ if (localStorage.getItem('x-user-auth-context')) {
6630
+ // @ts-ignore
6631
+ axios__default['default'].defaults.headers.common['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
6632
+ }
5767
6633
 
5768
6634
  exports.BusinessSearchSelect = BusinessSearchSelect$1;
6635
+ exports.BusinessTreeSearchSelect = index$1;
5769
6636
  exports.CheckOneUser = index;
5770
6637
  exports.CommodityEntry = CommodityEntry;
5771
- exports.DataImport = DataValidation$1;
6638
+ exports.DataImport = DataImport;
5772
6639
  exports.DataValidation = DataValidation;
5773
6640
  exports.QueryMutipleInput = QueryMutipleInput;
5774
6641
  exports.SearchSelect = SearchSelect;
6642
+ exports.TreeSearchSelect = TreeSearchSelect;