kts-component-invoice-operate 3.2.37 → 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)) {
|
|
@@ -1798,21 +1797,21 @@ function _mergeDetails() {
|
|
|
1798
1797
|
state.goodsListState.goodsMap.set(e.$index, e);
|
|
1799
1798
|
});
|
|
1800
1799
|
state.goodsListState.selectedGoodIndex = [];
|
|
1801
|
-
_context.next =
|
|
1800
|
+
_context.next = 40;
|
|
1802
1801
|
break;
|
|
1803
1802
|
|
|
1804
|
-
case
|
|
1805
|
-
_context.prev =
|
|
1803
|
+
case 36:
|
|
1804
|
+
_context.prev = 36;
|
|
1806
1805
|
_context.t0 = _context["catch"](5);
|
|
1807
1806
|
debugger;
|
|
1808
1807
|
showError(_context.t0);
|
|
1809
1808
|
|
|
1810
|
-
case
|
|
1809
|
+
case 40:
|
|
1811
1810
|
case "end":
|
|
1812
1811
|
return _context.stop();
|
|
1813
1812
|
}
|
|
1814
1813
|
}
|
|
1815
|
-
}, _callee, null, [[5,
|
|
1814
|
+
}, _callee, null, [[5, 36]]);
|
|
1816
1815
|
}));
|
|
1817
1816
|
return _mergeDetails.apply(this, arguments);
|
|
1818
1817
|
}
|
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)) {
|
|
@@ -1808,21 +1807,21 @@ function _mergeDetails() {
|
|
|
1808
1807
|
state.goodsListState.goodsMap.set(e.$index, e);
|
|
1809
1808
|
});
|
|
1810
1809
|
state.goodsListState.selectedGoodIndex = [];
|
|
1811
|
-
_context.next =
|
|
1810
|
+
_context.next = 40;
|
|
1812
1811
|
break;
|
|
1813
1812
|
|
|
1814
|
-
case
|
|
1815
|
-
_context.prev =
|
|
1813
|
+
case 36:
|
|
1814
|
+
_context.prev = 36;
|
|
1816
1815
|
_context.t0 = _context["catch"](5);
|
|
1817
1816
|
debugger;
|
|
1818
1817
|
showError(_context.t0);
|
|
1819
1818
|
|
|
1820
|
-
case
|
|
1819
|
+
case 40:
|
|
1821
1820
|
case "end":
|
|
1822
1821
|
return _context.stop();
|
|
1823
1822
|
}
|
|
1824
1823
|
}
|
|
1825
|
-
}, _callee, null, [[5,
|
|
1824
|
+
}, _callee, null, [[5, 36]]);
|
|
1826
1825
|
}));
|
|
1827
1826
|
return _mergeDetails.apply(this, arguments);
|
|
1828
1827
|
}
|
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,8 +38,8 @@ 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
|
-
const p = state.goodsListState.goodsList.indexOf(goodsList[0]);
|
|
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);
|
|
44
45
|
state.goodsListState.goodsMap = new Map();
|