From f0e9b7f452c7395204de97fbfc1afc7e11b7eace Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Mon, 21 Jul 2025 18:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E8=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/examineRegistration.vue | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index 83a6705..3e41c32 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -690,6 +690,12 @@ import {listdeptNoAuth} from "@/api/system/department"; m.label = m.plan ? m.plan.name : "无计划名称"; } this.paymentRegistrationForm.plan = res.plan_link + if(res.plan_link.length<1){ + Message({ + type: 'warning', + message: '该支出未关联预算计划,请在下方手动关联预算计划' + }) + } this.paymentRegistrationForm.actMoney = res.apply_money this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item)) @@ -721,7 +727,15 @@ import {listdeptNoAuth} from "@/api/system/department"; editor() { console.log('this.paymentRegistrationForm.plan123',this.paymentRegistrationForm.plan,this.paymentRegistrationForm.plan_act_link_by_unit_loan) - let contract_plan_act_links = [] + let contract_plan_act_links = this.$refs.planTable.getSelection() + if(contract_plan_act_links.length<1){ + Message({ + type: 'warning', + message: '请选择预算计划' + }) + return + } + // return if(this.paymentRegistrationForm.plan_act_link_by_unit_loan.length>0){ this.paymentRegistrationForm.plan_act_link_by_unit_loan.map(item=>{ item.fund_log_id = this.registrationId @@ -733,16 +747,16 @@ import {listdeptNoAuth} from "@/api/system/department"; } // 过滤掉父级的预算计划 let contract_plan_act_links_filter = contract_plan_act_links.filter(i=>i.plan.pid!=0) - console.log("this.paymentRegistrationForm",this.paymentRegistrationForm) - console.log("contract_plan_act_links",contract_plan_act_links,contract_plan_act_links_filter) + console.log("contract_plan_act_links_filter",contract_plan_act_links_filter) - if(contract_plan_act_links_filter.length<1){ - Message({ - type: 'warning', - message: '请选择预算计划' - }) - return - } + + // if(contract_plan_act_links_filter.length<1){ + // Message({ + // type: 'warning', + // message: '请选择预算计划' + // }) + // return + // } // 判断选择的预算计划金额是否不为0 let money0 = 0 contract_plan_act_links_filter.map(i=>{ @@ -753,7 +767,7 @@ import {listdeptNoAuth} from "@/api/system/department"; if(money0>0){ Message({ type: 'warning', - message: '预算计划的使用金额不能为0' + message: '选择的预算计划的使用金额不能为0' }) return } @@ -889,7 +903,7 @@ import {listdeptNoAuth} from "@/api/system/department"; this.paymentRegistrationForm.actMoney : this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money return true }else{ - plan.use_money = this.paymentRegistrationForm.actMoney + plan.use_money = 0 } // plan.use_money = this.paymentRegistrationForm.applyMoney