|
|
@@ -8,6 +8,7 @@
|
|
|
</template>
|
|
|
<template #default>
|
|
|
<top
|
|
|
+ ref="top"
|
|
|
:project-id="projectId"
|
|
|
@change="changeStage"
|
|
|
@filter="filterStage"
|
|
|
@@ -29,7 +30,11 @@
|
|
|
:industry="industry"
|
|
|
/>
|
|
|
<!-- 相关合同-->
|
|
|
- <info3 :project-id="projectId" :stage-id="stageId" />
|
|
|
+ <info3
|
|
|
+ :project-id="projectId"
|
|
|
+ :can-edit="detail.can_update"
|
|
|
+ :stage-id="stageId"
|
|
|
+ />
|
|
|
<!-- 投资基本情况-->
|
|
|
<info4 v-if="[4].includes(currentStage)" :project-id="projectId" />
|
|
|
<!-- 建成投产后效益测算-->
|
|
|
@@ -47,17 +52,29 @@
|
|
|
<el-button type="primary" plain @click="projectCancel">退 库</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- v-if="detail.is_report === 0"
|
|
|
+ v-if="[0, 1, 4].includes(detail.report_type)"
|
|
|
@click="projectReport"
|
|
|
plain
|
|
|
>上报审核</el-button
|
|
|
>
|
|
|
- <el-button type="primary" plain v-if="detail.report_type === 3"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ v-if="detail.report_type === 2"
|
|
|
+ @click="$refs.approval.show()"
|
|
|
+ >审 核</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ v-if="detail.report_type === 3"
|
|
|
+ @click="projectReportFormal"
|
|
|
>上报到固定资产</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="nextStage">下一阶段</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <approval ref="approval" :project-id="projectId" @success="getInfo" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -82,6 +99,7 @@ import Info6 from '@/views/project/componens/info6.vue'
|
|
|
import Info7 from '@/views/project/componens/info7.vue'
|
|
|
import Info8 from '@/views/project/componens/info8.vue'
|
|
|
import { useStore } from '@/store/user.js'
|
|
|
+import approval from '@/views/project/componens/approval.vue'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -94,7 +112,8 @@ export default {
|
|
|
tipsCustom,
|
|
|
top,
|
|
|
info3,
|
|
|
- Info8
|
|
|
+ Info8,
|
|
|
+ approval
|
|
|
},
|
|
|
setup() {
|
|
|
const user = useStore()
|
|
|
@@ -106,7 +125,8 @@ export default {
|
|
|
stageId: '',
|
|
|
currentStage: 1,
|
|
|
industry: null,
|
|
|
- detail: {}
|
|
|
+ detail: {},
|
|
|
+ stageFilter: false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -120,7 +140,9 @@ export default {
|
|
|
this.detail = res.data
|
|
|
delete this.detail._id
|
|
|
this.stageId = res.data.stageId
|
|
|
- this.currentStage = res.data.current_stage
|
|
|
+ if (this.stageFilter === false) {
|
|
|
+ this.currentStage = res.data.current_stage
|
|
|
+ }
|
|
|
this.detail.tagsName =
|
|
|
this.detail.tags === 1 ? '政府投资项目' : '企业投资项目'
|
|
|
const status = confing.reportTypes.find(
|
|
|
@@ -140,7 +162,9 @@ export default {
|
|
|
this.industry = industry
|
|
|
},
|
|
|
filterStage(res) {
|
|
|
+ this.stageFilter = true
|
|
|
this.currentStage = res
|
|
|
+ this.getInfo()
|
|
|
},
|
|
|
nextStage() {
|
|
|
this.$confirm(
|
|
|
@@ -162,11 +186,21 @@ export default {
|
|
|
this.$api.project.proUpdate(this.detail).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
+ this.updateCurrentStage(this.detail.current_stage)
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ updateCurrentStage(sort) {
|
|
|
+ this.$api.project
|
|
|
+ .updateCurrentStage({ projectId: this.projectId, sort })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$refs.top.getStage()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 股室上报项目到管理员
|
|
|
*/
|
|
|
@@ -176,6 +210,7 @@ export default {
|
|
|
this.$api.project.upReportType({ id: this.projectId }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
+ this.getInfo()
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
@@ -194,6 +229,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
+ this.getInfo()
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
@@ -205,7 +241,6 @@ export default {
|
|
|
* 项目退库
|
|
|
*/
|
|
|
projectCancel() {
|
|
|
- console.log('rrrr')
|
|
|
this.$prompt('请输入退库原因', '提示', {}).then(({ value }) => {
|
|
|
if (value === null || value.length === 0) {
|
|
|
this.$message.error('请输入退库原因')
|
|
|
@@ -216,7 +251,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
- this.refreshChange()
|
|
|
+ this.getInfo()
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|