kts-component-invoice-operate 3.2.181-8 → 3.2.181-9

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
@@ -9875,8 +9875,6 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
9875
9875
 
9876
9876
  var importGoodsDrawer = /*#__PURE__*/(function () {
9877
9877
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, record, controller) {
9878
- var _s$goodsListState$edi, _s$goodsListState$edi2, _s$goodsListState$edi3, _s$goodsListState$edi4, _s$goodsListState$edi5, _s$goodsListState$edi6, _s$goodsListState$edi7, _s$goodsListState$edi8, _s$goodsListState$edi9, _s$goodsListState$edi10, _s$goodsListState$edi11, _s$goodsListState$edi12, _s$goodsListState$edi13, _s$goodsListState$edi14, _s$goodsListState$edi15, _s$goodsListState$edi16;
9879
-
9880
9878
  var between, editGood;
9881
9879
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9882
9880
  while (1) {
@@ -9896,28 +9894,39 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9896
9894
  return _context.abrupt("return");
9897
9895
 
9898
9896
  case 3:
9899
- console.log('aaaaaaaa122222:'); // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
9900
-
9897
+ // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
9901
9898
  record.quantity = undefined;
9902
9899
  record.lineAmountExcludeTax = undefined;
9903
9900
  record.lineAmountIncludeTax = undefined; // 中间数据
9904
9901
 
9905
- between = _objectSpread2({}, record); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
9906
- // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
9907
- // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
9908
-
9902
+ between = _objectSpread2({}, record);
9909
9903
  between.itemCode = record.itemCode;
9910
9904
  between.shorthand = record.shorthand;
9911
9905
  between.itemName = record.itemName;
9912
9906
  between.itemNameOther = record.itemName;
9913
- between.itemModelName = (_s$goodsListState$edi = (_s$goodsListState$edi2 = s.goodsListState.editGood) === null || _s$goodsListState$edi2 === void 0 ? void 0 : _s$goodsListState$edi2.itemModelName) !== null && _s$goodsListState$edi !== void 0 ? _s$goodsListState$edi : record.itemModelName;
9914
- between.unit = (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.itemModelName) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : record.unit;
9915
- between.quantity = (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.itemModelName) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : record.quantity;
9916
- between.priceIncludeTax = (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.itemModelName) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : record.priceIncludeTax;
9917
- between.lineAmountIncludeTax = (_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.itemModelName) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : record.lineAmountIncludeTax;
9918
- between.lineAmountExcludeTax = (_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.itemModelName) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : record.lineAmountExcludeTax;
9919
- between.taxRate = (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.itemModelName) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : record.taxRate;
9920
- between.taxAmount = (_s$goodsListState$edi15 = (_s$goodsListState$edi16 = s.goodsListState.editGood) === null || _s$goodsListState$edi16 === void 0 ? void 0 : _s$goodsListState$edi16.itemModelName) !== null && _s$goodsListState$edi15 !== void 0 ? _s$goodsListState$edi15 : record.taxAmount; // 设置编辑货物
9907
+ between.itemModelName = record.itemModelName;
9908
+ between.unit = record.unit;
9909
+ between.quantity = record.quantity;
9910
+ between.priceIncludeTax = record.priceIncludeTax;
9911
+ between.lineAmountIncludeTax = record.lineAmountIncludeTax;
9912
+ between.lineAmountExcludeTax = record.lineAmountExcludeTax;
9913
+ between.taxRate = record.taxRate;
9914
+ between.taxAmount = record.taxAmount; // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
9915
+ // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
9916
+ // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
9917
+ // between.itemCode = record.itemCode;
9918
+ // between.shorthand = record.shorthand;
9919
+ // between.itemName = record.itemName;
9920
+ // between.itemNameOther = record.itemName;
9921
+ // between.itemModelName = s.goodsListState.editGood?.itemModelName ?? record.itemModelName;
9922
+ // between.unit = s.goodsListState.editGood?.itemModelName ?? record.unit;
9923
+ // between.quantity = s.goodsListState.editGood?.itemModelName ?? record.quantity;
9924
+ // between.priceIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.priceIncludeTax;
9925
+ // between.lineAmountIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountIncludeTax;
9926
+ // between.lineAmountExcludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountExcludeTax;
9927
+ // between.taxRate = s.goodsListState.editGood?.itemModelName ?? record.taxRate;
9928
+ // between.taxAmount = s.goodsListState.editGood?.itemModelName ?? record.taxAmount;
9929
+ // 设置编辑货物
9921
9930
 
9922
9931
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
9923
9932
 
@@ -9948,22 +9957,22 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9948
9957
 
9949
9958
 
9950
9959
  if (!s.goodsListState.isTaxIncluded) {
9951
- _context.next = 30;
9960
+ _context.next = 29;
9952
9961
  break;
9953
9962
  }
9954
9963
 
9955
- _context.next = 28;
9964
+ _context.next = 27;
9956
9965
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
9957
9966
 
9958
- case 28:
9959
- _context.next = 32;
9967
+ case 27:
9968
+ _context.next = 31;
9960
9969
  break;
9961
9970
 
9962
- case 30:
9963
- _context.next = 32;
9971
+ case 29:
9972
+ _context.next = 31;
9964
9973
  return updateUnitPriceTax(controller, s.goodsListState.form, record);
9965
9974
 
9966
- case 32:
9975
+ case 31:
9967
9976
  case "end":
9968
9977
  return _context.stop();
9969
9978
  }
@@ -19883,72 +19892,12 @@ var clearCalculatingField$1 = /*#__PURE__*/function () {
19883
19892
  };
19884
19893
  }();
19885
19894
  /** 数量改变了 */
19886
- // export const onChangeQuantity = lazyFn(
19887
- // (controller: InvoiceController, form: WrappedFormUtils, record: IGood) => {
19888
- // form.validateFields(async (err, values) => {
19889
- // err = err || {};
19890
- // if (!values.quantity && values.quantity !== 0) {
19891
- // await controller.setEditGood({ quantity: undefined });
19892
- // await clearCalculatingField(controller);
19893
- // return;
19894
- // }
19895
- // if (err.quantity) {
19896
- // await clearCalculatingField(controller);
19897
- // return
19898
- // };
19899
- // const calculatingDigits = controller.state.calculatingDigits;
19900
- // const quantity = format15(values.quantity, calculatingDigits);
19901
- // await controller.setEditGood({ quantity });
19902
- // form.setFieldsValue({ quantity });
19903
- // // 是否含税
19904
- // if (controller.state.goodsListState.isTaxIncluded) {
19905
- // // 含税
19906
- // if (!err.priceIncludeTax && values.priceIncludeTax) {
19907
- // // 可以找到 单价(含税)
19908
- // const priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
19909
- // const lineAmountIncludeTax = format2(evaluate(`${priceIncludeTax} * ${quantity}`));
19910
- // form.setFieldsValue({ lineAmountIncludeTax });
19911
- // await controller.setEditGood({ lineAmountIncludeTax });
19912
- // } else if (!err.lineAmountIncludeTax && values.lineAmountIncludeTax) {
19913
- // // 可以找到 金额(含税)
19914
- // const lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
19915
- // const priceIncludeTax = format15(
19916
- // evaluate(`${lineAmountIncludeTax} / ${quantity}`),
19917
- // calculatingDigits);
19918
- // form.setFieldsValue({ priceIncludeTax });
19919
- // await controller.setEditGood({ priceIncludeTax });
19920
- // }
19921
- // // 更新不含税
19922
- // await updateUnitPriceExcludingTax(controller, form, record);
19923
- // } else {
19924
- // // 不含税
19925
- // if (!err.priceExcludeTax && values.priceExcludeTax) {
19926
- // // 可以找到 单价(不含税)
19927
- // const priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
19928
- // const lineAmountExcludeTax = format2(evaluate(`${quantity} * ${priceExcludeTax}`));
19929
- // form.setFieldsValue({ lineAmountExcludeTax });
19930
- // await controller.setEditGood({ lineAmountExcludeTax, quantity });
19931
- // } else if (!err.lineAmountExcludeTax && values.lineAmountExcludeTax) {
19932
- // // 可以找到 金额(不含税)
19933
- // const lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
19934
- // const priceExcludeTax = format15(evaluate(`${lineAmountExcludeTax} / ${quantity}`), calculatingDigits);
19935
- // form.setFieldsValue({ priceExcludeTax });
19936
- // await controller.setEditGood({ priceExcludeTax, quantity });
19937
- // }
19938
- // // 更新含税
19939
- // await updateUnitPriceTax(controller, form, record);
19940
- // }
19941
- // // 清楚 计算中启动字段
19942
- // await clearCalculatingField(controller);
19943
- // });
19944
- // },
19945
- // 1000,
19946
- // );
19947
19895
 
19948
19896
  var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
19949
19897
  form.validateFields( /*#__PURE__*/function () {
19950
19898
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
19951
- var calculatingDigits, quantity, lineAmountIncludeTax, priceIncludeTax, lineAmountExcludeTax, priceExcludeTax;
19899
+ var calculatingDigits, quantity, priceIncludeTax, lineAmountIncludeTax, _lineAmountIncludeTax, _priceIncludeTax, priceExcludeTax, lineAmountExcludeTax, _lineAmountExcludeTax, _priceExcludeTax;
19900
+
19952
19901
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
19953
19902
  while (1) {
19954
19903
  switch (_context3.prev = _context3.next) {
@@ -19987,69 +19936,115 @@ var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
19987
19936
  case 11:
19988
19937
  calculatingDigits = controller.state.calculatingDigits;
19989
19938
  quantity = format15(values.quantity, calculatingDigits);
19990
- _context3.next = 15;
19939
+ _context3.next = 16;
19991
19940
  return controller.setEditGood({
19992
19941
  quantity: quantity
19993
19942
  });
19994
19943
 
19995
- case 15:
19944
+ case 16:
19996
19945
  form.setFieldsValue({
19997
19946
  quantity: quantity
19998
19947
  }); // 是否含税
19999
19948
 
20000
19949
  if (!controller.state.goodsListState.isTaxIncluded) {
20001
- _context3.next = 27;
19950
+ _context3.next = 36;
19951
+ break;
19952
+ }
19953
+
19954
+ if (!(!err.priceIncludeTax && values.priceIncludeTax)) {
19955
+ _context3.next = 26;
20002
19956
  break;
20003
19957
  }
20004
19958
 
19959
+ // 可以找到 单价(含税)
19960
+ priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
19961
+ lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
19962
+ form.setFieldsValue({
19963
+ lineAmountIncludeTax: lineAmountIncludeTax
19964
+ });
19965
+ _context3.next = 24;
19966
+ return controller.setEditGood({
19967
+ lineAmountIncludeTax: lineAmountIncludeTax
19968
+ });
19969
+
19970
+ case 24:
19971
+ _context3.next = 32;
19972
+ break;
19973
+
19974
+ case 26:
20005
19975
  if (!(!err.lineAmountIncludeTax && values.lineAmountIncludeTax)) {
20006
- _context3.next = 23;
19976
+ _context3.next = 32;
20007
19977
  break;
20008
19978
  }
20009
19979
 
20010
- lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
20011
- priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), calculatingDigits);
19980
+ // 可以找到 金额(含税)
19981
+ _lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
19982
+ _priceIncludeTax = format15(evaluate("".concat(_lineAmountIncludeTax, " / ").concat(quantity)), calculatingDigits);
20012
19983
  form.setFieldsValue({
20013
- priceIncludeTax: priceIncludeTax
19984
+ priceIncludeTax: _priceIncludeTax
20014
19985
  });
20015
- _context3.next = 23;
19986
+ _context3.next = 32;
20016
19987
  return controller.setEditGood({
20017
- priceIncludeTax: priceIncludeTax
19988
+ priceIncludeTax: _priceIncludeTax
20018
19989
  });
20019
19990
 
20020
- case 23:
20021
- _context3.next = 25;
19991
+ case 32:
19992
+ _context3.next = 34;
20022
19993
  return updateUnitPriceExcludingTax$1(controller, form, record);
20023
19994
 
20024
- case 25:
20025
- _context3.next = 35;
19995
+ case 34:
19996
+ _context3.next = 52;
20026
19997
  break;
20027
19998
 
20028
- case 27:
19999
+ case 36:
20000
+ if (!(!err.priceExcludeTax && values.priceExcludeTax)) {
20001
+ _context3.next = 44;
20002
+ break;
20003
+ }
20004
+
20005
+ // 可以找到 单价(不含税)
20006
+ priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
20007
+ lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
20008
+ form.setFieldsValue({
20009
+ lineAmountExcludeTax: lineAmountExcludeTax
20010
+ });
20011
+ _context3.next = 42;
20012
+ return controller.setEditGood({
20013
+ lineAmountExcludeTax: lineAmountExcludeTax,
20014
+ quantity: quantity
20015
+ });
20016
+
20017
+ case 42:
20018
+ _context3.next = 50;
20019
+ break;
20020
+
20021
+ case 44:
20029
20022
  if (!(!err.lineAmountExcludeTax && values.lineAmountExcludeTax)) {
20030
- _context3.next = 33;
20023
+ _context3.next = 50;
20031
20024
  break;
20032
20025
  }
20033
20026
 
20034
- lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20035
- priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), calculatingDigits);
20027
+ // 可以找到 金额(不含税)
20028
+ _lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20029
+ _priceExcludeTax = format15(evaluate("".concat(_lineAmountExcludeTax, " / ").concat(quantity)), calculatingDigits);
20036
20030
  form.setFieldsValue({
20037
- priceExcludeTax: priceExcludeTax
20031
+ priceExcludeTax: _priceExcludeTax
20038
20032
  });
20039
- _context3.next = 33;
20033
+ _context3.next = 50;
20040
20034
  return controller.setEditGood({
20041
- priceExcludeTax: priceExcludeTax
20035
+ priceExcludeTax: _priceExcludeTax,
20036
+ quantity: quantity
20042
20037
  });
20043
20038
 
20044
- case 33:
20045
- _context3.next = 35;
20039
+ case 50:
20040
+ _context3.next = 52;
20046
20041
  return updateUnitPriceTax$1(controller, form, record);
20047
20042
 
20048
- case 35:
20049
- _context3.next = 37;
20043
+ case 52:
20044
+ _context3.next = 54;
20050
20045
  return clearCalculatingField$1(controller);
20051
20046
 
20052
- case 37:
20047
+ case 54:
20053
20048
  case "end":
20054
20049
  return _context3.stop();
20055
20050
  }
