kts-component-invoice-operate 3.2.181-27 → 3.2.181-29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -13910,6 +13910,42 @@ var useColumns = (function (form) {
13910
13910
  }
13911
13911
 
13912
13912
  return onChange;
13913
+ }(),
13914
+ onBlur: function () {
13915
+ var _onBlur = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
13916
+ var _rawValue$replace;
13917
+
13918
+ var key, rawValue, trimmedValue;
13919
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
13920
+ while (1) {
13921
+ switch (_context6.prev = _context6.next) {
13922
+ case 0:
13923
+ _context6.next = 2;
13924
+ return controller.wait();
13925
+
13926
+ case 2:
13927
+ key = isMyShow ? 'itemModelNameSelf' : 'itemModelName';
13928
+ rawValue = form.getFieldsValue().itemModelName;
13929
+ trimmedValue = (_rawValue$replace = rawValue === null || rawValue === void 0 ? void 0 : rawValue.replace(/^\s+|\s+$/g, '')) !== null && _rawValue$replace !== void 0 ? _rawValue$replace : ''; // 失焦时才回写干净的值
13930
+
13931
+ form.setFieldsValue({
13932
+ itemModelName: trimmedValue
13933
+ });
13934
+ controller.setEditGood(_defineProperty({}, key, trimmedValue));
13935
+
13936
+ case 7:
13937
+ case "end":
13938
+ return _context6.stop();
13939
+ }
13940
+ }
13941
+ }, _callee6);
13942
+ }));
13943
+
13944
+ function onBlur() {
13945
+ return _onBlur.apply(this, arguments);
13946
+ }
13947
+
13948
+ return onBlur;
13913
13949
  }()
13914
13950
  })));
13915
13951
  } else {
@@ -13940,12 +13976,12 @@ var useColumns = (function (form) {
13940
13976
  return rootElement || document.body;
13941
13977
  },
13942
13978
  onChange: function () {
13943
- var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
13944
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
13979
+ var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
13980
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
13945
13981
  while (1) {
13946
- switch (_context6.prev = _context6.next) {
13982
+ switch (_context7.prev = _context7.next) {
13947
13983
  case 0:
13948
- _context6.next = 2;
13984
+ _context7.next = 2;
13949
13985
  return controller.wait();
13950
13986
 
13951
13987
  case 2:
@@ -13955,10 +13991,10 @@ var useColumns = (function (form) {
13955
13991
 
13956
13992
  case 3:
13957
13993
  case "end":
13958
- return _context6.stop();
13994
+ return _context7.stop();
13959
13995
  }
13960
13996
  }
13961
- }, _callee6);
13997
+ }, _callee7);
13962
13998
  }));
13963
13999
 
13964
14000
  function onChange() {
@@ -13994,13 +14030,13 @@ var useColumns = (function (form) {
13994
14030
  message: '数量必须为数字'
13995
14031
  }, {
13996
14032
  validator: function () {
13997
- var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
14033
+ var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
13998
14034
  var isvalue, isPrice;
13999
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
14035
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
14000
14036
  while (1) {
14001
- switch (_context7.prev = _context7.next) {
14037
+ switch (_context8.prev = _context8.next) {
14002
14038
  case 0:
14003
- _context7.next = 2;
14039
+ _context8.next = 2;
14004
14040
  return controller.wait();
14005
14041
 
14006
14042
  case 2:
@@ -14008,21 +14044,21 @@ var useColumns = (function (form) {
14008
14044
  isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
14009
14045
 
14010
14046
  if (!(isvalue || isPrice === isvalue)) {
14011
- _context7.next = 6;
14047
+ _context8.next = 6;
14012
14048
  break;
14013
14049
  }
14014
14050
 
14015
- return _context7.abrupt("return");
14051
+ return _context8.abrupt("return");
14016
14052
 
14017
14053
  case 6:
14018
14054
  callback('请输入数量');
14019
14055
 
14020
14056
  case 7:
14021
14057
  case "end":
14022
- return _context7.stop();
14058
+ return _context8.stop();
14023
14059
  }
14024
14060
  }
14025
- }, _callee7);
14061
+ }, _callee8);
14026
14062
  }));
14027
14063
 
14028
14064
  function validator(_x6, _x7, _x8) {
@@ -14039,21 +14075,21 @@ var useColumns = (function (form) {
14039
14075
  maxLength: 25,
14040
14076
  loading: isCipher(changeField, "quantity"),
14041
14077
  onChange: function () {
14042
- var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
14043
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
14078
+ var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
14079
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
14044
14080
  while (1) {
14045
- switch (_context8.prev = _context8.next) {
14081
+ switch (_context9.prev = _context9.next) {
14046
14082
  case 0:
14047
14083
  setChangeField('quantity');
14048
- _context8.next = 3;
14084
+ _context9.next = 3;
14049
14085
  return onChangeQuantity(controller, form, record);
14050
14086
 
14051
14087
  case 3:
14052
14088
  case "end":
14053
- return _context8.stop();
14089
+ return _context9.stop();
14054
14090
  }
14055
14091
  }
14056
- }, _callee8);
14092
+ }, _callee9);
14057
14093
  }));
14058
14094
 
14059
14095
  function onChange() {
@@ -14091,13 +14127,13 @@ var useColumns = (function (form) {
14091
14127
  message: '单价必须为数字且最多保留8位小数'
14092
14128
  }, {
14093
14129
  validator: function () {
14094
- var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
14130
+ var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
14095
14131
  var quantity, isQuantityValid, isValueValid;
14096
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
14132
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
14097
14133
  while (1) {
14098
- switch (_context9.prev = _context9.next) {
14134
+ switch (_context10.prev = _context10.next) {
14099
14135
  case 0:
14100
- _context9.next = 2;
14136
+ _context10.next = 2;
14101
14137
  return controller.wait();
14102
14138
 
14103
14139
  case 2:
@@ -14111,34 +14147,34 @@ var useColumns = (function (form) {
14111
14147
  // 允许两者都为空
14112
14148
 
14113
14149
  if (!(!isValueValid && !isQuantityValid)) {
14114
- _context9.next = 7;
14150
+ _context10.next = 7;
14115
14151
  break;
14116
14152
  }
14117
14153
 
14118
- return _context9.abrupt("return");
14154
+ return _context10.abrupt("return");
14119
14155
 
14120
14156
  case 7:
14121
14157
  if (isValueValid) {
14122
- _context9.next = 9;
14158
+ _context10.next = 9;
14123
14159
  break;
14124
14160
  }
14125
14161
 
14126
- return _context9.abrupt("return", callback('金额不能为空'));
14162
+ return _context10.abrupt("return", callback('金额不能为空'));
14127
14163
 
14128
14164
  case 9:
14129
14165
  if (isQuantityValid) {
14130
- _context9.next = 11;
14166
+ _context10.next = 11;
14131
14167
  break;
14132
14168
  }
14133
14169
 
14134
- return _context9.abrupt("return", callback('数量不能为空'));
14170
+ return _context10.abrupt("return", callback('数量不能为空'));
14135
14171
 
14136
14172
  case 11:
14137
14173
  case "end":
14138
- return _context9.stop();
14174
+ return _context10.stop();
14139
14175
  }
14140
14176
  }
14141
- }, _callee9);
14177
+ }, _callee10);
14142
14178
  }));
14143
14179
 
