From acf78f6ef785df7f5fa15d1ee0fc62c0bbbe74f6 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期五, 29 十一月 2024 02:37:42 +0800 Subject: [PATCH] 项目计划审批 --- src/views/projectManage/plan/planInfoCheck.vue | 96 +++++++++++++++++++++++++++++++---------------- 1 files changed, 63 insertions(+), 33 deletions(-) diff --git a/src/views/projectManage/plan/planInfoCheck.vue b/src/views/projectManage/plan/planInfoCheck.vue index 516be05..0a3ed72 100644 --- a/src/views/projectManage/plan/planInfoCheck.vue +++ b/src/views/projectManage/plan/planInfoCheck.vue @@ -1,8 +1,8 @@ <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"> @@ -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,55 @@ </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"> - <template #default="scope"> + <template #default="scope" v-if="!projectInfoData.managerFlag"> <el-button size="small" @click="handleReply(scope.$index)">鍥炲</el-button> <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button> + </template> + <template v-if="projectInfoData.managerFlag" #default="scope"> + <el-button size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button> </template> </el-table-column> </el-table> @@ -135,15 +160,15 @@ </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", + name: "PlanInfoCheck", data() { return { loading: true, // 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁 - planRecordData: {}, + planInfoData: {}, projectInfoData: {}, // 璁″垝椤规暟鎹� tableData: [ @@ -171,14 +196,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 +231,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 => { -- Gitblit v1.8.0