@@ -20067,7 +20062,7 @@ var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
20067
20062
  var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20068
20063
  form.validateFields( /*#__PURE__*/function () {
20069
20064
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err, values) {
20070
- var calculatingDigits, priceIncludeTax, quantity, lineAmountIncludeTax, _lineAmountIncludeTax, _quantity;
20065
+ var calculatingDigits, priceIncludeTax, quantity, lineAmountIncludeTax, _lineAmountIncludeTax2, _quantity;
20071
20066
 
20072
20067
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
20073
20068
  while (1) {
@@ -20143,8 +20138,8 @@ var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20143
20138
  break;
20144
20139
  }
20145
20140
 
20146
- _lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
20147
- _quantity = format15(evaluate("".concat(_lineAmountIncludeTax, " / ").concat(priceIncludeTax)), calculatingDigits);
20141
+ _lineAmountIncludeTax2 = format2(values.lineAmountIncludeTax);
20142
+ _quantity = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(priceIncludeTax)), calculatingDigits);
20148
20143
  form.setFieldsValue({
20149
20144
  quantity: _quantity
20150
20145
  });
@@ -20179,7 +20174,7 @@ var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20179
20174
  var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20180
20175
  form.validateFields( /*#__PURE__*/function () {
20181
20176
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(err, values) {
20182
- var calculatingDigits, priceExcludeTax, quantity, lineAmountExcludeTax, _lineAmountExcludeTax, _quantity2;
20177
+ var calculatingDigits, priceExcludeTax, quantity, lineAmountExcludeTax, _lineAmountExcludeTax2, _quantity2;
20183
20178
 
20184
20179
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
20185
20180
  while (1) {
@@ -20255,8 +20250,8 @@ var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20255
20250
  break;
20256
20251
  }
20257
20252
 
20258
- _lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20259
- _quantity2 = format15(evaluate("".concat(_lineAmountExcludeTax, " / ").concat(priceExcludeTax)), calculatingDigits);
20253
+ _lineAmountExcludeTax2 = format2(values.lineAmountExcludeTax);
20254
+ _quantity2 = format15(evaluate("".concat(_lineAmountExcludeTax2, " / ").concat(priceExcludeTax)), calculatingDigits);
20260
20255
  form.setFieldsValue({
20261
20256
  quantity: _quantity2
20262
20257
  });
@@ -20291,7 +20286,7 @@ var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20291
20286
  var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20292
20287
  form.validateFields( /*#__PURE__*/function () {
20293
20288
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(err, values) {
20294
- var calculatingDigits, lineAmountIncludeTax, quantity, priceIncludeTax, _priceIncludeTax, _quantity3;
20289
+ var calculatingDigits, lineAmountIncludeTax, quantity, priceIncludeTax, _priceIncludeTax2, _quantity3;
20295
20290
 
20296
20291
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
20297
20292
  while (1) {
@@ -20359,8 +20354,8 @@ var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record
20359
20354
  break;
20360
20355
  }
20361
20356
 
20362
- _priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
20363
- _quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax)), calculatingDigits);
20357
+ _priceIncludeTax2 = format15(values.priceIncludeTax, calculatingDigits);
20358
+ _quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax2)), calculatingDigits);
20364
20359
  form.setFieldsValue({
20365
20360
  quantity: _quantity3
20366
20361
  });
