1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '用户ID',
align:"center",
dataIndex: 'userId'
},
{
title: '用户姓名',
align:"center",
dataIndex: 'userName'
},
{
title: '用户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title: '钱包类型',
align:"center",
dataIndex: 'walletCode'
},
{
title: '金额',
align:"center",
dataIndex: 'amount'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "用户姓名",
field: "userName",
component: 'Input', //TODO 范围查询
//colProps: {span: 6},
},
{
label: "用户手机号",
field: "userPhone",
component: 'Input', //TODO 范围查询
//colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '用户ID',
field: 'userId',
component: 'Input',
},
{
label: '用户姓名',
field: 'userName',
component: 'Input',
},
{
label: '用户手机号',
field: 'userPhone',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
];
},
},
{
label: '钱包类型',
field: 'walletCode',
component: 'Input',
},
{
label: '金额',
field: 'amount',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{ pattern: /^-?\d+$/, message: '请输入整数!'},
];
},
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
// 高级查询数据
export const superQuerySchema = {
userId: {title: '用户ID',order: 0,view: 'text', type: 'string',},
userName: {title: '用户姓名',order: 1,view: 'text', type: 'string',},
userPhone: {title: '用户手机号',order: 2,view: 'text', type: 'string',},
walletCode: {title: '钱包类型',order: 3,view: 'text', type: 'string',},
amount: {title: '金额',order: 4,view: 'number', type: 'number',},
};
/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}