From c2617315111da53eab95b5ea2561b39ddb456fcc Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Thu, 30 May 2024 13:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A1=E6=89=B9=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=98=BE=E7=A4=BA=E5=8F=8A=E4=BD=93=E9=AA=8C=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E7=94=A8=E6=88=B7=E6=93=8D=E4=BD=9C=E6=95=88?= =?UTF-8?q?=E7=8E=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oa_Initiate/detail.vue | 71 +++++++++++++++++-------- src/views/oa_invoice_apply/detail.vue | 5 ++ src/views/oa_invoice_copy/detail.vue | 4 ++ src/views/oa_invoice_deal/detail.vue | 4 ++ src/views/oa_invoice_invoice/detail.vue | 4 ++ 5 files changed, 65 insertions(+), 23 deletions(-) diff --git a/src/views/oa_Initiate/detail.vue b/src/views/oa_Initiate/detail.vue index 5084d01..273512e 100644 --- a/src/views/oa_Initiate/detail.vue +++ b/src/views/oa_Initiate/detail.vue @@ -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() + } diff --git a/src/views/oa_invoice_apply/detail.vue b/src/views/oa_invoice_apply/detail.vue index 2f34612..d5a169e 100644 --- a/src/views/oa_invoice_apply/detail.vue +++ b/src/views/oa_invoice_apply/detail.vue @@ -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 }) diff --git a/src/views/oa_invoice_copy/detail.vue b/src/views/oa_invoice_copy/detail.vue index 9aebc40..d0e0a56 100644 --- a/src/views/oa_invoice_copy/detail.vue +++ b/src/views/oa_invoice_copy/detail.vue @@ -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 }) diff --git a/src/views/oa_invoice_deal/detail.vue b/src/views/oa_invoice_deal/detail.vue index 239329d..982a060 100644 --- a/src/views/oa_invoice_deal/detail.vue +++ b/src/views/oa_invoice_deal/detail.vue @@ -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 }) diff --git a/src/views/oa_invoice_invoice/detail.vue b/src/views/oa_invoice_invoice/detail.vue index 7eb1d09..a30e357 100644 --- a/src/views/oa_invoice_invoice/detail.vue +++ b/src/views/oa_invoice_invoice/detail.vue @@ -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 })