@bit-sun/business-component 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -34,6 +34,351 @@ function _objectSpread2(target) {
34
34
  return target;
35
35
  }
36
36
 
37
+ function _regeneratorRuntime() {
38
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
39
+
40
+ _regeneratorRuntime = function () {
41
+ return exports;
42
+ };
43
+
44
+ var exports = {},
45
+ Op = Object.prototype,
46
+ hasOwn = Op.hasOwnProperty,
47
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
48
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
49
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
50
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
51
+
52
+ function define(obj, key, value) {
53
+ return Object.defineProperty(obj, key, {
54
+ value: value,
55
+ enumerable: !0,
56
+ configurable: !0,
57
+ writable: !0
58
+ }), obj[key];
59
+ }
60
+
61
+ try {
62
+ define({}, "");
63
+ } catch (err) {
64
+ define = function (obj, key, value) {
65
+ return obj[key] = value;
66
+ };
67
+ }
68
+
69
+ function wrap(innerFn, outerFn, self, tryLocsList) {
70
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
71
+ generator = Object.create(protoGenerator.prototype),
72
+ context = new Context(tryLocsList || []);
73
+ return generator._invoke = function (innerFn, self, context) {
74
+ var state = "suspendedStart";
75
+ return function (method, arg) {
76
+ if ("executing" === state) throw new Error("Generator is already running");
77
+
78
+ if ("completed" === state) {
79
+ if ("throw" === method) throw arg;
80
+ return doneResult();
81
+ }
82
+
83
+ for (context.method = method, context.arg = arg;;) {
84
+ var delegate = context.delegate;
85
+
86
+ if (delegate) {
87
+ var delegateResult = maybeInvokeDelegate(delegate, context);
88
+
89
+ if (delegateResult) {
90
+ if (delegateResult === ContinueSentinel) continue;
91
+ return delegateResult;
92
+ }
93
+ }
94
+
95
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
96
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
97
+ context.dispatchException(context.arg);
98
+ } else "return" === context.method && context.abrupt("return", context.arg);
99
+ state = "executing";
100
+ var record = tryCatch(innerFn, self, context);
101
+
102
+ if ("normal" === record.type) {
103
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
104
+ return {
105
+ value: record.arg,
106
+ done: context.done
107
+ };
108
+ }
109
+
110
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
111
+ }
112
+ };
113
+ }(innerFn, self, context), generator;
114
+ }
115
+
116
+ function tryCatch(fn, obj, arg) {
117
+ try {
118
+ return {
119
+ type: "normal",
120
+ arg: fn.call(obj, arg)
121
+ };
122
+ } catch (err) {
123
+ return {
124
+ type: "throw",
125
+ arg: err
126
+ };
127
+ }
128
+ }
129
+
130
+ exports.wrap = wrap;
131
+ var ContinueSentinel = {};
132
+
133
+ function Generator() {}
134
+
135
+ function GeneratorFunction() {}
136
+
137
+ function GeneratorFunctionPrototype() {}
138
+
139
+ var IteratorPrototype = {};
140
+ define(IteratorPrototype, iteratorSymbol, function () {
141
+ return this;
142
+ });
143
+ var getProto = Object.getPrototypeOf,
144
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
145
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
146
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
147
+
148
+ function defineIteratorMethods(prototype) {
149
+ ["next", "throw", "return"].forEach(function (method) {
150
+ define(prototype, method, function (arg) {
151
+ return this._invoke(method, arg);
152
+ });
153
+ });
154
+ }
155
+
156
+ function AsyncIterator(generator, PromiseImpl) {
157
+ function invoke(method, arg, resolve, reject) {
158
+ var record = tryCatch(generator[method], generator, arg);
159
+
160
+ if ("throw" !== record.type) {
161
+ var result = record.arg,
162
+ value = result.value;
163
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
164
+ invoke("next", value, resolve, reject);
165
+ }, function (err) {
166
+ invoke("throw", err, resolve, reject);
167
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
168
+ result.value = unwrapped, resolve(result);
169
+ }, function (error) {
170
+ return invoke("throw", error, resolve, reject);
171
+ });
172
+ }
173
+
174
+ reject(record.arg);
175
+ }
176
+
177
+ var previousPromise;
178
+
179
+ this._invoke = function (method, arg) {
180
+ function callInvokeWithMethodAndArg() {
181
+ return new PromiseImpl(function (resolve, reject) {
182
+ invoke(method, arg, resolve, reject);
183
+ });
184
+ }
185
+
186
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
187
+ };
188
+ }
189
+
190
+ function maybeInvokeDelegate(delegate, context) {
191
+ var method = delegate.iterator[context.method];
192
+
193
+ if (undefined === method) {
194
+ if (context.delegate = null, "throw" === context.method) {
195
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
196
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
197
+ }
198
+
199
+ return ContinueSentinel;
200
+ }
201
+
202
+ var record = tryCatch(method, delegate.iterator, context.arg);
203
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
204
+ var info = record.arg;
205
+ 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);
206
+ }
207
+
208
+ function pushTryEntry(locs) {
209
+ var entry = {
210
+ tryLoc: locs[0]
211
+ };
212
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
213
+ }
214
+
215
+ function resetTryEntry(entry) {
216
+ var record = entry.completion || {};
217
+ record.type = "normal", delete record.arg, entry.completion = record;
218
+ }
219
+
220
+ function Context(tryLocsList) {
221
+ this.tryEntries = [{
222
+ tryLoc: "root"
223
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
224
+ }
225
+
226
+ function values(iterable) {
227
+ if (iterable) {
228
+ var iteratorMethod = iterable[iteratorSymbol];
229
+ if (iteratorMethod) return iteratorMethod.call(iterable);
230
+ if ("function" == typeof iterable.next) return iterable;
231
+
232
+ if (!isNaN(iterable.length)) {
233
+ var i = -1,
234
+ next = function next() {
235
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
236
+
237
+ return next.value = undefined, next.done = !0, next;
238
+ };
239
+
240
+ return next.next = next;
241
+ }
242
+ }
243
+
244
+ return {
245
+ next: doneResult
246
+ };
247
+ }
248
+
249
+ function doneResult() {
250
+ return {
251
+ value: undefined,
252
+ done: !0
253
+ };
254
+ }
255
+
256
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
257
+ var ctor = "function" == typeof genFun && genFun.constructor;
258
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
259
+ }, exports.mark = function (genFun) {
260
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
261
+ }, exports.awrap = function (arg) {
262
+ return {
263
+ __await: arg
264
+ };
265
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
266
+ return this;
267
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
268
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
269
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
270
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
271
+ return result.done ? result.value : iter.next();
272
+ });
273
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
274
+ return this;
275
+ }), define(Gp, "toString", function () {
276
+ return "[object Generator]";
277
+ }), exports.keys = function (object) {
278
+ var keys = [];
279
+
280
+ for (var key in object) keys.push(key);
281
+
282
+ return keys.reverse(), function next() {
283
+ for (; keys.length;) {
284
+ var key = keys.pop();
285
+ if (key in object) return next.value = key, next.done = !1, next;
286
+ }
287
+
288
+ return next.done = !0, next;
289
+ };
290
+ }, exports.values = values, Context.prototype = {
291
+ constructor: Context,
292
+ reset: function (skipTempReset) {
293
+ 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);
294
+ },
295
+ stop: function () {
296
+ this.done = !0;
297
+ var rootRecord = this.tryEntries[0].completion;
298
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
299
+ return this.rval;
300
+ },
301
+ dispatchException: function (exception) {
302
+ if (this.done) throw exception;
303
+ var context = this;
304
+
305
+ function handle(loc, caught) {
306
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
307
+ }
308
+
309
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
310
+ var entry = this.tryEntries[i],
311
+ record = entry.completion;
312
+ if ("root" === entry.tryLoc) return handle("end");
313
+
314
+ if (entry.tryLoc <= this.prev) {
315
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
316
+ hasFinally = hasOwn.call(entry, "finallyLoc");
317
+
318
+ if (hasCatch && hasFinally) {
319
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
320
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
321
+ } else if (hasCatch) {
322
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
323
+ } else {
324
+ if (!hasFinally) throw new Error("try statement without catch or finally");
325
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
326
+ }
327
+ }
328
+ }
329
+ },
330
+ abrupt: function (type, arg) {
331
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
332
+ var entry = this.tryEntries[i];
333
+
334
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
335
+ var finallyEntry = entry;
336
+ break;
337
+ }
338
+ }
339
+
340
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
341
+ var record = finallyEntry ? finallyEntry.completion : {};
342
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
343
+ },
344
+ complete: function (record, afterLoc) {
345
+ if ("throw" === record.type) throw record.arg;
346
+ 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;
347
+ },
348
+ finish: function (finallyLoc) {
349
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
350
+ var entry = this.tryEntries[i];
351
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
352
+ }
353
+ },
354
+ catch: function (tryLoc) {
355
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
356
+ var entry = this.tryEntries[i];
357
+
358
+ if (entry.tryLoc === tryLoc) {
359
+ var record = entry.completion;
360
+
361
+ if ("throw" === record.type) {
362
+ var thrown = record.arg;
363
+ resetTryEntry(entry);
364
+ }
365
+
366
+ return thrown;
367
+ }
368
+ }
369
+
370
+ throw new Error("illegal catch attempt");
371
+ },
372
+ delegateYield: function (iterable, resultName, nextLoc) {
373
+ return this.delegate = {
374
+ iterator: values(iterable),
375
+ resultName: resultName,
376
+ nextLoc: nextLoc
377
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
378
+ }
379
+ }, exports;
380
+ }
381
+
37
382
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
38
383
  try {
39
384
  var info = gen[key](arg);
@@ -129,18 +474,17 @@ function _inherits(subClass, superClass) {
129
474
  }
130
475
 
131
476
  function _getPrototypeOf(o) {
132
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
477
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
133
478
  return o.__proto__ || Object.getPrototypeOf(o);
134
479
  };
135
480
  return _getPrototypeOf(o);
136
481
  }