@@ -20395,7 +20390,7 @@ var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record
20395
20390
  var onChangeLineAmountExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20396
20391
  form.validateFields( /*#__PURE__*/function () {
20397
20392
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(err, values) {
20398
- var calculatingDigits, lineAmountExcludeTax, quantity, priceExcludeTax, _priceExcludeTax, _quantity4;
20393
+ var calculatingDigits, lineAmountExcludeTax, quantity, priceExcludeTax, _priceExcludeTax2, _quantity4;
20399
20394
 
20400
20395
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
20401
20396
  while (1) {
@@ -20463,8 +20458,8 @@ var onChangeLineAmountExcludeTax$1 = lazyFn$1(function (controller, form, record
20463
20458
  break;
20464
20459
  }
20465
20460
 
20466
- _priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
20467
- _quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax)), calculatingDigits);
20461
+ _priceExcludeTax2 = format15(values.priceExcludeTax, calculatingDigits);
20462
+ _quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax2)), calculatingDigits);
20468
20463
  form.setFieldsValue({
20469
20464
  quantity: _quantity4
20470
20465
  });
@@ -21084,21 +21079,21 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
21084
21079
 
21085
21080
  var _quantity5 = format15(sourceQuantity, calculatingDigits);
21086
21081
 
