|
|
|
|
@ -651,6 +651,7 @@ 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,
|
|
|
|
|
@ -658,7 +659,7 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
})
|
|
|
|
|
if (res.list.data) {
|
|
|
|
|
this.plans = res.list.data.map(i => ({
|
|
|
|
|
use_money: 0,
|
|
|
|
|
use_money: this.paymentRegistrationForm.applyMoney,
|
|
|
|
|
...i
|
|
|
|
|
})).reduce((accumulator, current) => {
|
|
|
|
|
const duplicate = accumulator.find(item => item.id === current.id);
|
|
|
|
|
@ -719,10 +720,14 @@ 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
|
|
|
|
|
}
|
|
|
|
|
// if (plans.includes(plan.pid)) {
|
|
|
|
|
// plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
|
|
|
|
|
// return true
|
|
|
|
|
// }
|
|
|
|
|
// else{
|
|
|
|
|
plan.use_money = this.paymentRegistrationForm.applyMoney
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}).forEach(row => {
|
|
|
|
|
this.$refs.planTable.toggleRowSelection(row)
|
|
|
|
|
})
|
|
|
|
|
|