ztxkui 4.2.18-64 → 4.2.18-65

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description 基础表格,充当列表
4
+ */
5
+ import React from 'react';
6
+ declare const BasicTable: React.FC<{
7
+ dynamicKey?: string;
8
+ }>;
9
+ export default BasicTable;
@@ -0,0 +1,231 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description 基础表格,充当列表
4
+ */
5
+ import React from 'react';
6
+ // redux
7
+ // ztxkui公共组件
8
+ import { Table, NumberCase } from '../index';
9
+ // 路由配置
10
+ // store
11
+ // 自定义组件
12
+ // 其他文件
13
+ import { dataSource } from './data';
14
+ import { toThousand } from 'ztxkutils/dist/tools';
15
+ var tableConfigInfo = {
16
+ test1: {
17
+ isDisplay: false,
18
+ isChangeable: true,
19
+ isRequired: false,
20
+ },
21
+ };
22
+ var BasicTable = function (_a) {
23
+ var dynamicKey = _a.dynamicKey;
24
+ console.log(toThousand(10000.2312));
25
+ console.log(toThousand(toThousand(100.2312)));
26
+ var columns = [
27
+ {
28
+ title: '序号',
29
+ width: 62,
30
+ key: 'index',
31
+ render: function (_text, _record, index) { return "" + (index + 1); },
32
+ },
33
+ {
34
+ title: '测试111',
35
+ width: 100,
36
+ dataIndex: 'test1',
37
+ key: 'test1',
38
+ },
39
+ // {
40
+ // title: '库存总计',
41
+ // children: [
42
+ // {
43
+ // title: '财务库存数量',
44
+ // width: 120,
45
+ // dataIndex: 'totalFinanceAvailQuantity',
46
+ // key: 'totalFinanceAvailQuantity',
47
+ // render: (text, record, index) => {
48
+ // if (index % 2 === 0) {
49
+ // return `${index + 2}`;
50
+ // }
51
+ // return `${index + 1}/${index + 2}`;
52
+ // },
53
+ // },
54
+ // {
55
+ // title: '业务库存数量',
56
+ // width: 120,
57
+ // dataIndex: 'totalBusiAvailQuantity',
58
+ // key: 'totalBusiAvailQuantity',
59
+ // render: (text) => 2,
60
+ // },
61
+ // {
62
+ // title: '财务库存金额(不含税)',
63
+ // width: 120,
64
+ // dataIndex: 'totalFinanceStockAmount',
65
+ // key: 'totalFinanceStockAmount',
66
+ // },
67
+ // {
68
+ // title: '业务库存金额(不含税)',
69
+ // width: 120,
70
+ // dataIndex: 'totalBusiStockAmount',
71
+ // key: 'totalBusiStockAmount',
72
+ // },
73
+ // ],
74
+ // },
75
+ // {
76
+ // title: '库存总计1',
77
+ // children: [
78
+ // {
79
+ // title: '财务库存数量',
80
+ // width: 120,
81
+ // dataIndex: 'totalFinanceAvailQuantity',
82
+ // key: 'totalFinanceAvailQuantity',
83
+ // render: (text) => 1,
84
+ // },
85
+ // {
86
+ // title: '业务库存数量',
87
+ // width: 120,
88
+ // dataIndex: 'totalBusiAvailQuantity',
89
+ // key: 'totalBusiAvailQuantity',
90
+ // render: (text) => 2,
91
+ // },
92
+ // {
93
+ // title: '财务库存金额(不含税)',
94
+ // width: 120,
95
+ // dataIndex: 'totalFinanceStockAmount',
96
+ // key: 'totalFinanceStockAmount',
97
+ // },
98
+ // {
99
+ // title: '业务库存金额(不含税)',
100
+ // width: 120,
101
+ // dataIndex: 'totalBusiStockAmount',
102
+ // key: 'totalBusiStockAmount',
103
+ // },
104
+ // ],
105
+ // },
106
+ {
107
+ title: '测试2123',
108
+ width: 100,
109
+ dataIndex: 'test2',
110
+ key: 'test2',
111
+ hideColumn: true,
112
+ },
113
+ {
114
+ title: '测试3',
115
+ width: 100,
116
+ dataIndex: 'test3',
117
+ key: 'test3',
118
+ onCell: function () {
119
+ return {
120
+ className: 'test',
121
+ };
122
+ },
123
+ },
124
+ {
125
+ title: '测试4',
126
+ width: 100,
127
+ dataIndex: 'test4',
128
+ key: 'test4',
129
+ },
130
+ {
131
+ title: '测试5',
132
+ width: 100,
133
+ dataIndex: 'test5',
134
+ key: 'test5',
135
+ },
136
+ {
137
+ title: '测试6',
138
+ width: 100,
139
+ dataIndex: 'test6',
140
+ key: 'test6',
141
+ },
142
+ {
143
+ title: '测试7',
144
+ width: 100,
145
+ dataIndex: 'test7',
146
+ key: 'test7',
147
+ },
148
+ {
149
+ title: '测试8',
150
+ width: 100,
151
+ dataIndex: 'test8',
152
+ key: 'test8',
153
+ },
154
+ {
155
+ title: '测试9',
156
+ width: 100,
157
+ dataIndex: 'test9',
158
+ key: 'test9',
159
+ },
160
+ {
161
+ title: '数量',
162
+ width: 100,
163
+ dataIndex: 'test10',
164
+ key: 'test10',
165
+ align: 'center',
166
+ render: function (text, record, index) { return (React.createElement(NumberCase, { num: text }, text)); },
167
+ },
168
+ {
169
+ title: '数量11',
170
+ width: 100,
171
+ dataIndex: 'test101',
172
+ key: 'test101',
173
+ align: 'center',
174
+ },
175
+ {
176
+ title: '测试11',
177
+ width: 100,
178
+ dataIndex: 'test11',
179
+ key: 'test11',
180
+ },
181
+ ];
182
+ // const columns1: ColumnsType<any> = [
183
+ // {
184
+ // title: '流程ID',
185
+ // width: 80,
186
+ // align: 'center',
187
+ // dataIndex: 'associatedProcessInstId',
188
+ // key: 'associatedProcessInstId',
189
+ // },
190
+ // {
191
+ // title: '待退货款N',
192
+ // width: 140,
193
+ // dataIndex: 'pendingRefundAmountTotal',
194
+ // key: 'pendingRefundAmountTotal',
195
+ // render: (text) => toThousand(exactRound(text, 2)),
196
+ // },
197
+ // // {
198
+ // // title: '流程模板',
199
+ // // width: 300,
200
+ // // dataIndex: 'associatedProcessDefName',
201
+ // // key: 'associatedProcessDefName',
202
+ // // },
203
+ // {
204
+ // title: '流程申请人',
205
+ // width: 120,
206
+ // align: 'center',
207
+ // dataIndex: 'associatedProcessApplyPersonName',
208
+ // key: 'associatedProcessApplyPersonName',
209
+ // },
210
+ // {
211
+ // title: '流程申请时间',
212
+ // width: 140,
213
+ // align: 'center',
214
+ // dataIndex: 'associatedProcessApplyTime',
215
+ // key: 'associatedProcessApplyTime',
216
+ // },
217
+ // ];
218
+ return (React.createElement("div", null,
219
+ React.createElement("div", null,
220
+ "\u57FA\u7840\u5C55\u793A\u8868\u683C1\uFF1B",
221
+ React.createElement("br", null),
222
+ React.createElement("b", null, "\u52A8\u6001\u5217\u914D\u7F6E\uFF1B"),
223
+ "\u5982\u679C\u9700\u8981\u7F13\u5B58\u4F4F\u52A8\u6001\u5217\u914D\u7F6E\uFF0C\u9700\u8981\u4F20\u5165showColumnDynamicKey\uFF1B \u8868\u683C\u5185\u90E8\u8FDB\u884C\u4E86\u4F18\u5316\uFF0C\u6570\u636E\u5C06\u5B58\u50A8\u5728\u672C\u5730\u7F13\u5B58\u4E2D\uFF0C\u53EF\u4EE5\u4E0D\u7528\u901A\u8FC7\u5916\u754C\u4F20\u5165\u914D\u7F6E",
224
+ React.createElement("br", null),
225
+ React.createElement("b", null, "\u5217\u4F38\u7F29\uFF1B"),
226
+ "isResizableColumn\u5C5E\u6027\u9ED8\u8BA4\u4E3Atrue\uFF0C\u5982\u679C\u4E0D\u9700\u8981\u5217\u4F38\u7F29\u53EF\u4EE5\u4F20\u5165false"),
227
+ React.createElement(Table, { dataSource: dataSource, columns: columns, rowKey: "id", scroll: { y: 500 },
228
+ // isContextMenu
229
+ showColumnDynamic: true, showColumnDynamicKey: dynamicKey || 'symbol-id-1', configInfo: tableConfigInfo, isNumberInputAlignRight: true, isNumberInputThousandth: true, virtualTableKey: "virtualTableKey" })));
230
+ };
231
+ export default BasicTable;
@@ -0,0 +1,66 @@
1
+ export declare const dataSource: {
2
+ id: string;
3
+ test1: string;
4
+ test3: string;
5
+ test4: string;
6
+ test5: string;
7
+ 'test5-001': number;
8
+ 'test5-002': number;
9
+ test6: string;
10
+ test7: string;
11
+ test8: string;
12
+ test9: string;
13
+ test10: string;
14
+ test101: string;
15
+ }[];
16
+ export declare const dataSource5: {
17
+ id: string;
18
+ test1: string;
19
+ test3: string;
20
+ test4: string;
21
+ test5: string;
22
+ 'test5-001': number;
23
+ 'test5-002': number;
24
+ test6: string;
25
+ test7: string;
26
+ test8: string;
27
+ test9: string;
28
+ test10: string;
29
+ }[];
30
+ export declare const dataSource2: {
31
+ id: string;
32
+ test1: string;
33
+ test3: string;
34
+ test4: string;
35
+ test5: string;
36
+ 'test5-001': number;
37
+ 'test5-002': number;
38
+ test6: string;
39
+ test7: string;
40
+ test8: string;
41
+ test9: string;
42
+ test10: string;
43
+ test101: string;
44
+ }[];
45
+ export declare const dataSource3: {
46
+ id: string;
47
+ test1: string;
48
+ test3: string;
49
+ test4: string;
50
+ test5: string;
51
+ 'test5-001': number;
52
+ 'test5-002': number;
53
+ test6: string;
54
+ test7: string;
55
+ test8: string;
56
+ test9: string;
57
+ test10: string;
58
+ }[];
59
+ export declare const data111: {
60
+ id: string;
61
+ pendingRefundAmountTotal: string;
62
+ }[];
63
+ export declare const list1: {
64
+ name: string;
65
+ id: string;
66
+ }[];