19 changed files with 1900 additions and 952 deletions
-
84chenhai-ui/src/api/vet/article.js
-
10chenhai-ui/src/api/vet/certificate.js
-
32chenhai-ui/src/api/vet/notification.js
-
43chenhai-ui/src/api/vet/qualification.js
-
1chenhai-ui/src/api/vet/review.js
-
BINchenhai-ui/src/assets/images/tongzhi.png
-
BINchenhai-ui/src/assets/images/zhixiang.png
-
3chenhai-ui/src/permission.js
-
22chenhai-ui/src/router/index.js
-
386chenhai-ui/src/views/index.vue
-
13chenhai-ui/src/views/login.vue
-
11chenhai-ui/src/views/loginGld.vue
-
868chenhai-ui/src/views/syd.vue
-
663chenhai-ui/src/views/vet/article/index.vue
-
6chenhai-ui/src/views/vet/certificate/index.vue
-
7chenhai-ui/src/views/vet/info/index.vue
-
536chenhai-ui/src/views/vet/notification/index.vue
-
160chenhai-ui/src/views/vet/qualification/index.vue
-
7chenhai-ui/vue.config.js
|
After Width: 200 | Height: 200 | Size: 6.8 KiB |
|
After Width: 200 | Height: 200 | Size: 3.9 KiB |
@ -1,386 +1,38 @@ |
|||||
<template> |
<template> |
||||
<el-dialog |
|
||||
title="兽医资质认证" |
|
||||
:visible.sync="dialogVisible" |
|
||||
:close-on-click-modal="false" |
|
||||
:close-on-press-escape="false" |
|
||||
:show-close="false" |
|
||||
width="600px" |
|
||||
> |
|
||||
<!-- 步骤指示器 --> |
|
||||
<el-steps :active="activeStep" finish-status="success" simple style="margin-bottom: 20px;"> |
|
||||
<el-step title="选择经营范围"></el-step> |
|
||||
<el-step title="上传资质"></el-step> |
|
||||
<el-step title="提交审核"></el-step> |
|
||||
</el-steps> |
|
||||
|
|
||||
<!-- 步骤1:选择经营范围 --> |
|
||||
<div v-if="activeStep === 0"> |
|
||||
<el-form ref="scopeForm" :model="form" label-width="100px"> |
|
||||
<el-form-item label="真实姓名" prop="realName" :rules="[{ required: true, message: '请输入真实姓名', trigger: 'blur' }]"> |
|
||||
<el-input v-model="form.realName" placeholder="请输入您的真实姓名" /> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="身份证号" prop="idCard" :rules="[{ required: true, message: '请输入身份证号', trigger: 'blur' }]"> |
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证号" /> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="资质类型" prop="qualificationType" :rules="[{ required: true, message: '请选择资质类型', trigger: 'change' }]"> |
|
||||
<el-select v-model="form.qualificationType" placeholder="请选择资质类型" style="width: 100%;"> |
|
||||
<el-option label="执业兽医" value="执业兽医" /> |
|
||||
<el-option label="官方兽医" value="官方兽医" /> |
|
||||
<el-option label="乡村兽医" value="乡村兽医" /> |
|
||||
<el-option label="畜牧师" value="畜牧师" /> |
|
||||
<el-option label="其他" value="其他" /> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="证书编号" prop="certificateNo" :rules="[{ required: true, message: '请输入证书编号', trigger: 'blur' }]"> |
|
||||
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="经营范围" prop="scopeIds" :rules="[{ required: true, message: '请选择至少一个经营范围', trigger: 'change' }]"> |
|
||||
<el-select |
|
||||
v-model="selectedScopes" |
|
||||
multiple |
|
||||
placeholder="请选择经营范围" |
|
||||
style="width: 100%;" |
|
||||
@change="handleScopeChange" |
|
||||
> |
|
||||
<el-option |
|
||||
v-for="scope in scopeOptions" |
|
||||
:key="scope.value" |
|
||||
:label="scope.label" |
|
||||
:value="scope.value" |
|
||||
/> |
|
||||
</el-select> |
|
||||
<div style="color: #909399; font-size: 12px; margin-top: 5px;"> |
|
||||
已选择:{{ selectedScopes.length }} 项 |
|
||||
<span v-if="selectedScopes.length > 0" style="color: #f56c6c; margin-left: 10px;"> |
|
||||
请根据经营范围准备相应资质文件 |
|
||||
</span> |
|
||||
</div> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- 步骤2:上传资质 --> |
|
||||
<div v-if="activeStep === 1"> |
|
||||
<div style="margin-bottom: 15px; color: #606266;"> |
|
||||
<div>已选择经营范围:</div> |
|
||||
<el-tag |
|
||||
v-for="scope in selectedScopes" |
|
||||
:key="scope" |
|
||||
type="info" |
|
||||
style="margin-right: 5px; margin-top: 5px;" |
|
||||
> |
|
||||
{{ getScopeName(scope) }} |
|
||||
</el-tag> |
|
||||
</div> |
|
||||
|
|
||||
<div style="margin-bottom: 15px; color: #f56c6c; font-size: 14px;"> |
|
||||
<i class="el-icon-warning"></i> |
|
||||
根据您选择的经营范围,需要上传以下资质文件: |
|
||||
</div> |
|
||||
|
|
||||
<div style="margin-bottom: 20px;"> |
|
||||
<div v-for="scope in selectedScopes" :key="scope" style="margin-bottom: 10px;"> |
|
||||
<div style="font-weight: bold; margin-bottom: 5px;">{{ getScopeName(scope) }}:</div> |
|
||||
<div style="color: #606266; font-size: 13px; padding-left: 10px;"> |
|
||||
{{ getRequiredQualifications(scope) }} |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<el-form> |
|
||||
<el-form-item label="资质文件" required> |
|
||||
<el-upload |
|
||||
ref="upload" |
|
||||
action="#" |
|
||||
:multiple="true" |
|
||||
:file-list="fileList" |
|
||||
:auto-upload="false" |
|
||||
:on-change="handleFileChange" |
|
||||
:on-remove="handleRemove" |
|
||||
> |
|
||||
<el-button type="primary">选择文件</el-button> |
|
||||
<div slot="tip" class="el-upload__tip"> |
|
||||
请上传清晰的资质文件照片或扫描件(支持JPG、PNG、PDF格式) |
|
||||
</div> |
|
||||
</el-upload> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- 步骤3:确认提交 --> |
|
||||
<div v-if="activeStep === 2"> |
|
||||
<div style="text-align: center; margin-bottom: 30px;"> |
|
||||
<i class="el-icon-circle-check" style="font-size: 60px; color: #67C23A;"></i> |
|
||||
<div style="margin-top: 15px; font-size: 16px; color: #303133;"> |
|
||||
请确认信息无误后提交审核 |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div style="background: #f8f9fa; padding: 15px; border-radius: 4px; margin-bottom: 20px;"> |
|
||||
<div style="margin-bottom: 8px;"><strong>基本信息</strong></div> |
|
||||
<div style="margin-bottom: 5px;">真实姓名:{{ form.realName }}</div> |
|
||||
<div style="margin-bottom: 5px;">身份证号:{{ form.idCard }}</div> |
|
||||
<div style="margin-bottom: 5px;">资质类型:{{ form.qualificationType }}</div> |
|
||||
<div>证书编号:{{ form.certificateNo }}</div> |
|
||||
</div> |
|
||||
|
|
||||
<div style="background: #f8f9fa; padding: 15px; border-radius: 4px; margin-bottom: 20px;"> |
|
||||
<div style="margin-bottom: 8px;"><strong>经营范围</strong></div> |
|
||||
<div> |
|
||||
<el-tag |
|
||||
v-for="scope in selectedScopes" |
|
||||
:key="scope" |
|
||||
type="info" |
|
||||
style="margin-right: 5px; margin-bottom: 5px;" |
|
||||
> |
|
||||
{{ getScopeName(scope) }} |
|
||||
</el-tag> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div style="background: #f8f9fa; padding: 15px; border-radius: 4px; margin-bottom: 20px;"> |
|
||||
<div style="margin-bottom: 8px;"><strong>上传文件</strong></div> |
|
||||
<div v-if="fileList.length > 0"> |
|
||||
<div v-for="(file, index) in fileList" :key="index" style="margin-bottom: 5px;"> |
|
||||
{{ file.name }} |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-else style="color: #909399;">暂无文件</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<!-- 操作按钮 --> |
|
||||
<div slot="footer" class="dialog-footer"> |
|
||||
<div v-if="activeStep > 0" style="float: left;"> |
|
||||
<el-button @click="prevStep">上一步</el-button> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="activeStep < 2"> |
|
||||
<el-button @click="closeDialog">稍后填写</el-button> |
|
||||
<el-button type="primary" @click="nextStep"> |
|
||||
{{ activeStep === 1 ? '下一步' : '下一步' }} |
|
||||
</el-button> |
|
||||
</div> |
|
||||
|
|
||||
<div v-if="activeStep === 2"> |
|
||||
<el-button @click="prevStep">上一步</el-button> |
|
||||
<el-button type="primary" @click="submitQualification" :loading="loading"> |
|
||||
提交审核 |
|
||||
</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
|
<!-- 跳转首页 --> |
||||
|
<div class="type"> |
||||
|
<Syd v-if = "userRole === 'vetnotshenhe'"></Syd> |
||||
|
<Gld v-else></Gld> |
||||
|
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import Gld from '@/views/gld.vue' |
||||
|
import Syd from '@/views/syd.vue' |
||||
|
|
||||
export default { |
export default { |
||||
name: 'QualificationPopup', |
|
||||
props: { |
|
||||
visible: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
} |
|
||||
|
name: "IndexGld", |
||||
|
components: { |
||||
|
Gld, |
||||
|
Syd |
||||
}, |
}, |
||||
data() { |
data() { |
||||
return { |
return { |
||||
dialogVisible: false, |
|
||||
activeStep: 0, |
|
||||
loading: false, |
|
||||
form: { |
|
||||
qualificationId: null, |
|
||||
realName: '', |
|
||||
idCard: '', |
|
||||
qualificationType: '', |
|
||||
certificateNo: '', |
|
||||
scopeIds: '', |
|
||||
certificateFiles: '' |
|
||||
}, |
|
||||
scopeOptions: [], |
|
||||
selectedScopes: [], |
|
||||
fileList: [] |
|
||||
} |
} |
||||
}, |
}, |
||||
watch: { |
|
||||
visible(val) { |
|
||||
this.dialogVisible = val |
|
||||
if (val) { |
|
||||
this.loadScopeOptions() |
|
||||
this.loadExistingData() |
|
||||
} |
|
||||
}, |
|
||||
dialogVisible(val) { |
|
||||
this.$emit('update:visible', val) |
|
||||
if (!val) { |
|
||||
this.resetForm() |
|
||||
} |
|
||||
|
computed: { |
||||
|
userRole() { |
||||
|
return this.$store.state.user.roles[0]; |
||||
} |
} |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
// 加载经营范围选项 |
|
||||
loadScopeOptions() { |
|
||||
this.$axios.get('/vet/qualification/scope/options') |
|
||||
.then(res => { |
|
||||
this.scopeOptions = res.data |
|
||||
}) |
|
||||
|
goTarget(href) { |
||||
|
window.open(href, "_blank") |
||||
}, |
}, |
||||
|
|
||||
// 加载已有数据(审核不通过时) |
|
||||
loadExistingData() { |
|
||||
this.$axios.get('/vet/qualification/my') |
|
||||
.then(res => { |
|
||||
if (res.code === 200 && res.data) { |
|
||||
const data = res.data |
|
||||
this.form.qualificationId = data.qualificationId |
|
||||
this.form.realName = data.realName || '' |
|
||||
this.form.idCard = data.idCard || '' |
|
||||
this.form.qualificationType = data.qualificationType || '' |
|
||||
this.form.certificateNo = data.certificateNo || '' |
|
||||
|
|
||||
if (data.scopeIds) { |
|
||||
this.selectedScopes = data.scopeIds.split(',') |
|
||||
this.form.scopeIds = data.scopeIds |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 获取经营范围名称 |
|
||||
getScopeName(scopeId) { |
|
||||
const scope = this.scopeOptions.find(item => item.value === scopeId) |
|
||||
return scope ? scope.label : scopeId |
|
||||
}, |
|
||||
|
|
||||
// 获取所需资质 |
|
||||
getRequiredQualifications(scopeId) { |
|
||||
this.$axios.get(`/vet/qualification/scope/detail/${scopeId}`) |
|
||||
.then(res => { |
|
||||
if (res.code === 200) { |
|
||||
this.$message.info(`${res.data.scopeName}:${res.data.requiredQualifications}`) |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 经营范围变更 |
|
||||
handleScopeChange(value) { |
|
||||
this.form.scopeIds = value.join(',') |
|
||||
}, |
|
||||
|
|
||||
// 文件上传处理 |
|
||||
handleFileChange(file, fileList) { |
|
||||
this.fileList = fileList |
|
||||
}, |
|
||||
|
|
||||
handleRemove(file, fileList) { |
|
||||
this.fileList = fileList |
|
||||
}, |
|
||||
|
|
||||
// 下一步 |
|
||||
nextStep() { |
|
||||
if (this.activeStep === 0) { |
|
||||
this.$refs.scopeForm.validate(valid => { |
|
||||
if (valid) { |
|
||||
if (this.selectedScopes.length === 0) { |
|
||||
this.$message.warning('请选择至少一个经营范围') |
|
||||
return |
|
||||
} |
|
||||
this.activeStep++ |
|
||||
} |
|
||||
}) |
|
||||
} else if (this.activeStep === 1) { |
|
||||
if (this.fileList.length === 0) { |
|
||||
this.$message.warning('请上传资质文件') |
|
||||
return |
|
||||
} |
|
||||
this.activeStep++ |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 上一步 |
|
||||
prevStep() { |
|
||||
if (this.activeStep > 0) { |
|
||||
this.activeStep-- |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 提交资质 |
|
||||
submitQualification() { |
|
||||
this.loading = true |
|
||||
|
|
||||
// 处理文件上传 |
|
||||
if (this.fileList.length > 0) { |
|
||||
// 这里应该实现文件上传逻辑,获取文件URL |
|
||||
// 简化处理:使用文件名作为示例 |
|
||||
const fileUrls = this.fileList.map(file => file.name).join(',') |
|
||||
this.form.certificateFiles = fileUrls |
|
||||
} |
|
||||
|
|
||||
this.$axios.post('/vet/qualification/quickSubmit', this.form) |
|
||||
.then(res => { |
|
||||
if (res.code === 200) { |
|
||||
this.$message.success('提交成功,请等待审核') |
|
||||
this.closeDialog() |
|
||||
} else { |
|
||||
this.$message.error(res.msg || '提交失败') |
|
||||
} |
|
||||
}) |
|
||||
.finally(() => { |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 关闭弹窗 |
|
||||
closeDialog() { |
|
||||
this.dialogVisible = false |
|
||||
}, |
|
||||
|
|
||||
// 重置表单 |
|
||||
resetForm() { |
|
||||
this.activeStep = 0 |
|
||||
this.loading = false |
|
||||
this.form = { |
|
||||
qualificationId: null, |
|
||||
realName: '', |
|
||||
idCard: '', |
|
||||
qualificationType: '', |
|
||||
certificateNo: '', |
|
||||
scopeIds: '', |
|
||||
certificateFiles: '' |
|
||||
} |
|
||||
this.selectedScopes = [] |
|
||||
this.fileList = [] |
|
||||
|
|
||||
if (this.$refs.scopeForm) { |
|
||||
this.$refs.scopeForm.clearValidate() |
|
||||
} |
|
||||
if (this.$refs.upload) { |
|
||||
this.$refs.upload.clearFiles() |
|
||||
} |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
|
||||
::v-deep .el-dialog__header { |
|
||||
background: linear-gradient(90deg, #409EFF, #67C23A); |
|
||||
padding: 15px 20px; |
|
||||
} |
|
||||
|
|
||||
::v-deep .el-dialog__title { |
|
||||
color: white; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
|
||||
::v-deep .el-dialog__headerbtn .el-dialog__close { |
|
||||
color: white; |
|
||||
} |
|
||||
|
|
||||
::v-deep .el-dialog__body { |
|
||||
padding: 20px; |
|
||||
} |
|
||||
|
<style scoped lang="scss"> |
||||
</style> |
</style> |
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue