浏览代码

fix: 修改bug

shiyanyu 6 天之前
父节点
当前提交
227e9f6eee

+ 20 - 1
src/components/task/taskDetail.vue

@@ -100,6 +100,13 @@
             :workflow-data.sync="workflowData"
           />
         </el-tab-pane>
+        <el-tab-pane label="消息通知" name="messageNotify">
+          <messageNotifyTab
+            :id="actualProject.id"
+            ref="messageNotifyTab"
+            :selected-project="actualProject"
+          />
+        </el-tab-pane>
       </el-tabs>
     </div>
   </el-dialog>
@@ -115,10 +122,11 @@
   import workPlanTab from './taskComponents/workPlanTab.vue'
   import materialTab from './taskComponents/materialTab.vue'
   import surveyTab from './taskComponents/surveyTab.vue'
-  import workflowTab from './taskComponents/workflowTab.vue'
+  import workflowTab from './mounTaskComponents/workflowTab.vue'
   import auditNoticeTab from './taskComponents/auditNoticeTab.vue'
   import discussionTab from './taskComponents/discussionTab.vue'
   import conclusionTab from './taskComponents/conclusionTab.vue'
+  import messageNotifyTab from './mounTaskComponents/messageNotify.vue'
   import { taskMixin } from '@/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js'
   import { getWhCateList, getDocList } from '@/api/auditReviewDocManage.js'
   export default {
@@ -132,6 +140,7 @@
       auditNoticeTab,
       discussionTab,
       conclusionTab,
+      messageNotifyTab,
     },
     mixins: [taskMixin],
     props: {
@@ -292,6 +301,16 @@
             }
           })
         }
+
+        // 选中消息通知时,触发子组件加载(按 projectId)
+        if (this.activeTab === 'messageNotify') {
+          this.$nextTick(() => {
+            const child = this.$refs.messageNotifyTab
+            if (child && typeof child.getNoticeList === 'function') {
+              child.getNoticeList()
+            }
+          })
+        }
       },
       // 获取监审通知数据
       async getDocumentData(data) {

+ 6 - 1
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -725,7 +725,12 @@
 
       // 生成文书
       handleGenerateDocument() {
-        this.documentDialogTitle = '添加监审通知书'
+        const activeType = this.documentData.documentTypes.find(
+          (t) => String(t.id) === String(this.activeDocumentTypeId)
+        )
+        this.documentDialogTitle = `添加${
+          activeType?.documentName || '监审文书'
+        }`
         this.documentDialogVisible = true
         this.activeView = 'form'
         this.costDocumentTemplateFiles = []

+ 2 - 4
src/views/costAudit/auditInfo/auditManage/index.vue

@@ -112,9 +112,7 @@
                 任务详情
               </el-button>
               <el-button
-                v-if="
-                  scope.row.status != '300' && scope.row.currentNode != 'gd'
-                "
+                v-if="scope.row.currentNode != 'gd'"
                 type="text"
                 @click="handleOpenMainDetails(scope.row)"
               >
@@ -483,7 +481,7 @@
       },
 
       handleOpenMainDetails(project) {
-        // console.log('project', project)
+        console.log('project', project)
         this.selectedProject = project
         this.mainDetailsVisible = true
       },

+ 53 - 8
src/views/costAudit/auditInfo/auditManage/mainDetails.vue

@@ -11,15 +11,24 @@
       <!-- 操作按钮区域 -->
       <div class="btn-group">
         <div class="process-actions">
-          <el-button type="primary" @click="handleNextStep">
+          <el-button
+            type="primary"
+            :disabled="isStatus300"
+            @click="handleNextStep"
+          >
             流转下一步
           </el-button>
-          <el-button type="primary" @click="handlePrevStep">
+          <el-button
+            type="primary"
+            :disabled="isStatus300"
+            @click="handlePrevStep"
+          >
             退回上一步
           </el-button>
           <el-button
             v-if="currentNode === 'cjbg'"
             type="primary"
+            :disabled="isStatus300"
             @click="handleAddTask"
           >
             办结任务
@@ -36,6 +45,7 @@
               v-if="currentNode === 'yjfk'"
               type="primary"
               icon="el-icon-s-flag"
+              :disabled="isStatus300"
               @click="handleFh"
             >
               复核
@@ -51,6 +61,7 @@
             :project="project"
             :current-node="currentNode"
             :current-status="currentStatus"
+            :is-view="isStatus300"
           />
         </el-tab-pane>
         <el-tab-pane
@@ -69,7 +80,7 @@
             :current-status="currentStatus"
             :project-name="projectName"
             :audit-object="auditObject"
-            :is-editable="currentNode === 'jtsy'"
+            :is-editable="!isStatus300 && currentNode === 'jtsy'"
           />
         </el-tab-pane>
         <el-tab-pane
@@ -82,7 +93,7 @@
             :active="activeTab === 'costAudit'"
             :current-node="currentNode"
             :current-status="currentStatus"
-            :is-editable="currentNode === 'cjbg'"
+            :is-editable="!isStatus300 && currentNode === 'cjbg'"
             @saved="handleConclusionSaved"
           />
         </el-tab-pane>
@@ -122,7 +133,13 @@
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="showProcessDialog = false">取消</el-button>
-        <el-button type="primary" @click="submitProcess">确定</el-button>
+        <el-button
+          type="primary"
+          :disabled="isStatus300"
+          @click="submitProcess"
+        >
+          确定
+        </el-button>
       </div>
     </el-dialog>
     <el-dialog
@@ -156,7 +173,9 @@
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="showFhDialog = false">取消</el-button>
-        <el-button type="primary" @click="submitFh">发送</el-button>
+        <el-button type="primary" :disabled="isStatus300" @click="submitFh">
+          发送
+        </el-button>
       </div>
     </el-dialog>
   </div>
@@ -184,7 +203,7 @@
       },
       project: {
         type: Object,
-        default: () => {},
+        default: () => ({}),
       },
       id: {
         type: [String, Number],
@@ -232,6 +251,11 @@
       }
     },
     computed: {
+      isStatus300() {
+        // 弹窗关闭/返回时父组件可能会把 project 置为 null,需做空值保护
+        const status = this.project && this.project.status
+        return String(status) === '300'
+      },
       dialogTitle() {
         // 基础标题
         let baseTitle = ''
@@ -290,6 +314,13 @@
           })
         }
       },
