kts-component-invoice-operate 3.2.28 → 3.2.30

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
@@ -10499,57 +10499,89 @@ function ItemNameInput(props) {
10499
10499
  return _ref.apply(this, arguments);
10500
10500
  };
10501
10501
  }(), [autoComplete.onItemNameSearch]);
10502
- var onChangeAutoComplete = React.useCallback(function (itemName) {
10503
- // const good = options.filter(e=>e.itemName === itemName)[0];
10504
- // good && controller.state.goodsListState.form?.setFieldsValue(removeNullUndefined(good));
10505
- var record = options.filter(function (e) {
10506
- return e.itemName === itemName;
10507
- })[0];
10508
- if (!record) return;
10509
- controller.importGoodsDrawer(record); // controller.run(async s => {
10510
- // Object.keys(record).filter(e => !record[e] && record[e] !== 0).forEach(e => { delete record[e] });
10511
- // // 没用 被编辑的货物 form 就退出
10512
- // if (!s.goodsListState.editGood || !s.goodsListState.form) return;
10513
- // // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
10514
- // record.quantity = undefined;
10515
- // record.lineAmountExcludeTax = undefined;
10516
- // record.lineAmountIncludeTax = undefined;
10517
- // // 中间数据
10518
- // const between = { ...record };
10519
- // between.itemName = record.itemName;
10520
- // between.itemNameOther = record.itemName;
10521
- // // 设置编辑货物
10522
- // const editGood: IGood = s.goodsListState.editGood = { ...s.goodsListState.editGood, ...between };
10523
- // if (editGood.taxRate) {
10524
- // editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood)
10525
- // }
10526
- // if (`${editGood.priceIncludeTax}` === '0') {
10527
- // editGood.priceIncludeTax = undefined;
10528
- // editGood.priceExcludeTax = undefined;
10529
- // } else {
10530
- // editGood.priceExcludeTax = getPriceExcludeTax(editGood, record, s.calculatingDigits) as number;
10531
- // }
10532
- // if (editGood.quantity && editGood.priceIncludeTax) {
10533
- // editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax, s.calculatingDigits);
10534
- // }
10535
- // // 导入FORM里
10536
- // if (s.goodsListState.isMyShow) {
10537
- // s.goodsListState.form.setFieldsValue({
10538
- // ...editGood,
10539
- // itemName: editGood.itemNameSelf,
10540
- // itemModelName: editGood.itemModelNameSelf,
10541
- // });
10542
- // } else {
10543
- // s.goodsListState.form.setFieldsValue({
10544
- // ...editGood,
10545
- // });
10546
- // }
10547
- // s.goodsListState.importGoods.isVisibleDrawer = false;
10548
- // s.goodsListState.isTaxIncluded
10549
- // ? await updateUnitPriceExcludingTax(controller, s.goodsListState.form, record)
10550
- // : await updateUnitPriceTax(controller, s.goodsListState.form, record)
10551
- // })
10552
- }, [options, controller]);
10502
+ var onChangeAutoComplete = React.useCallback( /*#__PURE__*/function () {
10503
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
10504
+ var record;
10505
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10506
+ while (1) {
10507
+ switch (_context2.prev = _context2.next) {
10508
+ case 0:
10509
+ // const good = options.filter(e=>e.itemName === itemName)[0];
10510
+ // good && controller.state.goodsListState.form?.setFieldsValue(removeNullUndefined(good));
10511
+ record = options.filter(function (e) {
10512
+ return e.itemName === itemName;
10513
+ })[0];
10514
+
10515
+ if (record) {
10516
+ _context2.next = 3;
10517
+ break;
10518
+ }
10519
+
10520
+ return _context2.abrupt("return");
10521
+
10522
+ case 3:
10523
+ _context2.next = 5;
10524
+ return controller.setEditGood({
10525
+ itemName: record.itemName
10526
+ });
10527
+
10528
+ case 5:
10529
+ controller.importGoodsDrawer(record); // controller.run(async s => {
10530
+ // Object.keys(record).filter(e => !record[e] && record[e] !== 0).forEach(e => { delete record[e] });
10531
+ // // 没用 被编辑的货物 和 form 就退出
10532
+ // if (!s.goodsListState.editGood || !s.goodsListState.form) return;
10533
+ // // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
10534
+ // record.quantity = undefined;
10535
+ // record.lineAmountExcludeTax = undefined;
10536
+ // record.lineAmountIncludeTax = undefined;
10537
+ // // 中间数据
10538
+ // const between = { ...record };
10539
+ // between.itemName = record.itemName;
10540
+ // between.itemNameOther = record.itemName;
10541
+ // // 设置编辑货物
10542
+ // const editGood: IGood = s.goodsListState.editGood = { ...s.goodsListState.editGood, ...between };
10543
+ // if (editGood.taxRate) {
10544
+ // editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood)
10545
+ // }
10546
+ // if (`${editGood.priceIncludeTax}` === '0') {
10547
+ // editGood.priceIncludeTax = undefined;
10548
+ // editGood.priceExcludeTax = undefined;
10549
+ // } else {
10550
+ // editGood.priceExcludeTax = getPriceExcludeTax(editGood, record, s.calculatingDigits) as number;
10551
+ // }
10552
+ // if (editGood.quantity && editGood.priceIncludeTax) {
10553
+ // editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax, s.calculatingDigits);
10554
+ // }
10555
+ // // 导入FORM里
10556
+ // if (s.goodsListState.isMyShow) {
10557
+ // s.goodsListState.form.setFieldsValue({
10558
+ // ...editGood,
10559
+ // itemName: editGood.itemNameSelf,
10560
+ // itemModelName: editGood.itemModelNameSelf,
10561
+ // });
10562
+ // } else {
10563
+ // s.goodsListState.form.setFieldsValue({
10564
+ // ...editGood,
10565
+ // });
10566
+ // }
10567
+ // s.goodsListState.importGoods.isVisibleDrawer = false;
10568
+ // s.goodsListState.isTaxIncluded
10569
+ // ? await updateUnitPriceExcludingTax(controller, s.goodsListState.form, record)
10570
+ // : await updateUnitPriceTax(controller, s.goodsListState.form, record)
10571
+ // })
10572
+
10573
+ case 6:
10574
+ case "end":
10575
+ return _context2.stop();
10576
+ }
10577
+ }
10578
+ }, _callee2);
10579
+ }));
10580
+
10581
+ return function (_x2) {
10582
+ return _ref2.apply(this, arguments);
10583
+ };
10584
+ }(), [options, controller]);
10553
10585
  return React.createElement("div", {
10554
10586
  className: 'kts-invoice-operate-goods-list-itemName-input'
10555
10587
  }, props.shorthand && React.createElement("span", {
@@ -10559,6 +10591,7 @@ function ItemNameInput(props) {
10559
10591
  }
10560
10592
  }, "*", props.shorthand, "*"), React.createElement(AutoComplete$1, {
10561
10593
  onSearch: onSearch,
10594
+ defaultValue: props.value,
10562
10595
  options: options.map(function (e) {
10563
10596
  return {
10564
10597
  value: e.itemName
@@ -10611,6 +10644,8 @@ function ItemCodeInput(props) {
10611
10644
  }, []);
10612
10645
  var onSearch = React.useCallback( /*#__PURE__*/function () {
10613
10646
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
10647
+ var _props$record;
10648
+
10614
10649
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10615
10650
  while (1) {
10616
10651
  switch (_context.prev = _context.next) {
@@ -10624,7 +10659,7 @@ function ItemCodeInput(props) {
10624
10659
 
10625
10660
  _context.t0 = setOptions;
10626
10661
  _context.next = 5;
10627
- return autoComplete.onItemCodeSearch(searchText);
10662
+ return autoComplete.onItemCodeSearch(searchText, (_props$record = props.record) === null || _props$record === void 0 ? void 0 : _props$record.itemName);
10628
10663
 
10629
10664
  case 5:
10630
10665
  _context.t1 = _context.sent;
@@ -10652,21 +10687,55 @@ function ItemCodeInput(props) {
10652
10687
  return _ref.apply(this, arguments);
10653
10688
  };
10654
10689
  }(), [autoComplete.onItemCodeSearch]);
10655
- var onChangeAutoComplete = React.useCallback(function (itemName) {
10656
- var record = options.filter(function (e) {
10657
- return e.itemCode === itemName;
10658
- })[0];
10659
- if (!record) return;
10660
- }, [options, controller]);
10690
+ var onChangeAutoComplete = React.useCallback( /*#__PURE__*/function () {
10691
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
10692
+ var record, option;
10693
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10694
+ while (1) {
10695
+ switch (_context2.prev = _context2.next) {
10696
+ case 0:
10697
+ record = options.filter(function (e) {
10698
+ return e.itemCode === itemName;
10699
+ })[0];
10700
+
10701
+ if (record) {
10702
+ _context2.next = 3;
10703
+ break;
10704
+ }
10705
+
10706
+ return _context2.abrupt("return");
10707
+
10708
+ case 3:
10709
+ option = {
10710
+ itemCode: record.itemCode,
10711
+ itemName: record.itemName,
10712
+ taxCategoryCode: record.taxCategoryCode,
10713
+ shorthand: record.shorthand,
10714
+ specification: record.specification,
10715
+ unit: record.unit,
10716
+ lineAmountIncludeTax: record.lineAmountIncludeTax,
10717
+ taxRate: record.taxRate
10718
+ };
10719
+ _context2.next = 6;
10720
+ return controller.setEditGood(option);
10721
+
10722
+ case 6:
10723
+ case "end":
10724
+ return _context2.stop();
10725
+ }
10726
+ }
10727
+ }, _callee2);
10728
+ }));
10729
+
10730
+ return function (_x2) {
10731
+ return _ref2.apply(this, arguments);
10732
+ };
10733
+ }(), [options, controller]);
10661
10734
  return React.createElement("div", {
10662
10735
  className: 'kts-invoice-operate-goods-list-itemCode-input'
10663
- }, props.shorthand && React.createElement("span", {
10664
- style: {
10665
- alignSelf: 'center',
10666
- fontSize: 12
10667
- }
10668
- }, "*", props.shorthand, "*"), React.createElement(AutoComplete$1, {
10736
+ }, React.createElement(AutoComplete$1, {
10669
10737
  onSearch: onSearch,
10738
+ defaultValue: props.value,
10670
10739
  options: options.map(function (e) {
10671
10740
  return {
10672
10741
  value: e.itemCode
@@ -10845,10 +10914,34 @@ var useColumns = (function (form) {
10845
10914
  return React.createElement(Form.Item, null, getFieldDecorator('itemCode', {
10846
10915
  initialValue: editGood.itemCode
10847
10916
  })(React.createElement(ItemCodeInput, {
10848
- shorthand: editGood.shorthand,
10849
- onChange: function onChange() {
10850
- onChangeItemCode(controller, form, record);
10851
- }
10917
+ record: record,
10918
+ onChange: function () {
10919
+ var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
10920
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10921
+ while (1) {
10922
+ switch (_context2.prev = _context2.next) {
10923
+ case 0:
10924
+ _context2.next = 2;
10925
+ return onChangeItemCode(controller, form, record);
10926
+
10927
+ case 2:
10928
+ _context2.next = 4;
10929
+ return onChangeLineAmountIncludeTax(controller, form, record);
10930
+
10931
+ case 4:
10932
+ case "end":
10933
+ return _context2.stop();
10934
+ }
10935
+ }
10936
+ }, _callee2);
10937
+ }));
10938
+
10939
+ function onChange() {
10940
+ return _onChange.apply(this, arguments);
10941
+ }
10942
+
10943
+ return onChange;
10944
+ }()
10852
10945
  })));
10853
10946
  } else {
10854
10947
  return record.itemCode;
@@ -10866,39 +10959,39 @@ var useColumns = (function (form) {
10866
10959
  display: 'flex'
10867
10960
  }
10868
10961
  }, getFieldDecorator('itemName', {
10869
- initialValue: isMyShow ? record.itemNameSelf : record.itemName,
10962
+ initialValue: record.itemName,
10870
10963
  rules: [].concat(_toConsumableArray(getReplenishRules('itemName')), [{
10871
10964
  validator: function () {
10872
- var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_, __, callback) {
10965
+ var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_, __, callback) {
10873
10966
  var value;
10874
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10967
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
10875
10968
  while (1) {
10876
- switch (_context2.prev = _context2.next) {
10969
+ switch (_context3.prev = _context3.next) {
10877
10970
  case 0:
10878
- _context2.next = 2;
10971
+ _context3.next = 2;
10879
10972
  return controller.wait();
10880
10973
 
10881
10974
  case 2:
10882
10975
  value = controller.state.goodsListState.editGood;
10883
10976
 
10884
10977
  if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameSelf))) {
10885
- _context2.next = 7;
10978
+ _context3.next = 7;
10886
10979
  break;
10887
10980
  }
10888
10981
 
10889
10982
  callback('项目名称不能为空');
10890
- _context2.next = 8;
10983
+ _context3.next = 8;
10891
10984
  break;
10892
10985
 
10893
10986
  case 7:
10894
- return _context2.abrupt("return");
10987
+ return _context3.abrupt("return");
10895
10988
 
10896
10989
  case 8:
10897
10990
  case "end":
10898
- return _context2.stop();
10991
+ return _context3.stop();
10899
10992
  }
10900
10993
  }
10901
- }, _callee2);
10994
+ }, _callee3);
10902
10995
  }));
10903
10996
 
10904
10997
  function validator(_x2, _x3, _x4) {
@@ -10919,19 +11012,19 @@ var useColumns = (function (form) {
10919
11012
  title: "\u70B9\u51FB\u4ECE\u5546\u54C1\u7BA1\u7406\u4E2D\u6DFB\u52A0\u5546\u54C1\u4FE1\u606F"
10920
11013
  }, React.createElement(Button, {
10921
11014
  onClick: controller.pipeline( /*#__PURE__*/function () {
10922
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
10923
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11015
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
11016
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
10924
11017
  while (1) {
10925
- switch (_context3.prev = _context3.next) {
11018
+ switch (_context4.prev = _context4.next) {
10926
11019
  case 0:
10927
11020
  s.goodsListState.importGoods.isVisibleDrawer = true;
10928
11021
 
10929
11022
  case 1:
10930
11023
  case "end":
10931
- return _context3.stop();
11024
+ return _context4.stop();
10932
11025
  }
10933
11026
  }
10934
- }, _callee3);
11027
+ }, _callee4);
10935
11028
  }));
10936
11029
 
10937
11030
  return function (_x5) {
@@ -10968,13 +11061,13 @@ var useColumns = (function (form) {
10968
11061
  rules: getReplenishRules('itemModelName')
10969
11062
  })(React.createElement(MyInput, {
10970
11063
  onChange: function () {
10971
- var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
11064
+ var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
10972
11065
  var key, value;
10973
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
11066
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
10974
11067
  while (1) {
10975
- switch (_context4.prev = _context4.next) {
11068
+ switch (_context5.prev = _context5.next) {
10976
11069
  case 0:
10977
- _context4.next = 2;
11070
+ _context5.next = 2;
10978
11071
  return controller.wait();
10979
11072
 
10980
11073
  case 2:
@@ -10985,14 +11078,14 @@ var useColumns = (function (form) {
10985
11078
 
10986
11079
  case 6:
10987
11080
  case "end":
10988
- return _context4.stop();
11081
+ return _context5.stop();
10989
11082
  }
10990
11083
  }
10991
- }, _callee4);
11084
+ }, _callee5);
10992
11085
  }));
10993
11086
 
10994
11087
  function onChange() {
10995
- return _onChange.apply(this, arguments);
11088
+ return _onChange2.apply(this, arguments);
10996
11089
  }
10997
11090
 
10998
11091
  return onChange;
@@ -11023,12 +11116,12 @@ var useColumns = (function (form) {
11023
11116
  },
11024
11117
  dataSource: unitList,
11025
11118
  onChange: function () {
11026
- var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
11027
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11119
+ var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
11120
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
11028
11121
  while (1) {
11029
- switch (_context5.prev = _context5.next) {
11122
+ switch (_context6.prev = _context6.next) {
11030
11123
  case 0:
11031
- _context5.next = 2;
11124
+ _context6.next = 2;
11032
11125
  return controller.wait();
11033
11126
 
11034
11127
  case 2:
@@ -11041,14 +11134,14 @@ var useColumns = (function (form) {
11041
11134
 
11042
11135
  case 3:
11043
11136
  case "end":
11044
- return _context5.stop();
11137
+ return _context6.stop();
11045
11138
  }
11046
11139
  }
11047
- }, _callee5);
11140
+ }, _callee6);
11048
11141
  }));
11049
11142
 
11050
11143
  function onChange() {
11051
- return _onChange2.apply(this, arguments);
11144
+ return _onChange3.apply(this, arguments);
11052
11145
  }
11053
11146
 
11054
11147
  return onChange;
@@ -11080,13 +11173,13 @@ var useColumns = (function (form) {
11080
11173
  message: '数量必须为数字'
11081
11174
  }, {
11082
11175
  validator: function () {
11083
- var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
11176
+ var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
11084
11177
  var isvalue, isPrice;
11085
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
11178
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
11086
11179
  while (1) {
11087
- switch (_context6.prev = _context6.next) {
11180
+ switch (_context7.prev = _context7.next) {
11088
11181
  case 0:
11089
- _context6.next = 2;
11182
+ _context7.next = 2;
11090
11183
  return controller.wait();
11091
11184
 
11092
11185
  case 2:
@@ -11094,21 +11187,21 @@ var useColumns = (function (form) {
11094
11187
  isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
11095
11188
 
11096
11189
  if (!(isvalue || isPrice === isvalue)) {
11097
- _context6.next = 6;
11190
+ _context7.next = 6;
11098
11191
  break;
11099
11192
  }
11100
11193
 
11101
- return _context6.abrupt("return");
11194
+ return _context7.abrupt("return");
11102
11195
 
11103
11196
  case 6:
11104
11197
  callback('请输入数量');
11105
11198
 
11106
11199
  case 7:
11107
11200
  case "end":
11108
- return _context6.stop();
11201
+ return _context7.stop();
11109
11202
  }
11110
11203
  }
11111
- }, _callee6);
11204
+ }, _callee7);
11112
11205
  }));
11113
11206
 
11114
11207
  function validator(_x6, _x7, _x8) {
@@ -11125,25 +11218,25 @@ var useColumns = (function (form) {
11125
11218
  maxLength: 16,
11126
11219
  loading: isCipher(changeField, "quantity"),
11127
11220
  onChange: function () {
11128
- var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
11129
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
11221
+ var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
11222
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
11130
11223
  while (1) {
11131
- switch (_context7.prev = _context7.next) {
11224
+ switch (_context8.prev = _context8.next) {
11132
11225
  case 0:
11133
11226
  setChangeField('quantity');
11134
- _context7.next = 3;
11227
+ _context8.next = 3;
11135
11228
  return onChangeQuantity(controller, form, record);
11136
11229
 
11137
11230
  case 3:
11138
11231
  case "end":
11139
- return _context7.stop();
11232
+ return _context8.stop();
11140
11233
  }
11141
11234
  }
11142
- }, _callee7);
11235
+ }, _callee8);
11143
11236
  }));
