42 changed files with 151 additions and 257 deletions
@ -1,148 +0,0 @@
@@ -1,148 +0,0 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
import {listUser} from "/@/api/platform/system/controller/user"; |
||||
import {commonUpload} from "/@/api/platform/core/controller/upload"; |
||||
|
||||
/** 表格列配置 */ |
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '企业名称', |
||||
dataIndex: 'name' |
||||
}, |
||||
{ |
||||
title: '法定代表人', |
||||
dataIndex: 'repName', |
||||
}, |
||||
{ |
||||
title: '手机号', |
||||
dataIndex: 'phone' |
||||
}, |
||||
{ |
||||
title: '信用代码', |
||||
dataIndex: 'creditCode' |
||||
}, |
||||
{ |
||||
title: '详细地址', |
||||
dataIndex: 'detailedAddress' |
||||
}, |
||||
{ |
||||
title: '创建时间', |
||||
dataIndex: 'createTime' |
||||
} |
||||
]; |
||||
|
||||
/** 搜索表单配置 */ |
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'name', |
||||
label: '企业名称', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '请输入企业名称' |
||||
}, |
||||
colProps: { span: 6 } |
||||
} |
||||
]; |
||||
|
||||
/** 表单配置 */ |
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false, |
||||
}, |
||||
{ |
||||
field: 'name', |
||||
label: '企业名称', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'repName', |
||||
label: '法定代表人', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'phone', |
||||
label: '手机号', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
}, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入手机号!', |
||||
}, |
||||
{ |
||||
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'), |
||||
message: '请输入正确的手机号码!', |
||||
validateTrigger: 'blur' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
field: 'userId', |
||||
label: '关联用户', |
||||
component: 'ApiSelect', |
||||
required: true, |
||||
componentProps: { |
||||
api: listUser, |
||||
params: { |
||||
size: 99 |
||||
}, |
||||
labelField: 'nickName', |
||||
valueField: 'id', |
||||
resultField: 'data' |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'license', |
||||
label: '营业执照', |
||||
component: 'Upload', |
||||
required: true, |
||||
componentProps: { |
||||
multiple: true, |
||||
maxSize: 20, |
||||
maxNumber: 10, |
||||
showUploadSaveBtn: true, |
||||
showPreviewNumber: true, |
||||
emptyHidePreview: true, |
||||
api: commonUpload, |
||||
accept: ['image/*'] |
||||
} |
||||
}, |
||||
{ |
||||
field: 'creditCode', |
||||
label: '信用代码', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'idCard', |
||||
label: '身份证', |
||||
component: 'Input', |
||||
required: true, |
||||
colProps: { |
||||
span: 12 |
||||
}, |
||||
}, |
||||
{ |
||||
field: 'detailedAddress', |
||||
label: '详细地址', |
||||
component: 'Input', |
||||
required: true, |
||||
} |
||||
]; |
Loading…
Reference in new issue