|
@@ -1,5 +1,11 @@
|
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
|
<div>
|
|
|
+ <div v-if="inputForm.status === '5'">
|
|
|
+ <el-row type="flex" justify="end">
|
|
|
+ <el-button @click="downloadReportAusstellungTpl">下载</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">
|
|
@@ -178,6 +184,7 @@
|
|
|
<script>
|
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
|
|
|
+ import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -246,8 +253,10 @@
|
|
|
}
|
|
|
},
|
|
|
proofreadIssuedService: null,
|
|
|
+ programProjectListInfoService: null,
|
|
|
created () {
|
|
|
this.proofreadIssuedService = new ProofreadIssuedService()
|
|
|
+ this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
this.proofreadIssuedService.findProjectInfoById(this.businessId).then(({data}) => {
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
@@ -428,6 +437,21 @@
|
|
|
}
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.visible = false
|
|
|
+ },
|
|
|
+ // 下载报告签发单
|
|
|
+ downloadReportAusstellungTpl () {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadReportAusstellungTpl(this.inputForm.projectId).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, '报告签发单')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|