Explorar o código

fix: 报送资料修改资料类型,修改文书修改接口

shiyanyu hai 1 mes
pai
achega
a6359094ff

+ 8 - 0
src/api/auditReviewDocManage.js

@@ -76,3 +76,11 @@ export function queryByDocumentIdandWhereValue(params) {
     params,
     params,
   })
   })
 }
 }
+// 文书
+export function getCostProjectDocumentFile(params) {
+  return request({
+    url: url + `/costProjectDocumentFile/v1/getInfo`,
+    method: 'get',
+    params,
+  })
+}

+ 18 - 10
src/views/costAudit/auditInfo/auditManage/submitData.vue

@@ -25,18 +25,16 @@
           min-width="200"
           min-width="200"
         />
         />
 
 
-        <el-table-column label="资料类型" width="150" align="center">
+        <el-table-column label="资料类型" width="200" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span
             <span
               v-if="
               v-if="
-                Number(scope.row.formatRequired) === 2 && scope.row.templateId
+                Number(scope.row.formatRequired) === 3 && scope.row.templateId
               "
               "
-              class="template-tag"
               style="cursor: pointer"
               style="cursor: pointer"
-              title="点击查看模板"
-              @click="handleViewTemplate(scope.row)"
+              :title="'点击查看模板'"
             >
             >
-              预置模板
+              {{ `预置模板(${getTemplateTypeName(scope.row.templateType)})` }}
             </span>
             </span>
             <span v-else>
             <span v-else>
               {{ getFormatType(scope.row.formatRequired) }}
               {{ getFormatType(scope.row.formatRequired) }}
@@ -376,12 +374,22 @@
       },
       },
       // 获取格式类型
       // 获取格式类型
       getFormatType(formatRequired) {
       getFormatType(formatRequired) {
-        const formatMap = {
+        const map = {
           1: '文档文件',
           1: '文档文件',
-          2: '预置模板',
-          3: 'Excel文件',
+          2: 'excel',
+          3: '预置模板',
         }
         }
-        return formatMap[formatRequired] || '文档文件'
+        const k = Number(formatRequired)
+        return map[k] || '文档文件'
+      },
+      getTemplateTypeName(t) {
+        const map = {
+          1: '单记录',
+          2: '固定表',
+          3: '动态表',
+        }
+        const k = String(t || '').trim()
+        return map[k] || map[Number(k)] || ''
       },
       },
       // 资料初审按钮点击事件
       // 资料初审按钮点击事件
       handleAuditPass(row) {
       handleAuditPass(row) {

+ 6 - 4
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -311,7 +311,7 @@
   import CostAuditDialog from '@/components/costAudit/CostAuditDialog.vue'
   import CostAuditDialog from '@/components/costAudit/CostAuditDialog.vue'
   import TemplatePreviewEdit from '@/components/costAudit/TemplatePreviewEdit.vue'
   import TemplatePreviewEdit from '@/components/costAudit/TemplatePreviewEdit.vue'
   import { getAllUnitList } from '@/api/auditEntityManage'
   import { getAllUnitList } from '@/api/auditEntityManage'
-  import { queryByDocumentIdandWhereValue } from '@/api/auditReviewDocManage.js'
+  import { getCostProjectDocumentFile } from '@/api/auditReviewDocManage.js'
   import { getData } from '@/api/auditDocNoManage.js'
   import { getData } from '@/api/auditDocNoManage.js'
   import { updateScan, downDocument } from '@/api/taskCustomizedRelease.js'
   import { updateScan, downDocument } from '@/api/taskCustomizedRelease.js'
   import {
   import {
@@ -633,15 +633,17 @@
         let data = this.documentData.documentTypes.find(
         let data = this.documentData.documentTypes.find(
           (item) => item.id === this.document.documentId
           (item) => item.id === this.document.documentId
         )
         )
+        console.log(data, 'data')
         this.fileUrl = data.fileUrl
         this.fileUrl = data.fileUrl
         this.document.documentName = data.documentName
         this.document.documentName = data.documentName
         this.getDocumentData()
         this.getDocumentData()
       },
       },
       getDocumentData() {
       getDocumentData() {
         if (this.document.documentId) {
         if (this.document.documentId) {
-          queryByDocumentIdandWhereValue({
-            documentId: this.document.documentId,
-            whereValue: this.project.projectId,
+          getCostProjectDocumentFile({
+            // documentId: this.document.documentId,
+            // whereValue: this.project.projectId,
+            id: this.document.id,
           }).then((res) => {
           }).then((res) => {
             this.costDocumentTemplateFiles = res.value || []
             this.costDocumentTemplateFiles = res.value || []
           })
           })