kts-component-invoice-operate 1.2.20 → 1.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +2 -0
  2. package/dist/Invoice/InvoiceController/fns/addGood.d.ts +1 -1
  3. package/dist/Invoice/InvoiceController/fns/addGoodDiscount.d.ts +1 -1
  4. package/dist/Invoice/InvoiceController/fns/delGood.d.ts +1 -1
  5. package/dist/Invoice/InvoiceController/fns/getGoodsSearch.d.ts +2 -0
  6. package/dist/Invoice/InvoiceController/fns/saveEditGood.d.ts +1 -1
  7. package/dist/Invoice/InvoiceController/fns/setEditGood.d.ts +1 -1
  8. package/dist/Invoice/InvoiceController/fns/setGoods.d.ts +1 -1
  9. package/dist/Invoice/InvoiceController/fns/updateInvoiceNo.d.ts +1 -1
  10. package/dist/Invoice/InvoiceController/index.d.ts +3 -0
  11. package/dist/Invoice/_test/buyerNameSearch/index.d.ts +1 -0
  12. package/dist/Invoice/_test/deduction/index.d.ts +1 -0
  13. package/dist/Invoice/_test/draft/index.d.ts +1 -0
  14. package/dist/Invoice/_test/easiest/index.d.ts +1 -0
  15. package/dist/Invoice/_test/endowCode/index.d.ts +1 -0
  16. package/dist/Invoice/_test/goodsMenuExpand/index.d.ts +1 -0
  17. package/dist/Invoice/_test/importBuyer/index.d.ts +1 -0
  18. package/dist/Invoice/_test/importGoods/index.d.ts +1 -0
  19. package/dist/Invoice/_test/invoiceType/index.d.ts +1 -0
  20. package/dist/Invoice/_test/isInvoiceNo/index.d.ts +1 -0
  21. package/dist/Invoice/_test/replaceHead/index.d.ts +1 -0
  22. package/dist/Invoice/_test/retrieveData/index.d.ts +1 -0
  23. package/dist/Invoice/_test/seller/index.d.ts +1 -0
  24. package/dist/Invoice/_test/setDataSource/index.d.ts +1 -0
  25. package/dist/Invoice/_test/unit/index.d.ts +1 -0
  26. package/dist/Invoice/tools/coolingFn/index.d.ts +1 -1
  27. package/dist/Invoice/tools/lazyFn/index.d.ts +1 -1
  28. package/dist/Invoice/ui/Buyer/ui/BuyerNameInput/index.d.ts +1 -0
  29. package/dist/Invoice/ui/Buyer/ui/ImportBuyerButton/index.d.ts +1 -0
  30. package/dist/Invoice/ui/EndowCodeDrawer/index.d.ts +1 -0
  31. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowEditButton/index.d.ts +1 -0
  32. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +1 -0
  33. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -0
  34. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +1 -0
  35. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +1 -0
  36. package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowSaveButton/index.d.ts +1 -0
  37. package/dist/Invoice/ui/GoodsList/hook/useRowSelection/index.d.ts +1 -0
  38. package/dist/Invoice/ui/GoodsList/ui/AddRowButton/index.d.ts +1 -0
  39. package/dist/Invoice/ui/GoodsList/ui/DelRowButton/index.d.ts +1 -0
  40. package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +1 -0
  41. package/dist/Invoice/ui/GoodsList/ui/Search/index.d.ts +3 -0
  42. package/dist/Invoice/ui/GoodsList/ui/Statistics/index.d.ts +1 -0
  43. package/dist/Invoice/ui/GoodsList/ui/TableRow/index.d.ts +1 -0
  44. package/dist/Invoice/ui/GoodsList/ui/TableVirtual/index.d.ts +1 -0
  45. package/dist/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.d.ts +1 -0
  46. package/dist/Invoice/ui/ImportBuyerDrawer/index.d.ts +1 -0
  47. package/dist/Invoice/ui/ImportGoodsDrawer/index.d.ts +1 -0
  48. package/dist/index.esm.js +1074 -522
  49. package/dist/index.js +1074 -522
  50. package/docs/index.md +2 -2
  51. package/docs-dist/404.html +1 -1
  52. package/docs-dist/index.html +1 -1
  53. package/docs-dist/static/magnifier.2b26be6e.svg +1 -0
  54. package/docs-dist/umi.css +2 -2
  55. package/docs-dist/umi.js +1 -1
  56. package/package.json +1 -1
  57. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +5 -2
  58. package/src/Invoice/InvoiceController/fns/addGoodDiscount.ts +4 -3
  59. package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +17 -0
  60. package/src/Invoice/InvoiceController/index.ts +4 -0
  61. package/src/Invoice/ui/EndowCodeDrawer/index.tsx +19 -13
  62. package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +6 -24
  63. package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +17 -4
  64. package/src/Invoice/ui/GoodsList/hook/useRowSelection/index.tsx +34 -8
  65. package/src/Invoice/ui/GoodsList/index.less +41 -33
  66. package/src/Invoice/ui/GoodsList/index.tsx +11 -1
  67. package/src/Invoice/ui/GoodsList/ui/AddDiscountRowButton/index.tsx +6 -16
  68. package/src/Invoice/ui/GoodsList/ui/AddRowButton/index.tsx +5 -2
  69. package/src/Invoice/ui/GoodsList/ui/Search/icon/magnifier.svg +1 -0
  70. package/src/Invoice/ui/GoodsList/ui/Search/index.less +10 -0
  71. package/src/Invoice/ui/GoodsList/ui/Search/index.tsx +47 -0
package/dist/index.esm.js CHANGED
@@ -13,14 +13,9 @@ function ownKeys(object, enumerableOnly) {
13
13
 
14
14
  if (Object.getOwnPropertySymbols) {
15
15
  var symbols = Object.getOwnPropertySymbols(object);
16
-
17
- if (enumerableOnly) {
18
- symbols = symbols.filter(function (sym) {
19
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
20
- });
21
- }
22
-
23
- keys.push.apply(keys, symbols);
16
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
17
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
18
+ })), keys.push.apply(keys, symbols);
24
19
  }
25
20
 
26
21
  return keys;
@@ -28,22 +23,360 @@ function ownKeys(object, enumerableOnly) {
28
23
 
29
24
  function _objectSpread2(target) {
30
25
  for (var i = 1; i < arguments.length; i++) {
31
- var source = arguments[i] != null ? arguments[i] : {};
26
+ var source = null != arguments[i] ? arguments[i] : {};
27
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
28
+ _defineProperty(target, key, source[key]);
29
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
30
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
31
+ });
32
+ }
32
33
 
33
- if (i % 2) {
34
- ownKeys(Object(source), true).forEach(function (key) {
35
- _defineProperty(target, key, source[key]);
36
- });
37
- } else if (Object.getOwnPropertyDescriptors) {
38
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
39
- } else {
40
- ownKeys(Object(source)).forEach(function (key) {
41
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
34
+ return target;
35
+ }
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);
42
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);
43
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
+ };
44
188
  }
45
189
 
46
- return target;
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;
47
380
  }
48
381
 
49
382
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -101,6 +434,9 @@ function _defineProperties(target, props) {
101
434
  function _createClass(Constructor, protoProps, staticProps) {
102
435
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
103
436
  if (staticProps) _defineProperties(Constructor, staticProps);
437
+ Object.defineProperty(Constructor, "prototype", {
438
+ writable: false
439
+ });
104
440
  return Constructor;
105
441
  }
106
442
 
@@ -131,22 +467,24 @@ function _inherits(subClass, superClass) {
131
467
  configurable: true
132
468
  }
133
469
  });
470
+ Object.defineProperty(subClass, "prototype", {
471
+ writable: false
472
+ });
134
473
  if (superClass) _setPrototypeOf(subClass, superClass);
135
474
  }
136
475
 
137
476
  function _getPrototypeOf(o) {
138
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
477
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
139
478
  return o.__proto__ || Object.getPrototypeOf(o);
140
479
  };
141
480
  return _getPrototypeOf(o);
142
481
  }
143
482
 
144
483
  function _setPrototypeOf(o, p) {
145
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
484
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
146
485
  o.__proto__ = p;
147
486
  return o;
148
487
  };
149
-
150
488
  return _setPrototypeOf(o, p);
151
489
  }
152
490
 
