|
@@ -3,7 +3,7 @@
|
|
|
<div class="create-body" v-loading="loading" style="width: 100%">
|
|
|
<div class="title">测评机构认证</div>
|
|
|
<el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
|
|
|
- <el-form-item prop="file" label="机构logo">
|
|
|
+ <el-form-item prop="agencyPhoto" label="机构logo">
|
|
|
<el-upload
|
|
|
v-if="isModifyMode"
|
|
|
class="avatar-uploader"
|
|
@@ -21,7 +21,7 @@
|
|
|
fit="scale-down"></el-image>
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="机构名称" prop="name">
|
|
|
+ <el-form-item label="机构名称" prop="evaluationAgencyName">
|
|
|
<el-input v-if="isModifyMode" v-model="authentication.evaluationAgencyName"></el-input>
|
|
|
<span v-if="!isModifyMode">{{authentication.evaluationAgencyName}}</span>
|
|
|
</el-form-item>
|
|
@@ -39,15 +39,15 @@
|
|
|
<el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
|
|
|
</el-link>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="对公账户" prop="name">
|
|
|
+ <el-form-item label="对公账户" prop="bankAccount">
|
|
|
<el-input v-if="isModifyMode" v-model="authentication.bankAccount"></el-input>
|
|
|
<span v-if="!isModifyMode">{{authentication.bankAccount}}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="地址" prop="name">
|
|
|
+ <el-form-item label="地址" prop="address">
|
|
|
<el-input v-if="isModifyMode" v-model="authentication.address"></el-input>
|
|
|
<span v-if="!isModifyMode">{{authentication.address}}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="测评机构能力" prop="name">
|
|
|
+ <el-form-item label="测评机构能力" prop="evaluationAgencyAbilityList">
|
|
|
<el-checkbox-group v-if="isModifyMode" v-model="authentication.evaluationAgencyAbilityList">
|
|
|
<span v-for="(item,index) in serviceTypes" :key="index">
|
|
|
<el-checkbox :label="item" name="type">{{item}} </el-checkbox>
|
|
@@ -56,7 +56,7 @@
|
|
|
<span v-if="!isModifyMode" v-for="(item,index) in authentication.evaluationAgencyAbilityList"
|
|
|
:key="index"><span class="badge">{{item}}</span></span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="测评机构资源" prop="name">
|
|
|
+ <el-form-item label="测评机构资源" prop="evaluationAgencyResourceList">
|
|
|
<span v-if="isModifyMode" v-for="item in authentication.evaluationAgencyResourceList" :key="item.id"
|
|
|
style="width: 2000px">
|
|
|
资源类型: <el-select v-model="item.type" placeholder="请选择" style="width: 15%;margin-bottom: 10px"
|
|
@@ -135,23 +135,47 @@ export default {
|
|
|
explain: ''
|
|
|
},
|
|
|
rules: {
|
|
|
- // name: [
|
|
|
- // {required: true, message: '请输入报告名称', trigger: 'blur'}
|
|
|
- // // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
|
|
|
+ // agencyPhoto: [
|
|
|
+ // {required: true, message: '请输入机构名称', trigger: 'blur'},
|
|
|
+ // { min: 3, max: 50, message: "机构名称长度在 3 到 50 个字符", trigger: "blur" }
|
|
|
// ],
|
|
|
- // abstract: [
|
|
|
- // {
|
|
|
- // required: true,
|
|
|
- // message: '请输入摘要信息',
|
|
|
- // trigger: 'change'
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // type: [
|
|
|
- // {required: true, message: '请选择报告类型', trigger: 'change'}
|
|
|
- // ],
|
|
|
- // conclusion: [
|
|
|
- // {required: true, message: '请输入报告结论', trigger: 'blur'}
|
|
|
- // ]
|
|
|
+ evaluationAgencyName: [
|
|
|
+ {required: true, message: '请输入机构名称', trigger: 'blur'},
|
|
|
+ {min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ bankAccount: [
|
|
|
+ {required: true, message: '请输入银行卡账户', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ address: [
|
|
|
+ {required: true, message: '请输入地址', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ evaluationAgencyAbilityList: [
|
|
|
+ {
|
|
|
+ type: 'array',
|
|
|
+ required: true,
|
|
|
+ message: '请至少选择一种服务类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ evaluationAgencyResourceList: [
|
|
|
+ {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ var isError = false
|
|
|
+ for (var i = 0; i < value.length; i++) {
|
|
|
+ if (value[i].name == '') {
|
|
|
+ isError = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isError) {
|
|
|
+ callback(new Error('资源名称不可为空'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }, trigger: 'blur'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -196,18 +220,25 @@ export default {
|
|
|
//提交认证信息
|
|
|
updateAuthInfo () {
|
|
|
//this.isModifyMode = false
|
|
|
- this.showLoading()
|
|
|
- const newAuthentication = {
|
|
|
- userId: this.user.userVO.id,
|
|
|
- evaluationAgencyName: this.authentication.evaluationAgencyName,
|
|
|
- bankAccount: this.authentication.bankAccount,
|
|
|
- address: this.authentication.address,
|
|
|
- evaluationAgencyAbilityList: this.authentication.evaluationAgencyAbilityList,
|
|
|
- evaluationAgencyResourceList: this.authentication.evaluationAgencyResourceList,
|
|
|
- agencyPhoto: this.authentication.agencyPhoto,
|
|
|
- }
|
|
|
- //console.log(newAuthentication)
|
|
|
- updateAgencyAuthInfo(this.user.userVO.id, newAuthentication, this.updateAuthInfoSuccess, this.updateAuthInfoFail)
|
|
|
+ this.$refs['authentication'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.showLoading()
|
|
|
+ const newAuthentication = {
|
|
|
+ userId: this.user.userVO.id,
|
|
|
+ evaluationAgencyName: this.authentication.evaluationAgencyName,
|
|
|
+ bankAccount: this.authentication.bankAccount,
|
|
|
+ address: this.authentication.address,
|
|
|
+ evaluationAgencyAbilityList: this.authentication.evaluationAgencyAbilityList,
|
|
|
+ evaluationAgencyResourceList: this.authentication.evaluationAgencyResourceList,
|
|
|
+ agencyPhoto: this.authentication.agencyPhoto,
|
|
|
+ }
|
|
|
+ //console.log(newAuthentication)
|
|
|
+ updateAgencyAuthInfo(this.user.userVO.id, newAuthentication, this.updateAuthInfoSuccess, this.updateAuthInfoFail)
|
|
|
+ } else {
|
|
|
+ notify('error', '表单填写错误!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
updateAuthInfoSuccess (res) {
|
|
|
console.log(res)
|
|
@@ -234,6 +265,7 @@ export default {
|
|
|
//取消修改表单,表单进入不可编辑状态,不再使用
|
|
|
cancelModify () {
|
|
|
this.isModifyMode = false
|
|
|
+ this.getAuthInfo()
|
|
|
},
|
|
|
//上传文件时移除文件的响应函数
|
|
|
handleRemove (file, fileList) {
|