|
|
@@ -7,26 +7,55 @@
|
|
|
<el-tag class="ml-10">{{ detail.report_type_name }}</el-tag>
|
|
|
</template>
|
|
|
<template #default>
|
|
|
- <top :project-id="projectId" @change="changeStage" />
|
|
|
+ <top
|
|
|
+ :project-id="projectId"
|
|
|
+ @change="changeStage"
|
|
|
+ @filter="filterStage"
|
|
|
+ />
|
|
|
</template>
|
|
|
</tips-custom>
|
|
|
<!-- content-->
|
|
|
+ {{ currentStage }}
|
|
|
<div style="margin-bottom: 65px">
|
|
|
- <info1 :info="detail" @industry="changeIndustry" />
|
|
|
- <info2 :project-id="projectId" :stage-id="stageId" :industry="industry" />
|
|
|
+ <div v-if="[1, 2].includes(currentStage)">
|
|
|
+ <!-- 基础信息-->
|
|
|
+ <info1 :info="detail" @industry="changeIndustry" />
|
|
|
+ </div>
|
|
|
+ <!-- 前期要件-->
|
|
|
+ <info2
|
|
|
+ v-if="[2, 3].includes(currentStage)"
|
|
|
+ :project-id="projectId"
|
|
|
+ :stage-id="stageId"
|
|
|
+ :industry="industry"
|
|
|
+ />
|
|
|
+ <!-- 相关合同-->
|
|
|
<info3 :project-id="projectId" :stage-id="stageId" />
|
|
|
- <info4 :project-id="projectId" />
|
|
|
- <info5 :info="detail" />
|
|
|
- <info6 :project-id="projectId" />
|
|
|
- <info7 :info="detail" />
|
|
|
+ <!-- 投资基本情况-->
|
|
|
+ <info4 v-if="[4].includes(currentStage)" :project-id="projectId" />
|
|
|
+ <!-- 建成投产后效益测算-->
|
|
|
+ <info5 v-if="currentStage === 2" :info="detail" />
|
|
|
+ <!-- 年度投资情况-->
|
|
|
+ <info6 v-if="currentStage === 4" :project-id="projectId" />
|
|
|
+ <!-- 其他信息-->
|
|
|
+ <info7 v-if="[2, 4, 5].includes(currentStage)" :info="detail" />
|
|
|
+ <!-- 任务列表-->
|
|
|
<info8 v-if="user.info.type === 4" :project-id="projectId" />
|
|
|
</div>
|
|
|
<!-- buttom-->
|
|
|
<div class="bottom flex flex-center flex-justify-end">
|
|
|
<div class="padding">
|
|
|
- <el-button type="primary" plain>退 库</el-button>
|
|
|
- <el-button type="primary" plain>上报审核</el-button>
|
|
|
- <el-button type="primary">上报到固定资产</el-button>
|
|
|
+ <el-button type="primary" plain @click="projectCancel">退 库</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="detail.is_report === 0"
|
|
|
+ @click="projectReport"
|
|
|
+ plain
|
|
|
+ >上报审核</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" plain v-if="detail.report_type === 3"
|
|
|
+ >上报到固定资产</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="nextStage">下一阶段</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -75,6 +104,7 @@ export default {
|
|
|
return {
|
|
|
projectId: '',
|
|
|
stageId: '',
|
|
|
+ currentStage: 1,
|
|
|
industry: null,
|
|
|
detail: {}
|
|
|
}
|
|
|
@@ -90,6 +120,7 @@ export default {
|
|
|
this.detail = res.data
|
|
|
delete this.detail._id
|
|
|
this.stageId = res.data.stageId
|
|
|
+ this.currentStage = res.data.current_stage
|
|
|
this.detail.tagsName =
|
|
|
this.detail.tags === 1 ? '政府投资项目' : '企业投资项目'
|
|
|
const status = confing.reportTypes.find(
|
|
|
@@ -107,6 +138,90 @@ export default {
|
|
|
},
|
|
|
changeIndustry(industry) {
|
|
|
this.industry = industry
|
|
|
+ },
|
|
|
+ filterStage(res) {
|
|
|
+ this.currentStage = res
|
|
|
+ },
|
|
|
+ nextStage() {
|
|
|
+ this.$confirm(
|
|
|
+ '请检查当前阶段信息是否完善,点击确定后项目将进行下一个阶段',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ this.currentStage = this.currentStage + 1
|
|
|
+ this.detail.current_stage = this.currentStage
|
|
|
+ this.update()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ update() {
|
|
|
+ this.$api.project.proUpdate(this.detail).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 股室上报项目到管理员
|
|
|
+ */
|
|
|
+ projectReport() {
|
|
|
+ this.$confirm('确认上报至管理员进行审核?').then(ele => {
|
|
|
+ if (ele === 'confirm') {
|
|
|
+ this.$api.project.upReportType({ id: this.projectId }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 管理员已经审核通过的项目,上报到固定资产
|
|
|
+ */
|
|
|
+ projectReportFormal() {
|
|
|
+ this.$confirm('确定上报到固定资产?').then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ this.$api.project
|
|
|
+ .reportToAssets({ ids: this.projectId })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 项目退库
|
|
|
+ */
|
|
|
+ projectCancel() {
|
|
|
+ console.log('rrrr')
|
|
|
+ this.$prompt('请输入退库原因', '提示', {}).then(({ value }) => {
|
|
|
+ if (value === null || value.length === 0) {
|
|
|
+ this.$message.error('请输入退库原因')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$api.project
|
|
|
+ .projectCancel({ id: this.projectId, exitMsg: value })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.refreshChange()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|