Browse Source

11482-【CR】【投资系统】增加审批流程- 附件bug

hxy 1 month ago
parent
commit
94d3b1d93d

+ 12 - 1
ruoyi-ui/src/views/invest/components/fileItem.vue

@@ -58,7 +58,14 @@ import {
   downloadFileById,
 } from "@/api/system/file";
 export default {
-  props: {},
+  props: {
+    // 新增:接收外部传入的“是否为详情模式”
+    isDetail: {
+      type: Boolean,
+      default: false
+    },
+    // 原有 props(如果有)...
+  },
   data() {
     return {
       forbid: false,
@@ -70,6 +77,10 @@ export default {
     };
   },
   mounted() {
+    // 初始化时,若为详情模式 → 直接隐藏上传按钮
+    if (this.isDetail) {
+      this.forbid = true;
+    }
     if (this.id) {
       this.getListFileBusinessId(this.id);
     }

+ 5 - 4
ruoyi-ui/src/views/project/approval/audit.vue

@@ -107,8 +107,9 @@
                   class="special-el-form-item"
                 >
                   <fileItem
-                    ref="fileItemLXApply"
+                    ref="fileItemLXApply1"
                     :id="formLXApply.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
               </el-form>
@@ -1658,9 +1659,9 @@ export default {
             this.formType=2;
           }
           setTimeout(() => {
-            that.$refs.fileItemLXApply.handleButton();
-            that.$refs.fileItemLXApply.fileList = [];
-            that.$refs.fileItemLXApply.getListFileBusinessId(
+            that.$refs.fileItemLXApply1.handleButton();
+            that.$refs.fileItemLXApply1.fileList = [];
+            that.$refs.fileItemLXApply1.getListFileBusinessId(
               that.formLXApply.id
             );
           }, 300);

+ 1 - 0
ruoyi-ui/src/views/project/approval/detail.vue

@@ -115,6 +115,7 @@
                   <fileItem
                     ref="fileItemLXApply"
                     :id="formLXApply.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
               </el-form>

+ 5 - 4
ruoyi-ui/src/views/project/decision/audit.vue

@@ -101,8 +101,9 @@
                   class="special-el-form-item"
                 >
                   <fileItem
-                    ref="fileItemTJApply"
+                    ref="fileItemTJApply1"
                     :id="formTJApply.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
               </el-form>
@@ -1681,9 +1682,9 @@ export default {
             this.formType=4;
           }
           setTimeout(() => {
-            that.$refs.fileItemTJApply.handleButton();
-            that.$refs.fileItemTJApply.fileList = [];
-            that.$refs.fileItemTJApply.getListFileBusinessId(
+            that.$refs.fileItemTJApply1.handleButton();
+            that.$refs.fileItemTJApply1.fileList = [];
+            that.$refs.fileItemTJApply1.getListFileBusinessId(
               that.formTJApply.id
             );
           }, 300);

+ 1 - 0
ruoyi-ui/src/views/project/decision/detail.vue

@@ -104,6 +104,7 @@
                   <fileItem
                     ref="fileItemTJApply"
                     :id="formTJApply.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
 <!--                <el-form-item

+ 3 - 2
ruoyi-ui/src/views/project/flowBase.vue

@@ -27,7 +27,6 @@
 </template>
 
 <script>
-import axios from 'axios';
 import {getFlowBaseInfo} from "../../api/project/flowBase";
 import {getScoringListById,
   listMeeting} from "@/api/invest/meeting";
@@ -65,7 +64,9 @@ export default {
           // 获取第一条数据的某个字段,先判断数组是否有数据
           if (response.rows && response.rows.length > 0) {
             this.procDefId = response.rows[0].procDefId;
-            this.getMettingId()
+            if(this.procDefId.includes('dgt-project') || this.procDefId.includes('dgt-decision')) {
+              this.getMettingId()
+            }
           }
           //console.log('接收到的 信息:', response.rows);
         })

+ 5 - 4
ruoyi-ui/src/views/project/investOpp/audit.vue

@@ -286,7 +286,7 @@
                   <fileItem
                     ref="fileItem"
                     :id="form.id"
-                    @getFileList="getFileList"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
               </el-col>
@@ -511,12 +511,12 @@
             <el-row :gutter="20">
               <el-col>
                 <el-form-item label="BP" prop="bpFile" class="special-el-form-item">
-                  <fileItem ref="bpFileItem" :id="form.id" @getFileList="getBPFileList" ></fileItem>
+                  <fileItem ref="bpFileItem" :id="form.id" :is-detail="true"></fileItem>
                 </el-form-item>
               </el-col>
               <el-col>
                 <el-form-item label="其他附件" prop="otherFile" class="special-el-form-item">
-                  <fileItem ref="otherFileItem" :id="form.id" @getFileList="getOtherFileList"></fileItem>
+                  <fileItem ref="otherFileItem" :id="form.id" :is-detail="true"></fileItem>
                 </el-form-item>
               </el-col>
               <el-col>
@@ -584,7 +584,7 @@
         :model="flowBaseInfo"
         label-width="120px"
       >
-        <el-form-item label="审批意见" prop="comment">
+        <el-form-item label="审批意见" prop="comment" v-if="form.taskDefKey!='softwareDept'">
           <el-input
             maxlength="200"
             rows="4"
@@ -859,6 +859,7 @@ export default {
       }
       investmentOpportunityComplete(params).then(response => {
         this.$modal.msgSuccess(response.msg);
+        this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
         this.goMyTask();
       });
       /*if (this.taskForm && this.formKeyExist) {

+ 7 - 13
ruoyi-ui/src/views/project/investOpp/detail.vue

@@ -92,11 +92,6 @@
                 >
                   {{ form.investHead ? form.investHead : "请选择项目负责人" }}
                 </div>
-<!--                <selecDept
-                  ref="selecDepts"
-                  @getDeptUserInfo="getDeptUserInfo"
-                  :deptId="deptId"
-                ></selecDept>-->
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -286,7 +281,7 @@
                   <fileItem
                     ref="fileItem"
                     :id="form.id"
-                    @getFileList="getFileList"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
               </el-col>
@@ -511,12 +506,12 @@
             <el-row :gutter="20">
               <el-col>
                 <el-form-item label="BP" prop="bpFile" class="special-el-form-item">
-                  <fileItem ref="bpFileItem" :id="form.id" @getFileList="getBPFileList" ></fileItem>
+                  <fileItem ref="bpFileItem" :id="form.id" :is-detail="true" ></fileItem>
                 </el-form-item>
               </el-col>
               <el-col>
                 <el-form-item label="其他附件" prop="otherFile" class="special-el-form-item">
-                  <fileItem ref="otherFileItem" :id="form.id" @getFileList="getOtherFileList"></fileItem>
+                  <fileItem ref="otherFileItem" :id="form.id" :is-detail="true"></fileItem>
                 </el-form-item>
               </el-col>
               <el-col>
@@ -581,13 +576,12 @@
   </div>
 </template>
 <script>
-import {getPool,getInvestInfo, investmentOpportunityComplete} from "@/api/project/investOpp/pool";
+import {getInvestInfo, investmentOpportunityComplete} from "@/api/project/investOpp/pool";
 import { listChannel } from "@/api/invest/channel";
 import fileItem from "../../invest/components/fileItem";
 import flowBase from "../flowBase.vue";
 import { mapGetters } from "vuex";
-import channelItem from "../../invest/components/channelItem.vue";
-import selecDept from "../../invest/components/selecDept.vue";
+
 
 export default {
   props: {
@@ -781,14 +775,14 @@ export default {
         this.fileList = [];
       }
     },
-    getBPFileList(fileList) {
+    /*getBPFileList(fileList) {
       if (fileList && fileList.length > 0) {
         this.fileListBP = fileList;
         this.$refs.form.clearValidate(["bpFile"]);
       } else {
         this.fileList = [];
       }
-    },
+    },*/
     getOtherFileList(fileList) {
       if (fileList && fileList.length > 0) {
         this.fileListOther = fileList;

+ 2 - 0
ruoyi-ui/src/views/project/investOpp/edit.vue

@@ -827,6 +827,7 @@ export default {
         if (this.form.id != null) {
           investmentOpportunityComplete(params).then((response) => {
             this.$modal.msgSuccess("审批成功");
+            this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
             setTimeout(() => {
               that.goBack();
             }, 1500);
@@ -881,6 +882,7 @@ export default {
               }
               investmentOpportunityComplete(params).then((response) => {
                 this.$modal.msgSuccess("提交成功");
+                this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
                 setTimeout(() => {
                   that.goBack();
                 }, 1500);

+ 1 - 0
ruoyi-ui/src/views/project/investigate/audit.vue

@@ -158,6 +158,7 @@
                   <fileItem
                     ref="fileItems1"
                     :id="dueForm.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
                 <el-form-item label="描述" class="special-el-form-item">

+ 2 - 0
ruoyi-ui/src/views/project/investigate/detail.vue

@@ -159,6 +159,7 @@
                   <fileItem
                     ref="fileItems1"
                     :id="dueForm.id"
+                    :is-detail="true"
                   ></fileItem>
                 </el-form-item>
                 <el-form-item label="描述" class="special-el-form-item">
@@ -202,6 +203,7 @@
                     <fileItem
                       ref="dueAllreportFileItems"
                       :id="item.id"
+                      :is-detail="true"
                     ></fileItem>
                   </el-form-item>
 <!--                  <el-form-item label="备注" class="special-el-form-item">