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 | 100 ++++++++++++++++++++++++++++++++------------------
1 files changed, 64 insertions(+), 36 deletions(-)
diff --git a/src/views/projectManage/plan/planInfoCheck.vue b/src/views/projectManage/plan/planInfoCheck.vue
index 516be05..60dc8fd 100644
--- a/src/views/projectManage/plan/planInfoCheck.vue
+++ b/src/views/projectManage/plan/planInfoCheck.vue
@@ -1,13 +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;">杩斿洖</el-button>
+ <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">
@@ -20,27 +20,29 @@
<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;">
@@ -68,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>
+ <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 prop="manageApproval" label="鎵瑰鍐呭" width="160" 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">
+ <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">
+ <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200">
<template #default="scope">
- <el-button size="small" @click="handleReply(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>
@@ -135,7 +158,7 @@
</template>
<script>
-import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyDepartmentApproval } from "@/api/projectPlan/index";
+import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyExamine, saveExamine } from "@/api/projectPlan/index";
export default {
name: "planInfoCheck",
@@ -143,7 +166,7 @@
return {
loading: true,
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
+ planInfoData: {},
projectInfoData: {},
// 璁″垝椤规暟鎹�
tableData: [
@@ -171,14 +194,14 @@
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() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- this.planRecordData = this.$route.query.data
+ this.planInfoData = this.$route.query.data
this.projectInfoData = this.$route.query.projectInfoData
this.search();
},
@@ -206,14 +229,19 @@
this.departmentApprovalData = response.data;
});
},
- // 鍥炲
+ // 鍥炲瀹℃壒
handleReply(index) {
- replyDepartmentApproval(this.departmentApprovalData[index]).then(response => {
+ 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 => {
@@ -228,7 +256,7 @@
},
/** 杩斿洖椤圭洰璁″垝璁板綍 */
handlePlanRecord() {
- this.$router.push({
+ this.$router.replace({
path: '/projectManage/planRecord',
query: {
data: this.projectInfoData
--
Gitblit v1.8.0