|
|
|
|
@ -218,6 +218,7 @@
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-date-picker style="width: 160px" size="small" v-model="plansSelect.year" value-format="yyyy" type="year" />
|
|
|
|
|
<el-cascader
|
|
|
|
|
:options="planTypes"
|
|
|
|
|
:props="{
|
|
|
|
|
@ -384,7 +385,8 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
plansSelect: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
name: ''
|
|
|
|
|
name: '',
|
|
|
|
|
year: ''
|
|
|
|
|
},
|
|
|
|
|
planTable: [{
|
|
|
|
|
sortable: false,
|
|
|
|
|
@ -591,8 +593,8 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
this.paymentRegistrationForm.actMoney = res.apply_money
|
|
|
|
|
this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item))
|
|
|
|
|
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
await this.getContract(res.contract)
|
|
|
|
|
this.getBudgets(this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString())
|
|
|
|
|
await this.moneyWayChange()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -625,14 +627,6 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
console.log({
|
|
|
|
|
id: this.registrationId,
|
|
|
|
|
contract_id: this.contract.id,
|
|
|
|
|
act_money: this.paymentRegistrationForm.actMoney,
|
|
|
|
|
status: 1,
|
|
|
|
|
// money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
|
|
|
|
|
contract_plan_act_links: this.paymentRegistrationForm.plan
|
|
|
|
|
})
|
|
|
|
|
editorFundLog({
|
|
|
|
|
id: this.registrationId,
|
|
|
|
|
contract_id: this.contract.id,
|
|
|
|
|
@ -656,19 +650,17 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
|
|
|
|
|
//计划
|
|
|
|
|
//获取预算计划
|
|
|
|
|
async getBudgets() {
|
|
|
|
|
async getBudgets(pid) {
|
|
|
|
|
let res = await getBudget({
|
|
|
|
|
top_pid: 0,
|
|
|
|
|
...this.plansSelect
|
|
|
|
|
top_pid: 1,
|
|
|
|
|
...this.plansSelect,
|
|
|
|
|
pid
|
|
|
|
|
})
|
|
|
|
|
if (res.list.data) {
|
|
|
|
|
this.plans = [...this.paymentRegistrationForm.plan.map(i => ({
|
|
|
|
|
use_money: i.use_money,
|
|
|
|
|
...i.plan
|
|
|
|
|
})), ...res.list.data.map(i => ({
|
|
|
|
|
this.plans = res.list.data.map(i => ({
|
|
|
|
|
use_money: 0,
|
|
|
|
|
...i
|
|
|
|
|
}))].reduce((accumulator, current) => {
|
|
|
|
|
})).reduce((accumulator, current) => {
|
|
|
|
|
const duplicate = accumulator.find(item => item.id === current.id);
|
|
|
|
|
if (!duplicate) {
|
|
|
|
|
return accumulator.concat([current]);
|
|
|
|
|
@ -727,11 +719,11 @@ import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
toggleSelection(plans) {
|
|
|
|
|
if (plans) {
|
|
|
|
|
this.plans.filter(plan => {
|
|
|
|
|
if (plans.includes(plan.id)) {
|
|
|
|
|
plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money
|
|
|
|
|
if (plans.includes(plan.pid)) {
|
|
|
|
|
plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}).map(row => {
|
|
|
|
|
}).forEach(row => {
|
|
|
|
|
this.$refs.planTable.toggleRowSelection(row)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
|