From dd4c953182002b45f84e287d210463e65c5ef18f Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期六, 30 十一月 2024 14:02:10 +0800
Subject: [PATCH] 流程待办跳转
---
src/views/projectManage/plan/planInfoCheck.vue | 128 +++++++++++++++++++++++++++---------------
1 files changed, 82 insertions(+), 46 deletions(-)
diff --git a/src/views/projectManage/plan/planInfoCheck.vue b/src/views/projectManage/plan/planInfoCheck.vue
index a80c565..60dc8fd 100644
--- a/src/views/projectManage/plan/planInfoCheck.vue
+++ b/src/views/projectManage/plan/planInfoCheck.vue
@@ -1,12 +1,13 @@
<template>
<div class="app-container">
<el-container>
- <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }} {{ planRecordData.planTimeFlag === 0 ? '(鏈堝害璁″垝)' : planRecordData.planTimeFlag === 1 ? '(瀛e害璁″垝)' : '(骞村害璁″垝)' }}</el-header>
- <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4>
+ <el-header class="header-title">椤圭洰鍚嶇О锛歿{ planInfoData.projectName }} ({{ planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '鏈堝害璁″垝' : planInfoData.planTimeFlag === 1 ? '瀛e害璁″垝' : '骞村害璁″垝' }})</el-header>
+ <h4 style="text-align: center">椤圭洰浠g爜锛歿{ planInfoData.projectCode }}</h4>
<el-main>
<el-card shadow="hover">
<el-row :gutter="20">
<el-col :span="24" class="mb-4">
+ <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px; margin-left: 10px">杩斿洖</el-button>
<!--椤圭洰璁″垝椤�-->
<el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
<el-table-column prop="index" label="搴忓彿" width="50" align="center">
@@ -16,34 +17,36 @@
</el-table-column>
<el-table-column prop="taskName" label="浜嬮」鍚嶇О" width="500" align="center">
<template #default="scope">
- <el-input type="textarea" v-model="scope.row.title" placeholder="璇疯緭鍏�" rows="3" />
+ <el-input type="textarea" v-model="scope.row.title" placeholder="璇疯緭鍏�" rows="3" readonly />
</template>
</el-table-column>
- <el-table-column prop="startTime" label="璁″垝寮�濮嬫椂闂�" width="160" align="center">
+ <el-table-column prop="startTime" label="璁″垝寮�濮嬫椂闂�" width="160" align="center" >
<template #default="scope">
- <el-date-picker v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px"/>
+ <el-date-picker v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag"/>
</template>
</el-table-column>
- <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" width="160" align="center">
+ <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" width="160" align="center" >
<template #default="scope">
- <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px"/>
+ <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag" />
</template>
</el-table-column>
- <el-table-column :label="planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center">
+ <el-table-column :label="planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " align="center">
<template #default="scope">
- <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
+ <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" align="center">
- <template #default="scope">
- <el-button size="small" @click="handleDelay(scope.$index)">寤舵湡</el-button>
- <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
- </template>
- </el-table-column>
+ <div v-if="!projectInfoData.managerFlag">
+ <el-table-column fixed="right" label="鎿嶄綔" align="center">
+ <template #default="scope">
+ <el-button size="small" @click="handleDelay(scope.$index)">寤舵湡</el-button>
+ <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
+ </template>
+ </el-table-column>
+ </div>
</el-table>
<div style="display: flex; align-items: center;">
<h1 style="margin: 0;">
- 鎴鏈鍒掕繘搴﹀畬鎴愭姇璧勶紙涓囧厓锛夛細
+ 璁″垝鎶曡祫閲戦锛堜竾鍏冿級锛�
</h1>
<el-input
placeholder="璇疯緭鍏ユ姇璧勯噾棰�"
@@ -51,7 +54,8 @@
v-model="actualInvest"
clearable
:type="number"
- @input="handleInput">
+ @input="handleInput"
+ readonly>
</el-input>
</div>
@@ -66,32 +70,53 @@
</template>
</el-table-column>
<el-table-column prop="title" label="浜嬮」鍚嶇О" width="200" align="center" />
- <el-table-column prop="departmentExamine" label="涓婄骇瀹℃牳" width="100" align="center">
- <template #default="scope">
+ <el-table-column prop="departmentExamine" label="涓婄骇瀹℃牳" width="130" align="center">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
{{ scope.row.departmentExamine === 0 ? '鍚屾剰' : scope.row.departmentExamine === 1 ? '椹冲洖' : '鏈鏍�' }}
</template>
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-select v-model="scope.row.departmentExamine" placeholder="璇烽�夋嫨" size="small" clearable>
+ <el-option label="鍚屾剰" :value="0"></el-option>
+ <el-option label="椹冲洖" :value="1"></el-option>
+ </el-select>
+ </template>
</el-table-column>
- <el-table-column prop="departmentApproval" label="鎵瑰鍐呭" width="160" align="center" />
+ <el-table-column prop="departmentApproval" label="鎵瑰鍐呭" width="160" align="center">
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-input type="textarea" v-model="scope.row.departmentApproval" placeholder="璇疯緭鍏�" rows="3" />
+ </template>
+ </el-table-column>
<el-table-column prop="departmentApprovalReply" label="鎵瑰鍥炲" width="160" align="center">
- <template #default="scope">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
<el-input type="textarea" v-model="scope.row.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" />
</template>
</el-table-column>
- <el-table-column prop="manageExamine" label="涓荤閮ㄩ棬瀹℃牳" width="100" align="center" >
- <template #default="scope">
+ <el-table-column prop="manageExamine" label="涓荤閮ㄩ棬瀹℃牳" width="130" align="center" >
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
{{ scope.row.manageExamine === 0 ? '鍚屾剰' : scope.row.manageExamine === 1 ? '椹冲洖' : '鏈鏍�' }}
</template>
- </el-table-column>
- <el-table-column prop="manageApproval" label="鎵瑰鍐呭" width="160" align="center" />
- <el-table-column prop="manageApprovalReply" label="鎵瑰鍥炲" width="160" align="center">
- <template #default="scope">
- <el-input type="textarea" v-model="scope.row.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" />
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-select v-model="scope.row.manageExamine" placeholder="璇烽�夋嫨" size="small" clearable>
+ <el-option label="鍚屾剰" :value="0"></el-option>
+ <el-option label="椹冲洖" :value="1"></el-option>
+ </el-select>
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" align="center">
+ <el-table-column prop="manageApproval" label="鎵瑰鍐呭" width="160" align="center">
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-input type="textarea" v-model="scope.row.manageApproval" placeholder="璇疯緭鍏�" rows="3" />
+ </template>
+ </el-table-column>
+ <el-table-column prop="manageApprovalReply" label="鎵瑰鍥炲" width="160" align="center">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
+ <el-input type="textarea" v-model="scope.row.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" />
+ </template>
+ </el-table-column>
+ <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200">
<template #default="scope">
- <el-button size="small" @click="handleDelay(scope.$index)">鍥炲</el-button>
- <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
+ <el-button v-show="!projectInfoData.managerFlag" size="small" @click="handleReply(scope.$index)">鍥炲</el-button>
+ <el-button v-show="!projectInfoData.managerFlag" size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
+ <el-button v-show="projectInfoData.managerFlag" size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button>
</template>
</el-table-column>
</el-table>
@@ -133,7 +158,7 @@
</template>
<script>
-import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog } from "@/api/projectPlan/index";
+import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyExamine, saveExamine } from "@/api/projectPlan/index";
export default {
name: "planInfoCheck",
@@ -141,8 +166,8 @@
return {
loading: true,
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
planInfoData: {},
+ projectInfoData: {},
// 璁″垝椤规暟鎹�
tableData: [
{
@@ -169,17 +194,15 @@
methods: {
// 椤甸潰鍔犺浇
search() {
- this.getPlanInfoData(this.planRecordData.id); // 鑾峰彇椤圭洰璁″垝椤�
- this.getDepartmentApproval(this.planRecordData.id); // 鑾峰彇涓婄骇鎵瑰
- this.getPlanLog(this.planRecordData.id); // 鑾峰彇璁″垝鏃ュ織
+ this.getPlanInfoData(this.planInfoData.id); // 鑾峰彇椤圭洰璁″垝椤�
+ this.getDepartmentApproval(this.planInfoData.id); // 鑾峰彇涓婄骇鎵瑰
+ this.getPlanLog(this.planInfoData.id); // 鑾峰彇璁″垝鏃ュ織
},
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
getPlanRecordData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- if (this.$route.query.data) {
- this.planRecordData = JSON.parse(this.$route.query.data)
- }
- this.planInfoData = this.$route.query.planInfoData
+ this.planInfoData = this.$route.query.data
+ this.projectInfoData = this.$route.query.projectInfoData
this.search();
},
// 鑾峰彇椤圭洰璁″垝椤�
@@ -206,6 +229,19 @@
this.departmentApprovalData = response.data;
});
},
+ // 鍥炲瀹℃壒
+ handleReply(index) {
+ replyExamine(this.departmentApprovalData[index]).then(response => {
+ this.$message.success('鍥炲鎴愬姛');
+ this.search()
+ });
+ },
+ // 淇濆瓨瀹℃壒
+ handleSave(index) {
+ saveExamine(this.departmentApprovalData[index]).then(response => {
+ this.$message.success('淇濆瓨鎴愬姛');
+ });
+ },
// 鑾峰彇璁″垝鏃ュ織
getPlanLog(projectPlanRecordId) {
getPlanLog(projectPlanRecordId).then(response => {
@@ -218,15 +254,15 @@
this.tableData[index].startTime = '';
this.tableData[index].endTime = '';
},
- /** 杩斿洖椤圭洰璁″垝璁板綍椤甸潰 */
- handlePlanRecord(planInfoData) {
- this.$router.push({
- name: '/projectManage/planRecord',
+ /** 杩斿洖椤圭洰璁″垝璁板綍 */
+ handlePlanRecord() {
+ this.$router.replace({
+ path: '/projectManage/planRecord',
query: {
- data: JSON.stringify(planInfoData)
+ data: this.projectInfoData
}
})
- },
+ }
},
created() {
this.getPlanRecordData();
--
Gitblit v1.8.0