优化审批流程显示及体验,提升用户操作效率。

This commit is contained in:
zmj 2024-05-30 13:46:14 +08:00
parent e3564727bc
commit c261731511
5 changed files with 65 additions and 23 deletions

View File

@ -1,7 +1,23 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw" @close='hdClose'>
<el-card>
<el-card v-if="isGenerateForm">
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item v-for="(item, value) in fromValue" :label="item.label" label-align="left"
align="left">
{{ item.text || item.value }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border v-if='formData.extends?.annex'>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex='formData.extends.annex'></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card v-else>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item v-for="(item, value) in fromValue" :label="item" label-align="left" align="left">
@ -14,6 +30,7 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header>审批流程</template>
<el-descriptions :column="3" border>
@ -146,34 +163,40 @@ const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
const showBackDialog = ref(false)
const isGenerateForm = ref(false)
let fromValue = ref({})
const getFormValue = () => {
if (props.typeName == '请假') fromValue.value = qja;
if (props.typeName == '出差') fromValue.value = cca;
if (props.typeName == '外出') fromValue.value = wca;
if (props.typeName == '加班') fromValue.value = jba;
if (props.typeName == '会议室预定') fromValue.value = hysyda;
if (props.typeName == '公文流转') fromValue.value = gwlza;
if (props.typeName == '物品维修') fromValue.value = wpwxa;
if (props.typeName == '资质借用') fromValue.value = zzjya;
if (props.typeName == '用章') fromValue.value = yza;
if (props.typeName == '用车') fromValue.value = yca;
if (props.typeName == '用车归还') fromValue.value = ycgha;
if (props.typeName == '借款') fromValue.value = jka;
if (props.typeName == '付款') fromValue.value = fka;
if (props.typeName == '奖励') fromValue.value = jla;
if (props.typeName == '采购') fromValue.value = cga;
if (props.typeName == '活动经费') fromValue.value = hdjfa;
if (props.typeName == '入职') fromValue.value = rza;
if (props.typeName == '转正') fromValue.value = zza;
if (props.typeName == '离职') fromValue.value = lza;
if (props.typeName == '转岗') fromValue.value = zga;
if (props.typeName == '招聘需求') fromValue.value = zpxqa;
if (props.typeName == '通用审批') fromValue.value = tyspa;
else if (props.typeName == '出差') fromValue.value = cca;
else if (props.typeName == '外出') fromValue.value = wca;
else if (props.typeName == '加班') fromValue.value = jba;
else if (props.typeName == '会议室预定') fromValue.value = hysyda;
else if (props.typeName == '公文流转') fromValue.value = gwlza;
else if (props.typeName == '物品维修') fromValue.value = wpwxa;
else if (props.typeName == '资质借用') fromValue.value = zzjya;
else if (props.typeName == '用章') fromValue.value = yza;
else if (props.typeName == '用车') fromValue.value = yca;
else if (props.typeName == '用车归还') fromValue.value = ycgha;
else if (props.typeName == '借款') fromValue.value = jka;
else if (props.typeName == '付款') fromValue.value = fka;
else if (props.typeName == '奖励') fromValue.value = jla;
else if (props.typeName == '采购') fromValue.value = cga;
else if (props.typeName == '活动经费') fromValue.value = hdjfa;
else if (props.typeName == '入职') fromValue.value = rza;
else if (props.typeName == '转正') fromValue.value = zza;
else if (props.typeName == '离职') fromValue.value = lza;
else if (props.typeName == '转岗') fromValue.value = zga;
else if (props.typeName == '招聘需求') fromValue.value = zpxqa;
else if (props.typeName == '通用审批') fromValue.value = tyspa;
else {
fromValue.value = formData.extends
isGenerateForm.value = true
}
console.log(fromValue.value)
}
getFormValue()
//
@ -190,6 +213,8 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
getFormValue()
}

View File

@ -127,6 +127,7 @@ import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
import feedback from '@/utils/feedback'
const emit = defineEmits(['close'])
@ -203,6 +204,10 @@ const handleClose = () => {
//
const handCheck = async () => {
if (form.check == 2 && !form.content) return feedback.msgError("请填写审批意见")
if (formData.check_admin_ids && formData.record[formData.record.length - 1].check_user_id == form.check_admin_ids) {
return feedback.msgError("下一级审批人不能是发起审批人")
}
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...form })

View File

@ -203,6 +203,10 @@ const handleClose = () => {
//
const handCheck = async () => {
if (form.check == 2 && !form.content) return feedback.msgError("请填写审批意见")
if (formData.check_admin_ids && formData.record[formData.record.length - 1].check_user_id == form.check_admin_ids) {
return feedback.msgError("下一级审批人不能是发起审批人")
}
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...form })

View File

@ -204,6 +204,10 @@ const handleClose = () => {
//
const handCheck = async () => {
if (form.check == 2 && !form.content) return feedback.msgError("请填写审批意见")
if (formData.check_admin_ids && formData.record[formData.record.length - 1].check_user_id == form.check_admin_ids) {
return feedback.msgError("下一级审批人不能是发起审批人")
}
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...form })

View File

@ -217,6 +217,10 @@ const handleClose = () => {
//
const handCheck = async () => {
if (form.check == 2 && !form.content) return feedback.msgError("请填写审批意见")
if (formData.check_admin_ids && formData.record[formData.record.length - 1].check_user_id == form.check_admin_ids) {
return feedback.msgError("下一级审批人不能是发起审批人")
}
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...form })