@@ -345,12 +683,12 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
345
683
  }, {
346
684
  key: "validateFields",
347
685
  value: function () {
348
- var _validateFields2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
686
+ var _validateFields2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
349
687
  var _this3 = this;
350
688
 
351
689
  var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList;
352
690
 
353
- return regeneratorRuntime.wrap(function _callee$(_context) {
691
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
354
692
  while (1) {
355
693
  switch (_context.prev = _context.next) {
356
694
  case 0:
@@ -479,7 +817,7 @@ var _validateFields = function _validateFields(form) {
479
817
  });
480
818
  };
481
819
 
482
- var ImportGoods = function ImportGoods() {
820
+ var ImportGoods = /*#__PURE__*/_createClass(function ImportGoods() {
483
821
  _classCallCheck(this, ImportGoods);
484
822
 
485
823
  this.columns = [{
@@ -521,8 +859,8 @@ var ImportGoods = function ImportGoods() {
521
859
  this.topExpand = void 0;
522
860
 
523
861
  this.verifyFn = /*#__PURE__*/function () {
524
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(record) {
525
- return regeneratorRuntime.wrap(function _callee$(_context) {
862
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record) {
863
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
526
864
  while (1) {
527
865
  switch (_context.prev = _context.next) {
528
866
  case 0:
@@ -564,7 +902,7 @@ var ImportGoods = function ImportGoods() {
564
902
  return _ref.apply(this, arguments);
565
903
  };
566
904
  }();
567
- };
905
+ });
568
906
 
569
907
  var LineAttributeType;
570
908
 
@@ -576,12 +914,12 @@ var LineAttributeType;
576
914
 
577
915
  var LineAttributeType$1 = LineAttributeType;
578
916
 
579
- var EndowCode = function EndowCode() {
917
+ var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
580
918
  _classCallCheck(this, EndowCode);
581
919
 
582
920
  this.endowcodeGoodIndex = [];
583
- this.getTaxCategoryCodeList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
584
- return regeneratorRuntime.wrap(function _callee$(_context) {
921
+ this.getTaxCategoryCodeList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
922
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
585
923
  while (1) {
586
924
  switch (_context.prev = _context.next) {
587
925
  case 0:
@@ -613,7 +951,7 @@ var EndowCode = function EndowCode() {
613
951
  value: 3
614
952
  }];
615
953
  this.cache = {};
616
- };
954
+ });
617
955
 
618
956
  function draft(value) {
619
957
  if (!value) return true; // isDiscount
@@ -634,7 +972,7 @@ function draft(value) {
634
972
  }
635
973
  }
636
974
 
637
- var GoodsListState = function GoodsListState() {
975
+ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
638
976
  _classCallCheck(this, GoodsListState);
639
977
 
640
978
  this.deduction = 0;
@@ -646,7 +984,8 @@ var GoodsListState = function GoodsListState() {
646
984
  this.form = void 0;
647
985
  this.unitList = [];
648
986
  this.defaultRate = 3;
649
- this.taxRateList = [0, 3, 5, 6, 9, 12];
987
+ this.taxRateList = [0, 3, 5, 6, 9, 13];
988
+ this.searchValue = '';
650
989
  this.goodsList = [];
651
990
  this.goodsMap = new Map();
652
991
  this.goodsMenuExpand = [];
@@ -655,9 +994,9 @@ var GoodsListState = function GoodsListState() {
655
994
  this.endowCode = new EndowCode();
656
995
  this.importGoods = new ImportGoods();
657
996
  this.isVisibleDrawer = false;
658
- };
997
+ });
659
998
 
660
- var BuyerState = function BuyerState() {
999
+ var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
661
1000
  _classCallCheck(this, BuyerState);
662
1001
 
663
1002
  this.columns = [{
@@ -683,8 +1022,8 @@ var BuyerState = function BuyerState() {
683
1022
  }];
684
1023
 
685
1024
  this.onRowClick = /*#__PURE__*/function () {
686
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(record) {
687
- return regeneratorRuntime.wrap(function _callee$(_context) {
1025
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record) {
1026
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
688
1027
  while (1) {
689
1028
  switch (_context.prev = _context.next) {
690
1029
  case 0:
@@ -708,9 +1047,9 @@ var BuyerState = function BuyerState() {
708
1047
  this.isVisibleDrawer = false;
709
1048
  this.topExpand = void 0;
710
1049
  this.autoContainer = void 0;
711
- };
1050
+ });
712
1051
 
713
- var InvoiceControllerState = function InvoiceControllerState() {
1052
+ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControllerState() {
714
1053
  _classCallCheck(this, InvoiceControllerState);
715
1054
 
716
1055
  this.model = 'default';
@@ -718,15 +1057,15 @@ var InvoiceControllerState = function InvoiceControllerState() {
718
1057
  this.invoiceType = '08';
719
1058
  this.buyerState = new BuyerState();
720
1059
  this.goodsListState = new GoodsListState();
721
- };
1060
+ });
722
1061
 
723
1062
  /**
724
1063
  * 设置当前的编辑货物
725
1064
  */
726
1065
  var setEditGood = /*#__PURE__*/(function () {
727
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state, newEditGood) {
1066
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, newEditGood) {
728
1067
  var editGood;
729
- return regeneratorRuntime.wrap(function _callee$(_context) {
1068
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
730
1069
  while (1) {
731
1070
  switch (_context.prev = _context.next) {
732
1071
  case 0:
@@ -758,9 +1097,9 @@ var setEditGood = /*#__PURE__*/(function () {
758
1097
  * 设置单个货物属性
759
1098
  */
760
1099
  var setGoods = /*#__PURE__*/(function () {
761
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state, options) {
1100
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
762
1101
  var goodsList;
763
- return regeneratorRuntime.wrap(function _callee$(_context) {
1102
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
764
1103
  while (1) {
765
1104
  switch (_context.prev = _context.next) {
766
1105
  case 0:
@@ -797,9 +1136,9 @@ var setGoods = /*#__PURE__*/(function () {
797
1136
  */
798
1137
 
799
1138
  var delGood = /*#__PURE__*/(function () {
800
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state, $index) {
1139
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, $index) {
801
1140
  var goods;
802
- return regeneratorRuntime.wrap(function _callee$(_context) {
1141
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
803
1142
  while (1) {
804
1143
  switch (_context.prev = _context.next) {
805
1144
  case 0:
@@ -872,15 +1211,86 @@ var idGenerator = (function () {
872
1211
  return ++id;
873
1212
  });
874
1213
 
1214
+ /** 格式化 保留2位小数 */
1215
+
1216
+ var format2 = function format2(value) {
1217
+ if (value === Infinity) return '';
1218
+ if ("".concat(value) === 'NaN') return '';
1219
+ if (typeof value === 'string') value = parseFloat(value);
1220
+ return parseFloat(value.toFixed(2));
1221
+ };
1222
+ /** 格式化 保留15位数字 */
1223
+
1224
+ var format15 = function format15(value) {
1225
+ if (value === Infinity) return '';
1226
+ if ("".concat(value) === 'NaN') return '';
1227
+ if (typeof value === 'string') value = parseFloat(value);
1228
+ var fractionDigits = 15 - "".concat(value || 0).indexOf('.');
1229
+ return parseFloat(value.toFixed(fractionDigits > 8 ? 8 : fractionDigits));
1230
+ };
1231
+ /**
1232
+ * 金额(含税) = 数量 * 单价(含税)
1233
+ * @param quantity 数量
1234
+ * @param priceIncludeTax 单价(含税)
1235
+ * @returns 金额(含税)
1236
+ */
1237
+
1238
+ function countAmountIncludeTax(quantity, priceIncludeTax) {
1239
+ if (!quantity && quantity !== 0) return undefined;
1240
+ if (!priceIncludeTax && priceIncludeTax !== 0) return undefined;
1241
+ quantity = format15(quantity);
1242
+ priceIncludeTax = format15(priceIncludeTax);
1243
+ return parseFloat(chain$1(bignumber(priceIncludeTax)).multiply(bignumber(quantity)).done().toNumber().toFixed(2)); // return parseFloat(evaluate(`${priceIncludeTax} * ${quantity}`).toFixed(2));
1244
+ }
1245
+ /**
1246
+ * 不含税金额 = 含税金额-税额
1247
+ * @param amountIncludeTax 含税金额
1248
+ * @param taxAmount 税额
1249
+ * @returns 不含税金额
1250
+ */
1251
+
1252
+ function countAmountExcludeTax(amountIncludeTax, taxAmount) {
1253
+ if (!amountIncludeTax && amountIncludeTax !== 0) return undefined;
1254
+ if (!taxAmount && taxAmount !== 0) return undefined;
1255
+ return chain$1(bignumber(amountIncludeTax)).subtract(bignumber(taxAmount)).done().toNumber();
1256
+ }
1257
+ /**
1258
+ * 税额 = (含税金额-扣除额)/(1+税率)*税率
1259
+ * @param amountIncludeTax 含税金额
1260
+ * @param deduction 扣除额
1261
+ * @param taxRate 税率
1262
+ * @returns 税额
1263
+ */
1264
+
1265
+ function countTaxAmount(amountIncludeTax, deduction, taxRate) {
1266
+ if (!amountIncludeTax && amountIncludeTax !== 0) return undefined;
1267
+ if (!deduction && deduction !== 0) return undefined;
1268
+ if (!taxRate && taxRate !== 0) return undefined;
1269
+ var taxRateBu = chain$1(bignumber(taxRate)).divide(bignumber(100)).done();
1270
+ return parseFloat(chain$1(bignumber(amountIncludeTax)).subtract(bignumber(deduction)).divide(chain$1(bignumber(1)).add(taxRateBu).done()).multiply(taxRateBu).done().toNumber().toFixed(2));
1271
+ }
1272
+ /**
1273
+ * 单价 = 金额/数量
1274
+ * @param amount 金额
1275
+ * @param quantity 数量
1276
+ * @returns 单价
1277
+ */
1278
+
1279
+ function countPrice(amount, quantity) {
1280
+ if (!amount && amount !== 0) return undefined;
1281
+ if (!quantity && quantity !== 0) return undefined;
1282
+ return format15(chain$1(bignumber(amount)).divide(bignumber(quantity)).done().toNumber());
1283
+ }
1284
+
875
1285
  /**
876
1286
  * 设置当前的编辑货物
877
1287
  */
878
1288
 
879
1289
  var addGoodDiscount = /*#__PURE__*/(function () {
880
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state, options) {
1290
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
881
1291
  var _options$indexList, indexList, discount, goodsMap, goodsList, discountGroup, amountSum, _loop, t, _ret;
882
1292
 
883
- return regeneratorRuntime.wrap(function _callee$(_context) {
1293
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
884
1294
  while (1) {
885
1295
  switch (_context.prev = _context.next) {
886
1296
  case 0:
@@ -935,7 +1345,7 @@ var addGoodDiscount = /*#__PURE__*/(function () {
935
1345
  amountSum = amountSum.add(bignumber(lineAmountExcludeTax));
936
1346
  /** 金额(含税) lineAmountExcludeTax * (1+${good.taxRate}/100)*/
937
1347
 
938
- lineAmountIncludeTax = chain$1(bignumber(lineAmountExcludeTax)).multiply(chain$1(bignumber(1)).add(taxRate).done()).done().toNumber();
1348
+ lineAmountIncludeTax = format2(chain$1(bignumber(lineAmountExcludeTax)).multiply(chain$1(bignumber(1)).add(taxRate).done()).done().toNumber());
939
1349
  }
940
1350
  /** 税额 */
941
1351
 
@@ -999,8 +1409,8 @@ var addGoodDiscount = /*#__PURE__*/(function () {
999
1409
  */
1000
1410
 
1001
1411
  var addGood = /*#__PURE__*/(function () {
1002
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state, options) {
1003
- return regeneratorRuntime.wrap(function _callee$(_context) {
1412
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
1413
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1004
1414
  while (1) {
1005
1415
  switch (_context.prev = _context.next) {
1006
1416
  case 0:
@@ -1025,9 +1435,9 @@ var addGood = /*#__PURE__*/(function () {
1025
1435
  * 保存正在编辑的货物
1026
1436
  */
1027
1437
  var saveEditGood = /*#__PURE__*/(function () {
1028
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(state) {
1438
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state) {
1029
1439
  var editGood, form;
1030
- return regeneratorRuntime.wrap(function _callee$(_context) {
1440
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1031
1441
  while (1) {
1032
1442
  switch (_context.prev = _context.next) {
1033
1443
  case 0:
@@ -1075,8 +1485,8 @@ var saveEditGood = /*#__PURE__*/(function () {
1075
1485
  var validateFields = function validateFields(form) {
1076
1486
  return new Promise(function (resolve) {
1077
1487
  form.validateFields( /*#__PURE__*/function () {
1078
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(err, values) {
1079
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
1488
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
1489
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1080
1490
  while (1) {
1081
1491
  switch (_context2.prev = _context2.next) {
1082
1492
  case 0:
@@ -1100,6 +1510,23 @@ var validateFields = function validateFields(form) {
1100
1510
  });
1101
1511
  };
1102
1512
 
1513
+ function getGoodsSearch(goodsList, search) {
1514
+ if (!search) return goodsList;
1515
+ return goodsList.filter(function (e) {
1516
+ var _e$itemName$indexOf, _e$itemName, _e$itemModelName$inde, _e$itemModelName;
1517
+
1518
+ if (((_e$itemName$indexOf = (_e$itemName = e.itemName) === null || _e$itemName === void 0 ? void 0 : _e$itemName.indexOf(search)) !== null && _e$itemName$indexOf !== void 0 ? _e$itemName$indexOf : -1) >= 0) {
1519
+ return true;
1520
+ } else if (((_e$itemModelName$inde = (_e$itemModelName = e.itemModelName) === null || _e$itemModelName === void 0 ? void 0 : _e$itemModelName.indexOf(search)) !== null && _e$itemModelName$inde !== void 0 ? _e$itemModelName$inde : -1) >= 0) {
1521
+ return true;
1522
+ } else if ("".concat(e.lineAmountIncludeTax).indexOf(search) >= 0) {
1523
+ return true;
1524
+ } else {
1525
+ return false;
1526
+ }
1527
+ });
1528
+ }
1529
+
1103
1530
  var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
1104
1531
  _inherits(InvoiceController, _InvoiceControllerFor);
1105
1532
 
@@ -1123,18 +1550,19 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
1123
1550
  _this.addGoodDiscount = _this.pipeline(addGoodDiscount);
1124
1551
  _this.getGoodsList = void 0;
1125
1552
  _this.getTaxCategoryCodeList = void 0;
1553
+ _this.getGoodsSearch = getGoodsSearch;
1126
1554
  return _this;
1127
1555
  } // ----------------- 发票头 模块相关 -----------------
1128
1556
 
1129
1557
  /** 更新发票单据编号 */
1130
1558
 
1131
1559
 
1132
- return InvoiceController;
1560
+ return _createClass(InvoiceController);
1133
1561
  }(InvoiceControllerForm);
1134
1562
 
1135
1563
  var _defs, _path, _path2, _path3;
1136
1564
 
1137
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1565
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1138
1566
 
1139
1567
  function SvgAuto(props) {
1140
1568
  return /*#__PURE__*/createElement("svg", _extends({
@@ -1278,8 +1706,8 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
1278
1706
  },
1279
1707
  component: SvgAuto,
1280
1708
  onClick: function () {
1281
- var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
1282
- return regeneratorRuntime.wrap(function _callee$(_context) {
1709
+ var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1710
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1283
1711
  while (1) {
1284
1712
  switch (_context.prev = _context.next) {
1285
1713
  case 0:
@@ -1601,6 +2029,11 @@ var AddRowButton = (function () {
1601
2029
  var goodsNum = controller.useMemo(function (s) {
1602
2030
  return s.goodsListState.goodsList.length;
1603
2031
  }, []);
2032
+ /** 搜索条件 */
2033
+
2034
+ var searchValue = controller.useMemo(function (s) {
2035
+ return s.goodsListState.searchValue;
2036
+ }, []);
1604
2037
  /** 产品最大数 */
1605
2038
 
1606
2039
  var goodMax = controller.useMemo(function (s) {
@@ -1609,10 +2042,10 @@ var AddRowButton = (function () {
1609
2042
  /** 按钮是否禁用 */
1610
2043
 
1611
2044
  var disabled = React.useMemo(function () {
1612
- return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
1613
- }, [goodMax, goodsNum]);
1614
- var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
1615
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
2045
+ return typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue;
2046
+ }, [goodMax, goodsNum, searchValue]);
2047
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
2048
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1616
2049
  while (1) {
1617
2050
  switch (_context2.prev = _context2.next) {
1618
2051
  case 0:
@@ -1626,8 +2059,8 @@ var AddRowButton = (function () {
1626
2059
  case 4:
1627
2060
  _context2.next = 6;
1628
2061
  return controller.pipeline( /*#__PURE__*/function () {
1629
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
1630
- return regeneratorRuntime.wrap(function _callee$(_context) {
2062
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2063
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1631
2064
  while (1) {
1632
2065
  switch (_context.prev = _context.next) {
1633
2066
  case 0:
@@ -1694,8 +2127,8 @@ var TaxIncludedSwitch = (function () {
1694
2127
  }, []);
1695
2128
  var onChange = React.useCallback(function (e) {
1696
2129
  controller.pipeline( /*#__PURE__*/function () {
1697
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
1698
- return regeneratorRuntime.wrap(function _callee$(_context) {
2130
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2131
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1699
2132
  while (1) {
1700
2133
  switch (_context.prev = _context.next) {
1701
2134
  case 0:
@@ -1726,6 +2159,108 @@ var TaxIncludedSwitch = (function () {
1726
2159
  }));
1727
2160
  });
1728
2161
 
2162
+ var _path$1;
2163
+
2164
+ function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
2165
+
2166
+ function SvgMagnifier(props) {
2167
+ return /*#__PURE__*/createElement("svg", _extends$1({
2168
+ className: "magnifier_svg__icon",
2169
+ viewBox: "0 0 1024 1024",
2170
+ xmlns: "http://www.w3.org/2000/svg",
2171
+ width: 200,
2172
+ height: 200
2173
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/createElement("path", {
2174
+ d: "M985.781 918.594L820.773 765.526c27.373-32.973 49.655-69.577 66.437-109.258 22.933-54.219 34.56-111.795 34.56-171.13 0-59.333-11.627-116.91-34.56-171.13-22.143-52.354-53.838-99.365-94.2-139.729s-87.377-72.056-139.73-94.199c-54.219-22.933-111.795-34.561-171.13-34.561S365.24 57.148 311.022 80.08c-52.354 22.143-99.365 53.837-139.73 94.2s-72.057 87.375-94.2 139.73c-22.932 54.218-34.56 111.795-34.56 171.13 0 59.334 11.628 116.91 34.56 171.129 22.144 52.354 53.838 99.365 94.2 139.729s87.376 72.057 139.73 94.2c54.219 22.933 111.795 34.56 171.13 34.56s116.91-11.627 171.13-34.56c45.352-19.181 86.686-45.543 123.171-78.487l165.803 153.804a31.886 31.886 0 0021.756 8.54c8.593 0 17.163-3.442 23.467-10.238 12.019-12.956 11.26-33.205-1.698-45.223zm-503.63-57.836c-207.117 0-375.62-168.502-375.62-375.62 0-207.117 168.503-375.62 375.62-375.62s375.62 168.503 375.62 375.62c0 207.118-168.503 375.62-375.62 375.62z"
2175
+ })));
2176
+ }
2177
+
2178
+ var css_248z$4 = ".kts-invoice-operate-goods-list-able-list .kts-invoice-operate-goods-list-search {\n width: 330px;\n}\n.kts-invoice-operate-goods-list-able-list .kts-invoice-operate-goods-list-search input {\n border-radius: 999px;\n border-color: #b8b8b8;\n}\n";
2179
+ styleInject(css_248z$4);
2180
+
2181
+ function Search() {
2182
+ var controller = default_1.useInvoiceController();
2183
+
2184
+ var _React$useState = React.useState(''),
2185
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2186
+ value = _React$useState2[0],
2187
+ setValue = _React$useState2[1];
2188
+
2189
+ var readOnly = controller.useMemo(function (s) {
2190
+ return !!s.goodsListState.editGood;
2191
+ }, []);
2192
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2193
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2194
+ while (1) {
2195
+ switch (_context.prev = _context.next) {
2196
+ case 0:
2197
+ _context.next = 2;
2198
+ return controller.saveEditGood();
2199
+
2200
+ case 2:
2201
+ _context.next = 4;
2202
+ return controller.wait();
2203
+
2204
+ case 4:
2205
+ if (!controller.state.goodsListState.editGood) {
2206
+ _context.next = 7;
2207
+ break;
2208
+ }
2209
+
2210
+ message.error({
2211
+ content: '你正在编辑一个货物',
2212
+ key: '你正在编辑一个货物'
2213
+ });
2214
+ return _context.abrupt("return");
2215
+
2216
+ case 7:
2217
+ case "end":
2218
+ return _context.stop();
2219
+ }
2220
+ }
2221
+ }, _callee);
2222
+ })), []);
2223
+ React.useEffect(function () {
2224
+ controller.run( /*#__PURE__*/function () {
2225
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
2226
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2227
+ while (1) {
2228
+ switch (_context2.prev = _context2.next) {
2229
+ case 0:
2230
+ s.goodsListState.searchValue = value;
2231
+
2232
+ case 1:
2233
+ case "end":
2234
+ return _context2.stop();
2235
+ }
2236
+ }
2237
+ }, _callee2);
2238
+ }));
2239
+
2240
+ return function (_x) {
2241
+ return _ref2.apply(this, arguments);
2242
+ };
2243
+ }());
2244
+ }, [value, controller]);
2245
+ return /*#__PURE__*/React.createElement(Input, {
2246
+ size: "small",
2247
+ readOnly: readOnly,
2248
+ value: value,
2249
+ className: "kts-invoice-operate-goods-list-search",
2250
+ placeholder: "\u8BF7\u60A8\u8F93\u5165\u8D27\u7269\u540D\u79F0\u3001\u89C4\u683C\u578B\u53F7\u3001\u91D1\u989D(\u542B\u7A0E)\u641C\u7D22",
2251
+ prefix: /*#__PURE__*/React.createElement(Icon, {
2252
+ component: SvgMagnifier,
2253
+ style: {
2254
+ color: "#b8b8b8"
2255
+ }
2256
+ }),
2257
+ onChange: function onChange(e) {
2258
+ setValue(e.target.value);
2259
+ },
2260
+ onClick: onClick
2261
+ });
2262
+ }
2263
+
1729
2264
  function TableRow(props) {
1730
2265
  var controller = default_1.useInvoiceController();
1731
2266
  var goodsMap = controller.useMemo(function (s) {
@@ -1776,8 +2311,8 @@ var evaluate = (function (expr) {
1776
2311
  return parseFloat(math.evaluate(expr).toFixed(fractionDigits));
1777
2312
  });
1778
2313
 
1779
- var css_248z$4 = ".kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-body {\n flex: 1;\n overflow: auto;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-footer {\n flex: none;\n}\n";
1780
- styleInject(css_248z$4);
2314
+ var css_248z$5 = ".kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-body {\n flex: 1;\n overflow: auto;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-footer {\n flex: none;\n}\n";
2315
+ styleInject(css_248z$5);
1781
2316
 
1782
2317
  var Text = Typography.Text;
1783
2318
 
@@ -1820,8 +2355,8 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
1820
2355
 
1821
2356
  var onClose = React.useCallback(function () {
1822
2357
  controller.pipeline( /*#__PURE__*/function () {
1823
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
1824
- return regeneratorRuntime.wrap(function _callee$(_context) {
2358
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2359
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1825
2360
  while (1) {
1826
2361
  switch (_context.prev = _context.next) {
1827
2362
  case 0:
@@ -1842,8 +2377,8 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
1842
2377
  }, []);
1843
2378
  /** 点击了 添加折扣行 按钮 */
1844
2379
 
1845
- var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
1846
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
2380
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
2381
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1847
2382
  while (1) {
1848
2383
  switch (_context3.prev = _context3.next) {
1849
2384
  case 0:
@@ -1857,9 +2392,9 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
1857
2392
  case 4:
1858
2393
  _context3.next = 6;
1859
2394
  return controller.pipeline( /*#__PURE__*/function () {
1860
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
2395
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
1861
2396
  var isOk;
1862
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
2397
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1863
2398
  while (1) {
1864
2399
  switch (_context2.prev = _context2.next) {
1865
2400
  case 0:
@@ -1980,8 +2515,8 @@ var DrawerBody = decorator(Form.create())(function (props) {
1980
2515
 
1981
2516
  var onClose = React.useCallback(function () {
1982
2517
  controller.pipeline( /*#__PURE__*/function () {
1983
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
1984
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
2518
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
2519
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1985
2520
  while (1) {
1986
2521
  switch (_context4.prev = _context4.next) {
1987
2522
  case 0:
@@ -2009,8 +2544,8 @@ var DrawerBody = decorator(Form.create())(function (props) {
2009
2544
  var discount = parseFloat(parseFloat(values.discount).toFixed(4));
2010
2545
  var indexList = discountGoodIndex;
2011
2546
  controller.pipeline( /*#__PURE__*/function () {
2012
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
2013
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
2547
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
2548
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2014
2549
  while (1) {
2015
2550
  switch (_context5.prev = _context5.next) {
2016
2551
  case 0:
@@ -2046,7 +2581,7 @@ var DrawerBody = decorator(Form.create())(function (props) {
2046
2581
  });
2047
2582
  });
2048
2583
  }, 300), [form, lineAmountSum]);
2049
- /** 折扣率变化 */
2584
+ /** 折扣变化 */
2050
2585
 
2051
2586
  var onChangeDiscolineAmountunt = React.useCallback(lazyFn(function (e) {
2052
2587
  form.validateFields(function (err, values) {
@@ -2177,8 +2712,8 @@ var EndowCodeButton = (function () {
2177
2712
  var disabled = controller.useMemo(function (s) {
2178
2713
  if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
2179
2714
  }, []);
2180
- var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2181
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
2715
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
2716
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2182
2717
  while (1) {
2183
2718
  switch (_context2.prev = _context2.next) {
2184
2719
  case 0:
@@ -2192,8 +2727,8 @@ var EndowCodeButton = (function () {
2192
2727
  case 4:
2193
2728
  _context2.next = 6;
2194
2729
  return controller.pipeline( /*#__PURE__*/function () {
2195
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
2196
- return regeneratorRuntime.wrap(function _callee$(_context) {
2730
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2731
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2197
2732
  while (1) {
2198
2733
  switch (_context.prev = _context.next) {
2199
2734
  case 0:
@@ -2272,9 +2807,9 @@ var DelRowButton = (function () {
2272
2807
  }, []);
2273
2808
  var onClick = React.useCallback(function () {
2274
2809
  controller.pipeline( /*#__PURE__*/function () {
2275
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
2810
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2276
2811
  var goodsList;
2277
- return regeneratorRuntime.wrap(function _callee$(_context) {
2812
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2278
2813
  while (1) {
2279
2814
  switch (_context.prev = _context.next) {
2280
2815
  case 0:
@@ -2314,16 +2849,16 @@ var DelRowButton = (function () {
2314
2849
  }, "\u5220\u9664\u884C");
2315
2850
  });
2316
2851
 
2317
- var _defs$1, _path$1;
2852
+ var _defs$1, _path$2;
2318
2853
 
2319
- function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
2854
+ function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
2320
2855
 
2321
2856
  function SvgSpot(props) {
2322
- return /*#__PURE__*/createElement("svg", _extends$1({
2857
+ return /*#__PURE__*/createElement("svg", _extends$2({
2323
2858
  className: "spot_svg__icon",
2324
2859
  viewBox: "0 0 1024 1024",
2325
2860
  xmlns: "http://www.w3.org/2000/svg"
2326
- }, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$1 || (_path$1 = /*#__PURE__*/createElement("path", {
2861
+ }, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$2 || (_path$2 = /*#__PURE__*/createElement("path", {
2327
2862
  d: "M416 512a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0zM416 96.64a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0zM416 927.36a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0z"
2328
2863
  })));
2329
2864
  }
@@ -2355,8 +2890,8 @@ var useAddDiscount = (function (goods) {
2355
2890
  var controller = default_1.useInvoiceController();
2356
2891
  /** 点击了 添加折扣行 按钮 */
2357
2892
 
2358
- var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2359
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
2893
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
2894
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2360
2895
  while (1) {
2361
2896
  switch (_context2.prev = _context2.next) {
2362
2897
  case 0:
@@ -2370,9 +2905,9 @@ var useAddDiscount = (function (goods) {
2370
2905
  case 4:
2371
2906
  _context2.next = 6;
2372
2907
  return controller.pipeline( /*#__PURE__*/function () {
2373
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
2908
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
2374
2909
  var err, key;
2375
- return regeneratorRuntime.wrap(function _callee$(_context) {
2910
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2376
2911
  while (1) {
2377
2912
  switch (_context.prev = _context.next) {
2378
2913
  case 0:
@@ -2382,7 +2917,7 @@ var useAddDiscount = (function (goods) {
2382
2917
  }
2383
2918
 
2384
2919
  err = s.goodsListState.form.getFieldsError();
2385
- _context.t0 = regeneratorRuntime.keys(err);
2920
+ _context.t0 = _regeneratorRuntime().keys(err);
2386
2921
 
2387
2922
  case 3:
2388
2923
  if ((_context.t1 = _context.t0()).done) {
@@ -2436,114 +2971,43 @@ var useAddDiscount = (function (goods) {
2436
2971
  case "end":
2437
2972
  return _context.stop();
2438
2973
  }
2439
- }
2440
- }, _callee);
2441
- }));
2442
-
2443
- return function (_x) {
2444
- return _ref2.apply(this, arguments);
2445
- };
2446
- }())();
2447
-
2448
- case 6:
2449
- case "end":
2450
- return _context2.stop();
2451
- }
2452
- }
2453
- }, _callee2);
2454
- })), [controller, goods.$index]);
2455
-
2456
- if (goods.lineAttribute !== LineAttributeType$1.正常) {
2457
- return undefined;
2458
- }
2459
-
2460
- return React.useMemo(function () {
2461
- if (goods.lineAttribute !== LineAttributeType$1.正常) {
2462
- return undefined;
2463
- }
2464
-
2465
- return /*#__PURE__*/React.createElement(Menu.Item, {
2466
- key: "addDiscount",
2467
- onClick: onClick
2468
- }, /*#__PURE__*/React.createElement(Text$2, {
2469
- strong: true
2470
- }, "\u6DFB\u52A0\u6298\u6263\u884C"));
2471
- }, [onClick, goods.lineAttribute]);
2472
- });
2473
-
2474
- /** 格式化 保留2位小数 */
2475
-
2476
- var format2 = function format2(value) {
2477
- if (value === Infinity) return '';
2478
- if ("".concat(value) === 'NaN') return '';
2479
- if (typeof value === 'string') value = parseFloat(value);
2480
- return parseFloat(value.toFixed(2));
2481
- };
2482
- /** 格式化 保留15位数字 */
2483
-
2484
- var format15 = function format15(value) {
2485
- if (value === Infinity) return '';
2486
- if ("".concat(value) === 'NaN') return '';
2487
- if (typeof value === 'string') value = parseFloat(value);
2488
- var fractionDigits = 15 - "".concat(value || 0).indexOf('.');
2489
- return parseFloat(value.toFixed(fractionDigits > 8 ? 8 : fractionDigits));
2490
- };
2491
- /**
2492
- * 金额(含税) = 数量 * 单价(含税)
2493
- * @param quantity 数量
2494
- * @param priceIncludeTax 单价(含税)
2495
- * @returns 金额(含税)
2496
- */
2497
-
2498
- function countAmountIncludeTax(quantity, priceIncludeTax) {
2499
- if (!quantity && quantity !== 0) return undefined;
2500
- if (!priceIncludeTax && priceIncludeTax !== 0) return undefined;
2501
- quantity = format15(quantity);
2502
- priceIncludeTax = format15(priceIncludeTax);
2503
- return parseFloat(chain$1(bignumber(priceIncludeTax)).multiply(bignumber(quantity)).done().toNumber().toFixed(2)); // return parseFloat(evaluate(`${priceIncludeTax} * ${quantity}`).toFixed(2));
2504
- }
2505
- /**
2506
- * 不含税金额 = 含税金额-税额
2507
- * @param amountIncludeTax 含税金额
2508
- * @param taxAmount 税额
2509
- * @returns 不含税金额
2510
- */
2974
+ }
2975
+ }, _callee);
2976
+ }));
2511
2977
 
2512
- function countAmountExcludeTax(amountIncludeTax, taxAmount) {
2513
- if (!amountIncludeTax && amountIncludeTax !== 0) return undefined;
2514
- if (!taxAmount && taxAmount !== 0) return undefined;
2515
- return chain$1(bignumber(amountIncludeTax)).subtract(bignumber(taxAmount)).done().toNumber();
2516
- }
2517
- /**
2518
- * 税额 = (含税金额-扣除额)/(1+税率)*税率
2519
- * @param amountIncludeTax 含税金额
2520
- * @param deduction 扣除额
2521
- * @param taxRate 税率
2522
- * @returns 税额
2523
- */
2978
+ return function (_x) {
2979
+ return _ref2.apply(this, arguments);
2980
+ };
2981
+ }())();
2524
2982
 
2525
- function countTaxAmount(amountIncludeTax, deduction, taxRate) {
2526
- if (!amountIncludeTax && amountIncludeTax !== 0) return undefined;
2527
- if (!deduction && deduction !== 0) return undefined;
2528
- if (!taxRate && taxRate !== 0) return undefined;
2529
- var taxRateBu = chain$1(bignumber(taxRate)).divide(bignumber(100)).done();
2530
- return parseFloat(chain$1(bignumber(amountIncludeTax)).subtract(bignumber(deduction)).divide(chain$1(bignumber(1)).add(taxRateBu).done()).multiply(taxRateBu).done().toNumber().toFixed(2));
2531
- }
2532
- /**
2533
- * 单价 = 金额/数量
2534
- * @param amount 金额
2535
- * @param quantity 数量
2536
- * @returns 单价
2537
- */
2983
+ case 6:
2984
+ case "end":
2985
+ return _context2.stop();
2986
+ }
2987
+ }
2988
+ }, _callee2);
2989
+ })), [controller, goods.$index]);
2538
2990
 
2539
- function countPrice(amount, quantity) {
2540
- if (!amount && amount !== 0) return undefined;
2541
- if (!quantity && quantity !== 0) return undefined;
2542
- return format15(chain$1(bignumber(amount)).divide(bignumber(quantity)).done().toNumber());
2543
- }
2991
+ if (goods.lineAttribute !== LineAttributeType$1.正常) {
2992
+ return undefined;
2993
+ }
2994
+
2995
+ return React.useMemo(function () {
2996
+ if (goods.lineAttribute !== LineAttributeType$1.正常) {
2997
+ return undefined;
2998
+ }
2999
+
3000
+ return /*#__PURE__*/React.createElement(Menu.Item, {
3001
+ key: "addDiscount",
3002
+ onClick: onClick
3003
+ }, /*#__PURE__*/React.createElement(Text$2, {
3004
+ strong: true
3005
+ }, "\u6DFB\u52A0\u6298\u6263\u884C"));
3006
+ }, [onClick, goods.lineAttribute]);
3007
+ });
2544
3008
 
2545
3009
  //! moment.js
2546
- //! version : 2.29.1
3010
+ //! version : 2.29.3
2547
3011
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
2548
3012
  //! license : MIT
2549
3013
  //! momentjs.com
@@ -2614,8 +3078,9 @@ function isDate(input) {
2614
3078
 
2615
3079
  function map(arr, fn) {
2616
3080
  var res = [],
2617
- i;
2618
- for (i = 0; i < arr.length; ++i) {
3081
+ i,
3082
+ arrLen = arr.length;
3083
+ for (i = 0; i < arrLen; ++i) {
2619
3084
  res.push(fn(arr[i], i));
2620
3085
  }
2621
3086
  return res;
@@ -2744,7 +3209,10 @@ var momentProperties = (hooks.momentProperties = []),
2744
3209
  updateInProgress = false;
2745
3210
 
2746
3211
  function copyConfig(to, from) {
2747
- var i, prop, val;
3212
+ var i,
3213
+ prop,
3214
+ val,
3215
+ momentPropertiesLen = momentProperties.length;
2748
3216
 
2749
3217
  if (!isUndefined(from._isAMomentObject)) {
2750
3218
  to._isAMomentObject = from._isAMomentObject;
@@ -2777,8 +3245,8 @@ function copyConfig(to, from) {
2777
3245
  to._locale = from._locale;
2778
3246
  }
2779
3247
 
2780
- if (momentProperties.length > 0) {
2781
- for (i = 0; i < momentProperties.length; i++) {
3248
+ if (momentPropertiesLen > 0) {
3249
+ for (i = 0; i < momentPropertiesLen; i++) {
2782
3250
  prop = momentProperties[i];
2783
3251
  val = from[prop];
2784
3252
  if (!isUndefined(val)) {
@@ -2833,8 +3301,9 @@ function deprecate(msg, fn) {
2833
3301
  var args = [],
2834
3302
  arg,
2835
3303
  i,
2836
- key;
2837
- for (i = 0; i < arguments.length; i++) {
3304
+ key,
3305
+ argLen = arguments.length;
3306
+ for (i = 0; i < argLen; i++) {
2838
3307
  arg = '';
2839
3308
  if (typeof arguments[i] === 'object') {
2840
3309
  arg += '\n[' + i + '] ';
@@ -2984,7 +3453,8 @@ function zeroFill(number, targetLength, forceSign) {
2984
3453
  );
2985
3454
  }
2986
3455
 
2987
- var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
3456
+ var formattingTokens =
3457
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
2988
3458
  localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
2989
3459
  formatFunctions = {},
2990
3460
  formatTokenFunctions = {};
@@ -3288,8 +3758,9 @@ function stringSet(units, value) {
3288
3758
  if (typeof units === 'object') {
3289
3759
  units = normalizeObjectUnits(units);
3290
3760
  var prioritized = getPrioritizedUnits(units),
3291
- i;
3292
- for (i = 0; i < prioritized.length; i++) {
3761
+ i,
3762
+ prioritizedLen = prioritized.length;
3763
+ for (i = 0; i < prioritizedLen; i++) {
3293
3764
  this[prioritized[i].unit](units[prioritized[i].unit]);
3294
3765
  }
3295
3766
  } else {
@@ -3319,7 +3790,8 @@ var match1 = /\d/, // 0 - 9
3319
3790
  matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
3320
3791
  // any word (or two) characters or numbers including two/three word month in arabic.
3321
3792
  // includes scottish gaelic two word and hyphenated months
3322
- matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
3793
+ matchWord =
3794
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
3323
3795
  regexes;
3324
3796
 
3325
3797
  regexes = {};
@@ -3345,15 +3817,12 @@ function unescapeFormat(s) {
3345
3817
  return regexEscape(
3346
3818
  s
3347
3819
  .replace('\\', '')
3348
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
3349
- matched,
3350
- p1,
3351
- p2,
3352
- p3,
3353
- p4
3354
- ) {
3355
- return p1 || p2 || p3 || p4;
3356
- })
3820
+ .replace(
3821
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
3822
+ function (matched, p1, p2, p3, p4) {
3823
+ return p1 || p2 || p3 || p4;
3824
+ }
3825
+ )
3357
3826
  );
3358
3827
  }
3359
3828
 
@@ -3365,7 +3834,8 @@ var tokens = {};
3365
3834
 
3366
3835
  function addParseToken(token, callback) {
3367
3836
  var i,
3368
- func = callback;
3837
+ func = callback,
3838
+ tokenLen;
3369
3839
  if (typeof token === 'string') {
3370
3840
  token = [token];
3371
3841
  }
@@ -3374,7 +3844,8 @@ function addParseToken(token, callback) {
3374
3844
  array[callback] = toInt(input);
3375
3845
  };
3376
3846
  }
3377
- for (i = 0; i < token.length; i++) {
3847
+ tokenLen = token.length;
3848
+ for (i = 0; i < tokenLen; i++) {
3378
3849
  tokens[token[i]] = func;
3379
3850
  }
3380
3851
  }
@@ -3485,12 +3956,12 @@ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
3485
3956
 
3486
3957
  // LOCALES
3487
3958
 
3488
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
3489
- '_'
3490
- ),
3491
- defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
3492
- '_'
3493
- ),
3959
+ var defaultLocaleMonths =
3960
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
3961
+ '_'
3962
+ ),
3963
+ defaultLocaleMonthsShort =
3964
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
3494
3965
  MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
3495
3966
  defaultMonthsShortRegex = matchWord,
3496
3967
  defaultMonthsRegex = matchWord;
@@ -3932,14 +4403,12 @@ addRegexToken('ww', match1to2, match2);
3932
4403
  addRegexToken('W', match1to2);
3933
4404
  addRegexToken('WW', match1to2, match2);
3934
4405
 
3935
- addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
3936
- input,
3937
- week,
3938
- config,
3939
- token
3940
- ) {
3941
- week[token.substr(0, 1)] = toInt(input);
3942
- });
4406
+ addWeekParseToken(
4407
+ ['w', 'ww', 'W', 'WW'],
4408
+ function (input, week, config, token) {
4409
+ week[token.substr(0, 1)] = toInt(input);
4410
+ }
4411
+ );
3943
4412
 
3944
4413
  // HELPERS
3945
4414
 
@@ -4064,9 +4533,8 @@ function shiftWeekdays(ws, n) {
4064
4533
  return ws.slice(n, 7).concat(ws.slice(0, n));
4065
4534
  }
4066
4535
 
4067
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
4068
- '_'
4069
- ),
4536
+ var defaultLocaleWeekdays =
4537
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
4070
4538
  defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
4071
4539
  defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
4072
4540
  defaultWeekdaysRegex = matchWord,
@@ -4614,6 +5082,11 @@ function chooseLocale(names) {
4614
5082
  return globalLocale;
4615
5083
  }
4616
5084
 
5085
+ function isLocaleNameSane(name) {
5086
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
5087
+ return name.match('^[^/\\\\]*$') != null;
5088
+ }
5089
+
4617
5090
  function loadLocale(name) {
4618
5091
  var oldLocale = null,
4619
5092
  aliasedRequire;
@@ -4622,7 +5095,8 @@ function loadLocale(name) {
4622
5095
  locales[name] === undefined &&
4623
5096
  typeof module !== 'undefined' &&
4624
5097
  module &&
4625
- module.exports
5098
+ module.exports &&
5099
+ isLocaleNameSane(name)
4626
5100
  ) {
4627
5101
  try {
4628
5102
  oldLocale = globalLocale._abbr;
@@ -4839,8 +5313,10 @@ function checkOverflow(m) {
4839
5313
 
4840
5314
  // iso 8601 regex
4841
5315
  // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
4842
- var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
4843
- basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
5316
+ var extendedIsoRegex =
5317
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
5318
+ basicIsoRegex =
5319
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
4844
5320
  tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
4845
5321
  isoDates = [
4846
5322
  ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
@@ -4871,7 +5347,8 @@ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\
4871
5347
  ],
4872
5348
  aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
4873
5349
  // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
4874
- rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
5350
+ rfc2822 =
5351
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
4875
5352
  obsOffsets = {
4876
5353
  UT: 0,
4877
5354
  GMT: 0,
@@ -4894,12 +5371,13 @@ function configFromISO(config) {
4894
5371
  allowTime,
4895
5372
  dateFormat,
4896
5373
  timeFormat,
4897
- tzFormat;
5374
+ tzFormat,
5375
+ isoDatesLen = isoDates.length,
5376
+ isoTimesLen = isoTimes.length;
4898
5377
 
4899
5378
  if (match) {
4900
5379
  getParsingFlags(config).iso = true;
4901
-
4902
- for (i = 0, l = isoDates.length; i < l; i++) {
5380
+ for (i = 0, l = isoDatesLen; i < l; i++) {
4903
5381
  if (isoDates[i][1].exec(match[1])) {
4904
5382
  dateFormat = isoDates[i][0];
4905
5383
  allowTime = isoDates[i][2] !== false;
@@ -4911,7 +5389,7 @@ function configFromISO(config) {
4911
5389
  return;
4912
5390
  }
4913
5391
  if (match[3]) {
4914
- for (i = 0, l = isoTimes.length; i < l; i++) {
5392
+ for (i = 0, l = isoTimesLen; i < l; i++) {
4915
5393
  if (isoTimes[i][1].exec(match[3])) {
4916
5394
  // match[2] should be 'T' or space
4917
5395
  timeFormat = (match[2] || ' ') + isoTimes[i][0];
@@ -5291,12 +5769,13 @@ function configFromStringAndFormat(config) {
5291
5769
  skipped,
5292
5770
  stringLength = string.length,
5293
5771
  totalParsedInputLength = 0,
5294
- era;
5772
+ era,
5773
+ tokenLen;
5295
5774
 
5296
5775
  tokens =
5297
5776
  expandFormat(config._f, config._locale).match(formattingTokens) || [];
5298
-
5299
- for (i = 0; i < tokens.length; i++) {
5777
+ tokenLen = tokens.length;
5778
+ for (i = 0; i < tokenLen; i++) {
5300
5779
  token = tokens[i];
5301
5780
  parsedInput = (string.match(getParseRegexForToken(token, config)) ||
5302
5781
  [])[0];
@@ -5391,15 +5870,16 @@ function configFromStringAndArray(config) {
5391
5870
  i,
5392
5871
  currentScore,
5393
5872
  validFormatFound,
5394
- bestFormatIsValid = false;
5873
+ bestFormatIsValid = false,
5874
+ configfLen = config._f.length;
5395
5875
 
5396
- if (config._f.length === 0) {
5876
+ if (configfLen === 0) {
5397
5877
  getParsingFlags(config).invalidFormat = true;
5398
5878
  config._d = new Date(NaN);
5399
5879
  return;
5400
5880
  }
5401
5881
 
5402
- for (i = 0; i < config._f.length; i++) {
5882
+ for (i = 0; i < configfLen; i++) {
5403
5883
  currentScore = 0;
5404
5884
  validFormatFound = false;
5405
5885
  tempConfig = copyConfig({}, config);
@@ -5640,7 +6120,8 @@ var ordering = [
5640
6120
  function isDurationValid(m) {
5641
6121
  var key,
5642
6122
  unitHasDecimal = false,
5643
- i;
6123
+ i,
6124
+ orderLen = ordering.length;
5644
6125
  for (key in m) {
5645
6126
  if (
5646
6127
  hasOwnProp(m, key) &&
@@ -5653,7 +6134,7 @@ function isDurationValid(m) {
5653
6134
  }
5654
6135
  }
5655
6136
 
5656
- for (i = 0; i < ordering.length; ++i) {
6137
+ for (i = 0; i < orderLen; ++i) {
5657
6138
  if (m[ordering[i]]) {
5658
6139
  if (unitHasDecimal) {
5659
6140
  return false; // only allow non-integers for smallest unit
@@ -5978,7 +6459,8 @@ var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
5978
6459
  // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
5979
6460
  // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
5980
6461
  // and further modified to allow for strings containing both week and day
5981
- isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
6462
+ isoRegex =
6463
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
5982
6464
 
5983
6465
  function createDuration(input, key) {
5984
6466
  var duration = input,
@@ -6199,9 +6681,10 @@ function isMomentInputObject(input) {
6199
6681
  'ms',
6200
6682
  ],
6201
6683
  i,
6202
- property;
6684
+ property,
6685
+ propertyLen = properties.length;
6203
6686
 
6204
- for (i = 0; i < properties.length; i += 1) {
6687
+ for (i = 0; i < propertyLen; i += 1) {
6205
6688
  property = properties[i];
6206
6689
  propertyTest = propertyTest || hasOwnProp(input, property);
6207
6690
  }
@@ -6824,19 +7307,17 @@ addRegexToken('NNN', matchEraAbbr);
6824
7307
  addRegexToken('NNNN', matchEraName);
6825
7308
  addRegexToken('NNNNN', matchEraNarrow);
6826
7309
 
6827
- addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
6828
- input,
6829
- array,
6830
- config,
6831
- token
6832
- ) {
6833
- var era = config._locale.erasParse(input, token, config._strict);
6834
- if (era) {
6835
- getParsingFlags(config).era = era;
6836
- } else {
6837
- getParsingFlags(config).invalidEra = input;
7310
+ addParseToken(
7311
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
7312
+ function (input, array, config, token) {
7313
+ var era = config._locale.erasParse(input, token, config._strict);
7314
+ if (era) {
7315
+ getParsingFlags(config).era = era;
7316
+ } else {
7317
+ getParsingFlags(config).invalidEra = input;
7318
+ }
6838
7319
  }
6839
- });
7320
+ );
6840
7321
 
6841
7322
  addRegexToken('y', matchUnsigned);
6842
7323
  addRegexToken('yy', matchUnsigned);
@@ -7128,14 +7609,12 @@ addRegexToken('gggg', match1to4, match4);
7128
7609
  addRegexToken('GGGGG', match1to6, match6);
7129
7610
  addRegexToken('ggggg', match1to6, match6);
7130
7611
 
7131
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
7132
- input,
7133
- week,
7134
- config,
7135
- token
7136
- ) {
7137
- week[token.substr(0, 2)] = toInt(input);
7138
- });
7612
+ addWeekParseToken(
7613
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
7614
+ function (input, week, config, token) {
7615
+ week[token.substr(0, 2)] = toInt(input);
7616
+ }
7617
+ );
7139
7618
 
7140
7619
  addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
7141
7620
  week[token] = hooks.parseTwoDigitYear(input);
@@ -8158,7 +8637,7 @@ addParseToken('x', function (input, array, config) {
8158
8637
 
8159
8638
  //! moment.js
8160
8639
 
8161
- hooks.version = '2.29.1';
8640
+ hooks.version = '2.29.3';
8162
8641
 
8163
8642
  setHookCallback(createLocal);
8164
8643
 
@@ -8247,10 +8726,10 @@ var promptErr = function promptErr(err) {
8247
8726
 
8248
8727
  var onChangeQuantity = lazyFn$1(function (controller, form, record) {
8249
8728
  form.validateFields( /*#__PURE__*/function () {
8250
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(err, values) {
8729
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, values) {
8251
8730
  var quantity, priceIncludeTax, lineAmountIncludeTax, _lineAmountIncludeTax, _priceIncludeTax, priceExcludeTax, lineAmountExcludeTax, _lineAmountExcludeTax, _priceExcludeTax;
8252
8731
 
8253
- return regeneratorRuntime.wrap(function _callee$(_context) {
8732
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8254
8733
  while (1) {
8255
8734
  switch (_context.prev = _context.next) {
8256
8735
  case 0:
@@ -8396,10 +8875,10 @@ var onChangeQuantity = lazyFn$1(function (controller, form, record) {
8396
8875
 
8397
8876
  var onChangePriceIncludeTax = lazyFn$1(function (controller, form, record) {
8398
8877
  form.validateFields( /*#__PURE__*/function () {
8399
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(err, values) {
8878
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
8400
8879
  var priceIncludeTax, quantity, lineAmountIncludeTax, _lineAmountIncludeTax2, _quantity;
8401
8880
 
8402
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
8881
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8403
8882
  while (1) {
8404
8883
  switch (_context2.prev = _context2.next) {
8405
8884
  case 0:
@@ -8495,10 +8974,10 @@ var onChangePriceIncludeTax = lazyFn$1(function (controller, form, record) {
8495
8974
 
8496
8975
  var onChangePriceExcludeTax = lazyFn$1(function (controller, form, record) {
8497
8976
  form.validateFields( /*#__PURE__*/function () {
8498
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(err, values) {
8977
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
8499
8978
  var priceExcludeTax, quantity, lineAmountExcludeTax, _lineAmountExcludeTax2, _quantity2;
8500
8979
 
8501
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
8980
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
8502
8981
  while (1) {
8503
8982
  switch (_context3.prev = _context3.next) {
8504
8983
  case 0:
@@ -8594,10 +9073,10 @@ var onChangePriceExcludeTax = lazyFn$1(function (controller, form, record) {
8594
9073
 
8595
9074
  var onChangeLineAmountIncludeTax = lazyFn$1(function (controller, form, record) {
8596
9075
  form.validateFields( /*#__PURE__*/function () {
8597
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(err, values) {
9076
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err, values) {
8598
9077
  var lineAmountIncludeTax, quantity, priceIncludeTax, _priceIncludeTax2, _quantity3;
8599
9078
 
8600
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
9079
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
8601
9080
  while (1) {
8602
9081
  switch (_context4.prev = _context4.next) {
8603
9082
  case 0:
@@ -8686,10 +9165,10 @@ var onChangeLineAmountIncludeTax = lazyFn$1(function (controller, form, record)
8686
9165
 
8687
9166
  var onChangeLineAmountExcludeTax = lazyFn$1(function (controller, form, record) {
8688
9167
  form.validateFields( /*#__PURE__*/function () {
8689
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(err, values) {
9168
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(err, values) {
8690
9169
  var lineAmountExcludeTax, quantity, priceExcludeTax, _priceExcludeTax2, _quantity4;
8691
9170
 
8692
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
9171
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
8693
9172
  while (1) {
8694
9173
  switch (_context5.prev = _context5.next) {
8695
9174
  case 0:
@@ -8778,9 +9257,9 @@ var onChangeLineAmountExcludeTax = lazyFn$1(function (controller, form, record)
8778
9257
 
8779
9258
  var onChangeTaxRate = lazyFn$1(function (controller, form, record) {
8780
9259
  form.validateFields( /*#__PURE__*/function () {
8781
- var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(err, values) {
9260
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(err, values) {
8782
9261
  var taxRate;
8783
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
9262
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
8784
9263
  while (1) {
8785
9264
  switch (_context6.prev = _context6.next) {
8786
9265
  case 0:
@@ -8840,6 +9319,11 @@ function dutyFree(controller, taxRate, form, record) {
8840
9319
  var cache = controller.state.goodsListState.endowCode.cache;
8841
9320
  var invoiceType = controller.state.invoiceType; // 4月1日至12月31日
8842
9321
 
9322
+ console.log('===> 小规模纳税人免税逻辑');
9323
+ console.log('===> invoiceType', invoiceType);
9324
+ console.log('===> en', controller.state.en);
9325
+ console.log('===> taxRate', taxRate);
9326
+ console.log('===> state', controller.state);
8843
9327
  if (hooks().valueOf() > hooks('2022-12-31 23:59').valueOf()) return taxRate;
8844
9328
  if (controller.state.en !== '08') return taxRate;
8845
9329
  if (invoiceType !== '10' && invoiceType !== '04') return taxRate;
@@ -8858,38 +9342,15 @@ function dutyFree(controller, taxRate, form, record) {
8858
9342
  taxRate: 0
8859
9343
  });
8860
9344
  return 0;
8861
- } // 选择的 1或者3
8862
- // if (taxRate === 1 || taxRate === 3) {
8863
- // 是否处理过
8864
- // if (cache[record.$index]) {
8865
- // return taxRate;
8866
- // } else {
8867
- // cache[record.$index] = { favouredPolicyName: record.favouredPolicyName, favouredPolicyMark: record.favouredPolicyMark,taxFreeType:record.taxFreeType }
8868
- // record.favouredPolicyName = '免税';
8869
- // record.taxRate = 0;
8870
- // record.favouredPolicyMark = 1;
8871
- // record.taxFreeType = 1 as any;
8872
- // form.setFieldsValue({ taxRate: 0 });
8873
- // return 0;
8874
- // }
8875
- // } else {
8876
- // if (cache[record.$index] && cache[record.$index] !== true) {
8877
- // record.favouredPolicyName = cache[record.$index].favouredPolicyName;
8878
- // record.favouredPolicyMark = cache[record.$index].favouredPolicyMark;
8879
- // record.taxFreeType = cache[record.$index].taxFreeType;
8880
- // cache[record.$index] = true;
8881
- // }
8882
- // return taxRate;
8883
- // }
8884
-
9345
+ }
8885
9346
  }
8886
9347
  /** 含税 => 更新(不含税) */
8887
9348
 
8888
9349
  var updateUnitPriceExcludingTax = function updateUnitPriceExcludingTax(controller, form, record) {
8889
9350
  form.validateFields( /*#__PURE__*/function () {
8890
- var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(err, values) {
9351
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(err, values) {
8891
9352
  var taxAmount, lineAmountExcludeTax, priceExcludeTax, deduction;
8892
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
9353
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
8893
9354
  while (1) {
8894
9355
  switch (_context7.prev = _context7.next) {
8895
9356
  case 0:
@@ -8953,9 +9414,9 @@ var updateUnitPriceExcludingTax = function updateUnitPriceExcludingTax(controlle
8953
9414
 
8954
9415
  var updateUnitPriceTax = function updateUnitPriceTax(controller, form, record) {
8955
9416
  form.validateFields( /*#__PURE__*/function () {
8956
- var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(err, values) {
9417
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(err, values) {
8957
9418
  var lineAmountExcludeTax, lineAmountIncludeTax, taxAmount, priceExcludeTax, priceIncludeTax;
8958
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
9419
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
8959
9420
  while (1) {
8960
9421
  switch (_context8.prev = _context8.next) {
8961
9422
  case 0:
@@ -9028,9 +9489,9 @@ var updateUnitPriceTax = function updateUnitPriceTax(controller, form, record) {
9028
9489
 
9029
9490
  var onSaveEditGood = lazyFn$1(function (controller, form, record, id) {
9030
9491
  form.validateFields( /*#__PURE__*/function () {
9031
- var _ref9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(err, values) {
9492
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(err, values) {
9032
9493
  var v;
9033
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
9494
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
9034
9495
  while (1) {
9035
9496
  switch (_context9.prev = _context9.next) {
9036
9497
  case 0:
@@ -9065,8 +9526,8 @@ var onSaveEditGood = lazyFn$1(function (controller, form, record, id) {
9065
9526
  /** 单调赋码 */
9066
9527
 
9067
9528
  var endowCode = /*#__PURE__*/function () {
9068
- var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(controller, goods) {
9069
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
9529
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(controller, goods) {
9530
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
9070
9531
  while (1) {
9071
9532
  switch (_context11.prev = _context11.next) {
9072
9533
  case 0:
@@ -9080,9 +9541,9 @@ var endowCode = /*#__PURE__*/function () {
9080
9541
  case 4:
9081
9542
  _context11.next = 6;
9082
9543
  return controller.pipeline( /*#__PURE__*/function () {
9083
- var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(s) {
9544
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(s) {
9084
9545
  var err, key, g, i;
9085
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
9546
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
9086
9547
  while (1) {
9087
9548
  switch (_context10.prev = _context10.next) {
9088
9549
  case 0:
@@ -9092,7 +9553,7 @@ var endowCode = /*#__PURE__*/function () {
9092
9553
  }
9093
9554
 
9094
9555
  err = s.goodsListState.form.getFieldsError();
9095
- _context10.t0 = regeneratorRuntime.keys(err);
9556
+ _context10.t0 = _regeneratorRuntime().keys(err);
9096
9557
 
9097
9558
  case 3:
9098
9559
  if ((_context10.t1 = _context10.t0()).done) {
@@ -9161,8 +9622,8 @@ var endowCode = /*#__PURE__*/function () {
9161
9622
  var Text$3 = Typography.Text;
9162
9623
  var useEndowCode = (function (goods) {
9163
9624
  var controller = default_1.useInvoiceController();
9164
- var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
9165
- return regeneratorRuntime.wrap(function _callee$(_context) {
9625
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9626
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9166
9627
  while (1) {
9167
9628
  switch (_context.prev = _context.next) {
9168
9629
  case 0:
@@ -9185,8 +9646,8 @@ var useEndowCode = (function (goods) {
9185
9646
  }, [goods.lineAttribute, onClick]);
9186
9647
  });
9187
9648
 
9188
- var css_248z$5 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
9189
- styleInject(css_248z$5);
9649
+ var css_248z$6 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
9650
+ styleInject(css_248z$6);
9190
9651
 
9191
9652
  var RowMenu = (function (props) {
9192
9653
  var controller = default_1.useInvoiceController();
@@ -9255,6 +9716,11 @@ var useColumns = (function (form) {
9255
9716
  var editGood = controller.useMemo(function (e) {
9256
9717
  return e.goodsListState.editGood;
9257
9718
  }, []);
9719
+ /** 搜索条件 */
9720
+
9721
+ var searchValue = controller.useMemo(function (e) {
9722
+ return e.goodsListState.searchValue;
9723
+ }, []);
9258
9724
  /** 税率列表 */
9259
9725
 
9260
9726
  var taxRateList = controller.useMemo(function (e) {
@@ -9318,8 +9784,8 @@ var useColumns = (function (form) {
9318
9784
  }), controller.getGoodsList && /*#__PURE__*/React.createElement(Button, {
9319
9785
  onClick: function onClick() {
9320
9786
  controller.pipeline( /*#__PURE__*/function () {
9321
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
9322
- return regeneratorRuntime.wrap(function _callee$(_context) {
9787
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
9788
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9323
9789
  while (1) {
9324
9790
  switch (_context.prev = _context.next) {
9325
9791
  case 0:
@@ -9346,7 +9812,7 @@ var useColumns = (function (form) {
9346
9812
  style: {
9347
9813
  padding: '0 10px'
9348
9814
  }
9349
- }, value);
9815
+ }, formatSearch(value, searchValue));
9350
9816
  }
9351
9817
  }
9352
9818
  }, {
@@ -9368,7 +9834,7 @@ var useColumns = (function (form) {
9368
9834
  style: {
9369
9835
  padding: '0 10px'
9370
9836
  }
9371
- }, value);
9837
+ }, formatSearch(value, searchValue));
9372
9838
  }
9373
9839
  }
9374
9840
  }, {
@@ -9412,9 +9878,9 @@ var useColumns = (function (form) {
9412
9878
  message: '数量必须为数字'
9413
9879
  }, {
9414
9880
  validator: function () {
9415
- var _validator = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_, value, callback) {
9881
+ var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_, value, callback) {
9416
9882
  var isvalue, isPrice;
9417
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
9883
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9418
9884
  while (1) {
9419
9885
  switch (_context2.prev = _context2.next) {
9420
9886
  case 0:
@@ -9484,9 +9950,9 @@ var useColumns = (function (form) {
9484
9950
  message: '单价必须为数字'
9485
9951
  }, {
9486
9952
  validator: function () {
9487
- var _validator2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_, value, callback) {
9953
+ var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_, value, callback) {
9488
9954
  var isQuantity, isvalue;
9489
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
9955
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
9490
9956
  while (1) {
9491
9957
  switch (_context3.prev = _context3.next) {
9492
9958
  case 0:
@@ -9556,9 +10022,9 @@ var useColumns = (function (form) {
9556
10022
  message: '单价必须为数字'
9557
10023
  }, {
9558
10024
  validator: function () {
9559
- var _validator3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_, value, callback) {
10025
+ var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_, value, callback) {
9560
10026
  var isQuantity, isvalue;
9561
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
10027
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
9562
10028
  while (1) {
9563
10029
  switch (_context4.prev = _context4.next) {
9564
10030
  case 0:
@@ -9633,8 +10099,8 @@ var useColumns = (function (form) {
9633
10099
  message: '金额必须为数字'
9634
10100
  }, {
9635
10101
  validator: function () {
9636
- var _validator4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_, value, callback) {
9637
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
10102
+ var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_, value, callback) {
10103
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
9638
10104
  while (1) {
9639
10105
  switch (_context5.prev = _context5.next) {
9640
10106
  case 0:
@@ -9658,8 +10124,8 @@ var useColumns = (function (form) {
9658
10124
  }()
9659
10125
  }, {
9660
10126
  validator: function () {
9661
- var _validator5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_, value, callback) {
9662
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
10127
+ var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
10128
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
9663
10129
  while (1) {
9664
10130
  switch (_context6.prev = _context6.next) {
9665
10131
  case 0:
@@ -9697,7 +10163,7 @@ var useColumns = (function (form) {
9697
10163
  style: {
9698
10164
  padding: '0 10px'
9699
10165
  }
9700
- }, parseFloat(value).toFixed(2));
10166
+ }, formatSearch(parseFloat(value).toFixed(2), searchValue));
9701
10167
  }
9702
10168
  }
9703
10169
  }, {
@@ -9720,8 +10186,8 @@ var useColumns = (function (form) {
9720
10186
  message: '金额必须为数字'
9721
10187
  }, {
9722
10188
  validator: function () {
9723
- var _validator6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_, value, callback) {
9724
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
10189
+ var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
10190
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
9725
10191
  while (1) {
9726
10192
  switch (_context7.prev = _context7.next) {
9727
10193
  case 0:
@@ -9849,7 +10315,7 @@ var useColumns = (function (form) {
9849
10315
  ellipsis: true
9850
10316
  });
9851
10317
  });
9852
- }, [isTaxIncluded, editGood, controller, changeField, deduction]);
10318
+ }, [isTaxIncluded, editGood, controller, changeField, deduction, searchValue]);
9853
10319
  React.useEffect(function () {
9854
10320
  if (!changeField) return;
9855
10321
  var t = setTimeout(function () {
@@ -9923,6 +10389,20 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
9923
10389
 
9924
10390
  return MyDiv;
9925
10391
  }(React.Component);
10392
+ /** 格式搜索结果 */
10393
+
10394
+
10395
+ function formatSearch(value, search) {
10396
+ if (!value || !search) return value;
10397
+
10398
+ var __html = value.split(new RegExp(search, 'g')).join("<span class=\"kts-invoice-operate-goods-list-table-search-protrude\" >".concat(search, "</span>"));
10399
+
10400
+ return /*#__PURE__*/React.createElement("span", {
10401
+ dangerouslySetInnerHTML: {
10402
+ __html: __html
10403
+ }
10404
+ });
10405
+ }
9926
10406
 
9927
10407
  var useOnRow = (function () {
9928
10408
  /** 控制器 */
@@ -9931,9 +10411,9 @@ var useOnRow = (function () {
9931
10411
  return s.model;
9932
10412
  }, []);
9933
10413
  var onClick = React.useCallback( /*#__PURE__*/function () {
9934
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(record) {
10414
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
9935
10415
  var editGood;
9936
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10416
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9937
10417
  while (1) {
9938
10418
  switch (_context2.prev = _context2.next) {
9939
10419
  case 0:
@@ -9978,8 +10458,8 @@ var useOnRow = (function () {
9978
10458
  case 12:
9979
10459
  _context2.next = 14;
9980
10460
  return controller.pipeline( /*#__PURE__*/function () {
9981
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
9982
- return regeneratorRuntime.wrap(function _callee$(_context) {
10461
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
10462
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9983
10463
  while (1) {
9984
10464
  switch (_context.prev = _context.next) {
9985
10465
  case 0:
@@ -10040,8 +10520,8 @@ function useDeduction(controller) {
10040
10520
  // 更新 扣除额
10041
10521
  React.useEffect(function () {
10042
10522
  controller.pipeline( /*#__PURE__*/function () {
10043
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
10044
- return regeneratorRuntime.wrap(function _callee$(_context) {
10523
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
10524
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10045
10525
  while (1) {
10046
10526
  switch (_context.prev = _context.next) {
10047
10527
  case 0:
@@ -10063,8 +10543,8 @@ function useDeduction(controller) {
10063
10543
 
10064
10544
  React.useEffect(function () {
10065
10545
  controller.pipeline( /*#__PURE__*/function () {
10066
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
10067
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10546
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
10547
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10068
10548
  while (1) {
10069
10549
  switch (_context2.prev = _context2.next) {
10070
10550
  case 0:
@@ -10120,105 +10600,168 @@ var useRowSelection = (function () {
10120
10600
  var goodsList = controller.useMemo(function (s) {
10121
10601
  return s.goodsListState.goodsList;
10122
10602
  }, []);
10603
+ /** 搜索条件 */
10604
+
10605
+ var searchValue = controller.useMemo(function (s) {
10606
+ return s.goodsListState.searchValue;
10607
+ }, []);
10123
10608
  /** 是否全选 */
10609
+ // const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
10124
10610
 
10125
10611
  var isAll = controller.useMemo(function (s) {
10126
- return s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length;
10612
+ if (s.goodsListState.selectedGoodIndex.length <= 0) return false;
10613
+ var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
10614
+ return e.$index;
10615
+ });
10616
+ var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
10617
+ return seeGoodsIndex.some(function (t) {
10618
+ return e === t;
10619
+ });
10620
+ });
10621
+ return selectedGoodIndex.length === seeGoodsIndex.length;
10622
+ }, []);
10623
+ var indeterminate = controller.useMemo(function (s) {
10624
+ var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
10625
+ return e.$index;
10626
+ });
10627
+ var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
10628
+ return seeGoodsIndex.some(function (t) {
10629
+ return e === t;
10630
+ });
10631
+ });
10632
+ if (selectedGoodIndex.length === 0) return false;
10633
+ return selectedGoodIndex.length < seeGoodsIndex.length;
10127
10634
  }, []);
10128
10635
  /** 点击了全选 */
10129
10636
 
10130
- var onClickSelectAll = React.useCallback(function () {
10131
- if (isAll) {
10132
- controller.pipeline( /*#__PURE__*/function () {
10133
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
10134
- return regeneratorRuntime.wrap(function _callee$(_context) {
10135
- while (1) {
10136
- switch (_context.prev = _context.next) {
10137
- case 0:
10138
- s.goodsListState.selectedGoodIndex = [];
10139
-
10140
- case 1:
10141
- case "end":
10142
- return _context.stop();
10143
- }
10637
+ var onClickSelectAll = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
10638
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
10639
+ while (1) {
10640
+ switch (_context3.prev = _context3.next) {
10641
+ case 0:
10642
+ if (!isAll) {
10643
+ _context3.next = 5;
10644
+ break;
10144
10645
  }
10145
- }, _callee);
10146
- }));
10147
10646
 
10148
- return function (_x) {
10149
- return _ref.apply(this, arguments);
10150
- };
10151
- }())();
10152
- } else {
10153
- controller.pipeline( /*#__PURE__*/function () {
10154
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
10155
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10156
- while (1) {
10157
- switch (_context2.prev = _context2.next) {
10158
- case 0:
10159
- s.goodsListState.selectedGoodIndex = s.goodsListState.goodsList.map(function (e) {
10160
- return e.$index;
10161
- });
10647
+ _context3.next = 3;
10648
+ return controller.pipeline( /*#__PURE__*/function () {
10649
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
10650
+ var seeGoodsIndex;
10651
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10652
+ while (1) {
10653
+ switch (_context.prev = _context.next) {
10654
+ case 0:
10655
+ seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
10656
+ return e.$index;
10657
+ });
10658
+ s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
10659
+ return !seeGoodsIndex.some(function (t) {
10660
+ return e === t;
10661
+ });
10662
+ });
10162
10663
 
10163
- case 1:
10164
- case "end":
10165
- return _context2.stop();
10166
- }
10167
- }
10168
- }, _callee2);
10169
- }));
10664
+ case 2:
10665
+ case "end":
10666
+ return _context.stop();
10667
+ }
10668
+ }
10669
+ }, _callee);
10670
+ }));
10170
10671
 
10171
- return function (_x2) {
10172
- return _ref2.apply(this, arguments);
10173
- };
10174
- }())();
10175
- }
10176
- }, [controller, isAll]);
10672
+ return function (_x) {
10673
+ return _ref2.apply(this, arguments);
10674
+ };
10675
+ }())();
10676
+
10677
+ case 3:
10678
+ _context3.next = 7;
10679
+ break;
10680
+
10681
+ case 5:
10682
+ _context3.next = 7;
10683
+ return controller.pipeline( /*#__PURE__*/function () {
10684
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
10685
+ var seeGoodsIndex;
10686
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10687
+ while (1) {
10688
+ switch (_context2.prev = _context2.next) {
10689
+ case 0:
10690
+ seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
10691
+ return e.$index;
10692
+ });
10693
+ s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
10694
+ s.goodsListState.selectedGoodIndex = Array.from(new Set(s.goodsListState.selectedGoodIndex));
10695
+
10696
+ case 3:
10697
+ case "end":
10698
+ return _context2.stop();
10699
+ }
10700
+ }
10701
+ }, _callee2);
10702
+ }));
10703
+
10704
+ return function (_x2) {
10705
+ return _ref3.apply(this, arguments);
10706
+ };
10707
+ }())();
10708
+
10709
+ case 7:
10710
+ _context3.next = 9;
10711
+ return sortOut(true);
10712
+
10713
+ case 9:
10714
+ case "end":
10715
+ return _context3.stop();
10716
+ }
10717
+ }
10718
+ }, _callee3);
10719
+ })), [controller, isAll]);
10177
10720
  var onSelect = React.useCallback( /*#__PURE__*/function () {
10178
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(record, selected) {
10179
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
10721
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
10722
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
10180
10723
  while (1) {
10181
- switch (_context5.prev = _context5.next) {
10724
+ switch (_context6.prev = _context6.next) {
10182
10725
  case 0:
10183
10726
  if (!selected) {
10184
- _context5.next = 5;
10727
+ _context6.next = 5;
10185
10728
  break;
10186
10729
  }
10187
10730
 
10188
- _context5.next = 3;
10731
+ _context6.next = 3;
10189
10732
  return controller.pipeline( /*#__PURE__*/function () {
10190
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
10191
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
10733
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
10734
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
10192
10735
  while (1) {
10193
- switch (_context3.prev = _context3.next) {
10736
+ switch (_context4.prev = _context4.next) {
10194
10737
  case 0:
10195
10738
  s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), [record.$index]);
10196
10739
  s.goodsListState = _objectSpread2({}, s.goodsListState);
10197
10740
 
10198
10741
  case 2:
10199
10742
  case "end":
10200
- return _context3.stop();
10743
+ return _context4.stop();
10201
10744
  }
10202
10745
  }
10203
- }, _callee3);
10746
+ }, _callee4);
10204
10747
  }));
10205
10748
 
10206
10749
  return function (_x5) {
10207
- return _ref4.apply(this, arguments);
10750
+ return _ref5.apply(this, arguments);
10208
10751
  };
10209
10752
  }())();
10210
10753
 
10211
10754
  case 3:
10212
- _context5.next = 7;
10755
+ _context6.next = 7;
10213
10756
  break;
10214
10757
 
10215
10758
  case 5:
10216
- _context5.next = 7;
10759
+ _context6.next = 7;
10217
10760
  return controller.pipeline( /*#__PURE__*/function () {
10218
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
10219
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
10761
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
10762
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
10220
10763
  while (1) {
10221
- switch (_context4.prev = _context4.next) {
10764
+ switch (_context5.prev = _context5.next) {
10222
10765
  case 0:
10223
10766
  s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
10224
10767
  return e !== record.$index;
@@ -10227,64 +10770,63 @@ var useRowSelection = (function () {
10227
10770
 
10228
10771
  case 2:
10229
10772
  case "end":
10230
- return _context4.stop();
10773
+ return _context5.stop();
10231
10774
  }
10232
10775
  }
10233
- }, _callee4);
10776
+ }, _callee5);
10234
10777
  }));
10235
10778
 
10236
10779
  return function (_x6) {
10237
- return _ref5.apply(this, arguments);
10780
+ return _ref6.apply(this, arguments);
10238
10781
  };
10239
10782
  }())();
10240
10783
 
10241
10784
  case 7:
10242
- _context5.next = 9;
10785
+ _context6.next = 9;
10243
10786
  return sortOut(selected);
10244
10787
 
10245
10788
  case 9:
10246
10789
  case "end":
10247
- return _context5.stop();
10790
+ return _context6.stop();
10248
10791
  }
10249
10792
  }
10250
- }, _callee5);
10793
+ }, _callee6);
10251
10794
  }));
10252
10795
 
10253
10796
  return function (_x3, _x4) {
10254
- return _ref3.apply(this, arguments);
10797
+ return _ref4.apply(this, arguments);
10255
10798
  };
10256
10799
  }(), [controller]);
10257
10800
  var columnTitle = React.useMemo(function () {
10258
10801
  return /*#__PURE__*/React.createElement(Checkbox, {
10259
10802
  onChange: onClickSelectAll,
10260
- indeterminate: selectedRowKeys.length > 0 && selectedRowKeys.length < goodsList.length,
10803
+ indeterminate: indeterminate,
10261
10804
  checked: isAll
10262
10805
  });
10263
- }, [goodsList, selectedRowKeys, onClickSelectAll, isAll]);
10806
+ }, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
10264
10807
  /** 选择了商品后 调整 折扣行 和 被折扣行 */
10265
10808
 
10266
10809
  var sortOut = React.useCallback( /*#__PURE__*/function () {
10267
- var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(selected) {
10268
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
10810
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
10811
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
10269
10812
  while (1) {
10270
- switch (_context7.prev = _context7.next) {
10813
+ switch (_context8.prev = _context8.next) {
10271
10814
  case 0:
10272
- _context7.next = 2;
10815
+ _context8.next = 2;
10273
10816
  return controller.wait();
10274
10817
 
10275
10818
  case 2:
10276
- _context7.next = 4;
10819
+ _context8.next = 4;
10277
10820
  return controller.pipeline( /*#__PURE__*/function () {
10278
- var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
10279
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
10821
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
10822
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
10280
10823
  while (1) {
10281
- switch (_context6.prev = _context6.next) {
10824
+ switch (_context7.prev = _context7.next) {
10282
10825
  case 0:
10283
10826
  s.goodsListState.selectedGoodIndex.forEach(function ($index) {
10284
10827
  var goods = s.goodsListState.goodsMap.get($index);
10285
10828
  if (!goods || goods.lineAttribute === LineAttributeType$1.正常) return; // 数组位置
10286
10829
 
10287
- // 数组位置
10288
10830
  var t = s.goodsListState.goodsList.indexOf(goods);
10289
10831
  goods.lineAttribute === LineAttributeType$1.折扣行 ? t-- : t++;
10290
10832
  var i = s.goodsListState.goodsList[t].$index;
@@ -10300,27 +10842,27 @@ var useRowSelection = (function () {
10300
10842
 
10301
10843
  case 1:
10302
10844
  case "end":
10303
- return _context6.stop();
10845
+ return _context7.stop();
10304
10846
  }
10305
10847
  }
10306
- }, _callee6);
10848
+ }, _callee7);
10307
10849
  }));
10308
10850
 
10309
10851
  return function (_x8) {
10310
- return _ref7.apply(this, arguments);
10852
+ return _ref8.apply(this, arguments);
10311
10853
  };
10312
10854
  }())();
10313
10855
 
10314
10856
  case 4:
10315
10857
  case "end":
10316
- return _context7.stop();
10858
+ return _context8.stop();
10317
10859
  }
10318
10860
  }
10319
- }, _callee7);
10861
+ }, _callee8);
10320
10862
  }));
10321
10863
 
10322
10864
  return function (_x7) {
10323
- return _ref6.apply(this, arguments);
10865
+ return _ref7.apply(this, arguments);
10324
10866
  };
10325
10867
  }(), [controller]);
10326
10868
  React.useEffect(function () {
@@ -10334,8 +10876,8 @@ var useRowSelection = (function () {
10334
10876
  };
10335
10877
  });
10336
10878
 
10337
- var css_248z$6 = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n margin: 0 10px;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend label {\n margin-right: 5px;\n}\n.kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-discount {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import {\n display: flex;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import .ktsAnt3x-btn {\n display: block;\n line-height: 0;\n width: auto;\n padding-right: 5px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-table-body {\n height: 263px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-explain {\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.kts-invoice-operate-goods-list-table table {\n border-bottom: 1px solid #d9d9d9 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td {\n padding: 0 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item {\n padding: 0;\n margin: 0;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item .ktsAnt3x-form-item-control {\n line-height: inherit;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-select-selection,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input:hover {\n border-right-width: 1px !important;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom-width: 1px;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-selection--single,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-auto-complete.ktsAnt3x-select .ktsAnt3x-input:hover,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-input {\n height: 30px;\n border-radius: 0;\n border-right-width: 0 !important;\n border-top-width: 0;\n border-left-width: 0;\n border-bottom-width: 0;\n box-shadow: none;\n}\n";
10338
- styleInject(css_248z$6);
10879
+ var css_248z$7 = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n display: flex;\n gap: 10px;\n padding-right: 10px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend label {\n margin-right: 5px;\n}\n.kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-discount {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import {\n display: flex;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import .ktsAnt3x-btn {\n display: block;\n line-height: 0;\n width: auto;\n padding-right: 5px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-table-body {\n height: 263px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-explain {\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.kts-invoice-operate-goods-list-table table {\n border-bottom: 1px solid #d9d9d9 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td {\n padding: 0 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item {\n padding: 0;\n margin: 0;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item .ktsAnt3x-form-item-control {\n line-height: inherit;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-select-selection,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input:hover {\n border-right-width: 1px !important;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom-width: 1px;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-selection--single,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-auto-complete.ktsAnt3x-select .ktsAnt3x-input:hover,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-input {\n height: 30px;\n border-radius: 0;\n border-right-width: 0 !important;\n border-top-width: 0;\n border-left-width: 0;\n border-bottom-width: 0;\n box-shadow: none;\n}\n.kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
10880
+ styleInject(css_248z$7);
10339
10881
 
10340
10882
  var GoodsList = /*#__PURE__*/function (_React$Component) {
10341
10883
  _inherits(GoodsList, _React$Component);
@@ -10366,6 +10908,15 @@ var Main = decorator(Form.create())(function (props) {
10366
10908
  var isprefab = controller.useMemo(function (s) {
10367
10909
  return s.model === 'prefab';
10368
10910
  }, []);
10911
+ var dataSource = controller.useMemo(function (s) {
10912
+ return s.goodsListState.goodsList;
10913
+ }, []);
10914
+ var searchValue = controller.useMemo(function (s) {
10915
+ return s.goodsListState.searchValue;
10916
+ }, []);
10917
+ var dataSourceSearch = React.useMemo(function () {
10918
+ return controller.getGoodsSearch(dataSource, searchValue);
10919
+ }, [dataSource, searchValue, controller]);
10369
10920
  /** 表格行事件 */
10370
10921
 
10371
10922
  var _onRow = useOnRow();
@@ -10376,8 +10927,8 @@ var Main = decorator(Form.create())(function (props) {
10376
10927
 
10377
10928
  React.useEffect(function () {
10378
10929
  controller.run( /*#__PURE__*/function () {
10379
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
10380
- return regeneratorRuntime.wrap(function _callee$(_context) {
10930
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
10931
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10381
10932
  while (1) {
10382
10933
  switch (_context.prev = _context.next) {
10383
10934
  case 0:
@@ -10400,8 +10951,8 @@ var Main = decorator(Form.create())(function (props) {
10400
10951
 
10401
10952
  React.useEffect(function () {
10402
10953
  controller.pipeline( /*#__PURE__*/function () {
10403
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s, form) {
10404
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
10954
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s, form) {
10955
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10405
10956
  while (1) {
10406
10957
  switch (_context2.prev = _context2.next) {
10407
10958
  case 0:
@@ -10425,8 +10976,8 @@ var Main = decorator(Form.create())(function (props) {
10425
10976
 
10426
10977
  React.useEffect(function () {
10427
10978
  controller.pipeline( /*#__PURE__*/function () {
10428
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
10429
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
10979
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
10980
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
10430
10981
  while (1) {
10431
10982
  switch (_context3.prev = _context3.next) {
10432
10983
  case 0:
@@ -10452,8 +11003,8 @@ var Main = decorator(Form.create())(function (props) {
10452
11003
 
10453
11004
  React.useEffect(function () {
10454
11005
  controller.pipeline( /*#__PURE__*/function () {
10455
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
10456
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
11006
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
11007
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
10457
11008
  while (1) {
10458
11009
  switch (_context4.prev = _context4.next) {
10459
11010
  case 0:
@@ -10476,8 +11027,8 @@ var Main = decorator(Form.create())(function (props) {
10476
11027
 
10477
11028
  React.useEffect(function () {
10478
11029
  controller.pipeline( /*#__PURE__*/function () {
10479
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
10480
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
11030
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
11031
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
10481
11032
  while (1) {
10482
11033
  switch (_context5.prev = _context5.next) {
10483
11034
  case 0:
@@ -10500,8 +11051,8 @@ var Main = decorator(Form.create())(function (props) {
10500
11051
 
10501
11052
  React.useEffect(function () {
10502
11053
  controller.pipeline( /*#__PURE__*/function () {
10503
- var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
10504
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
11054
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
11055
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
10505
11056
  while (1) {
10506
11057
  switch (_context6.prev = _context6.next) {
10507
11058
  case 0:
@@ -10529,7 +11080,7 @@ var Main = decorator(Form.create())(function (props) {
10529
11080
  className: "kts-invoice-operate-goods-list-able"
10530
11081
  }, /*#__PURE__*/React.createElement("div", {
10531
11082
  className: "kts-invoice-operate-goods-list-able-list"
10532
- }, /*#__PURE__*/React.createElement(AddRowButton, null), /*#__PURE__*/React.createElement(DelRowButton, null), /*#__PURE__*/React.createElement(AddDiscountRowButton, null), /*#__PURE__*/React.createElement(EndowCodeButton, null)), /*#__PURE__*/React.createElement("div", {
11083
+ }, /*#__PURE__*/React.createElement(AddRowButton, null), /*#__PURE__*/React.createElement(DelRowButton, null), /*#__PURE__*/React.createElement(AddDiscountRowButton, null), /*#__PURE__*/React.createElement(EndowCodeButton, null), /*#__PURE__*/React.createElement(Search, null)), /*#__PURE__*/React.createElement("div", {
10533
11084
  className: "kts-invoice-operate-goods-list-able-extend"
10534
11085
  }, props.menuExpansion, /*#__PURE__*/React.createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React.createElement("div", {
10535
11086
  className: classnames('kts-invoice-operate-goods-list-table', {
@@ -10548,9 +11099,7 @@ var Main = decorator(Form.create())(function (props) {
10548
11099
  row: TableRow
10549
11100
  }
10550
11101
  },
10551
- dataSource: controller.useMemo(function (s) {
10552
- return s.goodsListState.goodsList;
10553
- }, [controller]),
11102
+ dataSource: dataSourceSearch,
10554
11103
  columns: useColumns(props.form),
10555
11104
  rowSelection: useRowSelection(),
10556
11105
  onRow: function onRow(record) {
@@ -10563,8 +11112,8 @@ var Main = decorator(Form.create())(function (props) {
10563
11112
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Statistics, null)));
10564
11113
  });
10565
11114
 
10566
- var css_248z$7 = ".kts-invoice-operate-seller {\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message {\n flex: 1;\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list {\n width: 100%;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label::before {\n content: '*';\n position: relative;\n color: red;\n font-weight: bold;\n margin-right: 2px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-explain {\n position: absolute;\n right: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value textarea {\n flex: 1;\n margin-bottom: 0;\n border: none;\n border-radius: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title label {\n display: table-cell;\n vertical-align: middle;\n}\n";
10567
- styleInject(css_248z$7);
11115
+ var css_248z$8 = ".kts-invoice-operate-seller {\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message {\n flex: 1;\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list {\n width: 100%;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label::before {\n content: '*';\n position: relative;\n color: red;\n font-weight: bold;\n margin-right: 2px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-explain {\n position: absolute;\n right: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value textarea {\n flex: 1;\n margin-bottom: 0;\n border: none;\n border-radius: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title label {\n display: table-cell;\n vertical-align: middle;\n}\n";
11116
+ styleInject(css_248z$8);
10568
11117
 
10569
11118
  var TextArea = Input.TextArea;
10570
11119
 
@@ -10591,7 +11140,7 @@ var Buyer = /*#__PURE__*/function (_React$Component) {
10591
11140
  return _this;
10592
11141
  }
10593
11142
 
10594
- return Buyer;
11143
+ return _createClass(Buyer);
10595
11144
  }(React.Component);
10596
11145
  var Main$1 = decorator(Form.create())(function (props) {
10597
11146
  var form = props.form;
@@ -10708,8 +11257,8 @@ var Main$1 = decorator(Form.create())(function (props) {
10708
11257
  })( /*#__PURE__*/React.createElement(TextArea, null))))));
10709
11258
  });
10710
11259
 
10711
- var css_248z$8 = ".kts-invoice-operate-sign form {\n display: flex;\n}\n.kts-invoice-operate-sign form .ktsAnt3x-row.ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-sign form > div {\n flex: 1;\n text-align: center;\n}\n";
10712
- styleInject(css_248z$8);
11260
+ var css_248z$9 = ".kts-invoice-operate-sign form {\n display: flex;\n}\n.kts-invoice-operate-sign form .ktsAnt3x-row.ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-sign form > div {\n flex: 1;\n text-align: center;\n}\n";
11261
+ styleInject(css_248z$9);
10713
11262
 
10714
11263
  var Sign = decorator(Form.create())(function (props) {
10715
11264
  var form = props.form;
@@ -10761,8 +11310,8 @@ var ImportBuyerButton = (function () {
10761
11310
  var controller = default_1.useInvoiceController();
10762
11311
  var onClick = React.useCallback(function () {
10763
11312
  controller.pipeline( /*#__PURE__*/function () {
10764
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
10765
- return regeneratorRuntime.wrap(function _callee$(_context) {
11313
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
11314
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10766
11315
  while (1) {
10767
11316
  switch (_context.prev = _context.next) {
10768
11317
  case 0:
@@ -10888,10 +11437,10 @@ var BuyerNameInput = (function (props) {
10888
11437
  /** 点击了选择项 */
10889
11438
 
10890
11439
  var onClickItem = React.useCallback( /*#__PURE__*/function () {
10891
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
11440
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
10892
11441
  var _controller$formList$;
10893
11442
 
10894
- return regeneratorRuntime.wrap(function _callee$(_context) {
11443
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
10895
11444
  while (1) {
10896
11445
  switch (_context.prev = _context.next) {
10897
11446
  case 0:
@@ -10969,8 +11518,8 @@ function useDataSource() {
10969
11518
  return s.buyerState.autoContainer;
10970
11519
  }, []);
10971
11520
  var onBuyNameChange = React.useCallback( /*#__PURE__*/function () {
10972
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(e) {
10973
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
11521
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
11522
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10974
11523
  while (1) {
10975
11524
  switch (_context2.prev = _context2.next) {
10976
11525
  case 0:
@@ -11031,8 +11580,8 @@ function interval(i, t) {
11031
11580
  }
11032
11581
  }
11033
11582
 
11034
- var css_248z$9 = ".kts-invoice-operate-buyer {\n display: flex;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message {\n flex: 1;\n display: flex;\n position: relative;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list {\n width: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children .ktsAnt3x-btn {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-explain {\n position: absolute;\n left: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-Import {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-password {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title label {\n display: table-cell;\n vertical-align: middle;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover {\n padding-top: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-inner-content {\n padding: 6px 0;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-arrow {\n display: none;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content {\n width: 567px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block {\n padding: 14px 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block label {\n display: block;\n font-size: 12px;\n color: #666666;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued {\n padding: 0;\n margin: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued li {\n list-style: none;\n width: 50%;\n float: left;\n margin-bottom: 20px;\n padding: 0 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company {\n padding: 0;\n margin: 0;\n font-size: 12px;\n padding: 10px;\n font-weight: bold;\n color: #000000;\n cursor: pointer;\n transition: background 0.4s;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:hover {\n background: #e6e6e6e6;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:last-child {\n margin-bottom: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company li {\n list-style: none;\n width: 50%;\n float: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding-right: 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag {\n line-height: 1;\n padding: 4px 12px;\n background: #F3F3F3;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: bold;\n color: #000;\n cursor: pointer;\n transition: background 0.4s;\n display: inline-block;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag:hover {\n background: #e6e6e6e6;\n}\n";
11035
- styleInject(css_248z$9);
11583
+ var css_248z$a = ".kts-invoice-operate-buyer {\n display: flex;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message {\n flex: 1;\n display: flex;\n position: relative;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list {\n width: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children .ktsAnt3x-btn {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-explain {\n position: absolute;\n left: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-Import {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-password {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title label {\n display: table-cell;\n vertical-align: middle;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover {\n padding-top: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-inner-content {\n padding: 6px 0;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-arrow {\n display: none;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content {\n width: 567px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block {\n padding: 14px 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block label {\n display: block;\n font-size: 12px;\n color: #666666;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued {\n padding: 0;\n margin: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued li {\n list-style: none;\n width: 50%;\n float: left;\n margin-bottom: 20px;\n padding: 0 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company {\n padding: 0;\n margin: 0;\n font-size: 12px;\n padding: 10px;\n font-weight: bold;\n color: #000000;\n cursor: pointer;\n transition: background 0.4s;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:hover {\n background: #e6e6e6e6;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:last-child {\n margin-bottom: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company li {\n list-style: none;\n width: 50%;\n float: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding-right: 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag {\n line-height: 1;\n padding: 4px 12px;\n background: #F3F3F3;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: bold;\n color: #000;\n cursor: pointer;\n transition: background 0.4s;\n display: inline-block;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag:hover {\n background: #e6e6e6e6;\n}\n";
11584
+ styleInject(css_248z$a);
11036
11585
 
11037
11586
  var Text$5 = Typography.Text;
11038
11587
 
@@ -11059,7 +11608,7 @@ var Buyer$1 = /*#__PURE__*/function (_React$Component) {
11059
11608
  return _this;
11060
11609
  }
11061
11610
 
11062
- return Buyer;
11611
+ return _createClass(Buyer);
11063
11612
  }(React.Component);
11064
11613
  var Main$2 = decorator(Form.create())(function (props) {
11065
11614
  var form = props.form;
@@ -11194,8 +11743,8 @@ var ImportBuyerDrawer = (function () {
11194
11743
 
11195
11744
  var onClose = React.useCallback(function () {
11196
11745
  controller.pipeline( /*#__PURE__*/function () {
11197
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
11198
- return regeneratorRuntime.wrap(function _callee$(_context) {
11746
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
11747
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11199
11748
  while (1) {
11200
11749
  switch (_context.prev = _context.next) {
11201
11750
  case 0:
@@ -11257,10 +11806,10 @@ var DrawerBody$1 = function DrawerBody() {
11257
11806
  onRow: function onRow(record) {
11258
11807
  return {
11259
11808
  onClick: function () {
11260
- var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
11809
+ var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11261
11810
  var re, _controller$formList$;
11262
11811
 
11263
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
11812
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11264
11813
  while (1) {
11265
11814
  switch (_context3.prev = _context3.next) {
11266
11815
  case 0:
@@ -11273,8 +11822,8 @@ var DrawerBody$1 = function DrawerBody() {
11273
11822
  if (re) {
11274
11823
  (_controller$formList$ = controller.formList.get('buyer')) === null || _controller$formList$ === void 0 ? void 0 : _controller$formList$.setFieldsValue(re);
11275
11824
  controller.pipeline( /*#__PURE__*/function () {
11276
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
11277
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
11825
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
11826
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11278
11827
  while (1) {
11279
11828
  switch (_context2.prev = _context2.next) {
11280
11829
  case 0:
@@ -11324,8 +11873,8 @@ var ImportGoodsDrawer = (function () {
11324
11873
  var onClose = React.useCallback(function () {
11325
11874
  console.log('===> 关闭抽屉');
11326
11875
  controller.pipeline( /*#__PURE__*/function () {
11327
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
11328
- return regeneratorRuntime.wrap(function _callee$(_context) {
11876
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
11877
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11329
11878
  while (1) {
11330
11879
  switch (_context.prev = _context.next) {
11331
11880
  case 0:
@@ -11393,8 +11942,8 @@ var DrawerBody$2 = function DrawerBody() {
11393
11942
  return {
11394
11943
  onClick: function onClick() {
11395
11944
  controller.run( /*#__PURE__*/function () {
11396
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
11397
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
11945
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
11946
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11398
11947
  while (1) {
11399
11948
  switch (_context2.prev = _context2.next) {
11400
11949
  case 0:
@@ -11540,8 +12089,8 @@ function cutStr(str, L) {
11540
12089
  }
11541
12090
  }
11542
12091
 
11543
- var css_248z$a = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
11544
- styleInject(css_248z$a);
12092
+ var css_248z$b = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
12093
+ styleInject(css_248z$b);
11545
12094
 
11546
12095
  var TreeNode = Tree.TreeNode;
11547
12096
  var confirm = Modal.confirm;
@@ -11558,8 +12107,8 @@ var EndowCodeDrawer = (function () {
11558
12107
 
11559
12108
  var onClose = React.useCallback(function () {
11560
12109
  controller.pipeline( /*#__PURE__*/function () {
11561
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
11562
- return regeneratorRuntime.wrap(function _callee$(_context) {
12110
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
12111
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11563
12112
  while (1) {
11564
12113
  switch (_context.prev = _context.next) {
11565
12114
  case 0:
@@ -11582,9 +12131,9 @@ var EndowCodeDrawer = (function () {
11582
12131
  React.useEffect(function () {
11583
12132
  if (visible) {
11584
12133
  controller.pipeline( /*#__PURE__*/function () {
11585
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(s) {
12134
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
11586
12135
  var endowcodeGoodIndex, good, getDefaultValue;
11587
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
12136
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11588
12137
  while (1) {
11589
12138
  switch (_context2.prev = _context2.next) {
11590
12139
  case 0:
@@ -11714,9 +12263,9 @@ var DrawerBody$3 = function DrawerBody(props) {
11714
12263
  setDataSource = _React$useState6[1];
11715
12264
 
11716
12265
  var onSearch = React.useCallback( /*#__PURE__*/function () {
11717
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(e) {
12266
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
11718
12267
  var arr;
11719
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
12268
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11720
12269
  while (1) {
11721
12270
  switch (_context3.prev = _context3.next) {
11722
12271
  case 0:
@@ -11749,8 +12298,8 @@ var DrawerBody$3 = function DrawerBody(props) {
11749
12298
  })[0];
11750
12299
  if (!info) return;
11751
12300
  !readOnlyTaxRate && actions.setFieldState('taxRate', /*#__PURE__*/function () {
11752
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(s) {
11753
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
12301
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
12302
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
11754
12303
  while (1) {
11755
12304
  switch (_context4.prev = _context4.next) {
11756
12305
  case 0:
@@ -11771,8 +12320,8 @@ var DrawerBody$3 = function DrawerBody(props) {
11771
12320
  };
11772
12321
  }());
11773
12322
  actions.setFieldState('shorthand', /*#__PURE__*/function () {
11774
- var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(s) {
11775
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
12323
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
12324
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11776
12325
  while (1) {
11777
12326
  switch (_context5.prev = _context5.next) {
11778
12327
  case 0:
@@ -11873,8 +12422,8 @@ var DrawerBody$3 = function DrawerBody(props) {
11873
12422
  return e.id === id;
11874
12423
  })[0];
11875
12424
  !readOnlyTaxRate && actions.setFieldState('taxRate', /*#__PURE__*/function () {
11876
- var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
11877
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
12425
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
12426
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
11878
12427
  while (1) {
11879
12428
  switch (_context6.prev = _context6.next) {
11880
12429
  case 0:
@@ -11895,8 +12444,8 @@ var DrawerBody$3 = function DrawerBody(props) {
11895
12444
  };
11896
12445
  }());
11897
12446
  actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
11898
- var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(s) {
11899
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
12447
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
12448
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
11900
12449
  while (1) {
11901
12450
  switch (_context7.prev = _context7.next) {
11902
12451
  case 0:
@@ -11917,8 +12466,8 @@ var DrawerBody$3 = function DrawerBody(props) {
11917
12466
  };
11918
12467
  }());
11919
12468
  actions.setFieldState('shorthand', /*#__PURE__*/function () {
11920
- var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(s) {
11921
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
12469
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(s) {
12470
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
11922
12471
  while (1) {
11923
12472
  switch (_context8.prev = _context8.next) {
11924
12473
  case 0:
@@ -11941,14 +12490,14 @@ var DrawerBody$3 = function DrawerBody(props) {
11941
12490
  setVisible(false);
11942
12491
  }, [list, actions, readOnlyTaxRate]);
11943
12492
  React.useEffect(function () {
11944
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
12493
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
11945
12494
  var fn, list;
11946
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
12495
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
11947
12496
  while (1) {
11948
12497
  switch (_context10.prev = _context10.next) {
11949
12498
  case 0:
11950
- fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
11951
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
12499
+ fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
12500
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
11952
12501
  while (1) {
11953
12502
  switch (_context9.prev = _context9.next) {
11954
12503
  case 0:
@@ -12035,9 +12584,9 @@ var DrawerBody$3 = function DrawerBody(props) {
12035
12584
 
12036
12585
  var onSubmit = React.useCallback(function (values) {
12037
12586
  controller.pipeline( /*#__PURE__*/function () {
12038
- var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
12587
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(s) {
12039
12588
  var endowCodeGood;
12040
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
12589
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
12041
12590
  while (1) {
12042
12591
  switch (_context11.prev = _context11.next) {
12043
12592
  case 0:
@@ -12057,17 +12606,20 @@ var DrawerBody$3 = function DrawerBody(props) {
12057
12606
  good.favouredPolicyName = values.favouredPolicyName;
12058
12607
  var taxRate = chain$1(bignumber(values.taxRate)).dotDivide(bignumber(100)).add(bignumber(1)).done(); // 是否含税
12059
12608
 
12060
- if (s.goodsListState.isTaxIncluded) {
12061
- var lineAmountExcludeTax = chain$1(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
12062
- var priceExcludeTax = good.priceIncludeTax ? chain$1(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined;
12063
- good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
12064
- good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined;
12065
- } else {
12066
- var lineAmountIncludeTax = chain$1(bignumber(good.lineAmountExcludeTax)).multiply(taxRate).done();
12067
- var priceIncludeTax = good.priceExcludeTax ? chain$1(bignumber(good.priceExcludeTax)).multiply(taxRate).done() : undefined;
12068
- good.lineAmountIncludeTax = lineAmountIncludeTax.toNumber().toFixed(2);
12069
- good.priceIncludeTax = (priceIncludeTax ? format15(priceIncludeTax.toNumber()) : undefined) || undefined;
12070
- }
12609
+ var lineAmountExcludeTax = chain$1(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
12610
+ var priceExcludeTax = good.priceIncludeTax ? chain$1(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined;
12611
+ good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
12612
+ good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined; // if (s.goodsListState.isTaxIncluded) {
12613
+ // const lineAmountExcludeTax = chain(bignumber(good.lineAmountIncludeTax)).dotDivide(taxRate).done();
12614
+ // const priceExcludeTax = good.priceIncludeTax ? chain(bignumber(good.priceIncludeTax)).dotDivide(taxRate).done() : undefined
12615
+ // good.lineAmountExcludeTax = lineAmountExcludeTax.toNumber().toFixed(2);
12616
+ // good.priceExcludeTax = (priceExcludeTax ? format15(priceExcludeTax.toNumber()) : undefined) || undefined;
12617
+ // } else {
12618
+ // const lineAmountIncludeTax = chain(bignumber(good.lineAmountExcludeTax)).multiply(taxRate).done();
12619
+ // const priceIncludeTax = good.priceExcludeTax ? chain(bignumber(good.priceExcludeTax)).multiply(taxRate).done() : undefined
12620
+ // good.lineAmountIncludeTax = lineAmountIncludeTax.toNumber().toFixed(2);
12621
+ // good.priceIncludeTax = (priceIncludeTax ? format15(priceIncludeTax.toNumber()) : undefined) || undefined;
12622
+ // }
12071
12623
 
12072
12624
  good.taxAmount = countTaxAmount(good.lineAmountIncludeTax || 0, s.goodsListState.deduction, values.taxRate);
12073
12625
  }); //截取名称
@@ -12125,8 +12677,8 @@ var DrawerBody$3 = function DrawerBody(props) {
12125
12677
  FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
12126
12678
  setTaxRate(e.value);
12127
12679
  actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
12128
- var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
12129
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
12680
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
12681
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
12130
12682
  while (1) {
12131
12683
  switch (_context12.prev = _context12.next) {
12132
12684
  case 0:
@@ -12149,8 +12701,8 @@ var DrawerBody$3 = function DrawerBody(props) {
12149
12701
  FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
12150
12702
  setFavouredPolicyMark(e.value);
12151
12703
  actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
12152
- var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
12153
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
12704
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(s) {
12705
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
12154
12706
  while (1) {
12155
12707
  switch (_context13.prev = _context13.next) {
12156
12708
  case 0:
@@ -12254,8 +12806,8 @@ var DrawerBody$3 = function DrawerBody(props) {
12254
12806
  }, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(Button, {
12255
12807
  onClick: function onClick() {
12256
12808
  controller.pipeline( /*#__PURE__*/function () {
12257
- var _ref14 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(s) {
12258
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
12809
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
12810
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
12259
12811
  while (1) {
12260
12812
  switch (_context14.prev = _context14.next) {
12261
12813
  case 0: