|
|
@@ -99,8 +99,8 @@
|
|
|
type="primary"
|
|
|
icon="el-icon-upload"
|
|
|
@click="projectReport(row)"
|
|
|
- >上报</el-button
|
|
|
- >
|
|
|
+ >上报
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
text
|
|
|
v-if="
|
|
|
@@ -108,17 +108,26 @@
|
|
|
row.report_type === 2
|
|
|
"
|
|
|
type="primary"
|
|
|
+ icon="el-icon-bell"
|
|
|
@click="rowClick(row, 1)"
|
|
|
- >审批</el-button
|
|
|
- >
|
|
|
+ >审核
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="row.hasOwnProperty('report_type') && row.report_type === 3"
|
|
|
text
|
|
|
type="primary"
|
|
|
icon="el-icon-upload"
|
|
|
@click="projectReportFormal(row)"
|
|
|
- >上报固定资产</el-button
|
|
|
- >
|
|
|
+ >上报固定资产
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-folder-remove"
|
|
|
+ @click="projectCancel(row)"
|
|
|
+ v-if="row.project_stage !== 7"
|
|
|
+ >退库
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template #plan_storage_time-header="{ column }">
|
|
|
<div class="flex flex-center">
|
|
|
@@ -170,9 +179,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #project_stage="{ row }">
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <div>{{ row['$project_stage'] }}</div>
|
|
|
+ <el-tooltip :content="row.exit_msg" v-if="row.project_stage === 7">
|
|
|
+ <el-icon @click="showReceipt(row.exit_msg)">
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template #report_type="{ row }">
|
|
|
- <div>
|
|
|
+ <div class="flex flex-center">
|
|
|
<el-tag>{{ row.report_type_name }}</el-tag>
|
|
|
+ <el-tooltip :content="row.receipt_msg">
|
|
|
+ <el-icon
|
|
|
+ v-if="row.report_type === 4"
|
|
|
+ class="ml-10"
|
|
|
+ @click="showReceipt(row.receipt_msg)"
|
|
|
+ >
|
|
|
+ <WarningFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
@@ -282,17 +310,26 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 项目审批-->
|
|
|
- <el-dialog v-model="showApproval" title="审批">
|
|
|
- <div>
|
|
|
+ <el-dialog v-model="showApproval" title="审核" width="500px">
|
|
|
+ <div class="flex flex-justify-start flex-col">
|
|
|
+ <div class="full-width flex flex-justify-start flex-align-center mb-20">
|
|
|
+ <span>审核状态:</span>
|
|
|
+ <el-radio-group v-model="approvalStatus">
|
|
|
+ <el-radio :label="3">通过</el-radio>
|
|
|
+ <el-radio :label="4">不通过</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
<el-input
|
|
|
+ class="mt-20"
|
|
|
type="textarea"
|
|
|
+ :rows="5"
|
|
|
v-model="approvalMsg"
|
|
|
placeholder="请填写审批意见"
|
|
|
/>
|
|
|
<div class="full-width flex flex-justify-end mt-20">
|
|
|
<el-button plain type="primary" @click="showApproval = false"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
+ >取消
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" @click="projectApproval">确定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -308,6 +345,7 @@ import { getLazyList } from '@/api/project/index.js'
|
|
|
import summaryDialog from '@/views/home/component/summary_dialog.vue'
|
|
|
import { useStore } from '@/store/user.js'
|
|
|
import confing from '@/config/website'
|
|
|
+import { ElMessageBox } from 'element-plus'
|
|
|
|
|
|
export default {
|
|
|
name: 'dash',
|
|
|
@@ -321,6 +359,7 @@ export default {
|
|
|
return {
|
|
|
showApproval: false,
|
|
|
approvalMsg: '',
|
|
|
+ approvalStatus: 3,
|
|
|
reportTime: '',
|
|
|
currentReport: null,
|
|
|
reportShow: false,
|
|
|
@@ -364,7 +403,8 @@ export default {
|
|
|
label: '项目情况',
|
|
|
prop: 'project_stage',
|
|
|
type: 'select',
|
|
|
- width: 120,
|
|
|
+ slot: true,
|
|
|
+ width: 140,
|
|
|
dicUrl:
|
|
|
'/api/blade-system/dict-biz/dictionary?code=project-situation',
|
|
|
props: {
|
|
|
@@ -664,12 +704,16 @@ export default {
|
|
|
* @param res
|
|
|
*/
|
|
|
projectReport(res) {
|
|
|
- this.$api.project.upReportType({ id: res.id }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message.success(res.msg)
|
|
|
- this.refreshChange()
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg)
|
|
|
+ this.$confirm('确认上报审核?').then(ele => {
|
|
|
+ if (ele === 'confirm') {
|
|
|
+ this.$api.project.upReportType({ id: res.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.refreshChange()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -681,11 +725,20 @@ export default {
|
|
|
},
|
|
|
/**
|
|
|
* 管理员审批项目
|
|
|
- * @param res
|
|
|
+ * approvalStatus === 4 审核不通过,需要填写原因
|
|
|
*/
|
|
|
- projectApproval(res) {
|
|
|
+ projectApproval() {
|
|
|
+ if (this.approvalStatus === 4 && this.approvalMsg.length === 0) {
|
|
|
+ this.$message.error('请填写审核意见')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.showApproval = false
|
|
|
this.$api.project
|
|
|
- .approvalProject({ id: res.id, reportType: 3 })
|
|
|
+ .approvalProject({
|
|
|
+ id: this.form.id,
|
|
|
+ reportType: this.approvalStatus,
|
|
|
+ receiptMsg: this.approvalMsg
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
@@ -700,17 +753,23 @@ export default {
|
|
|
* @param res
|
|
|
*/
|
|
|
projectReportFormal(res) {
|
|
|
- this.$api.project.reportToAssets({ ids: res.id }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message.success(res.msg)
|
|
|
- this.refreshChange()
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg)
|
|
|
+ this.$confirm('确定上报到固定资产?').then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ this.$api.project.reportToAssets({ ids: res.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.refreshChange()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 项目结转
|
|
|
+ */
|
|
|
projectCarry() {
|
|
|
- console.log(this.selectList)
|
|
|
this.$api.project
|
|
|
.projectCarry({ ids: this.selectList.join(',') })
|
|
|
.then(res => {
|
|
|
@@ -722,6 +781,28 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 项目退库
|
|
|
+ */
|
|
|
+ projectCancel(res) {
|
|
|
+ ElMessageBox.prompt('请输入退库原因', '提示', {}).then(({ value }) => {
|
|
|
+ console.log(value)
|
|
|
+ if (value === null || value.length === 0) {
|
|
|
+ this.$message.error('请输入退库原因')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$api.project
|
|
|
+ .projectCancel({ id: res.id, exitMsg: value })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.refreshChange()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
track(res) {
|
|
|
const data = {
|
|
|
id: res.id,
|
|
|
@@ -738,22 +819,6 @@ export default {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
- // // if (res.is_report === 1) {
|
|
|
- // // this.$message.error('该项目已经上报')
|
|
|
- // // return
|
|
|
- // // }
|
|
|
- // this.$confirm(
|
|
|
- // res.project_stage === 1
|
|
|
- // ? '上报后该项目情况将更新为正式项目,请确认项目相关信息已经审核完成'
|
|
|
- // : '是否确定进行项目上报',
|
|
|
- // {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // type: 'warning'
|
|
|
- // }
|
|
|
- // ).then(() => {
|
|
|
- //
|
|
|
- // })
|
|
|
},
|
|
|
projectSave() {
|
|
|
if (this.disable) {
|
|
|
@@ -798,6 +863,13 @@ export default {
|
|
|
)
|
|
|
this.$router.push({ query: data, path: '/home/excel' })
|
|
|
},
|
|
|
+ showReceipt(msg) {
|
|
|
+ this.$confirm(msg, {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ },
|
|
|
exportExcelTotal(item) {
|
|
|
const dataIds = {
|
|
|
...this.queryData,
|