|
|
@ -18,21 +18,36 @@ |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="资质类型" prop="qualificationType"> |
|
|
<el-form-item label="资质类型" prop="qualificationType"> |
|
|
<el-input |
|
|
|
|
|
|
|
|
<el-select |
|
|
v-model="queryParams.qualificationType" |
|
|
v-model="queryParams.qualificationType" |
|
|
placeholder="请输入资质类型" |
|
|
|
|
|
clearable |
|
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="证书编号" prop="certificateNo"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="queryParams.certificateNo" |
|
|
|
|
|
placeholder="请输入证书编号" |
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
|
placeholder="请选择资质类型" |
|
|
|
|
|
style="width: 100%;" |
|
|
@keyup.enter.native="handleQuery" |
|
|
@keyup.enter.native="handleQuery" |
|
|
/> |
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="dict in dict.type.qualification_type" |
|
|
|
|
|
:key="dict.value" |
|
|
|
|
|
:label="dict.label" |
|
|
|
|
|
:value="dict.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item label="资质类型" prop="qualificationType">--> |
|
|
|
|
|
<!-- <el-input--> |
|
|
|
|
|
<!-- v-model="queryParams.qualificationType"--> |
|
|
|
|
|
<!-- placeholder="请输入资质类型"--> |
|
|
|
|
|
<!-- clearable--> |
|
|
|
|
|
<!-- @keyup.enter.native="handleQuery"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="证书编号" prop="certificateNo">--> |
|
|
|
|
|
<!-- <el-input--> |
|
|
|
|
|
<!-- v-model="queryParams.certificateNo"--> |
|
|
|
|
|
<!-- placeholder="请输入证书编号"--> |
|
|
|
|
|
<!-- clearable--> |
|
|
|
|
|
<!-- @keyup.enter.native="handleQuery"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
<el-form-item label="审核状态" prop="auditStatus"> |
|
|
<el-form-item label="审核状态" prop="auditStatus"> |
|
|
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable style="width: 100px"> |
|
|
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable style="width: 100px"> |
|
|
<el-option |
|
|
<el-option |
|
|
@ -82,58 +97,81 @@ |
|
|
v-hasPermi="['vet:qualification:remove']" |
|
|
v-hasPermi="['vet:qualification:remove']" |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="warning" |
|
|
|
|
|
plain |
|
|
|
|
|
icon="el-icon-download" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
@click="handleExport" |
|
|
|
|
|
v-hasPermi="['vet:qualification:export']" |
|
|
|
|
|
>导出</el-button> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- type="warning"--> |
|
|
|
|
|
<!-- plain--> |
|
|
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- @click="handleExport"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:export']"--> |
|
|
|
|
|
<!-- >导出</el-button>--> |
|
|
|
|
|
<!-- </el-col>--> |
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> |
|
|
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" /> |
|
|
|
|
|
<el-table-column label="真实姓名" align="center" prop="realName" /> |
|
|
|
|
|
<el-table-column label="身份证号" align="center" prop="idCard" /> |
|
|
|
|
|
<el-table-column label="资质类型" align="center" prop="qualificationType" width="120"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ formatQualificationType(scope.row.qualificationType) }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="证书编号" align="center" prop="certificateNo" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 新增的证书字段 --> |
|
|
|
|
|
<el-table-column label="证书名称" align="center" prop="certName" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.certName">{{ scope.row.certName }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150"> |
|
|
|
|
|
|
|
|
<!-- <el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" />--> |
|
|
|
|
|
<!-- <el-table-column label="真实姓名" align="center" prop="realName" />--> |
|
|
|
|
|
<!-- <el-table-column label="身份证号" align="center" prop="idCard" />--> |
|
|
|
|
|
<el-table-column label="真实姓名" align="center" prop="realName" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.realName">{{ scope.row.realName }}</span> |
|
|
<span v-else style="color: #909399">-</span> |
|
|
<span v-else style="color: #909399">-</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="到期日期" align="center" prop="expireDate" width="180"> |
|
|
|
|
|
|
|
|
<el-table-column label="身份证号" align="center" prop="idCard" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.expireDate">{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.idCard">{{ scope.row.idCard }}</span> |
|
|
<span v-else style="color: #909399">-</span> |
|
|
<span v-else style="color: #909399">-</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="证书状态" align="center" prop="certStatus" width="100"> |
|
|
|
|
|
|
|
|
<el-table-column label="资质类型" align="center" prop="qualificationType" width="120"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag :type="getCertStatusType(scope.row.certStatus)" size="small"> |
|
|
|
|
|
{{ getCertStatusLabel(scope.row.certStatus) }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
|
|
|
<span>{{ formatQualificationType(scope.row.qualificationType) }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="证书编号" align="center" prop="certificateNo" />--> |
|
|
|
|
|
<!-- <el-table-column label="证书编号" align="center" prop="certificateNo" width="150">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <span v-if="scope.row.certificateNo">{{ scope.row.certificateNo }}</span>--> |
|
|
|
|
|
<!-- <span v-else style="color: #909399">-</span>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <!– 新增的证书字段 –>--> |
|
|
|
|
|
<!-- <el-table-column label="证书名称" align="center" prop="certName" width="150">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <span v-if="scope.row.certName">{{ scope.row.certName }}</span>--> |
|
|
|
|
|
<!-- <span v-else style="color: #909399">-</span>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <el-table-column label="发证机构" align="center" prop="issueOrg" width="150">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span>--> |
|
|
|
|
|
<!-- <span v-else style="color: #909399">-</span>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <el-table-column label="证书文件" prop="certificateFiles">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!--<!– <span v-if="scope.row.certificateFiles">{{ scope.row.certificateFiles }}</span>–>--> |
|
|
|
|
|
<!-- <span v-if="scope.row.certificateFiles">{{ getImageUrl(scope.row.certificateFiles) }}</span>--> |
|
|
|
|
|
<!-- <span v-else style="color: #909399">-</span>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <el-table-column label="到期日期" align="center" prop="expireDate" width="180">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <span v-if="scope.row.expireDate">{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>--> |
|
|
|
|
|
<!-- <span v-else style="color: #909399">-</span>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <el-table-column label="证书状态" align="center" prop="certStatus" width="100">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <el-tag :type="getCertStatusType(scope.row.certStatus)" size="small">--> |
|
|
|
|
|
<!-- {{ getCertStatusLabel(scope.row.certStatus) }}--> |
|
|
|
|
|
<!-- </el-tag>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
<el-table-column label="申请时间" align="center" prop="applyTime" width="180"> |
|
|
<el-table-column label="申请时间" align="center" prop="applyTime" width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.applyTime">{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span> |
|
|
<span v-if="scope.row.applyTime">{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span> |
|
|
@ -163,41 +201,62 @@ |
|
|
icon="el-icon-view" |
|
|
icon="el-icon-view" |
|
|
@click="handleView(scope.row)" |
|
|
@click="handleView(scope.row)" |
|
|
v-hasPermi="['vet:qualification:query']" |
|
|
v-hasPermi="['vet:qualification:query']" |
|
|
>查看</el-button> |
|
|
|
|
|
|
|
|
>查看证书详情</el-button> |
|
|
|
|
|
|
|
|
<!-- 修改按钮 --> |
|
|
<!-- 修改按钮 --> |
|
|
<el-button |
|
|
|
|
|
v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
|
style="color: #42B983" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['vet:qualification:edit']" |
|
|
|
|
|
>修改</el-button> |
|
|
|
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- type="text"--> |
|
|
|
|
|
<!-- icon="el-icon-edit"--> |
|
|
|
|
|
<!-- style="color: #42B983"--> |
|
|
|
|
|
<!-- @click="handleUpdate(scope.row)"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:edit']"--> |
|
|
|
|
|
<!-- >修改</el-button>--> |
|
|
|
|
|
|
|
|
<!-- 提交/重新提交按钮 --> |
|
|
<!-- 提交/重新提交按钮 --> |
|
|
<el-button |
|
|
|
|
|
v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-s-check" |
|
|
|
|
|
style="color: #409EFF" |
|
|
|
|
|
@click="handleSubmitAudit(scope.row)" |
|
|
|
|
|
v-hasPermi="['vet:qualification:edit']" |
|
|
|
|
|
>{{ !scope.row.auditStatus ? '提交审核' : '重新提交' }}</el-button> |
|
|
|
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- type="text"--> |
|
|
|
|
|
<!-- icon="el-icon-s-check"--> |
|
|
|
|
|
<!-- style="color: #409EFF"--> |
|
|
|
|
|
<!-- @click="handleSubmitAudit(scope.row)"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:edit']"--> |
|
|
|
|
|
<!-- >{{ !scope.row.auditStatus ? '提交审核' : '重新提交' }}</el-button>--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 下架按钮:已上架状态显示 --> |
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- v-if="scope.row.auditStatus === '1'"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- type="text"--> |
|
|
|
|
|
<!-- icon="el-icon-bottom"--> |
|
|
|
|
|
<!-- style="color: #E6A23C"--> |
|
|
|
|
|
<!-- @click="handleUnshelf(scope.row)"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:unshelf']"--> |
|
|
|
|
|
<!-- >下架</el-button>--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 上架按钮:已下架状态显示 --> |
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- v-if="scope.row.auditStatus === '3'"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- type="text"--> |
|
|
|
|
|
<!-- icon="el-icon-top"--> |
|
|
|
|
|
<!-- style="color: #67C23A"--> |
|
|
|
|
|
<!-- @click="handleShelf(scope.row)"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:shelf']"--> |
|
|
|
|
|
<!-- >上架</el-button>--> |
|
|
|
|
|
|
|
|
<!-- 删除按钮 --> |
|
|
<!-- 删除按钮 --> |
|
|
<el-button |
|
|
|
|
|
v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
|
style="color: #f56c6c" |
|
|
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
|
|
v-hasPermi="['vet:qualification:remove']" |
|
|
|
|
|
>删除</el-button> |
|
|
|
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'"--> |
|
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
|
<!-- type="text"--> |
|
|
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
|
|
<!-- style="color: #f56c6c"--> |
|
|
|
|
|
<!-- @click="handleDelete(scope.row)"--> |
|
|
|
|
|
<!-- v-hasPermi="['vet:qualification:remove']"--> |
|
|
|
|
|
<!-- >删除</el-button>--> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -210,26 +269,141 @@ |
|
|
@pagination="getList" |
|
|
@pagination="getList" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 显示资质证书信息 --> |
|
|
|
|
|
<el-dialog :title="title" :visible.sync="openDetail" width="800px" append-to-body> |
|
|
|
|
|
<div v-if="detailData" style="padding: 20px;"> |
|
|
|
|
|
<div style="margin-top: 30px;"> |
|
|
|
|
|
<el-alert |
|
|
|
|
|
v-if="!certificateList || certificateList.length === 0" |
|
|
|
|
|
title="暂无资质证书" |
|
|
|
|
|
type="info" |
|
|
|
|
|
:closable="false" |
|
|
|
|
|
style="margin-bottom: 20px;" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<el-table v-else :data="certificateList" border style="width: 100%"> |
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
|
|
<el-table-column prop="certificateNo" label="证书编号" align="center" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row.certificateNo }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="certName" label="证书名称" align="center" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row.certName }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="证书文件" prop="certificateFiles"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.certificateFiles"> |
|
|
|
|
|
<template v-if="isImageFile(scope.row.certificateFiles)"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-view" |
|
|
|
|
|
@click="previewCertificate(scope.row.certificateFiles)" |
|
|
|
|
|
style="color: #409EFF;" |
|
|
|
|
|
> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else-if="isPdfFile(scope.row.certificateFiles)"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-download" |
|
|
|
|
|
@click="downloadFile(scope.row.certificateFiles)" |
|
|
|
|
|
style="color: #287c07;" |
|
|
|
|
|
> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else> |
|
|
|
|
|
{{ getImageUrl(scope.row.certificateFiles) }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="issueDate" label="发证日期" align="center" width="120"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ parseTime(scope.row.issueDate, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="expireDate" label="到期日期" align="center" width="120"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="证书状态" align="center" prop="certStatus" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-tag :type="getCertStatusType(scope.row.certStatus)" size="small"> |
|
|
|
|
|
{{ getCertStatusLabel(scope.row.certStatus) }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- 修改按钮 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
|
style="color: #42B983" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['vet:qualification:edit']" |
|
|
|
|
|
>修改</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="closeDetail">关 闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="previewDialogVisible" width="60%" append-to-body> |
|
|
|
|
|
<div style="text-align: center; padding: 20px;"> |
|
|
|
|
|
<img |
|
|
|
|
|
:src="getImageUrl(previewFileUrl)" |
|
|
|
|
|
style="max-width: 100%; max-height: 70vh; height: auto;" |
|
|
|
|
|
preview-teleported |
|
|
|
|
|
:preview-src-list="[getImageUrl(previewFileUrl)]" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改兽医资质对话框 --> |
|
|
<!-- 添加或修改兽医资质对话框 --> |
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<el-form-item label="真实姓名" prop="realName"> |
|
|
|
|
|
<el-input v-model="form.realName" placeholder="请输入真实姓名" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="身份证号" prop="idCard"> |
|
|
|
|
|
<el-input v-model="form.idCard" placeholder="请输入身份证号" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="资质类型" prop="qualificationType"> |
|
|
|
|
|
<el-select v-model="form.qualificationType" placeholder="请选择资质类型" style="width: 100%"> |
|
|
|
|
|
<el-option label="兽医资格证" value="veterinarian" /> |
|
|
|
|
|
<el-option label="兽药师资格证" value="pharmacist" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<!-- <el-form-item label="真实姓名" prop="realName">--> |
|
|
|
|
|
<!-- <el-input v-model="form.realName" placeholder="请输入真实姓名" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="身份证号" prop="idCard">--> |
|
|
|
|
|
<!-- <el-input v-model="form.idCard" placeholder="请输入身份证号" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="资质类型" prop="qualificationType">--> |
|
|
|
|
|
<!-- <el-select--> |
|
|
|
|
|
<!-- v-model="form.qualificationType"--> |
|
|
|
|
|
<!-- placeholder="请选择资质类型"--> |
|
|
|
|
|
<!-- style="width: 100%;"--> |
|
|
|
|
|
<!-- >--> |
|
|
|
|
|
<!-- <el-option--> |
|
|
|
|
|
<!-- v-for="dict in dict.type.qualification_type"--> |
|
|
|
|
|
<!-- :key="dict.value"--> |
|
|
|
|
|
<!-- :label="dict.label"--> |
|
|
|
|
|
<!-- :value="dict.value"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
<el-form-item label="证书编号" prop="certificateNo"> |
|
|
<el-form-item label="证书编号" prop="certificateNo"> |
|
|
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
|
|
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<!-- 新增的证书字段 --> |
|
|
|
|
|
<el-form-item label="证书名称" prop="certName"> |
|
|
<el-form-item label="证书名称" prop="certName"> |
|
|
<el-input v-model="form.certName" placeholder="请输入证书名称" /> |
|
|
<el-input v-model="form.certName" placeholder="请输入证书名称" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -254,22 +428,26 @@ |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="证书图片" prop="certImage"> |
|
|
|
|
|
<image-upload v-model="form.certImage"/> |
|
|
|
|
|
|
|
|
<!-- <el-form-item label="证书图片" prop="certImage">--> |
|
|
|
|
|
<!-- <image-upload v-model="form.certImage"/>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<el-form-item label="证书文件" prop="certificateFiles"> |
|
|
|
|
|
<!--<!– <el-input v-model="form.certificateFiles" type="textarea" placeholder="请输入内容" />–>--> |
|
|
|
|
|
<file-upload |
|
|
|
|
|
v-model="form.certificateFiles" |
|
|
|
|
|
:limit="1" |
|
|
|
|
|
:file-type="['pdf','png','jpg','jpeg']" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="提前提醒天数" prop="remindDays"> |
|
|
<el-form-item label="提前提醒天数" prop="remindDays"> |
|
|
<el-input v-model="form.remindDays" placeholder="请输入提前提醒天数" /> |
|
|
<el-input v-model="form.remindDays" placeholder="请输入提前提醒天数" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="证书文件" prop="certificateFiles"> |
|
|
|
|
|
<el-input v-model="form.certificateFiles" type="textarea" placeholder="请输入内容" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
<el-form-item label="备注" prop="remark"> |
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" /> |
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="resubmitForm">重新提交审核</el-button> |
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -277,16 +455,19 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { listQualification, getQualification, delQualification, addQualification, updateQualification } from "@/api/vet/qualification" |
|
|
|
|
|
import { submitQualification } from "@/api/vet/qualification" |
|
|
|
|
|
|
|
|
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification} from "@/api/vet/qualification" |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "Qualification", |
|
|
name: "Qualification", |
|
|
dicts: ['qualification_shenhe', 'expert_type'], |
|
|
|
|
|
|
|
|
dicts: ['qualification_shenhe', 'expert_type', 'qualification_type'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API, |
|
|
|
|
|
// 待预览的证书文件路径 |
|
|
|
|
|
previewFileUrl: '', |
|
|
// 遮罩层 |
|
|
// 遮罩层 |
|
|
loading: true, |
|
|
loading: true, |
|
|
|
|
|
detailLoading: true, |
|
|
// 选中数组 |
|
|
// 选中数组 |
|
|
ids: [], |
|
|
ids: [], |
|
|
// 非单个禁用 |
|
|
// 非单个禁用 |
|
|
@ -299,10 +480,16 @@ export default { |
|
|
total: 0, |
|
|
total: 0, |
|
|
// 兽医资质表格数据 |
|
|
// 兽医资质表格数据 |
|
|
qualificationList: [], |
|
|
qualificationList: [], |
|
|
|
|
|
// 资质证书列表 |
|
|
|
|
|
certificateList: [], |
|
|
|
|
|
// 详情数据 |
|
|
|
|
|
detailData: null, |
|
|
// 弹出层标题 |
|
|
// 弹出层标题 |
|
|
title: "", |
|
|
title: "", |
|
|
// 是否显示弹出层 |
|
|
// 是否显示弹出层 |
|
|
open: false, |
|
|
open: false, |
|
|
|
|
|
openDetail: false, |
|
|
|
|
|
previewDialogVisible: false, |
|
|
// 查询参数 |
|
|
// 查询参数 |
|
|
queryParams: { |
|
|
queryParams: { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
@ -321,18 +508,33 @@ export default { |
|
|
form: {}, |
|
|
form: {}, |
|
|
// 表单校验 |
|
|
// 表单校验 |
|
|
rules: { |
|
|
rules: { |
|
|
realName: [ |
|
|
|
|
|
{ required: true, message: "真实姓名不能为空", trigger: "blur" } |
|
|
|
|
|
|
|
|
// realName: [ |
|
|
|
|
|
// { required: true, message: "真实姓名不能为空", trigger: "blur" } |
|
|
|
|
|
// ], |
|
|
|
|
|
// idCard: [ |
|
|
|
|
|
// { required: true, message: "身份证号不能为空", trigger: "blur" } |
|
|
|
|
|
// ], |
|
|
|
|
|
// qualificationType: [ |
|
|
|
|
|
// { required: true, message: "资质类型不能为空", trigger: "change" } |
|
|
|
|
|
// ], |
|
|
|
|
|
certificateNo: [ |
|
|
|
|
|
{ required: true, message: "证书编号不能为空", trigger: "blur" } |
|
|
], |
|
|
], |
|
|
idCard: [ |
|
|
|
|
|
{ required: true, message: "身份证号不能为空", trigger: "blur" } |
|
|
|
|
|
|
|
|
certName: [ |
|
|
|
|
|
{ required: true, message: "证书名称不能为空", trigger: "blur" } |
|
|
], |
|
|
], |
|
|
qualificationType: [ |
|
|
|
|
|
{ required: true, message: "资质类型不能为空", trigger: "change" } |
|
|
|
|
|
|
|
|
issueOrg: [ |
|
|
|
|
|
{ required: true, message: "发证机构不能为空", trigger: "blur" } |
|
|
|
|
|
], |
|
|
|
|
|
issueDate: [ |
|
|
|
|
|
{ required: true, message: "发证日期不能为空", trigger: "change" } |
|
|
|
|
|
], |
|
|
|
|
|
expireDate: [ |
|
|
|
|
|
{ required: true, message: "到期日期不能为空", trigger: "change" } |
|
|
|
|
|
], |
|
|
|
|
|
certificateFiles: [ |
|
|
|
|
|
{ required: true, message: "证书文件不能为空", trigger: "blur" } |
|
|
], |
|
|
], |
|
|
certificateNo: [ |
|
|
|
|
|
{ required: true, message: "证书编号不能为空", trigger: "blur" } |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -373,109 +575,297 @@ export default { |
|
|
/** 获取审核状态标签类型 */ |
|
|
/** 获取审核状态标签类型 */ |
|
|
getAuditStatusType(status) { |
|
|
getAuditStatusType(status) { |
|
|
const map = { |
|
|
const map = { |
|
|
'0': 'primary', // 待审核 - 蓝色 |
|
|
|
|
|
|
|
|
'0': 'info', // 待审核 - 蓝色 |
|
|
'1': 'success', // 已上架 - 绿色 |
|
|
'1': 'success', // 已上架 - 绿色 |
|
|
'2': 'danger', // 已拒绝 - 红色 |
|
|
'2': 'danger', // 已拒绝 - 红色 |
|
|
|
|
|
|
|
|
|
|
|
'3': 'warning' // 已下架 - 黄色 |
|
|
} |
|
|
} |
|
|
return map[status] || 'info' |
|
|
return map[status] || 'info' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** 格式化资质类型显示 */ |
|
|
/** 格式化资质类型显示 */ |
|
|
formatQualificationType(value) { |
|
|
|
|
|
if (value === 'veterinarian') return '兽医资格证' |
|
|
|
|
|
if (value === 'pharmacist') return '兽药师资格证' |
|
|
|
|
|
return value |
|
|
|
|
|
|
|
|
formatQualificationType(status) { |
|
|
|
|
|
const map = { |
|
|
|
|
|
'1': '执业兽医师', |
|
|
|
|
|
'2': '执业助理兽医', |
|
|
|
|
|
'3': '官方兽医', |
|
|
|
|
|
'4': '乡村兽医' |
|
|
|
|
|
} |
|
|
|
|
|
return map[status] || 'info' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 获取完整的图片URL */ |
|
|
|
|
|
getImageUrl(filePath) { |
|
|
|
|
|
return `${this.baseUrl}${filePath}` |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isImageFile(filePath) { |
|
|
|
|
|
if (!filePath) return false; |
|
|
|
|
|
const imageExts = ['.png','.jpg','.jpeg']; |
|
|
|
|
|
const ext = filePath.substring(filePath.lastIndexOf('.')).toLowerCase(); |
|
|
|
|
|
return imageExts.includes(ext); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 判断是否为PDF文件 */ |
|
|
|
|
|
isPdfFile(filePath) { |
|
|
|
|
|
if (!filePath) return false; |
|
|
|
|
|
const ext = filePath.substring(filePath.lastIndexOf('.')).toLowerCase(); |
|
|
|
|
|
return ext === '.pdf'; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 预览图片 */ |
|
|
|
|
|
previewCertificate(filePath) { |
|
|
|
|
|
this.previewFileUrl = filePath; |
|
|
|
|
|
this.previewDialogVisible = true; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 下载文件 */ |
|
|
|
|
|
downloadFile(filePath) { |
|
|
|
|
|
const fullUrl = this.getImageUrl(filePath); |
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
link.href = fullUrl; |
|
|
|
|
|
|
|
|
|
|
|
const fileName = filePath.substring(filePath.lastIndexOf('/') + 1); |
|
|
|
|
|
link.download = fileName; |
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
|
link.click(); |
|
|
|
|
|
document.body.removeChild(link); |
|
|
|
|
|
this.$modal.msgSuccess('开始下载文件'); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 下架操作 */ |
|
|
|
|
|
// handleUnshelf(row) { |
|
|
|
|
|
// this.$prompt('请输入下架原因', '下架确认', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// inputPlaceholder: '请输入下架原因(如:证书过期、违规操作等)', |
|
|
|
|
|
// inputValidator: (value) => { |
|
|
|
|
|
// if (!value || value.trim().length < 2) { |
|
|
|
|
|
// return '下架原因不能少于2个字' |
|
|
|
|
|
// } |
|
|
|
|
|
// if (value.trim().length > 200) { |
|
|
|
|
|
// return '下架原因不能超过200字' |
|
|
|
|
|
// } |
|
|
|
|
|
// return true |
|
|
|
|
|
// } |
|
|
|
|
|
// }).then(({ value }) => { |
|
|
|
|
|
// this.loading = true |
|
|
|
|
|
// unshelfQualification(row.qualificationId, value).then(response => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess('下架成功') |
|
|
|
|
|
// this.getList() // 刷新列表 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || '下架失败') |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(error => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// this.$modal.msgError(error.msg || '下架失败') |
|
|
|
|
|
// }) |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// // 用户取消操作 |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
/** 上架操作 */ |
|
|
|
|
|
// handleShelf(row) { |
|
|
|
|
|
// this.$confirm('确认要上架此资质吗?', '上架确认', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// type: 'warning' |
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
// this.loading = true |
|
|
|
|
|
// shelfQualification(row.qualificationId).then(response => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess('上架成功') |
|
|
|
|
|
// this.getList() // 刷新列表 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || '上架失败') |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(error => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// this.$modal.msgError(error.msg || '上架失败') |
|
|
|
|
|
// }) |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// // 用户取消操作 |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
/** 提交审核操作 */ |
|
|
/** 提交审核操作 */ |
|
|
handleSubmitAudit(row) { |
|
|
|
|
|
this.$modal.confirm('确认提交 "' + row.realName + '" 的资质进行审核?').then(() => { |
|
|
|
|
|
// 准备提交数据 |
|
|
|
|
|
const submitData = { |
|
|
|
|
|
qualificationId: row.qualificationId, |
|
|
|
|
|
realName: row.realName, |
|
|
|
|
|
idCard: row.idCard, |
|
|
|
|
|
qualificationType: row.qualificationType, |
|
|
|
|
|
certificateNo: row.certificateNo, |
|
|
|
|
|
certName: row.certName, |
|
|
|
|
|
issueOrg: row.issueOrg, |
|
|
|
|
|
issueDate: row.issueDate, |
|
|
|
|
|
expireDate: row.expireDate, |
|
|
|
|
|
certImage: row.certImage, |
|
|
|
|
|
certificateFiles: row.certificateFiles, |
|
|
|
|
|
remark: row.remark, |
|
|
|
|
|
// 提交审核时设置审核状态为待审核(0) |
|
|
|
|
|
auditStatus: '0' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// handleSubmitAudit(row) { |
|
|
|
|
|
// this.$modal.confirm('确认提交 "' + row.realName + '" 的资质进行审核?').then(() => { |
|
|
|
|
|
// // 准备提交数据 |
|
|
|
|
|
// const submitData = { |
|
|
|
|
|
// qualificationId: row.qualificationId, |
|
|
|
|
|
// realName: row.realName, |
|
|
|
|
|
// idCard: row.idCard, |
|
|
|
|
|
// qualificationType: row.qualificationType, |
|
|
|
|
|
// certificateNo: row.certificateNo, |
|
|
|
|
|
// certName: row.certName, |
|
|
|
|
|
// issueOrg: row.issueOrg, |
|
|
|
|
|
// issueDate: row.issueDate, |
|
|
|
|
|
// expireDate: row.expireDate, |
|
|
|
|
|
// certImage: row.certImage, |
|
|
|
|
|
// certificateFiles: row.certificateFiles, |
|
|
|
|
|
// remark: row.remark, |
|
|
|
|
|
// // 提交审核时设置审核状态为待审核(0) |
|
|
|
|
|
// auditStatus: '0' |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// return submitQualification(submitData) |
|
|
|
|
|
// }).then(response => { |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess("提交审核成功") |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || "提交审核失败") |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
return submitQualification(submitData) |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
this.$modal.msgSuccess("提交审核成功") |
|
|
|
|
|
this.getList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$modal.msgError(response.msg || "提交审核失败") |
|
|
|
|
|
|
|
|
/** 重新提交审核 */ |
|
|
|
|
|
resubmitForm() { |
|
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
let certId = this.form.certId || this.form.certificateId || this.form.id |
|
|
|
|
|
if (certId && typeof certId === 'object') { |
|
|
|
|
|
certId = certId.value || certId.id || certId.certificateId |
|
|
|
|
|
} |
|
|
|
|
|
certId = String(certId || '') |
|
|
|
|
|
if (!certId || certId === 'null' || certId === 'undefined' || certId === 'NaN') { |
|
|
|
|
|
this.$modal.msgError("证书ID无效:" + certId) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
|
certId: certId, |
|
|
|
|
|
qualificationId: this.form.qualificationId, |
|
|
|
|
|
realName: this.form.realName, |
|
|
|
|
|
idCard: this.form.idCard, |
|
|
|
|
|
qualificationType: this.form.qualificationType, |
|
|
|
|
|
certificateNo: this.form.certificateNo, |
|
|
|
|
|
certName: this.form.certName, |
|
|
|
|
|
issueOrg: this.form.issueOrg, |
|
|
|
|
|
issueDate: this.form.issueDate, |
|
|
|
|
|
expireDate: this.form.expireDate, |
|
|
|
|
|
certificateFiles: this.form.certificateFiles, |
|
|
|
|
|
remark: this.form.remark, |
|
|
|
|
|
auditStatus: '0', |
|
|
|
|
|
auditOpinion: null, |
|
|
|
|
|
applyTime: new Date().toISOString(), |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateAndSubmitQualification(submitData).then(response => { |
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
this.$modal.msgSuccess("重新提交审核成功") |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
|
|
|
|
|
|
if (this.openDetail && this.detailData && this.detailData.qualificationId) { |
|
|
|
|
|
getQualificationCertificates(this.detailData.qualificationId).then(response => { |
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
this.certificateList = response.rows || []; |
|
|
|
|
|
const updatedCertificate = this.certificateList.find(cert => |
|
|
|
|
|
cert.certificateId === certId || cert.certId === certId |
|
|
|
|
|
); |
|
|
|
|
|
if (updatedCertificate) { |
|
|
|
|
|
this.certificateList = this.certificateList.map(cert => { |
|
|
|
|
|
if (cert.certificateId === certId || cert.certId === certId) { |
|
|
|
|
|
return { |
|
|
|
|
|
...cert, |
|
|
|
|
|
auditStatus: '0', |
|
|
|
|
|
applyTime: new Date().toISOString(), |
|
|
|
|
|
auditTime: null, |
|
|
|
|
|
auditOpinion: null |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return cert; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.reset() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$modal.msgError(response.msg || "重新提交审核失败") |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}).catch(() => {}) |
|
|
|
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** 查看详情 */ |
|
|
/** 查看详情 */ |
|
|
handleView(row) { |
|
|
|
|
|
// 构建详情内容 |
|
|
|
|
|
let detailContent = ` |
|
|
|
|
|
<table style="width:100%; border-collapse: collapse;"> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">姓名:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.realName || '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">身份证:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.idCard || '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书编号:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certificateNo || '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书名称:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certName || '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">发证机构:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.issueOrg || '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">到期日期:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.expireDate ? this.parseTime(row.expireDate, '{y}-{m}-{d}') : '-'}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书状态:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getCertStatusLabel(row.certStatus)}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核状态:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getDictLabel('qualification_shenhe', row.auditStatus) || '-'}</td> |
|
|
|
|
|
</tr>` |
|
|
|
|
|
|
|
|
|
|
|
// 如果有审核意见,添加审核意见 |
|
|
|
|
|
if (row.auditOpinion) { |
|
|
|
|
|
detailContent += ` |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核意见:</td> |
|
|
|
|
|
<td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.auditOpinion}</td> |
|
|
|
|
|
</tr>` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// handleView(row) { |
|
|
|
|
|
// // 构建详情内容 |
|
|
|
|
|
// let detailContent = ` |
|
|
|
|
|
// <table style="width:100%; border-collapse: collapse;"> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">姓名:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.realName || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">身份证:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.idCard || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书编号:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certificateNo || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书名称:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certName || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">发证机构:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.issueOrg || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">到期日期:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.expireDate ? this.parseTime(row.expireDate, '{y}-{m}-{d}') : '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书状态:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getCertStatusLabel(row.certStatus)}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核状态:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getDictLabel('qualification_shenhe', row.auditStatus) || '-'}</td> |
|
|
|
|
|
// </tr>` |
|
|
|
|
|
// |
|
|
|
|
|
// // 如果有审核意见,添加审核意见 |
|
|
|
|
|
// if (row.auditOpinion) { |
|
|
|
|
|
// detailContent += ` |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核意见:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.auditOpinion}</td> |
|
|
|
|
|
// </tr>` |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// detailContent += `</table>` |
|
|
|
|
|
// |
|
|
|
|
|
// this.$alert(detailContent, '资质详情', { |
|
|
|
|
|
// dangerouslyUseHTMLString: true, |
|
|
|
|
|
// confirmButtonText: '关闭', |
|
|
|
|
|
// width: '550px', |
|
|
|
|
|
// customClass: 'qualification-detail-dialog' |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
detailContent += `</table>` |
|
|
|
|
|
|
|
|
|
|
|
this.$alert(detailContent, '资质详情', { |
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
confirmButtonText: '关闭', |
|
|
|
|
|
width: '550px', |
|
|
|
|
|
customClass: 'qualification-detail-dialog' |
|
|
|
|
|
|
|
|
/** 资质证书详情 */ |
|
|
|
|
|
handleView(row) { |
|
|
|
|
|
this.openDetail = true |
|
|
|
|
|
this.detailData = row |
|
|
|
|
|
this.title = "资质证书详情" |
|
|
|
|
|
this.certificateList = [] |
|
|
|
|
|
this.detailLoading = true |
|
|
|
|
|
getQualificationCertificates(row.qualificationId).then(response => { |
|
|
|
|
|
this.detailLoading = false |
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
this.certificateList = response.rows || []; |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -485,6 +875,12 @@ export default { |
|
|
this.reset() |
|
|
this.reset() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 关闭按钮 |
|
|
|
|
|
closeDetail(){ |
|
|
|
|
|
this.openDetail = false |
|
|
|
|
|
this.reset() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 表单重置 |
|
|
// 表单重置 |
|
|
reset() { |
|
|
reset() { |
|
|
this.form = { |
|
|
this.form = { |
|
|
@ -546,36 +942,53 @@ export default { |
|
|
/** 修改按钮操作 */ |
|
|
/** 修改按钮操作 */ |
|
|
handleUpdate(row) { |
|
|
handleUpdate(row) { |
|
|
this.reset() |
|
|
this.reset() |
|
|
const qualificationId = row.qualificationId || this.ids |
|
|
|
|
|
getQualification(qualificationId).then(response => { |
|
|
|
|
|
this.form = response.data |
|
|
|
|
|
this.open = true |
|
|
|
|
|
this.title = "修改兽医资质" |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
let certId = row.certId || row.certificateId || row.id |
|
|
|
|
|
if (certId && typeof certId === 'object') { |
|
|
|
|
|
certId = certId.value || certId.id || certId.certificateId |
|
|
|
|
|
} |
|
|
|
|
|
certId = String(certId || '') |
|
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
|
submitForm() { |
|
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
if (this.form.qualificationId != null) { |
|
|
|
|
|
updateQualification(this.form).then(response => { |
|
|
|
|
|
this.$modal.msgSuccess("修改成功") |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.form.auditStatus = null |
|
|
|
|
|
addQualification(this.form).then(response => { |
|
|
|
|
|
this.$modal.msgSuccess("新增成功") |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!certId || certId === 'null' || certId === 'undefined' || certId === 'NaN') { |
|
|
|
|
|
this.$modal.msgError("证书ID无效:" + certId) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getQualificationCertificate(certId).then(response => { |
|
|
|
|
|
if (response.code === 200 && response.data) { |
|
|
|
|
|
this.form = response.data |
|
|
|
|
|
this.open = true |
|
|
|
|
|
this.title = "修改兽医资质证书信息" |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$modal.msgError(response.msg || "获取证书信息失败") |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error('获取证书信息失败:', error) |
|
|
|
|
|
this.$modal.msgError("获取证书信息失败") |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
|
// submitForm() { |
|
|
|
|
|
// this.$refs["form"].validate(valid => { |
|
|
|
|
|
// if (valid) { |
|
|
|
|
|
// if (this.form.qualificationId != null) { |
|
|
|
|
|
// updateQualification(this.form).then(response => { |
|
|
|
|
|
// this.$modal.msgSuccess("修改成功") |
|
|
|
|
|
// this.open = false |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.form.auditStatus = null |
|
|
|
|
|
// addQualification(this.form).then(response => { |
|
|
|
|
|
// this.$modal.msgSuccess("新增成功") |
|
|
|
|
|
// this.open = false |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
|
handleDelete(row) { |
|
|
handleDelete(row) { |
|
|
const qualificationIds = row.qualificationId || this.ids |
|
|
const qualificationIds = row.qualificationId || this.ids |
|
|
|