14144
14180
  function validator(_x9, _x10, _x11) {
@@ -14186,13 +14222,13 @@ var useColumns = (function (form) {
14186
14222
  message: '单价必须为数字且最多保留8位小数'
14187
14223
  }, {
14188
14224
  validator: function () {
14189
- var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
14225
+ var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
14190
14226
  var quantity, isQuantityValid, isValueValid;
14191
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
14227
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
14192
14228
  while (1) {
14193
- switch (_context10.prev = _context10.next) {
14229
+ switch (_context11.prev = _context11.next) {
14194
14230
  case 0:
14195
- _context10.next = 2;
14231
+ _context11.next = 2;
14196
14232
  return controller.wait();
14197
14233
 
14198
14234
  case 2:
@@ -14206,34 +14242,34 @@ var useColumns = (function (form) {
14206
14242
  // 允许两者都为空
14207
14243
 
14208
14244
  if (!(!isValueValid && !isQuantityValid)) {
14209
- _context10.next = 7;
14245
+ _context11.next = 7;
14210
14246
  break;
14211
14247
  }
14212
14248
 
14213
- return _context10.abrupt("return");
14249
+ return _context11.abrupt("return");
14214
14250
 
14215
14251
  case 7:
14216
14252
  if (isValueValid) {
14217
- _context10.next = 9;
14253
+ _context11.next = 9;
14218
14254
  break;
14219
14255
  }
14220
14256
 
14221
- return _context10.abrupt("return", callback('金额不能为空'));
14257
+ return _context11.abrupt("return", callback('金额不能为空'));
14222
14258
 
14223
14259
  case 9:
14224
14260
  if (isQuantityValid) {
14225
- _context10.next = 11;
14261
+ _context11.next = 11;
14226
14262
  break;
14227
14263
  }
14228
14264
 
14229
- return _context10.abrupt("return", callback('数量不能为空'));
14265
+ return _context11.abrupt("return", callback('数量不能为空'));
14230
14266
 
14231
14267
  case 11:
14232
14268
  case "end":
14233
- return _context10.stop();
14269
+ return _context11.stop();
14234
14270
  }
14235
14271
  }
14236
- }, _callee10);
14272
+ }, _callee11);
14237
14273
  }));
14238
14274
 
14239
14275
  function validator(_x12, _x13, _x14) {
@@ -14283,10 +14319,10 @@ var useColumns = (function (form) {
14283
14319
  message: '金额必须为数字'
14284
14320
  }, {
14285
14321
  validator: function () {
14286
- var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
14287
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
14322
+ var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
14323
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
14288
14324
  while (1) {
14289
- switch (_context11.prev = _context11.next) {
14325
+ switch (_context12.prev = _context12.next) {
14290
14326
  case 0:
14291
14327
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
14292
14328
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -14294,10 +14330,10 @@ var useColumns = (function (form) {
14294
14330
 
14295
14331
  case 1:
14296
14332
  case "end":
14297
- return _context11.stop();
14333
+ return _context12.stop();
14298
14334
  }
14299
14335
  }
14300
- }, _callee11);
14336
+ }, _callee12);
14301
14337
  }));
14302
14338
 
14303
14339
  function validator(_x15, _x16, _x17) {
@@ -14308,10 +14344,10 @@ var useColumns = (function (form) {
14308
14344
  }()
14309
14345
  }, {
14310
14346
  validator: function () {
14311
- var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
14312
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
14347
+ var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_, value, callback) {
14348
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
14313
14349
  while (1) {
14314
- switch (_context12.prev = _context12.next) {
14350
+ switch (_context13.prev = _context13.next) {
14315
14351
  case 0:
14316
14352
  if (deduction && parseFloat(value) <= deduction) {
14317
14353
  callback('扣除额不能大于等于价税合计');
@@ -14319,10 +14355,10 @@ var useColumns = (function (form) {
14319
14355
 
14320
14356
  case 1:
14321
14357
  case "end":
14322
- return _context12.stop();
14358
+ return _context13.stop();
14323
14359
  }
14324
14360
  }
14325
- }, _callee12);
14361
+ }, _callee13);
14326
14362
  }));
14327
14363
 
