فهرست منبع

fix:监审文书列表筛选数据,添加查看按钮

luzhixia 1 ماه پیش
والد
کامیت
6cccd5dca8

+ 1 - 1
src/components/task/mounTaskComponents/auditNoticeTab.vue

@@ -39,7 +39,7 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            {{ getDocumenType(row) }}
+            {{ row.documentName || getDocumenType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}

+ 10 - 1
src/components/task/mounTaskComponents/index.js

@@ -562,7 +562,16 @@ export const taskMixin = {
         projectId: pid,
         documentName: data ? data.documentName : '',
       }).then((res) => {
-        this.documentData.list = res.value.value.records
+        let records = res.value.value.records
+        this.documentData.list = records.filter((item) => {
+          const excludeTypes = [
+            '成本监审工作底稿-送达回证',
+            '成本监审提取资料登记表-送达回证',
+            '成本审核初步意见表1-送达回证',
+            '成本监审集体审议记录-送达回证',
+          ]
+          return !excludeTypes.includes(item.documentName)
+        })
         this.documentData.pagination.total = res.value.value.total
       })
     },

+ 1 - 1
src/components/task/taskComponents/auditNoticeTab.vue

@@ -39,7 +39,7 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            {{ getDocumenType(row) }}
+            {{ row.documentName || getDocumenType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}

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

@@ -289,7 +289,16 @@
           projectId: pid,
           documentName: data ? data.documentName : '',
         }).then((res) => {
-          this.documentData.list = res.value.value.records
+          let records = res.value.value.records
+          this.documentData.list = records.filter((item) => {
+            const excludeTypes = [
+              '成本监审工作底稿-送达回证',
+              '成本监审提取资料登记表-送达回证',
+              '成本审核初步意见表1-送达回证',
+              '成本监审集体审议记录-送达回证',
+            ]
+            return !excludeTypes.includes(item.documentName)
+          })
           this.documentData.pagination.total = res.value.value.total
         })
       },

+ 10 - 1
src/components/task/taskInfo.vue

@@ -1911,7 +1911,16 @@
             // documentName: '',
             permissionType: 1,
           }).then((res) => {
-            this.formData.auditDocument = res.value.value.records
+            let records = res.value.value.records
+            this.formData.auditDocument = records.filter((item) => {
+              const excludeTypes = [
+                '成本监审工作底稿-送达回证',
+                '成本监审提取资料登记表-送达回证',
+                '成本审核初步意见表1-送达回证',
+                '成本监审集体审议记录-送达回证',
+              ]
+              return !excludeTypes.includes(item.documentName)
+            })
             this.auditDocumentPagination.total = res.value.value.total
           })
         } catch (error) {

+ 10 - 1
src/views/EntDeclaration/auditTaskManagement/taskFillIn.vue

@@ -1477,7 +1477,16 @@
           documentName: '',
           permissionType: 1,
         }).then((res) => {
-          this.formData.auditDocument = res.value.value.records
+          let records = res.value.value.records
+          this.formData.auditDocument = records.filter((item) => {
+            const excludeTypes = [
+              '成本监审工作底稿-送达回证',
+              '成本监审提取资料登记表-送达回证',
+              '成本审核初步意见表1-送达回证',
+              '成本监审集体审议记录-送达回证',
+            ]
+            return !excludeTypes.includes(item.documentName)
+          })
           this.auditDocumentPagination.total = res.value.value.total
         })
       },

+ 49 - 5
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -38,7 +38,7 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            {{ getDocumenType(row) }}
+            {{ row.documentName || getDocumenType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}
@@ -94,6 +94,13 @@
           </template>
           <template #electronicDocumentUrl="scope">
             <el-button
+              type="text"
+              size="mini"
+              @click="handleDocView(scope.row)"
+            >
+              查看
+            </el-button>
+            <el-button
               v-if="!isView && !getDocumenType(scope.row).includes('通知书')"
               type="text"
               size="mini"
@@ -638,7 +645,16 @@
           documentName: data ? data.documentName : '',
           permissionType: '0',
         }).then((res) => {
-          this.documentData.list = res.value.value.records
+          let records = res.value.value.records
+          this.documentData.list = records.filter((item) => {
+            const excludeTypes = [
+              '成本监审工作底稿-送达回证',
+              '成本监审提取资料登记表-送达回证',
+              '成本审核初步意见表1-送达回证',
+              '成本监审集体审议记录-送达回证',
+            ]
+            return !excludeTypes.includes(item.documentName)
+          })
           this.documentData.pagination.total = res.value.value.total
         })
       },
@@ -1045,16 +1061,44 @@
         // 触发文件选择
         input.click()
       },
+      // 查看监审文书
+      handleDocView(row) {
+        this.document = {
+          ...row,
+        }
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
+        // this.handleTemplateChange()
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
+      },
       // 查看扫描件
       handleViewScan(fileUrl) {
         if (!fileUrl) {
           this.$message.error('暂无文件!')
           return
         }
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          _fileUrl = window.context.form + fileUrl
+        }
         // 对文件URL进行Base64编码
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
 
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览

+ 33 - 1
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -38,7 +38,8 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            {{ getDocumenType(row) }}
+            <!-- getDocumenType(row) -->
+            {{ row.documentName || getDocumenType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}
@@ -94,6 +95,13 @@
           </template>
           <template #electronicDocumentUrl="scope">
             <el-button
+              type="text"
+              size="mini"
+              @click="handleDocView(scope.row)"
+            >
+              查看
+            </el-button>
+            <el-button
               v-if="!isView"
               type="text"
               size="mini"
@@ -947,6 +955,30 @@
         // 触发文件选择
         input.click()
       },
+      // 查看监审文书
+      handleDocView(row) {
+        this.document = {
+          ...row,
+        }
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
+        // this.handleTemplateChange()
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
+      },
       // 查看扫描件
       handleViewScan(fileUrl) {
         if (!fileUrl) {

+ 10 - 1
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js

@@ -561,7 +561,16 @@ export const taskMixin = {
         projectId: pid,
         documentName: data ? data.documentName : '',
       }).then((res) => {
-        this.documentData.list = res.value.value.records
+        let records = res.value.value.records
+        this.documentData.list = records.filter((item) => {
+          const excludeTypes = [
+            '成本监审工作底稿-送达回证',
+            '成本监审提取资料登记表-送达回证',
+            '成本审核初步意见表1-送达回证',
+            '成本监审集体审议记录-送达回证',
+          ]
+          return !excludeTypes.includes(item.documentName)
+        })
         this.documentData.pagination.total = res.value.value.total
       })
     },