11144
11237
 
11145
11238
  function onChange() {
11146
- return _onChange3.apply(this, arguments);
11239
+ return _onChange4.apply(this, arguments);
11147
11240
  }
11148
11241
 
11149
11242
  return onChange;
@@ -11175,13 +11268,13 @@ var useColumns = (function (form) {
11175
11268
  message: '单价必须为数字'
11176
11269
  }, {
11177
11270
  validator: function () {
11178
- var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
11271
+ var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
11179
11272
  var isQuantity, isvalue;
11180
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
11273
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
11181
11274
  while (1) {
11182
- switch (_context8.prev = _context8.next) {
11275
+ switch (_context9.prev = _context9.next) {
11183
11276
  case 0:
11184
- _context8.next = 2;
11277
+ _context9.next = 2;
11185
11278
  return controller.wait();
11186
11279
 
11187
11280
  case 2:
@@ -11189,21 +11282,21 @@ var useColumns = (function (form) {
11189
11282
  isvalue = !!value || value === 0;
11190
11283
 
11191
11284
  if (!(isvalue || isQuantity === isvalue)) {
11192
- _context8.next = 6;
11285
+ _context9.next = 6;
11193
11286
  break;
11194
11287
  }
11195
11288
 
11196
- return _context8.abrupt("return");
11289
+ return _context9.abrupt("return");
11197
11290
 
11198
11291
  case 6:
11199
11292
  callback('请输入单价');
11200
11293
 
11201
11294
  case 7:
11202
11295
  case "end":
11203
- return _context8.stop();
11296
+ return _context9.stop();
11204
11297
  }
11205
11298
  }
11206
- }, _callee8);
11299
+ }, _callee9);
11207
11300
  }));
