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.
@@ -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
  /** 正在编辑的货物 */
@@ -0,0 +1,3 @@
1
+ import 'antd/dist/antd.css';
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -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
- export declare function quantityPriceIncludeTax(quantity?: number | string, priceIncludeTax?: number | string): number | undefined;
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 | '';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 扣除额 相关业务
3
+ */
4
+ import { InvoiceController } from "../../../../../";
5
+ /**
6
+ * 扣除额 相关业务
7
+ */
8
+ export default function useDeduction(controller: InvoiceController, deduction?: number): void;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 表格行事件
3
+ */
1
4
  import IGood from '../../../../InvoiceController/InvoiceControllerState/GoodsListState/IGood';
2
5
  declare const _default: () => {
3
6
  onClick: (record: IGood) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 点击组件外部 保存正在编辑的货物
3
+ */
4
+ import { InvoiceController } from "../../../../../";
5
+ /**
6
+ * 点击组件外部 保存正在编辑的货物
7
+ */
8
+ export default function useWindowClick(controller: InvoiceController): void;
@@ -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;