kts-component-invoice-operate 1.0.104 → 1.1.0
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/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.d.ts +14 -1
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +8 -0
- package/dist/Invoice/_test/deduction/index.d.ts +3 -0
- package/dist/Invoice/tools/calculate/index.d.ts +29 -1
- package/dist/Invoice/ui/GoodsList/hook/useDeduction/index.d.ts +8 -0
- package/dist/Invoice/ui/GoodsList/hook/useOnRow/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/hook/useWindowClick/index.d.ts +8 -0
- package/dist/Invoice/ui/GoodsList/index.d.ts +9 -0
- package/dist/index.esm.js +546 -102
- package/dist/index.js +545 -101
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.tsx +13 -2
- package/src/Invoice/_test/endowCode/index.tsx +15 -15
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +106 -3
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +11 -1
- package/src/Invoice/ui/GoodsList/ui/AddDiscountRowButton/index.tsx +1 -1
|
@@ -3,11 +3,24 @@ import IGood from './IGood';
|
|
|
3
3
|
export default class EndowCode {
|
|
4
4
|
/** 准备赋码的货物索引列表 */
|
|
5
5
|
endowcodeGoodIndex: number[];
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* 获取 税收分类编码列表 (弃用)
|
|
8
|
+
* @deprecated 请使用 getTaxCategoryCodeTree 替换
|
|
9
|
+
* */
|
|
7
10
|
getTaxCategoryCodeList: (value: string) => Promise<{
|
|
8
11
|
value: string;
|
|
9
12
|
label: string;
|
|
10
13
|
}[]>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取 税收分类编码树
|
|
16
|
+
* @param taxCategoryCode 税收分类编码
|
|
17
|
+
* @param val val
|
|
18
|
+
* @returns 税收分类编码树
|
|
19
|
+
*/
|
|
20
|
+
getTaxCategoryCodeTree: (taxCategoryCode?: string, val?: string) => Promise<{
|
|
21
|
+
id: string;
|
|
22
|
+
pid: string;
|
|
23
|
+
}[]>;
|
|
11
24
|
/** 税率 是否可以编辑 */
|
|
12
25
|
getReadOnlyTaxRate?: (value?: GoodsListState) => boolean;
|
|
13
26
|
/**
|
|
@@ -5,6 +5,14 @@ import EndowCode from './EndowCode';
|
|
|
5
5
|
import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
|
|
6
6
|
import InvoiceController from '../..';
|
|
7
7
|
export default class GoodsListState {
|
|
8
|
+
/** 扣除额 */
|
|
9
|
+
deduction: number;
|
|
10
|
+
/** 产品最大数 */
|
|
11
|
+
goodMax?: number;
|
|
12
|
+
/** 是否可以切换(含税/不含税)状态 */
|
|
13
|
+
isSwitchTax?: boolean;
|
|
14
|
+
/** 是否能添加折扣行 */
|
|
15
|
+
isAddDiscount?: boolean;
|
|
8
16
|
/** 是否含税 */
|
|
9
17
|
isTaxIncluded: boolean;
|
|
10
18
|
/** 正在编辑的货物 */
|
|
@@ -2,4 +2,32 @@
|
|
|
2
2
|
export declare const format2: (value: number | string) => number | "";
|
|
3
3
|
/** 格式化 保留15位数字 */
|
|
4
4
|
export declare const format15: (value: number | string) => number | "";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 金额(含税) = 数量 * 单价(含税)
|
|
7
|
+
* @param quantity 数量
|
|
8
|
+
* @param priceIncludeTax 单价(含税)
|
|
9
|
+
* @returns 金额(含税)
|
|
10
|
+
*/
|
|
11
|
+
export declare function countAmountIncludeTax(quantity?: number | string, priceIncludeTax?: number | string): number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* 不含税金额 = 含税金额-税额
|
|
14
|
+
* @param amountIncludeTax 含税金额
|
|
15
|
+
* @param taxAmount 税额
|
|
16
|
+
* @returns 不含税金额
|
|
17
|
+
*/
|
|
18
|
+
export declare function countAmountExcludeTax(amountIncludeTax: string | number, taxAmount: number): number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* 税额 = (含税金额-扣除额)/(1+税率)*税率
|
|
21
|
+
* @param amountIncludeTax 含税金额
|
|
22
|
+
* @param deduction 扣除额
|
|
23
|
+
* @param taxRate 税率
|
|
24
|
+
* @returns 税额
|
|
25
|
+
*/
|
|
26
|
+
export declare function countTaxAmount(amountIncludeTax: string | number, deduction: number, taxRate: number): number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* 单价 = 金额/数量
|
|
29
|
+
* @param amount 金额
|
|
30
|
+
* @param quantity 数量
|
|
31
|
+
* @returns 单价
|
|
32
|
+
*/
|
|
33
|
+
export declare function countPrice(amount: string | number, quantity: string | number): number | undefined | '';
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
export interface IGoodsListProps {
|
|
4
|
+
/** 扩展部分 */
|
|
4
5
|
menuExpansion?: React.ReactNode;
|
|
6
|
+
/** 产品最大数 */
|
|
7
|
+
goodMax?: number;
|
|
8
|
+
/** 扣除额 */
|
|
9
|
+
deduction?: number;
|
|
10
|
+
/** 是否能添加折扣行 */
|
|
11
|
+
isAddDiscount?: boolean;
|
|
12
|
+
/** 是否可以切换(含税/不含税)状态 */
|
|
13
|
+
isSwitchTax?: boolean;
|
|
5
14
|
}
|
|
6
15
|
export default class GoodsList extends React.Component<IGoodsListProps> {
|
|
7
16
|
render(): JSX.Element;
|