137
482
 
138
483
  function _setPrototypeOf(o, p) {
139
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
484
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
140
485
  o.__proto__ = p;
141
486
  return o;
142
487
  };
143
-
144
488
  return _setPrototypeOf(o, p);
145
489
  }
146
490
 
@@ -331,10 +675,9 @@ function ownKeys$1(object, enumerableOnly) {
331
675
 
332
676
  if (Object.getOwnPropertySymbols) {
333
677
  var symbols = Object.getOwnPropertySymbols(object);
334
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
678
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
335
679
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
336
- });
337
- keys.push.apply(keys, symbols);
680
+ })), keys.push.apply(keys, symbols);
338
681
  }
339
682
 
340
683
  return keys;
@@ -342,19 +685,12 @@ function ownKeys$1(object, enumerableOnly) {
342
685
 
343
686
  function _objectSpread2$1(target) {
344
687
  for (var i = 1; i < arguments.length; i++) {
345
- var source = arguments[i] != null ? arguments[i] : {};
346
-
347
- if (i % 2) {
348
- ownKeys$1(Object(source), true).forEach(function (key) {
349
- _defineProperty$1(target, key, source[key]);
350
- });
351
- } else if (Object.getOwnPropertyDescriptors) {
352
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
353
- } else {
354
- ownKeys$1(Object(source)).forEach(function (key) {
355
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
356
- });
357
- }
688
+ var source = null != arguments[i] ? arguments[i] : {};
689
+ i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
690
+ _defineProperty$1(target, key, source[key]);
691
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
692
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
693
+ });
358
694
  }
