Просмотр исходного кода

Merge branch 'master' of http://1.71.9.215:3000/feiyi/cbjsxt-front-master

shiyanyu 1 месяц назад
Родитель
Сommit
5ecb22faf5

+ 7 - 3
src/components/costAudit/FilePreview.vue

@@ -19,10 +19,14 @@
         }
 
         try {
+          let fileUrl = ''
+          if (this.fileUrl.startsWith('http')) {
+            fileUrl = this.fileUrl
+          } else {
+            fileUrl = window.context.form + this.fileUrl
+          }
           // 对文件URL进行Base64编码
-          const encodedUrl = encodeURIComponent(
-            Base64.encode(window.context.form + this.fileUrl)
-          )
+          const encodedUrl = encodeURIComponent(Base64.encode(fileUrl))
 
           // 构建 kkFileView 预览URL
           // onlinePreview - 在线预览

+ 27 - 10
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) }}
@@ -251,6 +251,7 @@
                         上传附件
                       </el-button>
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="text"
                         size="small"
                         @click="handleViewScan(scope.row.dataValue)"
@@ -426,6 +427,7 @@
                       上传附件
                     </el-button> -->
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="primary"
                         size="small"
                         :disabled="false"
@@ -558,7 +560,7 @@
         dialogVisible: false,
         dialogTitle: '选择文号',
         documentDialogVisible: false,
-        documentDialogTitle: '添加监审通知书',
+        documentDialogTitle: '查看监审通知书',
         dialogWidth: '80%',
         fileUrl: '',
         selectDocumentWhData: [],
@@ -675,14 +677,24 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
-        // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
+        // 从API中获取文件URL
+        downDocument({
           id: row.id,
         }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
+          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 || []
+        // })
       },
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
@@ -1131,9 +1143,14 @@
           this.$message.error('暂无文件!')
           return
         }
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          _fileUrl = window.context.form + fileUrl
+        }
+        // 对文件URL进行Base64编码
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
         window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
       },
       handleUploadClick(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
       })
     },

+ 24 - 9
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) }}
@@ -297,6 +297,7 @@
                       上传附件
                     </el-button> -->
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="primary"
                         size="small"
                         :disabled="false"
@@ -507,14 +508,24 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
-        // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
+        // 从API中获取文件URL
+        downDocument({
           id: row.id,
         }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
+          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 || []
+        // })
       },
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
@@ -817,10 +828,14 @@
           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 - 在线预览

+ 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
         })
       },

+ 35 - 11
src/components/task/taskInfo.vue

@@ -309,7 +309,7 @@
           </div>
         </el-tab-pane>
 
-        <!-- 监审文书 -->
+        <!-- 企业-详情 监审文书 -->
         <el-tab-pane label="监审文书" name="auditDocument">
           <div v-loading="loading" element-loading-text="加载中...">
             <div style="font-size: 14px; margin-bottom: 15px; color: #606266">
@@ -840,7 +840,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="9300"
+      :z-index="9400"
       :show-confirm-btn="false"
       cancel-text="关闭"
       @cancel="handleDocCancel"
@@ -943,6 +943,7 @@
                       上传附件
                     </el-button> -->
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="primary"
                         size="small"
                         :disabled="false"
@@ -1910,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) {
@@ -1931,14 +1941,24 @@
         this.document = {
           ...row,
         }
-        // this.handleTemplateChange()
-        this.fileUrl = row.electronicDocumentUrl
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
+        // 从API中获取文件URL
+        downDocument({
           id: row.id,
         }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
+          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 || []
+        // })
       },
       // 关闭监审文书查看弹窗
       handleDocCancel() {
@@ -1954,10 +1974,14 @@
           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 - 在线预览

+ 23 - 8
src/views/EntDeclaration/auditTaskManagement/components/AuditDocumentTab.vue

@@ -200,6 +200,7 @@
                         上传附件
                       </el-button> -->
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="text"
                         size="small"
                         :disabled="false"
@@ -321,14 +322,24 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
-        // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
+        // 从API中获取文件URL
+        downDocument({
           id: row.id,
         }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
+          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) {
@@ -336,10 +347,14 @@
           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 - 在线预览

+ 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
         })
       },

+ 63 - 8
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) }}
@@ -61,6 +61,7 @@
               上传附件
             </el-button>
             <el-button
+              v-if="getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"
@@ -93,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"
@@ -137,7 +145,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="9200"
+      :z-index="9400"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -283,6 +291,7 @@
                         上传附件
                       </el-button>
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="text"
                         size="small"
                         @click="handleViewScan(scope.row.dataValue)"
@@ -312,7 +321,7 @@
       :visible="dialogVisible"
       :width="dialogWidth"
       :close-on-click-modal="false"
-      :z-index="9300"
+      :z-index="9500"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -636,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
         })
       },
@@ -1043,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 - 在线预览
@@ -1076,7 +1122,16 @@
           // 确保isPushed有值,如果row中没有,设置默认值'1'
           isPushed: row.isPushed !== undefined ? row.isPushed : '1',
         }
-        this.fileUrl = this.document.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         this.getDocumentData()
       },
 

+ 18 - 0
src/views/costAudit/baseInfo/catalogManage/surveyDialog.vue

@@ -862,6 +862,24 @@
         this.contentEditForm.dynamicTable.dynamicTables =
           this.flattenHierarchy(allRows)
       },
+      flattenHierarchy(rows) {
+        const sortedRows = []
+        const parentMap = {}
+        rows.forEach((row) => {
+          parentMap[row.parentid] = parentMap[row.parentid] || []
+          parentMap[row.parentid].push(row)
+        })
+        function addRows(parentId) {
+          if (parentMap[parentId]) {
+            parentMap[parentId].forEach((row) => {
+              sortedRows.push(row)
+              addRows(row.rowid)
+            })
+          }
+        }
+        addRows(-1)
+        return sortedRows
+      },
       // 字符串转对象数组
       stringToObjects(str) {
         if (!str || typeof str !== 'string') return []

+ 43 - 5
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) }}
@@ -53,7 +54,7 @@
           </template>
           <template #scanDocumentUrl="scope">
             <el-button
-              v-if="!isView"
+              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleUploadScan(scope.row, 'scanDocumentUrl')"
@@ -61,6 +62,7 @@
               上传附件
             </el-button>
             <el-button
+              v-if="getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"
@@ -93,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"
@@ -282,6 +291,7 @@
                         上传附件
                       </el-button>
                       <el-button
+                        v-if="scope.row.dataValue"
                         type="text"
                         size="small"
                         @click="handleViewScan(scope.row.dataValue)"
@@ -945,16 +955,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 - 在线预览

+ 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
       })
     },