kts-component-invoice-operate 3.2.85 → 3.2.86

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
@@ -703,6 +703,18 @@ function styleInject(css, ref) {
703
703
  var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
704
704
  styleInject(css_248z);
705
705
 
706
+ var LineAttributeType;
707
+
708
+ (function (LineAttributeType) {
709
+ LineAttributeType[LineAttributeType["\u6B63\u5E38"] = 0] = "\u6B63\u5E38";
710
+ LineAttributeType[LineAttributeType["\u6298\u6263\u884C"] = 1] = "\u6298\u6263\u884C";
711
+ LineAttributeType[LineAttributeType["\u88AB\u6298\u6263\u884C"] = 2] = "\u88AB\u6298\u6263\u884C";
712
+ LineAttributeType[LineAttributeType["\u6298\u8BA9\u884C"] = 3] = "\u6298\u8BA9\u884C";
713
+ LineAttributeType[LineAttributeType["\u8D60\u54C1\u884C"] = 4] = "\u8D60\u54C1\u884C";
714
+ })(LineAttributeType || (LineAttributeType = {}));
715
+
716
+ var LineAttributeType$1 = LineAttributeType;
717
+
706
718
  var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
707
719
  _inherits(InvoiceControllerForm, _GreyReactBox);
708
720
 
@@ -811,7 +823,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
811
823
  var sum = chain$1(bignumber(0));
812
824
 
813
825
  _this3.state.goodsListState.goodsList.forEach(function (e) {
814
- if (!e) return;
826
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
815
827
  sum = sum.add(bignumber(e.lineAmountIncludeTax || 0));
816
828
  });
817
829
 
@@ -823,7 +835,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
823
835
  var sum = chain$1(bignumber(0));
824
836
 
825
837
  _this3.state.goodsListState.goodsList.forEach(function (e) {
826
- if (!e) return;
838
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
827
839
  sum = sum.add(bignumber(e.lineAmountExcludeTax || 0));
828
840
  });
829
841
 
@@ -835,7 +847,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
835
847
  var sum = chain$1(bignumber(0));
836
848
 
837
849
  _this3.state.goodsListState.goodsList.forEach(function (e) {
838
- if (!e) return;
850
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
839
851
  sum = sum.add(bignumber(e.taxAmount || 0));
840
852
  });
841
853
 
@@ -967,18 +979,6 @@ var ImportGoods = /*#__PURE__*/_createClass(function ImportGoods() {
967
979
  }();
968
980
  });
969
981
 
970
- var LineAttributeType;
971
-
972
- (function (LineAttributeType) {
973
- LineAttributeType[LineAttributeType["\u6B63\u5E38"] = 0] = "\u6B63\u5E38";
974
- LineAttributeType[LineAttributeType["\u6298\u6263\u884C"] = 1] = "\u6298\u6263\u884C";
975
- LineAttributeType[LineAttributeType["\u88AB\u6298\u6263\u884C"] = 2] = "\u88AB\u6298\u6263\u884C";
976
- LineAttributeType[LineAttributeType["\u6298\u8BA9\u884C"] = 3] = "\u6298\u8BA9\u884C";
977
- LineAttributeType[LineAttributeType["\u8D60\u54C1\u884C"] = 4] = "\u8D60\u54C1\u884C";
978
- })(LineAttributeType || (LineAttributeType = {}));
979
-
980
- var LineAttributeType$1 = LineAttributeType;
981
-
982
982
  var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
983
983
  _classCallCheck(this, EndowCode);
984
984
 
package/dist/index.js CHANGED
@@ -713,6 +713,18 @@ function styleInject(css, ref) {
713
713
  var css_248z = ".kts-invoice-operate {\n border: 1px solid #dcdcdc;\n font-size: 12px;\n}\n.kts-invoice-operate > * {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate > *:last-child {\n border-bottom: none;\n}\n.kts-invoice-operate-digtal {\n font-family: PingFang SC;\n font-size: 14px;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont {\n border: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > * {\n border-bottom: 2px solid #9F613E;\n}\n.kts-invoice-operate-digtal .kts-invoice-operate-digtal-cont > *:last-child {\n border-bottom: none;\n}\n";
714
714
  styleInject(css_248z);
715
715
 
716
+ var LineAttributeType;
717
+
718
+ (function (LineAttributeType) {
719
+ LineAttributeType[LineAttributeType["\u6B63\u5E38"] = 0] = "\u6B63\u5E38";
720
+ LineAttributeType[LineAttributeType["\u6298\u6263\u884C"] = 1] = "\u6298\u6263\u884C";
721
+ LineAttributeType[LineAttributeType["\u88AB\u6298\u6263\u884C"] = 2] = "\u88AB\u6298\u6263\u884C";
722
+ LineAttributeType[LineAttributeType["\u6298\u8BA9\u884C"] = 3] = "\u6298\u8BA9\u884C";
723
+ LineAttributeType[LineAttributeType["\u8D60\u54C1\u884C"] = 4] = "\u8D60\u54C1\u884C";
724
+ })(LineAttributeType || (LineAttributeType = {}));
725
+
726
+ var LineAttributeType$1 = LineAttributeType;
727
+
716
728
  var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
717
729
  _inherits(InvoiceControllerForm, _GreyReactBox);
718
730
 
@@ -821,7 +833,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
821
833
  var sum = mathjs.chain(mathjs.bignumber(0));
822
834
 
823
835
  _this3.state.goodsListState.goodsList.forEach(function (e) {
824
- if (!e) return;
836
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
825
837
  sum = sum.add(mathjs.bignumber(e.lineAmountIncludeTax || 0));
826
838
  });
827
839
 
@@ -833,7 +845,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
833
845
  var sum = mathjs.chain(mathjs.bignumber(0));
834
846
 
835
847
  _this3.state.goodsListState.goodsList.forEach(function (e) {
836
- if (!e) return;
848
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
837
849
  sum = sum.add(mathjs.bignumber(e.lineAmountExcludeTax || 0));
838
850
  });
839
851
 
@@ -845,7 +857,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
845
857
  var sum = mathjs.chain(mathjs.bignumber(0));
846
858
 
847
859
  _this3.state.goodsListState.goodsList.forEach(function (e) {
848
- if (!e) return;
860
+ if (!e || e.lineAttribute === LineAttributeType$1.赠品行) return;
849
861
  sum = sum.add(mathjs.bignumber(e.taxAmount || 0));
850
862
  });
851
863
 
@@ -977,18 +989,6 @@ var ImportGoods = /*#__PURE__*/_createClass(function ImportGoods() {
977
989
  }();
978
990
  });
