对接ESC重新申请接口
This commit is contained in:
parent
3cf13d755f
commit
9e96ecddcf
|
@ -107,6 +107,20 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/qualification/escTask/qualificationReApplyForm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['qualification:escTask:qualificationApply'],
|
||||
children: [
|
||||
{
|
||||
path: ':Id(\\d+)?/:node',
|
||||
component: () => import('@/views/qualification/escTask/components/QualificationReApplyForm'),
|
||||
name: 'qualificationReApplyForm',
|
||||
meta: { title: 'ESC重新申请申请', activeMenu: '/qualification/escTask' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/qualification/escTask/lableApplyForm',
|
||||
component: Layout,
|
||||
|
@ -121,8 +135,8 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/qualification/myQualifications/viewDetail',
|
||||
{
|
||||
path: '/qualification/viewDetail',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['qualification:escApproval:approvalDetail'],
|
||||
|
|
|
@ -59,9 +59,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state != 1">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state != 1" />
|
||||
<el-button type="primary" text class="deleteTextBtn">删除</el-button>
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
@click="handleReplay(scope.row)">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/qualification/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
<el-button type="primary" text class="deleteTextBtn" v-if="scope.row.state == 1"
|
||||
@click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -72,7 +78,7 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import applyIcon from '@/assets/images/applyIcon.png'
|
||||
import { getBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
import { getBusUserQualification, deleteBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
import { deptTreeSelect, listUser } from "@/api/system/user"
|
||||
|
||||
const router = useRouter()
|
||||
|
@ -152,7 +158,7 @@ const handleQuery = () => {
|
|||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
const resetQuery = () => {
|
||||
queryParams.value.userId = undefined
|
||||
queryParams.value.deptId = undefined
|
||||
queryParams.value.qualificationId = undefined
|
||||
|
@ -165,6 +171,25 @@ const handleOpenApplyForm = () => {
|
|||
router.push('/qualification/escTask/qualificationApplyForm')
|
||||
}
|
||||
|
||||
// 重新申请资质表单
|
||||
const handleReplay = (record) => {
|
||||
// router.push('/qualification/escTask/qualificationReApplyForm/' + record.id)
|
||||
router.push({
|
||||
name: 'qualificationReApplyForm',
|
||||
params: { Id: record.id, node: record.node } // 传递两个参数
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
|
||||
return deleteBusUserQualification(rowId)
|
||||
}).then(() => {
|
||||
getCurUserQualificationPageList();
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => { })
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.myRow {
|
||||
|
|
|
@ -0,0 +1,801 @@
|
|||
<template>
|
||||
<div class="app-page-container">
|
||||
<el-breadcrumb class="app-breadcrumb" separator=">">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
||||
<span v-if="index == levelList.length - 1" class="link-redirect">{{
|
||||
item.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.title }}</span>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
<div class="rootContainer clearBoth">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>资质申请</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-position="top">
|
||||
<div class="headerTitle">基本信息</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="目标资质" prop="qualificationId">
|
||||
<el-select v-model="ruleForm.qualificationId" placeholder="请选择目标资质" clearable>
|
||||
<el-option v-for="dict in target_qualification" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="员工工号" prop="workNo">
|
||||
<el-select v-model="ruleForm.workNo" filterable placeholder="请选择员工工号"
|
||||
@change="selectChanged">
|
||||
<el-option v-for="item in allUsers" :key="item.userId" :label="item.workNo"
|
||||
:value="item.workNo" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="员工姓名(中文)" prop="nickName">
|
||||
<el-input v-model="ruleForm.nickName" placeholder="请输入员工姓名(中文)" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="员工姓名(英文)" prop="englishName">
|
||||
<el-input v-model="ruleForm.englishName" placeholder="请输入员工姓名(英文)" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<el-tree-select v-model="ruleForm.deptId" :data="enabledDeptOptions" disabled
|
||||
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id"
|
||||
placeholder="请选择部门" check-strictly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="科室" prop="sectionId">
|
||||
<el-select v-model="ruleForm.sectionId" placeholder="请选择科室" disabled>
|
||||
<el-option v-for="item in sectionData" :key="item.sectionId"
|
||||
:label="item.sectionName" :value="item.sectionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="属地" prop="dependencyId">
|
||||
<el-select v-model="ruleForm.dependencyId" placeholder="请选择属地" disabled>
|
||||
<el-option v-for="item in busDependencyData" :key="item.id"
|
||||
:label="item.dependencyName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="属地ESC" prop="escUserName">
|
||||
<el-input v-model="ruleForm.escUserName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.qualificationId">前置条件</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.qualificationId">
|
||||
<div v-if="ruleForm.qualificationId == 'SH'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证初领日期" prop="beforeCondition.collectionDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" @change="handleCollectionDateChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证复审日期" prop="beforeCondition.reviewDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="培训紧迫程度" prop="beforeCondition.urgency">
|
||||
<el-radio-group v-model="ruleForm.beforeCondition.urgency">
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证照片" prop="beforeCondition.certificatePhoto">
|
||||
<myFileUpload ref="certificatePhotoRef"
|
||||
@set-form-file="handleSetCertificatePhoto" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单" prop="beforeCondition.qualificationForm">
|
||||
<myFileUpload ref="qualificationFormRef"
|
||||
@set-form-file="handleSetQualificationForm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="ruleForm.qualificationId == 'ES'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证初领日期" prop="beforeCondition.collectionDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" @change="handleCollectionDateChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证复审日期" prop="beforeCondition.reviewDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="培训紧迫程度" prop="beforeCondition.urgency">
|
||||
<el-radio-group v-model="ruleForm.beforeCondition.urgency">
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证照片" prop="beforeCondition.certificatePhoto">
|
||||
<myFileUpload ref="certificatePhotoRef"
|
||||
@set-form-file="handleSetCertificatePhoto" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单" prop="beforeCondition.qualificationForm">
|
||||
<myFileUpload ref="qualificationFormRef"
|
||||
@set-form-file="handleSetQualificationForm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="6个月实操经验" prop="beforeCondition.practicalExperience">
|
||||
<el-radio-group v-model="ruleForm.beforeCondition.practicalExperience">
|
||||
<el-radio value="0">无</el-radio>
|
||||
<el-radio value="1">有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.practicalExperience == '1'">
|
||||
<el-form-item label="实操经验表单" prop="beforeCondition.experienceFile">
|
||||
<myFileUpload ref="experienceFileRef"
|
||||
@set-form-file="handleSetExperienceFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="ruleForm.qualificationId == 'ESC' || ruleForm.qualificationId == 'CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证初领日期" prop="beforeCondition.collectionDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" @change="handleCollectionDateChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证复审日期" prop="beforeCondition.reviewDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="培训紧迫程度" prop="beforeCondition.urgency">
|
||||
<el-radio-group v-model="ruleForm.beforeCondition.urgency">
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证照片" prop="beforeCondition.certificatePhoto">
|
||||
<myFileUpload ref="certificatePhotoRef"
|
||||
@set-form-file="handleSetCertificatePhoto" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单" prop="beforeCondition.qualificationForm">
|
||||
<myFileUpload ref="qualificationFormRef"
|
||||
@set-form-file="handleSetQualificationForm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="ruleForm.qualificationId == 'LLP'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="非电池生产线员工/电池生产线员工" prop="beforeCondition.batteryLine">
|
||||
<el-radio-group v-model="ruleForm.beforeCondition.batteryLine">
|
||||
<el-radio value="0">非电池生产线员工</el-radio>
|
||||
<el-radio value="1">电池生产线员工</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质" prop="beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified">
|
||||
<el-checkbox v-if="ruleForm.beforeCondition.batteryLine == 1" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
<el-checkbox label="ESC" value="ESC" />
|
||||
<el-checkbox label="CESC" value="CESC" />
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="急救证发证日期" prop="beforeCondition.firstCollectionDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.firstCollectionDate"
|
||||
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择急救证发证日期" style="width: 60%;"
|
||||
@change="handleFirstCollectionDateChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="急救证到期日期" prop="beforeCondition.firstCollectionExpireDate">
|
||||
<el-date-picker v-model="ruleForm.beforeCondition.firstCollectionExpireDate"
|
||||
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择急救证到期日期" style="width: 60%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeCondition.healthCertificate">
|
||||
<myFileUpload ref="healthCertificateRef"
|
||||
@set-form-file="handleSetHealthCertificate" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="急救证" prop="beforeCondition.firstCertificateFile">
|
||||
<myFileUpload ref="firstCertificateFileRef"
|
||||
@set-form-file="handleSetFirstCertificateFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单" prop="beforeCondition.qualificationForm">
|
||||
<myFileUpload ref="qualificationFormRef"
|
||||
@set-form-file="handleSetQualificationForm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="submitTool">
|
||||
<el-button class="cancelApplyBtn" @click="handleCancel">取消</el-button>
|
||||
<el-button class="submitApplyBtn" @click="handleSubmit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { deptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getBusDependencyPage } from "@/api/system/dependency"
|
||||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { reApplyBusUserQualification, getBusUserQualificationDetail } from "@/api/qualification/myQualifications"
|
||||
import myFileUpload from './myFileUpload.vue'
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const certificatePhotoRef = ref(null)
|
||||
const qualificationFormRef = ref(null)
|
||||
const shFileRef = ref(null)
|
||||
const experienceFileRef = ref(null)
|
||||
const esFileRef = ref(null)
|
||||
const healthCertificateRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { target_qualification } = proxy.useDict("target_qualification")
|
||||
console.log('目标资质', target_qualification)
|
||||
|
||||
const data = reactive({
|
||||
ruleForm: {
|
||||
qualificationId: undefined,
|
||||
workNo: undefined,
|
||||
nickName: undefined,
|
||||
englishName: undefined,
|
||||
deptId: undefined,
|
||||
sectionId: undefined,
|
||||
dependencyId: undefined,
|
||||
escUserName: undefined,
|
||||
beforeCondition: {
|
||||
collectionDate: undefined,
|
||||
reviewDate: undefined,
|
||||
urgency: undefined,
|
||||
certificatePhoto: undefined,
|
||||
esFile: undefined,
|
||||
shFile: undefined,
|
||||
practicalExperience: undefined,
|
||||
experienceFile: undefined,
|
||||
batteryLine: '0',
|
||||
hasQualified: [],
|
||||
qualificationForm: undefined,
|
||||
firstCollectionDate: undefined,
|
||||
firstCollectionExpireDate: undefined,
|
||||
healthCertificate: undefined,
|
||||
firstCertificateFile: undefined
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
qualificationId: [{ required: true, message: "目标资质不能为空", trigger: "change" }],
|
||||
workNo: [{ required: true, message: "员工工号不能为空", trigger: "blur" }],
|
||||
nickName: [{ required: true, message: "员工姓名(中文)不能为空", trigger: "blur" }],
|
||||
englishName: [{ required: true, message: "员工姓名(英文)", trigger: "blur" }],
|
||||
deptId: [{ required: true, message: "部门不能为空", trigger: "change" }],
|
||||
sectionId: [{ required: true, message: "科室不能为空", trigger: "change" }],
|
||||
dependencyId: [{ required: true, message: "属地不能为空", trigger: "change" }],
|
||||
escUserName: [{ required: true, message: "属地ESC不能为空", trigger: "blur" }],
|
||||
beforeCondition: {
|
||||
collectionDate: [
|
||||
{ required: true, message: '电工证初领日期不能为空', trigger: 'change' }
|
||||
],
|
||||
reviewDate: [
|
||||
{ required: true, message: '电工证复审日期不能为空', trigger: 'change' }
|
||||
],
|
||||
urgency: [
|
||||
{ required: true, message: '培训紧迫程度不能为空', trigger: 'change' }
|
||||
],
|
||||
certificatePhoto: [
|
||||
{ required: true, message: '电工证照片不能为空', trigger: 'change' }
|
||||
],
|
||||
esFile: [
|
||||
{ required: true, message: 'ES资质不能为空', trigger: 'change' }
|
||||
],
|
||||
shFile: [
|
||||
{ required: true, message: 'SH资质不能为空', trigger: 'change' }
|
||||
],
|
||||
practicalExperience: [
|
||||
{ required: true, message: '是否有实操经验不能为空', trigger: 'change' }
|
||||
],
|
||||
batteryLine: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
],
|
||||
experienceFile: [
|
||||
{ required: true, message: '实操经验表单不能为空', trigger: 'change' }
|
||||
],
|
||||
hasQualified: [
|
||||
{ required: true, message: '请选择具备资质', trigger: 'change' }
|
||||
],
|
||||
qualificationForm: [
|
||||
{ required: true, message: '资质申请表单不能为空', trigger: 'change' }
|
||||
],
|
||||
firstCollectionDate: [
|
||||
{ required: true, message: '急救证发证日期不能为空', trigger: 'change' }
|
||||
],
|
||||
firstCollectionExpireDate: [
|
||||
{ required: true, message: '急救证到期日期不能为空', trigger: 'change' }
|
||||
],
|
||||
healthCertificate: [
|
||||
{ required: true, message: '健康证明不能为空', trigger: 'change' }
|
||||
],
|
||||
firstCertificateFile: [
|
||||
{ required: true, message: '急救证不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const levelList = ref([
|
||||
{ title: '资质管理', path: '/qualification' },
|
||||
{ title: 'ESC任务', path: '/qualification/escTask' },
|
||||
{ title: '资质申请', path: '/qualification/escTask/qualificationApplyForm' }
|
||||
])
|
||||
|
||||
const { ruleForm, rules } = toRefs(data)
|
||||
|
||||
// 设置电工证照片
|
||||
const handleSetCertificatePhoto = (filePath) => {
|
||||
console.log('接收电工证照片', filePath)
|
||||
ruleForm.value.beforeCondition.certificatePhoto = filePath
|
||||
}
|
||||
// 设置SH资质
|
||||
const handleSetShFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.shFile = filePath
|
||||
}
|
||||
// 设置ES资质
|
||||
const handleSetESFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.esFile = filePath
|
||||
}
|
||||
// 设置资质表单路径
|
||||
const handleSetQualificationForm = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
ruleForm.value.beforeCondition.qualificationForm = filePath
|
||||
}
|
||||
// 设置实操经验表单
|
||||
const handleSetExperienceFile = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
ruleForm.value.beforeCondition.qualificationForm = filePath
|
||||
}
|
||||
// 设置健康证明
|
||||
const handleSetHealthCertificate = (filePath) => {
|
||||
ruleForm.value.beforeCondition.healthCertificate = filePath
|
||||
}
|
||||
// 设置急救证
|
||||
const handleSetFirstCertificateFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = filePath
|
||||
}
|
||||
// 电工证初领日期选择
|
||||
const handleCollectionDateChange = (val) => {
|
||||
ruleForm.value.beforeCondition.reviewDate = moment(val).add(3, 'years').format('YYYY-MM-DD')
|
||||
}
|
||||
// 急救证发证日期选择
|
||||
const handleFirstCollectionDateChange = (val) => {
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = moment(val).add(3, 'years').format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
// 工号选择事件
|
||||
const selectChanged = (value) => {
|
||||
if (value) {
|
||||
const curUser = allUsers.value.find(item => item.workNo == value)
|
||||
console.log('当前用户信息', curUser)
|
||||
//传入UserId 代表是ESC代替员工申请
|
||||
ruleForm.value.userId = curUser.userId;
|
||||
ruleForm.value.workNo = curUser.workNo;
|
||||
ruleForm.value.nickName = curUser.nickName;
|
||||
ruleForm.value.englishName = curUser.englishName;
|
||||
ruleForm.value.deptId = curUser.deptId;
|
||||
ruleForm.value.sectionId = curUser.sectionId;
|
||||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getAllUser()
|
||||
getBusDependencyData()
|
||||
getDeptTree()
|
||||
getSysSectionData()
|
||||
const id = route.params && route.params.Id
|
||||
const node = route.params && route.params.node;
|
||||
if (id) {
|
||||
ruleForm.value.id = id
|
||||
getQualificationInfo(id, node)
|
||||
}
|
||||
});
|
||||
const getQualificationInfo = (detailId, _node) => {
|
||||
console.log('接收参数', detailId)
|
||||
var _queryParams = {
|
||||
id: detailId,
|
||||
node: _node
|
||||
}
|
||||
getBusUserQualificationDetail(_queryParams).then(res => {
|
||||
console.log('详情', res)
|
||||
if (res.code == 200) {
|
||||
// ruleForm.value = res.data
|
||||
ruleForm.value = {
|
||||
id: res.data.id,
|
||||
qualificationName: res.data.qualificationName,
|
||||
sourceQualificationName: res.data.sourceQualificationName,
|
||||
deptId: res.data.deptId,
|
||||
deptName: res.data.deptName,
|
||||
sectionId: res.data.sectionId,
|
||||
sectionName: res.data.sectionName,
|
||||
workNo: res.data.workNo,
|
||||
nickName: res.data.userName,
|
||||
englishName: res.data.englishName,
|
||||
dependencyId: res.data.dependencyId,
|
||||
dependencyName: res.data.dependencyName,
|
||||
escUserName: res.data.escUserName,
|
||||
createTime: res.data.createTime,
|
||||
state: res.data.state,
|
||||
node: res.data.node,
|
||||
qualificationId: res.data.qualificationId,
|
||||
}
|
||||
ruleForm.value.beforeCondition = JSON.parse(res.data.beforeCondition)
|
||||
nextTick(() => {
|
||||
if (ruleForm.value.beforeCondition.certificatePhoto) certificatePhotoRef.value.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto)
|
||||
if (ruleForm.value.beforeCondition.qualificationForm) qualificationFormRef.value.setFileInfo(ruleForm.value.beforeCondition.qualificationForm)
|
||||
if (ruleForm.value.beforeCondition.shFile) shFileRef.value.setFileInfo(ruleForm.value.beforeCondition.shFile)
|
||||
if (ruleForm.value.beforeCondition.experienceFile) experienceFileRef.value.setFileInfo(ruleForm.value.beforeCondition.experienceFile)
|
||||
if (ruleForm.value.beforeCondition.esFile) esFileRef.value.setFileInfo(ruleForm.value.beforeCondition.esFile)
|
||||
if (ruleForm.value.beforeCondition.healthCertificate) healthCertificateRef.value.setFileInfo(ruleForm.value.beforeCondition.healthCertificate)
|
||||
if (ruleForm.value.beforeCondition.firstCertificateFile) firstCertificateFileRef.value.setFileInfo(ruleForm.value.beforeCondition.firstCertificateFile)
|
||||
});
|
||||
|
||||
console.log('资质详情', ruleForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 用户数据
|
||||
const allUsers = ref([])
|
||||
// 获取所有用户 ,后期可能替换为当前属地下负责的用户
|
||||
const getAllUser = () => {
|
||||
listUser({
|
||||
pageNum: 1,
|
||||
pageSize: 5000
|
||||
}).then(res => {
|
||||
allUsers.value = res.rows
|
||||
})
|
||||
}
|
||||
|
||||
// 属地数据
|
||||
const busDependencyData = ref([])
|
||||
// 获取属地数据
|
||||
const getBusDependencyData = () => {
|
||||
getBusDependencyPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
}).then(response => {
|
||||
if (response.code == 200) {
|
||||
busDependencyData.value = response.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 部门数据
|
||||
const enabledDeptOptions = ref(undefined)
|
||||
// 获取部门数据
|
||||
const getDeptTree = () => {
|
||||
deptTreeSelect().then(res => {
|
||||
enabledDeptOptions.value = filterDisabledDept(JSON.parse(JSON.stringify(res.data)))
|
||||
})
|
||||
}
|
||||
/** 过滤禁用的部门 */
|
||||
const filterDisabledDept = (deptList) => {
|
||||
return deptList.filter(dept => {
|
||||
if (dept.disabled) {
|
||||
return false
|
||||
}
|
||||
if (dept.children && dept.children.length) {
|
||||
dept.children = filterDisabledDept(dept.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// 科室数据
|
||||
const sectionData = ref([])
|
||||
// 获取科室数据
|
||||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push('/qualification/escTask')
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
const submitForm = ruleForm.value
|
||||
submitForm.beforeCondition = JSON.stringify(ruleForm.value.beforeCondition)
|
||||
submitForm.node = 1
|
||||
reApplyBusUserQualification(submitForm).then(res => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("提交成功")
|
||||
router.push('/qualification/escTask')
|
||||
} else {
|
||||
proxy.$modal.msgSuccess(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
font-size: 18px;
|
||||
background: #f8f8f8;
|
||||
|
||||
.el-breadcrumb__item {
|
||||
.el-breadcrumb__separator {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #000000 !important;
|
||||
margin: 0 9px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-redirect {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.link-redirect {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #0090FF;
|
||||
cursor: text;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.clearBoth {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.rootContainer {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
height: calc(100vh - 216px);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.el-card__header {
|
||||
min-height: 50px;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
border-bottom: 1px solid #DCDCDC;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 20px 17px 20px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 20px 20px 0 20px !important;
|
||||
}
|
||||
|
||||
.el-card.is-always-shadow {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.headerTitle {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
background: #e9e9e9;
|
||||
padding: 6px 14px;
|
||||
}
|
||||
|
||||
.applyFormContainer {
|
||||
padding-top: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.submitTool {
|
||||
width: 100%;
|
||||
height: 76px;
|
||||
position: absolute;
|
||||
top: calc(100% - 76px);
|
||||
background: #ffffff;
|
||||
box-shadow: 1px 2px 10px 0 #93939333;
|
||||
text-align: center;
|
||||
line-height: 76px;
|
||||
}
|
||||
|
||||
.cancelApplyBtn {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
background: #ea9f0e;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.cancelApplyBtn:hover {
|
||||
background: #ea9f0e;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.submitApplyBtn {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
background: #4276d1;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.submitApplyBtn:hover {
|
||||
background: #4276d1;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.myRow {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.el-form-item--default {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
|
||||
.el-form-item--label-top .el-form-item__label {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.el-select__wrapper {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.el-checkbox__label {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.el-form-item__error {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.el-radio__inner {
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
}
|
||||
|
||||
.el-radio__label {
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
}
|
||||
</style>
|
|
@ -31,7 +31,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { defineExpose, ref } from 'vue'
|
||||
import { Plus, Delete } from '@element-plus/icons-vue'
|
||||
import { uploadFile } from "@/api/qualification/myQualifications"
|
||||
import pdfIcon from '@/assets/images/pdfIcon.png'
|
||||
|
@ -47,6 +47,18 @@ const dialogImageUrl = ref('')
|
|||
const dialogVisible = ref(false)
|
||||
const suffix = ref('')
|
||||
|
||||
const setFileInfo = (filePath) => {
|
||||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
var suffix = filePath.split('.').pop();
|
||||
fileList.value = [{
|
||||
name: filePath,
|
||||
url: baseUrl + filePath,
|
||||
suffix: suffix
|
||||
}]
|
||||
}
|
||||
|
||||
// 判断是否为图片文件
|
||||
const isImageFile = (suffix) => {
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix?.toLowerCase())
|
||||
|
@ -122,6 +134,10 @@ const handleChange = (file, files) => {
|
|||
// 不需要清空 fileList,因为上传逻辑会处理
|
||||
fileList.value = []
|
||||
}
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
setFileInfo
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
@click="handleReplay(scope.row)">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/qualification/myQualifications/viewDetail/' + scope.row.id" custom
|
||||
<router-link :to="'/qualification/viewDetail/' + scope.row.id" custom
|
||||
v-slot="{ href }">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
</router-link>
|
||||
|
|
|
@ -781,7 +781,7 @@ const handleSubmit = () => {
|
|||
font-size: 16px !important;
|
||||
text-align: left !important;
|
||||
color: #787878 !important;
|
||||
padding: 0 10px 0 60px;
|
||||
padding: 0 10px 0 44px;
|
||||
}
|
||||
|
||||
.myFormItemLable .el-form-item__content {
|
||||
|
@ -790,7 +790,7 @@ const handleSubmit = () => {
|
|||
font-size: 18px !important;
|
||||
text-align: left !important;
|
||||
color: #000000 !important;
|
||||
padding-left: 60px;
|
||||
padding-left: 44px;
|
||||
}
|
||||
|
||||
.el-form-item--label-left .el-form-item__content {
|
||||
|
|
Loading…
Reference in New Issue
Block a user