Browse Source

归档节点前,必须传入审计附件

main
buaixuexideshitongxue 1 month ago
parent
commit
817e454585
  1. 4
      src/components/reportAudit/end.vue
  2. 18
      src/views/report/edit/controlPrice.vue

4
src/components/reportAudit/end.vue

@ -7,7 +7,7 @@ import {getList,save,delCommon} from '@/api/commonOpinions';
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import useUserStore from "@/stores/modules/user"; import useUserStore from "@/stores/modules/user";
const props = defineProps(['reportId','node','isAudit',"isWarning"]) const props = defineProps(['reportId','node','isAudit',"isWarning",'dialog'])
const emits = defineEmits(['submitFeedback',"closeFun"]) const emits = defineEmits(['submitFeedback',"closeFun"])
const catchSotre = useCatchStore(); const catchSotre = useCatchStore();
@ -73,7 +73,7 @@ const submitFun = async ()=>{
</script> </script>
<template> <template>
<el-dialog title="提交审核" @close="closeAdd"> <el-dialog title="提交审核" @close="closeAdd" :model-value="props.dialog">
<el-form ref="auditForm" :model="formData" :label-width="120"> <el-form ref="auditForm" :model="formData" :label-width="120">
<el-form-item label="通知报审人" prop="isInform"> <el-form-item label="通知报审人" prop="isInform">
<el-radio-group v-model="formData.isInform"> <el-radio-group v-model="formData.isInform">

18
src/views/report/edit/controlPrice.vue

@ -498,6 +498,13 @@ const removeFun = async () => {
// //
const approveFun = async () => { const approveFun = async () => {
debugger debugger
if (['first','second'].includes(formData.value.project.node)){
if (!hasAuditAttachment()) {
feedback.msgWarning("请上传【审核附件】");
activeName.value = "audit";
return;
}
}
if (!['initial'].includes(formData.value.project.node)) { if (!['initial'].includes(formData.value.project.node)) {
const promise = await saveFun(); const promise = await saveFun();
if (promise) { if (promise) {
@ -511,6 +518,11 @@ const approveFun = async () => {
// //
const endFun =async ()=>{ const endFun =async ()=>{
debugger debugger
if (!hasAuditAttachment()) {
feedback.msgWarning("请回退并上传【审核附件】");
activeName.value = "audit";
return;
}
try { try {
await formDataRef.value.validate() await formDataRef.value.validate()
} catch (error) { } catch (error) {
@ -620,6 +632,7 @@ const fileDialogClose = ()=>{
// //
function addFileFun(val) { function addFileFun(val) {
debugger
let show = true; let show = true;
switch (val) { switch (val) {
case "initial": case "initial":
@ -847,6 +860,11 @@ watch(()=>formData.value.review.thirdlyMoney,(val)=>{
},{deep:true}) },{deep:true})
function hasAuditAttachment() {
const auditRows = formData.value?.files?.audit || [];
// fileData
return auditRows.some(row => Array.isArray(row.fileData) && row.fileData.length > 0);
}
</script> </script>

Loading…
Cancel
Save