kts-component-invoice-operate 3.2.36 → 3.2.38
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
|
@@ -1731,10 +1731,9 @@ function _mergeDetails() {
|
|
|
1731
1731
|
return _context.abrupt("return");
|
|
1732
1732
|
|
|
1733
1733
|
case 2:
|
|
1734
|
-
goodsList = state.goodsListState.selectedGoodIndex.map(
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
return !!e;
|
|
1734
|
+
// const goodsList = state.goodsListState.selectedGoodIndex.map(e => state.goodsListState.goodsMap.get(e)).filter(e => !!e) as IGood[];
|
|
1735
|
+
goodsList = state.goodsListState.goodsList.filter(function (e) {
|
|
1736
|
+
return state.goodsListState.selectedGoodIndex.indexOf(e.$index) >= 0;
|
|
1738
1737
|
});
|
|
1739
1738
|
|
|
1740
1739
|
if (!(goodsList.length < 2)) {
|
|
@@ -1985,7 +1984,9 @@ function _fillingInformationGood() {
|
|
|
1985
1984
|
goods = goodsList[findMaxIndex(goodsList.map(function (e) {
|
|
1986
1985
|
return e.lineAmountIncludeTax || 0;
|
|
1987
1986
|
}))];
|
|
1988
|
-
return _context7.abrupt("return", _objectSpread2({}, goods)
|
|
1987
|
+
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, goods), {}, {
|
|
1988
|
+
lineAttribute: LineAttributeType$1.正常
|
|
1989
|
+
}));
|
|
1989
1990
|
|
|
1990
1991
|
case 3:
|
|
1991
1992
|
case "end":
|
package/dist/index.js
CHANGED
|
@@ -1741,10 +1741,9 @@ function _mergeDetails() {
|
|
|
1741
1741
|
return _context.abrupt("return");
|
|
1742
1742
|
|
|
1743
1743
|
case 2:
|
|
1744
|
-
goodsList = state.goodsListState.selectedGoodIndex.map(
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
return !!e;
|
|
1744
|
+
// const goodsList = state.goodsListState.selectedGoodIndex.map(e => state.goodsListState.goodsMap.get(e)).filter(e => !!e) as IGood[];
|
|
1745
|
+
goodsList = state.goodsListState.goodsList.filter(function (e) {
|
|
1746
|
+
return state.goodsListState.selectedGoodIndex.indexOf(e.$index) >= 0;
|
|
1748
1747
|
});
|
|
1749
1748
|
|
|
1750
1749
|
if (!(goodsList.length < 2)) {
|
|
@@ -1995,7 +1994,9 @@ function _fillingInformationGood() {
|
|
|
1995
1994
|
goods = goodsList[findMaxIndex(goodsList.map(function (e) {
|
|
1996
1995
|
return e.lineAmountIncludeTax || 0;
|
|
1997
1996
|
}))];
|
|
1998
|
-
return _context7.abrupt("return", _objectSpread2({}, goods)
|
|
1997
|
+
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, goods), {}, {
|
|
1998
|
+
lineAttribute: LineAttributeType$1.正常
|
|
1999
|
+
}));
|
|
1999
2000
|
|
|
2000
2001
|
case 3:
|
|
2001
2002
|
case "end":
|
package/package.json
CHANGED
|
@@ -7,7 +7,8 @@ import { IGood, InvoiceControllerState, LineAttributeType } from '..';
|
|
|
7
7
|
export default async function mergeDetails(state: InvoiceControllerState) {
|
|
8
8
|
if (state.goodsListState.editGood) return;
|
|
9
9
|
|
|
10
|
-
const goodsList = state.goodsListState.selectedGoodIndex.map(e => state.goodsListState.goodsMap.get(e)).filter(e => !!e) as IGood[];
|
|
10
|
+
// const goodsList = state.goodsListState.selectedGoodIndex.map(e => state.goodsListState.goodsMap.get(e)).filter(e => !!e) as IGood[];
|
|
11
|
+
const goodsList = state.goodsListState.goodsList.filter(e => state.goodsListState.selectedGoodIndex.indexOf(e.$index) >= 0)
|
|
11
12
|
if (goodsList.length < 2) return;
|
|
12
13
|
|
|
13
14
|
try {
|
|
@@ -37,7 +38,7 @@ export default async function mergeDetails(state: InvoiceControllerState) {
|
|
|
37
38
|
|
|
38
39
|
// 计算税额
|
|
39
40
|
sum.taxAmount = chain(bignumber(sum.lineAmountIncludeTax)).subtract(bignumber(sum.lineAmountExcludeTax)).done().toNumber()
|
|
40
|
-
|
|
41
|
+
|
|
41
42
|
const p = state.goodsListState.goodsList.indexOf(goodsList[0]);
|
|
42
43
|
state.goodsListState.goodsList = state.goodsListState.goodsList.filter(e => state.goodsListState.selectedGoodIndex.indexOf(e.$index) < 0);
|
|
43
44
|
state.goodsListState.goodsList.splice(p, 0, sum);
|
|
@@ -95,7 +96,7 @@ async function fillingInformationGood(goodsList: IGood[], sum: IGood) {
|
|
|
95
96
|
|
|
96
97
|
const goods = goodsList[findMaxIndex(goodsList.map(e => e.lineAmountIncludeTax || 0))]
|
|
97
98
|
|
|
98
|
-
return { ...goods };
|
|
99
|
+
return { ...goods, lineAttribute: LineAttributeType.正常 };
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
/** 存在税率不一样的明细,不能合并 */
|