Bläddra i källkod

项目详情页签

lizhenhao 2 år sedan
förälder
incheckning
4fa7aaadb7

+ 1 - 1
src/views/modules/program/registered/ProjectArchiveForm.vue

@@ -4,7 +4,7 @@
     <div>
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
                label-width="170px" @submit.native.prevent>
-
+        <el-divider content-position="left"><i class="el-icon-document"></i> 项目归档</el-divider>
           <el-row  :gutter="15">
             <el-col :span="12">
               <el-form-item label="项目名称" prop="programProjectListInfo.name"

+ 7 - 7
src/views/modules/program/registered/ProjectForm.vue

@@ -708,14 +708,14 @@
             <el-tab-pane label="三级校审" name="thirdAudit" >
               <ProjectThreeAuditForm ref="thirdAudit3" :formReadOnly="true"></ProjectThreeAuditForm>
             </el-tab-pane>
-            <el-tab-pane label="项目归档" name="archive" >
-              <ProjectArchiveForm ref="projectArchiveForm" :formReadOnly="true"></ProjectArchiveForm>
+            <el-tab-pane label="校对" name="fread" >
+              <ProofreadFormComponent ref="proofreadFormComponent"></ProofreadFormComponent>
             </el-tab-pane>
             <el-tab-pane label="浏览审核" name="freadBrowse" >
               <ProofreadBrowseFormComponent ref="proofreadBrowseFormComponent"></ProofreadBrowseFormComponent>
             </el-tab-pane>
-            <el-tab-pane label="校对" name="fread" >
-              <ProofreadFormComponent ref="proofreadFormComponent"></ProofreadFormComponent>
+            <el-tab-pane label="项目归档" name="archive" >
+              <ProjectArchiveForm ref="projectArchiveForm" :formReadOnly="true"></ProjectArchiveForm>
             </el-tab-pane>
           </el-tabs>
         </el-col>
@@ -1236,17 +1236,17 @@
         console.log(event)
         if (event.name === 'firstAudit') {
           if (this.commonJS.isNotEmpty(this.auditIdfirst)) {
-            this.$refs.projectThreeAuditForm.init('view', this.auditIdfirst)
+            this.$refs.projectThreeAuditForm.init('view', this.auditIdfirst, '一级校审')
           }
         }
         if (event.name === 'secondAudit') {
           if (this.commonJS.isNotEmpty(this.auditIdsecond)) {
-            this.$refs.secondAudit2.init('view', this.auditIdsecond)
+            this.$refs.secondAudit2.init('view', this.auditIdsecond, '二级校审')
           }
         }
         if (event.name === 'thirdAudit') {
           if (this.commonJS.isNotEmpty(this.auditIdthird)) {
-            this.$refs.thirdAudit3.init('view', this.auditIdthird)
+            this.$refs.thirdAudit3.init('view', this.auditIdthird, '三级校审')
           }
         }
         if (event.name === 'archive') {

+ 7 - 7
src/views/modules/program/registered/ProjectList.vue

@@ -169,19 +169,19 @@
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status3 === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="thirdAuditReback(scope.row)">校审撤回</el-button>
 
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' &&scope.row.archiveStatus === '0'||scope.row.archiveStatus === '1'||scope.row.archiveStatus === '3'||scope.row.archiveStatus === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="archivePush(scope.row)">项目归档</el-button>
-              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.archiveStatus === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="archiveReback(scope.row)">校审撤回</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.archiveStatus === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="archiveReback(scope.row)">项目归档撤回</el-button>
 
               <!--一级校审ftl文件下载-->
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadFirstAuditTpl(scope.row)">一级校审下载</el-button>
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadSecondAuditTpl(scope.row)">二级校审下载</el-button>
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadThirdlyAuditTpl(scope.row)">三级校审下载</el-button>
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadFirstAuditTpl(scope.row)">一级校审下载</el-button>-->
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadSecondAuditTpl(scope.row)">二级校审下载</el-button>-->
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadThirdlyAuditTpl(scope.row)">三级校审下载</el-button>-->
 
               <!--自校功能ftl文件下载-->
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadProofreadAuditTpl(scope.row)">校对审核</el-button>
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadAuditRecordFormAfterBindingTpl(scope.row)">评估报告装订后</el-button>
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadProofreadAuditTpl(scope.row)">校对审核</el-button>-->
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadAuditRecordFormAfterBindingTpl(scope.row)">评估报告装订后</el-button>-->
 
               <!--报告签发单-->
-              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadReportAusstellungTpl(scope.row)">报告签发单</el-button>
+<!--              <el-button v-if="hasPermission('program:registered:edit')" type="text"  icon="el-icon-circle-check" size="small" @click="downloadReportAusstellungTpl(scope.row)">报告签发单</el-button>-->
 
             </template>
           </vxe-column>

+ 28 - 3
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -1,6 +1,12 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
     <div>
+      <div v-if="inputForm.status === '5'">
+        <el-row type="flex" justify="end">
+          <el-button @click="downloadFirstAuditTpl">下载</el-button>
+        </el-row>
+        <el-divider content-position="left"><i class="el-icon-document"></i> 项目校审</el-divider>
+      </div>
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
                label-width="125px" @submit.native.prevent>
           <el-row  :gutter="15">
@@ -166,7 +172,8 @@
         },
         programId: '',
         supervisorList: [],
