kts-component-invoice-operate 3.1.3 → 3.1.4

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 (116) hide show
  1. package/.dumi/theme/builtins/API.tsx +66 -66
  2. package/.editorconfig +16 -16
  3. package/.fatherrc.ts +4 -4
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +8 -8
  7. package/README.md +5 -5
  8. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +2 -2
  9. package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +1 -1
  10. package/dist/index.esm.js +2714 -3858
  11. package/dist/index.js +2714 -3858
  12. package/docs/index.md +5 -5
  13. package/index.html +12 -12
  14. package/package.json +59 -59
  15. package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +94 -94
  16. package/src/Invoice/InvoiceController/InvoiceControllerState/BuyerState/index.tsx +88 -88
  17. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +90 -90
  18. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IColumnsReplenish/index.ts +10 -10
  19. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +72 -72
  20. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ImportGoods/index.ts +80 -80
  21. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/LineAttributeType/index.ts +5 -5
  22. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +9 -9
  23. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +88 -88
  24. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +42 -42
  25. package/src/Invoice/InvoiceController/fns/addGood.ts +11 -11
  26. package/src/Invoice/InvoiceController/fns/addGoodDiscount.ts +125 -125
  27. package/src/Invoice/InvoiceController/fns/delGood.ts +43 -43
  28. package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +23 -23
  29. package/src/Invoice/InvoiceController/fns/saveEditGood.ts +23 -23
  30. package/src/Invoice/InvoiceController/fns/setEditGood.ts +16 -16
  31. package/src/Invoice/InvoiceController/fns/setGoods.ts +10 -10
  32. package/src/Invoice/InvoiceController/fns/updateInvoiceNo.ts +8 -8
  33. package/src/Invoice/InvoiceController/index.ts +61 -61
  34. package/src/Invoice/_test/buyerNameSearch/index.tsx +41 -41
  35. package/src/Invoice/_test/deduction/index.tsx +935 -935
  36. package/src/Invoice/_test/draft/index.tsx +40 -40
  37. package/src/Invoice/_test/easiest/index.tsx +5 -5
  38. package/src/Invoice/_test/endowCode/index.tsx +1095 -1095
  39. package/src/Invoice/_test/goodsMenuExpand/index.tsx +32 -32
  40. package/src/Invoice/_test/importBuyer/index.tsx +74 -74
  41. package/src/Invoice/_test/importGoods/index.tsx +515 -515
  42. package/src/Invoice/_test/invoiceType/index.tsx +59 -59
  43. package/src/Invoice/_test/isInvoiceNo/index.tsx +12 -12
  44. package/src/Invoice/_test/replaceHead/index.tsx +22 -22
  45. package/src/Invoice/_test/retrieveData/index.tsx +22 -22
  46. package/src/Invoice/_test/seller/index.tsx +28 -28
  47. package/src/Invoice/_test/setDataSource/index.tsx +22 -22
  48. package/src/Invoice/_test/unit/index.tsx +19 -19
  49. package/src/Invoice/index.less +12 -12
  50. package/src/Invoice/index.md +53 -53
  51. package/src/Invoice/index.tsx +104 -104
  52. package/src/Invoice/tools/calculate/index.ts +97 -97
  53. package/src/Invoice/tools/coolingFn/index.ts +17 -17
  54. package/src/Invoice/tools/evaluate/index.ts +7 -7
  55. package/src/Invoice/tools/idGenerator/index.ts +2 -2
  56. package/src/Invoice/tools/itemName/index.ts +46 -46
  57. package/src/Invoice/tools/lazyFn/index.ts +19 -19
  58. package/src/Invoice/tools/strringFn/index.ts +40 -40
  59. package/src/Invoice/ui/AddComparisonDrawer/index.tsx +149 -149
  60. package/src/Invoice/ui/Buyer/index.less +219 -219
  61. package/src/Invoice/ui/Buyer/index.tsx +114 -114
  62. package/src/Invoice/ui/Buyer/ui/BuyerNameInput/index.tsx +166 -166
  63. package/src/Invoice/ui/Buyer/ui/ImportBuyerButton/index.tsx +21 -21
  64. package/src/Invoice/ui/EndowCodeDrawer/index.less +8 -8
  65. package/src/Invoice/ui/EndowCodeDrawer/index.tsx +441 -441
  66. package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +490 -490
  67. package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +603 -603
  68. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/ItemNameInput/index.less +9 -9
  69. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +34 -34
  70. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowEditButton/index.tsx +30 -30
  71. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/_useAddComparison/index.tsx +43 -43
  72. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +76 -76
  73. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +35 -35
  74. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.tsx +34 -34
  75. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.less +13 -13
  76. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +98 -98
  77. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowSaveButton/index.tsx +14 -14
  78. package/src/Invoice/ui/GoodsList/hook/useColumns/ui/TitleText/index.tsx +20 -20
  79. package/src/Invoice/ui/GoodsList/hook/useDeduction/index.tsx +24 -24
  80. package/src/Invoice/ui/GoodsList/hook/useOnRow/index.tsx +39 -39
  81. package/src/Invoice/ui/GoodsList/hook/useRowSelection/index.tsx +111 -111
  82. package/src/Invoice/ui/GoodsList/hook/useToGenerateId/index.ts +8 -8
  83. package/src/Invoice/ui/GoodsList/hook/useWindowClick/index.tsx +23 -23
  84. package/src/Invoice/ui/GoodsList/index.less +170 -170
  85. package/src/Invoice/ui/GoodsList/index.tsx +177 -177
  86. package/src/Invoice/ui/GoodsList/ui/AddRowButton/index.tsx +61 -61
  87. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.less +21 -21
  88. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +244 -244
  89. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +75 -75
  90. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +66 -66
  91. package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.tsx +58 -58
  92. package/src/Invoice/ui/GoodsList/ui/BulkMenu/index.tsx +37 -37
  93. package/src/Invoice/ui/GoodsList/ui/DescribeSwitch/index.tsx +36 -36
  94. package/src/Invoice/ui/GoodsList/ui/Search/index.less +10 -10
  95. package/src/Invoice/ui/GoodsList/ui/Search/index.tsx +50 -50
  96. package/src/Invoice/ui/GoodsList/ui/Statistics/index.less +18 -18
  97. package/src/Invoice/ui/GoodsList/ui/Statistics/index.tsx +109 -109
  98. package/src/Invoice/ui/GoodsList/ui/TableRow/index.tsx +27 -27
  99. package/src/Invoice/ui/GoodsList/ui/TableVirtual/index.less +38 -38
  100. package/src/Invoice/ui/GoodsList/ui/TableVirtual/index.tsx +105 -105
  101. package/src/Invoice/ui/GoodsList/ui/TableVirtual.o/index.less +44 -44
  102. package/src/Invoice/ui/GoodsList/ui/TableVirtual.o/index.tsx +96 -96
  103. package/src/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.tsx +30 -30
  104. package/src/Invoice/ui/ImportBuyerDrawer/index.tsx +75 -75
  105. package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +174 -174
  106. package/src/Invoice/ui/InvoiceHeader/index.less +68 -68
  107. package/src/Invoice/ui/InvoiceHeader/index.tsx +246 -246
  108. package/src/Invoice/ui/Seller/index.less +113 -113
  109. package/src/Invoice/ui/Seller/index.tsx +98 -98
  110. package/src/Invoice/ui/Sign/index.less +14 -14
  111. package/src/Invoice/ui/Sign/index.tsx +71 -71
  112. package/src/index.ts +6 -6
  113. package/tsconfig.json +31 -31
  114. package/typings.d.ts +3 -3
  115. package/yarn.e.lock +14331 -14331
  116. package/yarn.o.lock +14800 -14800
