|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div v-if="operateType === 'edit'" class="tool-btn" style="width: 800px; margin: 0 auto; text-align: right;">
|
|
|
- <el-button type="primary" v-print="'#applyDoc'">打印</el-button>
|
|
|
+ <el-button size="small" type="primary" icon="el-icon-printer" v-print="printConfig" @click="isPrintPage = true">打印</el-button>
|
|
|
</div>
|
|
|
<div id="applyDoc" class="apply-form" v-loading="loading">
|
|
|
<h3 class="page-title" style="height: 60px; line-height: 60px; margin: 0;">{{ teantData.tenantName }}</h3>
|
|
|
@@ -21,25 +21,28 @@
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发项目名称
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发项目名称
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
- <el-input v-model="formData.xmmc" placeholder="请输入项目名称" :disabled="isEdit" />
|
|
|
+ <el-input v-if="!isPrintPage" v-model="formData.xmmc" placeholder="请输入项目名称" :disabled="isEdit" />
|
|
|
+ <span v-else style="display: inline-block; padding: 12px 6px;">{{ formData.xmmc }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目编号
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目编号
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
- <el-input v-model="formData.xmbh" placeholder="请输入项目编号" :disabled="isEdit" />
|
|
|
+ <el-input v-if="!isPrintPage" v-model="formData.xmbh" placeholder="请输入项目编号" :disabled="isEdit" />
|
|
|
+ <span v-else style="display: inline-block; padding: 12px 6px;">{{ formData.xmbh }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发开始时间
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发开始时间
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<el-date-picker
|
|
|
+ v-if="!isPrintPage"
|
|
|
v-model="formData.xmkssj"
|
|
|
format="yyyy年MM月dd日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
@@ -47,12 +50,14 @@
|
|
|
style="width: 100%"
|
|
|
:disabled="isEdit"
|
|
|
></el-date-picker>
|
|
|
+ <span v-else style="display: inline-block; padding: 12px 6px;">{{ formData.xmkssj }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发结束时间
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>研发结束时间
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<el-date-picker
|
|
|
+ v-if="!isPrintPage"
|
|
|
v-model="formData.xmjssj"
|
|
|
format="yyyy年MM月dd日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
@@ -60,15 +65,17 @@
|
|
|
style="width: 100%"
|
|
|
:disabled="isEdit"
|
|
|
></el-date-picker>
|
|
|
+ <span v-else style="display: inline-block; padding: 12px 6px;">{{ formData.xmjssj }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目申请单位
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目申请单位
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<second-unit-cascader
|
|
|
+ v-show="!isPrintPage"
|
|
|
ref="secondUnitCascader"
|
|
|
v-model="formData.xmsqdwid"
|
|
|
:yearAndMonth="yearAndMonth"
|
|
|
@@ -77,95 +84,116 @@
|
|
|
@change="handleSecondUnitChange"
|
|
|
>
|
|
|
</second-unit-cascader>
|
|
|
+ <span v-show="isPrintPage" style="display: inline-block; padding: 12px;">{{ xmsqdwName }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目负责人
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目负责人
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
- <person-select v-model="formData.xmfzr" :yearAndMonth="xmStartDateYearAndMonth" valueKey="id" :disabled="isEdit" style="width: 100%" />
|
|
|
+ <person-select v-show="!isPrintPage" v-model="formData.xmfzr" :yearAndMonth="xmStartDateYearAndMonth" valueKey="id" :disabled="isEdit" style="width: 100%" />
|
|
|
+ <span v-show="isPrintPage" style="display: inline-block; padding: 12px 6px;">{{ getXmfzrName }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>研究类型
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>研究类型
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
+ v-if="!isPrintPage"
|
|
|
v-model="formData.yjlx"
|
|
|
placeholder="请选择"
|
|
|
:dic="studyTypeList"
|
|
|
style="width: 100%"
|
|
|
></avue-select>
|
|
|
+ <span v-else style="display: inline-block; padding: 12px;">{{ formData.yjlx }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目来源
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目来源
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
+ v-if="!isPrintPage"
|
|
|
v-model="formData.xmly"
|
|
|
placeholder="请选择"
|
|
|
:dic="projectSourceList"
|
|
|
style="width: 100%"
|
|
|
></avue-select>
|
|
|
+ <span v-else style="display: inline-block; padding: 12px;">{{ formData.xmly }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目开展形式
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目开展形式
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
+ v-if="!isPrintPage"
|
|
|
v-model="formData.xmkzxs"
|
|
|
placeholder="请选择"
|
|
|
:dic="implementFormatList"
|
|
|
style="width: 100%"
|
|
|
></avue-select>
|
|
|
+ <span v-else style="display: inline-block; padding: 12px;">{{ formData.xmkzxs }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>预期成果形式
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>预期成果形式
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
+ v-if="!isPrintPage"
|
|
|
multiple
|
|
|
v-model="formData.yqcgxs"
|
|
|
placeholder="请选择"
|
|
|
:dic="expectedOutComeFormList"
|
|
|
style="width: 100%"
|
|
|
></avue-select>
|
|
|
+ <template v-else>
|
|
|
+ <div style="padding: 12px;">
|
|
|
+ <div v-for="(item, index) of formData.yqcgxs" :key="index">{{ item }}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目技术经济目标
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目技术经济目标
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
+ v-if="!isPrintPage"
|
|
|
multiple
|
|
|
v-model="formData.xmjsjjmb"
|
|
|
placeholder="请选择"
|
|
|
:dic="economicObjectivesList"
|
|
|
style="width: 100%"
|
|
|
></avue-select>
|
|
|
+ <template v-else>
|
|
|
+ <div style="padding: 12px;">
|
|
|
+ <div v-for="(item, index) of formData.xmjsjjmb" :key="index">{{ item }}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目预算总额(万元)
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目预算总额(万元)
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<!-- <el-input-number v-model="formData.xmysze" type="number" :min="0" controls-position="right" :disabled="isEdit" /> -->
|
|
|
{{ getXmysze }}
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
- <span style="color: red; padding-right: 3px; font-size: 16px;">*</span>其中
|
|
|
+ <span v-if="!isPrintPage" style="color: red; padding-right: 3px; font-size: 16px;">*</span>其中
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
<div class="year-list">
|
|
|
<div class="year-list-item" v-for="year of yearList" :key="year" :style="{ height: yearList.length == 1 ? '51px' : '32px', lineHeight: yearList.length == 1 ? '51px' : '32px' }">
|
|
|
<div class="year" >{{ year }}</div>
|
|
|
<div class="year-input">
|
|
|
- <input v-model="formData[year]" type="number" @input="handleYearInput" style="padding: 0 6px;" :disabled="isEdit" />
|
|
|
+ <input v-if="!isPrintPage" v-model="formData[year]" type="number" @input="handleYearInput" style="padding: 0 6px;" :disabled="isEdit" />
|
|
|
+ <span v-else style="padding-left: 12px;">{{ formData[year] }}万元</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -174,7 +202,7 @@
|
|
|
</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="lxpwLabel">
|
|
|
<label>立项批文</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
|
|
|
@@ -188,7 +216,27 @@
|
|
|
<el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
- <p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
+ <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.lxpw" :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.lxbg" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="file-list-item" style="display: flex;">
|
|
|
+ <div class="name">其他资料:</div>
|
|
|
+ <div class="file-wrap">
|
|
|
+ <div v-for="(item, idx) of formData.qtzl" :key="idx">{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p v-if="!isPrintPage" class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
|
|
|
<div class="btn-wrap printHide" style="text-align: center;">
|
|
|
<el-button type="primary" style="width: 160px;" @click="handleSaveBtn">保存</el-button>
|
|
|
@@ -201,7 +249,6 @@
|
|
|
import secondUnitCascader from "@/components/second-unit-cascader";
|
|
|
import personSelect from "@/components/person-select";
|
|
|
import { getDictionary } from "@/api/system/dictbiz";
|
|
|
-import { getList as getTechnicanRosterList } from "@/api/basicResource/technicianRoster";
|
|
|
import { add, update, getApprove } from "@/api/projectManage/projectList";
|
|
|
import moment from "moment";
|
|
|
import { deepClone } from "@/util/util";
|
|
|
@@ -261,7 +308,15 @@ export default {
|
|
|
xmsqdwName: '',
|
|
|
|
|
|
// 租户信息
|
|
|
- teantData: {}
|
|
|
+ teantData: {},
|
|
|
+
|
|
|
+ isPrintPage: false,
|
|
|
+ printConfig: {
|
|
|
+ el: '#applyDoc', //被打印部分的id
|
|
|
+ closeCallback: () => {
|
|
|
+ this.isPrintPage = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -277,7 +332,7 @@ export default {
|
|
|
},
|
|
|
'formData.xmysze'(newVal) {
|
|
|
this.calcBudgetIsExceed(newVal);
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo"]),
|
|
|
@@ -482,22 +537,6 @@ export default {
|
|
|
this.budgetIsExceed = false;
|
|
|
}
|
|
|
},
|
|
|
- /**
|
|
|
- * 获取人员花名册
|
|
|
- */
|
|
|
- // getTechnicanRosterListFunc(yearAndMonth) {
|
|
|
- // if (!yearAndMonth) {
|
|
|
- // this.fzrList = [];
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // getTechnicanRosterList(1, 99999, { yearAndMonth }).then(res => {
|
|
|
- // if (res.data.success) {
|
|
|
- // this.fzrList = res.data.data.records.map(item => {
|
|
|
- // return { label: item.name, value: item.id };
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
validForm() {
|
|
|
let errorText = '';
|
|
|
if (!this.formData.xmmc) {
|
|
|
@@ -622,7 +661,7 @@ export default {
|
|
|
|
|
|
.project-basic-info .info-row {
|
|
|
line-height: 26px;
|
|
|
- color: #666;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
|
|
|
.apply-form {
|
|
|
@@ -641,6 +680,7 @@ table {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.doc-input {
|
|
|
+ width: 300px;
|
|
|
text-align: center;
|
|
|
color: #333;
|
|
|
}
|
|
|
@@ -668,7 +708,7 @@ tr td {
|
|
|
.year-input {
|
|
|
input {
|
|
|
width: 100%;
|
|
|
- height: 30px;
|
|
|
+ min-height: 30px;
|
|
|
border: 0;
|
|
|
}
|
|
|
}
|
|
|
@@ -689,3 +729,4 @@ tr td {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
</style>
|
|
|
+
|