kts-component-invoice-operate 3.1.18 → 3.1.19

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
@@ -8687,11 +8687,14 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8687
8687
  if (!promptErr(err.lineAmountIncludeTax) && !promptErr(err.taxRate)) {
8688
8688
  taxAmount = countTaxAmount(values.lineAmountIncludeTax, deduction, values.taxRate);
8689
8689
  }
8690
- _context9.next = 5;
8690
+ form.setFieldsValue({
8691
+ taxAmount: taxAmount
8692
+ });
8693
+ _context9.next = 6;
8691
8694
  return controller.setEditGood({
8692
8695
  taxAmount: taxAmount
8693
8696
  });
8694
- case 5:
8697
+ case 6:
8695
8698
  // 计算 金额(不含税)
8696
8699
  if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
8697
8700
  lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax, taxAmount);
@@ -8699,11 +8702,11 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8699
8702
  form.setFieldsValue({
8700
8703
  lineAmountExcludeTax: lineAmountExcludeTax
8701
8704
  });
8702
- _context9.next = 9;
8705
+ _context9.next = 10;
8703
8706
  return controller.setEditGood({
8704
8707
  lineAmountExcludeTax: lineAmountExcludeTax
8705
8708
  });
8706
- case 9:
8709
+ case 10:
8707
8710
  // 单价(不含税)
8708
8711
  if (lineAmountExcludeTax && !promptErr(err.quantity)) {
8709
8712
  priceExcludeTax = countPrice(lineAmountExcludeTax, values.quantity, controller.state.calculatingDigits);
@@ -8711,11 +8714,11 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8711
8714
  form.setFieldsValue({
8712
8715
  priceExcludeTax: priceExcludeTax
8713
8716
  });
8714
- _context9.next = 13;
8717
+ _context9.next = 14;
8715
8718
  return controller.setEditGood({
8716
8719
  priceExcludeTax: priceExcludeTax
8717
8720
  });
8718
- case 13:
8721
+ case 14:
8719
8722
  case "end":
8720
8723
  return _context9.stop();
8721
8724
  }
@@ -11943,12 +11946,10 @@ var DrawerBody$2 = function DrawerBody() {
11943
11946
  }
11944
11947
  return _context2.abrupt("return");
11945
11948
  case 8:
11946
- if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
11947
- record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
11948
- record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
11949
- record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
11950
- record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
11951
- }
11949
+ // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
11950
+ record.quantity = undefined;
11951
+ record.lineAmountExcludeTax = undefined;
11952
+ record.lineAmountIncludeTax = undefined;
11952
11953
  // 中间数据
11953
11954
  between = _objectSpread2({}, record);
11954
11955
  between.itemName = getItemName(record, s.goodsListState.editGood);
@@ -11978,18 +11979,18 @@ var DrawerBody$2 = function DrawerBody() {
11978
11979
  }
11979
11980
  s.goodsListState.importGoods.isVisibleDrawer = false;
11980
11981
  if (!s.goodsListState.isTaxIncluded) {
11981
- _context2.next = 23;
11982
+ _context2.next = 25;
11982
11983
  break;
11983
11984
  }
11984
- _context2.next = 21;
11985
+ _context2.next = 23;
11985
11986
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
11986
- case 21:
11987
- _context2.next = 25;
11988
- break;
11989
11987
  case 23:
11990
- _context2.next = 25;
11991
- return updateUnitPriceTax(controller, s.goodsListState.form, record);
11988
+ _context2.next = 27;
11989
+ break;
11992
11990
  case 25:
11991
+ _context2.next = 27;
11992
+ return updateUnitPriceTax(controller, s.goodsListState.form, record);
11993
+ case 27:
11993
11994
  case "end":
11994
11995
  return _context2.stop();
11995
11996
  }
package/dist/index.js CHANGED
@@ -8697,11 +8697,14 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8697
8697
  if (!promptErr(err.lineAmountIncludeTax) && !promptErr(err.taxRate)) {
8698
8698
  taxAmount = countTaxAmount(values.lineAmountIncludeTax, deduction, values.taxRate);
8699
8699
  }
8700
- _context9.next = 5;
8700
+ form.setFieldsValue({
8701
+ taxAmount: taxAmount
8702
+ });
8703
+ _context9.next = 6;
8701
8704
  return controller.setEditGood({
8702
8705
  taxAmount: taxAmount
8703
8706
  });
8704
- case 5:
8707
+ case 6:
8705
8708
  // 计算 金额(不含税)
