|
|
@@ -9,64 +9,100 @@
|
|
|
<div class="info-row">{{ `项目执行期:${ getXmDateRange || '' }` }}</div>
|
|
|
<div class="info-row">
|
|
|
<span>填报时间:</span>
|
|
|
- <span><el-date-picker v-model="formData.fillDate" value-format="yyyy-MM-dd" /></span>
|
|
|
+ <span><el-date-picker v-model="formData.fillDate" value-format="yyyy-MM-dd" @change="handleFillDateChange" :disabled="disabled" /></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<table style="margin-top: 20px;">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td class="doc-label">研发项目名称</td>
|
|
|
+ <td class="doc-label"><span style="color: red; margin-right: 3px;">*</span>研发项目名称</td>
|
|
|
<td class="doc-input">
|
|
|
<project-select
|
|
|
+ v-if="!disabled"
|
|
|
+ ref="proSelect"
|
|
|
v-model="currProjectId"
|
|
|
+ :disabled="!formData.fillDate || disabled"
|
|
|
@change="handleProjectChange"
|
|
|
+ :params="{ yearAndMonth: fillDateYearAndMonth }"
|
|
|
></project-select>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmmc }}</span>
|
|
|
</td>
|
|
|
<td class="doc-label">项目申请单位</td>
|
|
|
- <td class="doc-input">{{ selProject.xmsqdw }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmsqdw }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmsqdw }}</span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">项目编号</td>
|
|
|
- <td class="doc-input">{{ selProject.xmbh }} </td>
|
|
|
- <td class="doc-label">项目实施类型</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmbh }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmbh }}</span>
|
|
|
+ </td>
|
|
|
+ <td class="doc-label"><span style="color: red; margin-right: 3px;">*</span>项目实施类型</td>
|
|
|
<td class="doc-input">
|
|
|
<avue-select
|
|
|
v-model="formData.type"
|
|
|
placeholder="请选择"
|
|
|
:dic="typeList"
|
|
|
style="width: 100%"
|
|
|
+ :disabled="disabled"
|
|
|
></avue-select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">项目负责人</td>
|
|
|
- <td class="doc-input">{{ selProject.xmfzrxm }} </td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmfzrxm }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmfzrxm }}</span>
|
|
|
+ </td>
|
|
|
<td class="doc-label">研究类型</td>
|
|
|
- <td class="doc-input">{{ selProject.yjlx }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.yjlx }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.yjlx }}</span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">研发开始时间</td>
|
|
|
- <td class="doc-input">{{ selProject.xmkssj }} </td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmkssj }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmkssj }}</span>
|
|
|
+ </td>
|
|
|
<td class="doc-label">研发结束时间</td>
|
|
|
- <td class="doc-input">{{ selProject.xmjssj }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmkssj }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmjssj }}</span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">项目来源</td>
|
|
|
- <td class="doc-input">{{ selProject.xmly }} </td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmly }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmly }}</span>
|
|
|
+ </td>
|
|
|
<td class="doc-label">项目开展形式</td>
|
|
|
- <td class="doc-input">{{ selProject.xmkzxs }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmkzxs }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmkzxs }}</span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="doc-label">预期成果形式</td>
|
|
|
- <td class="doc-input">{{ selProject.yqcgxs }} </td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.yqcgxs }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.yqcgxs }}</span>
|
|
|
+ </td>
|
|
|
<td class="doc-label">项目技术经济目标</td>
|
|
|
- <td class="doc-input">{{ selProject.xmjsjjmb }}</td>
|
|
|
+ <td class="doc-input">
|
|
|
+ <span v-if="!disabled">{{ selProject.xmjsjjmb }}</span>
|
|
|
+ <span v-else>{{ formData.xmEntity.xmjsjjmb }}</span>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
@@ -77,22 +113,6 @@
|
|
|
<label>附件信息</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
</template>
|
|
|
- <!-- <template slot="zqbgLabel">
|
|
|
- <label>中期报告</label>
|
|
|
- <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
- </template>
|
|
|
- <template slot="ndbgLabel">
|
|
|
- <label>年度报告</label>
|
|
|
- <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
- </template>
|
|
|
- <template slot="lcbbgLabel">
|
|
|
- <label>里程碑报告</label>
|
|
|
- <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
- </template>
|
|
|
- <template slot="qtjdxzjbgLabel">
|
|
|
- <label>其他阶段性总结报告</label>
|
|
|
- <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
- </template> -->
|
|
|
</avue-form>
|
|
|
<p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
|
|
|
@@ -110,8 +130,11 @@ import moment from "moment";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
- projectId: [String, Number],
|
|
|
- data: Object,
|
|
|
+ implementId: [String, Number],
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
},
|
|
|
components: {
|
|
|
projectSelect
|
|
|
@@ -137,6 +160,9 @@ export default {
|
|
|
}
|
|
|
return `年 月 日至 年 月 日`;
|
|
|
},
|
|
|
+ fillDateYearAndMonth() {
|
|
|
+ return this.formData.fillDate ? moment(this.formData.fillDate).format('yyyyMM') : ''
|
|
|
+ },
|
|
|
option() {
|
|
|
return {
|
|
|
menuBtn: false,
|
|
|
@@ -159,112 +185,13 @@ export default {
|
|
|
window.open(file.url, "_blank");
|
|
|
return;
|
|
|
},
|
|
|
- disabled: !this.currProjectId
|
|
|
+ disabled: !this.currProjectId || this.disabled,
|
|
|
},
|
|
|
- // {
|
|
|
- // label: "季度报告",
|
|
|
- // prop: "jdbg",
|
|
|
- // type: "upload",
|
|
|
- // multiple: true,
|
|
|
- // span: 24,
|
|
|
- // dataType: "object",
|
|
|
- // propsHttp: {
|
|
|
- // url: "link",
|
|
|
- // name: 'originalName',
|
|
|
- // res: "data",
|
|
|
- // },
|
|
|
- // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
- // uploadPreview: (file, column, done) => {
|
|
|
- // window.open(file.url, "_blank");
|
|
|
- // return;
|
|
|
- // },
|
|
|
- // disabled: !this.currProjectId
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: "中期报告",
|
|
|
- // prop: "zqbg",
|
|
|
- // type: "upload",
|
|
|
- // multiple: true,
|
|
|
- // span: 24,
|
|
|
- // dataType: "object",
|
|
|
- // propsHttp: {
|
|
|
- // url: "link",
|
|
|
- // name: 'originalName',
|
|
|
- // res: "data",
|
|
|
- // },
|
|
|
- // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
- // uploadPreview: (file, column, done) => {
|
|
|
- // window.open(file.url, "_blank");
|
|
|
- // return;
|
|
|
- // },
|
|
|
- // disabled: !this.currProjectId
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: "年度报告",
|
|
|
- // prop: "ndbg",
|
|
|
- // type: "upload",
|
|
|
- // multiple: true,
|
|
|
- // span: 24,
|
|
|
- // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
- // uploadPreview: (file, column, done) => {
|
|
|
- // window.open(file.url, "_blank");
|
|
|
- // return;
|
|
|
- // },
|
|
|
- // dataType: "object",
|
|
|
- // propsHttp: {
|
|
|
- // url: "link",
|
|
|
- // name: 'originalName',
|
|
|
- // res: "data",
|
|
|
- // },
|
|
|
- // disabled: !this.currProjectId
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: "里程碑报告",
|
|
|
- // prop: "lcbbg",
|
|
|
- // type: "upload",
|
|
|
- // multiple: true,
|
|
|
- // span: 24,
|
|
|
- // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
- // uploadPreview: (file, column, done) => {
|
|
|
- // window.open(file.url, "_blank");
|
|
|
- // return;
|
|
|
- // },
|
|
|
- // dataType: "object",
|
|
|
- // propsHttp: {
|
|
|
- // url: "link",
|
|
|
- // name: 'originalName',
|
|
|
- // res: "data",
|
|
|
- // },
|
|
|
- // disabled: !this.currProjectId
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: "其他阶段性总结报告",
|
|
|
- // prop: "qtjdxzjbg",
|
|
|
- // type: "upload",
|
|
|
- // multiple: true,
|
|
|
- // span: 24,
|
|
|
- // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
- // uploadPreview: (file, column, done) => {
|
|
|
- // window.open(file.url, "_blank");
|
|
|
- // return;
|
|
|
- // },
|
|
|
- // dataType: "object",
|
|
|
- // propsHttp: {
|
|
|
- // url: "link",
|
|
|
- // name: 'originalName',
|
|
|
- // res: "data",
|
|
|
- // },
|
|
|
- // disabled: !this.currProjectId
|
|
|
- // },
|
|
|
],
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- currProjectId() {
|
|
|
- // this.getImplementDetail();
|
|
|
-
|
|
|
- },
|
|
|
detailData: {
|
|
|
handler(newVal) {
|
|
|
this.formData = newVal || {};
|
|
|
@@ -273,18 +200,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.currProjectId = this.projectId || '';
|
|
|
- // if (this.currProjectId) {
|
|
|
- // this.getImplementDetail();
|
|
|
- // }
|
|
|
-
|
|
|
- this.formData = {
|
|
|
- ...this.data,
|
|
|
- };
|
|
|
-
|
|
|
+ if (this.implementId) {
|
|
|
+ this.getImplementDetail();
|
|
|
+ }
|
|
|
+ console.log(this.disabled)
|
|
|
this.getDictList("项目实施-阶段性报告-附件类型", "typeList");
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleFillDateChange(e) {
|
|
|
+ this.loading = true;
|
|
|
+ this.$refs.proSelect.getProjectList((list) => {
|
|
|
+ let _flag = list.some(item => item.id === this.currProjectId);
|
|
|
+ this.loading = false;
|
|
|
+ if (!_flag) {
|
|
|
+ this.currProjectId = '';
|
|
|
+ this.selProject = {};
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getDictList(code, toListKey) {
|
|
|
getDictionary({ code }).then((res) => {
|
|
|
this[toListKey] = res.data.data.map((item) => {
|
|
|
@@ -292,35 +225,22 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // getImplementDetail() {
|
|
|
- // this.loading = true;
|
|
|
- // getDetail({ xmId: this.currProjectId, yearAndMonth: this.yearAndMonth }).then(({ data }) => {
|
|
|
- // this.loading = false;
|
|
|
- // if (data.code == 200 && data.data && Object.keys(data.data).length) {
|
|
|
- // this.formData = {
|
|
|
- // id: data.data.id,
|
|
|
- // xmId: data.data.xmId,
|
|
|
- // tbsj: data.data.tbsj,
|
|
|
- // jdbg: data.data.jdbg ? JSON.parse(data.data.jdbg) : [],
|
|
|
- // zqbg: data.data.zqbg ? JSON.parse(data.data.zqbg) : [],
|
|
|
- // ndbg: data.data.ndbg ? JSON.parse(data.data.ndbg) : [],
|
|
|
- // lcbbg: data.data.lcbbg ? JSON.parse(data.data.lcbbg) : [],
|
|
|
- // qtjdxzjbg: data.data.qtjdxzjbg ? JSON.parse(data.data.qtjdxzjbg) : [],
|
|
|
- // };
|
|
|
- // } else {
|
|
|
- // this.formData = {
|
|
|
- // tbsj: '',
|
|
|
- // jdbg: [],
|
|
|
- // zqbg: [],
|
|
|
- // ndbg: [],
|
|
|
- // lcbbg: [],
|
|
|
- // qtjdxzjbg: [],
|
|
|
- // };
|
|
|
- // }
|
|
|
- // }).catch(() => {
|
|
|
- // this.loading = false;
|
|
|
- // });
|
|
|
- // },
|
|
|
+ getImplementDetail() {
|
|
|
+ this.loading = true;
|
|
|
+ getDetail(this.implementId).then(({ data }) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.formData = {
|
|
|
+ ...data.data,
|
|
|
+ attachment: JSON.parse(data.data.attachment)
|
|
|
+ };
|
|
|
+ this.currProjectId = data.data.xmId;
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
handleProjectChange(data) {
|
|
|
this.selProject = data;
|
|
|
},
|