kts-component-invoice-operate 3.2.264 → 3.2.266

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.
Files changed (45) hide show
  1. package/dist/DifferenceInputModal/demo.d.ts +4 -0
  2. package/dist/DifferenceInputModal/index.d.ts +73 -0
  3. package/dist/Invoice/Invoice-digtal/_test/differenceInput/index.d.ts +4 -0
  4. package/dist/Invoice/InvoiceController/InvoiceControllerState/DifferenceInputState/index.d.ts +11 -0
  5. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +2 -0
  6. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +3 -0
  7. package/dist/Invoice/InvoiceController/hooks/index.d.ts +3 -0
  8. package/dist/Invoice/_test/differenceInput/index.d.ts +4 -0
  9. package/dist/Invoice/tools/calculate/index.d.ts +1 -1
  10. package/dist/Invoice/ui/digtal/DifferenceInput/index.d.ts +3 -0
  11. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +1 -0
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.esm.js +1481 -319
  14. package/dist/index.js +1478 -315
  15. package/package.json +1 -1
  16. package/src/DifferenceInputModal/demo.tsx +22 -0
  17. package/src/DifferenceInputModal/index.less +102 -0
  18. package/src/DifferenceInputModal/index.md +5 -0
  19. package/src/DifferenceInputModal/index.tsx +520 -0
  20. package/src/Invoice/Invoice-digtal/_test/differenceInput/index.tsx +31 -0
  21. package/src/Invoice/Invoice-digtal/index.md +12 -9
  22. package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +9 -2
  23. package/src/Invoice/InvoiceController/InvoiceControllerState/DifferenceInputState/index.ts +16 -0
  24. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +3 -0
  25. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +4 -0
  26. package/src/Invoice/InvoiceController/fns/saveEditGood.ts +1 -0
  27. package/src/Invoice/InvoiceController/hooks/index.ts +63 -0
  28. package/src/Invoice/_test/differenceInput/index.tsx +25 -0
  29. package/src/Invoice/index.md +3 -0
  30. package/src/Invoice/index.tsx +21 -6
  31. package/src/Invoice/tools/calculate/index.ts +2 -3
  32. package/src/Invoice/ui/default/GoodsList/hook/useColumns/autoFillFn/index.ts +2 -1
  33. package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +19 -6
  34. package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +8 -2
  35. package/src/Invoice/ui/default/GoodsList/hook/useWindowClick/index.tsx +4 -1
  36. package/src/Invoice/ui/default/GoodsList/index.tsx +1 -1
  37. package/src/Invoice/ui/default/GoodsList/ui/AddRowButton/index.tsx +4 -0
  38. package/src/Invoice/ui/digtal/DifferenceInput/index.tsx +69 -0
  39. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.ts +2 -2
  40. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +34 -21
  41. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +15 -4
  42. package/src/Invoice/ui/digtal/GoodsList/hook/useWindowClick/index.tsx +4 -1
  43. package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +7 -7
  44. package/src/TaxClassificationCodeModal/index.tsx +2 -0
  45. package/src/index.ts +3 -0
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'kts-components-antd-x4/dist/kts-components-antd-x4.css';
3
+ declare const _default: () => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,73 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ /** 合计行 */
4
+ export interface IDifferenceTotal {
5
+ /** 凭证合计金额总计 */
6
+ voucherTotal: number;
7
+ /** 本次扣除金额总计 */
8
+ deductTotal: number;
9
+ }
10
+ /** 明细行 */
11
+ export interface IDifferenceRow {
12
+ /** 唯一标识 */
13
+ $index?: string;
14
+ /** 合计金额 */
15
+ voucherTotalAmt?: number;
16
+ /** 本次扣除金额 */
17
+ currentDeductAmt?: number;
18
+ /** 凭证类型 */
19
+ voucherType?: string;
20
+ /** 凭证号码 */
21
+ deductVoucherNo?: string;
22
+ /** 开具日期 */
23
+ issueDate?: string;
24
+ /** 备注 */
25
+ remark?: string;
26
+ /** 来源 */
27
+ source?: string;
28
+ }
29
+ export interface IData {
30
+ /** 申报项目代码 */
31
+ projectCode?: string;
32
+ /** 含税销售额 */
33
+ amountIncludeTax?: number;
34
+ /** 本次扣除金额总计 */
35
+ deductTotal: number;
36
+ /** 明细数据 */
37
+ rows?: IDifferenceRow[];
38
+ }
39
+ export interface IDifferenceInputModalProps {
40
+ /** 是否可见 */
41
+ open?: boolean;
42
+ /** 合计 */
43
+ total?: IDifferenceTotal;
44
+ /** 点击取消 */
45
+ onCancel?: () => void;
46
+ value?: IData;
47
+ /** 点击确定 */
48
+ onOk?: (data: IData) => void;
49
+ }
50
+ /** 数据来源枚举 */
51
+ export declare enum DataSrcEnum {
52
+ /** 手工录入 */
53
+ MANUAL = 1,
54
+ /** 勾选录入 */
55
+ CHECK = 2,
56
+ /** 模板录入 */
57
+ TEMPLATE = 3
58
+ }
59
+ export declare const dataSrcOptions: {
60
+ value: DataSrcEnum;
61
+ label: string;
62
+ }[];
63
+ /** 最多只允许输入两位小数的校验器 */
64
+ export declare const maxTwoDecimalsValidator: (_rule: any, value: any) => Promise<void>;
65
+ /**
66
+ * 本次扣除金额不能大于凭证合计金额的校验器
67
+ */
68
+ export declare const deductAmtNotExceedVoucherTotalValidator: (_rule: any, value: any) => Promise<void>;
69
+ /**
70
+ * 差额录入弹窗(静态)
71
+ */
72
+ export declare function DifferenceInputModal(props: IDifferenceInputModalProps): JSX.Element;
73
+ export default DifferenceInputModal;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'antd/dist/antd.css';
3
+ declare const _default: () => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { IData } from '../../../../DifferenceInputModal';
2
+ export default class DifferenceInputState {
3
+ /** 是否启用差额开票 */
4
+ enabled: boolean;
5
+ /** 差额开票弹框是否打开 */
6
+ open: boolean;
7
+ /** 差额开票数据 */
8
+ data?: IData;
9
+ /** 含税销售额 */
10
+ amountIncludeTax?: number;
11
+ }
@@ -97,6 +97,8 @@ export default class GoodsListState {
97
97
  isValidateMeiTan: boolean;
98
98
  /** 煤炭种类赋值商品索引 */
99
99
  meiTanGoodIndex?: string[];
100
+ /** 是否可以点击组件外保存行 */
101
+ isSaveRowOutside: boolean;
100
102
  /** 煤炭时校验函数 */
101
103
  verifyMeiTanFn: (record: any) => Promise<boolean>;
102
104
  }