8706
8709
  if ((taxAmount || taxAmount === 0) && !promptErr(err.lineAmountIncludeTax)) {
8707
8710
  lineAmountExcludeTax = countAmountExcludeTax(values.lineAmountIncludeTax, taxAmount);
@@ -8709,11 +8712,11 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8709
8712
  form.setFieldsValue({
8710
8713
  lineAmountExcludeTax: lineAmountExcludeTax
8711
8714
  });
8712
- _context9.next = 9;
8715
+ _context9.next = 10;
8713
8716
  return controller.setEditGood({
8714
8717
  lineAmountExcludeTax: lineAmountExcludeTax
8715
8718
  });
8716
- case 9:
8719
+ case 10:
8717
8720
  // 单价(不含税)
8718
8721
  if (lineAmountExcludeTax && !promptErr(err.quantity)) {
8719
8722
  priceExcludeTax = countPrice(lineAmountExcludeTax, values.quantity, controller.state.calculatingDigits);
@@ -8721,11 +8724,11 @@ var updateUnitPriceExcludingTax = /*#__PURE__*/function () {
8721
8724
  form.setFieldsValue({
8722
8725
  priceExcludeTax: priceExcludeTax
8723
8726
  });
8724
- _context9.next = 13;
8727
+ _context9.next = 14;
8725
8728
  return controller.setEditGood({
8726
8729
  priceExcludeTax: priceExcludeTax
8727
8730
  });
8728
- case 13:
8731
+ case 14:
8729
8732
  case "end":
8730
8733
  return _context9.stop();
8731
8734
  }
@@ -11953,12 +11956,10 @@ var DrawerBody$2 = function DrawerBody() {
11953
11956
  }
11954
11957
  return _context2.abrupt("return");
11955
11958
  case 8:
11956
- if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
11957
- record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
11958
- record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
11959
- record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
11960
- record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
11961
- }
11959
+ // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
11960
+ record.quantity = undefined;
11961
+ record.lineAmountExcludeTax = undefined;
11962
+ record.lineAmountIncludeTax = undefined;
11962
11963
  // 中间数据
11963
11964
  between = _objectSpread2({}, record);
11964
11965
  between.itemName = getItemName(record, s.goodsListState.editGood);
@@ -11988,18 +11989,18 @@ var DrawerBody$2 = function DrawerBody() {
11988
11989
  }
11989
11990
  s.goodsListState.importGoods.isVisibleDrawer = false;
11990
11991
  if (!s.goodsListState.isTaxIncluded) {
11991
- _context2.next = 23;
11992
+ _context2.next = 25;
11992
11993
  break;
11993
11994
  }
11994
- _context2.next = 21;
11995
+ _context2.next = 23;
11995
11996
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
11996
- case 21:
11997
- _context2.next = 25;
11998
- break;
11999
11997
  case 23:
12000
- _context2.next = 25;
12001
- return updateUnitPriceTax(controller, s.goodsListState.form, record);
11998
+ _context2.next = 27;
11999
+ break;
12002
12000
  case 25:
12001
+ _context2.next = 27;
12002
+ return updateUnitPriceTax(controller, s.goodsListState.form, record);
12003
+ case 27:
12003
12004
  case "end":
12004
12005
  return _context2.stop();
12005
12006
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.1.18",
3
+ "version": "3.1.19",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -377,6 +377,7 @@ export const updateUnitPriceExcludingTax = async (controller: InvoiceController,
377
377
  if (!promptErr(err.lineAmountIncludeTax) && !promptErr(err.taxRate)) {
378
378
  taxAmount = countTaxAmount(values.lineAmountIncludeTax, deduction, values.taxRate);
379
379
  }
380
+ form.setFieldsValue({ taxAmount });
380
381
  await controller.setEditGood({ taxAmount });
381
382
 
382
383
  // 计算 金额(不含税)
@@ -70,12 +70,10 @@ const DrawerBody = () => {
70
70
  // 没用 被编辑的货物 和 form 就退出
71
71
  if (!s.goodsListState.editGood || !s.goodsListState.form) return;
72
72
 
73
- if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
74
- record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
75
- record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
76
- record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
77
- record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
78
- }
73
+ // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
74
+ record.quantity = undefined;
75
+ record.lineAmountExcludeTax = undefined;
76
+ record.lineAmountIncludeTax = undefined;
79
77
 
80
78
  // 中间数据
81
79
  const between = { ...record };