对接标签审批

This commit is contained in:
wangchengming 2025-07-08 23:14:59 +08:00
parent 7f0f0f3664
commit ed9e18fa01
4 changed files with 584 additions and 16 deletions

View File

@ -263,16 +263,30 @@ export const dynamicRoutes = [
]
},
{
path: '/labelManage/labelEscApproval/approvalDetail',
path: '/labelManage/labelEscApprovalForm',
component: Layout,
hidden: true,
permissions: ['labelManage:labelEscApproval:approvalDetail'],
permissions: ['labelManage:labelEscApproval:approval'],
children: [
{
path: '',
path: ':Id(\\d+)?',
component: () => import('@/views/labelManage/escApproval/approvalForm'),
name: 'labelEscApprovalForm',
meta: { title: '标签ESC审批', activeMenu: '/labelManage/labelEscApproval' }
}
]
},
{
path: '/labelManage/labelEscApprovalDetail',
component: Layout,
hidden: true,
permissions: ['labelManage:labelEscApproval:detail'],
children: [
{
path: ':Id(\\d+)?',
component: () => import('@/views/labelManage/escApproval/approvalDetail'),
name: 'labelEscApprovalDetail',
meta: { title: '标签ESC审批', activeMenu: '/labelManage/labelEscApproval' }
meta: { title: '标签ESC审批详情', activeMenu: '/labelManage/labelEscApproval' }
}
]
},
@ -280,7 +294,7 @@ export const dynamicRoutes = [
path: '/labelManage/adminApproval/approvalDetail',
component: Layout,
hidden: true,
permissions: ['labelManage:adminApproval:approvalDetail'],
permissions: ['labelManage:adminApproval:approval'],
children: [
{
path: '',

View File

@ -0,0 +1,552 @@
<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>申请标签{{ detailForm.labelName }}</span>
</div>
</template>
<el-form ref="ruleFormRef" :model="ruleForm" label-position="left">
<!-- <div class="headerTitle">基本信息</div> -->
<div class="applyFormContainer">
<el-row class="myRow" :gutter="20">
<el-col :span="20">
<el-row class="myRow" :gutter="20">
<el-col :span="8">
<el-form-item label="当前标签:" prop="targetQualification">
{{ detailForm.sourceLabelName ? detailForm.sourceLabelName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门:" prop="departmentName">
{{ detailForm.deptName ? detailForm.deptName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="科室:" prop="officeName">
{{ detailForm.sectionName ? detailForm.sectionName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工工号:" prop="employeeNumber">
{{ detailForm.workNo ? detailForm.workNo : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(中文):" prop="employeeChineseName">
{{ detailForm.userName ? detailForm.userName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(英文):" prop="employeeEnglishName">
{{ detailForm.englishName ? detailForm.englishName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地:" prop="localityName">
{{ detailForm.dependencyName ? detailForm.dependencyName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地ESC:" prop="localityName">
{{ detailForm.escUserName ? detailForm.escUserName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:" prop="employeeEnglishName">
{{ detailForm.createTime ? detailForm.createTime : '-' }}
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="4">
<el-form-item label="审批状态" label-position="top" class="myFormItemLable">
<template v-if="detailForm.state">
<el-text v-if="detailForm.state == 1 && detailForm.node == 0" type="info"
class="infoinfoText">待审核</el-text>
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
class="infoinfoText">待审核</el-text>
<el-text v-if="detailForm.state == 1 && detailForm.node == 2" type="info"
class="infoinfoText">待标签管理员审核</el-text>
<el-text v-if="detailForm.state == 2" type="success"
class="successText">通过</el-text>
<el-text v-if="detailForm.state == 9" type="danger"
class="dangerText">驳回</el-text>
</template>
<template v-else>-</template>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<el-form ref="ruleFormRef" :model="ruleForm" label-position="top">
<div class="headerTitle" v-if="detailForm.labelId">申请信息</div>
<div class="applyFormContainer" v-if="detailForm.labelId">
<el-table :data="detailForm.userQualificationCertificateList" style="width: 100%">
<el-table-column prop="qualificationName" label="资质名称" width="100" />
<el-table-column prop="certificateUrl" label="资质证书" align="center">
<template #default="scope">
<el-image v-if="scope.row.certificateUrl"
style="width: 70px; height: 44px;line-height: 50px;"
:src="baseUrl + scope.row.certificateUrl" fit="fill" />
<span v-else>请在"高压资质培训信息"上传资质证书</span>
</template>
</el-table-column>
<el-table-column prop="status" label="是否过期" width="120">
<template #default="scope">
<el-text v-if="scope.row.status == 1 && scope.row.certificateUrl" type="success"
class="successText">正常</el-text>
<el-text v-else-if="scope.row.status == 2 && scope.row.certificateUrl" type="danger"
class="dangerText">过期</el-text>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="startTime" label="有效开始日期" width="150">
<template #default="scope">
<span v-if="scope.row.startTime"> {{
moment(scope.row.startTime).format('YYYY-MM-DD')
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="expireTime" label="到期日期" width="130">
<template #default="scope">
<span v-if="scope.row.expireFlag == 0">长期</span>
<template v-else>
<span v-if="scope.row.expireTime"> {{
moment(scope.row.expireTime).format('YYYY-MM-DD')
}}</span>
<span v-else>-</span>
</template>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<div class="headerTitle">审批记录</div>
<div class="applyFormContainer">
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
<el-table-column label="序号" width="160">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="checkNode" label="节点名称" width="260">
<template #default="scope">
<span v-if="scope.row.checkNode == 0 && scope.row.checkStatus == 1">提交申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 1">提交申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 2">ESC审核通过</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 9">ESC驳回</span>
<span v-if="scope.row.checkNode == 2 && scope.row.checkStatus == 2">培训中心审核通过</span>
<span v-if="scope.row.checkNode == 2 && scope.row.checkStatus == 9">培训中心驳回</span>
<span v-if="scope.row.checkNode == 0 && scope.row.checkStatus == 3">用户重新申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 3">ESC代替用户重新申请</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="审批意见" min-width="100" align="left" />
<el-table-column prop="createTime" label="审批时间" width="230">
<template #default="scope">
<span v-if="scope.row.createTime"> {{ scope.row.createTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
</el-table>
</div>
<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="state">
<el-radio-group v-model="ruleForm.state" @change="handleApplyStateChange">
<el-radio value="9">驳回</el-radio>
<el-radio value="2">通过</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="18">
<el-form-item label="审批意见" prop="remark">
<el-input v-model="ruleForm.remark" style="width: 100%" :rows="5" type="textarea"
placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
</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 } from 'vue'
import { getBusUserLabelDetail, getBusUserrLabelRecord, updateStatusBusUserLabel } from "@/api/labelManage/labelManage"
import moment from 'moment'
const route = useRoute()
const levelList = ref([
{ title: '标签管理', path: '/labelManage' },
{ title: 'ESC审批', path: '/labelManage/labelEscApproval' },
{ title: '审批', path: '/labelManage/labelEscApproval/approvalDetail' }
])
const { proxy } = getCurrentInstance()
const data = reactive({
detailForm: {},
ruleForm: {
state: '',
remark: ''
},
rules: {
state: [{ required: true, message: "请选择审批结果", trigger: "change" }],
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
},
})
const { ruleForm, detailForm, rules } = toRefs(data)
//
onMounted(() => {
const id = route.params && route.params.Id
if (id) {
console.log('接收id', id)
ruleForm.value.id = id
getDetailInfo(id)
getLabelApprovalRecord(id)
} else {
ruleForm.value.id = null
}
});
//
const getDetailInfo = (_id) => {
getBusUserLabelDetail(_id).then(res => {
if (res.code == 200) {
detailForm.value = res.data
console.log('标签详情', detailForm.value)
}
})
}
const baseUrl = import.meta.env.VITE_APP_BASE_API
//
const tableData = ref([])
//
const getLabelApprovalRecord = (_id) => {
var queryParamsRecord = {
pageIndex: 1,
pageSize: 50,
userLabelId: _id
}
getBusUserrLabelRecord(queryParamsRecord).then(res => {
console.log('审批记录', res.data.list)
if (res.code == 200) tableData.value = res.data.list
})
}
//
const handleApplyStateChange = (value) => {
if (value == 2) ruleForm.value.remark = '同意'
if (value == 9) ruleForm.value.remark = ''
}
const handleCancel = () => {
proxy.resetForm("ruleFormRef")
router.push({
path: '/labelManage/labelEscApproval'
})
}
const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
ruleForm.value.node = 1
updateStatusBusUserLabel(ruleForm.value).then(res => {
if (res.code == 200) {
router.push({
path: '/labelManage/labelEscApproval'
})
} 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: 0px 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;
}
.infoinfoText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #DD9200;
}
.successText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #00B32A;
}
.dangerText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #E13434;
}
.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-left .el-form-item__label {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
text-align: left;
color: #787878;
padding: 0 10px 0 0;
}
.myFormItemLable {
padding-top: 22px;
}
.myFormItemLable .el-form-item__label {
font-family: Microsoft YaHei !important;
font-weight: 400 !important;
font-size: 16px !important;
text-align: left !important;
color: #787878 !important;
padding: 0 10px 0 24px;
}
.myFormItemLable .el-form-item__content {
font-family: Arial !important;
font-weight: 400 !important;
font-size: 18px !important;
text-align: left !important;
color: #000000 !important;
padding-left: 24px;
}
.el-form-item--label-left .el-form-item__content {
font-family: Arial;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.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-form-item--label-top .el-form-item__content {
font-family: Arial;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-form-item--label-top .el-textarea__inner {
font-family: Arial;
font-weight: 400;
font-size: 18px;
color: #000000;
}
.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-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>

View File

@ -25,10 +25,10 @@
</el-select>
</el-form-item>
<el-form-item style="margin-right: 10px;">
<el-button v-if="!unfoldFlag" type="text" class="foladText" @click="handleFlod">展开
<el-button v-if="!unfoldFlag" text class="foladText" @click="handleFlod">展开
<svg-icon icon-class="unfold" />
</el-button>
<el-button v-else type="text" class="foladText" @click="handleFlod">折叠
<el-button v-else text class="foladText" @click="handleFlod">折叠
<svg-icon icon-class="packUp" />
</el-button>
</el-form-item>
@ -85,13 +85,14 @@
<el-table-column label="操作" fixed="right" align="center" width="100">
<template #default="scope">
<el-button type="primary" v-if="scope.row.state == 1 && scope.row.node == 1" text
class="replayTextBtn" @click="handleApproval">审批</el-button>
<el-button type="primary" text class="replayTextBtn" v-else @click="handleView">查看</el-button>
class="replayTextBtn" @click="handleApproval(scope.row)">审批</el-button>
<el-button type="primary" text class="replayTextBtn" v-else
@click="handleView(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageIndex"
v-model:limit="queryParams.pageSize" @pagination="getBusUserLabelPageList" />
</div>
</div>
</template>
@ -205,11 +206,12 @@ const resetQuery = () => {
handleQuery()
}
const handleView = () => {
router.push('/labelManage/labelEscApproval/approvalDetail')
const handleView = (record) => {
router.push('/labelManage/labelEscApprovalForm/' + record.id)
}
const handleApproval = () => {
router.push('/labelManage/labelEscApproval/approvalDetail')
const handleApproval = (record) => {
console.log('fsafasf', record)
router.push('/labelManage/labelEscApprovalForm/' + record.id)
}
</script>
<style lang='scss'>

View File

@ -90,7 +90,7 @@
</div>
</el-form>
<el-form ref="beforeConditionInfoRef" label-position="top">
<div class="headerTitle">申请信息</div>
<div class="headerTitle" v-if="detailForm.labelId">申请信息</div>
<div class="applyFormContainer" v-if="detailForm.labelId">
<el-table :data="detailForm.userQualificationCertificateList" style="width: 100%">
<el-table-column prop="qualificationName" label="资质名称" width="100" />