Browse Source

fix: 任务查询、任务进度管理查看详情成本调查表

shiyanyu 1 month ago
parent
commit
67e0229204

+ 30 - 14
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js

@@ -478,12 +478,12 @@ export const taskMixin = {
         .catch(() => {})
     },
     getBasicInfo() {
-      if (!this.project.projectId) {
-        return
-      }
-      getCostProjectDetail({
-        id: this.project.projectId,
-      })
+      const pid =
+        (this.project && (this.project.projectId || this.project.id)) ||
+        (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
+        ''
+      if (!pid) return
+      getCostProjectDetail({ id: pid })
         .then((res) => {
           this.formData.basicInfo = {
             ...this.project,
@@ -496,9 +496,12 @@ export const taskMixin = {
     },
     // 获取监审工作方案数据
     getScenarioData() {
-      getCostProjectScenarioDetail({
-        projectId: this.project.projectId,
-      }).then((res) => {
+      const pid =
+        (this.project && (this.project.projectId || this.project.id)) ||
+        (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
+        ''
+      if (!pid) return
+      getCostProjectScenarioDetail({ projectId: pid }).then((res) => {
         if (res.value) {
           this.formData.workPlan = res.value
           this.formData.workPlan.attachmentIds = res.value.attachmentIds
@@ -511,10 +514,15 @@ export const taskMixin = {
     },
     // 报送资料要求数据
     getMaterialData() {
+      const pid =
+        (this.project && (this.project.projectId || this.project.id)) ||
+        (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
+        ''
+      if (!pid) return
       getCostProjectMaterialPageList({
         pageNum: this.materialData.pagination.currentPage,
         pageSize: this.materialData.pagination.pageSize,
-        projectId: this.project.projectId,
+        projectId: pid,
       }).then((res) => {
         if (res.value.code == 200) {
           this.materialData.list = res.value.value.records || []
@@ -538,10 +546,15 @@ export const taskMixin = {
     },
     // 获取监审通知数据
     async getDocumentData(data) {
+      const pid =
+        (this.project && (this.project.projectId || this.project.id)) ||
+        (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
+        ''
+      if (!pid) return
       getCostProjectDocumentPageList({
         pageNum: this.documentData.pagination.currentPage,
         pageSize: this.documentData.pagination.pageSize,
-        projectId: this.project.projectId,
+        projectId: pid,
         documentName: data ? data.documentName : '',
       }).then((res) => {
         this.documentData.list = res.value.value.records
@@ -550,9 +563,12 @@ export const taskMixin = {
     },
     // 获取流程数据
     getWorkflow() {
-      getCostProjectNodeTmpleteGetDetail({
-        projectId: this.project.projectId,
-      }).then((res) => {
+      const pid =
+        (this.project && (this.project.projectId || this.project.id)) ||
+        (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
+        ''
+      if (!pid) return
+      getCostProjectNodeTmpleteGetDetail({ projectId: pid }).then((res) => {
         this.workflowData.list = res.value.nodeList || []
         this.workflowData.detailInfo = res.value
         this.formData.workflow.plannedAuditStartDate =

+ 0 - 1
src/views/costAudit/projectInfo/auditTaskManage/taskProgressManage/detailTabs.vue

@@ -106,7 +106,6 @@
       </el-tab-pane>
       <el-tab-pane label="成本调查表" name="survey">
         <CostSurvey
-          :id="id"
           ref="costSurveyRef"
           :disabled="true"
           :task-id="taskId"

+ 2 - 0
src/views/costAudit/projectInfo/auditTaskManage/taskQueryStatistics/index.vue

@@ -102,6 +102,8 @@
     <div v-if="activeView == 'detail'" class="detail-content">
       <detail-tabs
         :project="project"
+        :task-data="taskData"
+        :is-view="true"
         @detailClose="handleDetailClose"
       ></detail-tabs>
     </div>