11208
11301
 
11209
11302
  function validator(_x9, _x10, _x11) {
@@ -11250,13 +11343,13 @@ var useColumns = (function (form) {
11250
11343
  message: '单价必须为数字'
11251
11344
  }, {
11252
11345
  validator: function () {
11253
- var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
11346
+ var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
11254
11347
  var isQuantity, isvalue;
11255
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
11348
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
11256
11349
  while (1) {
11257
- switch (_context9.prev = _context9.next) {
11350
+ switch (_context10.prev = _context10.next) {
11258
11351
  case 0:
11259
- _context9.next = 2;
11352
+ _context10.next = 2;
11260
11353
  return controller.wait();
11261
11354
 
11262
11355
  case 2:
@@ -11264,21 +11357,21 @@ var useColumns = (function (form) {
11264
11357
  isvalue = !!value || value === 0;
11265
11358
 
11266
11359
  if (!(isvalue || isQuantity === isvalue)) {
11267
- _context9.next = 6;
11360
+ _context10.next = 6;
11268
11361
  break;
11269
11362
  }
11270
11363
 
11271
- return _context9.abrupt("return");
11364
+ return _context10.abrupt("return");
11272
11365
 
11273
11366
  case 6:
11274
11367
  callback('请输入单价');
11275
11368
 
11276
11369
  case 7:
11277
11370
  case "end":
11278
- return _context9.stop();
11371
+ return _context10.stop();
11279
11372
  }
11280
11373
  }
11281
- }, _callee9);
11374
+ }, _callee10);
11282
11375
  }));