14328
14364
  function validator(_x18, _x19, _x20) {
@@ -14371,10 +14407,10 @@ var useColumns = (function (form) {
14371
14407
  message: '金额必须为数字'
14372
14408
  }, {
14373
14409
  validator: function () {
14374
- var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_, value, callback) {
14375
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
14410
+ var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(_, value, callback) {
14411
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
14376
14412
  while (1) {
14377
- switch (_context13.prev = _context13.next) {
14413
+ switch (_context14.prev = _context14.next) {
14378
14414
  case 0:
14379
14415
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
14380
14416
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -14382,10 +14418,10 @@ var useColumns = (function (form) {
14382
14418
 
14383
14419
  case 1:
14384
14420
  case "end":
14385
- return _context13.stop();
14421
+ return _context14.stop();
14386
14422
  }
14387
14423
  }
14388
- }, _callee13);
14424
+ }, _callee14);
14389
14425
  }));
14390
14426
 
14391
14427
  function validator(_x21, _x22, _x23) {
@@ -14472,12 +14508,117 @@ var useColumns = (function (form) {
14472
14508
  width: 119,
14473
14509
  render: function render(value, record) {
14474
14510
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
14475
- return getFieldDecorator('taxAmount', {
14511
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('taxAmount', {
14476
14512
  initialValue: editGood.taxAmount,
14477
- rules: getReplenishRules('taxAmount')
14478
- })( /*#__PURE__*/React.createElement(MyDiv, {
14479
- loading: isCipher(changeField, 'taxAmount')
14480
- }));
14513
+ getValueFromEvent: onNumberValueChange,
14514
+ rules: [].concat(_toConsumableArray(getReplenishRules('taxAmount')), [{
14515
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
14516
+ message: '税额必须为数字'
14517
+ }, {
14518
+ validator: function () {
14519
+ var _validator8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(_, taxAmountValue, callback) {
14520
+ var amount, taxRate, amountNum, taxRateNum, taxAmountNum, calculatedTaxAmount, diff;
14521
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
14522
+ while (1) {
14523
+ switch (_context15.prev = _context15.next) {
14524
+ case 0:
14525
+ _context15.next = 2;
14526
+ return controller.wait();
14527
+
14528
+ case 2:
14529
+ amount = getFieldValue(isTaxIncluded ? 'lineAmountIncludeTax' : 'lineAmountExcludeTax');
14530
+ taxRate = getFieldValue('taxRate');
14531
+
14532
+ if (!(!amount || amount === '' || !taxRate || taxRate === '' || !taxAmountValue || taxAmountValue === '')) {
14533
+ _context15.next = 6;
14534
+ break;
14535
+ }
14536
+
14537
+ return _context15.abrupt("return");
14538
+
14539
+ case 6:
14540
+ amountNum = parseFloat(amount);
14541
+ taxRateNum = parseFloat(taxRate);
14542
+ taxAmountNum = parseFloat(taxAmountValue); // 根据是否含税使用不同的计算方式
14543
+
14544
+ if (isTaxIncluded) {
14545
+ // 含税:税额 = (含税金额 - 扣除额) / (1 + 税率) * 税率
14546
+ calculatedTaxAmount = countTaxAmount(amountNum, deduction || 0, taxRateNum);
14547
+ } else {
14548
+ // 不含税:税额 = 不含税金额 * 税率 / 100
14549
+ calculatedTaxAmount = amountNum * taxRateNum / 100;
14550
+ }
14551
+
14552
+ if (!(calculatedTaxAmount === undefined || isNaN(calculatedTaxAmount))) {
14553
+ _context15.next = 12;
14554
+ break;
14555
+ }
14556
+
14557
+ return _context15.abrupt("return");
14558
+
14559
+ case 12:
14560
+ // 校验:|计算税额 - 实际税额| <= 0.06
14561
+ diff = Math.abs(calculatedTaxAmount - taxAmountNum);
14562
+
14563
+ if (diff > 0.06) {
14564
+ callback("\u7A0E\u989D\u4E0E\u8BA1\u7B97\u503C\uFF08".concat(calculatedTaxAmount.toFixed(2), "\uFF09\u7684\u5DEE\u989D\uFF08").concat(diff.toFixed(2), "\uFF09\u8D85\u8FC70.06\uFF0C\u8BF7\u8C03\u6574"));
14565
+ }
14566
+
14567
+ case 14:
14568
+ case "end":
14569
+ return _context15.stop();
14570
+ }
14571
+ }
14572
+ }, _callee15);
14573
+ }));
14574
+
14575
+ function validator(_x24, _x25, _x26) {
14576
+ return _validator8.apply(this, arguments);
14577
+ }
14578
+
14579
+ return validator;
14580
+ }()
14581
+ }])
14582
+ })( /*#__PURE__*/React.createElement(MyInput, {
14583
+ style: {
14584
+ textAlign: 'right'
14585
+ },
14586
+ maxLength: 25,
14587
+ loading: isCipher(changeField, 'taxAmount'),
14588
+ onChange: function () {
14589
+ var _onChange5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
14590
+ var taxAmount;
14591
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
14592
+ while (1) {
14593
+ switch (_context16.prev = _context16.next) {
14594
+ case 0:
14595
+ setChangeField('taxAmount');
14596
+ _context16.next = 3;
14597
+ return controller.wait();
14598
+
14599
+ case 3:
14600
+ taxAmount = form.getFieldsValue().taxAmount;
14601
+ controller.setEditGood({
14602
+ taxAmount: taxAmount
14603
+ });
14604
+ _context16.next = 7;
14605
+ return clearCalculatingField(controller);
14606
+
14607
+ case 7:
14608
+ case "end":
14609
+ return _context16.stop();
14610
+ }
14611
+ }
14612
+ }, _callee16);
14613
+ }));
14614
+
14615
+ function onChange() {
14616
+ return _onChange5.apply(this, arguments);
14617
+ }
14618
+
14619
+ return onChange;
14620
+ }()
14621
+ })));
14481
14622
  } else {
14482
14623
  return /*#__PURE__*/React.createElement("span", {
14483
14624
  style: {
@@ -22441,6 +22582,42 @@ var useColumns$1 = (function (form) {
22441
22582
  }
22442
22583
 
22443
22584
  return onChange;
22585
+ }(),
22586
+ onBlur: function () {
22587
+ var _onBlur = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
22588
+ var _rawValue$replace;
22589
+
22590
+ var key, rawValue, trimmedValue;
22591
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22592
+ while (1) {
22593
+ switch (_context5.prev = _context5.next) {
22594
+ case 0:
22595
+ _context5.next = 2;
22596
+ return controller.wait();
22597
+
22598
+ case 2:
22599
+ key = isMyShow ? 'itemModelNameSelf' : 'itemModelName';
22600
+ rawValue = form.getFieldsValue().itemModelName;
22601
+ trimmedValue = (_rawValue$replace = rawValue === null || rawValue === void 0 ? void 0 : rawValue.replace(/^\s+|\s+$/g, '')) !== null && _rawValue$replace !== void 0 ? _rawValue$replace : ''; // 失焦时才回写干净的值
22602
+
22603
+ form.setFieldsValue({
22604
+ itemModelName: trimmedValue
22605
+ });
22606
+ controller.setEditGood(_defineProperty({}, key, trimmedValue));
22607
+
22608
+ case 7:
22609
+ case "end":
22610
+ return _context5.stop();
22611
+ }
22612
+ }
22613
+ }, _callee5);
22614
+ }));
22615
+
22616
+ function onBlur() {
22617
+ return _onBlur.apply(this, arguments);
22618
+ }
22619
+
22620
+ return onBlur;
22444
22621
  }()