package/docs/index.md CHANGED
@@ -1,5 +1,5 @@
1
- # 发票编辑组件
2
-
3
- npm 地址:https://www.npmjs.com/package/kts-component-invoice-operate
4
-
5
- ### 版本 3.0.x
1
+ # 发票编辑组件
2
+
3
+ npm 地址:https://www.npmjs.com/package/kts-component-invoice-operate
4
+
5
+ ### 版本 3.0.x
package/index.html CHANGED
@@ -1,13 +1,13 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="refresh" content="0;url=./docs-dist">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
- <title>文档</title>
9
- </head>
10
- <body>
11
-
12
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="refresh" content="0;url=./docs-dist">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <title>文档</title>
9
+ </head>
10
+ <body>
11
+
12
+ </body>
13
13
  </html>
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "kts-component-invoice-operate",
3
- "version": "3.1.3",
4
- "scripts": {
5
- "start": "dumi dev",
6
- "docs:build": "dumi build",
7
- "docs:deploy": "gh-pages -d docs-dist",
8
- "build": "father-build",
9
- "deploy": "npm run docs:build && npm run docs:deploy",
10
- "release": "npm run build && npm publish",
11
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
12
- "test": "umi-test",
13
- "test:coverage": "umi-test --coverage",
14
- "pub": "antd-tools run pub"
15
- },
16
- "main": "dist/index.js",
17
- "module": "dist/index.esm.js",
18
- "typings": "dist/index.d.ts",
19
- "gitHooks": {
20
- "pre-commit": "lint-staged"
21
- },
22
- "lint-staged": {
23
- "*.{js,jsx,less,md,json}": [],
24
- "*.ts?(x)": []
25
- },
26
- "dependencies": {
27
- "@formily/antd": "^1.3.17",
28
- "@formily/antd-components": "^1.3.17",
29
- "@types/uuid": "^8.3.0",
30
- "classnames": "^2.3.1",
31
- "grey-react-box": "^0.2.22",
32
- "kts-components-antd-x3": "^3.26.20-5",
33
- "kts-components-antd-x4": "^4.0.3",
34
- "kts-xui": "^1.0.39",
35
- "mathjs": "^9.4.2",
36
- "next": "^11.0.1",
37
- "nzh": "^1.0.4",
38
- "react": "^16.12.0",
39
- "react-dom": "^16.12.0",
40
- "styled-components": "^5.3.0",
41
- "uuid": "^8.3.2"
42
- },
43
- "devDependencies": {
44
- "@umijs/plugin-antd": "^0.10.0",
45
- "@umijs/test": "^3.0.5",
46
- "antd": "3.26.20",
47
- "dumi": "^1.0.14",
48
- "father-build": "^1.17.2",
49
- "gh-pages": "^3.0.0",
50
- "invariant": "^2.2.4",
51
- "kts-components": "^1.2.18",
52
- "lint-staged": "^10.0.7",
53
- "prettier": "^2.2.1",
54
- "yorkie": "^2.0.0"
55
- },
56
- "resolutions": {
57
- "@types/react": "17.0.2"
58
- }
59
- }
1
+ {
2
+ "name": "kts-component-invoice-operate",
3
+ "version": "3.1.4",
4
+ "scripts": {
5
+ "start": "dumi dev",
6
+ "docs:build": "dumi build",
7
+ "docs:deploy": "gh-pages -d docs-dist",
8
+ "build": "father-build",
9
+ "deploy": "npm run docs:build && npm run docs:deploy",
10
+ "release": "npm run build && npm publish",
11
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
12
+ "test": "umi-test",
13
+ "test:coverage": "umi-test --coverage",
14
+ "pub": "antd-tools run pub"
15
+ },
16
+ "main": "dist/index.js",
17
+ "module": "dist/index.esm.js",
18
+ "typings": "dist/index.d.ts",
19
+ "gitHooks": {
20
+ "pre-commit": "lint-staged"
21
+ },
22
+ "lint-staged": {
23
+ "*.{js,jsx,less,md,json}": [],
24
+ "*.ts?(x)": []
25
+ },
26
+ "dependencies": {
27
+ "@formily/antd": "^1.3.17",
28
+ "@formily/antd-components": "^1.3.17",
29
+ "@types/uuid": "^8.3.0",
30
+ "classnames": "^2.3.1",
31
+ "grey-react-box": "^0.2.22",
32
+ "kts-components-antd-x3": "^3.26.20-5",
33
+ "kts-components-antd-x4": "^4.0.3",
34
+ "kts-xui": "^1.0.39",
35
+ "mathjs": "^9.4.2",
36
+ "next": "^11.0.1",
37
+ "nzh": "^1.0.4",
38
+ "react": "^16.12.0",
39
+ "react-dom": "^16.12.0",
40
+ "styled-components": "^5.3.0",
41
+ "uuid": "^8.3.2"
42
+ },
43
+ "devDependencies": {
44
+ "@umijs/plugin-antd": "^0.10.0",
45
+ "@umijs/test": "^3.0.5",
46
+ "antd": "3.26.20",
47
+ "dumi": "^1.0.14",
48
+ "father-build": "^1.17.2",
49
+ "gh-pages": "^3.0.0",
50
+ "invariant": "^2.2.4",
51
+ "kts-components": "^1.2.18",
52
+ "lint-staged": "^10.0.7",
53
+ "prettier": "^2.2.1",
54
+ "yorkie": "^2.0.0"
55
+ },
56
+ "resolutions": {
57
+ "@types/react": "17.0.2"
58
+ }
59
+ }
@@ -1,94 +1,94 @@
1
- import React from 'react';
2
- import GreyReactBox from 'grey-react-box';
3
- import { chain, bignumber } from 'mathjs';
4
- import InvoiceControllerState from '../InvoiceControllerState';
5
- import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
6
-
7
- export default class InvoiceControllerForm extends GreyReactBox<InvoiceControllerState> {
8
- /** form 字典 */
9
- readonly formList = new Map<string, WrappedFormUtils>();
10
-
11
- /** 注册 form */
12
- useForm(key: string, value: WrappedFormUtils) {
13
- /** 注册 form 到组件 */
14
- React.useEffect(() => {
15
- this.formList.set(key, value);
16
- return () => {
17
- this.formList.delete(key);
18
- };
19
- }, [value, key]);
20
- }
21
-
22
- /** 校验所有表单 */
23
- async validateFields(): Promise<{ errors: Map<string, any>; values: Map<string, any> }> {
24
-
25
- await this.wait();
26
-
27
- const _errors = new Map<string, any>();
28
- const _values = new Map<string, any>();
29
-
30
- const arr = Array.from(this.formList);
31
- for (let i = 0; i < arr.length; i++) {
32
- const key = arr[i][0];
33
- const { errors, values } = await validateFields(arr[i][1]);
34
-
35
- errors && _errors.set(key, errors);
36
- _values && _values.set(key, values);
37
- }
38
-
39
- // 列表数据
40
- if (this.state.goodsListState.form) {
41
- try {
42
- await this.state.goodsListState.form?.validateFields()
43
- } catch (error:any) {
44
- _errors.set('goodsList', error.errors);
45
- }
46
- }
47
-
48
- _values.set('goodsList', this.state.goodsListState.goodsList.slice());
49
-
50
- // 金额(含税)
51
- _values.set('lineAmountIncludeTax', (() => {
52
- let sum = chain(bignumber(0));
53
- this.state.goodsListState.goodsList.forEach(e => {
54
- if (!e) return;
55
- sum = sum.add(bignumber(e.lineAmountIncludeTax || 0));
56
- });
57
- return sum.done().toNumber();
58
- })());
59
-
60
- // 金额(不含税)
61
- _values.set('lineAmountExcludeTax', (() => {
62
- let sum = chain(bignumber(0));
63
- this.state.goodsListState.goodsList.forEach(e => {
64
- if (!e) return;
65
- sum = sum.add(bignumber(e.lineAmountExcludeTax || 0));
66
- });
67
- return sum.done().toNumber();
68
- })());
69
-
70
- // 税额
71
- _values.set('taxAmount', (() => {
72
- let sum = chain(bignumber(0));
73
- this.state.goodsListState.goodsList.forEach((e) => {
74
- if (!e) return;
75
- sum = sum.add(bignumber(e.taxAmount || 0));
76
- });
77
- return sum.done().toNumber();
78
- })());
79
-
80
- // 含税标记
81
- _values.set('isTaxIncluded', this.state.goodsListState.isTaxIncluded)
82
-
83
- return { errors: _errors, values: _values };
84
- }
85
- }
86
-
87
- const validateFields = (form: WrappedFormUtils) => {
88
- return new Promise<any>((resolve: (v: any) => void) => {
89
- form.validateFields((errors, values) => {
90
- resolve({ errors, values });
91
- });
92
- });
93
- };
94
-
1
+ import React from 'react';
2
+ import GreyReactBox from 'grey-react-box';
3
+ import { chain, bignumber } from 'mathjs';
4
+ import InvoiceControllerState from '../InvoiceControllerState';
5
+ import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
6
+
7
+ export default class InvoiceControllerForm extends GreyReactBox<InvoiceControllerState> {
8
+ /** form 字典 */
9
+ readonly formList = new Map<string, WrappedFormUtils>();
10
+
11
+ /** 注册 form */
12
+ useForm(key: string, value: WrappedFormUtils) {
13
+ /** 注册 form 到组件 */
14
+ React.useEffect(() => {
15
+ this.formList.set(key, value);
16
+ return () => {
17
+ this.formList.delete(key);
18
+ };
19
+ }, [value, key]);
20
+ }
21
+
22
+ /** 校验所有表单 */
23
+ async validateFields(): Promise<{ errors: Map<string, any>; values: Map<string, any> }> {
24
+
25
+ await this.wait();
26
+
27
+ const _errors = new Map<string, any>();
28
+ const _values = new Map<string, any>();
29
+
30
+ const arr = Array.from(this.formList);
31
+ for (let i = 0; i < arr.length; i++) {
32
+ const key = arr[i][0];
33
+ const { errors, values } = await validateFields(arr[i][1]);
34
+
35
+ errors && _errors.set(key, errors);
36
+ _values && _values.set(key, values);
37
+ }
38
+
39
+ // 列表数据
40
+ if (this.state.goodsListState.form) {
41
+ try {
42
+ await this.state.goodsListState.form?.validateFields()
43
+ } catch (error:any) {
44
+ _errors.set('goodsList', error.errors);
45
+ }
46
+ }
47
+
48
+ _values.set('goodsList', this.state.goodsListState.goodsList.slice());
49
+
50
+ // 金额(含税)
51
+ _values.set('lineAmountIncludeTax', (() => {
52
+ let sum = chain(bignumber(0));
53
+ this.state.goodsListState.goodsList.forEach(e => {
54
+ if (!e) return;
55
+ sum = sum.add(bignumber(e.lineAmountIncludeTax || 0));
56
+ });
57
+ return sum.done().toNumber();
58
+ })());
59
+
60
+ // 金额(不含税)
61
+ _values.set('lineAmountExcludeTax', (() => {
62
+ let sum = chain(bignumber(0));
63
+ this.state.goodsListState.goodsList.forEach(e => {
64
+ if (!e) return;
65
+ sum = sum.add(bignumber(e.lineAmountExcludeTax || 0));
66
+ });
67
+ return sum.done().toNumber();
68
+ })());
69
+
70
+ // 税额
71
+ _values.set('taxAmount', (() => {
72
+ let sum = chain(bignumber(0));
73
+ this.state.goodsListState.goodsList.forEach((e) => {
74
+ if (!e) return;
75
+ sum = sum.add(bignumber(e.taxAmount || 0));
76
+ });
77
+ return sum.done().toNumber();
78
+ })());
79
+
80
+ // 含税标记
81
+ _values.set('isTaxIncluded', this.state.goodsListState.isTaxIncluded)
82
+
83
+ return { errors: _errors, values: _values };
84
+ }
85
+ }
86
+
87
+ const validateFields = (form: WrappedFormUtils) => {
88
+ return new Promise<any>((resolve: (v: any) => void) => {
89
+ form.validateFields((errors, values) => {
90
+ resolve({ errors, values });
91
+ });
92
+ });
93
+ };
94
+
@@ -1,88 +1,88 @@
1
-
2
- import React from 'react';
3
- import { ColumnProps } from 'kts-components-antd-x3/lib/Table/interface';
4
- import { PaginationConfig } from 'kts-components-antd-x3/lib/Table';
5
- import { GetFieldDecoratorOptions } from 'kts-components-antd-x3/lib/form/Form';
6
-
7
- export interface IGetBuyerListOption {
8
- /** 分页数据 */
9
- pagination: PaginationConfig;
10
- }
11
-
12
- export interface IFormItem {
13
- id: string;
14
- label: string;
15
- node: React.ReactNode;
16
- options: GetFieldDecoratorOptions;
17
- }
18
-
19
- export interface IBuyerInfo {
20
- /** 购买方名称 */
21
- buyerName?: string;
22
-
23
- /** 购买方纳税人识别号 */
24
- buyerNo?: string;
25
-
26
- /** 购买方地址及电话 */
27
- buyerAddress?: string;
28
-
29
- /** 购买方开户行及账号 */
30
- buyerBank?: string;
31
- }
32
-
33
- /** 自动填充 */
34
- export interface IAutoContainer {
35
-
36
- /** 购买方变化 */
37
- onBuyNameChange: (e?: string) => Promise<{ recent?: IBuyerInfo[], list?: IBuyerInfo[] }>;
38
- }
39
-
40
- export default class BuyerState {
41
-
42
- /** 表头 */
43
- columns: ColumnProps<any>[] = [
44
- {
45
- title: '公司名称',
46
- dataIndex: 'buyerName',
47
- key: 'buyerName',
48
- },
49
- {
50
- title: '纳税人识别号',
51
- dataIndex: 'buyerNo',
52
- key: 'buyerNo',
53
- },
54
- {
55
- title: '地址',
56
- dataIndex: 'address',
57
- key: 'address',
58
- },
59
- {
60
- title: '电话',
61
- dataIndex: 'phone',
62
- key: 'phone',
63
- },
64
- {
65
- title: '开户行及账号',
66
- dataIndex: 'buyerBank',
67
- key: 'buyerBank',
68
- },
69
- ];
70
-
71
- /** 行点击事件 */
72
- onRowClick = async (record: any) => record;
73
-
74
- /** 购方列表 */
75
- dataSource: any = [];
76
-
77
- /** 分页数据 */
78
- pagination: PaginationConfig = {};
79
-
80
- /** 是否显示导入 */
81
- isVisibleDrawer = false;
82
-
83
- /** 顶部扩展 */
84
- topExpand?: React.ReactNode;
85
-
86
- /** 自动填充 */
87
- autoContainer?: IAutoContainer;
88
- }
1
+
2
+ import React from 'react';
3
+ import { ColumnProps } from 'kts-components-antd-x3/lib/Table/interface';
4
+ import { PaginationConfig } from 'kts-components-antd-x3/lib/Table';
5
+ import { GetFieldDecoratorOptions } from 'kts-components-antd-x3/lib/form/Form';
6
+
7
+ export interface IGetBuyerListOption {
8
+ /** 分页数据 */
9
+ pagination: PaginationConfig;
10
+ }
11
+
12
+ export interface IFormItem {
13
+ id: string;
14
+ label: string;
15
+ node: React.ReactNode;
16
+ options: GetFieldDecoratorOptions;
17
+ }
18
+
19
+ export interface IBuyerInfo {
20
+ /** 购买方名称 */
21
+ buyerName?: string;
22
+
23
+ /** 购买方纳税人识别号 */
24
+ buyerNo?: string;
25
+
26
+ /** 购买方地址及电话 */
27
+ buyerAddress?: string;
28
+
29
+ /** 购买方开户行及账号 */
30
+ buyerBank?: string;
31
+ }
32
+
33
+ /** 自动填充 */
34
+ export interface IAutoContainer {
35
+
36
+ /** 购买方变化 */
37
+ onBuyNameChange: (e?: string) => Promise<{ recent?: IBuyerInfo[], list?: IBuyerInfo[] }>;
38
+ }
39
+
40
+ export default class BuyerState {
41
+
42
+ /** 表头 */
43
+ columns: ColumnProps<any>[] = [
44
+ {
45
+ title: '公司名称',
46
+ dataIndex: 'buyerName',
47
+ key: 'buyerName',
48
+ },
49
+ {
50
+ title: '纳税人识别号',
51
+ dataIndex: 'buyerNo',
52
+ key: 'buyerNo',
53
+ },
54
+ {
55
+ title: '地址',
56
+ dataIndex: 'address',
57
+ key: 'address',
58
+ },
59
+ {
60
+ title: '电话',
61
+ dataIndex: 'phone',
62
+ key: 'phone',
63
+ },
64
+ {
65
+ title: '开户行及账号',
66
+ dataIndex: 'buyerBank',
67
+ key: 'buyerBank',
68
+ },
69
+ ];
70
+
71
+ /** 行点击事件 */
72
+ onRowClick = async (record: any) => record;
73
+
74
+ /** 购方列表 */
75
+ dataSource: any = [];
76
+
77
+ /** 分页数据 */
78
+ pagination: PaginationConfig = {};
79
+
80
+ /** 是否显示导入 */
81
+ isVisibleDrawer = false;
82
+
83
+ /** 顶部扩展 */
84
+ topExpand?: React.ReactNode;
85
+
86
+ /** 自动填充 */
87
+ autoContainer?: IAutoContainer;
88
+ }