+      // drawerVisible 变化时,同步回写父组件,并在关闭时重置内部弹窗状态
+      drawerVisible(newVal) {
+        this.$emit('update:visible', newVal)
+        if (!newVal) {
+          this.resetInnerDialogs()
+        }
+      },
       // 监听currentNode变化,如果弹窗已打开,更新标签页并重新获取按钮数据
       currentNode(newVal, oldVal) {
         if (this.drawerVisible && this.id && newVal && newVal !== oldVal) {
@@ -336,6 +367,18 @@
       }
     },
     methods: {
+      // 关闭主弹窗时,重置内部二级弹窗/临时状态,避免残留遮挡
+      resetInnerDialogs() {
+        this.showProcessDialog = false
+        this.showFhDialog = false
+        this.showSupplementDialog = false
+        this.showAbortDialog = false
+        this.showRejectDialog = false
+        this.currentProcessType = ''
+        this.processParams = {
+          content: '',
+        }
+      },
       // 根据 currentNode 和 currentStatus 设置活动标签页
       setActiveTab() {},
       // 获取资料初审按钮
@@ -363,7 +406,7 @@
       handleClose() {
         // 关闭弹窗时更新本地状态并触发事件
         this.drawerVisible = false
-        this.$emit('update:visible', false)
+        // update:visible 由 drawerVisible watcher 统一回写
         this.$emit('close')
       },
       // 处理审核意见保存成功后的刷新
@@ -589,6 +632,7 @@
   .btn-group .el-button {
     margin-right: 10px;
   }
+
   .details-container {
     width: 100%;
     height: 100%;
@@ -703,6 +747,7 @@
     text-align: right;
     padding-top: 10px;
   }
+
   ::v-deep .el-dialog__body {
     max-height: 720px;
     overflow: auto;

+ 7 - 1
src/views/costAudit/baseInfo/statistics/comprehensiveQuery.vue

@@ -219,6 +219,8 @@
       </div>
     </div>
 
+    <task-info ref="taskInfo"></task-info>
+
     <!-- 成本监审任务制定弹窗(用于“主任务”查看) -->
     <task-customized-release-dialog
       :visible.sync="taskReleaseDialogVisible"
@@ -273,11 +275,13 @@
   import { getAllUnitList } from '@/api/auditEntityManage.js'
   import { getSysPropertiesAlias } from '@/api/properties'
   import { Base64 } from 'js-base64'
+  import taskInfo from '@/components/task/taskDetail.vue'
   export default {
     name: 'ComprehensiveQuery',
     components: {
       TaskCustomizedReleaseDialog,
       cbjsInfo,
+      taskInfo,
     },
     // mixins: [dictMixin],
     data() {
@@ -322,6 +326,7 @@
         previewUrl: '',
         // 弹窗最大化状态
         isMaximized: false,
+        taskInfo: null,
       }
     },
     mounted() {
@@ -523,7 +528,8 @@
 
       // 查看任务详情
       handleViewTaskDetail(row) {
-        this.openTaskReleaseDialog(row)
+        // this.openTaskReleaseDialog(row)
+        this.$refs.taskInfo.open(row)
       },
 
       // 打开成本监审任务制定弹窗(只读查看)