11283
11376
 
11284
11377
  function validator(_x12, _x13, _x14) {
@@ -11328,10 +11421,10 @@ var useColumns = (function (form) {
11328
11421
  message: '金额必须为数字'
11329
11422
  }, {
11330
11423
  validator: function () {
11331
- var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
11332
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
11424
+ var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
11425
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
11333
11426
  while (1) {
11334
- switch (_context10.prev = _context10.next) {
11427
+ switch (_context11.prev = _context11.next) {
11335
11428
  case 0:
11336
11429
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
11337
11430
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -11339,10 +11432,10 @@ var useColumns = (function (form) {
11339
11432
 
11340
11433
  case 1:
11341
11434
  case "end":
11342
- return _context10.stop();
11435
+ return _context11.stop();
11343
11436
  }
11344
11437
  }
11345
- }, _callee10);
11438
+ }, _callee11);
11346
11439
  }));
11347
11440
 
11348
11441
  function validator(_x15, _x16, _x17) {
@@ -11353,10 +11446,10 @@ var useColumns = (function (form) {
11353
11446
  }()
11354
11447
  }, {
11355
11448
  validator: function () {
11356
- var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
11357
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
11449
+ var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
11450
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
11358
11451
  while (1) {
11359
- switch (_context11.prev = _context11.next) {
11452
+ switch (_context12.prev = _context12.next) {
11360
11453
  case 0:
11361
11454
  if (deduction && parseFloat(value) <= deduction) {
11362
11455
  callback('扣除额不能大于等于价税合计');
@@ -11364,10 +11457,10 @@ var useColumns = (function (form) {
11364
11457
 
11365
11458
  case 1:
11366
11459
  case "end":
11367
- return _context11.stop();
11460
+ return _context12.stop();
11368
11461
  }
11369
11462
  }
11370
- }, _callee11);
11463
+ }, _callee12);
11371
11464
  }));
11372
11465
 
11373
11466
  function validator(_x18, _x19, _x20) {
@@ -11416,10 +11509,10 @@ var useColumns = (function (form) {
11416
11509
  message: '金额必须为数字'
11417
11510
  }, {
11418
11511
  validator: function () {
11419
- var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
11420
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
11512
+ var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_, value, callback) {
11513
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
11421
11514
  while (1) {
11422
- switch (_context12.prev = _context12.next) {
11515
+ switch (_context13.prev = _context13.next) {
11423
11516
  case 0:
11424
11517
  if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
11425
11518
  callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
@@ -11427,10 +11520,10 @@ var useColumns = (function (form) {
11427
11520
 
11428
11521
  case 1:
11429
11522
  case "end":
11430
- return _context12.stop();
11523
+ return _context13.stop();
11431
11524
  }
11432
11525
  }
11433
- }, _callee12);
11526
+ }, _callee13);
11434
11527
  }));
11435
11528
 
11436
11529
  function validator(_x21, _x22, _x23) {