diff --git a/src/api/index.js b/src/api/index.js index c0a0f38e4f1ef48ba52cecb285459a4432a88b2b..4f71393d0ceaeca88680d548d491b63f2f34e0d5 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -50,7 +50,7 @@ export default { }, //获取任务书状态 getTaskStateList (params) { - return fetch(`/v1/science-admin/com-project-test/getTaskStateList/`, params) + return fetch(`/v1/science-admin/com-project-task/getTaskStateList/`, params) }, //获取中期考核状态 getCheckStateList (params) { @@ -426,9 +426,6 @@ export default { save (params) { return fetch(`/v1/science-admin/com-project/save`, params, 'post', 'json') }, - saveByStep (params) { - return fetch(`/v1/science-admin/com-project/saveByStep`, params, 'post', 'json') - }, updateUnit (params) { return fetch(`/v1/science-admin/com-project/updateUnit`, params, 'post', 'json') }, @@ -502,25 +499,25 @@ export default { }, taskReport: { getListByPage (params) { - return fetch(`/v1/science-admin/com-project-test/getListByPage`, params) + return fetch(`/v1/science-admin/com-project-task/getListByPage`, params) }, getTestInfoByProjId (params) { - return fetch('/v1/science-admin/com-project-test/getTestInfoByProjId', params) + return fetch('/v1/science-admin/com-project-task/getTestInfoByProjId', params) }, save (params) { - return fetch('/v1/science-admin/com-project-test/save', params, 'post', 'json') + return fetch('/v1/science-admin/com-project-task/save', params, 'post', 'json') }, report (params) { - return fetch(`/v1/science-admin/com-project-test/report`, params, 'post', 'json') + return fetch(`/v1/science-admin/com-project-task/report`, params, 'post', 'json') }, getCount (params) { - return fetch(`/v1/science-admin/com-project-test/getCount`, params) + return fetch(`/v1/science-admin/com-project-task/getCount`, params) }, asyncUploadTaskFile (params) { - return fetch(`/v1/science-admin/com-project-test/asyncUploadTaskFile`, params, 'post', 'file') + return fetch(`/v1/science-admin/com-project-task/asyncUploadTaskFile`, params, 'post', 'file') }, deleteTaskFile (params) { - return fetch(`/v1/science-admin/com-project-test/deleteTaskFile/${params.id}`, params, 'delete', 'json') + return fetch(`/v1/science-admin/com-project-task/deleteTaskFile/${params.id}`, params, 'delete', 'json') }, }, checkReport: { @@ -563,7 +560,7 @@ export default { return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json') }, testAudit (params) { - return fetch(`/v1/science-admin/com-project-test/audit`, params, 'post', 'json') + return fetch(`/v1/science-admin/com-project-task/audit`, params, 'post', 'json') }, checkAudit (params) { return fetch(`/v1/science-admin/com-project-check/audit`, params, 'post', 'json') @@ -584,8 +581,8 @@ export default { }, }, batch: { - getBatchListByPage (params) { - return fetch(`/v1/science-admin/com-batch/getBatchListByPage`, params) + getListByPage (params) { + return fetch(`/v1/science-admin/com-batch/getListByPage`, params) }, addBatch (params) { return fetch('/v1/science-admin/com-batch/addBatch', params, 'post', 'json') @@ -593,24 +590,12 @@ export default { updateBatch (params) { return fetch('/v1/science-admin/com-batch/updateBatch', params, 'post', 'json') }, - getMaxBatch (params) { - return fetch('/v1/science-admin/com-batch/getMaxBatch', params) - }, deleteBatch (params) { return fetch(`/v1/science-admin/com-batch/deleteBatch/${params.id}`, params, 'delete', 'json') }, getCurrentReportYearList (params) { return fetch(`/v1/science-admin/com-batch/getCurrentReportYearList`, params) }, - getListByPage (params) { - return fetch(`/v1/science-admin/com-year/getListByPage`, params) - }, - getApplyYearList (params) { - return fetch('/v1/science-admin/com-year/getApplyYearList', params) - }, - addOrUpdateYearInfo (params) { - return fetch('/v1/science-admin/com-year/addOrUpdateYearInfo', params, 'post', 'json') - }, getBatchById (params) { return fetch(`/v1/science-admin/com-batch/getBatchById/`, params) }, @@ -621,22 +606,8 @@ export default { return fetch('/v1/science-admin/com-batch/getBatchList', params) } }, - year: { - getYearByTreeCode (params) { - return fetch(`/v1/science-admin/com-year/getYearByTreeCode`, params) - }, - getYearInfo (params) { - return fetch(`/v1/science-admin/com-year/getYearInfo`, params) - }, - }, //系统管理接口 systemManage: { - getUnitProjLimit (params) { - return fetch('/v1/science-admin/com-unit/getUnitProjLimit', params) - }, - updateUnitProjLimit (params) { - return fetch('/v1/science-admin/com-unit/updateUnitProjLimit', params, 'put', 'json') - }, getRoleListByPage (params) { return fetch('/v1/science-admin/system-role/getListByPage', params) }, diff --git a/src/router/index.js b/src/router/index.js index 9e4913a96ee4c2d27bcabe5d6fdfea5c1a0e1aea..9f5d47767cdc63213dd1bd8a98b6a7f4526e95c0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -113,13 +113,11 @@ export const routes = [ hidden: false, children: [ { path: '/report/project', name: '项目申报', component: () => import('@/views/report/project/Index.vue'), meta: { title: '项目申报', icon: '', noCache: true } }, - { path: '/report/task', name: '任务书填报1', component: () => import('@/views/report/task/Index.vue'), meta: { title: '任务书填报1', icon: '', noCache: true } }, - { path: '/report/projectTask', name: '任务书填报2', component: () => import('@/views/report/task/projectTask.vue'), meta: { title: '任务书填报2', icon: '', noCache: true } }, - { path: '/report/check', name: '中期考核填报', component: () => import('@/views/report/check/Index.vue'), meta: { title: '中期考核填报', icon: '', noCache: true } }, + { path: '/report/task', name: '合同书上报', component: () => import('@/views/report/task/Index.vue'), meta: { title: '合同书上报', icon: '', noCache: true } }, + { path: '/report/check', name: '中期考核上报', component: () => import('@/views/report/check/Index.vue'), meta: { title: '中期考核上报', icon: '', noCache: true } }, { path: '/report/conclusion', name: '项目结题', component: () => import('@/views/conclusion/index.vue'), meta: { title: '项目结题', icon: '', noCache: true } }, - { path: '/project/create', name: '项目创建', component: () => import('@/views/report/project/components/projectCreate'), meta: { title: '项目创建', icon: '', noCache: true } }, { path: '/query/project', name: '项目申报查询1', component: () => import('@/views/query/project/Index.vue'), meta: { title: '项目申报查询', icon: '', noCache: true } }, - { path: '/query/task', name: '任务书上报查询1', component: () => import('@/views/query/task/Index.vue'), meta: { title: '任务书上报查询', icon: '', noCache: true } }, + { path: '/query/task', name: '合同书查询1', component: () => import('@/views/query/task/Index.vue'), meta: { title: '合同书查询', icon: '', noCache: true } }, { path: '/query/check', name: '中期考核上报查询1', component: () => import('@/views/query/check/Index.vue'), meta: { title: '中期考核上报查询', icon: '', noCache: true } }, ] }, @@ -133,7 +131,7 @@ export const routes = [ { path: '/audit/project', name: '项目审核', component: () => import('@/views/audit/project/Index.vue'), meta: { title: '项目审核', icon: '', noCache: true } }, { path: '/audit/preliminary', name: '项目预审', component: () => import('@/views/audit/project/Index.vue'), meta: { title: '项目预审', icon: '', noCache: true } }, { path: '/audit/final', name: '项目终审', component: () => import('@/views/audit/project/final.vue'), meta: { title: '项目审核', icon: '', noCache: true } }, - { path: '/audit/taskAudit', name: '任务书审核', component: () => import('@/views/audit/task/Index.vue'), meta: { title: '任务书审核', icon: '', noCache: true } }, + { path: '/audit/taskAudit', name: '合同书审核', component: () => import('@/views/audit/task/Index.vue'), meta: { title: '合同书审核', icon: '', noCache: true } }, { path: '/audit/checkAudit', name: '中期考核表审核', component: () => import('@/views/audit/check/Index.vue'), meta: { title: '中期考核表审核', icon: '', noCache: true } }, // { path: '/peAssign', name: '项目组分配', component: () => import('@/views/peAssign/index.vue'), meta: { title: '项目分配', icon: '', noCache: true } }, { path: '/peAssign', name: '项目组分配1', component: () => import('@/views/peAssign/projAssign.vue'), meta: { title: '项目分配', icon: '', noCache: true } }, @@ -217,7 +215,7 @@ export const routes = [ hidden: false, children: [ { path: '/statistic/project', name: '项目申报查询', component: () => import('@/views/statistic/project/Index.vue'), meta: { title: '项目申报查询', icon: '', noCache: true } }, - { path: '/statistic/task', name: '任务书上报查询', component: () => import('@/views/statistic/task/Index.vue'), meta: { title: '任务书上报查询', icon: '', noCache: true } }, + { path: '/statistic/task', name: '合同书上报查询', component: () => import('@/views/statistic/task/Index.vue'), meta: { title: '合同书上报查询', icon: '', noCache: true } }, { path: '/statistic/check', name: '中期考核上报查询', component: () => import('@/views/statistic/check/Index.vue'), meta: { title: '中期考核上报查询', icon: '', noCache: true } }, { path: '/expert/evaluationQuery', name: '评分项目查询', component: () => import('@/views/evaluation/query.vue'), meta: { title: '评分项目查询', icon: '', noCache: true } }, ] @@ -244,11 +242,8 @@ export const routes = [ meta: { title: '系统设置', icon: 'el-icon-s-tools' }, hidden: false, children: [ - { path: '/timeSet/projectTimeSet', name: '申报时间设置', component: () => import('@/views/timeSet/projectTimeSet/Index.vue'), meta: { title: '申报时间设置', icon: '', noCache: true } }, - { path: '/timeSet/taskTimeSet', name: '任务书时间设置', component: () => import('@/views/timeSet/taskTimeSet/Index.vue'), meta: { title: '任务书时间设置', icon: '', noCache: true } }, - { path: '/timeSet/checkTimeSet', name: '中期考核时间设置', component: () => import('@/views/timeSet/checkTimeSet/Index.vue'), meta: { title: '中期考核时间设置', icon: '', noCache: true } }, + { path: '/timeSet/task', name: '合同书时间设置', component: () => import('@/views/timeSet/taskTimeSet/Index.vue'), meta: { title: '合同书时间设置', icon: '', noCache: true } }, { path: '/setting/batch', name: '申报批次设置', component: () => import('@/views/timeSet/batch/Index.vue'), meta: { title: '申报批次设置', icon: '', noCache: true } }, - { path: '/setting/count', name: '申报名额配比', component: () => import('@/views/projAcountSet/projAcountSet.vue'), meta: { title: '申报名额配比管理', icon: '', noCache: true } }, { path: '/system/evaluationStandard', name: '年度评审标准设置', component: () => import('@/views/system/evaluationStandard/index.vue'), meta: { title: '年度评审标准设置', icon: '', noCache: true } }, //后台 { path: '/system/role', name: '角色管理', component: () => import('@/views/system/role/index.vue'), meta: { title: '角色管理', icon: '', noCache: true } }, diff --git a/src/views/assign/components/assignDetail.vue b/src/views/assign/components/assignDetail.vue index fa7babc2f8dcd1324debebe195729f4382959a81..4eb5853c3f5a4388149f183ee9918dc5f7988da6 100644 --- a/src/views/assign/components/assignDetail.vue +++ b/src/views/assign/components/assignDetail.vue @@ -132,7 +132,7 @@ export default { methods: { moment, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.searchForm.assignYear = data.year this.getListByPage() @@ -177,7 +177,7 @@ export default { this.pagination.pageIndex = 1 this.getListByPage() }, - groupChange(value) { + groupChange (value) { this.searchForm.groupId = value }, recordClick (record, type) { diff --git a/src/views/audit/project/Index.vue b/src/views/audit/project/Index.vue index e498b436ebd41d4ff3298193dac71fd817994825..8fa1f07fe5c61bbd1098669fc3a40e1cca932b2f 100644 --- a/src/views/audit/project/Index.vue +++ b/src/views/audit/project/Index.vue @@ -57,9 +57,6 @@ <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false"> <project-view v-model="objectId" @close="closeWindow"></project-view> </a-modal> - <a-modal v-model="taskFileInfoView" title="项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <task-file-info v-model="selectProjId" @close="closeTaskFileInfoWindow" /> - </a-modal> </div> </template> @@ -70,7 +67,6 @@ import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/ import audit from '@/views/audit/project/audit' import batchAudit from '@/views/audit/project/batchAudit' import projectView from '@/views/report/project/components/projectView' -import taskFileInfo from '@/views/report/task/components/taskFileInfo' export default { name: "projectAudit", @@ -177,7 +173,7 @@ export default { this.getListByPage() }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description diff --git a/src/views/audit/project/final.vue b/src/views/audit/project/final.vue index 5001a731c6c5aebd5c712c49fc9b0be63583d8e3..8ac6f2d787b0bb722ab1f4c15552c0a1bcbf2e05 100644 --- a/src/views/audit/project/final.vue +++ b/src/views/audit/project/final.vue @@ -48,7 +48,6 @@ </span> </template> <template slot="option" slot-scope="record"> - <!-- <a-button type="link" size="small" v-if="record.projState >= 50" @click="recordClick(record, 'viewProjectTask')">查看任务书</a-button> --> <a-button type="link" size="small" @click="recordClick(record, 'evaluation')">专家评审明细</a-button> <a-button type="link" size="small" v-if="record.auditResult == 1" @click="recordClick(record, 'audit')">审核</a-button> </template> @@ -79,9 +78,6 @@ <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false"> <project-view v-model="objectId" @close="closeWindow"></project-view> </a-modal> - <a-modal v-model="taskFileInfoView" title="查看项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <task-file-info v-model="ProjId" @close="() => this.taskFileInfoView = false" /> - </a-modal> <a-modal v-model="visibleEvaluationView" title="专家评分" width="90%" :dialog-style="{ top: '8%' }" :footer="null" destroyOnClose> <score-view v-model="assignId" @close="() => this.visibleEvaluationView = false" /> </a-modal> @@ -101,13 +97,12 @@ import audit from '@/views/audit/project/audit' import batchAudit from '@/views/audit/project/batchAudit' import projectView from '@/views/report/project/components/projectView' import unitTreeSelect from '@/views/components/common/unitTreeSelect' -import taskFileInfo from '@/views/report/task/components/taskFileInfo' import scoreView from '@/views/evaluation/components/scoreView' export default { name: "projectFinal", components: { - projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, taskFileInfo, scoreView, batchAudit + projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, scoreView, batchAudit }, data () { return { @@ -197,8 +192,6 @@ export default { id: null, assignId: null, objectId: null, - taskFileInfoView: false, - ProjId: null, }; }, created () { @@ -231,7 +224,7 @@ export default { this.getListByPage() }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 2, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 2, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description @@ -318,10 +311,7 @@ export default { } else if (type === 'evaluation') { this.objectId = record.auditObjectId this.assignInfoVisible = true - } else if (type === 'viewProjectTask') { - this.ProjId = record.auditObjectId - this.taskFileInfoView = true; - } else if (type === 'eView') { + } else if (type === 'eView') { this.assignId = record.id this.visibleEvaluationView = true } diff --git a/src/views/audit/project/finalJudgment.vue b/src/views/audit/project/finalJudgment.vue index 89a2baf77b2c9c7dbcc81fec939d5b3a33560f7f..7037e864de3c81ba77334005d2c9f2533b3c77d5 100644 --- a/src/views/audit/project/finalJudgment.vue +++ b/src/views/audit/project/finalJudgment.vue @@ -174,7 +174,7 @@ export default { methods: { isEmptyParams, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.searchForm.groupYear = data.year diff --git a/src/views/audit/task/Index.vue b/src/views/audit/task/Index.vue index bd15bf3f7858bf4459445d55a47b0c46067ec728..ab2b89ef41b771a7732ada737c93f2d1265bb5dd 100644 --- a/src/views/audit/task/Index.vue +++ b/src/views/audit/task/Index.vue @@ -153,17 +153,14 @@ export default { this.getListByPage() }, getYear () { - let pars = { type: 2 } - this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 2, projType: getType(), timeType: 2 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description - this.searchForm.reportYear = data.reportYear + this.searchForm.reportYear = data.year this.getListByPage() } - }).catch(() => { - this.loading = false - }) + }).catch(() => { }) }, getListByPage () { this.getCount() diff --git a/src/views/components/common/cascaderSelect.vue b/src/views/components/common/cascaderSelect.vue index 326cfc2dcf1cb251f1e114e391fb0e09ca486ed7..e449990710e9c56631ca2490f5465aba25ea25ed 100644 --- a/src/views/components/common/cascaderSelect.vue +++ b/src/views/components/common/cascaderSelect.vue @@ -53,11 +53,13 @@ export default { }) }, getSpecInfo (key) { + console.log(this.specArray, this.value,1) let newArray = this.specArray.filter( function (el) { return el.key == key } ); + console.log(this.specArray, newArray, this.value,2) if (!!newArray && newArray.length > 0) return [newArray[0].ppkey, newArray[0].pkey, newArray[0].key] else diff --git a/src/views/evaluation/components/score.vue b/src/views/evaluation/components/score.vue index a700dcf17e8bbfbab0f242661d96c9d0c74e64d1..cb76ba6c0a44865010719fcce4c14c1eadf6481b 100644 --- a/src/views/evaluation/components/score.vue +++ b/src/views/evaluation/components/score.vue @@ -274,7 +274,7 @@ export default { methods: { moment, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.comBatch = data } diff --git a/src/views/evaluation/evaluation.vue b/src/views/evaluation/evaluation.vue index 9d883636899d57538f6e5a0a2a61c49f9616875f..be96fb56e204a058cea36b64f3b1a781f0455739 100644 --- a/src/views/evaluation/evaluation.vue +++ b/src/views/evaluation/evaluation.vue @@ -85,7 +85,7 @@ export default { methods: { moment, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description diff --git a/src/views/evaluation/index.vue b/src/views/evaluation/index.vue index b2781c4ad63cd933d9cc44d97e4301f2c8cb5c6e..44fef5ebabc9a23e10cf1c7a9f9da74ea58ae708 100644 --- a/src/views/evaluation/index.vue +++ b/src/views/evaluation/index.vue @@ -110,7 +110,7 @@ export default { methods: { moment, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 5, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description diff --git a/src/views/expert/components/expertEdit.vue b/src/views/expert/components/expertEdit.vue index 0c8e564a74b0851e032f1b0e5dc715091f2fda8d..4e569b324cc46d9cb0b760f104f68e0a65410c0c 100644 --- a/src/views/expert/components/expertEdit.vue +++ b/src/views/expert/components/expertEdit.vue @@ -222,6 +222,7 @@ export default { }).catch(() => { this.loading = false }) }, submit () { + console.log(this.formData) if (!!!this.formData.specList || this.formData.specList.length == 0) { this.$message.error('请选择评审专业!') return false diff --git a/src/views/expert/evaluationStatistic.vue b/src/views/expert/evaluationStatistic.vue index e5f10226bbc09550684f59538bc849139c836779..5eae66042a47fe84593a2397291fdd3ca4735d42 100644 --- a/src/views/expert/evaluationStatistic.vue +++ b/src/views/expert/evaluationStatistic.vue @@ -125,7 +125,7 @@ export default { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.searchForm.groupYear = data.year this.getListByPage() diff --git a/src/views/expert/index.vue b/src/views/expert/index.vue index 24910bd8edf0eee455e3a737ca21ff7ac1bc5c43..5ad95385c734c555e15f8d99003a81dd70b8da87 100644 --- a/src/views/expert/index.vue +++ b/src/views/expert/index.vue @@ -55,7 +55,7 @@ <a-button type="link" size="small" @click="recordClick(record,'report')" v-if="!isTopGov&&record.reportState!=2">上报</a-button> <a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button> <a-button type="link" size="small" @click="recordClick(record,'reset')">重置密码</a-button> - <a-button type="link" size="small" @click="recordClick(record,'del')">删除</a-button> + <a-button type="link" size="small" @click="recordClick(record,'del')" v-if="isTopGov||record.reportState==1">删除</a-button> </template> </a-table> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> diff --git a/src/views/home/components/dashboardGov.vue b/src/views/home/components/dashboardGov.vue index a7fb69f13d42f1d6559387d912ecf9b079d8f9e4..d1cc7369600fe8340d6730c644e25204cf0fb61b 100644 --- a/src/views/home/components/dashboardGov.vue +++ b/src/views/home/components/dashboardGov.vue @@ -92,7 +92,7 @@ export default { }).catch(() => { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.changeType() diff --git a/src/views/home/components/dashboardTop.vue b/src/views/home/components/dashboardTop.vue index a1be0009f9f9839636df5987e0cc6b3bafea68f1..9c71b56ab072c828d6070982d7d0e69bdd2d4444 100644 --- a/src/views/home/components/dashboardTop.vue +++ b/src/views/home/components/dashboardTop.vue @@ -92,7 +92,7 @@ export default { }).catch(() => { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.changeType() diff --git a/src/views/home/components/dashboardUnit.vue b/src/views/home/components/dashboardUnit.vue index 49973c159ed8e6e218b0861efa78bfea3c6b6017..960ea3a5369e1b66ac75f76e848851ee7f1d1901 100644 --- a/src/views/home/components/dashboardUnit.vue +++ b/src/views/home/components/dashboardUnit.vue @@ -67,7 +67,7 @@ export default { }).catch(() => { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() , timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year } diff --git a/src/views/manager/person/components/personEdit.vue b/src/views/manager/person/components/personEdit.vue index f74770698c8cb55b72ad79c84b11d37a871c5ac4..4c4fd32b6edc1d80ce54af30e9fe6c70323ba888 100644 --- a/src/views/manager/person/components/personEdit.vue +++ b/src/views/manager/person/components/personEdit.vue @@ -107,33 +107,32 @@ export default { data () { return { formData: { - id: null, certId: null, sex: null, unitId: null, birthday: null, mobile: null, email: null, title: null, unitId: null, education: null, spec: null, address: null, treeCode: null + id: null, certId: null, sex: null, birthday: null, mobile: null, email: null, title: null, education: null, spec: null, address: null, treeCode: null }, rules: { personName: [{ required: true, message: '请输入姓名', trigger: 'blur' }], - certId: [{ required: true, message: '请输入证件号', trigger: 'blur' }, - { - validator: (rule, value, callback) => { - if (value == '' || value == undefined) { - callback() - } - var errorMsg = isIdentityId(value); - if (errorMsg != "") { - callback(new Error(errorMsg)); - } else { - let pars = { certId: this.formData.certId, id: this.formData.id } - this.$api.base.checkCertIdById(pars).then(({ data = {} }) => { - if (data) { - callback(new Error("证件号已存在")); - } else - callback() - }) - } - } - }], + // certId: [{ required: true, message: '请输入证件号', trigger: 'blur' }, + // { + // validator: (rule, value, callback) => { + // if (value == '' || value == undefined) { + // callback() + // } + // var errorMsg = isIdentityId(value); + // if (errorMsg != "") { + // callback(new Error(errorMsg)); + // } else { + // let pars = { certId: this.formData.certId, id: this.formData.id } + // this.$api.base.checkCertIdById(pars).then(({ data = {} }) => { + // if (data) { + // callback(new Error("证件号已存在")); + // } else + // callback() + // }) + // } + // } + // }], email: [{ required: false, message: '请输入邮箱', trigger: 'blur' }], title: [{ required: false, message: '请选择职称', trigger: 'change' }], - unitId: [{ required: false, message: '请选择单位', trigger: 'change' }], education: [{ required: false, message: '请选择学历', trigger: 'change' }], spec: [{ required: false, message: '请选择专业', trigger: 'change' }], treeCode: [{ required: false, message: '请选择单位', trigger: 'change' }], diff --git a/src/views/manager/project/index.vue b/src/views/manager/project/index.vue index 38ff64c5167e39347b6b6cf5fdb33331390d13f9..37818a873aaf74c63a97a0652eee7cd0e8a19113 100644 --- a/src/views/manager/project/index.vue +++ b/src/views/manager/project/index.vue @@ -28,7 +28,7 @@ <div class="submit-btn"> <!-- <a-button type="primary" @click="importExcel">项目导入</a-button> --> <a-button type="primary" @click="exportData" icon="download">Excel</a-button> - <a-button type="primary" @click="conclusionSubmit">项目结题</a-button> + <!-- <a-button type="primary" @click="conclusionSubmit">项目结题</a-button> --> </div> <a-table :dataSource="tableData" :columns="columns" :scroll="{ x: 'max-content' }" rowKey="id" :pagination="false" :loading="loading" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"> <template slot="projName" slot-scope="record"> @@ -65,7 +65,7 @@ import moment from 'moment' import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; import projectView from '@/views/report/project/components/projectView' -import projectCreate from '@/views/report/project/components/edit/projectCreate' +import projectCreate from '@/views/report/project/components/projectCreate' import paraSelect from '@/views/components/common/paraSelect' import baseSelect from '@/views/components/common/baseSelect' import projectImport from '@/views/manager/project/components/projectImport'; diff --git a/src/views/peAssign/components/evaluationStatistic.vue b/src/views/peAssign/components/evaluationStatistic.vue index 54435950cd281b83e86dcaf1719c3b4aa8eadd8e..69575fe35b8d1f5b0d3e4c7f8ceb9249e38ee31f 100644 --- a/src/views/peAssign/components/evaluationStatistic.vue +++ b/src/views/peAssign/components/evaluationStatistic.vue @@ -38,7 +38,7 @@ export default { }, methods: { getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.getEvaluationStatistic() diff --git a/src/views/peAssign/components/groupEdit.vue b/src/views/peAssign/components/groupEdit.vue index c82fb0564e99247806ac3fd4c55e8eea66af36c7..4f945881291a6820914f7e634b3ce450f5622cac 100644 --- a/src/views/peAssign/components/groupEdit.vue +++ b/src/views/peAssign/components/groupEdit.vue @@ -135,7 +135,7 @@ export default { methods: { moment, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.formData.groupYear = data.year + '' } diff --git a/src/views/peAssign/components/knowledgeSelect.vue b/src/views/peAssign/components/knowledgeSelect.vue index 0ea704d6b3c796c6cbeeb4b0f7988a9ac52c643d..2f6ce5750f4359ff916d29828ee3714d655a191c 100644 --- a/src/views/peAssign/components/knowledgeSelect.vue +++ b/src/views/peAssign/components/knowledgeSelect.vue @@ -60,7 +60,7 @@ export default { }, methods: { getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.totalTitle = this.reportYear + '项目二级学科选择' diff --git a/src/views/peAssign/components/projectSelect.vue b/src/views/peAssign/components/projectSelect.vue index 907dcac21f82cdfa38e86e3d2e407bf8898d60a3..276c5926d8ed76496ccc22b3f0af0945be9c3c52 100644 --- a/src/views/peAssign/components/projectSelect.vue +++ b/src/views/peAssign/components/projectSelect.vue @@ -76,7 +76,7 @@ export default { }, methods: { getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.searchForm.reportYear = data.year this.getListByPage() diff --git a/src/views/peAssign/components/projectSelectIntoGroup.vue b/src/views/peAssign/components/projectSelectIntoGroup.vue index 78c4afd3d278d162cb3328b6a4d0bf77e414ae30..628636f9b157b4cc910c236c0b4e933296be3871 100644 --- a/src/views/peAssign/components/projectSelectIntoGroup.vue +++ b/src/views/peAssign/components/projectSelectIntoGroup.vue @@ -90,7 +90,7 @@ export default { }, methods: { getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.searchForm.reportYear = data.year this.getListByPage() diff --git a/src/views/peAssign/components/projectStatistic.vue b/src/views/peAssign/components/projectStatistic.vue index 65d9ecc223e994c896b7586ec2da721756bd28cb..e741992b2ef18401321a2928a68baf5ac9de937c 100644 --- a/src/views/peAssign/components/projectStatistic.vue +++ b/src/views/peAssign/components/projectStatistic.vue @@ -49,7 +49,7 @@ export default { }, methods: { getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.getProjectExpertGroupStatistic() diff --git a/src/views/peAssign/index.vue b/src/views/peAssign/index.vue index 70b94c27c62eb5070b7051b9f0eedac180dcaabb..d229099cc11f0e91b614bba8c40cdcbb5504cfe8 100644 --- a/src/views/peAssign/index.vue +++ b/src/views/peAssign/index.vue @@ -172,7 +172,7 @@ export default { methods: { isEmptyParams, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.searchForm.groupYear = data.year diff --git a/src/views/peAssign/projKeyAssign.vue b/src/views/peAssign/projKeyAssign.vue index 9648b24232c099f97077e58f64fb816227cd88a9..986aee20f0db82d45e227c648e14f8035159ccc4 100644 --- a/src/views/peAssign/projKeyAssign.vue +++ b/src/views/peAssign/projKeyAssign.vue @@ -188,7 +188,7 @@ export default { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.searchForm.groupYear = data.year diff --git a/src/views/peAssign/projKnowledgeAssign.vue b/src/views/peAssign/projKnowledgeAssign.vue index 1a2be42f38c7bea61110ed5396301cb2efa6fcb3..e4b9ed85f4a669ba916ba47aaa983db15d081f0a 100644 --- a/src/views/peAssign/projKnowledgeAssign.vue +++ b/src/views/peAssign/projKnowledgeAssign.vue @@ -196,7 +196,7 @@ export default { }) }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() , timeType: 1 }).then(({ data = {} }) => { if (data) { this.reportYear = data.year this.searchForm.groupYear = data.year diff --git a/src/views/projAcountSet/projAcountSet.vue b/src/views/projAcountSet/projAcountSet.vue deleted file mode 100644 index 0c63f2e92e282ade001ccd66b208758a47fa6f90..0000000000000000000000000000000000000000 --- a/src/views/projAcountSet/projAcountSet.vue +++ /dev/null @@ -1,202 +0,0 @@ -<template> - <div class="card-container"> - <a-tabs type="card" @change="tabChange"> - <a-tab-pane key="1" tab="市州(含辖区所有医疗机构)"> - <div class="from-table"> - <a-row> - <a-col style="text-align:center;"> - <span style="font-size:20pt">{{year}}年度州市医疗行政单位配比</span> - </a-col> - </a-row> - <a-row> - <a-col :span="24/colCounts[colCountKey]/2" class="bg-light_blue"> - 名额配比数量批量设置: - </a-col> - <a-col :span="24/colCounts[colCountKey]/2"> - <a-input-number v-model="batchValueCount" :min="0" :max="1000" /> - </a-col> - <a-col :span="24/colCounts[colCountKey]/2"> - <a-button type="primary" @click="setBatchUnitCount">批量设置</a-button> - </a-col> - <a-col :span="6"> - 州市行政机构数:<span style="color:red">{{unitGovCount}}</span> - </a-col> - <a-col :span="9"> - </a-col> - </a-row> - <a-row> - <unit-count v-for="unit in unitGovInfo" :key="unit.id" :Unit="unit" :colCount="24/colCounts[colCountKey]" @valueChange="valueChange" /> - </a-row> - <a-row> - <a-col style="text-align:center;"> - <a-button type="primary" @click="saveUnitCount">保存</a-button> - </a-col> - </a-row> - </div> - </a-tab-pane> - <a-tab-pane key="2" tab="省直属单位名额配比"> - <div class="from-table"> - <a-row> - <a-col style="text-align:center;"> - <span style="font-size:20pt">{{year}}年度省直医疗机构配比设置</span> - </a-col> - </a-row> - <a-row> - <a-col :span="24/colCounts[colCountKey]/2" class="bg-light_blue"> - 名额配比数量批量设置: - </a-col> - <a-col :span="24/colCounts[colCountKey]/2"> - <a-input-number v-model="batchValueCount" :min="0" :max="1000" /> - </a-col> - <a-col :span="24/colCounts[colCountKey]/2"> - <a-button type="primary" @click="setBatchUnitCount">批量设置</a-button> - </a-col> - <a-col :span="6"> - 省直医疗机构数:<span style="color:red">{{unitComCount}}</span> - </a-col> - <a-col :span="9"> - </a-col> - </a-row> - <a-row> - <unit-count v-for="unit in unitComInfo" :key="unit.id" :Unit="unit" :colCount="24/colCounts[colCountKey]" /> - </a-row> - <a-row> - <a-col style="text-align:center;"> - <a-button type="primary" @click="saveUnitCount">保存</a-button> - </a-col> - </a-row> - </div> - </a-tab-pane> - </a-tabs> - </div> - <!-- <a-row> - <a-col></a-col> - </a-row> --> -</template> - -<script> -import { isEmptyParams } from "@/views/utils/common" -import UnitCount from "@/views/unit/components/unitCount.vue" -import moment from "moment" - -export default { - name: "projAcountSet", - components: { - UnitCount, - }, - data () { - const colCounts = {}; - [2, 3, 4, 6, 8, 12].forEach((value, i) => { - colCounts[i] = value; - }); - return { - unitGovInfo: [], - unitComInfo: [], - colCounts, - colCountKey: 1, - queryType: 1, - batchValueCount: 0, - year: moment().format('YYYY'), - unitGovCount: 0, - unitComCount: 0, - }; - }, - created () { - this.unitCount() - }, - methods: { - moment, - tabChange (key) { - this.queryType = key - this.unitCount() - }, - unitCount () { - let pars = { queryType: this.queryType } - let par = { - ...pars, - } - this.$api.systemManage.getUnitProjLimit(par).then(({ data = {} }) => { - if (data) { - if (this.queryType == 1) { - this.unitGovInfo = data - this.unitGovCount = data.length - } - else { - this.unitComInfo = data - this.unitComCount = data.length - } - } - }) - }, - valueChange (unit) { - if (this.queryType == 1) { - let arr = this.unitGovInfo.filter(p => p.id === unit.id) - arr[0].projLimit = unit.projLimit - } else { - let arr = this.unitComInfo.filter(p => p.id === unit.id) - arr[0].projLimit = unit.projLimit - } - }, - setBatchUnitCount () { - if (this.queryType == 1) - this.unitGovInfo.forEach(p => { - p.projLimit = this.batchValueCount - }) - else - this.unitComInfo.forEach(p => { - p.projLimit = this.batchValueCount - }) - }, - saveUnitCount () { - if (this.queryType == 1) { - let unitGovList = this.unitGovInfo.filter(p => p.projLimit !== null) - let pars = unitGovList - this.$api.systemManage.updateUnitProjLimit(pars).then(({ data = {} }) => { - if (data) { - this.unitGovInfo = [] - this.$message.info(data) - this.unitCount() - } - }) - } else { - let unitComList = this.unitComInfo.filter(p => p.projLimit !== null) - let pars = unitComList - this.$api.systemManage.updateUnitProjLimit(pars).then(({ data = {} }) => { - if (data) { - this.unitComInfo = [] - this.$message.info(data) - this.unitCount() - } - }) - } - } - } -}; -</script> - -<style> -.card-container { - background: #f5f5f5; - overflow: hidden; - padding: 24px; -} -.card-container > .ant-tabs-card > .ant-tabs-content { - height: 100vh; - margin-top: -16px; -} -.card-container > .ant-tabs-card > .ant-tabs-content > .ant-tabs-tabpane { - background: #fff; - padding: 16px; -} -.card-container > .ant-tabs-card > .ant-tabs-bar { - border-color: #fff; -} -.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab { - border-color: transparent; - background: transparent; -} -.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab-active { - border-color: #fff; - background: #fff; -} -</style> diff --git a/src/views/query/project/Index.vue b/src/views/query/project/Index.vue index 11daba2aab48187185406a7d915911abfcca46b6..ecd1e60807934af116c4319dbc8b9f991ba96360 100644 --- a/src/views/query/project/Index.vue +++ b/src/views/query/project/Index.vue @@ -13,7 +13,6 @@ <a-form-item> <base-select v-model="searchForm.projState" :title="'状态'" :type="1" :isAll="true" :width="160" /> </a-form-item> - <para-multi-select2 :typeId="6" /> <a-form-item> <a-button type="primary" icon="search" @click="search">搜索</a-button> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> @@ -82,17 +81,6 @@ export default { created () { }, methods: { - search () { - this.pagination.pageIndex = 1 - this.getListByPage() - }, - reset () { - this.searchForm.projName = null - this.searchForm.projNo = null - this.searchForm.projState = '' - this.pagination.pageIndex = 1 - this.getListByPage() - }, getListByPage () { this.loading = true let pars = isEmptyParams(this.searchForm) @@ -114,6 +102,17 @@ export default { this.loading = false }) }, + search () { + this.pagination.pageIndex = 1 + this.getListByPage() + }, + reset () { + this.searchForm.projName = null + this.searchForm.projNo = null + this.searchForm.projState = '' + this.pagination.pageIndex = 1 + this.getListByPage() + }, change () { this.getListByPage() }, diff --git a/src/views/query/task/Index.vue b/src/views/query/task/Index.vue index 38fd473e93e9632611e9b579aa201f24a8179679..a614056092f868d7381823b19a1fdc2551d8ee57 100644 --- a/src/views/query/task/Index.vue +++ b/src/views/query/task/Index.vue @@ -1,104 +1,68 @@ <template> - <div class="report" ref="report"> - <a-form class="search_form" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" :model="searchForm"> - <a-row> - <a-col :span="6"> - <a-form-item label="项目名称"> - <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 272px" /> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item label="项目编号"> - <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 272px" /> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item label="项目类别"> - <para-select v-model="searchForm.projClass" :typeId="52" /> - </a-form-item> - </a-col> - </a-row> - <a-row> - <a-col :span="6"> - <a-form-item label="年度"> - <base-select v-model="searchForm.reportYear" :type="4" :isAll="true" /> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item label="任务书状态"> - <base-select v-model="searchForm.testState" :type="2" :isAll="true" /> - </a-form-item> - </a-col> - <a-col :span="6"> - <a-form-item> - <a-button type="primary" icon="search" @click="search">搜索</a-button> - <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> - </a-form-item> - </a-col> - </a-row> + <div class="app-content"> + <a-form :form="form" :model="searchForm" ref="formRef" layout="inline" class="search_form"> + <a-form-item> + <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 160px" /> + </a-form-item> + <a-form-item> + <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 160px" /> + </a-form-item> + <a-form-item> + <base-select v-model="searchForm.reportYear" :title="'年度'" :type="7" :isAll="true" :width="160" /> + </a-form-item> + <a-form-item> + <base-select v-model="searchForm.taskState" :title="'状态'" :type="2" :isAll="true" :width="160" /> + </a-form-item> + <a-form-item> + <a-button type="primary" icon="search" @click="search">搜索</a-button> + <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> + </a-form-item> </a-form> - <a-row> - <a-col :span="18"> - <a-button type="primary" @click="exportData">导出Excel</a-button> - </a-col> - </a-row> - <div style="margin-top: 8px;"></div> - <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> - <template slot="testStateName" slot-scope="record"> - <span v-if="record"> - {{record}} - </span> - <span v-else> - 未填写 - </span> + <a-divider style="height: 1px; background-color: #e8e8e8;" /> + <div class="submit-btn"> + <a-button type="primary" @click="exportData" icon="download">Excel</a-button> + </div> + <a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading"> + <template slot="taskStateName" slot-scope="record"> + <span>{{record.taskStateName}}</span> </template> <template slot="option" slot-scope="record"> <a-button type="link" size="small" @click="recordClick(record, 'view')">查看</a-button> </template> </a-table> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal v-model="visibleEdit" title="修改" :width="'86%'" :dialog-style="{ top: '20px' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <test-edit v-model="projId" @close="closeWindow" /> - </a-modal> - <a-modal v-model="visibleView" title="查看任务书" :width="'86%'" :dialog-style="{ top: '20px' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <test-view v-model="projId" @close="closeWindow" /> + <a-modal v-model="visibleView" title="查看任务书" :width="'94%'" :dialog-style="{ top: '8%' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> + <task-view v-model="projId" @close="closeWindow" /> </a-modal> </div> </template> <script> +import { getType } from '@/views/utils/auth' import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; -import TestEdit from "@/views/report/task/components/taskEdit.vue" -import TestView from "@/views/report/task/components/taskView.vue" -import paraSelect from '@/views/components/common/paraSelect' -import baseSelect from '@/views/components/common/baseSelect' +import taskView from "@/views/report/task/components/taskView" export default { name: 'queryTask', components: { - TestView, TestEdit, paraSelect, baseSelect + taskView }, data () { return { + form: this.$form.createForm(this, { name: 'advanced_search' }), // 表单 - searchForm: { projName: null, projNo: null, projClass: null, reportYear: null, testState: null }, + searchForm: { projName: null, projNo: null, projClass: null, reportYear: null, taskState: null, projType: getType() }, tableData: [], columns: [ - { title: '项目名称', dataIndex: 'projName' }, - { title: '项目编号', dataIndex: 'projNo' }, - { title: '版本号', dataIndex: 'versionNo' }, - { title: '项目类别', dataIndex: 'projClassName' }, - { title: '任务书开始时间', dataIndex: 'startDate' }, - { title: '任务书结束时间', dataIndex: 'endDate' }, - { title: '申报年度', dataIndex: 'reportYear' }, - { title: '状态', dataIndex: 'testStateName', scopedSlots: { customRender: 'testStateName' }, width: '100px', }, - { title: '操作', fixed: 'right', scopedSlots: { customRender: 'option' } } + { title: '项目名称', dataIndex: 'projName', align: 'center' }, + { title: '项目编号', dataIndex: 'projNo', align: 'center' }, + { title: '项目类别', dataIndex: 'projClassName', align: 'center' }, + { title: '开始时间', dataIndex: 'startDate', align: 'center' }, + { title: '结束时间', dataIndex: 'endDate', align: 'center' }, + { title: '申报年度', dataIndex: 'reportYear', align: 'center' }, + { title: '状态', scopedSlots: { customRender: 'taskStateName' }, align: 'center' }, + { title: '操作', fixed: 'right', scopedSlots: { customRender: 'option' }, align: 'center' } ], - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, + pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, }, loading: false, // 弹窗标志 visibleView: false, @@ -113,22 +77,10 @@ export default { this.getListByPage() }, methods: { - search () { - this.pagination.pageIndex = 1 - this.getListByPage() - }, - reset () { - this.pagination.pageIndex = 1 - this.getListByPage() - }, getListByPage () { this.loading = true let pars = isEmptyParams(this.searchForm) - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } + let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } this.$api.taskReport.getListByPage(par).then(({ data = {} }) => { if (data) { const { dataList = [], total = 0 } = data @@ -140,7 +92,16 @@ export default { this.loading = false }) }, - submitForm () { + search () { + this.pagination.pageIndex = 1 + this.getListByPage() + }, + reset () { + this.searchForm.projName = null + this.searchForm.projNo = null + this.searchForm.taskState = '' + this.pagination.pageIndex = 1 + this.getListByPage() }, change () { this.getListByPage() diff --git a/src/views/report/project/Index.vue b/src/views/report/project/Index.vue index 530d0bb0180649b5fb5ffe791ea03bfa3ea8247f..8871955ab71b8df1f7c53168505744c37b611753 100644 --- a/src/views/report/project/Index.vue +++ b/src/views/report/project/Index.vue @@ -10,8 +10,6 @@ <a-form-item> <a-button type="primary" icon="search" @click="search">搜索</a-button> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> - <!-- <a-button type="primary" style="margin-left: 10px" @click="FileDownload" icon="download">项目合同书模板下载</a-button> --> - <!-- <a-button icon="primary" style="margin-left: 10px" @click="FileView">查看</a-button> --> </a-form-item> </a-form> <div style="width:100%;margin-bottom: 8px;"> @@ -19,8 +17,6 @@ <btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" /> </div> <div style="display: inline-block;;width:50%;text-align: right;"> - <!-- <a-button type="primary" @click="projectKPI" icon="download">绩效指标表</a-button> --> - <!-- <a-button type="primary" @click="createMember">新建项目组成员</a-button> --> <a-button type="primary" style="margin-right:8px;" v-if="(display && isButten)" @click="createProject">新建项目</a-button> <a-button type="primary" @click="exportData" icon="download">Excel</a-button> </div> @@ -56,9 +52,6 @@ <a-modal v-model="visibleFileView" title="查看" width="1000px" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose :maskClosable="false"> <preview-file v-model="realurl.downloadUrl" :fileName="realurl.fileName"></preview-file> </a-modal> - <a-modal v-model="projectKPIView" title="查看项目KPI" width="80%" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose :maskClosable="false"> - <project-kpi></project-kpi> - </a-modal> <a-modal v-model="visiblePersonEdit" v-if="visiblePersonEdit" title="请先完善个人信息!" width="700px" :dialog-style="{ top: '12%' }" :footer="null" destroyOnClose :maskClosable="false"> <person-info-edit @sub="personSave" /> </a-modal> @@ -69,7 +62,7 @@ import { getType, getComplete, setComplete } from '@/views/utils/auth' import moment from 'moment' import { isEmptyParams, filterExportExcelData, tableColumnsName, checkEmail, personGender, personBirthday, checkImageFileType, checkDocumentFileType } from "@/views/utils/common" -import projectCreate from '@/views/report/project/components/edit/projectCreate' +import projectCreate from '@/views/report/project/components/projectCreate' import projectView from '@/views/report/project/components/projectView' import previewFile from '@/views/components/common/previewFile' import knowledgeSelect from '@/views/components/common/knowledgeSelect' @@ -149,7 +142,7 @@ export default { this.visibleEdit = true }, getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 1 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description diff --git a/src/views/report/project/components/edit/projectEdit.vue b/src/views/report/project/components/edit/projectEdit.vue deleted file mode 100644 index ae3f0d18f2b5bd3fd19fc198c1907a60a1398d4d..0000000000000000000000000000000000000000 --- a/src/views/report/project/components/edit/projectEdit.vue +++ /dev/null @@ -1,1039 +0,0 @@ -<template> - <div> - <a-form-model ref="form" :model="formData" :rules="rules" style="border-top: 0px" class="from-table font-line-space"> - <div v-if="stepsArray[0].showStatus"> - <a-row> - <a-col :span="24" style="border-top: 0px;text-align: center;"> - <div class="main-title"> - <span>项目基本情况</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>申请人信息</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>姓名</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appPersonName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>性别</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.sex }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>出生日期</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - {{ moment(formData.birthday).format('YYYY-MM-DD') }} - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>民族</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.nationName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>学位</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.degreeName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>职称</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - {{ formData.titleName}} - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>电话</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.mobile }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>电子邮箱</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.email }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">每年工作时间(月)</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item prop="jobTime"> - <a-input-number v-model="formData.jobTime" :min="0" :max="12" :step="1" style="width: 100px" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">个人通讯地址</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item prop="address"> - <a-input v-model="formData.address" placeholder="个人通讯地址(限50字)" :maxLength="50" style="width: 80%;" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>工作单位</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appUnitName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要研究领域</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item prop="mainResearchAreas"> - <a-textarea placeholder="主要研究领域(限500字)" v-model="formData.mainResearchAreas" :maxLength="500" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>申请单位信息</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>单位名称</div> - </div> - </a-col> - <a-col :span="20"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appUnitName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">联系人</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkName"> - <a-input placeholder="联系人(限20字)" v-model="formData.unitLinkName" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">电话</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkMobile"> - <a-input placeholder="电话(限20字)" v-model="formData.unitLinkMobile" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">电子信箱</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkEmail"> - <a-input placeholder="电子信箱(限50字)" v-model="formData.unitLinkEmail" :maxLength="50" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">传真</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkFax"> - <a-input placeholder="传真(限20字)" v-model="formData.unitLinkFax" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - - <!-- 项目合作单位 --> - <!-- <cooperative-units-edit :cooperativeUnits.sync="formData.cooperativeUnits" /> --> - - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>项目基本情况</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目名称</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projName"> - <a-input placeholder="项目名称(限100字)" v-model="formData.projName" :maxLength="100" style="width: 80%" @change="projNameChange" /> - </a-form-model-item> - </a-col> - </a-row> - - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">学科代码</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="knowledgeId"> - <cascader-select v-model="formData.knowledgeId" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">附注说明</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="remark"> - <a-input placeholder="附注说明(限300字)" v-model="formData.remark" :maxLength="300" style="width: 80%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项日开始时间</div> - </div> - </a-col> - <a-col :span="8"> - <a-form-model-item prop="startDate" style="width:200px;display: inline-block;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" @change="startDateChange" style="width: 180px" /> - </a-form-model-item> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目结束时间</div> - </div> - </a-col> - <a-col :span="8"> - <a-form-model-item prop="endDate" style="width:200px;display: inline-block;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" @change="endDateChange" style="width: 180px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目摘要(400字以内)</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projAbstract"> - <a-textarea placeholder="项目摘要(限400字)" v-model="formData.projAbstract" :maxLength="400" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">关键词</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projKeywords"> - <a-input placeholder="关键词(限100字)" v-model="formData.projKeywords" :maxLength="100" style="width: 80%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>申请书正文</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24" class="bg-gray"> - <div class="special-middle" style="font-weight: bold;text-align: center;"> - <a :href="'/downloadFile/textTemplate.docx'" download="申请书正文.docx"> - <a-icon type="download"></a-icon> <span style="color:green;text-decoration:underline;font-size: 16px;">正文模板下载</span> - </a> - <span style="color: red;margin-left: 42px;">注:正文部分需要下载模版,填写完成后上传到系统中,格式 .doc,.docx,.pdf。</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24"> - <div style="min-height:34px;line-height: 40px;text-align: center;"> - <up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx','pdf']" message="请上传申请书正文" /> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24"> - <!-- <document-view :fileUrl="formData.downloadUrl" :fileName="formData.fileName" :imageArray="[formData.downloadUrl]"></document-view> - <preview-file v-model="formData.downloadUrl" :fileName="formData.fileName"></preview-file> --> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>项目主要实施内容和目标</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目实施目标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="researchContent"> - <a-textarea placeholder="项目实施目标(限5000字)" v-model="formData.researchContent" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>项目考核指标</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要技术指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="technologyTarget"> - <a-textarea placeholder="主要技术指标(限5000字)" v-model="formData.technologyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要经济指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="economyTarget"> - <a-textarea placeholder="主要经济指标(限5000字)" v-model="formData.economyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目实施中形成的示范基地、中试线、生产线及其规模等</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="achievementTarget"> - <a-textarea placeholder="项目实施中形成的示范基地、中试线、生产线及其规模等(限5000字)" v-model="formData.achievementTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">科技报告考核指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="technologyReportsTarget"> - <a-textarea placeholder="科技报告考核指标(限5000字)" v-model="formData.technologyReportsTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">其他应考核的指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="otherTarget"> - <a-textarea placeholder="其他应考核的指标(限5000字)" v-model="formData.otherTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - </div> - <div v-if="stepsArray[1].showStatus"> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>项目人员情况</span> - </div> - </a-col> - </a-row> - <!-- 项目组成员 --> - <project-member-edit :dataList.sync="formData.members" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 项目主要参与单位及分工 --> - <participate-units-edit :participateUnits.sync="formData.participateUnits" /> - </div> - <div v-if="stepsArray[2].showStatus"> - <!-- 经费预算 --> - <budget-edit :budget.sync="formData.budget" @save="budgetSave" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 分年度用款计划 --> - <fund-plan-edit :fundPlan.sync="formData.fundPlan" @save="planSave" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 设备费-购置设备预算明细表 --> - <device-edit :deviceList.sync="formData.deviceList" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 设备费-试制设备预算明细表 --> - <manufacture-edit :manufactureList.sync:="formData.manufactureList" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 项目承担单位研究资金支出预算明细表 --> - <unit-payment-edit :unitPayment.sync="formData.unitPayment" /> - </div> - <div v-if="stepsArray[3].showStatus"> - <!-- 项目安排及阶段目标 --> - <proj-stage-goals-edit :stageGoals.sync="formData.stageGoals" /> - <!-- 项目课题设置 --> - <project-sub-edit :projectSubList.sync="formData.projectSubList" /> - </div> - <div v-if="stepsArray[4].showStatus"> - <!-- 项目绩效指标 --> - <project-kpi-edit :projectKPI.sync="formData.projectKPI" /> - </div> - <div v-if="stepsArray[5].showStatus"> - <!-- 附件 --> - <file-edit :fileList.sync="formData.fileList" /> - </div> - </a-form-model> - </div> -</template> - -<script> - -import fundEdit from '@/views/report/project/components/fundEdit' - -import documentView from '@/views/components/common/documentView' -import previewFile from '@/views/components/common/previewFile' -import { getType } from '@/views/utils/auth' -import projectMemberEdit from '@/views/report/project/components/projectMemberEdit' -import cooperativeUnitsEdit from '@/views/report/project/components/cooperativeUnitsEdit' -import participateUnitsEdit from '@/views/report/project/components/participateUnitsEdit' -import deviceEdit from '@/views/report/project/components/deviceEdit' -import projStageGoalsEdit from '@/views/report/project/components/projStageGoalsEdit' -import budgetEdit from '@/views/report/project/components/budgetEdit' -import fundPlanEdit from '@/views/report/project/components/fundPlanEdit' -import projectKpiEdit from '@/views/report/project/components/projectKpiEdit' -import manufactureEdit from '@/views/report/project/components/manufactureEdit' -import unitPaymentEdit from '@/views/report/project/components/unitPaymentEdit' -import projectSubEdit from '@/views/report/project/components/projectSubEdit' -import fileEdit from '@/views/report/project/components/fileEdit' -import { isEmptyParams } from "@/views/utils/common" -import moment from 'moment' - -const ParticipateUnit = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null } -const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null } -const ManagementRule = { policyName: null, releaseDate: null, documentNumber: null, validityPeriod: null, mainContent: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } -const StageGoals = { startTime: null, endTime: null, target: null } -const ProjectSub = { projName: null, undertakingUnit: null, address: null, director: null, totalBudget: null, govBudget: null, selfBudget: null, cooperativeUnits: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } -const Cooperative = { id: null, unitName: null } -const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' } -const Equipment = { id: "", objectId: "", name: "", functionTarget: "", specificationType: "", quantity: 1, totalBudget: 0.0, useFrom: "", buyUnit: "", storageLocation: "", equipmentType: "", manufacturer: "", sharedScope: "", unitPrice: 0.0, }; - -const projectKPI = { - reportYear: "", - projName: "", - appUnitName: "", - managerDept: "", - projAttribute: "", - projDeadline: "", - startDate: "", - endData: "", - yearTarget: "", - year1Goal: "", - year2Goal: "", - year3Goal: "", - totalBudget: 0.00, - applyFunds: 0.00, - selfFunds: 0.00, - yearTotal: 0.00, - yearApply: 0.00, - yearSelf: 0.00, - totalRowSpan: 0, //总合并行数 - outTarget: 0, //一级指标(产出指标) - benefitTarget: 0, //一级指标(效益指标) - satisfactionDegree: 0, //一级指标(满意度指标) - quantityTarget: 0, //二级指标(数量指标) - qualityTarget: 0, //二级指标(质量指标) - validityTarget: 0, //二级指标(时效指标) - costTarget: 0, //二级指标(成本指标) - economicTarget: 0, //二级指标(经济效益指标) - socialTarget: 0, //二级指标(社会效益指标) - ecologicalTarget: 0, //二级指标(生态效益指标) - sustainableTarget: 0, //二级指标(可持续影响指标) - serviceTarget: 0, //二级指标(服务对象满意度指标) - threeLevel: [], - kpiList: [], -}; - -import cascaderSelect from '@/views/components/common/cascaderSelect' -export default { - name: 'projectEdit', - components: { - fundEdit, projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, unitPaymentEdit, projectSubEdit, participateUnitsEdit - }, - props: { - value: { - type: String, - default: () => { - return null - } - }, - stepsArray: { - type: Array, - default () { - return [] - } - }, - completeStatus: { - type: String, - default () { - return "0,0,0,0,0,0" - } - }, - }, - created () { - this.getProject() - }, - data () { - return { - overseasShow: false, - formData: { - id: null, - appPersonName: null, - sex: null, - birthday: null, - nationName: null, - degreeName: null, - titleName: null, - mobile: null, - email: null, - appUnitName: null, - unitLinkName: null, - unitLinkMobile: null, - unitLinkEmail: null, - unitLinkFax: null, - projName: null, - knowledgeId: null, - startDate: null, - endDate: null, - jobTime: null, - mainResearchAreas: null, - address: null, - subjectScope: null, - projClass: null, - projAbstract: null, - projKeywords: null, - totalFunding: null, - govFunding: null, - unitFunding: null, - selfFunding: null, - researchContent: null, - technologyTarget: null, - economyTarget: null, - achievementTarget: null, - otherTarget: null, - remark: null, - yearTarget: null, - year1Goal: null, - year2Goal: null, - year3Goal: null, - projectKPI: projectKPI, - cooperativeUnits: [], - participateUnits: [], - members: [], - budget: [], - fundPlan: [], - deviceList: [], - manufactureList: [], - unitPayment: [], - stageGoals: [], - projectSubList: [], - fileList: [], - auditList: [], - managerDept: "", - }, - rules: { - jobTime: [{ required: true, message: '请填写每年工作时间(月)', trigger: 'blur' },], - address: [{ required: true, message: '请填写个人通讯地址', trigger: 'blur' },], - mainResearchAreas: [{ required: true, message: '请填写主要研究领域', trigger: 'blur' },], - unitLinkName: [{ required: true, message: '请填写单位联系人', trigger: 'blur' },], - unitLinkMobile: [{ required: true, message: '请填写联系人电话', trigger: 'blur' },], - unitLinkEmail: [{ required: true, message: '请填写电子邮箱', trigger: 'blur' },], - unitLinkFax: [{ required: true, message: '请填写传真', trigger: 'blur' },], - projName: [{ required: true, message: '请填写项目名称', trigger: 'blur' },], - knowledgeId: { required: true, message: '请选择学科代码', trigger: 'change' }, - // subjectScope: [{ required: true, message: '请填写选题范围', trigger: 'blur' },], - // projClass: [{ required: true, message: '请填写项目类别', trigger: 'blur' },], - remark: [{ required: true, message: '请填写附注说明', trigger: 'blur' },], - startDate: { required: true, message: '请选择项日开始时间', trigger: 'change' }, - endDate: { required: true, message: '请选择项目结束时间', trigger: 'change' }, - // totalFunding: [{ required: true, message: '请填写项目总经费', trigger: 'blur' },], - // govFunding: [{ required: true, message: '请填写申请科技经费', trigger: 'blur' },], - projAbstract: [{ required: true, message: '请填写项目摘要', trigger: 'blur' },], - projKeywords: [{ required: true, message: '请填写关键词', trigger: 'blur' },], - researchContent: { required: true, message: '请填写项目实施目标', trigger: 'blur' }, - technologyTarget: { required: true, message: '请填写主要技术指标', trigger: 'blur' }, - economyTarget: { required: true, message: '请填写主要经济指标', trigger: 'blur' }, - achievementTarget: [{ required: true, message: '请填写项目实施中形成的示范基地、中试线、生产线及其规模等', trigger: 'blur' },], - technologyReportsTarget: { required: true, message: '请填写科技报告考核指标', trigger: 'blur' }, - otherTarget: { required: true, message: '请填写其他应考核的指标', trigger: 'blur' }, - downloadUrl: [{ required: true, message: '请填写关键词', trigger: 'blur' },], - }, - } - }, - computed: { - }, - mounted () { - - }, - methods: { - moment, - save (step) { - if (this.checkInfo(step)) { - var obj = this.getObj(step) - obj.step = step - this.$emit('load', true) - let pars = isEmptyParams(obj) - let par = { ...pars } - this.$api.project.saveByStep(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - this.$message.success('保存成功!') - this.$emit('close', 'save') - } - this.$emit('load', false) - }).catch(() => { - this.$emit('load', false) - }) - } - }, - submit (step, next) { - if (this.checkInfo(step)) { - this.$refs.form.validate(valid => { - if (valid) { - this.$emit('load', true) - var arr = this.completeStatus.split(','); - arr[step] = "1"; - this.formData.completeStatus = arr.toString() - var obj = this.getObj(step) - obj.step = step - let state = obj.projState - if (state != 30 && step == 5) - obj.projState = 10 - let pars = isEmptyParams(obj) - let par = { ...pars } - this.$api.project.saveByStep(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - if (next) { - this.$emit('close', 'save') - this.$emit('onStepChange', { step: step + 1, state: arr.toString() }) - } else { - this.$message.success('成功!') - this.$emit('close', 'submit') - } - } - this.$emit('load', false) - }).catch(() => { - this.$emit('load', false) - }) - } else { - this.$message.error('信息未填写完全!') - return false - } - }) - } - }, - getProject () { - this.$emit('load', true) - if (!!this.value) { - this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => { - if (data) { - this.formData = data - this.$emit('onStepChange', { step: 0, state: data.completeStatus }) - this.loadList() - } else - this.$emit('close', 'error') - this.$emit('load', false) - }).catch(() => { - this.$emit('close', 'error') - this.$emit('load', false) - }) - } else { - this.$api.project.getNewProject({ projType: getType() }).then(({ data = {} }) => { - if (data) { - this.formData = data - this.$emit('onStepChange', { step: 0, state: data.completeStatus }) - this.loadList() - } else - this.$emit('close', 'error') - this.$emit('load', false) - }).catch(() => { - this.$emit('close', 'error') - this.$emit('load', false) - }) - } - }, - getCompleteStatus (step, completeStatus) { - var arr = completeStatus.split(',') - if (!!arr && arr.length > 0) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == "1") { - this.stepsArray[i].status = "finish" - } - } - this.stepsArray[step].status = "process" - } - }, - loadList () { - - if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0) - this.formData.cooperativeUnits = [] - - if (!!!this.formData.participateUnits || this.formData.participateUnits.length == 0) - this.formData.participateUnits = [] //{ ...Cooperative }, { ...Cooperative } - - if (!!!this.formData.members || this.formData.members.length == 0) - this.formData.members = [] - - if (!!!this.formData.deviceList || this.formData.deviceList.length == 0) - this.formData.deviceList = [] - - if (!!!this.formData.manufactureList || this.formData.manufactureList.length == 0) - this.formData.manufactureList = [] - - if (!!!this.formData.unitPayment || this.formData.unitPayment.length == 0) - this.formData.unitPayment = [] - - if (!!!this.formData.stageGoals || this.formData.stageGoals.length == 0) - this.formData.stageGoals = [{ ...StageGoals }, { ...StageGoals }, { ...StageGoals }] - - if (!!!this.formData.projectSubList || this.formData.projectSubList.length == 0) - this.formData.projectSubList = [] - - if (!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) { - this.formData.fileList = [] - } - }, - processKpiFunds () { - if (!!this.formData.budget && this.formData.budget.length > 0) { - this.formData.projectKPI.yearTotal = this.formData.budget[0].totalBudget - this.formData.projectKPI.yearApply = this.formData.budget[0].applyFunds - this.formData.projectKPI.yearSelf = this.formData.budget[0].selfFunds - } - }, - processProjectYearTarget () { - this.formData.yearTarget = this.formData.projectKPI.yearTarget - this.formData.year1Goal = this.formData.projectKPI.year1Goal - this.formData.year2Goal = this.formData.projectKPI.year2Goal - this.formData.year3Goal = this.formData.projectKPI.year3Goal - this.formData.projectKPI.kpiList = this.formData.projectKPI.threeLevel - this.formData.managerDept = this.formData.projectKPI.managerDept - this.formData.projAttribute = this.formData.projectKPI.projAttribute - }, - getObj (step) { - var obj = null - switch (step) { - case 0: { - obj = { - id: null, reportYear: null, batch: null, projState: null, appPersonId: null, appUnitId: null, projType: null, - jobTime: null, address: null, mainResearchAreas: null, - unitLinkName: null, unitLinkMobile: null, unitLinkEmail: null, unitLinkFax: null, - projName: null, knowledgeId: null, startDate: null, endDate: null, - remark: null, projClass: null, subjectScope: null, projAbstract: null, projKeywords: null, - totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, - researchContent: null, technologyTarget: null, economyTarget: null, achievementTarget: null, technologyReportsTarget: null, otherTarget: null, - fileId: null, downloadId: null, completeStatus: null, step: null - } - this.formData.projectKPI.appUnitName = this.formData.appUnitName - break; - } - case 1: - obj = { id: null, members: [], participateUnits: [], completeStatus: null, step: null } - break; - case 2: - this.processKpiFunds() - obj = { id: null, totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, budget: [], fundPlan: [], deviceList: [], manufactureList: [], unitPayment: [], completeStatus: null, step: null } - break; - case 3: - obj = { id: null, stageGoals: [], projectSubList: [], completeStatus: null, step: null } - break; - case 4: - this.processProjectYearTarget() - obj = { id: null, projectKPI: null, yearTarget: null, year1Goal: null, year2Goal: null, year3Goal: null, managerDept: null, projAttribute: null, completeStatus: null, step: null } - break; - case 5: - obj = { id: null, fileList: [], projState: null, completeStatus: null, step: null } - break; - } - Object.keys(obj).forEach(key => { - obj[key] = this.formData[key]; - }) - return obj - }, - checkInfo (step) { - if (step == 0) { - if (this.formData.projName == "" || this.formData.projName == null) { - alert('项目名称不能为空') - return false - } else return true - } else if (step == 1) { - if (!!!this.formData.members || this.formData.members.length == 0) { - this.$message.error('至少添加一位项目组成员!') - return false - } else return true - } else if (step == 2) { - return true - } else if (step == 3) { - return true - } else if (step == 4) { - const flag = this.determineProjKPIDetail() - if (flag) { - return true - } else { - this.$message.error('项目绩效目标表需要至少填写其中的一项指标明细!') - return false - } - } else if (step == 5) { - return true - } - }, - determineProjKPIDetail () { - let flag = false - for (let e of this.formData.projectKPI.threeLevel) { - if (e.performanceStandard && e.performanceStandard > 0) { - flag = true - break - } - if (e.targetValue && e.targetValue > 0) { - flag = true - break - } - if (e.yearValue1 && e.yearValue1 > 0) { - flag = true - break - } - if (e.yearValue2 && e.yearValue2 > 0) { - flag = true - break - } - if (e.yearValue3 && e.yearValue3 > 0) { - flag = true - break - } - } - return flag - }, - projNameChange (value) { - this.formData.projectKPI.projName = this.formData.projName - }, - startDateChange (value, dateString) { - this.formData.projectKPI.startDate = this.formData.startDate - }, - endDateChange (value, dateString) { - this.formData.projectKPI.endDate = this.formData.endDate - if (this.formData.projectKPI.startDate && this.formData.projectKPI.endDate) { - let projDeadline = moment(this.formData.startDate).format('YYYY-MM-DD') + "至" + moment(this.formData.endDate).format('YYYY-MM-DD') - this.formData.projectKPI.projDeadline = projDeadline - } - }, - planSave (e) { - if (!!e && e.length == 3) { - this.formData.projectKPI.yearTotal = e[0] - this.formData.projectKPI.yearApply = e[1] - this.formData.projectKPI.yearSelf = e[2] - } - }, - budgetSave (e) { - if (!!e && e.length == 3) { - this.formData.totalFunding = e[0] - this.formData.govFunding = e[1] - this.formData.projectKPI.totalBudget = this.formData.totalFunding - this.formData.projectKPI.applyFunds = this.formData.govFunding - this.formData.projectKPI.selfFunds = e[2] - } - }, - } -} -</script> -<style scoped lang="less"> -</style> - diff --git a/src/views/report/project/components/fundEdit.vue b/src/views/report/project/components/fundEdit.vue index 425ac92cf63ccd3afcde84abfb6a9eb93a35aa2e..a6ac2f4a537bf62ae59255af82f052e05a4b7ace 100644 --- a/src/views/report/project/components/fundEdit.vue +++ b/src/views/report/project/components/fundEdit.vue @@ -26,38 +26,58 @@ </a-row> <div v-for="(item, index) in budget" :key="'budget' + index" class="row_center"> - <a-row v-if="item.type ==='count'"> + <a-row v-if="item.type ==='count'" type="flex"> <a-col :span="6" :style="'text-align: left;padding-left:'+left(item.level)+'px'"> - {{item.budgetName}} + <div class="special-middle"> + {{item.budgetName}} + </div> </a-col> <a-col :span="3"> - {{Count(item.source,'totalBudget',index)}} + <div class="special-middle"> + {{Count(item.source,'totalBudget',index)}} + </div> </a-col> <a-col :span="5"> - <span v-if="!!!item.show||item.show === 'applyFunds'">{{Count(item.source,'applyFunds',index)}}</span> + <div class="special-middle"> + <span v-if="!!!item.code||item.code === 'applyFunds'">{{Count(item.source,'applyFunds',index)}}</span> + </div> </a-col> <a-col :span="5"> - {{Count(item.source,'selfFunds',index)}} + <div class="special-middle"> + {{Count(item.source,'selfFunds',index)}} + </div> </a-col> <a-col :span="5"> - <a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" /> + <div class="special-middle"> + <a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" /> + </div> </a-col> </a-row> - <a-row v-else> + <a-row v-else type="flex"> <a-col :span="6" :style="'text-align: left;padding-left:'+left(item.level)+'px'"> - {{item.budgetName}} + <div class="special-middle"> + {{item.budgetName}} + </div> </a-col> <a-col :span="3"> - {{Count1(index, item.applyFunds, item.selfFunds)}} + <div class="special-middle"> + {{Count1(index, item.applyFunds, item.selfFunds)}} + </div> </a-col> <a-col :span="5"> - <a-input-number v-model="item.applyFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.show||item.show === 'applyFunds'" /> + <div class="special-middle"> + <a-input-number v-model="item.applyFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.code||item.code === 'applyFunds'" /> + </div> </a-col> <a-col :span="5"> - <a-input-number v-model="item.selfFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.show||item.show === 'selfFunds'" /> + <div class="special-middle"> + <a-input-number v-model="item.selfFunds" :min="0" :step="0.01" style="width: 80%" v-if="!!!item.code||item.code === 'selfFunds'" /> + </div> </a-col> <a-col :span="5"> - <a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" /> + <div class="special-middle"> + <a-input v-model="item.calculationBasis" :maxLength="100" style="width: 80%;" /> + </div> </a-col> </a-row> </div> @@ -70,16 +90,16 @@ export default { name: "fundEdit", data () { return { - budget: budgetList() + }; }, props: { - // budget: { - // type: Array, - // default: () => { - // return [] - // } - // }, + budget: { + type: Array, + default: () => { + return [] + } + }, }, created () { }, @@ -106,18 +126,24 @@ export default { } }, Count1 (index, applyFunds, selfFunds) { - this.budget[index].totalBudget = (applyFunds + selfFunds).toFixed(2) - return (applyFunds + selfFunds).toFixed(2) + let apply = 0.00 + let self = 0.00 + if (!!applyFunds) + apply = applyFunds + if (!!selfFunds) + self = selfFunds + this.budget[index].totalBudget = (apply + self).toFixed(2) + return (apply + self).toFixed(2) }, left (l) { switch (l) { - case 1: + case '1': return 4; - case 2: + case '2': return 12; - case 3: + case '3': return 20; - case 4: + case '4': return 30; } return 0; diff --git a/src/views/report/project/components/projectCreate.vue b/src/views/report/project/components/projectCreate.vue index ee3f7d7b38ae2c2279f7048c7dc2039817780986..65ff4052f46d35d9ae71a0205d70aeec5ce9e1aa 100644 --- a/src/views/report/project/components/projectCreate.vue +++ b/src/views/report/project/components/projectCreate.vue @@ -2,13 +2,19 @@ <template> <div class="app-content" style="height: 76vh;overflow: auto;"> <a-spin :spinning="loading" style="width: 100%;height: 100%;"> + <div class="page-steps"> + <a-steps size="small" :current="current" @change="onChange"> + <a-step :status="item.status" v-for="(item,index) in stepsArray" :key="index+'stepsArray'" :title="item.title" /> + </a-steps> + </div> <div class="page-content"> - <project-edit v-model="value" @close="closeWindow" @load="onLoad" ref="projCreate" v-if="projType"></project-edit> - <project-edit-key v-model="value" @close="closeWindow" @load="onLoad" ref="projCreate" v-else></project-edit-key> + <project-edit v-model="value" @close="closeWindow" @load="onLoad" @onStepChange="onStepChange" :completeStatus.sync=completeStatus :stepsArray.sync="stepsArray" ref="projCreate"></project-edit> </div> <div class="page-footer"> - <a-button @click="save">保存</a-button> - <a-button style="margin-left: 10px" type="primary" @click="submit">完成填写</a-button> + <a-button v-if="currSteps > 0" style="margin-left: 40px" type="primary" @click="prev">上一步</a-button> + <a-button style="margin-left: 40px" type="primary" @click="save">保 存</a-button> + <a-button v-if="currSteps < stepsArray.length - 1" style="margin-left: 40px" type="primary" @click="next">下一步</a-button> + <a-button v-if="currSteps == stepsArray.length - 1" style="margin-left: 40px" type="primary" @click="submit">完成填写</a-button> </div> </a-spin> </div> @@ -26,7 +32,18 @@ export default { data () { return { loading: false, - projType: getType() == "1" + projType: getType() == "1", + current: 10, + currSteps: 0, + stepsArray: [ + { status: "process", title: '基本信息', showStatus: true }, + { status: "wait", title: '项目组成员及单位', showStatus: false }, + { status: "wait", title: '经费预算及设备明细', showStatus: false }, + { status: "wait", title: '阶段目标及课题设置', showStatus: false }, + { status: "wait", title: '绩效指标', showStatus: false }, + { status: "wait", title: '附件', showStatus: false } + ], + completeStatus: "0,0,0,0,0,0" } }, props: { @@ -35,16 +52,67 @@ export default { default: () => { return null } - } + }, }, created () { }, methods: { + stepsChange (e) { + debugger + this.currSteps = e + this.changeSteps(this.currSteps) + }, + next () { + this.$refs.projCreate.submit(this.currSteps, true) + }, + prev () { + this.currSteps--; + this.changeSteps(this.currSteps) + }, + onChange (e) { + if (e != this.currSteps) { + var arr = this.completeStatus.split(',') + if (arr[e] == "1") { + this.loading = true + this.changeSteps(e) + this.loading = false + } else { + this.$message.error('所选步骤没填写完成,请填写当前步骤后点【下一步】跳转!') + } + } + }, + onStepChange (e) { + this.completeStatus = e.state + this.changeSteps(e.step) + }, + changeSteps (e) { + this.currSteps = e + var clone = [].concat(this.stepsArray) + clone.forEach(e => { + e.showStatus = false + }) + clone[e].showStatus = true; + this.stepsArray = clone + this.getCompleteStatus(e, this.completeStatus) + }, + getCompleteStatus (step, completeStatus) { + var arr = completeStatus.split(',') + if (!!arr && arr.length > 0) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == "1") { + this.stepsArray[i].status = "finish" + } else { + this.stepsArray[i].status = "wait" + } + } + this.stepsArray[step].status = "process" + } + }, save () { - this.$refs.projCreate.save() + this.$refs.projCreate.save(this.currSteps) }, submit () { - this.$refs.projCreate.submit() + this.$refs.projCreate.submit(this.currSteps, false) }, closeWindow (value) { this.$emit('close', value) @@ -56,17 +124,24 @@ export default { } </script> <style scoped lang="less"> +::v-deep .ant-spin-container { + width: 100%; + height: 100%; +} ::-webkit-scrollbar { width: 8px; height: 6px; } -::v-deep .ant-spin-container { +.page-steps { width: 100%; - height: 100%; + height: 40px; + padding: 8px 20px 5px 20px; + background: rgb(248, 248, 248); + border: 1px 1px 0px 1px solid #e8e8e8; } .page-content { width: 100%; - height: calc(100% - 40px); + height: calc(100% - 80px); overflow: auto; } .page-footer { diff --git a/src/views/report/project/components/projectEdit.vue b/src/views/report/project/components/projectEdit.vue index 86de12ee2ff9e36c8161cdde702981cb785a3c8d..381b05e9795eaeffcab7f2ff439138906dd497f9 100644 --- a/src/views/report/project/components/projectEdit.vue +++ b/src/views/report/project/components/projectEdit.vue @@ -1,574 +1,577 @@ <template> <div> <a-form-model ref="form" :model="formData" :rules="rules" style="border-top: 0px" class="from-table font-line-space"> - <a-row> - <a-col :span="24" style="border-top: 0px;text-align: center;"> - <div class="main-title"> - <span>项目基本情况</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>申请人信息</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>姓名</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appPersonName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>性别</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.sex }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>出生日期</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - {{ moment(formData.birthday).format('YYYY-MM-DD') }} - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>民族</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.nationName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>学位</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.degreeName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>职称</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - {{ formData.titleName}} - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>电话</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.mobile }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>电子邮箱</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.email }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">每年工作时间(月)</div> - </div> - </a-col> - <a-col :span="5"> - <div class="special-middle"> - <div> - <a-form-model-item prop="jobTime"> - <a-input-number v-model="formData.jobTime" :min="0" :max="12" :step="1" style="width: 100px" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">个人通讯地址</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item prop="address"> - <a-input v-model="formData.address" placeholder="个人通讯地址(限50字)" :maxLength="50" style="width: 80%;" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div>工作单位</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appUnitName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="3" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要研究领域</div> - </div> - </a-col> - <a-col :span="21"> - <div class="special-middle"> - <div> - <a-form-model-item prop="mainResearchAreas"> - <a-textarea placeholder="主要研究领域(限500字)" v-model="formData.mainResearchAreas" :maxLength="500" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>申请单位信息</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>单位名称</div> - </div> - </a-col> - <a-col :span="20"> - <div class="special-middle"> - <div> - <a-form-model-item> - <div>{{ formData.appUnitName }}</div> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">联系人</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkName"> - <a-input placeholder="联系人(限20字)" v-model="formData.unitLinkName" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">电话</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkMobile"> - <a-input placeholder="电话(限20字)" v-model="formData.unitLinkMobile" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">电子信箱</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkEmail"> - <a-input placeholder="电子信箱(限50字)" v-model="formData.unitLinkEmail" :maxLength="50" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">传真</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div> - <a-form-model-item prop="unitLinkFax"> - <a-input placeholder="传真(限20字)" v-model="formData.unitLinkFax" :maxLength="20" style="width:80%" /> - </a-form-model-item> - </div> - </div> - </a-col> - </a-row> - - <!-- 项目合作单位 --> - <!-- <cooperative-units-edit :cooperativeUnits.sync="formData.cooperativeUnits" /> --> + <div v-if="stepsArray[0].showStatus"> + <a-row> + <a-col :span="24" style="border-top: 0px;text-align: center;"> + <div class="main-title"> + <span>项目基本情况</span> + </div> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>申请人信息</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>姓名</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.appPersonName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>性别</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.sex }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>出生日期</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + {{ moment(formData.birthday).format('YYYY-MM-DD') }} + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>民族</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.nationName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>学位</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.degreeName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>职称</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + {{ formData.titleName}} + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电话</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.mobile }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电子邮箱</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.email }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">每年工作时间(月)</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="jobTime"> + <a-input-number v-model="formData.jobTime" :min="0" :max="12" :step="1" style="width: 100px" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">个人通讯地址</div> + </div> + </a-col> + <a-col :span="21"> + <div class="special-middle"> + <div> + <a-form-model-item prop="address"> + <a-input v-model="formData.address" placeholder="个人通讯地址(限50字)" :maxLength="50" style="width: 80%;" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>工作单位</div> + </div> + </a-col> + <a-col :span="21"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.appUnitName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">主要研究领域</div> + </div> + </a-col> + <a-col :span="21"> + <div class="special-middle"> + <div> + <a-form-model-item prop="mainResearchAreas"> + <a-textarea placeholder="主要研究领域(限500字)" v-model="formData.mainResearchAreas" :maxLength="500" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>项目基本情况</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目名称</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projName"> - <a-input placeholder="项目名称(限100字)" v-model="formData.projName" :maxLength="100" style="width: 80%" @change="projNameChange" /> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>申请单位信息</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>单位名称</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.appUnitName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">联系人</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkName"> + <a-input placeholder="联系人(限20字)" v-model="formData.unitLinkName" :maxLength="20" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">电话</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkMobile"> + <a-input placeholder="电话(限20字)" v-model="formData.unitLinkMobile" :maxLength="20" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">电子信箱</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkEmail"> + <a-input placeholder="电子信箱(限50字)" v-model="formData.unitLinkEmail" :maxLength="50" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">传真</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkFax"> + <a-input placeholder="传真(限20字)" v-model="formData.unitLinkFax" :maxLength="20" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">学科代码</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="knowledgeId"> - <cascader-select v-model="formData.knowledgeId" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">附注说明</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="remark"> - <a-input placeholder="附注说明(限300字)" v-model="formData.remark" :maxLength="300" style="width: 80%" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项日开始时间</div> - </div> - </a-col> - <a-col :span="8"> - <a-form-model-item prop="startDate" style="width:200px;display: inline-block;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" @change="startDateChange" style="width: 180px" /> - </a-form-model-item> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目结束时间</div> - </div> - </a-col> - <a-col :span="8"> - <a-form-model-item prop="endDate" style="width:200px;display: inline-block;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" @change="endDateChange" style="width: 180px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">申请经费(万元)</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="govFunding"> - <!-- <a-input-number v-model="formData.govFunding" @change="govFundingChange" :min="0" :step="0.01" style="width: 100px" /> --> - {{ formData.govFunding }} - <span> 万元</span> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目摘要(400字以内)</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projAbstract"> - <a-textarea placeholder="项目摘要(限400字)" v-model="formData.projAbstract" :maxLength="400" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">关键词</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="projKeywords"> - <a-input placeholder="关键词(限100字)" v-model="formData.projKeywords" :maxLength="100" style="width: 80%" /> - </a-form-model-item> - </a-col> - </a-row> - <!-- 项目主要参与单位及分工 --> - <participate-units-edit :participateUnits.sync="formData.participateUnits" /> + <!-- 项目合作单位 --> + <!-- <cooperative-units-edit :cooperativeUnits.sync="formData.cooperativeUnits" /> --> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>项目人员情况</span> - </div> - </a-col> - </a-row> - <!-- 项目组成员 --> - <project-member-edit :dataList.sync="formData.members" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>项目基本情况</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目名称</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projName"> + <a-input placeholder="项目名称(限100字)" v-model="formData.projName" :maxLength="100" style="width: 80%" @change="projNameChange" /> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>项目主要实施内容和目标</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目实施目标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="researchContent"> - <a-textarea placeholder="项目实施目标(限10000字)" v-model="formData.researchContent" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="tb-title"> - <span>项目考核指标</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要技术指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="technologyTarget"> - <a-textarea placeholder="主要技术指标(限10000字)" v-model="formData.technologyTarget" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">主要经济指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="economyTarget"> - <a-textarea placeholder="主要经济指标(限10000字)" v-model="formData.economyTarget" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">项目实施中形成的示范基地、中试线、生产线及其规模等</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="achievementTarget"> - <a-textarea placeholder="项目实施中形成的示范基地、中试线、生产线及其规模等(限10000字)" v-model="formData.achievementTarget" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">科技报告考核指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="technologyReportsTarget"> - <a-textarea placeholder="科技报告考核指标(限10000字)" v-model="formData.technologyReportsTarget" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">其他应考核的指标</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="otherTarget"> - <a-textarea placeholder="其他应考核的指标(限10000字)" v-model="formData.otherTarget" :maxLength="10000" style="width: 80%; height: 160px; margin-top: 12px" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="border-top: 0px"> - <div class="main-title"> - <span>申请书正文</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24" class="bg-gray"> - <div class="special-middle" style="font-weight: bold;text-align: center;"> - <a :href="'/downloadFile/textTemplate.docx'" download="申请书正文.docx"> - <a-icon type="download"></a-icon> <span style="color:green;text-decoration:underline;font-size: 16px;">正文模板下载</span> - </a> - <span style="color: red;margin-left: 42px;">注:正文部分需要下载模版,填写完成后上传到系统中,格式 .doc,.docx。</span> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24"> - <div style="min-height:34px;line-height: 40px;text-align: center;"> - <up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx']" message="请上传申请书正文" /> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24"> - <!-- <document-view :fileUrl="formData.downloadUrl" :fileName="formData.fileName" :imageArray="[formData.downloadUrl]"></document-view> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">学科代码</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="knowledgeId"> + <cascader-select v-model="formData.knowledgeId" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">附注说明</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="remark"> + <a-input placeholder="附注说明(限300字)" v-model="formData.remark" :maxLength="300" style="width: 80%" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项日开始时间</div> + </div> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="startDate" style="width:200px;display: inline-block;"> + <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" @change="startDateChange" style="width: 180px" /> + </a-form-model-item> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目结束时间</div> + </div> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="endDate" style="width:200px;display: inline-block;"> + <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" @change="endDateChange" style="width: 180px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目摘要(400字以内)</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projAbstract"> + <a-textarea placeholder="项目摘要(限400字)" v-model="formData.projAbstract" :maxLength="400" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">关键词</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projKeywords"> + <a-input placeholder="关键词(限100字)" v-model="formData.projKeywords" :maxLength="100" style="width: 80%" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>申请书正文</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24" class="bg-gray"> + <div class="special-middle" style="font-weight: bold;text-align: center;"> + <a :href="'/downloadFile/textTemplate.docx'" download="申请书正文.docx"> + <a-icon type="download"></a-icon> <span style="color:green;text-decoration:underline;font-size: 16px;">正文模板下载</span> + </a> + <span style="color: red;margin-left: 42px;">注:正文部分需要下载模版,填写完成后上传到系统中,格式 .doc,.docx,.pdf。</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24"> + <div style="min-height:34px;line-height: 40px;text-align: center;"> + <up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx','pdf']" message="请上传申请书正文" /> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24"> + <!-- <document-view :fileUrl="formData.downloadUrl" :fileName="formData.fileName" :imageArray="[formData.downloadUrl]"></document-view> <preview-file v-model="formData.downloadUrl" :fileName="formData.fileName"></preview-file> --> - </a-col> - </a-row> - - <!-- 经费预算 --> - <budget-edit :budget.sync="formData.budget" @save="budgetSave" /> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 分年度用款计划 --> - <fund-plan-edit :fundPlan.sync="formData.fundPlan" @save="planSave" /> - - <!-- 项目承担单位研究资金支出预算明细表 --> - <unit-payment-edit :unitPayment.sync="formData.unitPayment" /> - <!-- <equipments-edit :equipments.sync="formData.equipments" /> --> - <!-- 设备费-购置设备预算明细表 --> - <device-edit :deviceList.sync="formData.deviceList" /> - <!-- 设备费-试制设备预算明细表 --> - <manufacture-edit :manufactureList.sync:="formData.manufactureList" /> - - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - - </div> - </a-col> - </a-row> - <!-- 项目绩效指标 --> - <project-kpi-edit :projectKPI.sync="formData.projectKPI" /> - - <!-- 项目安排及阶段目标 --> - <proj-stage-goals-edit :stageGoals.sync="formData.stageGoals" /> - - <!-- 项目课题设置 --> - <project-sub-edit :projectSubList.sync="formData.projectSubList" /> - - <!-- 附件 --> - <file-edit :fileList.sync="formData.fileList" /> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目主要实施内容和目标</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目实施目标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="researchContent"> + <a-textarea placeholder="项目实施目标(限5000字)" v-model="formData.researchContent" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>项目考核指标</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">主要技术指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="technologyTarget"> + <a-textarea placeholder="主要技术指标(限5000字)" v-model="formData.technologyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">主要经济指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="economyTarget"> + <a-textarea placeholder="主要经济指标(限5000字)" v-model="formData.economyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目实施中形成的示范基地、中试线、生产线及其规模等</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="achievementTarget"> + <a-textarea placeholder="项目实施中形成的示范基地、中试线、生产线及其规模等(限5000字)" v-model="formData.achievementTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">科技报告考核指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="technologyReportsTarget"> + <a-textarea placeholder="科技报告考核指标(限5000字)" v-model="formData.technologyReportsTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">其他应考核的指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="otherTarget"> + <a-textarea placeholder="其他应考核的指标(限5000字)" v-model="formData.otherTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + </div> + <div v-if="stepsArray[1].showStatus"> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目人员情况</span> + </div> + </a-col> + </a-row> + <!-- 项目组成员 --> + <project-member-edit :dataList.sync="formData.members" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 项目主要参与单位及分工 --> + <participate-units-edit :participateUnits.sync="formData.participateUnits" /> + </div> + <div v-if="stepsArray[2].showStatus"> + <!-- 经费预算 --> + <budget-edit :budget.sync="formData.budget" @save="budgetSave" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 分年度用款计划 --> + <fund-plan-edit :fundPlan.sync="formData.fundPlan" @save="planSave" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 设备费-购置设备预算明细表 --> + <device-edit :deviceList.sync="formData.deviceList" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 设备费-试制设备预算明细表 --> + <manufacture-edit :manufactureList.sync:="formData.manufactureList" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 项目承担单位研究资金支出预算明细表 --> + <unit-payment-edit :unitPayment.sync="formData.unitPayment" /> + </div> + <div v-if="stepsArray[3].showStatus"> + <!-- 项目安排及阶段目标 --> + <proj-stage-goals-edit :stageGoals.sync="formData.stageGoals" /> + <!-- 项目课题设置 --> + <project-sub-edit :projectSubList.sync="formData.projectSubList" /> + </div> + <div v-if="stepsArray[4].showStatus"> + <!-- 项目绩效指标 --> + <project-kpi-edit :projectKPI.sync="formData.projectKPI" /> + </div> + <div v-if="stepsArray[5].showStatus"> + <!-- 附件 --> + <file-edit :fileList.sync="formData.fileList" /> + </div> </a-form-model> </div> </template> @@ -653,6 +656,18 @@ export default { return null } }, + stepsArray: { + type: Array, + default () { + return [] + } + }, + completeStatus: { + type: String, + default () { + return "0,0,0,0,0,0" + } + }, }, created () { this.getProject() @@ -730,8 +745,8 @@ export default { remark: [{ required: true, message: '请填写附注说明', trigger: 'blur' },], startDate: { required: true, message: '请选择项日开始时间', trigger: 'change' }, endDate: { required: true, message: '请选择项目结束时间', trigger: 'change' }, - totalFunding: [{ required: true, message: '请填写项目总经费', trigger: 'blur' },], - govFunding: [{ required: true, message: '请填写申请科技经费', trigger: 'blur' },], + // totalFunding: [{ required: true, message: '请填写项目总经费', trigger: 'blur' },], + // govFunding: [{ required: true, message: '请填写申请科技经费', trigger: 'blur' },], projAbstract: [{ required: true, message: '请填写项目摘要', trigger: 'blur' },], projKeywords: [{ required: true, message: '请填写关键词', trigger: 'blur' },], researchContent: { required: true, message: '请填写项目实施目标', trigger: 'blur' }, @@ -751,12 +766,69 @@ export default { }, methods: { moment, + save (step) { + if (this.checkInfo(step)) { + var obj = this.getObj(step) + obj.step = step + this.$emit('load', true) + let pars = isEmptyParams(obj) + let par = { ...pars } + this.$api.project.save(par).then(({ data = {} }) => { + if (data) { + this.formData.id = data + this.$message.success('保存成功!') + this.$emit('close', 'save') + } + this.$emit('load', false) + }).catch(() => { + this.$emit('load', false) + }) + } + }, + submit (step, next) { + if (this.checkInfo(step)) { + this.$refs.form.validate(valid => { + if (valid) { + this.$emit('load', true) + var arr = this.completeStatus.split(','); + arr[step] = "1"; + this.formData.completeStatus = arr.toString() + var obj = this.getObj(step) + obj.step = step + let state = obj.projState + if (state != 30 && step == 5) + obj.projState = 10 + let pars = isEmptyParams(obj) + let par = { ...pars } + this.$api.project.save(par).then(({ data = {} }) => { + if (data) { + this.formData.id = data + if (next) { + this.$emit('close', 'save') + this.$emit('onStepChange', { step: step + 1, state: arr.toString() }) + } else { + this.$message.success('成功!') + this.$emit('close', 'submit') + } + } + this.$emit('load', false) + }).catch(() => { + this.$emit('load', false) + }) + } else { + this.$message.error('信息未填写完全!') + return false + } + }) + } + }, getProject () { this.$emit('load', true) if (!!this.value) { this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => { if (data) { this.formData = data + this.$emit('onStepChange', { step: 0, state: data.completeStatus }) this.loadList() } else this.$emit('close', 'error') @@ -769,6 +841,7 @@ export default { this.$api.project.getNewProject({ projType: getType() }).then(({ data = {} }) => { if (data) { this.formData = data + this.$emit('onStepChange', { step: 0, state: data.completeStatus }) this.loadList() } else this.$emit('close', 'error') @@ -779,12 +852,24 @@ export default { }) } }, + getCompleteStatus (step, completeStatus) { + var arr = completeStatus.split(',') + if (!!arr && arr.length > 0) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == "1") { + this.stepsArray[i].status = "finish" + } + } + this.stepsArray[step].status = "process" + } + }, loadList () { + if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0) - this.formData.cooperativeUnits = [{ ...Cooperative }, { ...Cooperative }] + this.formData.cooperativeUnits = [] if (!!!this.formData.participateUnits || this.formData.participateUnits.length == 0) - this.formData.participateUnits = [{ ...ParticipateUnit }, { ...ParticipateUnit }] + this.formData.participateUnits = [] //{ ...Cooperative }, { ...Cooperative } if (!!!this.formData.members || this.formData.members.length == 0) this.formData.members = [] @@ -802,12 +887,19 @@ export default { this.formData.stageGoals = [{ ...StageGoals }, { ...StageGoals }, { ...StageGoals }] if (!!!this.formData.projectSubList || this.formData.projectSubList.length == 0) - this.formData.projectSubList = [{ ...ProjectSub }] + this.formData.projectSubList = [] if (!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) { this.formData.fileList = [] } }, + processKpiFunds () { + if (!!this.formData.budget && this.formData.budget.length > 0) { + this.formData.projectKPI.yearTotal = this.formData.budget[0].totalBudget + this.formData.projectKPI.yearApply = this.formData.budget[0].applyFunds + this.formData.projectKPI.yearSelf = this.formData.budget[0].selfFunds + } + }, processProjectYearTarget () { this.formData.yearTarget = this.formData.projectKPI.yearTarget this.formData.year1Goal = this.formData.projectKPI.year1Goal @@ -817,62 +909,99 @@ export default { this.formData.managerDept = this.formData.projectKPI.managerDept this.formData.projAttribute = this.formData.projectKPI.projAttribute }, - save () { - this.processProjectYearTarget() - if (this.checkProjName()) { - this.$emit('load', true) - let pars = isEmptyParams(this.formData) - let par = { ...pars } - this.$api.project.save(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - this.$message.success('保存成功!') - this.$emit('close', 'save') + getObj (step) { + var obj = null + switch (step) { + case 0: { + obj = { + id: null, reportYear: null, batch: null, projState: null, appPersonId: null, appUnitId: null, projType: null, + jobTime: null, address: null, mainResearchAreas: null, + unitLinkName: null, unitLinkMobile: null, unitLinkEmail: null, unitLinkFax: null, + projName: null, knowledgeId: null, startDate: null, endDate: null, + remark: null, projClass: null, subjectScope: null, projAbstract: null, projKeywords: null, + totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, + researchContent: null, technologyTarget: null, economyTarget: null, achievementTarget: null, technologyReportsTarget: null, otherTarget: null, + fileId: null, downloadId: null, completeStatus: null, step: null } - this.$emit('load', false) - }).catch(() => { - this.$emit('load', false) - }) + this.formData.projectKPI.appUnitName = this.formData.appUnitName + break; + } + case 1: + obj = { id: null, members: [], participateUnits: [], completeStatus: null, step: null } + break; + case 2: + this.processKpiFunds() + obj = { id: null, totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, budget: [], fundPlan: [], deviceList: [], manufactureList: [], unitPayment: [], completeStatus: null, step: null } + break; + case 3: + obj = { id: null, stageGoals: [], projectSubList: [], completeStatus: null, step: null } + break; + case 4: + this.processProjectYearTarget() + obj = { id: null, projectKPI: null, yearTarget: null, year1Goal: null, year2Goal: null, year3Goal: null, managerDept: null, projAttribute: null, completeStatus: null, step: null } + break; + case 5: + obj = { id: null, fileList: [], projState: null, completeStatus: null, step: null } + break; } + Object.keys(obj).forEach(key => { + obj[key] = this.formData[key]; + }) + return obj }, - submit () { - this.processProjectYearTarget() - this.$refs.form.validate(valid => { - if (valid) { - if (this.formData.members.length == 0) { - this.$message.error('至少添加一位项目组成员!') - return false - } else { - this.$emit('load', true) - if (this.formData.projState < 10) - this.formData.projState = 10 - let pars = isEmptyParams(this.formData) - let par = { ...pars } - this.$api.project.save(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - this.$message.success('成功!') - this.$emit('close', 'submit') - } - this.$emit('load', false) - }).catch(() => { - this.$emit('load', false) - }) - } + checkInfo (step) { + if (step == 0) { + if (this.formData.projName == "" || this.formData.projName == null) { + alert('项目名称不能为空') + return false + } else return true + } else if (step == 1) { + if (!!!this.formData.members || this.formData.members.length == 0) { + this.$message.error('至少添加一位项目组成员!') + return false + } else return true + } else if (step == 2) { + return true + } else if (step == 3) { + return true + } else if (step == 4) { + const flag = this.determineProjKPIDetail() + if (flag) { + return true } else { - this.$message.warn('项目信息未填写完全!') + this.$message.error('项目绩效目标表需要至少填写其中的一项指标明细!') return false } - }) - }, - checkProjName () { - if (this.formData.projName == "" || this.formData.projName == null) { - alert('项目名称不能为空') - return false - } else { + } else if (step == 5) { return true } }, + determineProjKPIDetail () { + let flag = false + for (let e of this.formData.projectKPI.threeLevel) { + if (e.performanceStandard && e.performanceStandard > 0) { + flag = true + break + } + if (e.targetValue && e.targetValue > 0) { + flag = true + break + } + if (e.yearValue1 && e.yearValue1 > 0) { + flag = true + break + } + if (e.yearValue2 && e.yearValue2 > 0) { + flag = true + break + } + if (e.yearValue3 && e.yearValue3 > 0) { + flag = true + break + } + } + return flag + }, projNameChange (value) { this.formData.projectKPI.projName = this.formData.projName }, @@ -897,7 +1026,6 @@ export default { if (!!e && e.length == 3) { this.formData.totalFunding = e[0] this.formData.govFunding = e[1] - this.formData.projectKPI.totalBudget = this.formData.totalFunding this.formData.projectKPI.applyFunds = this.formData.govFunding this.formData.projectKPI.selfFunds = e[2] diff --git a/src/views/report/project/config.js b/src/views/report/project/config.js index 0b2eb5e39033db3f75f19ec95e2d67177b4c01a5..6f5edc570d9423456c55d51f4220981fa11fda96 100644 --- a/src/views/report/project/config.js +++ b/src/views/report/project/config.js @@ -11,7 +11,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "一、资金来源合计", source: [1, 2], - show: null, + code: null, type: 'count' }, { @@ -25,7 +25,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(一)财政资金", source: null, - show: 'applyFunds', + code: 'applyFunds', type: 'ins' }, { @@ -39,7 +39,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(二)自筹资金", source: [3, 4, 5, 6], - show: 'selfFunds', + code: 'selfFunds', type: 'count' }, { @@ -53,7 +53,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "1.承担单位自有货币资金", source: null, - show: 'selfFunds', + code: 'selfFunds', type: 'ins' }, { @@ -67,7 +67,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "2.从银行获得的贷款", source: null, - show: 'selfFunds', + code: 'selfFunds', type: 'ins' }, { @@ -81,7 +81,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "3.其他财政拨款", source: null, - show: 'selfFunds', + code: 'selfFunds', type: 'ins' }, { @@ -95,7 +95,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "4.其他资金", source: null, - show: 'selfFunds', + code: 'selfFunds', type: 'ins' }, { @@ -109,7 +109,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "二、支出预算合计", source: [8, 22], - show: null, + code: null, type: 'count' }, { @@ -123,7 +123,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(一)直接费用", source: [9, 14, 15, 16, 17, 18, 19, 20, 21], - show: null, + code: null, type: 'count' }, { @@ -137,7 +137,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "1.设备费", source: [10, 11, 12, 13], - show: null, + code: null, type: 'count' }, { @@ -151,7 +151,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(1)设备购置费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -165,7 +165,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(2)试制设备费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -179,7 +179,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(3)设备改造费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -193,7 +193,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(4)设备租赁费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -207,7 +207,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "2.材料费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -221,7 +221,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "3.燃料动力费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -235,7 +235,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "4.测试化验加工费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -249,7 +249,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "5.差旅费/会议费/国际合作交流费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -263,7 +263,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "6.劳务费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -277,7 +277,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "7.专家咨询费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -291,7 +291,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "8.出版/文献/信息传播/知识产权\n事务费", source: null, - show: null, + code: null, type: 'ins' }, { @@ -305,7 +305,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "9.其他支出", source: null, - show: null, + code: null, type: 'ins' }, { @@ -319,7 +319,7 @@ const budgetList = () => { calculationBasis: "", budgetName: "(二)间接费用\r\n", source: null, - show: null, + code: null, type: 'ins' } ] diff --git a/src/views/report/task/Index.vue b/src/views/report/task/Index.vue index 22fb317742fadf72753e70baa0cafa4f634755f7..840c7b5b08a6e068e76dcc396e9eccfe24022fdc 100644 --- a/src/views/report/task/Index.vue +++ b/src/views/report/task/Index.vue @@ -1,151 +1,114 @@ <template> <div class="app-content"> - <a-tabs :tab-position="'top'" v-model="activeTab" @change="callback"> - <a-tab-pane key="1" :tab="'未上报任务书('+panes.count1+')'"> - </a-tab-pane> - <a-tab-pane key="2" :tab="'返回修改任务书('+panes.count2+')'"> - </a-tab-pane> - <a-tab-pane key="3" :tab="'已上报任务书('+panes.count3+')'"> - </a-tab-pane> - <a-tab-pane key="4" :tab="'所有任务书('+panes.count4+')'"> - </a-tab-pane> - </a-tabs> - <a-form layout="horizontal" :form="form" :model="searchForm"> - <a-row :gutter="30"> - <a-col :span="8"> - <a-form-item label="项目名称"> - <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 272px" /> - </a-form-item> - </a-col> - <a-col :span="8"> - <a-form-item label="项目编号"> - <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 272px" /> - </a-form-item> - </a-col> - <a-col :span="8"> - <a-form-item> - <a-button type="primary" icon="search" @click="searchList">搜索</a-button> - <a-button icon="reload" style="margin-left: 10px" @click="searchFormReset" class="bt-normal">重置</a-button> - </a-form-item> - </a-col> - </a-row> - <a-row> - <a-col :span="30"> - <a-form-item> - <a-button type="primary" style="margin-right:8px;" v-if="(display&&isButten)" @click="createTaskBook">填写任务书</a-button> - <a-button type="primary" @click="exportData">导出Excel</a-button> - <span :style="{color:'#DC143C'}"> 填报时间:{{description}}</span> - </a-form-item> - </a-col> - </a-row> + <a-form :form="form" :model="searchForm" layout="inline" class="search_form"> + <a-form-item> + <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 180px" /> + </a-form-item> + <a-form-item> + <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 180px" /> + </a-form-item> + <a-form-item> + <a-button type="primary" icon="search" @click="search">搜索</a-button> + <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> + </a-form-item> </a-form> - <a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"> - <template slot="testStateName" slot-scope="record"> - <span v-if="record"> - {{record}} - </span> - <span v-else> - 未填写 - </span> + <div style="width:100%;margin-bottom: 8px;"> + <div style="display: inline-block;;width:50%"> + <btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" /> + </div> + <div style="display: inline-block;;width:50%;text-align: right;"> + <a-button type="primary" @click="exportData" icon="download">Excel</a-button> + </div> + </div> + <a-divider style="height: 1px; background-color: #e8e8e8;" /> + <span class="form-description"> ※填报时间:{{ description }}</span> + <!-- <a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"> --> + <a-table :dataSource="tableData" :columns="columns" :scroll="{ x: 'max-content' }" rowKey="projId" :pagination="false" :loading="loading"> + <template slot="taskStateName" slot-scope="record"> + <span>{{record.taskStateName}}</span> </template> <template slot="option" slot-scope="record"> - <a-button type="link" size="small" v-if="record.testState" @click="recordClick(record,'view')">查看</a-button> - <a-button type="primary" size="small" v-if="((record.testState==-20||record.testState==-10||record.testState==30)&&isButten)" @click="recordClick(record,'edit')">修改</a-button> - <a-button type="primary" size="small" v-if="((record.testState==-10||record.testState==30)&&isButten)" @click="recordClick(record,'report')">上报</a-button> + <a-button type="link" size="small" v-if="record.taskState!=0" @click="recordClick(record,'view')">查看</a-button> + <a-button type="link" size="small" v-if="(record.taskState==0 && isButten)" @click="recordClick(record,'create')">填写</a-button> + <a-button type="link" size="small" v-if="((record.taskState==-10||record.taskState==10||record.taskState==30))" @click="recordClick(record,'edit')">修改</a-button> + <a-button type="link" size="small" v-if="((record.taskState==10||record.taskState==30))" @click="recordClick(record,'report')">上报</a-button> </template> </a-table> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal v-model="visibleEdit" :title="modalTitle" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal" :centered="true"> - <test-edit v-model="selectProjId" @close="closeWindow" /> + <a-modal v-model="visibleEdit" :title="'创建/修改'" :width="'94%'" :dialog-style="{ top: '8%' }" :footer="null" destroyOnClose :maskClosable="false"> + <task-create v-model="projId" @close="closeWindow" /> </a-modal> - <a-modal v-model="visibleView" title="查看任务书" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <test-view v-model="selectProjId" @close="closeWindow" /> + <a-modal v-model="visibleView" title="查看合同书" :width="'94%'" :dialog-style="{ top: '8%' }" :footer="null" destroyOnClose :maskClosable="false"> + <task-view v-model="projId" @close="closeWindow" /> </a-modal> </div> </template> <script> +import { getType } from '@/views/utils/auth' import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; -import TestEdit from "@/views/report/task/components/taskEdit.vue" -import TestView from "@/views/report/task/components/taskView.vue" - - -const columns = [ - { title: '项目名称', dataIndex: 'projName' }, - { title: '项目编号', dataIndex: 'projNo' }, - { title: '版本号', dataIndex: 'versionNo' }, - { title: '项目类别', dataIndex: 'projClassName' }, - { title: '项目开始时间', dataIndex: 'projStart', tabKey: '2' }, - { title: '项目结束时间', dataIndex: 'projEnd', tabKey: '2' }, - { title: '任务书开始时间', dataIndex: 'startDate', tabKey: '1' }, - { title: '任务书结束时间', dataIndex: 'endDate', tabKey: '1' }, - { title: '申报年度', dataIndex: 'reportYear' }, - { title: '状态', dataIndex: 'testStateName', scopedSlots: { customRender: 'testStateName' } }, - { title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' } } -] +import taskCreate from "@/views/report/task/components/taskCreate.vue" +import taskView from "@/views/report/task/components/taskView.vue" export default { name: 'reportTask', + components: { + taskCreate, taskView + }, data () { return { // 选项卡 - activeTab: '1', - panes: { count1: 0, count2: 0, count3: 0, count4: 0, count5: 0, }, + activekey: '1', + tabDate: [ + { key: "1", tab: "未上报" }, + { key: "2", tab: "返回修改" }, + { key: "3", tab: "已上报" }, + { key: "4", tab: "所有" }, + ], + itemCount: [0, 0, 0, 0, 0], form: this.$form.createForm(this, { name: 'advanced_search' }), - searchForm: { projName: '', projNo: '', testState: '1', reportYear: null }, + searchForm: { projName: '', projNo: '', taskState: '1', reportYear: null }, tableData: [], - columns: [], - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, + columns: [ + { title: '项目名称', dataIndex: 'projName', align: 'center' }, + { title: '项目编号', dataIndex: 'projNo', align: 'center' }, + { title: '开始时间', dataIndex: 'startDate', align: 'center' }, + { title: '结束时间', dataIndex: 'endDate', align: 'center' }, + { title: '申报年度', dataIndex: 'reportYear', align: 'center' }, + { title: '状态', scopedSlots: { customRender: 'taskStateName' }, align: 'center' }, + { title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' }, align: 'center' } + ], + pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, }, loading: false, // 弹窗 visibleEdit: false, visibleView: false, - modalTitle: '', - selectProjId: null, - selectTaskId: null, + id: null, + projId: null, selectedRowKeys: [], - selectTestState: null, isButten: false, - display: false, - description: '' + description: '', } }, - components: { - TestEdit, - TestView - }, created () { this.getYear() }, methods: { getYear () { - let pars = { type: 2 } - this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => { + this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 2 }).then(({ data = {} }) => { if (data) { this.isButten = data.disabled this.description = data.description - this.searchForm.reportYear = data.reportYear + this.searchForm.reportYear = data.year this.getListByPage() } - }).catch(() => { - this.loading = false - }) + }).catch(() => { }) }, getListByPage () { this.getCount() this.loading = true let pars = isEmptyParams(this.searchForm) - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } - + let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } this.$api.taskReport.getListByPage(par).then(({ data = {} }) => { if (data) { const { dataList = [], total = 0 } = data @@ -161,29 +124,19 @@ export default { let pars = isEmptyParams({ reportYear: this.searchForm.reportYear }); this.$api.taskReport.getCount(pars).then(({ data = {} }) => { if (data) { - this.panes = data + this.itemCount = [data.count1, data.count2, data.count3, data.count4, data.count5] } - }).catch(() => { - - }) - }, - searchFormReset () { - this.searchForm = { - projName: '', - projNo: '', - } + }).catch(() => { }) }, - searchList () { + search () { this.pagination.pageIndex = 1 this.getListByPage() }, - onSelectChange (selectedRowKeys, selectedRows) { - this.selectedRowKeys = selectedRowKeys - this.selectProjId = selectedRows[0].projId - this.selectTaskId = selectedRows[0].id - this.selectTestState = selectedRows[0].testState - }, - submitForm () { + reset () { + this.searchForm.projName = null + this.searchForm.projNo = null + this.pagination.pageIndex = 1 + this.getListByPage() }, change () { this.getListByPage() @@ -193,28 +146,18 @@ export default { this.pagination.pageSize = pageSize this.getListByPage() }, - createTaskBook () { - if (this.selectProjId == null) { - this.$message.error('请选择项目') - return - } - if (this.selectTestState != null) { - this.$message.error('任务书已创建') - return - } - - this.modalTitle = '创建任务书' - this.selectTaskId = '' - this.visibleEdit = true + onSelectChange (selectedRowKeys, selectedRows) { + this.selectedRowKeys = selectedRowKeys }, recordClick (record, type) { if (type === 'view') { - this.selectProjId = record.projId - this.selectTaskId = record.id + this.projId = record.projId this.visibleView = true + } else if (type === 'create') { + this.projId = record.projId + this.visibleEdit = true } else if (type === 'edit') { - this.modalTitle = '修改任务书' - this.selectProjId = record.projId + this.projId = record.projId this.visibleEdit = true } else { let par = { auditObjectId: record.id, auditType: 2 } @@ -237,7 +180,7 @@ export default { this.visibleView = false }, callback (key) { - this.searchForm.testState = key; + this.searchForm.taskState = key; this.getListByPage() }, exportData () { @@ -245,36 +188,6 @@ export default { } }, watch: { - activeTab: { - handler (value) { - if (value === '1') { - this.display = true; - this.columns = columns.filter(e => e.tabKey !== '1') - return - } - this.display = false; - this.columns = columns.filter(e => e.tabKey !== '2') - }, - immediate: true - } } } </script> - -<style scoped lang="less"> -.app-content { - border: 1px solid #e8e8e8; - padding: 0px 10px 10px 10px; -} -.ant-form-item { - display: flex !important; -} -.ant-form-item-control-wrapper { - flex: 1 !important; - width: 100% !important; -} -.ant-pagination { - float: inherit !important; - margin-top: 15px; -} -</style> \ No newline at end of file diff --git a/src/views/report/project/components/edit/projectCreate.vue b/src/views/report/task/components/taskCreate.vue similarity index 91% rename from src/views/report/project/components/edit/projectCreate.vue rename to src/views/report/task/components/taskCreate.vue index eac2a87f7d1fd7e09653ffd547654b631a3aadcf..c40630475a35e020c361be0ff13ec7dd49abb73e 100644 --- a/src/views/report/project/components/edit/projectCreate.vue +++ b/src/views/report/task/components/taskCreate.vue @@ -8,7 +8,7 @@ </a-steps> </div> <div class="page-content"> - <project-edit v-model="value" @close="closeWindow" @load="onLoad" @onStepChange="onStepChange" :completeStatus.sync=completeStatus :stepsArray.sync="stepsArray" ref="projCreate"></project-edit> + <task-edit v-model="value" @close="closeWindow" @load="onLoad" @onStepChange="onStepChange" :completeStatus.sync=completeStatus :stepsArray.sync="stepsArray" ref="projCreate" /> </div> <div class="page-footer"> <a-button v-if="currSteps > 0" style="margin-left: 40px" type="primary" @click="prev">上一步</a-button> @@ -22,12 +22,11 @@ <script> import { getType } from '@/views/utils/auth' -import projectEdit from "@/views/report/project/components/edit/projectEdit" -import projectEditKey from "@/views/report/project/components/keyProject/projectEdit" +import taskEdit from "@/views/report/task/components/taskEdit" export default { name: "projectCreate", components: { - projectEdit, projectEditKey, + taskEdit, }, data () { return { diff --git a/src/views/report/task/components/taskEdit.vue b/src/views/report/task/components/taskEdit.vue index 3f2ef9022a5e1bb71957b716c1b84006a2cf2ef9..5d7f6c6ff2562c19e80f0ee5b973ecdf22e430f0 100644 --- a/src/views/report/task/components/taskEdit.vue +++ b/src/views/report/task/components/taskEdit.vue @@ -1,655 +1,1038 @@ <template> - <div class="assignment-edit" style="height: 70vh;overflow: auto;"> - <a-form-model ref="form" :model="formData" :rules="rules" class="from-table"> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>研究项目</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 项目名称 - </a-col> - <a-col :span="22" v-if="formData.projName != null"> - {{formData.projName}} - </a-col> - </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>第一承担单位</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 名称 - </a-col> - <a-col :span="10"> - {{formData.appUnitName}} - </a-col> - <a-col :span="2" class="bg-gray"> - 联系电话 - </a-col> - <a-col :span="10"> - {{formData.linkTel}} - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 地址 - </a-col> - <a-col :span="10"> - {{formData.linkAddress}} - </a-col> - <a-col :span="2" class="bg-gray"> - 邮政编码 - </a-col> - <a-col :span="10"> - {{formData.postcode}} - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 主管部门 - </a-col> - <a-col :span="22"> - {{formData.authority}} - </a-col> - </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>项目负责人</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 姓名 - </a-col> - <a-col :span="10"> - {{formData.appPersonName}} - </a-col> - <a-col :span="2" class="bg-gray"> - 性别 - </a-col> - <a-col :span="10"> - {{formData.sex}} - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 出生年 - </a-col> - <a-col :span="10"> - {{formData.birthYear}} - </a-col> - <a-col :span="2" class="bg-gray"> - 联系电话 - </a-col> - <a-col :span="10"> - {{formData.mobile}} - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 学位 - </a-col> - <a-col :span="10"> - {{formData.degreeName}} - </a-col> - <a-col :span="2" class="bg-gray"> - 职称 - </a-col> - <a-col :span="10"> - {{formData.titleName}} - </a-col> - </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>项目组</span> - </div> - </a-col> - </a-row> - - <a-row> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">实施目标和主要内容</div> - </div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="testContent"> - <a-textarea placeholder="实施目标和主要内容" v-model="formData.testContent" :maxLength="400" style="width: 80%;height: 160px;margin-top: 12px;" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="4" class="bg-gray"> - <div class="required special-middle">预期成果形式</div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="target"> - <div style="display: flex;flex-wrap: wrap;line-height: 2.5;"> - <div v-for="(item, index) in formData.target" :key="index" style="margin-right: 20px;"> - <a-checkbox :checked="item.checked" :name="item.targetId" @change="onTargetChange(item)">{{item.targetName}}</a-checkbox> - <a-input-number size="small" :min="0" :max="1000" v-model="item.resultCount" :disabled="!item.checked" /> + <div> + <a-form-model ref="form" :model="formData" :rules="rules" style="border-top: 0px" class="from-table font-line-space"> + <div v-if="stepsArray[0].showStatus"> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>单位基本情况</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>单位名称</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.appUnitName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>注册单位类型</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item> + <div>{{ formData.unitTypeName }}</div> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">组织机构代码/统一社会信用代码</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="organizationCode"> + <a-input placeholder="组织机构代码/统一社会信用代码" v-model="formData.organizationCode" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">通讯地址</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + <div> + <a-form-model-item prop="address"> + <a-input placeholder="通讯地址" v-model="formData.address" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">注册所在地(县/区)</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="registeredAddress"> + <a-input placeholder="注册所在地" v-model="formData.registeredAddress" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">邮编</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="postCode"> + <a-input placeholder="邮编" v-model="formData.postCode" :maxLength="10" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">法定代表人</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="legalPerson"> + <a-input placeholder="法定代表人" v-model="formData.legalPerson" :maxLength="50" style="width:80%" /> + </a-form-model-item> </div> </div> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="4" class="bg-gray"> - <div class="required">总经费</div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="budgetCount"> - <a-input-number :min="0" :max="10000000" v-model="formData.budgetCount" style="width: 10%" /> (万元) - </a-form-model-item> - </a-col> - <!-- <a-col :span="4" class="bg-gray"> - <div class="required">市卫计委资助</div> - </a-col> - <a-col :span="8"> - <a-form-model-item prop="budgetGovCount"> - <a-input-number :min="0" :max="10000000" v-model="formData.budgetGovCount" style="width: 30%" /> (万元) - </a-form-model-item> - </a-col> --> - </a-row> - <a-row> - <a-col :span="4" class="bg-gray"> - <div class="required">起止日期</div> - </a-col> - <a-col :span="20"> - <a-form-model-item prop="startDate" style="flex-basis: 30%;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" style="width: 100%" @change="dateChange(formData)" /> - </a-form-model-item> - <span style="margin: -12px 10px 0 10px;">~</span> - <a-form-model-item prop="endDate" style="flex-basis: 30%;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" style="width: 100%" @change="dateChange(formData)" /> - </a-form-model-item> - </a-col> - </a-row> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">职工总数</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="workforce"> + <a-input-number v-model="formData.workforce" :min="0" :step="1" style="width: 100px" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">其中专科以上人员</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="specializedPersonnel"> + <a-input-number v-model="formData.specializedPersonnel" :min="0" :step="1" style="width: 100px" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div class="required">研究开发人员</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + <a-form-model-item prop="researchPersonnel"> + <a-input-number v-model="formData.researchPersonnel" :min="0" :step="1" style="width: 100px" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">开户银行</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="depositBank"> + <a-input placeholder="开户银行" v-model="formData.depositBank" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">银行账号</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="bankAccount"> + <a-input placeholder="银行账号" v-model="formData.bankAccount" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">开户银行地址</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="depositBankAddress"> + <a-input placeholder="开户银行地址" v-model="formData.depositBankAddress" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">银行联行号</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="interbankNumber"> + <a-input placeholder="开户银行地址" v-model="formData.interbankNumber" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>一、项目要实现的目标和主要研发内容</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - (一)项目要实现的目标 - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 序号 - </a-col> - <a-col :span="20" class="bg-gray"> - 内容 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont1" :key="'cont1' + index"> - <a-col :span="2"> - ({{index + 1}}) - </a-col> - <a-col :span="20"> - <a-form-model-item :prop="'cont1.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-input v-model="item.contentInfo" :maxLength="200" style="width: 90%;" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont1')"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont1')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - (二)主要研发内容 - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 序号 - </a-col> - <a-col :span="20" class="bg-gray"> - 内容 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont2" :key="'cont2' + index"> - <a-col :span="2"> - ({{index + 1}}) - </a-col> - <a-col :span="20"> - <a-form-model-item :prop="'cont2.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-input v-model="item.contentInfo" :maxLength="200" style="width: 90%;" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont2')"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont2')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> + <!-- 项目合作单位 --> + <cooperative-units-edit :cooperativeUnits.sync="formData.cooperativeUnits" /> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>二、项目的考核指标</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - (一)主要技术及学术指标 (形成的专利、新技术、新产品、新装置、论文专著、软件等的数量、指标及其水平等) - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 序号 - </a-col> - <a-col :span="20" class="bg-gray"> - 内容 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont3" :key="'cont3' + index"> - <a-col :span="2"> - ({{index + 1}}) - </a-col> - <a-col :span="20"> - <a-form-model-item :prop="'cont3.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-input v-model="item.contentInfo" :maxLength="200" style="width: 90%;" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont3')"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont3')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - (二)人才培养 - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 序号 - </a-col> - <a-col :span="20" class="bg-gray"> - 内容 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont4" :key="'cont4' + index"> - <a-col :span="2"> - ({{index + 1}}) - </a-col> - <a-col :span="20"> - <a-form-model-item :prop="'cont4.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-input v-model="item.contentInfo" :maxLength="200" style="width: 90%;" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont4')"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont4')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - (三)其他应考核的指标 - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 序号 - </a-col> - <a-col :span="20" class="bg-gray"> - 内容 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont5" :key="'cont5' + index"> - <a-col :span="2"> - ({{index + 1}}) - </a-col> - <a-col :span="20"> - <a-form-model-item :prop="'cont5.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-input v-model="item.contentInfo" :maxLength="200" style="width: 90%;" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont5')"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont5')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>项目基本情况</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目名称</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projName"> + <a-input placeholder="项目名称(限100字)" v-model="formData.projName" :maxLength="100" style="width: 80%" @change="projNameChange" /> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>三、项目阶段实施内容及目标</span> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 阶段 - </a-col> - <a-col :span="12" class="bg-gray"> - 阶段实施内容及阶段目标 - </a-col> - <a-col :span="8" class="bg-gray"> - 起止日期 - </a-col> - <a-col :span="2" class="bg-gray"> - 操作 - </a-col> - </a-row> - <a-row v-for="(item, index) in formData.cont6" :key="'cont6' + index"> - <a-col :span="2"> - <div class="special-middle">({{index + 1}})</div> - </a-col> - <a-col :span="12"> - <a-form-model-item :prop="'cont6.' + index + '.contentInfo'" :rules="{ required: true, message: '内容不能为空' }"> - <a-textarea v-model="item.contentInfo" placeholder="项目阶段实施内容及目标" :maxLength="500" style="width: 90%;height: 140px;margin-top: 12px;" /> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <div class="flex-layout special-middle"> - <a-form-model-item :prop="'cont6.' + index + '.startTime'" :rules="{ required: true, message: '内容不能为空' }" style="flex-basis: 45%;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.startTime" style="width: 100%" @change="dateChange(item)" /> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">学科代码</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="knowledgeId"> + <cascader-select v-model="formData.knowledgeId" /> </a-form-model-item> - <span style="margin: -12px 10px 0 10px;">~</span> - <a-form-model-item :prop="'cont6.' + index + '.endTime'" :rules="{ required: true, message: '内容不能为空' }" style="flex-basis: 45%;"> - <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.endTime" style="width: 100%" @change="dateChange(item)" /> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">附注说明</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="remark"> + <a-input placeholder="附注说明(限300字)" v-model="formData.remark" :maxLength="300" style="width: 80%" /> </a-form-model-item> - </div> - - </a-col> - <a-col :span="2"> - <div class="special-middle"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeCont(item, 'cont6')" class="special-middle"> - <a-button type="link" size="small">删除</a-button> - </a-popconfirm> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24" style="text-align: center;"> - <a-button type="dashed" style="width: 50%" @click="addCont('cont6')"> - <a-icon type="plus" /> 添加 - </a-button> - </a-col> - </a-row> - - <proj-group-member :members.sync="formData.members" /> - - <budget-edit :budget.sync="formData.budget" /> - - <a-row style="margin-top: 20px;text-align:center;"> - <a-button style="margin-right: 50px;" @click="save">保存</a-button> - <a-button type="primary" @click="submit">完成填写</a-button> - </a-row> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项日开始时间</div> + </div> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="startDate" style="width:200px;display: inline-block;"> + <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" @change="startDateChange" style="width: 180px" /> + </a-form-model-item> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目结束时间</div> + </div> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="endDate" style="width:200px;display: inline-block;"> + <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" @change="endDateChange" style="width: 180px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">联系人</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkName"> + <a-input placeholder="联系人" v-model="formData.unitLinkName" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">电话</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkMobile"> + <a-input placeholder="电话" v-model="formData.unitLinkMobile" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">电子信箱</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkEmail"> + <a-input placeholder="电子信箱" v-model="formData.unitLinkEmail" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">传真</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + <div> + <a-form-model-item prop="unitLinkFax"> + <a-input placeholder="传真" v-model="formData.unitLinkFax" :maxLength="100" style="width:80%" /> + </a-form-model-item> + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目摘要(400字以内)</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projAbstract"> + <a-textarea placeholder="项目摘要(限400字)" v-model="formData.projAbstract" :maxLength="400" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">关键词</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="projKeywords"> + <a-input placeholder="关键词(限100字)" v-model="formData.projKeywords" :maxLength="100" style="width: 80%" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>申请书正文</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24" class="bg-gray"> + <div class="special-middle" style="font-weight: bold;text-align: center;"> + <a :href="'/downloadFile/textTemplate.docx'" download="申请书正文.docx"> + <a-icon type="download"></a-icon> <span style="color:green;text-decoration:underline;font-size: 16px;">正文模板下载</span> + </a> + <span style="color: red;margin-left: 42px;">注:正文部分需要下载模版,填写完成后上传到系统中,格式 .doc,.docx,.pdf。</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24"> + <div style="min-height:34px;line-height: 40px;text-align: center;"> + <up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx','pdf']" message="请上传申请书正文" /> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24"> + <!-- <document-view :fileUrl="formData.downloadUrl" :fileName="formData.fileName" :imageArray="[formData.downloadUrl]"></document-view> + <preview-file v-model="formData.downloadUrl" :fileName="formData.fileName"></preview-file> --> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目主要实施内容和目标</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目实施目标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="researchContent"> + <a-textarea placeholder="项目实施目标(限5000字)" v-model="formData.researchContent" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>项目考核指标</span> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">主要技术指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="technologyTarget"> + <a-textarea placeholder="主要技术指标(限5000字)" v-model="formData.technologyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">主要经济指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="economyTarget"> + <a-textarea placeholder="主要经济指标(限5000字)" v-model="formData.economyTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">项目实施中形成的示范基地、中试线、生产线及其规模等</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="achievementTarget"> + <a-textarea placeholder="项目实施中形成的示范基地、中试线、生产线及其规模等(限5000字)" v-model="formData.achievementTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">科技报告考核指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="technologyReportsTarget"> + <a-textarea placeholder="科技报告考核指标(限5000字)" v-model="formData.technologyReportsTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div class="required">其他应考核的指标</div> + </div> + </a-col> + <a-col :span="20"> + <a-form-model-item prop="otherTarget"> + <a-textarea placeholder="其他应考核的指标(限5000字)" v-model="formData.otherTarget" :maxLength="5000" style="width: 80%; height: 160px; margin-top: 12px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + </div> + <div v-if="stepsArray[1].showStatus"> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目人员情况</span> + </div> + </a-col> + </a-row> + <!-- 项目组成员 --> + <project-member-edit :dataList.sync="formData.members" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 项目主要参与单位及分工 --> + <participate-units-edit :participateUnits.sync="formData.participateUnits" /> + </div> + <div v-if="stepsArray[2].showStatus"> + <!-- 经费预算 --> + <budget-edit :budget.sync="formData.budget" @save="budgetSave" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 分年度用款计划 --> + <fund-plan-edit :fundPlan.sync="formData.fundPlan" @save="planSave" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 设备费-购置设备预算明细表 --> + <device-edit :deviceList.sync="formData.deviceList" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 设备费-试制设备预算明细表 --> + <manufacture-edit :manufactureList.sync:="formData.manufactureList" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 项目承担单位研究资金支出预算明细表 --> + <unit-payment-edit :unitPayment.sync="formData.unitPayment" /> + </div> + <div v-if="stepsArray[3].showStatus"> + <!-- 项目安排及阶段目标 --> + <proj-stage-goals-edit :stageGoals.sync="formData.stageGoals" /> + <!-- 项目课题设置 --> + <project-sub-edit :projectSubList.sync="formData.projectSubList" /> + </div> + <div v-if="stepsArray[4].showStatus"> + <!-- 项目绩效指标 --> + <project-kpi-edit :projectKPI.sync="formData.projectKPI" /> + </div> + <div v-if="stepsArray[5].showStatus"> + <!-- 附件 --> + <file-edit :fileList.sync="formData.fileList" /> + </div> </a-form-model> </div> </template> <script> -import ProjGroupMember from "@/views/report/project/components/projectMemberEdit" -import BudgetEdit from '@/views/report/project/components/budgetEdit' + +import fundEdit from '@/views/report/project/components/fundEdit' + +import { getType } from '@/views/utils/auth' +import projectMemberEdit from '@/views/report/project/components/projectMemberEdit' +import cooperativeUnitsEdit from '@/views/report/project/components/cooperativeUnitsEdit' +import participateUnitsEdit from '@/views/report/project/components/participateUnitsEdit' +import deviceEdit from '@/views/report/project/components/deviceEdit' +import projStageGoalsEdit from '@/views/report/project/components/projStageGoalsEdit' +import budgetEdit from '@/views/report/project/components/fundEdit' +import fundPlanEdit from '@/views/report/project/components/fundPlanEdit' +import projectKpiEdit from '@/views/report/project/components/projectKpiEdit' +import manufactureEdit from '@/views/report/project/components/manufactureEdit' +import unitPaymentEdit from '@/views/report/project/components/unitPaymentEdit' +import projectSubEdit from '@/views/report/project/components/projectSubEdit' +import fileEdit from '@/views/report/project/components/fileEdit' +import documentView from '@/views/components/common/documentView' +import previewFile from '@/views/components/common/previewFile' import { isEmptyParams } from "@/views/utils/common" +import moment from 'moment' -const cont1 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'd37abeb6-14e0-4486-924d-e1e4baf67098', showIndex: 1 } } -const cont2 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b1fe4003-16ed-482f-8fd5-e34b1482c3d4', showIndex: 1 } } -const cont3 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b19cf66b-c1bb-4974-a524-114c1895dbd8', showIndex: 1 } } -const cont4 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'cf3abeff-9f1a-420e-b375-6aad33f12080', showIndex: 1 } } -const cont5 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'f1cea24c-d13d-48af-8abb-58eed9367c27', showIndex: 1 } } -const cont6 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'ebcdf2b0-011c-4d40-a064-f22d6f7ec646', showIndex: 1 } } +const ParticipateUnit = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null } +const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null } +const ManagementRule = { policyName: null, releaseDate: null, documentNumber: null, validityPeriod: null, mainContent: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } +const StageGoals = { startTime: null, endTime: null, target: null } +const ProjectSub = { projName: null, undertakingUnit: null, address: null, director: null, totalBudget: null, govBudget: null, selfBudget: null, cooperativeUnits: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } +const Cooperative = { id: null, unitName: null } +const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' } +const Equipment = { id: "", objectId: "", name: "", functionTarget: "", specificationType: "", quantity: 1, totalBudget: 0.0, useFrom: "", buyUnit: "", storageLocation: "", equipmentType: "", manufacturer: "", sharedScope: "", unitPrice: 0.0, }; +const projectKPI = { + reportYear: "", + projName: "", + appUnitName: "", + managerDept: "", + projAttribute: "", + projDeadline: "", + startDate: "", + endData: "", + yearTarget: "", + year1Goal: "", + year2Goal: "", + year3Goal: "", + totalBudget: 0.00, + applyFunds: 0.00, + selfFunds: 0.00, + yearTotal: 0.00, + yearApply: 0.00, + yearSelf: 0.00, + totalRowSpan: 0, //总合并行数 + outTarget: 0, //一级指标(产出指标) + benefitTarget: 0, //一级指标(效益指标) + satisfactionDegree: 0, //一级指标(满意度指标) + quantityTarget: 0, //二级指标(数量指标) + qualityTarget: 0, //二级指标(质量指标) + validityTarget: 0, //二级指标(时效指标) + costTarget: 0, //二级指标(成本指标) + economicTarget: 0, //二级指标(经济效益指标) + socialTarget: 0, //二级指标(社会效益指标) + ecologicalTarget: 0, //二级指标(生态效益指标) + sustainableTarget: 0, //二级指标(可持续影响指标) + serviceTarget: 0, //二级指标(服务对象满意度指标) + threeLevel: [], + kpiList: [], +}; + +import cascaderSelect from '@/views/components/common/cascaderSelect' export default { - name: "TestEdit", + name: 'projectEdit', + components: { + fundEdit, projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, unitPaymentEdit, projectSubEdit, participateUnitsEdit + }, + props: { + value: { + type: String, + default: () => { + return null + } + }, + stepsArray: { + type: Array, + default () { + return [] + } + }, + completeStatus: { + type: String, + default () { + return "0,0,0,0,0,0" + } + }, + }, + created () { + this.getProject() + }, data () { return { + overseasShow: false, formData: { - id: '', - projId: '', - // 实施目标和主要内容 - testContent: '', - // 总经费 - budgetCount: 0, - // 市卫计委资助 - budgetGovCount: 0, - // 起止日期 - startDate: null, - endDate: null, - // 申报人 + id: null, appPersonName: null, sex: null, - birthYear: null, - mobile: null, + birthday: null, + nationName: null, degreeName: null, titleName: null, - // 依托单位 + mobile: null, + email: null, appUnitName: null, - linkEmail: null, - linkTel: null, - linkAddress: null, - postcode: null, - authority: null, - // 项目内容 - cont1: [cont1()], - cont2: [cont2()], - cont3: [cont3()], - cont4: [cont4()], - cont5: [cont5()], - cont6: [cont6()], - // 成员 + unitLinkName: null, + unitLinkMobile: null, + unitLinkEmail: null, + unitLinkFax: null, + projName: null, + knowledgeId: null, + startDate: null, + endDate: null, + jobTime: null, + mainResearchAreas: null, + address: null, + subjectScope: null, + projClass: null, + projAbstract: null, + projKeywords: null, + totalFunding: null, + govFunding: null, + unitFunding: null, + selfFunding: null, + researchContent: null, + technologyTarget: null, + economyTarget: null, + achievementTarget: null, + otherTarget: null, + remark: null, + yearTarget: null, + year1Goal: null, + year2Goal: null, + year3Goal: null, + projectKPI: projectKPI, + cooperativeUnits: [], + participateUnits: [], members: [], - // 预期成果形式 - target: [], - // 经费 budget: [], + fundPlan: [], + deviceList: [], + manufactureList: [], + unitPayment: [], + stageGoals: [], + projectSubList: [], + fileList: [], + auditList: [], + managerDept: "", }, rules: { - testContent: { required: true, message: '请填写实施目标和主要内容', trigger: 'blur' }, - target: { required: true, message: '请选择预期成果形式' }, - budgetCount: { required: true, message: '请填写总经费', trigger: 'blur' }, - budgetGovCount: { required: true, message: '请填写市卫计委资助', trigger: 'blur' }, - startDate: { required: true, message: '请选择起始日期', trigger: 'change' }, - endDate: { required: true, message: '请选择结束日期', trigger: 'change' }, - } + jobTime: [{ required: true, message: '请填写每年工作时间(月)', trigger: 'blur' },], + address: [{ required: true, message: '请填写个人通讯地址', trigger: 'blur' },], + mainResearchAreas: [{ required: true, message: '请填写主要研究领域', trigger: 'blur' },], + unitLinkName: [{ required: true, message: '请填写单位联系人', trigger: 'blur' },], + unitLinkMobile: [{ required: true, message: '请填写联系人电话', trigger: 'blur' },], + unitLinkEmail: [{ required: true, message: '请填写电子邮箱', trigger: 'blur' },], + unitLinkFax: [{ required: true, message: '请填写传真', trigger: 'blur' },], + projName: [{ required: true, message: '请填写项目名称', trigger: 'blur' },], + knowledgeId: { required: true, message: '请选择学科代码', trigger: 'change' }, + // subjectScope: [{ required: true, message: '请填写选题范围', trigger: 'blur' },], + // projClass: [{ required: true, message: '请填写项目类别', trigger: 'blur' },], + remark: [{ required: true, message: '请填写附注说明', trigger: 'blur' },], + startDate: { required: true, message: '请选择项日开始时间', trigger: 'change' }, + endDate: { required: true, message: '请选择项目结束时间', trigger: 'change' }, + // totalFunding: [{ required: true, message: '请填写项目总经费', trigger: 'blur' },], + // govFunding: [{ required: true, message: '请填写申请科技经费', trigger: 'blur' },], + projAbstract: [{ required: true, message: '请填写项目摘要', trigger: 'blur' },], + projKeywords: [{ required: true, message: '请填写关键词', trigger: 'blur' },], + researchContent: { required: true, message: '请填写项目实施目标', trigger: 'blur' }, + technologyTarget: { required: true, message: '请填写主要技术指标', trigger: 'blur' }, + economyTarget: { required: true, message: '请填写主要经济指标', trigger: 'blur' }, + achievementTarget: [{ required: true, message: '请填写项目实施中形成的示范基地、中试线、生产线及其规模等', trigger: 'blur' },], + technologyReportsTarget: { required: true, message: '请填写科技报告考核指标', trigger: 'blur' }, + otherTarget: { required: true, message: '请填写其他应考核的指标', trigger: 'blur' }, + downloadUrl: [{ required: true, message: '请填写关键词', trigger: 'blur' },], + }, } }, - props: { - value: { - type: String, - default: () => { - return null - } - }, + computed: { }, - components: { - ProjGroupMember,BudgetEdit - }, - created () { - this.getTestInfoByProjId() + mounted () { + }, methods: { - getTestInfoByProjId () { - let pars = { projId: this.value } - this.$api.taskReport.getTestInfoByProjId(pars).then(({ data = {} }) => { - if (data) { - this.formData = data - if (this.formData.cont1 === null) { - this.formData.cont1 = [cont1()]; - this.formData.cont2 = [cont2()]; - this.formData.cont3 = [cont3()]; - this.formData.cont4 = [cont4()]; - this.formData.cont5 = [cont5()]; - this.formData.cont6 = [cont6()]; + moment, + save (step) { + if (this.checkInfo(step)) { + var obj = this.getObj(step) + obj.step = step + this.$emit('load', true) + let pars = isEmptyParams(obj) + let par = { ...pars } + this.$api.project.saveByStep(par).then(({ data = {} }) => { + if (data) { + this.formData.id = data + this.$message.success('保存成功!') + this.$emit('close', 'save') + } + this.$emit('load', false) + }).catch(() => { + this.$emit('load', false) + }) + } + }, + submit (step, next) { + if (this.checkInfo(step)) { + this.$refs.form.validate(valid => { + if (valid) { + this.$emit('load', true) + var arr = this.completeStatus.split(','); + arr[step] = "1"; + this.formData.completeStatus = arr.toString() + var obj = this.getObj(step) + obj.step = step + let state = obj.projState + if (state != 30 && step == 5) + obj.projState = 10 + let pars = isEmptyParams(obj) + let par = { ...pars } + this.$api.project.saveByStep(par).then(({ data = {} }) => { + if (data) { + this.formData.id = data + if (next) { + this.$emit('close', 'save') + this.$emit('onStepChange', { step: step + 1, state: arr.toString() }) + } else { + this.$message.success('成功!') + this.$emit('close', 'submit') + } + } + this.$emit('load', false) + }).catch(() => { + this.$emit('load', false) + }) + } else { + this.$message.error('信息未填写完全!') + return false + } + }) + } + }, + getProject () { + this.$emit('load', true) + if (!!this.value) { + this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => { + if (data) { + this.formData = data + this.$emit('onStepChange', { step: 0, state: data.completeStatus }) + this.loadList() + } else + this.$emit('close', 'error') + this.$emit('load', false) + }).catch(() => { + this.$emit('close', 'error') + this.$emit('load', false) + }) + } else { + this.$api.project.getNewProject({ projType: getType() }).then(({ data = {} }) => { + if (data) { + this.formData = data + this.$emit('onStepChange', { step: 0, state: data.completeStatus }) + this.loadList() + } else + this.$emit('close', 'error') + this.$emit('load', false) + }).catch(() => { + this.$emit('close', 'error') + this.$emit('load', false) + }) + } + }, + getCompleteStatus (step, completeStatus) { + var arr = completeStatus.split(',') + if (!!arr && arr.length > 0) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == "1") { + this.stepsArray[i].status = "finish" } } - }).catch(() => { - }) + this.stepsArray[step].status = "process" + } }, - save () { - let state = this.formData.testState - if (state == null) - this.formData.testState = -20 - let pars = isEmptyParams(this.formData) - let par = { ...pars } - this.$api.taskReport.save(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - this.$message.success('保存成功!') + loadList () { + + if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0) + this.formData.cooperativeUnits = [] + + if (!!!this.formData.participateUnits || this.formData.participateUnits.length == 0) + this.formData.participateUnits = [] //{ ...Cooperative }, { ...Cooperative } + + if (!!!this.formData.members || this.formData.members.length == 0) + this.formData.members = [] + + if (!!!this.formData.deviceList || this.formData.deviceList.length == 0) + this.formData.deviceList = [] + + if (!!!this.formData.manufactureList || this.formData.manufactureList.length == 0) + this.formData.manufactureList = [] + + if (!!!this.formData.unitPayment || this.formData.unitPayment.length == 0) + this.formData.unitPayment = [] + + if (!!!this.formData.stageGoals || this.formData.stageGoals.length == 0) + this.formData.stageGoals = [{ ...StageGoals }, { ...StageGoals }, { ...StageGoals }] + + if (!!!this.formData.projectSubList || this.formData.projectSubList.length == 0) + this.formData.projectSubList = [] + + if (!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) { + this.formData.fileList = [] + } + }, + processKpiFunds () { + if (!!this.formData.budget && this.formData.budget.length > 0) { + this.formData.projectKPI.yearTotal = this.formData.budget[0].totalBudget + this.formData.projectKPI.yearApply = this.formData.budget[0].applyFunds + this.formData.projectKPI.yearSelf = this.formData.budget[0].selfFunds + } + }, + processProjectYearTarget () { + this.formData.yearTarget = this.formData.projectKPI.yearTarget + this.formData.year1Goal = this.formData.projectKPI.year1Goal + this.formData.year2Goal = this.formData.projectKPI.year2Goal + this.formData.year3Goal = this.formData.projectKPI.year3Goal + this.formData.projectKPI.kpiList = this.formData.projectKPI.threeLevel + this.formData.managerDept = this.formData.projectKPI.managerDept + this.formData.projAttribute = this.formData.projectKPI.projAttribute + }, + getObj (step) { + var obj = null + switch (step) { + case 0: { + obj = { + id: null, reportYear: null, batch: null, projState: null, appPersonId: null, appUnitId: null, projType: null, + jobTime: null, address: null, mainResearchAreas: null, + unitLinkName: null, unitLinkMobile: null, unitLinkEmail: null, unitLinkFax: null, + projName: null, knowledgeId: null, startDate: null, endDate: null, + remark: null, projClass: null, subjectScope: null, projAbstract: null, projKeywords: null, + totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, + researchContent: null, technologyTarget: null, economyTarget: null, achievementTarget: null, technologyReportsTarget: null, otherTarget: null, + fileId: null, downloadId: null, completeStatus: null, step: null + } + this.formData.projectKPI.appUnitName = this.formData.appUnitName + break; } - }).catch(() => { + case 1: + obj = { id: null, members: [], participateUnits: [], completeStatus: null, step: null } + break; + case 2: + this.processKpiFunds() + obj = { id: null, totalFunding: null, govFunding: null, unitFunding: null, selfFunding: null, budget: [], fundPlan: [], deviceList: [], manufactureList: [], unitPayment: [], completeStatus: null, step: null } + break; + case 3: + obj = { id: null, stageGoals: [], projectSubList: [], completeStatus: null, step: null } + break; + case 4: + this.processProjectYearTarget() + obj = { id: null, projectKPI: null, yearTarget: null, year1Goal: null, year2Goal: null, year3Goal: null, managerDept: null, projAttribute: null, completeStatus: null, step: null } + break; + case 5: + obj = { id: null, fileList: [], projState: null, completeStatus: null, step: null } + break; + } + Object.keys(obj).forEach(key => { + obj[key] = this.formData[key]; }) + return obj }, - submit () { - this.$refs.form.validate(valid => { - if (valid && this.checkApplyMoney()) { - let state = this.formData.testState - if (state != 30) - this.formData.testState = -10 - let pars = isEmptyParams(this.formData) - let par = { ...pars } - this.$api.taskReport.save(par).then(({ data = {} }) => { - if (data) { - this.formData.id = data - this.$message.success('填写完成!') - this.$emit('close', 'edit') - } - }).catch(() => { - }) + checkInfo (step) { + if (step == 0) { + if (this.formData.projName == "" || this.formData.projName == null) { + alert('项目名称不能为空') + return false + } else return true + } else if (step == 1) { + if (!!!this.formData.members || this.formData.members.length == 0) { + this.$message.error('至少添加一位项目组成员!') + return false + } else return true + } else if (step == 2) { + return true + } else if (step == 3) { + return true + } else if (step == 4) { + const flag = this.determineProjKPIDetail() + if (flag) { + return true } else { - this.$message.success('任务书信息未填写完全,请检查!') + this.$message.error('项目绩效目标表需要至少填写其中的一项指标明细!') return false } - }) - }, - checkApplyMoney () { - if (this.formData.budgetCount != null && this.formData.budgetCount != this.formData.budget[0].totalBudget) { - alert('项目经费与总经费不一致!') - return false - } else { + } else if (step == 5) { return true } }, - onTargetChange (item) { - item.checked = !item.checked - if (item.checked) { - item.result = 'True' - } else { - item.result = 'False' - } - }, - // 添加项目内容 - addCont (key) { - switch (key) { - case 'cont1': - this.formData[key].push(cont1()) - break - case 'cont2': - this.formData[key].push(cont2()) + determineProjKPIDetail () { + let flag = false + for (let e of this.formData.projectKPI.threeLevel) { + if (e.performanceStandard && e.performanceStandard > 0) { + flag = true break - case 'cont3': - this.formData[key].push(cont3()) + } + if (e.targetValue && e.targetValue > 0) { + flag = true break - case 'cont4': - this.formData[key].push(cont4()) + } + if (e.yearValue1 && e.yearValue1 > 0) { + flag = true break - case 'cont5': - this.formData[key].push(cont5()) + } + if (e.yearValue2 && e.yearValue2 > 0) { + flag = true break - case 'cont6': - this.formData[key].push(cont6()) + } + if (e.yearValue3 && e.yearValue3 > 0) { + flag = true break + } } + return flag + }, + projNameChange (value) { + this.formData.projectKPI.projName = this.formData.projName + }, + startDateChange (value, dateString) { + this.formData.projectKPI.startDate = this.formData.startDate }, - // 删除项目内容 - removeCont (item, key) { - let index = this.formData[key].indexOf(item) - if (index !== -1) { - this.formData[key].splice(index, 1) + endDateChange (value, dateString) { + this.formData.projectKPI.endDate = this.formData.endDate + if (this.formData.projectKPI.startDate && this.formData.projectKPI.endDate) { + let projDeadline = moment(this.formData.startDate).format('YYYY-MM-DD') + "至" + moment(this.formData.endDate).format('YYYY-MM-DD') + this.formData.projectKPI.projDeadline = projDeadline } }, - // 起止日期选择处理 - dateChange (t) { - let statr = t.start_date - let end = t.end_date - if (!statr || !end) { - return + planSave (e) { + if (!!e && e.length == 3) { + this.formData.projectKPI.yearTotal = e[0] + this.formData.projectKPI.yearApply = e[1] + this.formData.projectKPI.yearSelf = e[2] } - if (statr > end) { - t.start_date = end - t.end_date = statr + }, + budgetSave (e) { + if (!!e && e.length == 3) { + this.formData.totalFunding = e[0] + this.formData.govFunding = e[1] + this.formData.projectKPI.totalBudget = this.formData.totalFunding + this.formData.projectKPI.applyFunds = this.formData.govFunding + this.formData.projectKPI.selfFunds = e[2] } - } + }, } } </script> - -<style lang="less" scoped> +<style scoped lang="less"> </style> + diff --git a/src/views/report/task/components/taskFileEdit.vue b/src/views/report/task/components/taskFileEdit.vue deleted file mode 100644 index eaed1e6dd188fd8d0a335fc97da1f55bbbb7e10d..0000000000000000000000000000000000000000 --- a/src/views/report/task/components/taskFileEdit.vue +++ /dev/null @@ -1,244 +0,0 @@ -<template> - <div class="from-table font-line-space"> - <a-spin :spinning="loading" style="width: 100%;height: 100%;"> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目编号</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.projNo}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目名称</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.projName}}</div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报人</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.personName}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报单位</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.appUnitName}}</div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报年度</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.reportYear}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目开始结束时间</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{moment(projectInfo.startDate).format('YYYY-MM-DD')}} 至 {{moment(projectInfo.endDate).format('YYYY-MM-DD')}}</div> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - 附件上传 - </div> - </a-col> - </a-row> - <a-row type="flex" class="row_center"> - <a-col :span="8" class="bg-gray"> - <div class="special-middle"> - <div>附件名称</div> - </div> - </a-col> - <a-col :span="10" class="bg-gray"> - <div class="special-middle"> - <div>附件上传</div> - </div> - </a-col> - <a-col :span="6" class="bg-gray"> - <div class="special-middle"> - <div>说明</div> - </div> - </a-col> - </a-row> - <a-row v-for="(item, index) in projectInfo.fileList" :key="'fileList' + index" type="flex"> - <a-col :span="8" style="text-align: center; margin-top: 10px;"> - <span class="required"></span>{{ item.fileExplain }} - <!-- <a-form-model-item :prop="'fileList.' + index + '.fileExplain'" :rules="{required: true, message: '*',trigger: 'blur',}"> - <a-input v-model="item.fileExplain" :maxLength="100" style="width: 80%" :disabled="item.required" /> - </a-form-model-item> --> - </a-col> - <a-col :span="10"> - <div class="special-middle"> - <div v-if="item.downloadUrl" class="file-box"> - <div> - <!-- <a-icon type="file" style="margin-right: 8px" /> - <span class="hover-pointer" @click="downloadfile(item)">{{item.fileName}}</span> --> - <document-view :fileUrl="item.downloadUrl" :fileName="item.fileName" :imageArray="[item.downloadUrl]"></document-view> - </div> - <a-icon type="delete" class="hover-pointer d-icon" @click="deleteTaskFile(item, index)" /> - </div> - <div v-else> - <a-form-model-item :prop="'fileList.' + index + '.downloadUrl'" :rules="{required: true, message: '请上传附件',trigger: 'blur',}"> - <input type="file" :ref="'fileElem' + index" class="visually-hidden" @change="handleFiles(item, index)" /> - <a-button @click="fileSelect(item, index)"><a-icon type="upload" />选择文件</a-button> - </a-form-model-item> - </div> - </div> - </a-col> - <a-col :span="6"> - <div class="special-middle"> - <span style="margin-left: 10px; font-size: 10pt; color:red; font-weight: bold;">请上传项目任务书附件(文件类型必须为:pdf),文件大小不能超过{{fileSize}}M!</span> - </div> - </a-col> - </a-row> - </a-spin> - </div> -</template> - -<script> -import moment from 'moment' -import documentView from '@/views/components/common/documentView' - -const File = { fileName: "", downloadUrl: "", fileExplain: "项目任务书", downloadId: "" }; - -export default { - name: "taskFileEdit", - props: { - value: { - type: String, - default: () => { - return null - } - }, - }, - components: { documentView }, - data() { - return { - projectInfo: { - projNo: '', - projName: '', - startDate: '', - endDate: '', - appPersonName: '', - appUnitName: '', - mobile: '', - address: '', - fileList: [{ ...File }], - }, - fileSize: 15, - }; - }, - created () { - this.getProjectBasicInfoById() - }, - methods: { - moment, - getProjectBasicInfoById () { - if (this.value != null) { - this.loading = true - this.$api.project.getProjectBasicInfoById({ id: this.value }).then(({ data = {} }) => { - if (data) { - this.projectInfo = data - if (this.projectInfo.fileList == null || this.projectInfo.fileList.length <= 0) - this.projectInfo.fileList = [{ ...File }] - this.loading = false - } - }).catch(() => { this.$emit('close', 'close') }) - } - }, - downloadfile() { - - }, - deleteTaskFile (item, index) { - this.$api.taskReport.deleteTaskFile({ id: item.downloadId }).then(({ data = {} }) => { - if (data) { - item.fileName = '' - item.downloadUrl = '' - item.downloadId = '' - } - }).catch(() => { - this.$message.error('删除失败') - }) - }, - uploadHandle (file, fileName, projId) { - let formData = new FormData() - formData.append('file', file) - formData.append('fileName', fileName) - formData.append('projId', projId) - return formData - }, - handleFiles(item, index) { - let fileElem = this.$refs['fileElem' + index][0] - let files = fileElem.files - if (files.length <= 0) { - this.$message.error('未选中文件,请尝试重新选择') - return - } - if (!this.fileCheck(files[0])) - return - - this.$api.taskReport.asyncUploadTaskFile(this.uploadHandle(files[0], files[0].name, this.value)).then(({ data = {} }) => { - if (data) { - item.fileName = data.fileName - item.downloadUrl = data.downloadUrl - item.downloadId = data.id - item.fileExplain = data.fileExplain - } else - this.$message.error('上传失败') - }).catch(() => { - this.$message.error('上传失败') - }) - }, - fileSelect (item, index) { - let fileElem = this.$refs['fileElem' + index][0] - if (fileElem) { - fileElem.click() - } - }, - fileCheck (file) { - //判断是否小于1M - let isLtSize = file.size < 1024 * 1024 * this.fileSize; - if (!isLtSize) { - this.$message.error('文件大小不能超过' + this.fileSize + 'M!'); - return false - } - if (file.type !== "application/pdf") { - this.$message.error('项目任务书附件必须为pdf文件类型!'); - return false - } - return true - }, - } -}; -</script> \ No newline at end of file diff --git a/src/views/report/task/components/taskFileInfo.vue b/src/views/report/task/components/taskFileInfo.vue deleted file mode 100644 index 701d94299506e41dd1c899ad32f9552324c58afe..0000000000000000000000000000000000000000 --- a/src/views/report/task/components/taskFileInfo.vue +++ /dev/null @@ -1,161 +0,0 @@ -<template> - <div class="from-table font-line-space"> - <a-spin :spinning="loading" style="width: 100%;height: 100%;"> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目编号</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.projNo}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目名称</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.projName}}</div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报人</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.personName}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报单位</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.appUnitName}}</div> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>申报年度</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{projectInfo.reportYear}}</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>项目开始结束时间</div> - </div> - </a-col> - <a-col :span="8"> - <div class="special-middle"> - <div>{{moment(projectInfo.startDate).format('YYYY-MM-DD')}} 至 {{moment(projectInfo.endDate).format('YYYY-MM-DD')}}</div> - </div> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - 附件 - </div> - </a-col> - </a-row> - <a-row type="flex" class="row_center"> - <a-col :span="8" class="bg-gray"> - <div class="special-middle"> - <div>附件名称</div> - </div> - </a-col> - <a-col :span="16" class="bg-gray"> - <div class="special-middle"> - <div>附件文件</div> - </div> - </a-col> - </a-row> - <a-row v-for="(item, index) in projectInfo.fileList" :key="'fileList' + index" type="flex"> - <a-col :span="8" style="text-align: center; margin-top: 10px;"> - <span>{{ item.fileExplain }}</span> - </a-col> - <a-col :span="16"> - <div class="special-middle"> - <div v-if="item.downloadUrl" class="file-box"> - <div> - <document-view :fileUrl="item.downloadUrl" :fileName="item.fileName" :imageArray="[item.downloadUrl]"></document-view> - </div> - </div> - <div v-else style="text-align: center;">无</div> - </div> - </a-col> - </a-row> - </a-spin> - </div> - </template> - - <script> - import moment from 'moment' - import documentView from '@/views/components/common/documentView' - - const File = { fileName: "", downloadUrl: "", fileExplain: "项目任务书", downloadId: "" }; - - export default { - name: "taskFileEdit", - props: { - value: { - type: String, - default: () => { - return null - } - }, - }, - components: { documentView }, - data() { - return { - projectInfo: { - projNo: '', - projName: '', - startDate: '', - endDate: '', - appPersonName: '', - appUnitName: '', - mobile: '', - address: '', - fileList: [{ ...File }], - }, - fileSize: 15, - }; - }, - created () { - this.getProjectBasicInfoById() - }, - methods: { - moment, - getProjectBasicInfoById () { - if (this.value != null) { - this.loading = true - this.$api.project.getProjectBasicInfoById({ id: this.value }).then(({ data = {} }) => { - if (data) { - this.projectInfo = data - if (this.projectInfo.fileList == null || this.projectInfo.fileList.length <= 0) - this.projectInfo.fileList = [{ ...File }] - this.loading = false - } - }).catch(() => {this.loading = false})//() => { this.$emit('close', 'close') } - } - }, - } - }; - </script> \ No newline at end of file diff --git a/src/views/report/task/components/taskInfo.vue b/src/views/report/task/components/taskInfo.vue index 4dbf432e313d8a88d6f9b4c758e52b01bacaecda..3c229993a2cb97c4b0e080522bbf565757d7c40c 100644 --- a/src/views/report/task/components/taskInfo.vue +++ b/src/views/report/task/components/taskInfo.vue @@ -1,536 +1,823 @@ <template> - <div class="assignment-detail"> - <!-- <a-button type="primary">导出任务书</a-button> --> - <div style="margin-top: 16px;"></div> - <div class="from-table"> + <div class="from-table font-line-space" v-if="tabsData[0].isShow"> + <div v-if="tabsData[1].isShow"> <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>研究项目</span> + <a-col :span="24" style="border-top: 0px;text-align: center;"> + <div class="main-title"> + <span>项目基本情况</span> </div> </a-col> </a-row> <a-row> - <a-col :span="2" class="bg-gray"> - 项目名称 - </a-col> - <a-col :span="22"> - {{value.projName}} + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>申请人信息</span> + </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 起止时间 - </a-col> - <a-col :span="22"> - {{value.startDate}}至{{value.endDate}} + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>姓名</div> + </div> </a-col> - </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>第一承担单位</span> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.appPersonName }} + </div> </div> </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 名称 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>性别</div> + </div> </a-col> - <a-col :span="10"> - {{value.appUnitName}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.sex }} + </div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 联系电话 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>出生日期</div> + </div> </a-col> - <a-col :span="10"> - {{value.linkTel}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ moment(value.birthday).format('YYYY-MM-DD') }} + </div> + </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 地址 + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>民族</div> + </div> </a-col> - <a-col :span="10"> - {{value.linkAddress}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.nationName }} + </div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 邮政编码 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>学位</div> + </div> </a-col> - <a-col :span="10"> - {{value.postcode}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.degreeName }} + </div> + </div> </a-col> - </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 主管部门 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>职称</div> + </div> </a-col> - <a-col :span="22"> - {{value.authority}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.titleName }} + </div> + </div> </a-col> </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>主要合作(参加)单位</span> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电话</div> </div> </a-col> - </a-row> - <a-row> - <a-col :span="1" class="bg-gray"> - 序号 + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.mobile }} + </div> + </div> </a-col> - <a-col :span="9" class="bg-gray"> - 单位名称 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电子邮箱</div> + </div> </a-col> - <a-col :span="11" class="bg-gray"> - 地址 + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.email }} + </div> + </div> </a-col> <a-col :span="3" class="bg-gray"> - 在项目中的分工 + <div class="special-middle"> + <div>每年工作时间(月)</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.jobTime }} + </div> + </div> </a-col> </a-row> - <a-row v-for="(item, index) in value.unitList" :key="'unit' + index"> - <a-col :span="1"> - {{index + 1}} + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>个人通讯地址</div> + </div> </a-col> - <a-col :span="9"> - {{item.unitName}} + <a-col :span="21"> + <div class="special-middle"> + <div> + {{ value.address }} + </div> + </div> </a-col> - <a-col :span="11"> - {{item.unitAddress}} + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>工作单位</div> + </div> </a-col> - <a-col :span="3"> - {{item.projectWork}} + <a-col :span="21"> + <div class="special-middle"> + <div> + {{ value.appUnitName }} + </div> + </div> + </a-col> + </a-row> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>主要研究领域</div> + </div> + </a-col> + <a-col :span="21"> + <div class="special-middle"> + <div v-html="toTextarea(value.mainResearchAreas)"></div> + </div> </a-col> </a-row> <a-row> - <a-col :span="24"> + <a-col :span="24" style="border-top: 0px"> <div class="tb-title"> - <span>项目负责人</span> + <span>申请单位信息</span> </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 姓名 - </a-col> - <a-col :span="10"> - {{value.appPersonName}} - </a-col> - <a-col :span="2" class="bg-gray"> - 性别 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>单位名称</div> + </div> </a-col> - <a-col :span="10"> - {{value.sex}} + <a-col :span="20"> + <div class="special-middle"> + <div> + {{ value.appUnitName }} + </div> + </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 出生年 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>联系人</div> + </div> </a-col> - <a-col :span="10"> - {{value.birthYear}} + <a-col :span="8"> + <div class="special-middle"> + <div> + {{ value.unitLinkName }} + </div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 联系电话 + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>电话</div> + </div> </a-col> - <a-col :span="10"> - {{value.mobile}} + <a-col :span="8"> + <div class="special-middle"> + <div> + {{ value.unitLinkMobile }} + </div> + </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 学位 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>电子信箱</div> + </div> </a-col> - <a-col :span="10"> - {{value.degreeName}} + <a-col :span="8"> + <div class="special-middle"> + <div> + {{ value.unitLinkEmail }} + </div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 职称 + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>传真</div> + </div> </a-col> - <a-col :span="10"> - {{value.titleName}} + <a-col :span="8"> + <div class="special-middle"> + <div> + {{ value.unitLinkFax }} + </div> + </div> </a-col> </a-row> + <!-- 项目合作单位 --> + <!-- <cooperative-units-info :cooperativeUnits.sync="value.cooperativeUnits" /> --> + <a-row> - <a-col :span="24"> + <a-col :span="24" style="border-top: 0px"> <div class="tb-title"> - <span>项目组</span> + <span>项目基本情况</span> </div> </a-col> </a-row> <a-row type="flex"> - <a-col :flex="1"> - <div class="bg-gray">总人数</div> - <div>{{value.memCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">高职</div> - <div>{{value.memHighCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">中职</div> - <div>{{value.memMiddleCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">初职</div> - <div>{{value.memLowCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">博士研究生</div> - <div>{{value.memBsCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">硕士研究生</div> - <div>{{value.memSsCount}}</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">其他</div> - <div>{{value.memOtherCount}}</div> - </a-col> - <a-col :flex="0.5" class="bg-gray"> - <div style="line-height: 80px;">其中</div> - </a-col> - <a-col :flex="1"> - <div class="bg-gray">博士</div> - <div>{{value.memdegree1}}</div> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目名称</div> + </div> </a-col> - <a-col :flex="1"> - <div class="bg-gray">硕士</div> - <div>{{value.memdegree2}}</div> + <a-col :span="20"> + <div class="special-middle"> + {{ value.projName }} + </div> </a-col> </a-row> - <a-row> + <a-row type="flex"> <a-col :span="4" class="bg-gray"> - 实施目标和主要内容 + <div class="special-middle"> + <div>学科代码</div> + </div> </a-col> <a-col :span="20"> - {{value.testContent}} + <div class="special-middle"> + {{ value.knowledgeName }} + </div> </a-col> </a-row> - <a-row> + <a-row type="flex"> <a-col :span="4" class="bg-gray"> - 预期成果形式 + <div class="special-middle"> + <div>选题范围</div> + </div> </a-col> <a-col :span="20"> - <div style="display: flex;flex-wrap: wrap;line-height: 2.5;"> - <div v-for="(item, index) in value.target" :key="index" style="margin-right: 20px;"> - <a-checkbox :checked="item.checked" :name="item.targetid" disabled>{{item.targetName}}</a-checkbox> - ({{item.resultCount}}) - </div> + <div class="special-middle"> + {{ value.subjectScope }} </div> </a-col> + <!-- <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目类别</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + {{ value.projClass }} + </div> + </a-col> --> </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>经费投入</span> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>附注说明</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + {{ value.remark }} </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 总经费 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项日开始时间</div> + </div> </a-col> - <a-col :span="10" v-if="value.budget.length > 1"> - {{value.budget[0].totalBudget}}万元 + <a-col :span="8"> + <div class="special-middle"> + {{ moment(value.startDate).format('YYYY-MM-DD') }} + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 市卫计委资助 + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目结束时间</div> + </div> </a-col> - <a-col :span="10" v-if="value.budget.length > 1"> - {{value.budget[0].govBudget}}万元 + <a-col :span="8"> + <div class="special-middle"> + {{ moment(value.endDate).format('YYYY-MM-DD') }} + </div> </a-col> </a-row> - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>一、项目要实现的目标和主要研发内容</span> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目总经费(万元)</div> </div> </a-col> - </a-row> - <a-row> - <a-col :span="24" class="bg-gray"> - (一)项目要实现的目标 + <a-col :span="8"> + <div class="special-middle"> + {{ value.totalFunding }} 万元 + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>申请经费(万元)</div> + </div> + </a-col> + <a-col :span="8"> + <div class="special-middle"> + {{ value.govFunding }} 万元 + </div> </a-col> </a-row> - <a-row> - <a-col :span="24" class="more-row" v-if="value.cont1.length >= 1"> - <div v-for="(cont, index) in value.cont1" :key="index"> - {{index + 1}}、{{cont.contentInfo}} + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目摘要(400字以内)</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + <div v-html="toTextarea(value.projAbstract)"></div> </div> </a-col> </a-row> - - <a-row> - <a-col :span="24" class="bg-gray"> - (二)主要研发内容 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>关键词</div> + </div> + </a-col> + <a-col :span="20"> + <div class="special-middle"> + {{ value.projKeywords }} + </div> </a-col> </a-row> + <!-- 项目主要参与单位及分工 --> + <participate-units-info :dataList.sync="value.participateUnits" /> + </div> + <div v-if="tabsData[2].isShow"> <a-row> - <a-col :span="24" class="more-row"> - <div v-for="(cont, index) in value.cont2" :key="index"> - {{index + 1}}、{{cont.contentInfo}} + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目人员情况</span> </div> </a-col> </a-row> - <a-row> - <a-col :span="24"> + <a-col :span="24" style="border-top: 0px"> <div class="tb-title"> - <span>二、项目的考核指标</span> + <span>项目负责人</span> </div> </a-col> </a-row> - <a-row> - <a-col :span="24" class="bg-gray"> - (一)主要技术及学术指标 (形成的专利、新技术、新产品、新装置、论文专著、软件等的数量、指标及其水平等) + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>姓名</div> + </div> </a-col> - </a-row> - <a-row> - <a-col :span="24" class="more-row"> - <div v-for="(cont, index) in value.cont3" :key="index"> - {{index + 1}}、{{cont.contentInfo}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.appPersonName }} + </div> </div> </a-col> - </a-row> - <a-row> - <a-col :span="24" class="bg-gray"> - (二)人才培养 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>性别</div> + </div> </a-col> - </a-row> - <a-row> - <a-col :span="24" class="more-row"> - <div v-for="(cont, index) in value.cont4" :key="index"> - {{index + 1}}、{{cont.contentInfo}} + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.sex }} + </div> </div> </a-col> - </a-row> - <a-row> - <a-col :span="24" class="bg-gray"> - (三)其他应考核的指标 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>出生日期</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ moment(value.birthday).format('YYYY-MM-DD') }} + </div> + </div> </a-col> </a-row> - <a-row> - <a-col :span="24" class="more-row"> - <div v-for="(cont, index) in value.cont5" :key="index"> - {{index + 1}}、{{cont.contentInfo}} + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>证件类型</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + 身份证 + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>证件号码</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.certId }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>民族</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.nationName }} + </div> </div> </a-col> </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>三、项目阶段实施内容及目标</span> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>职称</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.titleName }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>从事专业</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.specName }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>学位</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.degreeName }} + </div> </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 阶段 + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>职务</div> + </div> </a-col> - <a-col :span="22" class="bg-gray"> - 阶段实施内容及阶段目标 + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.dutyName }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电话</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.mobile }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>电子邮箱</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.email }} + </div> + </div> </a-col> </a-row> - <a-row v-for="(item, index) in value.cont6" :key="index"> - <a-col :span="2"> - <div class="special-middle">{{index + 1}}</div> + <a-row type="flex"> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>个人通讯地址</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.address }} + </div> + </div> </a-col> - <a-col :span="22" class="more-row"> - <div> - 起止日期:{{item.startTime}}---{{item.endTime}} + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>工作单位</div> </div> - <div> - {{item.contentInfo}} + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.appUnitName }} + </div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>每年工作时间(月)</div> + </div> + </a-col> + <a-col :span="5"> + <div class="special-middle"> + <div> + {{ value.jobTime }} + </div> </div> </a-col> </a-row> - - <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>四、项目经费预算</span> + <!-- 项目组成员 --> + <project-member-info :dataList.sync="value.members" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + </div> </a-col> </a-row> - <a-row style="text-align: center;"> - <a-col :span="8" class="bg-gray"> - 经费来源预算 + <a-row type="flex" class="row_center"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>总人数</div> + </div> </a-col> - <a-col :span="16" class="bg-gray"> - 经费支出预算 + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>高级</div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>中级</div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>初级</div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>博士后</div> + </div> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>博士生</div> + </div> + </a-col> + <a-col :span="3" class="bg-gray"> + <div class="special-middle"> + <div>硕士生</div> + </div> </a-col> </a-row> - <a-row> + <a-row type="flex" class="row_center"> <a-col :span="4"> - 科目 + <div class="special-middle"> + <div> + {{ value.memCount }} + </div> + </div> </a-col> - <a-col :span="4"> - 总经费来源(万元) + <a-col :span="3"> + <div class="special-middle"> + <div> + {{ value.memHighCount }} + </div> + </div> + </a-col> + <a-col :span="3"> + <div class="special-middle"> + <div> + {{ value.memMiddleCount }} + </div> + </div> + </a-col> + <a-col :span="3"> + <div class="special-middle"> + <div> + {{ value.memLowCount }} + </div> + </div> </a-col> <a-col :span="4"> - 科目 + <div class="special-middle"> + <div> + {{ value.memBshCount }} + </div> + </div> </a-col> - <a-col :span="6"> - 总经费支出(万元) + <a-col :span="4"> + <div class="special-middle"> + <div> + {{ value.memBsCount }} + </div> + </div> </a-col> - <a-col :span="6"> - 其中市卫健委科技计费(万元) + <a-col :span="3"> + <div class="special-middle"> + <div> + {{ value.memSsCount }} + </div> + </div> </a-col> </a-row> - - <template v-if="value.budget.length > 1"> - <a-row> - <a-col :span="4">{{value.budget[0].budgetName}}</a-col> - <a-col :span="4">{{value.budget[0].totalBudget}}</a-col> - <a-col :span="4">{{value.budget[3].budgetName}}</a-col> - <a-col :span="6">{{value.budget[3].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[3].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4">{{value.budget[1].budgetName}}</a-col> - <a-col :span="4">{{value.budget[1].govBudget}}</a-col> - <a-col :span="4">{{value.budget[4].budgetName}}</a-col> - <a-col :span="6">{{value.budget[4].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[4].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4">{{value.budget[2].budgetName}}</a-col> - <a-col :span="4">{{value.budget[2].unitBudget}}</a-col> - <a-col :span="4">{{value.budget[5].budgetName}}</a-col> - <a-col :span="6">{{value.budget[5].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[5].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[6].budgetName}}</a-col> - <a-col :span="6">{{value.budget[6].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[6].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[7].budgetName}}</a-col> - <a-col :span="6">{{value.budget[7].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[7].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[8].budgetName}}</a-col> - <a-col :span="6">{{value.budget[8].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[8].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[9].budgetName}}</a-col> - <a-col :span="6">{{value.budget[9].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[9].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[10].budgetName}}</a-col> - <a-col :span="6">{{value.budget[10].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[10].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[11].budgetName}}</a-col> - <a-col :span="6">{{value.budget[11].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[11].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[12].budgetName}}</a-col> - <a-col :span="6">{{value.budget[12].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[12].govBudget}}</a-col> - </a-row> - <a-row> - <a-col :span="4"></a-col> - <a-col :span="4"></a-col> - <a-col :span="4">{{value.budget[13].budgetName}}</a-col> - <a-col :span="6">{{value.budget[13].totalBudget}}</a-col> - <a-col :span="6">{{value.budget[13].govBudget}}</a-col> - </a-row> - </template> - + </div> + <div v-if="tabsData[3].isShow"> <a-row> - <a-col :span="24"> - <div class="tb-title"> - <span>项目组成员(含项目负责人)</span> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>项目主要实施内容和目标</span> </div> </a-col> </a-row> - <a-row> - <a-col :span="2" class="bg-gray"> - 姓名 - </a-col> - <a-col :span="3" class="bg-gray"> - 出生年月 + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目实施目标</div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 学历 + <a-col :span="20"> + <div v-html="toTextarea(value.researchContent)"></div> </a-col> - <a-col :span="2" class="bg-gray"> - 职称 + </a-row> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="tb-title"> + <span>项目考核指标</span> + </div> </a-col> + </a-row> + <a-row type="flex"> <a-col :span="4" class="bg-gray"> - 研究方向 + <div class="special-middle"> + <div>主要技术指标</div> + </div> </a-col> - <a-col :span="6" class="bg-gray"> - 工作单位 + <a-col :span="20"> + <div v-html="toTextarea(value.technologyTarget)"></div> </a-col> - <a-col :span="3" class="bg-gray"> - 项目分工 + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>主要经济指标</div> + </div> </a-col> - <a-col :span="2" class="bg-gray"> - 年参加月数 + <a-col :span="20"> + <div v-html="toTextarea(value.economyTarget)"></div> </a-col> </a-row> - <a-row v-for="(item, index) in value.members" :key="'member' + index"> - <a-col :span="2"> - {{item.name}} + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>项目实施中形成的示范基地、中试线、生产线及其规模等</div> + </div> </a-col> - <a-col :span="3"> - {{moment(item.birthday).format('YYYY-MM-DD')}} + <a-col :span="20"> + <div v-html="toTextarea(value.achievementTarget)"></div> </a-col> - <a-col :span="2"> - {{item.degreeName}} + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>科技报告考核指标</div> + </div> </a-col> - <a-col :span="2"> - {{item.titleName}} + <a-col :span="20"> + <div v-html="toTextarea(value.technologyReportsTarget)"></div> </a-col> - <a-col :span="4"> - {{item.researchDirection}} + </a-row> + <a-row type="flex"> + <a-col :span="4" class="bg-gray"> + <div class="special-middle"> + <div>其他应考核的指标</div> + </div> </a-col> - <a-col :span="6"> - {{item.workUnit}} + <a-col :span="20"> + <div v-html="toTextarea(value.otherTarget)"></div> </a-col> - <a-col :span="3"> - {{item.projWork}} + </a-row> + </div> + <div v-if="tabsData[4].isShow"> + <a-row> + <a-col :span="24" style="border-top: 0px"> + <div class="main-title"> + <span>申请书正文</span> + </div> </a-col> - <a-col :span="2"> - {{item.forMonths}} + </a-row> + <a-row type="flex"> + <a-col :span="24" class="bg-gray"> + <div class="special-middle" style="font-weight: bold;text-align: center;"> + <document-view :fileUrl="value.downloadUrl" :fileName="value.fileName" :imageArray="[value.downloadUrl]" v-if="!!value.downloadUrl"></document-view> + </div> </a-col> </a-row> + </div> + <div v-if="tabsData[5].isShow"> + <!-- 经费预算 --> + <budget-info :budget.sync="value.budget" /> + <a-row type="flex"> + <a-col :span="24" style="text-align: center;"> + <div class="special-middle"> + + </div> + </a-col> + </a-row> + <!-- 分年度用款计划 --> + <fund-plan-info :fundPlan.sync="value.fundPlan" /> + <!-- 设备费-购置设备预算明细表 --> + <device-info :deviceList.sync="value.deviceList" /> + <!-- 设备费-试制设备预算明细表 --> + <manufacture-info :manufactureList.sync:="value.manufactureList" /> + <!-- 项目承担单位研究资金支出预算明细表 --> + <unit-payment-info :unitPayment.sync="value.unitPayment" /> + </div> + <div v-if="tabsData[6].isShow"> + <!-- 项目安排及阶段目标 --> + <proj-stage-goals-info :stageGoals.sync="value.stageGoals" /> + </div> + <div v-if="tabsData[7].isShow"> + <!-- 项目课题设置 --> + <project-sub-info :dataList.sync="value.projectSubList" /> + </div> + <div v-if="tabsData[8].isShow"> + <project-kpi-info v-if="value.projectKPI" :projectKPI.sync="value.projectKPI" /> + </div> + <div v-if="tabsData[9].isShow"> + <!-- 附件 --> + <file-info :fileList.sync="value.fileList" /> + </div> + <div v-if="tabsData[10].isShow"> <a-row> <a-col :span="24"> - <div class="tb-title"> + <div class="main-title"> <span>审核记录</span> </div> </a-col> @@ -541,163 +828,73 @@ </a-col> </a-row> </div> + </div> </template> <script> import moment from 'moment' + +import cooperativeUnitsInfo from '@/views/report/project/components/cooperativeUnitsInfo' +import participateUnitsInfo from '@/views/report/project/components/participateUnitsInfo' +import projectMemberInfo from '@/views/report/project/components/projectMemberInfo' +import projectKpiInfo from '@/views/report/project/components/projectKpiInfo.vue' +import budgetInfo from '@/views/report/project/components/budgetInfo' +import fundPlanInfo from '@/views/report/project/components/fundPlanInfo' +import unitPaymentInfo from '@/views/report/project/components/unitPaymentInfo' +import deviceInfo from '@/views/report/project/components/deviceInfo' +import manufactureInfo from '@/views/report/project/components/manufactureInfo' +import projStageGoalsInfo from "@/views/report/project/components/projStageGoalsInfo"; +import projectSubInfo from '@/views/report/project/components/projectSubInfo' +import fileInfo from "@/views/report/project/components/fileInfo"; +import documentView from '@/views/components/common/documentView' import AuditList from '@/views/audit/components/auditInfo' +import { toTextarea } from '@/views/utils/common' -const cont1 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'd37abeb6-14e0-4486-924d-e1e4baf67098', showIndex: 1 } } -const cont2 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b1fe4003-16ed-482f-8fd5-e34b1482c3d4', showIndex: 1 } } -const cont3 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b19cf66b-c1bb-4974-a524-114c1895dbd8', showIndex: 1 } } -const cont4 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'cf3abeff-9f1a-420e-b375-6aad33f12080', showIndex: 1 } } -const cont5 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'f1cea24c-d13d-48af-8abb-58eed9367c27', showIndex: 1 } } -const cont6 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'ebcdf2b0-011c-4d40-a064-f22d6f7ec646', showIndex: 1 } } export default { components: { - AuditList + cooperativeUnitsInfo, projectMemberInfo, projectKpiInfo, budgetInfo, fundPlanInfo, unitPaymentInfo, deviceInfo, manufactureInfo, fileInfo, documentView, AuditList, projStageGoalsInfo, projectSubInfo, participateUnitsInfo }, - name: "TestInfo", + name: "ProjectInfo", data () { return { - testInfo: { - id: '', - projId: '', - projName: '', - startDate: null, - endDate: null, - appUnitName: '', - linkTel: '', - linkAddress: '', - linkEmail: '', - // 实施目标和主要内容 - testContent: '', - // 总经费 - budgetCount: 0, - // 市卫计委资助 - budgetGovCount: 0, - // 起止日期 - startDate: null, - endDate: null, - // 申报人 - appPersonName: null, - sex: null, - birthYear: null, - mobile: null, - degreeName: null, - titleName: null, - // 依托单位 - appUnitName: null, - linkEmail: null, - linkTel: null, - linkAddress: null, - postcode: null, - authority: null, - // 项目内容 - cont1: [cont1()], - cont2: [cont2()], - cont3: [cont3()], - cont4: [cont4()], - cont5: [cont5()], - cont6: [cont6()], - // 成员 - members: [], - // 预期成果形式 - target: [], - // 经费 - budget: [], - //审核记录 - auditList: [{ result: '', unit: '', time: '' }], - } } }, props: { value: { type: Object, default: () => { - return [...this.testInfo] + return null } - } + }, + tabsData: { + type: Array, + default: () => { + return [] + } + }, }, created () { - this.load() + if (!!!this.tabsData || this.tabsData.length == 0) + this.tabsData = [ + { title: '全部', key: '0', isShow: true }, + { title: '项目基本信息', key: '1', isShow: true }, + { title: '项目组主要成员', key: '2', isShow: true }, + { title: '项目主要实施内容和目标', key: '3', isShow: true }, + { title: '申请书正文', key: '4', isShow: true }, + { title: '经费预算及设备明细', key: '5', isShow: true }, + { title: '项目实施阶段及任务', key: '6', isShow: true }, + { title: '项目课题设置', key: '7', isShow: true }, + { title: '绩效目标表', key: '8', isShow: true }, + { title: '附件信息', key: '9', isShow: true }, + { title: '项目审核记录', key: '10', isShow: true }, + ] }, mounted () { - this.tinymceSet() }, methods: { - moment, - load () { - }, - tinymceSet () { - tinymce.remove('#tinymce_dom') - tinymce.init({ - selector: '#tinymce_dom', - language: 'zh_CN', - content_style: "img {max-width:100%;}", - height: 800, - inline: true, - readonly: true, - }) - }, - } -} -</script> - -<style lang="less" scoped> -.from-table { - border-right: 1px solid #f0f0f0; - border-bottom: 1px solid #f0f0f0; - .ant-col { - padding: 0 16px; - line-height: 40px; - min-height: 40px; - border-left: 1px solid #f0f0f0; - border-top: 1px solid #f0f0f0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .bg-gray { - background-color: #f8fafc; - } - .more-row { - white-space: pre-wrap; - line-height: 2; - } - .flex-layout { - display: flex; - } - // 内容垂直居中 - .special-middle { - position: relative; - top: 50%; - transform: translateY(-50%); - } -} -// 项目组 格式修改 -.ant-row-flex { - text-align: center; - .ant-col { - padding: 0; - } - .bg-gray { - border-bottom: 1px solid #f0f0f0; - } -} -.tb-title { - color: #0079fe; - display: flex; - text-align: center; - height: 40px; - &::after { - content: ""; - flex-grow: 1; - border-top: 1px dashed #d9d9d9; - transform: translateY(50%); - margin-left: 10px; + moment, toTextarea, } } -</style> +</script> \ No newline at end of file diff --git a/src/views/report/task/components/taskView.vue b/src/views/report/task/components/taskView.vue index e47e1e166b7a8a34a5ec5b8df17fa61435d56031..588f37bc38a0210ebb9da666f7a4460eae8cdb9e 100644 --- a/src/views/report/task/components/taskView.vue +++ b/src/views/report/task/components/taskView.vue @@ -1,80 +1,126 @@ + <template> - <div class="report-detail"> - <!-- <a-button type="primary">导出任务书</a-button> --> - <div style="margin-top: 16px;"> - <test-info v-model="testInfo" /> - </div> + <div class="app-content layoutEmbedded" style="height: 76vh;overflow: auto;"> + <a-spin :spinning="loading" style="width: 100%;height: 100%;"> + <div class="page-content"> + <a-tabs type="card" hideAdd size="small" @change="callback"> + <a-tab-pane :key="item.key" :tab="item.title" v-for="(item) in tabsData"> + </a-tab-pane> + </a-tabs> + </div> + <div class="page-footer"> + <!-- 申报项目详情 --> + <!-- <a-button type="primary" @click="onExport">导出</a-button> --> + <task-info v-model="formData" :tabsData.sync="tabsData" /> + </div> + </a-spin> </div> </template> <script> -import { isEmptyParams } from "@/views/utils/common" -import TestInfo from '@/views/report/task/components/taskInfo' -import AuditList from '@/views/audit/components/auditInfo' - -const cont1 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'd37abeb6-14e0-4486-924d-e1e4baf67098', showIndex: 1 } } -const cont2 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b1fe4003-16ed-482f-8fd5-e34b1482c3d4', showIndex: 1 } } -const cont3 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b19cf66b-c1bb-4974-a524-114c1895dbd8', showIndex: 1 } } -const cont4 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'cf3abeff-9f1a-420e-b375-6aad33f12080', showIndex: 1 } } -const cont5 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'f1cea24c-d13d-48af-8abb-58eed9367c27', showIndex: 1 } } -const cont6 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'ebcdf2b0-011c-4d40-a064-f22d6f7ec646', showIndex: 1 } } +const projectKPI = { + reportYear: "", + projName: "", + appUnitName: "", + managerDept: "", + projAttribute: "", + projDeadline: "", + startDate: "", + endData: "", + yearTarget: "", + year1Goal: "", + year2Goal: "", + year3Goal: "", + totalBudget: 0.00, + applyFunds: 0.00, + selfFunds: 0.00, + yearTotal: 0.00, + yearApply: 0.00, + yearSelf: 0.00, + totalRowSpan: 0, //总合并行数 + outTarget: 0, //一级指标(产出指标) + benefitTarget: 0, //一级指标(效益指标) + satisfactionDegree: 0, //一级指标(满意度指标) + quantityTarget: 0, //二级指标(数量指标) + qualityTarget: 0, //二级指标(质量指标) + validityTarget: 0, //二级指标(时效指标) + costTarget: 0, //二级指标(成本指标) + economicTarget: 0, //二级指标(经济效益指标) + socialTarget: 0, //二级指标(社会效益指标) + ecologicalTarget: 0, //二级指标(生态效益指标) + sustainableTarget: 0, //二级指标(可持续影响指标) + serviceTarget: 0, //二级指标(服务对象满意度指标) + threeLevel: [], + kpiList: [], +}; +import { budgetList } from '@/views/report/project/config' +import { getType } from '@/views/utils/auth' +import taskInfo from "@/views/report/task/components/taskInfo" export default { - name: "TestView", + name: "projectView", components: { - TestInfo, AuditList + taskInfo }, data () { return { - testInfo: { - id: '', - projId: '', - projName: '', - startDate: null, - endDate: null, - appUnitName: '', - linkTel: '', - linkAddress: '', - linkEmail: '', - // 实施目标和主要内容 - testContent: '', - // 总经费 - budgetCount: 0, - // 市卫计委资助 - budgetGovCount: 0, - // 起止日期 - startDate: null, - endDate: null, - // 申报人 + tabsData: [ + { title: '全部', key: '0', isShow: true }, + { title: '项目基本信息', key: '1', isShow: true }, + { title: '项目组主要成员', key: '2', isShow: true }, + { title: '项目主要实施内容和目标', key: '3', isShow: true }, + { title: '申请书正文', key: '4', isShow: true }, + { title: '经费预算及设备明细', key: '5', isShow: true }, + { title: '项目实施阶段及任务', key: '6', isShow: true }, + { title: '项目课题设置', key: '7', isShow: true }, + { title: '绩效目标表', key: '8', isShow: true }, + { title: '附件信息', key: '9', isShow: true }, + { title: '项目审核记录', key: '10', isShow: true }, + ], + formData: { + id: null, appPersonName: null, sex: null, - birthYear: null, - mobile: null, + birthday: null, + nationName: null, degreeName: null, titleName: null, - // 依托单位 + mobile: null, + email: null, + jobTime: null, + address: null, appUnitName: null, - linkEmail: null, - linkTel: null, - linkAddress: null, - postcode: null, - authority: null, - // 项目内容 - cont1: [cont1()], - cont2: [cont2()], - cont3: [cont3()], - cont4: [cont4()], - cont5: [cont5()], - cont6: [cont6()], - // 成员 + mainResearchAreas: null, + unitLinkName: null, + unitLinkMobile: null, + unitLinkEmail: null, + unitLinkFax: null, + projName: null, + knowledgeId: null, + subjectScope: null, + projClass: null, + remark: null, + startDate: null, + endDate: null, + totalFunding: null, + govFunding: null, + projAbstract: null, + projKeywords: null, + yearTarget: null, + year1Goal: null, + year2Goal: null, + year3Goal: null, + projectKPI: projectKPI, + cooperativeUnits: [], members: [], - // 预期成果形式 - target: [], - // 经费 budget: [], - //审核记录 - auditList: [{ result: '', unit: '', time: '' }], - } - } + fundPlan: [], + fileList: [], + auditList: [], + managerDept: "", + }, + loading: false, + projType: getType() + }; }, props: { value: { @@ -85,26 +131,69 @@ export default { }, }, created () { - this.getTestInfoByProjId() + this.getProjectInfoById() }, methods: { - getTestInfoByProjId () { - let pars = { projId: this.value } - this.$api.taskReport.getTestInfoByProjId(pars).then(({ data = {} }) => { - if (data) { - this.testInfo = data - } - }).catch(() => { + getProjectInfoById () { + if (this.value != null) { + this.loading = true + this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => { + if (data) { + this.formData = data + this.loading = false + } else + this.$emit('close', 'error') + }).catch(() => { this.$emit('close', 'error') }) + } + }, + onExport () { + this.$api.project.export({ id: this.value }).then((res) => { + let blob = new Blob([res], { + type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8", + }); + const fileName = this.formData.projName + '.doc'; + let downloadElement = document.createElement('a') + let href = window.URL.createObjectURL(blob); //创建下载的链接 + downloadElement.href = href; + downloadElement.download = fileName; //下载后文件名 + document.body.appendChild(downloadElement); + downloadElement.click(); //点击下载 + document.body.removeChild(downloadElement); //下载完成移除元素 + window.URL.revokeObjectURL(href); //释放blob + }) + }, + callback (key) { + var index = parseInt(key) + this.tabsData.forEach(e => { + if (key == '0') + e.isShow = true + else + e.isShow = false }) - } - } + this.tabsData[0].isShow = true; + this.tabsData[index].isShow = true; + }, + }, } </script> -<style lang="less" scoped> -.report-detail { - height: 70vh; +<style scoped lang="less"> +::v-deep .ant-spin-container { + width: 100%; + height: 100%; +} +::-webkit-scrollbar { + width: 8px; + height: 6px; +} +.page-content { + width: 100%; + height: 50px; +} +.page-footer { + width: 100%; + height: calc(100% - 50px); overflow: auto; - border-left: 1px solid #f0f0f0; - border-top: 1px solid #f0f0f0; } -</style> \ No newline at end of file +</style> + + diff --git a/src/views/report/task/projectTask.vue b/src/views/report/task/projectTask.vue deleted file mode 100644 index 5abb223fd2d22b1a3892d09c84d84f7b849517a3..0000000000000000000000000000000000000000 --- a/src/views/report/task/projectTask.vue +++ /dev/null @@ -1,196 +0,0 @@ -<template> - <div class="app-content"> - <a-form layout="inline" :form="form" :model="searchForm"> - <a-form-item> - <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 160px" /> - </a-form-item> - <a-form-item> - <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 160px" /> - </a-form-item> - <a-form-item> - <base-select v-model="searchForm.reportYear" :title="'年度'" :type="7" :isAll="true" :width="160" /> - </a-form-item> - <a-form-item> - <a-button type="primary" icon="search" @click="searchList">搜索</a-button> - <a-button icon="reload" style="margin-left: 10px" @click="searchFormReset" class="bt-normal">重置</a-button> - <a-button type="primary" style="margin-left: 10px" @click="FileDownload" icon="download">项目任务书模板下载</a-button> - </a-form-item> - <div style="width:100%;margin-bottom: 8px;"> - <a-button type="primary" @click="exportData">导出Excel</a-button> - </div> - </a-form> - <a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading"> <!-- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }" --> - <template slot="projName" slot-scope="record"> - <a @click="recordClick(record, 'viewProject')">{{record.projName}}</a> - </template> - <template slot="testStateName" slot-scope="record"> - <span v-if="record">{{record}}</span> - <span v-else>未填写</span> - </template> - <template slot="option" slot-scope="record"> - <a-button type="primary" size="small" v-if="((!record.testState||record.testState==1))" @click="recordClick(record,'UploadProjTask')">上传项目任务书</a-button> - </template> - </a-table> - <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal v-model="taskFileEditView" title="上传项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> - <task-file-edit v-model="selectProjId" @close="closeTaskFileEditWindow" /> - </a-modal> - <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false"> - <project-view v-model="selectProjId" @close="() => this.visibleView = false" /> - </a-modal> - </div> -</template> - -<script> -import { isEmptyParams, filterExportExcelData, tableColumnsName, } from "@/views/utils/common"; -import { getType } from '@/views/utils/auth' -import baseSelect from '@/views/components/common/baseSelect' -import taskFileEdit from '@/views/report/task/components/taskFileEdit' -import projectView from '@/views/report/project/components/projectView' -import moment from 'moment' -import axios from 'axios' - -const columns = [ - { title: "项目名称", scopedSlots: { customRender: 'projName' } }, - { title: "项目编号", dataIndex: "projNo" }, - { title: "项目开始时间", dataIndex: "projStart", tabKey: "2" }, - { title: "项目结束时间", dataIndex: "projEnd", tabKey: "2" }, - { title: "申报年度", dataIndex: "reportYear" }, - //{ title: "状态", dataIndex: "testStateName", scopedSlots: { customRender: "testStateName" }, }, - { title: "操作", fixed: "right", width: "200px", scopedSlots: { customRender: "option" }, align: 'center' }, -]; - -export default { - name: "projectTask", - components: { baseSelect, taskFileEdit, projectView, }, - data() { - return { - form: this.$form.createForm(this, { name: 'advanced_search' }), - searchForm: { projName: '', projNo: '', testState: '5', reportYear: null }, - tableData: [], - columns: columns, - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, - selectedRowKeys: [], - loading: false, - taskFileEditView: false, - selectProjId: null, - //selectTaskId: null, - //selectTestState: null, - visibleView: false, - id: null, - url1: { - downloadUrl: '/downloadFile/202408091430.doc', - fileName: '项目任务书模板.doc', - }, - url2: { - downloadUrl: '/downloadFile/202408091430.doc', - fileName: '公立医院高水平临床专科发展科技项目任务书.doc', - }, - realurl: null, - }; - }, - created () { - this.getYear() - if (getType() == 1) - this.realurl = this.url1 - else - this.realurl = this.url2 - }, - methods: { - getYear () { - this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { - if (data) { - this.searchForm.reportYear = data.year - this.getListByPage() - } - }).catch(() => { }) - }, - getListByPage () { - this.loading = true - let pars = isEmptyParams(this.searchForm) - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } - - this.$api.taskReport.getListByPage(par).then(({ data = {} }) => { - if (data) { - const { dataList = [], total = 0 } = data - this.tableData = dataList - this.pagination.total = total - this.loading = false - this.tableData.forEach(e => { - if (e.projStart) { - e.projStart = moment(e.projStart).format('YYYY-MM-DD') - e.projEnd = moment(e.projEnd).format('YYYY-MM-DD') - } - }) - } - }).catch(() => { - this.loading = false - }) - }, - searchList () { - this.getListByPage() - }, - change () { - this.getListByPage() - }, - showSizeChange (current, pageSize) { - this.pagination.pageIndex = current - this.pagination.pageSize = pageSize - this.getListByPage() - }, - onSelectChange (selectedRowKeys, selectedRows) { - this.selectedRowKeys = selectedRowKeys - this.selectProjId = selectedRows[0].projId - // this.selectTaskId = selectedRows[0].id - // this.selectTestState = selectedRows[0].testState - }, - searchFormReset () { - this.searchForm = { - projName: '', - projNo: '', - testState: '5', - reportYear: moment().year(), - } - }, - recordClick (record, type) { - if (type === 'UploadProjTask') { - this.selectProjId = record.projId - this.taskFileEditView = true - } - if (type === 'viewProject') { - this.selectProjId = record.projId - this.visibleView = true - } - }, - closeTaskFileEditWindow() { - this.taskFileEditView = false - }, - exportData () { - this.$ToDoExcel(`任务书列表`, tableColumnsName(this.columns), filterExportExcelData(this.columns, this.tableData)) - }, - FileDownload () { - axios({ - url: this.realurl.downloadUrl, // 替换为实际文件的URL - method: 'GET', - responseType: 'blob' // 告诉axios返回的数据类型为Blob - }).then(response => { - const url = window.URL.createObjectURL(new Blob([response.data])) - const link = document.createElement('a') - link.href = url - link.setAttribute('download', this.realurl.fileName) // 下载文件的名称 - document.body.appendChild(link) - link.click() - }) - }, - } -}; -</script> \ No newline at end of file diff --git a/src/views/statistic/project/Index.vue b/src/views/statistic/project/Index.vue index f4b4c053dd2520ce95954be152ec080414d7d627..a3e60c47e949fb2c213ea7e33d1b1c9a7b030ef6 100644 --- a/src/views/statistic/project/Index.vue +++ b/src/views/statistic/project/Index.vue @@ -62,13 +62,13 @@ import { getType } from '@/views/utils/auth' import moment from 'moment' import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; import projectView from '@/views/report/project/components/projectView' -import projectEdit from '@/views/report/project/components/projectEdit' + import unitEdit from '@/views/statistic/project/components/unitEdit' import unitTreeSelect from '@/views/components/common/unitTreeSelect' export default { name: 'serchProject', components: { - projectEdit, projectView, unitTreeSelect, unitEdit + projectView, unitTreeSelect, unitEdit }, data () { return { diff --git a/src/views/statistic/task/Index.vue b/src/views/statistic/task/Index.vue index b329500205e31bb0a7e7f9ea50c12a5107cc42e6..ae1d5f7e6a718d25b078b0712b317e26f0c3cc0b 100644 --- a/src/views/statistic/task/Index.vue +++ b/src/views/statistic/task/Index.vue @@ -19,7 +19,7 @@ </a-col> <a-col :span="6"> <a-form-item label="任务书状态"> - <base-select v-model="searchForm.testState" :type="2" :isAll="true" /> + <base-select v-model="searchForm.taskState" :type="2" :isAll="true" /> </a-form-item> </a-col> </a-row> @@ -54,7 +54,7 @@ </a-row> <div style="margin-top: 8px;"></div> <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> - <template slot="testStateName" slot-scope="record"> + <template slot="taskStateName" slot-scope="record"> <span v-if="record"> {{record}} </span> @@ -97,7 +97,7 @@ export default { appUnitName: null, appPersonName: null, reportYear: null, - testState: null, + taskState: null, auditType: 2 }, tableData: [], diff --git a/src/views/timeSet/batch/Index.vue b/src/views/timeSet/batch/Index.vue index bf18ba6152122fc5f4678a5ea3426379cced0d45..4be2b1e75274276622e743b325f0fd771ec664a9 100644 --- a/src/views/timeSet/batch/Index.vue +++ b/src/views/timeSet/batch/Index.vue @@ -1,8 +1,11 @@ <template> <div class="app-content"> - <div class="submit-btn"> - <a-button type="primary" class="search_input" style="margin-right: 10px;" @click="createBatch">添加</a-button> - </div> + <a-form :form="form" :model="searchForm" layout="inline" class="search_form"> + <a-form-item> + <a-button type="primary" class="search_input" style="margin-right: 10px;" @click="createBatch">添加</a-button> + <a-button type="primary" @click="search">刷新</a-button> + </a-form-item> + </a-form> <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading" bordered> <template slot="option" slot-scope="record"> <a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button> @@ -20,24 +23,22 @@ import { getType } from '@/views/utils/auth' import batchEdit from '@/views/timeSet/batch/components/batchEdit' import moment from 'moment' - +import { isEmptyParams} from "@/views/utils/common" export default { name: 'batchSet', components: { batchEdit }, data () { return { + searchForm: { projType: getType(), timeType: 1, }, + form: this.$form.createForm(this, { name: 'advanced_search' }), tableData: [], columns: [ { key: '1', title: '申报年度', dataIndex: 'year', align: 'center' }, { key: '2', title: '批次', dataIndex: 'batch', align: 'center' }, { key: '3', title: '项目申报时间', dataIndex: 'reportStart', colSpan: 2, ellipsis: true }, { key: '4', title: '项目申报时间', dataIndex: 'reportEnd', colSpan: 0, ellipsis: true }, - // { key: '5', title: '州市级及以下单位上报时间', dataIndex: 'unitStart', colSpan: 2, ellipsis: true }, - // { key: '6', title: '州市级及以下单位上报时间', dataIndex: 'unitEnd', colSpan: 0, ellipsis: true }, - // { key: '7', title: '州市级行政单位审核时间', dataIndex: 'prefectureStart', colSpan: 2, ellipsis: true }, - // { key: '8', title: '州市级行政单位审核时间', dataIndex: 'prefectureEnd', colSpan: 0, ellipsis: true }, - // { key: '9', title: '省直单位上报时间', dataIndex: 'provinceStart', colSpan: 2, ellipsis: true }, - // { key: '10', title: '省直单位上报时间', dataIndex: 'provinceEnd', colSpan: 0, ellipsis: true }, + { key: '5', title: '审核时间', dataIndex: 'auditStart', colSpan: 2, ellipsis: true }, + { key: '6', title: '审核时间', dataIndex: 'auditEnd', colSpan: 0, ellipsis: true }, { key: '11', title: '专家评审时间', dataIndex: 'expertStart', colSpan: 2, ellipsis: true }, { key: '12', title: '专家评审时间', dataIndex: 'expertEnd', colSpan: 0, ellipsis: true }, { key: '13', title: '备注', dataIndex: 'remark', align: 'center', ellipsis: true }, @@ -60,8 +61,9 @@ export default { moment, getListByPage () { this.loading = true - let par = { projType: getType(), pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } - this.$api.batch.getBatchListByPage(par).then(({ data = {} }) => { + let pars = isEmptyParams(this.searchForm) + let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } + this.$api.batch.getListByPage(par).then(({ data = {} }) => { if (data) { const { dataList = [], total = 0 } = data this.tableData = dataList @@ -70,6 +72,14 @@ export default { } }).catch(() => { this.loading = false }) }, + search () { + this.pagination.pageIndex = 1 + this.getListByPage() + }, + reset () { + this.pagination.pageIndex = 1 + this.getListByPage() + }, change () { this.getListByPage() }, diff --git a/src/views/timeSet/batch/components/batchEdit.vue b/src/views/timeSet/batch/components/batchEdit.vue index 67254e5bb08af823ad9cb535ba29a3f7bc068817..9db67b1cc8b822e12655b0d16019823862d61e2b 100644 --- a/src/views/timeSet/batch/components/batchEdit.vue +++ b/src/views/timeSet/batch/components/batchEdit.vue @@ -30,36 +30,16 @@ </a-form-model-item> </a-col> </a-row> - <!-- <a-row> - <a-col :span="6" class="bg-gray"> - <div class="required">州市级及以下单位上报时间</div> - </a-col> - <a-col :span="18"> - <a-form-model-item ref="unitRange" prop="unitRange"> - <a-range-picker v-model="formData.unitRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="unitDateChange" :placeholder="['开始时间', '结束时间']" /> - </a-form-model-item> - </a-col> - </a-row> <a-row> <a-col :span="6" class="bg-gray"> - <div class="required">州市级行政单位审核时间</div> + <div class="required">审核时间</div> </a-col> <a-col :span="18"> - <a-form-model-item ref="prefectureRange" prop="prefectureRange"> - <a-range-picker v-model="formData.prefectureRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="prefectureDateChange" :placeholder="['开始时间', '结束时间']" /> + <a-form-model-item ref="unitRange" prop="unitRange"> + <a-range-picker v-model="formData.auditRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="auditDateChange" :placeholder="['开始时间', '结束时间']" /> </a-form-model-item> </a-col> </a-row> - <a-row> - <a-col :span="6" class="bg-gray"> - <div class="required">省直单位上报时间</div> - </a-col> - <a-col :span="18"> - <a-form-model-item ref="provinceRange" prop="provinceRange"> - <a-range-picker v-model="formData.provinceRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="provinceDateChange" :placeholder="['开始时间', '结束时间']" /> - </a-form-model-item> - </a-col> - </a-row> --> <a-row> <a-col :span="6" class="bg-gray"> <div class="required">专家审核时间</div> @@ -107,6 +87,7 @@ export default { id: null, year: moment().format('YYYY'), batch: '1', + timeType: 1, reportStart: '', reportEnd: '', auditStart: '', @@ -115,9 +96,7 @@ export default { expertEnd: '', remark: '', reportRange: [], - unitRange: [], - prefectureRange: [], - provinceRange: [], + auditRange: [], expertRange: [], projType: getType() }, @@ -126,7 +105,7 @@ export default { year: { required: true, message: '请输入申报年度' }, batch: { required: true, message: '请输入申报批次' }, reportRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], - // unitRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], + auditRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], // prefectureRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], // provinceRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], expertRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], @@ -156,6 +135,7 @@ export default { if (data) { this.formData.id = data.id this.formData.year = data.year + '' + this.formData.timeType = data.timeType this.formData.projType = data.projType this.formData.reportStart = data.reportStart this.formData.reportEnd = data.reportEnd @@ -165,9 +145,7 @@ export default { this.formData.expertEnd = data.expertEnd this.formData.remark = data.remark this.formData.reportRange = [data.reportStart, data.reportEnd] - // this.formData.unitRange = [data.unitStart, data.unitEnd] - // this.formData.prefectureRange = [data.prefectureStart, data.prefectureEnd] - // this.formData.provinceRange = [data.provinceStart, data.provinceEnd] + this.formData.auditRange = [data.auditStart, data.auditEnd] this.formData.expertRange = [data.expertStart, data.expertEnd] } this.loading = false @@ -203,24 +181,12 @@ export default { this.formData.reportEnd = dateStrings[1] } }, - unitDateChange (dates, dateStrings) { + auditDateChange (dates, dateStrings) { if (dateStrings[0] != '' && dateStrings[1] != '') { this.formData.unitStart = dateStrings[0] this.formData.unitEnd = dateStrings[1] } }, - prefectureDateChange (dates, dateStrings) { - if (dateStrings[0] != '' && dateStrings[1] != '') { - this.formData.prefectureStart = dateStrings[0] - this.formData.prefectureEnd = dateStrings[1] - } - }, - provinceDateChange (dates, dateStrings) { - if (dateStrings[0] != '' && dateStrings[1] != '') { - this.formData.provinceStart = dateStrings[0] - this.formData.provinceEnd = dateStrings[1] - } - }, expertDateChange (dates, dateStrings) { if (dateStrings[0] != '' && dateStrings[1] != '') { this.formData.expertStart = dateStrings[0] diff --git a/src/views/timeSet/checkTimeSet/Index.vue b/src/views/timeSet/checkTimeSet/Index.vue deleted file mode 100644 index 4a0af4fa0b14d861a02751748acbcf26b0bd1241..0000000000000000000000000000000000000000 --- a/src/views/timeSet/checkTimeSet/Index.vue +++ /dev/null @@ -1,231 +0,0 @@ -<template> - <div> - <a-form layout="inline" class="search_form"> - <a-button type="primary" class="search_input" style="margin-right: 10px;" v-if="isButten" @click="createYear">添加</a-button> - <span :style="{color:'#DC143C'}">{{description}}</span> - </a-form> - <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> - <template slot="option" slot-scope="record"> - <a-button type="primary" size="small" @click="editYear(record)">修改</a-button> - <a-button type="danger" size="small" @click="deleteYear(record)">删除</a-button> - </template> - </a-table> - <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal :visible="visibleEdit" :title="'添加/修改'" @cancel="close" @ok="submit" :maskClosable="false" :width="800" destroyOnClose> - <a-form-model ref="formRef" :model="formData" :rules="formRules" :label-col="{span: 6}" :wrapper-col="{span: 17}"> - <a-form-model-item label="申报年度" prop="reportYear"> - <a-input v-model="formData.reportYear" placeholder="申报年度" :disabled="disabled" style="width: 120px"></a-input> - </a-form-model-item> - <a-form-model-item label="申报时间" prop="startTime"> - <a-form-model-item prop="startTime" style="flex-basis:30%;"> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startTime" style="width: 180px" @change="dateChange" /> - <span>~</span> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endTime" style="width: 180px" @change="dateChange" /> - </a-form-model-item> - </a-form-model-item> - <a-form-model-item label="中期考核年度" prop="checkYear" v-if="display"> - <a-input v-model="formData.checkYear" placeholder="中期考核年度"></a-input> - </a-form-model-item> - <a-form-model-item label="备注" prop="remark"> - <a-textarea placeholder="" v-model="formData.remark" :rows="3" /> - </a-form-model-item> - </a-form-model> - </a-modal> - </div> -</template> - -<script> -import { isEmptyParams } from "@/views/utils/common"; -import moment from 'moment'; - -export default { - name: 'projectTimeSet', - data () { - return { - formData: { - id: undefined, - reportYear: moment().format('YYYY'), - unitCode: '', - yearType: 1, //1项目 2任务书 3中期考核 - startTime: '', - endTime: '', - remark: '', - checkYear: '', - created: '', - updated: '' - }, - tableData: [], - columns: [], - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, - // 弹窗标志 - visibleEdit: false, - loading: false, - isButten: false, - disabled: true, - display: false, - description: '', - formRules: { - id: [{ required: false }], - reportYear: [{ required: true, message: '请输入申报年度' }], - unitCode: [{ required: true, message: '请输入单位编码' }], - yearType: [{ required: true, message: '请选择年度类型' }], - startTime: { required: true, message: '请选择开始时间' }, - endTime: { required: true, message: '请选择结束时间' }, - remark: [{ required: false }], - checkYear: [{ required: true, message: '请填写中期审核年度' }], - created: [{ required: false }], - updated: [{ required: false }] - } - } - }, - created () { - this.InitApplyData() - }, - computed: { - - }, - methods: { - moment, - InitApplyData () { - this.columns = [ - { title: '年度', dataIndex: 'reportYear' }, - { title: '开始时间', dataIndex: 'startTime' }, - { title: '结束时间', dataIndex: 'endTime' }, - { title: '备注', dataIndex: 'remark' }, - ] - this.getYearInfo() - }, - getYearInfo () { - let len = this.$defaultLength - let pars = { type: 3 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.getListByPage() - this.isButten = data.disabled - this.description = data.description - } - }).catch(() => { - }) - }, - getListByPage () { - this.loading = true - let pars = { yearType: 3 } - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } - this.$api.batch.getListByPage(par).then(({ data = {} }) => { - if (data) { - const { dataList = [], total = 0 } = data - this.tableData = dataList - this.pagination.total = total - this.loading = false - } - }).catch(() => { - this.loading = false - }) - }, - searchList () { - this.pagination.pageIndex = 1 - this.getListByPage() - }, - change () { - this.getListByPage() - }, - showSizeChange (current, pageSize) { - this.pagination.pageIndex = current - this.pagination.pageSize = pageSize - this.getListByPage() - }, - // 起止日期选择处理 - dateChange (value) { - let statr = this.formData.startTime - let end = this.formData.endTime - if (!statr || !end) { - return - } - if (statr > end) { - this.formData.startTime = end - this.formData.endTime = statr - } - }, - createYear () { - let pars = { type: 3 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.formData.reportYear = data.reportYear - this.formData.unitCode = data.unitCode - this.formData.yearType = data.yearType - this.formData.startTime = data.startTime - this.formData.endTime = data.endTime - this.formData.checkYear = '' - this.formData.remark = '' - } - }).catch(() => { - }) - this.visibleEdit = true - }, - editYear (record) { - Object.assign(this.formData, record); - this.visibleEdit = true - }, - close () { - this.visibleEdit = false - }, - submit () { - this.$refs.formRef.validate(valid => { - if (valid) { - let pars = isEmptyParams(this.formData) - let par = { - ...pars - } - this.$api.batch.addOrUpdateYearInfo(par).then(({ data = {} }) => { - if (data) { - this.$message.success('成功!') - this.visibleEdit = false - this.getYearInfo() - this.getListByPage() - } - }) - } - }) - }, - deleteYear (record) { - this.$confirm({ - title: '删除', - content: '确定要删除该申报年度?', - okText: '确定', - okType: 'danger', - cancelText: '取消', - onOk () { - let pars = isEmptyParams(record) - let par = { - ...pars - } - this.$api.batch.deleteApplyYearInfo(par).then(({ data = {} }) => { - if (data) { - this.getYearInfo() - this.getListByPage() - this.$message.success('删除成功!') - } - }) - }, - onCancel () { - - }, - }) - } - }, - watch: { - $route () { - this.InitApplyData() - } - } -} -</script> \ No newline at end of file diff --git a/src/views/timeSet/projectTimeSet/Index.vue b/src/views/timeSet/projectTimeSet/Index.vue deleted file mode 100644 index 75863119e2b71f38dd42456d774355536e6b05e2..0000000000000000000000000000000000000000 --- a/src/views/timeSet/projectTimeSet/Index.vue +++ /dev/null @@ -1,235 +0,0 @@ -<template> - <div> - <a-form layout="inline" class="search_form"> - <a-button type="primary" class="search_input" style="margin-right: 10px;" v-if="isButten" @click="createYear">添加</a-button> - <span :style="{color:'#DC143C'}">{{description}}</span> - </a-form> - <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> - <template slot="option" slot-scope="record"> - <a-button type="primary" size="small" @click="editYear(record)">修改</a-button> - <a-button type="danger" size="small" @click="deleteYear(record)">删除</a-button> - </template> - </a-table> - <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal :visible="visibleEdit" :title="'添加/修改'" @cancel="close" @ok="submit" :maskClosable="false" :width="800" destroyOnClose> - <a-form-model ref="formRef" :model="formData" :rules="formRules" :label-col="{span: 6}" :wrapper-col="{span: 17}"> - <a-form-model-item label="申报年度" prop="reportYear"> - <a-input v-model="formData.reportYear" placeholder="申报年度" :disabled="disabled" style="width: 120px"></a-input> - </a-form-model-item> - <a-form-model-item label="申报时间" prop="startTime"> - <a-form-model-item prop="startTime" style="flex-basis:30%;"> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startTime" style="width: 180px" @change="dateChange" /> - <span>~</span> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endTime" style="width: 180px" @change="dateChange" /> - </a-form-model-item> - </a-form-model-item> - <a-form-model-item label="中期考核年度" prop="checkYear" v-if="display"> - <a-input v-model="formData.checkYear" placeholder="中期考核年度"></a-input> - </a-form-model-item> - <a-form-model-item label="备注" prop="remark"> - <a-textarea placeholder="" v-model="formData.remark" :rows="3" /> - </a-form-model-item> - </a-form-model> - </a-modal> - </div> -</template> - -<script> -import { isEmptyParams } from "@/views/utils/common"; -import moment from 'moment'; - -export default { - name: 'projectTimeSet', - data () { - return { - formData: { - id: undefined, - reportYear: moment().format('YYYY'), - unitCode: '', - yearType: 1, //1项目 2任务书 3中期考核 - startTime: '', - endTime: '', - remark: '', - checkYear: '', - created: '', - updated: '' - }, - tableData: [], - columns: [], - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, - // 弹窗标志 - visibleEdit: false, - loading: false, - isButten: false, - disabled: true, - display: false, - description: '', - formRules: { - id: [{ required: false }], - reportYear: [{ required: true, message: '请输入申报年度' }], - unitCode: [{ required: true, message: '请输入单位编码' }], - yearType: [{ required: true, message: '请选择年度类型' }], - startTime: { required: true, message: '请选择开始时间' }, - endTime: { required: true, message: '请选择结束时间' }, - remark: [{ required: false }], - checkYear: [{ required: true, message: '请填写中期审核年度' }], - created: [{ required: false }], - updated: [{ required: false }] - } - } - }, - created () { - this.InitApplyData() - }, - computed: { - - }, - methods: { - moment, - InitApplyData () { - this.columns = [ - { title: '年度', dataIndex: 'reportYear' }, - { title: '开始时间', dataIndex: 'startTime' }, - { title: '结束时间', dataIndex: 'endTime' }, - { title: '中期考核年度', dataIndex: 'checkYear' }, - { title: '备注', dataIndex: 'remark' }, - ] - this.getYearInfo() - }, - getYearInfo () { - let len = this.$defaultLength - let pars = { type: 1 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.getListByPage() - this.isButten = data.disabled - this.description = data.description - if ((data.unitCode + "").length == len) { - this.display = true - } - } - }).catch(() => { - }) - }, - getListByPage () { - this.loading = true - let pars = { yearType: 1 } - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } - this.$api.batch.getListByPage(par).then(({ data = {} }) => { - if (data) { - const { dataList = [], total = 0 } = data - this.tableData = dataList - this.pagination.total = total - this.loading = false - } - }).catch(() => { - this.loading = false - }) - }, - searchList () { - this.pagination.pageIndex = 1 - this.getListByPage() - }, - change () { - this.getListByPage() - }, - showSizeChange (current, pageSize) { - this.pagination.pageIndex = current - this.pagination.pageSize = pageSize - this.getListByPage() - }, - // 起止日期选择处理 - dateChange (value) { - let statr = this.formData.startTime - let end = this.formData.endTime - if (!statr || !end) { - return - } - if (statr > end) { - this.formData.startTime = end - this.formData.endTime = statr - } - }, - createYear () { - let pars = { type: 1 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.formData.reportYear = data.reportYear - this.formData.unitCode = data.unitCode - this.formData.yearType = data.yearType - this.formData.startTime = data.startTime - this.formData.endTime = data.endTime - this.formData.checkYear = '' - this.formData.remark = '' - } - }).catch(() => { - }) - this.visibleEdit = true - }, - editYear (record) { - Object.assign(this.formData, record); - this.visibleEdit = true - }, - close () { - this.visibleEdit = false - }, - submit () { - this.$refs.formRef.validate(valid => { - if (valid) { - let pars = isEmptyParams(this.formData) - let par = { - ...pars - } - this.$api.batch.addOrUpdateYearInfo(par).then(({ data = {} }) => { - if (data) { - this.$message.success('成功!') - this.visibleEdit = false - this.getYearInfo() - this.getListByPage() - } - }) - } - }) - }, - deleteYear (record) { - this.$confirm({ - title: '删除', - content: '确定要删除该申报年度?', - okText: '确定', - okType: 'danger', - cancelText: '取消', - onOk () { - let pars = isEmptyParams(record) - let par = { - ...pars - } - this.$api.batch.deleteApplyYearInfo(par).then(({ data = {} }) => { - if (data) { - this.getYearInfo() - this.getListByPage() - this.$message.success('删除成功!') - } - }) - }, - onCancel () { - - }, - }) - } - }, - watch: { - $route () { - this.InitApplyData() - } - } -} -</script> \ No newline at end of file diff --git a/src/views/timeSet/taskTimeSet/Index.vue b/src/views/timeSet/taskTimeSet/Index.vue index d5920022fdd47093bc3a0b3c916f920683b7aae3..f92d15c9ea9905850edb246ceb242225ad954e60 100644 --- a/src/views/timeSet/taskTimeSet/Index.vue +++ b/src/views/timeSet/taskTimeSet/Index.vue @@ -1,122 +1,66 @@ <template> - <div> - <a-form layout="inline" class="search_form"> - <a-button type="primary" class="search_input" style="margin-right: 10px;" v-if="isButten" @click="createYear">添加</a-button> - <span :style="{color:'#DC143C'}">{{description}}</span> + <div class="app-content"> + <a-form :form="form" :model="searchForm" layout="inline" class="search_form"> + <a-form-item> + <a-button type="primary" class="search_input" style="margin-right: 10px;" @click="createBatch">添加</a-button> + <a-button type="primary" @click="search">刷新</a-button> + </a-form-item> </a-form> - <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> + <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading" bordered> <template slot="option" slot-scope="record"> - <a-button type="primary" size="small" @click="editYear(record)">修改</a-button> - <a-button type="danger" size="small" @click="deleteYear(record)">删除</a-button> + <a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button> + <a-button type="link" size="small" @click="recordClick(record,'delete')">删除</a-button> </template> </a-table> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> - <a-modal :visible="visibleEdit" :title="'添加/修改'" @cancel="close" @ok="submit" :maskClosable="false" :width="800" destroyOnClose> - <a-form-model ref="formRef" :model="formData" :rules="formRules" :label-col="{span: 6}" :wrapper-col="{span: 17}"> - <a-form-model-item label="申报年度" prop="reportYear"> - <a-input v-model="formData.reportYear" placeholder="申报年度" :disabled="disabled" style="width: 120px"></a-input> - </a-form-model-item> - <a-form-model-item label="申报时间" prop="startTime"> - <a-form-model-item prop="startTime" style="flex-basis:30%;"> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startTime" style="width: 180px" @change="dateChange" /> - <span>~</span> - <a-date-picker format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endTime" style="width: 180px" @change="dateChange" /> - </a-form-model-item> - </a-form-model-item> - <a-form-model-item label="备注" prop="remark"> - <a-textarea placeholder="" v-model="formData.remark" :rows="3" /> - </a-form-model-item> - </a-form-model> + <a-modal :visible="visibleEdit" v-model="visibleEdit" :title="'添加/修改'" :footer="null" :maskClosable="false" :dialog-style="{ top: '15%' }" :width="800" destroyOnClose> + <time-edit v-model="id" @close="closeWindow" ref="childEdit" /> </a-modal> </div> </template> <script> -import { isEmptyParams } from "@/views/utils/common"; -import moment from 'moment'; - +import { getType } from '@/views/utils/auth' +import timeEdit from '@/views/timeSet/taskTimeSet/components/timeEdit' +import moment from 'moment' +import { isEmptyParams } from "@/views/utils/common" export default { - name: 'projectTimeSet', + name: 'taskTimeSet', + components: { timeEdit }, data () { return { - formData: { - id: undefined, - reportYear: moment().format('YYYY'), - unitCode: '', - yearType: 1, //1项目 2任务书 3中期考核 - startTime: '', - endTime: '', - remark: '', - checkYear: '', - created: '', - updated: '' - }, + searchForm: { projType: getType(), timeType: 2, }, + form: this.$form.createForm(this, { name: 'advanced_search' }), tableData: [], - columns: [], - pagination: { - pageIndex: 1, - pageSize: this.$defaultPageSize, - total: 0, - pageSizeOptions: this.$defaultPageSizeOptions, - }, + columns: [ + { key: '1', title: '申报年度', dataIndex: 'year', align: 'center' }, + { key: '2', title: '批次', dataIndex: 'batch', align: 'center' }, + { key: '3', title: '项目申报时间', dataIndex: 'reportStart', colSpan: 2, ellipsis: true }, + { key: '4', title: '项目申报时间', dataIndex: 'reportEnd', colSpan: 0, ellipsis: true }, + { key: '5', title: '审核时间', dataIndex: 'auditStart', colSpan: 2, ellipsis: true }, + { key: '6', title: '审核时间', dataIndex: 'auditEnd', colSpan: 0, ellipsis: true }, + { key: '13', title: '备注', dataIndex: 'remark', align: 'center', ellipsis: true }, + { key: '14', title: '操作', scopedSlots: { customRender: 'option' }, align: 'center', fixed: 'right', width: 120, }, + ], + pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, }, // 弹窗标志 visibleEdit: false, + id: null, loading: false, - isButten: false, - disabled: true, - display: false, - description: '', - formRules: { - id: [{ required: false }], - reportYear: [{ required: true, message: '请输入申报年度' }], - unitCode: [{ required: true, message: '请输入单位编码' }], - yearType: [{ required: true, message: '请选择年度类型' }], - startTime: { required: true, message: '请选择开始时间' }, - endTime: { required: true, message: '请选择结束时间' }, - remark: [{ required: false }], - checkYear: [{ required: true, message: '请填写中期审核年度' }], - created: [{ required: false }], - updated: [{ required: false }] - } } }, created () { - this.InitApplyData() + this.getListByPage() }, computed: { }, methods: { moment, - InitApplyData () { - this.columns = [ - { title: '年度', dataIndex: 'reportYear' }, - { title: '开始时间', dataIndex: 'startTime' }, - { title: '结束时间', dataIndex: 'endTime' }, - { title: '备注', dataIndex: 'remark' }, - ] - this.getYearInfo() - }, - getYearInfo () { - let len = this.$defaultLength - let pars = { type: 2 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.getListByPage() - this.isButten = data.disabled - this.description = data.description - } - }).catch(() => { - }) - }, getListByPage () { this.loading = true - let pars = { yearType: 2 } - let par = { - ...pars, - pageIndex: this.pagination.pageIndex, - pageSize: this.pagination.pageSize - } + let pars = isEmptyParams(this.searchForm) + let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } this.$api.batch.getListByPage(par).then(({ data = {} }) => { if (data) { const { dataList = [], total = 0 } = data @@ -124,11 +68,13 @@ export default { this.pagination.total = total this.loading = false } - }).catch(() => { - this.loading = false - }) + }).catch(() => { this.loading = false }) + }, + search () { + this.pagination.pageIndex = 1 + this.getListByPage() }, - searchList () { + reset () { this.pagination.pageIndex = 1 this.getListByPage() }, @@ -140,88 +86,43 @@ export default { this.pagination.pageSize = pageSize this.getListByPage() }, - // 起止日期选择处理 - dateChange (value) { - let statr = this.formData.startTime - let end = this.formData.endTime - if (!statr || !end) { - return - } - if (statr > end) { - this.formData.startTime = end - this.formData.endTime = statr - } - }, - createYear () { - let pars = { type: 2 } - this.$api.year.getYearInfo(pars).then(({ data = {} }) => { - if (data) { - this.formData.reportYear = data.reportYear - this.formData.unitCode = data.unitCode - this.formData.yearType = data.yearType - this.formData.startTime = data.startTime - this.formData.endTime = data.endTime - this.formData.checkYear = '' - this.formData.remark = '' - } - }).catch(() => { - }) + createBatch () { + this.id = null this.visibleEdit = true }, - editYear (record) { - Object.assign(this.formData, record); - this.visibleEdit = true + recordClick (record, type) { + if (type === 'edit') { + this.id = record.id + this.visibleEdit = true + } else if (type === 'delete') { + let self = this + this.$confirm({ + title: '', + content: '确定要删除该批次?', + okText: '确定', + okType: 'danger', + cancelText: '取消', + onOk () { + let pars = { id: record.id } + self.$api.batch.deleteBatch(pars).then(({ data = {} }) => { + if (data) { + self.getListByPage() + } + }) + }, + onCancel () { + }, + }) + } }, - close () { + closeWindow () { this.visibleEdit = false - }, - submit () { - this.$refs.formRef.validate(valid => { - if (valid) { - let pars = isEmptyParams(this.formData) - let par = { - ...pars - } - this.$api.batch.addOrUpdateYearInfo(par).then(({ data = {} }) => { - if (data) { - this.$message.success('成功!') - this.visibleEdit = false - this.getYearInfo() - this.getListByPage() - } - }) - } - }) - }, - deleteYear (record) { - this.$confirm({ - title: '删除', - content: '确定要删除该申报年度?', - okText: '确定', - okType: 'danger', - cancelText: '取消', - onOk () { - let pars = isEmptyParams(record) - let par = { - ...pars - } - this.$api.batch.deleteApplyYearInfo(par).then(({ data = {} }) => { - if (data) { - this.getYearInfo() - this.getListByPage() - this.$message.success('删除成功!') - } - }) - }, - onCancel () { - - }, - }) + this.getListByPage() } }, watch: { $route () { - this.InitApplyData() + } } } diff --git a/src/views/timeSet/taskTimeSet/components/timeEdit.vue b/src/views/timeSet/taskTimeSet/components/timeEdit.vue new file mode 100644 index 0000000000000000000000000000000000000000..62e2abcc6d600cb7c41d99ebf09b2de832b7bcde --- /dev/null +++ b/src/views/timeSet/taskTimeSet/components/timeEdit.vue @@ -0,0 +1,177 @@ +<template> + <div class="app-content" style="height:330px;overflow:auto;"> + <a-spin :spinning="loading" style="width: 100%;height: 100%;"> + <a-form-model ref="formRef" :model="formData" :rules="formRules" class="from-table"> + <a-row> + <a-col :span="6" class="bg-gray"> + <div class="required">填报年度</div> + </a-col> + <a-col :span="6"> + <a-form-model-item ref="year" prop="year"> + <base-select v-model="formData.year" :type="8" :width="160" /> + </a-form-model-item> + </a-col> + <a-col :span="4" class="bg-gray"> + <div class="required">填报批次</div> + </a-col> + <a-col :span="8"> + <a-form-model-item ref="batch" prop="batch"> + <base-select v-model="formData.batch" :type="10" :width="160" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6" class="bg-gray"> + <div class="required">填报时间</div> + </a-col> + <a-col :span="18"> + <a-form-model-item ref="reportRange" prop="reportRange"> + <a-range-picker v-model="formData.reportRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="reportDateChange" :placeholder="['开始时间', '结束时间']" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6" class="bg-gray"> + <div class="required">审核时间</div> + </a-col> + <a-col :span="18"> + <a-form-model-item ref="unitRange" prop="unitRange"> + <a-range-picker v-model="formData.auditRange" show-time format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" @change="auditDateChange" :placeholder="['开始时间', '结束时间']" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6" class="bg-gray"> + <div>备注</div> + </a-col> + <a-col :span="18"> + <a-form-model-item ref="remark" prop="remark"> + <a-input v-model="formData.remark" style="width:450px" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col style="text-align: center;width:100%;"> + <a-button type="primary" style="width:68px;" @click="submit">提交</a-button> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </div> +</template> + +<script> +import { getType } from '@/views/utils/auth' +import { isEmptyParams, checkDateRange } from '@/views/utils/common' +import moment from 'moment' +import baseSelect from '@/views/components/common/baseSelect' + +export default { + name: "batchEdit", + components: { + baseSelect + }, + data () { + return { + formData: { + id: null, + year: moment().format('YYYY'), + batch: '1', + timeType: 2, + reportStart: '', + reportEnd: '', + auditStart: '', + auditEnd: '', + expertStart: '', + expertEnd: '', + remark: '', + reportRange: [], + auditRange: [], + projType: getType() + }, + formRules: { + id: [{ required: false }], + year: { required: true, message: '请输入申报年度' }, + batch: { required: true, message: '请输入申报批次' }, + reportRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], + auditRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }], + remark: [{ required: false }] + }, + loading: false, + } + }, + props: { + value: { + type: String, + default: () => { + return null + } + }, + }, + created () { + if (this.value) { + this.loading = true + this.getBatchById() + } + }, + methods: { + moment, + getBatchById () { + this.$api.batch.getBatchById({ id: this.value }).then(({ data = {} }) => { + if (data) { + this.formData.id = data.id + this.formData.year = data.year + '' + this.formData.timeType = data.timeType + this.formData.projType = data.projType + this.formData.reportStart = data.reportStart + this.formData.reportEnd = data.reportEnd + this.formData.auditStart = data.auditStart + this.formData.auditEnd = data.auditEnd + this.formData.expertStart = data.expertStart + this.formData.expertEnd = data.expertEnd + this.formData.remark = data.remark + this.formData.reportRange = [data.reportStart, data.reportEnd] + this.formData.auditRange = [data.auditStart, data.auditEnd] + } + this.loading = false + }).catch(() => { this.loading = false }) + }, + submit () { + this.$refs.formRef.validate(valid => { + if (valid) { + this.loading = true + let pars = isEmptyParams(this.formData) + if (this.value) { + this.$api.batch.updateBatch({ ...pars }).then(({ data }) => { + if (data) { + this.$message.success('修改成功!') + this.$emit('close', 'edit') + } + }).catch(() => { this.loading = false }) + } else { + this.$api.batch.addBatch({ ...pars }).then(({ data }) => { + if (data) { + this.$message.success('添加成功!') + this.$emit('close', 'edit') + } + }).catch(() => { this.loading = false }) + } + } + }) + }, + //起止日期选择处理 + reportDateChange (dates, dateStrings) { + if (dateStrings[0] != '' && dateStrings[1] != '') { + this.formData.reportStart = dateStrings[0] + this.formData.reportEnd = dateStrings[1] + } + }, + auditDateChange (dates, dateStrings) { + if (dateStrings[0] != '' && dateStrings[1] != '') { + this.formData.auditStart = dateStrings[0] + this.formData.auditEnd = dateStrings[1] + } + }, + } +} +</script> \ No newline at end of file diff --git a/src/views/unit/components/unitCount.vue b/src/views/unit/components/unitCount.vue deleted file mode 100644 index 8c9424d41b7f92312672923cd8f2b5677201dcb9..0000000000000000000000000000000000000000 --- a/src/views/unit/components/unitCount.vue +++ /dev/null @@ -1,45 +0,0 @@ -<template> - <!-- <a-form-model-item :label="uname" :span="6"> - <a-input-number v-model="value" :min="0" :max="99" /> - </a-form-model-item> --> - <div> - <a-col :span="colSpan" class="bg-light_blue" style="text-align: right;"> - {{Unit.unitName}}: - </a-col> - <a-col :span="colSpan"> - <a-input-number v-model="Unit.projLimit" :min="0" :max="1000" @change="onChange" /> - </a-col> - </div> - -</template> - -<script> - -export default { - name: "UnitCount", - data() { - return { - } - }, - props: { - Unit: { - type: Object, - require: true - }, - colCount: { - type: Number, - require: true - } - }, - computed: { - colSpan() { - return this.colCount / 2 - } - }, - methods: { - onChange() { - this.$emit('valueChange', this.Unit) - } - } -}; -</script>