|
|
|
@ -472,6 +472,15 @@ export default {
|
|
|
|
this.$refs.moneyWayTree.setCheckedKeys([])
|
|
|
|
this.$refs.moneyWayTree.setCheckedKeys([])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 监听实付日期变化,当日期选择后重新获取预算类型和预算计划
|
|
|
|
|
|
|
|
'paymentRegistrationForm.act_date'(newVal, oldVal) {
|
|
|
|
|
|
|
|
// 只有当新值存在且与旧值不同时才触发
|
|
|
|
|
|
|
|
if (newVal && newVal !== oldVal) {
|
|
|
|
|
|
|
|
// 当实付日期变化时,重新获取预算类型和预算计划
|
|
|
|
|
|
|
|
this.getPlanTypes()
|
|
|
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
async mounted() {
|
|
|
|
@ -600,11 +609,23 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 从实付日期中提取年份
|
|
|
|
|
|
|
|
getYearFromActDate() {
|
|
|
|
|
|
|
|
if (this.paymentRegistrationForm.act_date) {
|
|
|
|
|
|
|
|
// 日期格式为 yyyy-MM-dd,提取年份
|
|
|
|
|
|
|
|
return this.paymentRegistrationForm.act_date.split('-')[0]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 如果没有实付日期,返回当前年份
|
|
|
|
|
|
|
|
return this.$moment().format('YYYY')
|
|
|
|
|
|
|
|
},
|
|
|
|
async getPlanTypes() {
|
|
|
|
async getPlanTypes() {
|
|
|
|
const res1 = await getparameter({
|
|
|
|
// const res1 = await getparameter({
|
|
|
|
number: 'money_way'
|
|
|
|
// number: 'money_way'
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
this.planTypes_arr = res1.detail
|
|
|
|
// this.planTypes_arr = res1.detail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 从实付日期中获取年份
|
|
|
|
|
|
|
|
const year = this.getYearFromActDate()
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getPlanType({
|
|
|
|
const res = await getPlanType({
|
|
|
|
page_size: 999,
|
|
|
|
page_size: 999,
|
|
|
|
@ -614,7 +635,7 @@ export default {
|
|
|
|
filter: [{
|
|
|
|
filter: [{
|
|
|
|
key: 'year',
|
|
|
|
key: 'year',
|
|
|
|
op: 'eq',
|
|
|
|
op: 'eq',
|
|
|
|
value: this.$moment().format('YYYY'),
|
|
|
|
value: year,
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.planTypes = buildTree(res.data)
|
|
|
|
this.planTypes = buildTree(res.data)
|
|
|
|
@ -769,10 +790,14 @@ export default {
|
|
|
|
// 计划
|
|
|
|
// 计划
|
|
|
|
// 获取预算计划
|
|
|
|
// 获取预算计划
|
|
|
|
async getBudgets() {
|
|
|
|
async getBudgets() {
|
|
|
|
|
|
|
|
// 从实付日期中获取年份
|
|
|
|
|
|
|
|
const year = this.getYearFromActDate()
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getBudget({
|
|
|
|
const res = await getBudget({
|
|
|
|
top_pid: 1,
|
|
|
|
top_pid: 1,
|
|
|
|
sort_name:'year',
|
|
|
|
sort_name:'year',
|
|
|
|
sort_type:'DESC',
|
|
|
|
sort_type:'DESC',
|
|
|
|
|
|
|
|
year: year,
|
|
|
|
...this.plansSelect
|
|
|
|
...this.plansSelect
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.plans = res.list.data
|
|
|
|
this.plans = res.list.data
|
|
|
|
|