kts-component-invoice-operate 3.2.84 → 3.2.85
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 +17 -20
- package/dist/index.js +17 -20
- package/package.json +1 -1
- package/src/Invoice/_test/endowCode/index.tsx +26 -1
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +9 -22
- package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useMergeDetails/index.tsx +2 -2
- package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useSalesGifts/index.tsx +2 -2
- package/src/Invoice/ui/default/GoodsList/ui/Statistics/index.tsx +4 -0
- package/src/Invoice/ui/default/Seller/index.tsx +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -9773,6 +9773,8 @@ var Statistics = (function () {
|
|
|
9773
9773
|
|
|
9774
9774
|
var err = (_s$goodsListState$for = (_s$goodsListState$for2 = s.goodsListState.form) === null || _s$goodsListState$for2 === void 0 ? void 0 : _s$goodsListState$for2.getFieldsError()) !== null && _s$goodsListState$for !== void 0 ? _s$goodsListState$for : {};
|
|
9775
9775
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9776
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9777
|
+
|
|
9776
9778
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9777
9779
|
if (!err.lineAmountIncludeTax) {
|
|
9778
9780
|
sum = sum.add(bignumber(editGood.lineAmountIncludeTax || 0));
|
|
@@ -9797,6 +9799,8 @@ var Statistics = (function () {
|
|
|
9797
9799
|
|
|
9798
9800
|
var err = (_s$goodsListState$for3 = (_s$goodsListState$for4 = s.goodsListState.form) === null || _s$goodsListState$for4 === void 0 ? void 0 : _s$goodsListState$for4.getFieldsError()) !== null && _s$goodsListState$for3 !== void 0 ? _s$goodsListState$for3 : {};
|
|
9799
9801
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9802
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9803
|
+
|
|
9800
9804
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9801
9805
|
if (!err.lineAmountExcludeTax) {
|
|
9802
9806
|
sum = sum.add(bignumber(editGood.lineAmountExcludeTax || 0));
|
|
@@ -9818,6 +9822,8 @@ var Statistics = (function () {
|
|
|
9818
9822
|
var editGood = s.goodsListState.editGood; // 正在编辑的货物
|
|
9819
9823
|
|
|
9820
9824
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9825
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9826
|
+
|
|
9821
9827
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9822
9828
|
sum = sum.add(bignumber(editGood.taxAmount || 0));
|
|
9823
9829
|
} else {
|
|
@@ -10536,24 +10542,15 @@ var useEndowCode = (function (goods) {
|
|
|
10536
10542
|
}, _callee);
|
|
10537
10543
|
})), [controller, goods]);
|
|
10538
10544
|
|
|
10539
|
-
if (
|
|
10545
|
+
if ([LineAttributeType$1.正常, LineAttributeType$1.被折扣行, LineAttributeType$1.折扣行].indexOf(goods.lineAttribute) >= 0) {
|
|
10546
|
+
return {
|
|
10547
|
+
key: 'endowCode',
|
|
10548
|
+
title: '赋码',
|
|
10549
|
+
onClick: onClick
|
|
10550
|
+
};
|
|
10551
|
+
} else {
|
|
10540
10552
|
return undefined;
|
|
10541
10553
|
}
|
|
10542
|
-
|
|
10543
|
-
return {
|
|
10544
|
-
key: 'endowCode',
|
|
10545
|
-
title: '赋码',
|
|
10546
|
-
onClick: onClick
|
|
10547
|
-
}; // return React.useMemo(() => {
|
|
10548
|
-
// return (
|
|
10549
|
-
// <Menu.Item key="endowCode" onClick={onClick} ><Text strong>赋码</Text></Menu.Item>
|
|
10550
|
-
// );
|
|
10551
|
-
// }, [goods.lineAttribute, onClick])
|
|
10552
|
-
// return React.useMemo(() => {
|
|
10553
|
-
// return (
|
|
10554
|
-
// <Button key="endowCode" type="link" onClick={onClick} >赋码</Button>
|
|
10555
|
-
// );
|
|
10556
|
-
// }, [goods.lineAttribute, onClick])
|
|
10557
10554
|
});
|
|
10558
10555
|
|
|
10559
10556
|
var css_248z$6 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
|
|
@@ -14704,11 +14701,11 @@ function useMergeDetails() {
|
|
|
14704
14701
|
var items = React.useMemo(function () {
|
|
14705
14702
|
return [{
|
|
14706
14703
|
key: '0',
|
|
14707
|
-
label: '
|
|
14704
|
+
label: '处理全部行',
|
|
14708
14705
|
onClick: onClickAuto
|
|
14709
14706
|
}, {
|
|
14710
14707
|
key: '1',
|
|
14711
|
-
label: '
|
|
14708
|
+
label: '处理选中行',
|
|
14712
14709
|
disabled: selectedGoodIndex.length <= 1,
|
|
14713
14710
|
onClick: onClickManual
|
|
14714
14711
|
}];
|
|
@@ -15149,12 +15146,12 @@ function useSalesGifts() {
|
|
|
15149
15146
|
var items = React.useMemo(function () {
|
|
15150
15147
|
return [{
|
|
15151
15148
|
key: '0',
|
|
15152
|
-
label: '
|
|
15149
|
+
label: '处理全部行',
|
|
15153
15150
|
disabled: giveaways.length <= 0,
|
|
15154
15151
|
onClick: onClickAuto
|
|
15155
15152
|
}, {
|
|
15156
15153
|
key: '1',
|
|
15157
|
-
label: '
|
|
15154
|
+
label: '处理选中行',
|
|
15158
15155
|
disabled: selectedGoodIndex.length <= 0,
|
|
15159
15156
|
onClick: onClickManual
|
|
15160
15157
|
}];
|
package/dist/index.js
CHANGED
|
@@ -9783,6 +9783,8 @@ var Statistics = (function () {
|
|
|
9783
9783
|
|
|
9784
9784
|
var err = (_s$goodsListState$for = (_s$goodsListState$for2 = s.goodsListState.form) === null || _s$goodsListState$for2 === void 0 ? void 0 : _s$goodsListState$for2.getFieldsError()) !== null && _s$goodsListState$for !== void 0 ? _s$goodsListState$for : {};
|
|
9785
9785
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9786
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9787
|
+
|
|
9786
9788
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9787
9789
|
if (!err.lineAmountIncludeTax) {
|
|
9788
9790
|
sum = sum.add(mathjs.bignumber(editGood.lineAmountIncludeTax || 0));
|
|
@@ -9807,6 +9809,8 @@ var Statistics = (function () {
|
|
|
9807
9809
|
|
|
9808
9810
|
var err = (_s$goodsListState$for3 = (_s$goodsListState$for4 = s.goodsListState.form) === null || _s$goodsListState$for4 === void 0 ? void 0 : _s$goodsListState$for4.getFieldsError()) !== null && _s$goodsListState$for3 !== void 0 ? _s$goodsListState$for3 : {};
|
|
9809
9811
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9812
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9813
|
+
|
|
9810
9814
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9811
9815
|
if (!err.lineAmountExcludeTax) {
|
|
9812
9816
|
sum = sum.add(mathjs.bignumber(editGood.lineAmountExcludeTax || 0));
|
|
@@ -9828,6 +9832,8 @@ var Statistics = (function () {
|
|
|
9828
9832
|
var editGood = s.goodsListState.editGood; // 正在编辑的货物
|
|
9829
9833
|
|
|
9830
9834
|
s.goodsListState.goodsList.forEach(function (e) {
|
|
9835
|
+
if (e.lineAttribute === LineAttributeType$1.赠品行) return;
|
|
9836
|
+
|
|
9831
9837
|
if (e.$index === (editGood === null || editGood === void 0 ? void 0 : editGood.$index)) {
|
|
9832
9838
|
sum = sum.add(mathjs.bignumber(editGood.taxAmount || 0));
|
|
9833
9839
|
} else {
|
|
@@ -10546,24 +10552,15 @@ var useEndowCode = (function (goods) {
|
|
|
10546
10552
|
}, _callee);
|
|
10547
10553
|
})), [controller, goods]);
|
|
10548
10554
|
|
|
10549
|
-
if (
|
|
10555
|
+
if ([LineAttributeType$1.正常, LineAttributeType$1.被折扣行, LineAttributeType$1.折扣行].indexOf(goods.lineAttribute) >= 0) {
|
|
10556
|
+
return {
|
|
10557
|
+
key: 'endowCode',
|
|
10558
|
+
title: '赋码',
|
|
10559
|
+
onClick: onClick
|
|
10560
|
+
};
|
|
10561
|
+
} else {
|
|
10550
10562
|
return undefined;
|
|
10551
10563
|
}
|
|
10552
|
-
|
|
10553
|
-
return {
|
|
10554
|
-
key: 'endowCode',
|
|
10555
|
-
title: '赋码',
|
|
10556
|
-
onClick: onClick
|
|
10557
|
-
}; // return React.useMemo(() => {
|
|
10558
|
-
// return (
|
|
10559
|
-
// <Menu.Item key="endowCode" onClick={onClick} ><Text strong>赋码</Text></Menu.Item>
|
|
10560
|
-
// );
|
|
10561
|
-
// }, [goods.lineAttribute, onClick])
|
|
10562
|
-
// return React.useMemo(() => {
|
|
10563
|
-
// return (
|
|
10564
|
-
// <Button key="endowCode" type="link" onClick={onClick} >赋码</Button>
|
|
10565
|
-
// );
|
|
10566
|
-
// }, [goods.lineAttribute, onClick])
|
|
10567
10564
|
});
|
|
10568
10565
|
|
|
10569
10566
|
var css_248z$6 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
|
|
@@ -14714,11 +14711,11 @@ function useMergeDetails() {
|
|
|
14714
14711
|
var items = React__default['default'].useMemo(function () {
|
|
14715
14712
|
return [{
|
|
14716
14713
|
key: '0',
|
|
14717
|
-
label: '
|
|
14714
|
+
label: '处理全部行',
|
|
14718
14715
|
onClick: onClickAuto
|
|
14719
14716
|
}, {
|
|
14720
14717
|
key: '1',
|
|
14721
|
-
label: '
|
|
14718
|
+
label: '处理选中行',
|
|
14722
14719
|
disabled: selectedGoodIndex.length <= 1,
|
|
14723
14720
|
onClick: onClickManual
|
|
14724
14721
|
}];
|
|
@@ -15159,12 +15156,12 @@ function useSalesGifts() {
|
|
|
15159
15156
|
var items = React__default['default'].useMemo(function () {
|
|
15160
15157
|
return [{
|
|
15161
15158
|
key: '0',
|
|
15162
|
-
label: '
|
|
15159
|
+
label: '处理全部行',
|
|
15163
15160
|
disabled: giveaways.length <= 0,
|
|
15164
15161
|
onClick: onClickAuto
|
|
15165
15162
|
}, {
|
|
15166
15163
|
key: '1',
|
|
15167
|
-
label: '
|
|
15164
|
+
label: '处理选中行',
|
|
15168
15165
|
disabled: selectedGoodIndex.length <= 0,
|
|
15169
15166
|
onClick: onClickManual
|
|
15170
15167
|
}];
|
package/package.json
CHANGED
|
@@ -259,7 +259,32 @@ const lines: any[] = [
|
|
|
259
259
|
"referenceLines": null,
|
|
260
260
|
"version": 0,
|
|
261
261
|
taxAmount:1
|
|
262
|
-
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"serialNumber": "1714491422279110656",
|
|
265
|
+
"lineNumber": 3,
|
|
266
|
+
"taxCode": "3070401000000000000",
|
|
267
|
+
"taxName": "信息技术服务",
|
|
268
|
+
"specification": null,
|
|
269
|
+
"itemName": "技术服务费",
|
|
270
|
+
"itemCode": null,
|
|
271
|
+
"unit": "套",
|
|
272
|
+
"quantity": 1,
|
|
273
|
+
"taxRate": 0.06,
|
|
274
|
+
"priceExcludeTax": 2,
|
|
275
|
+
"priceIncludeTax": 2.12,
|
|
276
|
+
"amountTax": 0.12,
|
|
277
|
+
"lineAmountExcludeTax": 5,
|
|
278
|
+
"lineAmountIncludeTax": 5.3,
|
|
279
|
+
"lineAttribute": LineAttributeType.赠品行,
|
|
280
|
+
"discountGroup": null,
|
|
281
|
+
"favouredPolicyMark": false,
|
|
282
|
+
"favouredPolicyName": null,
|
|
283
|
+
"zeroTaxRateFlag": null,
|
|
284
|
+
"referenceLines": null,
|
|
285
|
+
"version": 0,
|
|
286
|
+
taxAmount:1
|
|
287
|
+
}
|
|
263
288
|
]
|
|
264
289
|
|
|
265
290
|
const moke = [
|
package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// import { Button } from 'kts-components-antd-x3';
|
|
3
2
|
import Invoice from '../../../../../../../../..';
|
|
4
|
-
import { IGood, LineAttributeType } from '../../../../../../../../../InvoiceController';
|
|
5
3
|
import { endowCode } from '../../../../autoFillFn';
|
|
4
|
+
import { IGood, LineAttributeType } from '../../../../../../../../../InvoiceController';
|
|
6
5
|
|
|
7
6
|
// const { Text } = Typography;
|
|
8
7
|
|
|
@@ -14,25 +13,13 @@ export default (goods: IGood) => {
|
|
|
14
13
|
endowCode(controller, goods);
|
|
15
14
|
}, [controller, goods]);
|
|
16
15
|
|
|
17
|
-
if (goods.lineAttribute
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
if ([LineAttributeType.正常, LineAttributeType.被折扣行, LineAttributeType.折扣行].indexOf(goods.lineAttribute) >= 0) {
|
|
17
|
+
return {
|
|
18
|
+
key: 'endowCode',
|
|
19
|
+
title: '赋码',
|
|
20
|
+
onClick,
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
return undefined
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
// return React.useMemo(() => {
|
|
28
|
-
// return (
|
|
29
|
-
// <Menu.Item key="endowCode" onClick={onClick} ><Text strong>赋码</Text></Menu.Item>
|
|
30
|
-
// );
|
|
31
|
-
// }, [goods.lineAttribute, onClick])
|
|
32
|
-
|
|
33
|
-
// return React.useMemo(() => {
|
|
34
|
-
// return (
|
|
35
|
-
// <Button key="endowCode" type="link" onClick={onClick} >赋码</Button>
|
|
36
|
-
// );
|
|
37
|
-
// }, [goods.lineAttribute, onClick])
|
|
38
25
|
};
|
|
@@ -36,11 +36,11 @@ export default function useMergeDetails() {
|
|
|
36
36
|
return [
|
|
37
37
|
{
|
|
38
38
|
key: '0',
|
|
39
|
-
label: '
|
|
39
|
+
label: '处理全部行',
|
|
40
40
|
onClick: onClickAuto,
|
|
41
41
|
}, {
|
|
42
42
|
key: '1',
|
|
43
|
-
label: '
|
|
43
|
+
label: '处理选中行',
|
|
44
44
|
disabled: selectedGoodIndex.length <= 1,
|
|
45
45
|
onClick: onClickManual,
|
|
46
46
|
},
|
|
@@ -46,12 +46,12 @@ export default function useSalesGifts() {
|
|
|
46
46
|
return [
|
|
47
47
|
{
|
|
48
48
|
key: '0',
|
|
49
|
-
label: '
|
|
49
|
+
label: '处理全部行',
|
|
50
50
|
disabled: giveaways.length <= 0,
|
|
51
51
|
onClick: onClickAuto,
|
|
52
52
|
}, {
|
|
53
53
|
key: '1',
|
|
54
|
-
label: '
|
|
54
|
+
label: '处理选中行',
|
|
55
55
|
disabled: selectedGoodIndex.length <= 0,
|
|
56
56
|
onClick: onClickManual,
|
|
57
57
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { } from 'kts-components-antd-x3';
|
|
3
3
|
import { chain, bignumber } from 'mathjs';
|
|
4
|
+
import { LineAttributeType } from '../../../../../../Invoice/InvoiceController';
|
|
4
5
|
import Invoice from '../../../../..';
|
|
5
6
|
import './index.less';
|
|
6
7
|
|
|
@@ -23,6 +24,7 @@ export default () => {
|
|
|
23
24
|
const err = s.goodsListState.form?.getFieldsError() ?? {};
|
|
24
25
|
|
|
25
26
|
s.goodsListState.goodsList.forEach((e) => {
|
|
27
|
+
if (e.lineAttribute === LineAttributeType.赠品行) return;
|
|
26
28
|
if (e.$index === editGood?.$index) {
|
|
27
29
|
if (!err.lineAmountIncludeTax) {
|
|
28
30
|
sum = sum.add(bignumber(editGood.lineAmountIncludeTax || 0));
|
|
@@ -45,6 +47,7 @@ export default () => {
|
|
|
45
47
|
const err = s.goodsListState.form?.getFieldsError() ?? {};
|
|
46
48
|
|
|
47
49
|
s.goodsListState.goodsList.forEach((e) => {
|
|
50
|
+
if (e.lineAttribute === LineAttributeType.赠品行) return;
|
|
48
51
|
if (e.$index === editGood?.$index) {
|
|
49
52
|
if (!err.lineAmountExcludeTax) {
|
|
50
53
|
sum = sum.add(bignumber(editGood.lineAmountExcludeTax || 0));
|
|
@@ -65,6 +68,7 @@ export default () => {
|
|
|
65
68
|
let sum = chain(bignumber(0));
|
|
66
69
|
const editGood = s.goodsListState.editGood; // 正在编辑的货物
|
|
67
70
|
s.goodsListState.goodsList.forEach((e) => {
|
|
71
|
+
if (e.lineAttribute === LineAttributeType.赠品行) return;
|
|
68
72
|
if (e.$index === editGood?.$index) {
|
|
69
73
|
sum = sum.add(bignumber(editGood.taxAmount || 0));
|
|
70
74
|
} else {
|
|
@@ -34,7 +34,7 @@ const Main = decorator<ISellerProps, ISellerProps & FormComponentProps>(Form.cre
|
|
|
34
34
|
const controller = Invoice.useInvoiceController();
|
|
35
35
|
|
|
36
36
|
/** 控制器 */
|
|
37
|
-
const model = controller.useMemo(s => s.model, [])
|
|
37
|
+
const model = controller.useMemo(s => s.model, []);
|
|
38
38
|
|
|
39
39
|
/** 注册 form 对象 */
|
|
40
40
|
controller.useForm('seller', form);
|