22445
22622
  })));
22446
22623
  } else {
@@ -22471,12 +22648,12 @@ var useColumns$1 = (function (form) {
22471
22648
  return rootElement || document.body;
22472
22649
  },
22473
22650
  onChange: function () {
22474
- var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
22475
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22651
+ var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
22652
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
22476
22653
  while (1) {
22477
- switch (_context5.prev = _context5.next) {
22654
+ switch (_context6.prev = _context6.next) {
22478
22655
  case 0:
22479
- _context5.next = 2;
22656
+ _context6.next = 2;
22480
22657
  return controller.wait();
22481
22658
 
22482
22659
  case 2:
@@ -22486,10 +22663,10 @@ var useColumns$1 = (function (form) {
22486
22663
 
22487
22664
  case 3:
22488
22665
  case "end":
22489
- return _context5.stop();
22666
+ return _context6.stop();
22490
22667
  }
22491
22668
  }
22492
- }, _callee5);
22669
+ }, _callee6);
22493
22670
  }));
22494
22671
 
22495
22672
  function onChange() {
@@ -22525,13 +22702,13 @@ var useColumns$1 = (function (form) {
22525
22702
  message: '数量必须为数字'
22526
22703
  }, {
22527
22704
  validator: function () {
22528
- var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
22705
+ var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
22529
22706
  var isvalue, isPrice;
22530
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
22707
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
22531
22708
  while (1) {
22532
- switch (_context6.prev = _context6.next) {
22709
+ switch (_context7.prev = _context7.next) {
22533
22710
  case 0:
22534
- _context6.next = 2;
22711
+ _context7.next = 2;
22535
22712
  return controller.wait();
22536
22713
 
22537
22714
  case 2:
@@ -22539,21 +22716,21 @@ var useColumns$1 = (function (form) {
22539
22716
  isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
22540
22717
 
22541
22718
  if (!(isvalue || isPrice === isvalue)) {
22542
- _context6.next = 6;
22719
+ _context7.next = 6;
22543
22720
  break;
22544
22721
  }
22545
22722
 
22546
- return _context6.abrupt("return");
22723
+ return _context7.abrupt("return");
22547
22724
 
22548
22725
  case 6:
22549
22726
  callback('请输入数量');
22550
22727
 
22551
22728
  case 7:
22552
22729
  case "end":
22553
- return _context6.stop();
22730
+ return _context7.stop();
22554
22731
  }
22555
22732
  }
22556
- }, _callee6);
22733
+ }, _callee7);
22557
22734
  }));
