kts-component-invoice-operate 3.2.156-1 → 3.2.156-2

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.
@@ -32,6 +32,7 @@ export default interface IGood {
32
32
  priceExcludeTax?: number;
33
33
  /** 类型 0 正常行, 1 折扣行 2 被折扣行 */
34
34
  lineAttribute: LineAttributeType;
35
+ referenceLines?: any[];
35
36
  /** 金额(含税) */
36
37
  lineAmountIncludeTax?: number;
37
38
  /** 金额(不含税) */
package/dist/index.esm.js CHANGED
@@ -10768,6 +10768,8 @@ function SvgSpot(props) {
10768
10768
  }
10769
10769
 
10770
10770
  var useDelItem = (function (goods) {
10771
+ var _goods$referenceLines;
10772
+
10771
10773
  var controller = Invoice.useInvoiceController();
10772
10774
  var model = controller.useMemo(function (s) {
10773
10775
  return s.model;
@@ -10779,6 +10781,10 @@ var useDelItem = (function (goods) {
10779
10781
  controller.delGood(goods.$index);
10780
10782
  }, [controller, goods.$index]);
10781
10783
 
10784
+ if (goods.lineAttribute === LineAttributeType$1.正常 && (goods === null || goods === void 0 ? void 0 : goods.referenceLines) && (goods === null || goods === void 0 ? void 0 : (_goods$referenceLines = goods.referenceLines) === null || _goods$referenceLines === void 0 ? void 0 : _goods$referenceLines.length) > 0) {
10785
+ return undefined;
10786
+ }
10787
+
10782
10788
  if (goods.lineAttribute === LineAttributeType$1.被折扣行) {
10783
10789
  return undefined;
10784
10790
  }
package/dist/index.js CHANGED
@@ -10778,6 +10778,8 @@ function SvgSpot(props) {
10778
10778
  }
10779
10779
 
10780
10780
  var useDelItem = (function (goods) {
10781
+ var _goods$referenceLines;
10782
+
10781
10783
  var controller = Invoice.useInvoiceController();
10782
10784
  var model = controller.useMemo(function (s) {
10783
10785
  return s.model;
@@ -10789,6 +10791,10 @@ var useDelItem = (function (goods) {
10789
10791
  controller.delGood(goods.$index);
10790
10792
  }, [controller, goods.$index]);
10791
10793
 
10794
+ if (goods.lineAttribute === LineAttributeType$1.正常 && (goods === null || goods === void 0 ? void 0 : goods.referenceLines) && (goods === null || goods === void 0 ? void 0 : (_goods$referenceLines = goods.referenceLines) === null || _goods$referenceLines === void 0 ? void 0 : _goods$referenceLines.length) > 0) {
10795
+ return undefined;
10796
+ }
10797
+
10792
10798
  if (goods.lineAttribute === LineAttributeType$1.被折扣行) {
10793
10799
  return undefined;
10794
10800
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.156-1",
3
+ "version": "3.2.156-2",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -49,6 +49,8 @@ export default interface IGood {
49
49
  /** 类型 0 正常行, 1 折扣行 2 被折扣行 */
50
50
  lineAttribute: LineAttributeType;
51
51
 
52
+ referenceLines?: any[];
53
+
52
54
  /** 金额(含税) */
53
55
  lineAmountIncludeTax?: number;
54
56
 
@@ -16,7 +16,9 @@ export default (goods: IGood) => {
16
16
  const onClick = React.useCallback(() => {
17
17
  controller.delGood(goods.$index);
18
18
  }, [controller, goods.$index]);
19
-
19
+ if (goods.lineAttribute === LineAttributeType.正常 && goods?.referenceLines && goods?.referenceLines?.length > 0 ) {
20
+ return undefined;
21
+ }
20
22
  if (goods.lineAttribute === LineAttributeType.被折扣行) {
21
23
  return undefined;
22
24
  }