-        keyWatch: ''
+        keyWatch: '',
+        tabName: ''
       }
     },
     programProjectListInfoService: null,
@@ -210,7 +217,8 @@
       getKeyWatch (keyWatch) {
         this.keyWatch = keyWatch
       },
-      init (method, id) {
+      init (method, id, tabName) {
+        this.tabName = tabName
         if (method === 'formReadOnly') {
           this.formReadOnly = true
         }
@@ -231,7 +239,9 @@
           procInsId: '',
           processDefinitionId: '',
           status: '',
-          programProjectListInfo: {},
+          programProjectListInfo: {
+            id: ''
+          },
           programAuditAssessPeopleDtoList: [],
           workAttachmentDtoList: [],
           auditPeopleList: ''
@@ -439,6 +449,21 @@
         }
         this.$refs.inputForm.resetFields()
         this.visible = false
+      },
+      // 下载一级校审
+      downloadFirstAuditTpl () {
+        // this.$utils.downloadExcel('/sys/project/import/template')
+        this.loading = true
+        this.programProjectListInfoService.downloadFirstAuditTpl(this.inputForm.programProjectListInfo.id, this.inputForm.id).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadWord(res.data, this.tabName)
+          this.loading = false
+        }).catch(function (err) {
+          this.loading = false
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
       }
     }
   }

+ 27 - 1
src/views/modules/program/registered/ProofreadBrowseFormComponent.vue

@@ -1,5 +1,11 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
+    <div v-if="showDownload">
+      <el-row type="flex" justify="end">
+        <el-button @click="downloadAuditRecordFormAfterBindingTpl">下载</el-button>
+      </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 浏览审核</el-divider>
+    </div>
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'"
                label-width="120px" @submit.native.prevent>
 
@@ -262,7 +268,8 @@
         yesOrNo: [
           {value: 0, label: '×'},
           {value: 1, label: '√'}
-        ]
+        ],
+        showDownload: false
       }
     },
     proofreadInfoService: null,
@@ -287,6 +294,7 @@
     },
     methods: {
       init (method, id) {
+        this.showDownload = false
         this.inputForm = {
           projectId: '',
           projectName: '',
@@ -309,6 +317,9 @@
         this.$nextTick(() => {
           this.loading = true
           this.proofreadInfoService.findById(id, '2').then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.showDownload = true
+            }
             if (!this.commonJS.isEmpty(data.projectId)) {
               this.$refs.inputForm.resetFields()
               this.inputForm = this.recover(this.inputForm, data)
@@ -379,6 +390,21 @@
             this.inputForm.detailFor70.push(item)
           }
         })
+      },
+      // 下载评估报告装订后浏览审核记录表
+      downloadAuditRecordFormAfterBindingTpl () {
+        // this.$utils.downloadExcel('/sys/project/import/template')
+        this.loading = true
+        this.programProjectListInfoService.downloadAuditRecordFormAfterBindingTpl(this.inputForm.projectId).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res.data, '评估报告装订后浏览审核记录表.xls')
+          this.loading = false
+        }).catch(function (err) {
+          this.loading = false
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
       }
     }
   }

+ 27 - 2
src/views/modules/program/registered/ProofreadFormComponent.vue

@@ -1,6 +1,11 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
-
+    <div v-if="showDownload">
+      <el-row type="flex" justify="end">
+        <el-button @click="downloadProofreadAuditTpl">下载</el-button>
+      </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 校对</el-divider>
+    </div>
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="true"
                label-width="120px" @submit.native.prevent>
 
@@ -355,7 +360,8 @@
           detailFor2050: [],
           detailFor2060: [],
           detailFor30: []
-        }
+        },
+        showDownload: false
       }
     },
     proofreadInfoService: null,
@@ -380,6 +386,7 @@
     },
     methods: {
       init (id) {
+        this.showDownload = false
         this.inputForm = {
           projectId: '',
           projectName: '',
@@ -405,6 +412,9 @@
         this.$nextTick(() => {
           this.loading = true
           this.proofreadInfoService.findById(id, '1').then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.showDownload = true
+            }
             if (!this.commonJS.isEmpty(data.projectId)) {
               this.$refs.inputForm.resetFields()
               this.inputForm = this.recover(this.inputForm, data)
@@ -495,6 +505,21 @@
             this.inputForm.detailFor30.push(item)
           }
         })
+      },
+      // 下载资产评估项目(校对)审核记录表
+      downloadProofreadAuditTpl () {
+        // this.$utils.downloadExcel('/sys/project/import/template')
+        this.loading = true
+        this.programProjectListInfoService.downloadProofreadAuditTpl(this.inputForm.projectId).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res.data, '资产评估项目(校对)审核记录表.xls')
+          this.loading = false
+        }).catch(function (err) {
+          this.loading = false
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
       }
     }
   }