22558
22735
 
22559
22736
  function validator(_x6, _x7, _x8) {
@@ -22570,21 +22747,21 @@ var useColumns$1 = (function (form) {
22570
22747
  maxLength: 25,
22571
22748
  loading: isCipher$1(changeField, "quantity"),
22572
22749
  onChange: function () {
22573
- var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
22574
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
22750
+ var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
22751
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
22575
22752
  while (1) {
22576
- switch (_context7.prev = _context7.next) {
22753
+ switch (_context8.prev = _context8.next) {
22577
22754
  case 0:
22578
22755
  setChangeField('quantity');
22579
- _context7.next = 3;
22756
+ _context8.next = 3;
22580
22757
  return onChangeQuantity$1(controller, form, record);
22581
22758
 
22582
22759
  case 3:
22583
22760
  case "end":
22584
- return _context7.stop();
22761
+ return _context8.stop();
22585
22762
  }
22586
22763
  }
22587
- }, _callee7);
22764
+ }, _callee8);
22588
22765
  }));
22589
22766
 
22590
22767
  function onChange() {
@@ -22620,13 +22797,13 @@ var useColumns$1 = (function (form) {
22620
22797
  message: '单价必须为数字'
22621
22798
  }, {
22622
22799
  validator: function () {
22623
- var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
22800
+ var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
22624
22801
  var isQuantity, isvalue;
22625
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
22802
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
22626
22803
  while (1) {
22627
- switch (_context8.prev = _context8.next) {
22804
+ switch (_context9.prev = _context9.next) {
22628
22805
  case 0:
22629
- _context8.next = 2;
22806
+ _context9.next = 2;
22630
22807
  return controller.wait();
22631
22808
 
22632
22809
  case 2:
@@ -22634,21 +22811,21 @@ var useColumns$1 = (function (form) {
22634
22811
  isvalue = !!value || value === 0;
22635
22812
 
22636
22813
  if (!(isvalue || isQuantity === isvalue)) {
22637
- _context8.next = 6;
22814
+ _context9.next = 6;
22638
22815
  break;
22639
22816
  }
22640
22817
 
22641
- return _context8.abrupt("return");
22818
+ return _context9.abrupt("return");
22642
22819
 
22643
22820
  case 6:
22644
22821
  callback('请输入单价');
22645
22822
 
22646
22823
  case 7:
22647
22824
  case "end":
22648
- return _context8.stop();
22825
+ return _context9.stop();
22649
22826
  }
22650
22827
  }
22651
- }, _callee8);
22828
+ }, _callee9);
22652
22829
  }));
22653
22830
 
