master
lion 5 months ago
parent 018802f135
commit f0e9b7f452

@ -690,6 +690,12 @@ import {listdeptNoAuth} from "@/api/system/department";
m.label = m.plan ? m.plan.name : "无计划名称"; m.label = m.plan ? m.plan.name : "无计划名称";
} }
this.paymentRegistrationForm.plan = res.plan_link this.paymentRegistrationForm.plan = res.plan_link
if(res.plan_link.length<1){
Message({
type: 'warning',
message: '该支出未关联预算计划,请在下方手动关联预算计划'
})
}
this.paymentRegistrationForm.actMoney = res.apply_money this.paymentRegistrationForm.actMoney = res.apply_money
this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item)) this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item))
@ -721,7 +727,15 @@ import {listdeptNoAuth} from "@/api/system/department";
editor() { editor() {
console.log('this.paymentRegistrationForm.plan123',this.paymentRegistrationForm.plan,this.paymentRegistrationForm.plan_act_link_by_unit_loan) 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){ if(this.paymentRegistrationForm.plan_act_link_by_unit_loan.length>0){
this.paymentRegistrationForm.plan_act_link_by_unit_loan.map(item=>{ this.paymentRegistrationForm.plan_act_link_by_unit_loan.map(item=>{
item.fund_log_id = this.registrationId 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) 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_filter",contract_plan_act_links_filter)
console.log("contract_plan_act_links",contract_plan_act_links,contract_plan_act_links_filter)
if(contract_plan_act_links_filter.length<1){
Message({ // if(contract_plan_act_links_filter.length<1){
type: 'warning', // Message({
message: '请选择预算计划' // type: 'warning',
}) // message: ''
return // })
} // return
// }
// 0 // 0
let money0 = 0 let money0 = 0
contract_plan_act_links_filter.map(i=>{ contract_plan_act_links_filter.map(i=>{
@ -753,7 +767,7 @@ import {listdeptNoAuth} from "@/api/system/department";
if(money0>0){ if(money0>0){
Message({ Message({
type: 'warning', type: 'warning',
message: '预算计划的使用金额不能为0' message: '选择的预算计划的使用金额不能为0'
}) })
return return
} }
@ -889,7 +903,7 @@ import {listdeptNoAuth} from "@/api/system/department";
this.paymentRegistrationForm.actMoney : this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money this.paymentRegistrationForm.actMoney : this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
return true return true
}else{ }else{
plan.use_money = this.paymentRegistrationForm.actMoney plan.use_money = 0
} }
// plan.use_money = this.paymentRegistrationForm.applyMoney // plan.use_money = this.paymentRegistrationForm.applyMoney

Loading…
Cancel
Save