359
695
 
360
696
  return target;
@@ -365,14 +701,17 @@ function _arrayWithHoles$1(arr) {
365
701
  }
366
702
 
367
703
  function _iterableToArrayLimit$1(arr, i) {
368
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
704
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
705
+
706
+ if (_i == null) return;
369
707
  var _arr = [];
370
708
  var _n = true;
371
709
  var _d = false;
372
- var _e = undefined;
710
+
711
+ var _s, _e;
373
712
 
374
713
  try {
375
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
714
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
376
715
  _arr.push(_s.value);
377
716
 
378
717
  if (i && _arr.length === i) break;
@@ -455,17 +794,11 @@ function _objectWithoutProperties$1(source, excluded) {
455
794
  function _typeof(obj) {
456
795
  "@babel/helpers - typeof";
457
796
 
458
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
459
- _typeof = function _typeof(obj) {
460
- return typeof obj;
461
- };
462
- } else {
463
- _typeof = function _typeof(obj) {
464
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
465
- };
466
- }
467
-
468
- return _typeof(obj);
797
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
798
+ return typeof obj;
799
+ } : function (obj) {
800
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
801
+ }, _typeof(obj);
469
802
  }
470
803
 
471
804
  /**
@@ -3209,7 +3542,6 @@ var SearchSelect = function SearchSelect(props) {
3209
3542
  } // 防抖函数 待定
3210
3543
 
3211
3544
 
3212
- // 防抖函数 待定
3213
3545
  getData(searchParams);
3214
3546
  }, {
3215
3547
  wait: 1000
@@ -4242,7 +4574,6 @@ var AddSelect = function AddSelect(props) {
4242
4574
  } // 防抖函数 待定
4243
4575
 
4244
4576
 
4245
- // 防抖函数 待定
4246
4577
  getData(searchParams);
4247
4578
  }, {
4248
4579
  wait: 1000
@@ -5403,12 +5734,12 @@ var InputElement = function InputElement(_ref) {
5403
5734
  message.success('删除当前行');
5404
5735
  e.stopPropagation();
5405
5736
  e.preventDefault();
5406
- var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[3].children[index - 1]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path$.getElementsByTagName('input')[currentIndex];
5737
+ var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path$.getElementsByTagName('input')[currentIndex];
5407
5738
 
5408
5739
  if (dom) {
5409
5740
  dom.select();
5410
5741
  dom.focus();
5411
- dom.scrollIntoView(false);
5742
+ dom.scrollIntoViewIfNeeded(false);
5412
5743
  }
5413
5744
 
5414
5745
  dom = null;
@@ -5436,14 +5767,14 @@ var InputElement = function InputElement(_ref) {
5436
5767
  e.stopPropagation();
5437
5768
  e.preventDefault();
5438
5769
 
5439
- var _dom2 = (_e$nativeEvent$path$2 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$2 === void 0 ? void 0 : _e$nativeEvent$path$2.getElementsByTagName('input')[currentIndex - 1];
5770
+ var _dom2 = (_e$nativeEvent$path$2 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$2 === void 0 ? void 0 : _e$nativeEvent$path$2.getElementsByTagName('input')[currentIndex - 1];
5440
5771
 
5441
5772
  if (_dom2) {
5442
5773
  _dom2.select();
5443
5774
 
5444
5775
  _dom2.focus();
5445
5776
 
5446
- _dom2.scrollIntoView(false);
5777
+ _dom2.scrollIntoViewIfNeeded(false);
5447
5778
  }
5448
5779
 
5449
5780
  _dom2 = null;
@@ -5456,14 +5787,14 @@ var InputElement = function InputElement(_ref) {
5456
5787
  e.stopPropagation();
5457
5788
  e.preventDefault();
5458
5789
 
5459
- var _dom3 = (_e$nativeEvent$path$3 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$3 === void 0 ? void 0 : _e$nativeEvent$path$3.getElementsByTagName('input')[currentIndex + 1];
5790
+ var _dom3 = (_e$nativeEvent$path$3 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$3 === void 0 ? void 0 : _e$nativeEvent$path$3.getElementsByTagName('input')[currentIndex + 1];
5460
5791
 
5461
5792
  if (_dom3) {
5462
5793
  _dom3.select();
5463
5794
 
5464
5795
  _dom3.focus();
5465
5796
 
5466
- _dom3.scrollIntoView(false);
5797
+ _dom3.scrollIntoViewIfNeeded(false);
5467
5798
  }
5468
5799
 
5469
5800
  _dom3 = null;
@@ -5473,17 +5804,18 @@ var InputElement = function InputElement(_ref) {
5473
5804
  var _e$nativeEvent$path$4;
5474
5805
 
5475
5806
  // 向下
5807
+ debugger;
5476
5808
  e.stopPropagation();
5477
5809
  e.preventDefault();
5478
5810
 
5479
- var _dom4 = (_e$nativeEvent$path$4 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$4 === void 0 ? void 0 : _e$nativeEvent$path$4.getElementsByTagName('input')[currentIndex];
5811
+ var _dom4 = (_e$nativeEvent$path$4 = e.nativeEvent.path[3].children[index + 2]) === null || _e$nativeEvent$path$4 === void 0 ? void 0 : _e$nativeEvent$path$4.getElementsByTagName('input')[currentIndex];
5480
5812
 
5481
5813
  if (_dom4) {
5482
5814
  _dom4.select();
5483
5815
 
5484
5816
  _dom4.focus();
5485
5817
 
5486
- _dom4.scrollIntoView(false);
5818
+ _dom4.scrollIntoViewIfNeeded(false);
5487
5819
  }
5488
5820
 
5489
5821
  _dom4 = null;
@@ -5492,7 +5824,7 @@ var InputElement = function InputElement(_ref) {
5492
5824
 
5493
5825
  e.stopPropagation();
5494
5826
  e.preventDefault();
5495
- var dom1 = (_e$nativeEvent$path$5 = e.nativeEvent.path[3].children[index - 1]) === null || _e$nativeEvent$path$5 === void 0 ? void 0 : _e$nativeEvent$path$5.getElementsByTagName('input')[currentIndex];
5827
+ var dom1 = (_e$nativeEvent$path$5 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$5 === void 0 ? void 0 : _e$nativeEvent$path$5.getElementsByTagName('input')[currentIndex];
5496
5828
 
5497
5829
  if (dom1) {
5498
5830
  // dom1.value=""
@@ -5527,12 +5859,12 @@ var InputElement = function InputElement(_ref) {
5527
5859
  message.success('删除当前行');
5528
5860
  e.stopPropagation();
5529
5861
  e.preventDefault();
5530
- var dom = (_e$nativeEvent$path$6 = e.nativeEvent.path[5].children[index - 1]) === null || _e$nativeEvent$path$6 === void 0 ? void 0 : _e$nativeEvent$path$6.getElementsByTagName('input')[currentIndex];
5862
+ var dom = (_e$nativeEvent$path$6 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$6 === void 0 ? void 0 : _e$nativeEvent$path$6.getElementsByTagName('input')[currentIndex];
5531
5863
 
5532
5864
  if (dom) {
5533
5865
  dom.select();
5534
5866
  dom.focus();
5535
- dom.scrollIntoView(false);
5867
+ dom.scrollIntoViewIfNeeded(false);
5536
5868
  }
5537
5869
 
5538
5870
  dom = null;
@@ -5548,14 +5880,14 @@ var InputElement = function InputElement(_ref) {
5548
5880
  e.stopPropagation();
5549
5881
  e.preventDefault();
5550
5882
 
5551
- var _dom5 = (_e$nativeEvent$path$7 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$7 === void 0 ? void 0 : _e$nativeEvent$path$7.getElementsByTagName('input')[currentIndex - 1];
5883
+ var _dom5 = (_e$nativeEvent$path$7 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$7 === void 0 ? void 0 : _e$nativeEvent$path$7.getElementsByTagName('input')[currentIndex - 1];
5552
5884
 
5553
5885
  if (_dom5) {
5554
5886
  _dom5.select();
5555
5887
 
5556
5888
  _dom5.focus();
5557
5889
 
5558
- _dom5.scrollIntoView(false);
5890
+ _dom5.scrollIntoViewIfNeeded(false);
5559
5891
  }
5560
5892
 
5561
5893
  _dom5 = null;
@@ -5568,14 +5900,14 @@ var InputElement = function InputElement(_ref) {
5568
5900
  e.stopPropagation();
5569
5901
  e.preventDefault();
5570
5902
 
5571
- var _dom6 = (_e$nativeEvent$path$8 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$8 === void 0 ? void 0 : _e$nativeEvent$path$8.getElementsByTagName('input')[currentIndex + 1];
5903
+ var _dom6 = (_e$nativeEvent$path$8 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$8 === void 0 ? void 0 : _e$nativeEvent$path$8.getElementsByTagName('input')[currentIndex + 1];
5572
5904
 
5573
5905
  if (_dom6) {
5574
5906
  _dom6.select();
5575
5907
 
5576
5908
  _dom6.focus();
5577
5909
 
5578
- _dom6.scrollIntoView(false);
5910
+ _dom6.scrollIntoViewIfNeeded(false);
5579
5911
  }
5580
5912
 
5581
5913
  _dom6 = null;
@@ -5588,14 +5920,14 @@ var InputElement = function InputElement(_ref) {
5588
5920
  e.stopPropagation();
5589
5921
  e.preventDefault();
5590
5922
 
5591
- var _dom7 = (_e$nativeEvent$path$9 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$9 === void 0 ? void 0 : _e$nativeEvent$path$9.getElementsByTagName('input')[currentIndex];
5923
+ var _dom7 = (_e$nativeEvent$path$9 = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$9 === void 0 ? void 0 : _e$nativeEvent$path$9.getElementsByTagName('input')[currentIndex];
5592
5924
 
5593
5925
  if (_dom7) {
5594
5926
  _dom7.select();
5595
5927
 
5596
5928
  _dom7.focus();
5597
5929
 
5598
- _dom7.scrollIntoView(false);
5930
+ _dom7.scrollIntoViewIfNeeded(false);
5599
5931
  }
5600
5932
 
5601
5933
  _dom7 = null;
@@ -5604,7 +5936,7 @@ var InputElement = function InputElement(_ref) {
5604
5936
 
5605
5937
  e.stopPropagation();
5606
5938
  e.preventDefault();
5607
- var dom1 = (_e$nativeEvent$path$10 = e.nativeEvent.path[5].children[index - 1]) === null || _e$nativeEvent$path$10 === void 0 ? void 0 : _e$nativeEvent$path$10.getElementsByTagName('input')[currentIndex];
5939
+ var dom1 = (_e$nativeEvent$path$10 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$10 === void 0 ? void 0 : _e$nativeEvent$path$10.getElementsByTagName('input')[currentIndex];
5608
5940
 
5609
5941
  if (dom1) {
5610
5942
  // dom1.value=""
@@ -5662,27 +5994,36 @@ var BillEntry = function BillEntry(_ref3) {
5662
5994
  });
5663
5995
 
5664
5996
  if (base.length) {
5997
+ var _base$;
5998
+
5665
5999
  baseUnitCode = base[0].unitCode;
5666
6000
  record.selectUnitCode = base[0].unitCode;
6001
+ record.selectedScale = ((_base$ = base[0]) === null || _base$ === void 0 ? void 0 : _base$.baseUnitScale) || 1;
5667
6002
  }
5668
6003
  }
5669
6004
 
5670
- record.packingUnitList = record.packingUnitList || [];
5671
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
5672
- value: record.selectUnitCode,
5673
- onChange: function onChange(value) {
5674
- record.selectUnitCode = value;
5675
- },
5676
- style: {
5677
- width: '60px',
5678
- height: '22px',
5679
- lineHight: '22px'
5680
- }
5681
- }, record.packingUnitList && record.packingUnitList.map(function (item) {
5682
- return /*#__PURE__*/React.createElement(Select.Option, {
5683
- value: item.unitCode
5684
- }, item.name);
5685
- })));
6005
+ if (baseUnitCode) {
6006
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
6007
+ defaultValue: baseUnitCode,
6008
+ onChange: function onChange(value) {
6009
+ var _record$packingUnitLi, _record$packingUnitLi2;
6010
+
6011
+ record.selectUnitCode = value;
6012
+ record.selectedScale = (record === null || record === void 0 ? void 0 : (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi.find(function (item) {
6013
+ return item.unitCode === value;
6014
+ })) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.baseUnitScale) || 1;
6015
+ },
6016
+ style: {
6017
+ width: '60px'
6018
+ }
6019
+ }, record.packingUnitList && record.packingUnitList.map(function (item) {
6020
+ return /*#__PURE__*/React.createElement(Select.Option, {
6021
+ value: item.unitCode
6022
+ }, item.name);
6023
+ })));
6024
+ }
6025
+
6026
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
5686
6027
  }