22654
22831
  function validator(_x9, _x10, _x11) {
@@ -22695,13 +22872,13 @@ var useColumns$1 = (function (form) {
22695
22872
  message: '单价必须为数字'
22696
22873
  }, {
22697
22874
  validator: function () {
22698
- var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
22875
+ var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
22699
22876
  var isQuantity, isvalue;
22700
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
22877
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
22701
22878
  while (1) {
22702
- switch (_context9.prev = _context9.next) {
22879
+ switch (_context10.prev = _context10.next) {
22703
22880
  case 0:
22704
- _context9.next = 2;
22881
+ _context10.next = 2;
22705
22882
  return controller.wait();
22706
22883
 
22707
22884
  case 2:
@@ -22709,21 +22886,21 @@ var useColumns$1 = (function (form) {
22709
22886
  isvalue = !!value || value === 0;
22710
22887
 
22711
22888
  if (!(isvalue || isQuantity === isvalue)) {
22712
- _context9.next = 6;
22889
+ _context10.next = 6;
22713
22890
  break;
22714
22891
  }
22715
22892
 
22716
- return _context9.abrupt("return");
22893
+ return _context10.abrupt("return");
22717
22894
 
22718
22895
  case 6:
22719
22896
  callback('请输入单价');
22720
22897
 
22721
22898
  case 7:
22722
22899
  case "end":
22723
- return _context9.stop();
22900
+ return _context10.stop();
22724
22901
  }
22725
22902
  }
22726
- }, _callee9);
22903
+ }, _callee10);
22727
22904
  }));
22728
22905
 
22729
22906
  function validator(_x12, _x13, _x14) {
@@ -22773,10 +22950,10 @@ var useColumns$1 = (function (form) {
22773
22950
  message: '金额错误,请重新输入'
22774
22951
  }, {
22775
22952
  validator: function () {
22776
- var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
22777
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
22953
+ var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
22954
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
22778
22955
  while (1) {
22779
- switch (_context10.prev = _context10.next) {
22956
+ switch (_context11.prev = _context11.next) {
22780
22957
  case 0:
22781
22958
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
22782
22959
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -22784,10 +22961,10 @@ var useColumns$1 = (function (form) {
22784
22961
 
22785
22962
  case 1:
22786
22963
  case "end":
22787
- return _context10.stop();
22964
+ return _context11.stop();
22788
22965
  }
22789
22966
  }
22790
- }, _callee10);
22967
+ }, _callee11);
22791
22968
  }));
22792
22969
 
22793
22970
  function validator(_x15, _x16, _x17) {
@@ -22798,10 +22975,10 @@ var useColumns$1 = (function (form) {
22798
22975
  }()
22799
22976
  }, {
22800
22977
  validator: function () {
22801
- var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
22802
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
22978
+ var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
22979
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
22803
22980
  while (1) {
22804
- switch (_context11.prev = _context11.next) {
22981
+ switch (_context12.prev = _context12.next) {
22805
22982
  case 0:
22806
22983
  if (deduction && parseFloat(value) <= deduction) {
22807
22984
  callback('扣除额不能大于等于价税合计');
@@ -22809,10 +22986,10 @@ var useColumns$1 = (function (form) {
22809
22986
 
22810
22987
  case 1:
22811
22988
  case "end":
22812
- return _context11.stop();
22989
+ return _context12.stop();
22813
22990
  }
22814
22991
  }
22815
- }, _callee11);
22992
+ }, _callee12);
22816
22993
  }));
22817
22994
 
22818
22995
  function validator(_x18, _x19, _x20) {
@@ -22861,10 +23038,10 @@ var useColumns$1 = (function (form) {
22861
23038
  message: '金额错误,请重新输入'
22862
23039
  }, {
22863
23040
  validator: function () {
22864
- var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
22865
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
23041
+ var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_, value, callback) {
23042
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
22866
23043
  while (1) {
22867
- switch (_context12.prev = _context12.next) {
23044
+ switch (_context13.prev = _context13.next) {
22868
23045
  case 0:
22869
23046
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
22870
23047
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -22872,10 +23049,10 @@ var useColumns$1 = (function (form) {
22872
23049
 
22873
23050
  case 1:
22874
23051
  case "end":
22875
- return _context12.stop();
23052
+ return _context13.stop();
22876
23053
  }
22877
23054
  }
22878
- }, _callee12);
23055
+ }, _callee13);
22879
23056
  }));
22880
23057
 
22881
23058
  function validator(_x21, _x22, _x23) {