|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="tool-btn" style="width: 800px; margin: 0 auto; text-align: right;">
|
|
|
- <el-button type="primary" v-print="'#acceptDoc'">打印</el-button>
|
|
|
+ <el-button size="small" type="primary" icon="el-icon-printer" v-print="printConfig" @click="isPrintPage = true">打印</el-button>
|
|
|
</div>
|
|
|
|
|
|
<div id="acceptDoc" class="doc-page" v-loading="loading">
|
|
|
@@ -15,7 +15,10 @@
|
|
|
<div class="info-row">{{ `项目执行期:${ getXmDateRange || '' }` }}</div>
|
|
|
<div class="info-row">
|
|
|
<span>填报时间:</span>
|
|
|
- <span><el-date-picker v-model="formData.tbsj" value-format="yyyy-MM-dd" /></span>
|
|
|
+ <span>
|
|
|
+ <el-date-picker v-show="!isPrintPage" v-model="formData.tbsj" value-format="yyyy-MM-dd" />
|
|
|
+ <span v-show="isPrintPage">{{ formData.tbsj }}</span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -28,9 +31,11 @@
|
|
|
<td class="doc-label">研发项目名称</td>
|
|
|
<td class="doc-input">
|
|
|
<project-select
|
|
|
+ v-show="!isPrintPage"
|
|
|
v-model="currProjectId"
|
|
|
@change="handleProjectChange"
|
|
|
></project-select>
|
|
|
+ <span v-show="isPrintPage">{{ selProject.xmmc }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">项目申请单位</td>
|
|
|
<td class="doc-input">
|
|
|
@@ -60,15 +65,23 @@
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">预期成果形式</td>
|
|
|
- <td class="doc-input">{{ selProject.yqcgxs }} </td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <div style="padding: 12px;">
|
|
|
+ <div v-for="(item, index) of selProject.yqcgxs.split(',')" :key="index">{{ item }}</div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td class="doc-label">项目技术经济目标</td>
|
|
|
- <td class="doc-input">{{ selProject.xmjsjjmb }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <div style="padding: 12px;">
|
|
|
+ <div v-for="(item, index) of selProject.xmjsjjmb.split(',')" :key="index">{{ item }}</div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
- <avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
|
|
|
+ <avue-form v-show="!isPrintPage" v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
|
|
|
<template slot="ysbgLabel">
|
|
|
<label>验收报告</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
|
|
|
@@ -90,9 +103,43 @@
|
|
|
<el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
- <p class="tip printHide">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
|
|
|
- <div class="btn-wrap printHide" style="text-align: center; margin-top: 30px;">
|
|
|
+ <div v-show="isPrintPage" class="file-list" style="margin-top: 30px;">
|
|
|
+ <div class="file-list-item" style="display: flex; margin-bottom: 18px;">
|
|
|
+ <div class="name">验收报告:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.ysbg" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="file-list-item" style="display: flex; margin-bottom: 18px;">
|
|
|
+ <div class="name">技术报告:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.jsbg" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="file-list-item" style="display: flex; margin-bottom: 18px;">
|
|
|
+ <div class="name">成果报告:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.cgbg" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="file-list-item" style="display: flex; margin-bottom: 18px;">
|
|
|
+ <div class="name">效益报告:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.xybg" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="file-list-item" style="display: flex; margin-bottom: 18px;">
|
|
|
+ <div class="name">验收批文:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.yspw" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p v-show="!isPrintPage" class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
+
|
|
|
+ <div v-show="!isPrintPage" class="btn-wrap" style="text-align: center; margin-top: 30px;">
|
|
|
<el-button type="primary" style="width: 160px;" @click="handleSaveBtn">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -108,6 +155,7 @@ import { mapGetters } from "vuex";
|
|
|
import { getDetail as getTenantDetail } from '@/api/system/tenant';
|
|
|
import { downloadFileByUrl } from "@/util/util";
|
|
|
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
projectSelect,
|
|
|
@@ -122,11 +170,22 @@ export default {
|
|
|
|
|
|
loading: false,
|
|
|
projectList: [],
|
|
|
- selProject: {},
|
|
|
+ selProject: {
|
|
|
+ yqcgxs: '',
|
|
|
+ xmjsjjmb: '',
|
|
|
+ },
|
|
|
|
|
|
currProjectId: '',
|
|
|
|
|
|
teantData: {},
|
|
|
+
|
|
|
+ isPrintPage: false,
|
|
|
+ printConfig: {
|
|
|
+ el: '#acceptDoc', //被打印部分的id
|
|
|
+ closeCallback: () => {
|
|
|
+ this.isPrintPage = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -291,7 +350,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleProjectChange(data) {
|
|
|
- console.log(data.xmsqdwid)
|
|
|
this.selProject = data;
|
|
|
},
|
|
|
validForm() {
|
|
|
@@ -339,7 +397,7 @@ export default {
|
|
|
|
|
|
.project-basic-info .info-row {
|
|
|
line-height: 26px;
|
|
|
- color: #666;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
|
|
|
.doc-page {
|
|
|
@@ -361,6 +419,7 @@ table {
|
|
|
text-align: center;
|
|
|
color: #333;
|
|
|
width: 35%;
|
|
|
+ height: 40px;
|
|
|
}
|
|
|
|
|
|
.el-input__inner {
|
|
|
@@ -368,6 +427,7 @@ table {
|
|
|
}
|
|
|
tr td {
|
|
|
border: 1px solid #333;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.tip {
|