979
991
 
980
- var LineAttributeType;
981
-
982
- (function (LineAttributeType) {
983
- LineAttributeType[LineAttributeType["\u6B63\u5E38"] = 0] = "\u6B63\u5E38";
984
- LineAttributeType[LineAttributeType["\u6298\u6263\u884C"] = 1] = "\u6298\u6263\u884C";
985
- LineAttributeType[LineAttributeType["\u88AB\u6298\u6263\u884C"] = 2] = "\u88AB\u6298\u6263\u884C";
986
- LineAttributeType[LineAttributeType["\u6298\u8BA9\u884C"] = 3] = "\u6298\u8BA9\u884C";
987
- LineAttributeType[LineAttributeType["\u8D60\u54C1\u884C"] = 4] = "\u8D60\u54C1\u884C";
988
- })(LineAttributeType || (LineAttributeType = {}));
989
-
990
- var LineAttributeType$1 = LineAttributeType;
991
-
992
992
  var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
993
993
  _classCallCheck(this, EndowCode);
994
994
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.85",
3
+ "version": "3.2.86",
4
4
  "scripts": {
5
5
  "dev": "dumi dev",
6
6
  "start": "dumi dev",
@@ -3,6 +3,7 @@ import GreyReactBox from 'grey-react-box';
3
3
  import { chain, bignumber } from 'mathjs';
4
4
  import InvoiceControllerState from '../InvoiceControllerState';
5
5
  import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
6
+ import LineAttributeType from '../InvoiceControllerState/GoodsListState/LineAttributeType';
6
7
 
7
8
  export default class InvoiceControllerForm extends GreyReactBox<InvoiceControllerState> {
8
9
  /** form 字典 */
@@ -40,7 +41,7 @@ export default class InvoiceControllerForm extends GreyReactBox<InvoiceControlle
40
41
  if (this.state.goodsListState.form) {
41
42
  try {
42
43
  await this.state.goodsListState.form?.validateFields()
43
- } catch (error:any) {
44
+ } catch (error: any) {
44
45
  _errors.set('goodsList', error.errors);
45
46
  }
46
47
  }
@@ -51,7 +52,7 @@ export default class InvoiceControllerForm extends GreyReactBox<InvoiceControlle
51
52
  _values.set('lineAmountIncludeTax', (() => {
52
53
  let sum = chain(bignumber(0));
53
54
  this.state.goodsListState.goodsList.forEach(e => {
54
- if (!e) return;
55
+ if (!e || e.lineAttribute === LineAttributeType.赠品行) return;
55
56
  sum = sum.add(bignumber(e.lineAmountIncludeTax || 0));
56
57
  });
57
58
  return sum.done().toNumber();
@@ -61,7 +62,7 @@ export default class InvoiceControllerForm extends GreyReactBox<InvoiceControlle
61
62
  _values.set('lineAmountExcludeTax', (() => {
62
63
  let sum = chain(bignumber(0));
63
64
  this.state.goodsListState.goodsList.forEach(e => {
64
- if (!e) return;
65
+ if (!e || e.lineAttribute === LineAttributeType.赠品行) return;
65
66
  sum = sum.add(bignumber(e.lineAmountExcludeTax || 0));
66
67
  });
67
68
  return sum.done().toNumber();
@@ -71,7 +72,7 @@ export default class InvoiceControllerForm extends GreyReactBox<InvoiceControlle
71
72
  _values.set('taxAmount', (() => {
72
73
  let sum = chain(bignumber(0));
73
74
  this.state.goodsListState.goodsList.forEach((e) => {
74
- if (!e) return;
75
+ if (!e || e.lineAttribute === LineAttributeType.赠品行) return;
75
76
  sum = sum.add(bignumber(e.taxAmount || 0));
76
77
  });
77
78
  return sum.done().toNumber();