5687
6028
  }, {
5688
6029
  title: '数量',
@@ -5791,7 +6132,6 @@ var BillEntry = function BillEntry(_ref3) {
5791
6132
  })), [{
5792
6133
  title: '操作',
5793
6134
  width: 50,
5794
- fixed: 'right',
5795
6135
  render: function render(text, record, index) {
5796
6136
  if (index !== 0) {
5797
6137
  return /*#__PURE__*/React.createElement("span", {
@@ -8107,7 +8447,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
8107
8447
  style = _props$style === void 0 ? {
8108
8448
  width: '100%'
8109
8449
  } : _props$style,
8110
- getTreeData = props.getTreeData;
8450
+ getTreeData = props.getTreeData,
8451
+ disabled = props.disabled;
8111
8452
  var url = remoteSource.url,
8112
8453
  _remoteSource$paramsK = remoteSource.paramsKey,
8113
8454
  paramsKey = _remoteSource$paramsK === void 0 ? 'qp-name-like' : _remoteSource$paramsK,
@@ -8146,11 +8487,11 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
8146
8487
  var paramsData = _objectSpread2(_defineProperty({}, "".concat(paramsKey), q), initialParams);
8147
8488
 
8148
8489
  axios.get("".concat(url, "?").concat(stringify(paramsData))).then( /*#__PURE__*/function () {
8149
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(res) {
8490
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
8150
8491
  var _ctx$form;
8151
8492
 
8152
8493
  var resData, coverData, data, dataList;
8153
- return regeneratorRuntime.wrap(function _callee$(_context) {
8494
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8154
8495
  while (1) {
8155
8496
  switch (_context.prev = _context.next) {
8156
8497
  case 0:
@@ -8279,7 +8620,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
8279
8620
  multiple: multiple,
8280
8621
  maxTagPlaceholder: maxTagPlaceholder,
8281
8622
  onChange: handleChange,
8282
- disabled: mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
8623
+ disabled: disabled || mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
8283
8624
  getPopupContainer: function getPopupContainer() {
8284
8625
  return _getPopupContainer && _getPopupContainer() || document.body;
8285
8626
  }