@@ -7,6 +7,7 @@ import { IInvoiceTypeModalProps } from '../../../InvoiceTypeModal';
7
7
  import { TaxClassificationProps } from '../../../TaxClassificationCodeModal';
8
8
  import AutoComplete from './AutoComplete';
9
9
  import PassengerListState from './PassengerListState';
10
+ import DifferenceInputState from './DifferenceInputState';
10
11
  export default class InvoiceControllerState {
11
12
  /**
12
13
  * 组件模式
@@ -61,5 +62,7 @@ export default class InvoiceControllerState {
61
62
  * 旅客运输列表
62
63
  */
63
64
  passengerListState: PassengerListState;
65
+ /** 差额开票 */
66
+ differenceInputState: DifferenceInputState;
64
67
  addGoodsCheck?: any;
65
68
  }
@@ -0,0 +1,3 @@
1
+ import InvoiceController from "../";
2
+ /** 切换是否启用差额开票重新计算税额 */
3
+ export declare const useRecalculateTax: (invoiceController: InvoiceController) => void;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'antd/dist/antd.css';
3
+ declare const _default: () => JSX.Element;
4
+ export default _default;
@@ -10,7 +10,7 @@ export declare const format15: (value: number | string, defaultFractionDigits?:
10
10
  */
11
11
  export declare function countAmountIncludeTax(quantity?: number | string, priceIncludeTax?: number | string, calculatingDigits?: number): number | undefined;
12
12
  /**
13
- * 不含税金额 = 含税金额-税额
13
+ * 不含税金额 = 含税金额 - 税额
14
14
  * @param amountIncludeTax 含税金额
15
15
  * @param taxAmount 税额
16
16
  * @returns 不含税金额
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  import React, { ChangeEvent } from 'react';
2
2
  import './index.less';
3
+ /** 商品名称输入框 */
3
4
  export default function ItemNameInput(props: {
4
5
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
5
6
  suffix?: React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -6,3 +6,6 @@ export { default as InvoiceTypeModal } from './InvoiceTypeModal';
6
6
  export type { IInvoiceTypeModalProps } from './InvoiceTypeModal';
7
7
  export { default as TaxClassificationModal } from './TaxClassificationCodeModal';
8
8
  export type { TaxClassificationProps } from './TaxClassificationCodeModal';
9
+ /** */
10
+ export { DifferenceInputModal } from './DifferenceInputModal';
11
+ export type { IDifferenceInputModalProps } from './DifferenceInputModal';