21087
- var _priceExcludeTax2 = format15(sourcePriceExcludeTax, calculatingDigits);
21082
+ var _priceExcludeTax3 = format15(sourcePriceExcludeTax, calculatingDigits);
21088
21083
 
21089
- var _lineAmountExcludeTax2 = format2(evaluate("".concat(_priceExcludeTax2, " * ").concat(_quantity5)));
21084
+ var _lineAmountExcludeTax3 = format2(evaluate("".concat(_priceExcludeTax3, " * ").concat(_quantity5)));
21090
21085
 
21091
- var _lineAmountIncludeTax2 = format2(evaluate("".concat(_lineAmountExcludeTax2, " * (1+(").concat(taxRate, "/100))")));
21086
+ var _lineAmountIncludeTax3 = format2(evaluate("".concat(_lineAmountExcludeTax3, " * (1+(").concat(taxRate, "/100))")));
21092
21087
 
21093
- var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)), calculatingDigits);
21088
+ var _priceIncludeTax3 = format15(evaluate("".concat(_lineAmountIncludeTax3, " / ").concat(_quantity5)), calculatingDigits);
21094
21089
 
21095
- var _taxAmount = evaluate("".concat(_lineAmountIncludeTax2, " - ").concat(_lineAmountExcludeTax2));
21090
+ var _taxAmount = evaluate("".concat(_lineAmountIncludeTax3, " - ").concat(_lineAmountExcludeTax3));
21096
21091
 
