From 7c259529684436a8b12e462c437ecb1778b82d91 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 10 Jul 2025 18:36:57 +0800 Subject: [PATCH] =?UTF-8?q?oa=E5=A4=9A=E9=80=89=20ht=E5=87=BA=E5=B7=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=80=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/views/away/component/MultiExamine.vue | 55 ++++++++++++------- .../components/examineRegistration.vue | 9 ++- .../statisticalReport/budgetProgress.vue | 11 ++-- 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/.env.development b/.env.development index 9a19918..82d8b38 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # base api -#VUE_APP_BASE_API='http://192.167.20.118:8080/' +#VUE_APP_BASE_API='http://192.167.20.118:8080' VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net' VUE_APP_UPLOAD_API='https://cz-hjjc-test.115.langye.net/api/upload-file' VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview diff --git a/src/views/away/component/MultiExamine.vue b/src/views/away/component/MultiExamine.vue index 581a4c4..d15daa4 100644 --- a/src/views/away/component/MultiExamine.vue +++ b/src/views/away/component/MultiExamine.vue @@ -15,7 +15,6 @@ 待审批 - @@ -49,7 +48,7 @@ width: 54, reserveSelection: true, fixed: "left", - selectable: row => row.oa_ht_away_links ? false : true, + selectable: row => row.canSelect }, { prop: 'name', @@ -136,12 +135,22 @@ name: xingming_details, children: [], parent: null, // 添加父级字段 - isSelect: false // 添加选中状态字段 + isSelect: false ,// 添加选中状态字段 + canSelect:true, }; - const innerData = originalData[xingming_details]; + const innerData = originalData[xingming_details]; + let count=0 innerData.map(item => { - item.isSelect = false - }) + item.isSelect = false + item.canSelect = item.oa_ht_away_links?false:true + if(item.oa_ht_away_links){ + count++ + } + }) + // 如果所有的都已完成了,则父级选择框不可选 + if(count==innerData.length){ + person.canSelect = false + } person.children.push(...innerData) // const source = { // id: Math.random(), @@ -167,8 +176,10 @@ }, splite(data, flag) { - data.forEach((row) => { - this.$refs.awayTable.toggleRowSelection(row, flag) + data.forEach((row) => { + if(row.canSelect){ + this.$refs.awayTable.toggleRowSelection(row, flag) + } if (row.children) { this.splite(row.children, flag) } @@ -198,10 +209,12 @@ }, selectChildren(parent) { if (parent.children) { - parent.children.forEach((child) => { - this.$refs.awayTable.toggleRowSelection(child, true); // 选中当前子级 - // child.isSelect = true; // 更新子级的 isSelect 状态 - this.$set(child, 'isSelect', true) + parent.children.forEach((child) => { + if(child.canSelect){ + this.$refs.awayTable.toggleRowSelection(child, true); // 选中当前子级 + // child.isSelect = true; // 更新子级的 isSelect 状态 + this.$set(child, 'isSelect', true) + } this.selectChildren(child); // 递归选中子级的子级 }); } @@ -209,14 +222,18 @@ deselectChildren(parent, isSelect) { console.log("isSelect", isSelect, parent) if (parent.children) { - parent.children.forEach((child, index) => { - this.$refs.awayTable.toggleRowSelection(child, isSelect); // 取消选择当前子级 - this.$set(child, 'isSelect', isSelect) + parent.children.forEach((child, index) => { + if(child.canSelect){ + this.$refs.awayTable.toggleRowSelection(child, isSelect); // 取消选择当前子级 + this.$set(child, 'isSelect', isSelect) + } this.deselectChildren(child, isSelect); // 递归取消选择子级的子级 }); - } else { - this.$refs.awayTable.toggleRowSelection(parent, isSelect); - this.$set(parent, 'isSelect', isSelect) + } else { + if(parent.canSelect){ + this.$refs.awayTable.toggleRowSelection(parent, isSelect); + this.$set(parent, 'isSelect', isSelect) + } console.log("parent", parent) } }, @@ -241,7 +258,7 @@ async confirm() { console.log("this.$refs['awayTable'].getSelection()", this.$refs['awayTable'].getSelection()); let flowsList = this.$refs['awayTable'].getSelection(); - + // return let flow_id = []; let chuchai_pay_id = []; let chuchai_pay_details = []; diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index 6fad3f7..2058fbf 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -658,7 +658,14 @@ import {listdeptNoAuth} from "@/api/system/department"; total += Number(item.act_money) }) console.log("total",total,this.contract?.money) - return ((total / Number(this.contract?.money??0)) * 100).toFixed(2) || 0 + if(this.contract){ + if(Number(this.contract.money)>0){ + return ((total / Number(this.contract.money)) * 100).toFixed(2) + }else{ + return 0 + } + } + }, async getRegistration(id) { diff --git a/src/views/statisticalReport/budgetProgress.vue b/src/views/statisticalReport/budgetProgress.vue index f02b074..59e695f 100644 --- a/src/views/statisticalReport/budgetProgress.vue +++ b/src/views/statisticalReport/budgetProgress.vue @@ -49,7 +49,7 @@
- +
@@ -85,10 +85,12 @@ import { getToken } from '@/utils/auth' types: [], //预算类型 departments: [], select: { + pageSize:15, pageIndex: 1, year: '', type: '', - department: '' + department: '', + // sort_name:'id', }, rateTotal: '0%', moneyTotal: 0, @@ -530,12 +532,13 @@ import { getToken } from '@/utils/auth' async getPlanProgress() { const res = await getProgress({ - page_size: 10, + page_size: this.select.pageSize, page: this.select.pageIndex, year: this.select.year, type: this.select.type, plan_department_id: this.select.department, - top_pid: 1 + top_pid: 1, + // sort_name:this.select.sort_name }) for (var m of res.list.data) { m.pid_info_name = m.pid_info?.name