9 changed files with 189 additions and 64 deletions
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
import { FormSchema } from '/@/components/Form'; |
||||
import { commonUpload } from '/@/api/platform/core/controller/upload'; |
||||
|
||||
/** 表单配置 */ |
||||
export const formSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: 'ID', |
||||
component: 'Input', |
||||
show: false, |
||||
}, |
||||
{ |
||||
field: 'name', |
||||
label: '企业名称', |
||||
component: 'Input', |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'repName', |
||||
label: '法定代表人', |
||||
component: 'Input', |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'phone', |
||||
label: '手机号', |
||||
component: 'Input', |
||||
required: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入手机号!', |
||||
}, |
||||
{ |
||||
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'), |
||||
message: '请输入正确的手机号码!', |
||||
validateTrigger: 'blur' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
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, |
||||
}, |
||||
{ |
||||
field: 'idCard', |
||||
label: '身份证', |
||||
component: 'Input', |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'detailedAddress', |
||||
label: '详细地址', |
||||
component: 'Input', |
||||
required: true, |
||||
} |
||||
]; |
@ -1 +0,0 @@
@@ -1 +0,0 @@
|
||||
import { FormSchema } from '/@/components/Form'; |
Loading…
Reference in new issue