21097
21092
  return _objectSpread2(_objectSpread2({}, good), {}, {
21098
- lineAmountExcludeTax: _lineAmountExcludeTax2,
21099
- lineAmountIncludeTax: _lineAmountIncludeTax2,
21093
+ lineAmountExcludeTax: _lineAmountExcludeTax3,
21094
+ lineAmountIncludeTax: _lineAmountIncludeTax3,
21100
21095
  taxAmount: _taxAmount,
21101
- priceIncludeTax: _priceIncludeTax2
21096
+ priceIncludeTax: _priceIncludeTax3
21102
21097
  });
21103
21098
  }
21104
21099
  });
@@ -22465,7 +22460,7 @@ var useColumns$1 = (function (form) {
22465
22460
  }, {
22466
22461
  validator: function () {
22467
22462
  var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
22468
- var quantity, isQuantityValid, isValueValid;
22463
+ var isQuantity, isvalue;
22469
22464
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
22470
22465
  while (1) {
22471
22466
  switch (_context8.prev = _context8.next) {
@@ -22474,38 +22469,20 @@ var useColumns$1 = (function (form) {
22474
22469
  return controller.wait();
22475
22470
 
22476
22471
  case 2:
22477
- // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22478
- // const isvalue = !!value || value === 0;
22479
- // if (isvalue || isQuantity === isvalue) return;
22480
- // callback('请输入单价');
22481
- quantity = getFieldValue('quantity');
22482
- isQuantityValid = quantity !== undefined && quantity !== null && quantity !== '';
22483
- isValueValid = value !== undefined && value !== null && value !== '';
22472
+ isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22473
+ isvalue = !!value || value === 0;
22484
22474
 
22485
- if (!(isValueValid && isQuantityValid)) {
22486
- _context8.next = 7;
22475
+ if (!(isvalue || isQuantity === isvalue)) {
22476
+ _context8.next = 6;
22487
22477
  break;
22488
22478
  }
22489
22479
 
22490
22480
  return _context8.abrupt("return");
22491
22481
 
22492
- case 7:
22493
- if (isValueValid) {
22494
- _context8.next = 9;
22495
- break;
22496
- }
22497
-
22498
- return _context8.abrupt("return", callback('金额不能为空'));
22499
-
22500
- case 9:
22501
- if (isQuantityValid) {
22502
- _context8.next = 11;
22503
- break;
22504
- }
22505
-
22506
- return _context8.abrupt("return", callback('数量不能为空'));
22482
+ case 6:
22483
+ callback('请输入单价');
22507
22484
 
22508
- case 11:
22485
+ case 7:
22509
22486
  case "end":
22510
22487
  return _context8.stop();
22511
22488
  }
@@ -22558,7 +22535,7 @@ var useColumns$1 = (function (form) {
22558
22535
  }, {
22559
22536
  validator: function () {
22560
22537
  var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
22561
- var quantity, isQuantityValid, isValueValid;
22538
+ var isQuantity, isvalue;
22562
22539
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
22563
22540
  while (1) {
22564
22541
  switch (_context9.prev = _context9.next) {
@@ -22567,38 +22544,20 @@ var useColumns$1 = (function (form) {
22567
22544
  return controller.wait();
22568
22545
 
22569
22546
  case 2:
22570
- // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22571
- // const isvalue = !!value || value === 0;
22572
- // if (isvalue || isQuantity === isvalue) return;
22573
- // callback('请输入单价');
22574
- quantity = getFieldValue('quantity');
22575
- isQuantityValid = quantity !== undefined && quantity !== null && quantity !== '';
22576
- isValueValid = value !== undefined && value !== null && value !== '';
22547
+ isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22548
+ isvalue = !!value || value === 0;
22577
22549
 
22578
- if (!(isValueValid && isQuantityValid)) {
22579
- _context9.next = 7;
22550
+ if (!(isvalue || isQuantity === isvalue)) {
22551
+ _context9.next = 6;
22580
22552
  break;
22581
22553
  }
22582
22554
 
22583
22555
  return _context9.abrupt("return");
22584
22556
 
22585
- case 7:
22586
- if (isValueValid) {
22587
- _context9.next = 9;
22588
- break;
22589
- }
22590
-
22591
- return _context9.abrupt("return", callback('金额不能为空'));
22592
-
22593
- case 9:
22594
- if (isQuantityValid) {
22595
- _context9.next = 11;
22596
- break;
22597
- }
22598
-
22599
- return _context9.abrupt("return", callback('数量不能为空'));
22557
+ case 6:
22558
+ callback('请输入单价');
22600
22559
 
22601
- case 11:
22560
+ case 7:
22602
22561
  case "end":
22603
22562
  return _context9.stop();
22604
22563
  }
@@ -27035,14 +26994,14 @@ var DrawerBody$1 = function DrawerBody() {
27035
26994
  // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
27036
26995
  record.quantity = undefined;
27037
26996
  record.lineAmountExcludeTax = undefined;
27038
- record.lineAmountIncludeTax = undefined;
27039
- console.log('s.goodsListState.editGood1:', s.goodsListState.editGood); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
26997
+ record.lineAmountIncludeTax = undefined; // console.log('s.goodsListState.editGood1:', s.goodsListState.editGood);
26998
+ // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
27040
26999
  // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
27041
27000
  // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
27042
27001
  // 中间数据
27043
27002
 
27044
- between = _objectSpread2({}, record);
27045
- console.log(':between:', between);
27003
+ between = _objectSpread2({}, record); // console.log(':between:', between);
27004
+
27046
27005
  between.itemName = getItemName(record, s.goodsListState.editGood);
27047
27006
  between.itemCode = getItemCode(record, s.goodsListState.editGood);
27048
27007
  between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
@@ -27093,22 +27052,22 @@ var DrawerBody$1 = function DrawerBody() {
27093
27052
  s.goodsListState.importGoods.isVisibleDrawer = false;
27094
27053
 
27095
27054
  if (!s.goodsListState.isTaxIncluded) {
27096
- _context2.next = 28;
27055
+ _context2.next = 26;
27097
27056
  break;
27098
27057
  }
27099
27058
 
27100
- _context2.next = 26;
27059
+ _context2.next = 24;
27101
27060
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
27102
27061
 
27103
- case 26:
27104
- _context2.next = 30;
27062
+ case 24:
27063
+ _context2.next = 28;
27105
27064
  break;
27106
27065
 
27107
- case 28:
27108
- _context2.next = 30;
27066
+ case 26:
27067
+ _context2.next = 28;
27109
27068
  return updateUnitPriceTax(controller, s.goodsListState.form, record);
27110
27069
 
27111
- case 30:
27070
+ case 28:
27112
27071
  case "end":
27113
27072
  return _context2.stop();
27114
27073
  }