From 5705d97d89a698f5c4a1bb9afcebdb8809dc6ba3 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 9 Apr 2025 14:02:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=AE=97=E8=AE=A1=E5=88=92dengji?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/index.vue | 1 - .../components/examineRegistration.vue | 57 ++++++++++++------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index a81b6cb..7d49889 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -527,7 +527,6 @@ export default { let m1 = row.money_total_1; let m3 = row.use_money_total; let per = 0; - if (m2 != 0) { per = ((m3 / m2) * 100).toFixed(2); } else if (m1 != 0) { diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index ab6aac3..2a43848 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -393,6 +393,12 @@ import {listdeptNoAuth} from "@/api/system/department"; width: 44, type: 'selection' }, + { + label: "id", + prop: 'id', + align: 'center', + width: 96, + }, { label: "年份", prop: 'year', @@ -572,7 +578,6 @@ import {listdeptNoAuth} from "@/api/system/department"; const res = await detailFundLog({ id }) - console.log(res) this.fileList = res.files_detail?.map(i => { return { url: i?.url, @@ -588,18 +593,19 @@ import {listdeptNoAuth} from "@/api/system/department"; for (var m of res.plan_link) { m.label = m.plan ? m.plan.name : "无计划名称"; } - this.paymentRegistrationForm.plan = res.plan_link + // this.paymentRegistrationForm.plan = res.plan_link this.paymentRegistrationForm.actMoney = res.apply_money this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item)) - await this.getContract(res.contract) - this.getBudgets(this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString()) + await this.getContract(res.contract,res.plan_link?.map(i => i.plan_id)?.toString()) + // this.getBudgets(this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString()) + this.getBudgets(res.plan_link?.map(i => i.plan_id)?.toString()) await this.moneyWayChange() }, //获取合同信息 - async getContract(info) { + async getContract(info,pid) { this.contract = info const res = await getFundLog({ @@ -608,9 +614,10 @@ import {listdeptNoAuth} from "@/api/system/department"; }) this.payment = res.data - this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { - return item.plan_id - })) + // this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { + // return item.plan_id + // })) + this.toggleSelection([pid]) }, //确认审核 @@ -619,7 +626,6 @@ import {listdeptNoAuth} from "@/api/system/department"; this.paymentRegistrationForm.plan.forEach(item => { total += Number(item.use_money) }) - console.log(Number(this.paymentRegistrationForm.actMoney).toFixed(2), total.toFixed(2)) // if (Number(this.paymentRegistrationForm.actMoney).toFixed(2) !== total.toFixed(2)) { // Message({ // type: 'warning', @@ -627,6 +633,7 @@ import {listdeptNoAuth} from "@/api/system/department"; // }) // return // } + // return editorFundLog({ id: this.registrationId, contract_id: this.contract.id, @@ -651,7 +658,6 @@ import {listdeptNoAuth} from "@/api/system/department"; //计划 //获取预算计划 async getBudgets(pid) { - console.log("this.paymentRegistrationForm.applyMoney",this.paymentRegistrationForm.applyMoney) let res = await getBudget({ top_pid: 1, ...this.plansSelect, @@ -670,9 +676,10 @@ import {listdeptNoAuth} from "@/api/system/department"; }, []); this.planTotal = res.list.total - this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { - return item.plan_id - })) + // this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { + // return item.plan_id + // })) + this.toggleSelection([pid]) } }, planPageChange(e) { @@ -720,16 +727,26 @@ import {listdeptNoAuth} from "@/api/system/department"; toggleSelection(plans) { if (plans) { this.plans.filter(plan => { - // if (plans.includes(plan.pid)) { - // plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money - // return true - // } - // else{ + if (plans.includes(plan.pid.toString())) { + // plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money plan.use_money = this.paymentRegistrationForm.applyMoney - // } - + return true + } + else{ + plan.use_money = this.paymentRegistrationForm.applyMoney + } }).forEach(row => { + this.$refs.planTable.toggleRowSelection(row) + + this.paymentRegistrationForm.plan.push({ + contract_id: this.contract.id, + plan_id: row.id, + use_money: row.use_money, + new_money: row.money, + label: row.name, + plan:row + }) }) } else { this.$refs.planTable.clearSelection()