|
|
|
|
@ -245,9 +245,6 @@ import {
|
|
|
|
|
import {
|
|
|
|
|
detailContract, resetMoney
|
|
|
|
|
} from "@/api/contract/contract";
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from "element-ui";
|
|
|
|
|
import {
|
|
|
|
|
parseTime,
|
|
|
|
|
moneyFormatter
|
|
|
|
|
@ -350,7 +347,7 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
planTable: [{
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 44,
|
|
|
|
|
type: 'selection'
|
|
|
|
|
type: 'selection',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "年份",
|
|
|
|
|
@ -422,14 +419,7 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
moneyWayChange(e) {
|
|
|
|
|
this.paymentRegistrationForm.moneyWay = e;
|
|
|
|
|
|
|
|
|
|
let page = 1
|
|
|
|
|
let pageSize = this.plansSelect.page_size
|
|
|
|
|
let name = this.plansSelect.name
|
|
|
|
|
this.plansSelect = {
|
|
|
|
|
page: page,
|
|
|
|
|
page_size: pageSize,
|
|
|
|
|
name: name
|
|
|
|
|
}
|
|
|
|
|
this.plansSelect.page = 1;
|
|
|
|
|
if (this.paymentRegistrationForm.moneyWay) {
|
|
|
|
|
let _arr = [];
|
|
|
|
|
this.paymentRegistrationForm.moneyWay.forEach((item, index) => {
|
|
|
|
|
@ -437,7 +427,9 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
});
|
|
|
|
|
this.plansSelect[`type`]=_arr +'';
|
|
|
|
|
}
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
if (this.paymentRegistrationForm.plan.length === 0) {
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
inputMoney(e, row) {
|
|
|
|
|
@ -474,7 +466,7 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
},
|
|
|
|
|
//翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.pageIndex = e
|
|
|
|
|
this.plansSelect.page = e
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -530,8 +522,12 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
this.paymentRegistrationForm.actMoney = res.apply_money
|
|
|
|
|
this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',')?.map(item => Number(item))
|
|
|
|
|
|
|
|
|
|
await this.getContract(res.contract)
|
|
|
|
|
await this.moneyWayChange(this.paymentRegistrationForm.moneyWay)
|
|
|
|
|
this.getContract(res.contract)
|
|
|
|
|
this.moneyWayChange(this.paymentRegistrationForm.moneyWay)
|
|
|
|
|
if (res.plan_link.length > 0) {
|
|
|
|
|
await this.getBudgets(1)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取合同信息
|
|
|
|
|
@ -577,7 +573,13 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
apply_money: this.paymentRegistrationForm.applyMoney,
|
|
|
|
|
discount_money: this.paymentRegistrationForm.deductionMoney,
|
|
|
|
|
money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
|
|
|
|
|
contract_plan_act_links: this.paymentRegistrationForm.plan
|
|
|
|
|
contract_plan_act_links: this.$refs["planTable"].getSelection().map(item => ({
|
|
|
|
|
contract_id: this.contract.id,
|
|
|
|
|
plan_id: item.id,
|
|
|
|
|
use_money: item.use_money,
|
|
|
|
|
new_money: item.money,
|
|
|
|
|
label: item.name
|
|
|
|
|
}))
|
|
|
|
|
}).then(res => {
|
|
|
|
|
resetMoney({
|
|
|
|
|
id: this.contract.id,
|
|
|
|
|
@ -585,7 +587,7 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
})
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
this.isShow = false
|
|
|
|
|
Message({
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '操作成功'
|
|
|
|
|
})
|
|
|
|
|
@ -594,17 +596,18 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
|
|
|
|
|
//计划
|
|
|
|
|
//获取预算计划
|
|
|
|
|
async getBudgets() {
|
|
|
|
|
async getBudgets(is_tree=0) {
|
|
|
|
|
let res = await getBudget({
|
|
|
|
|
top_pid: 1,
|
|
|
|
|
...this.plansSelect
|
|
|
|
|
top_pid: is_tree ? 0 : 1,
|
|
|
|
|
...this.plansSelect,
|
|
|
|
|
pid: is_tree ? this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString() : ""
|
|
|
|
|
})
|
|
|
|
|
this.plans = res.list.data
|
|
|
|
|
this.planTotal = res.list.total
|
|
|
|
|
|
|
|
|
|
this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
|
|
|
|
|
return item.plan_id
|
|
|
|
|
}))
|
|
|
|
|
// this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
|
|
|
|
|
// return item.plan_id
|
|
|
|
|
// }))
|
|
|
|
|
},
|
|
|
|
|
planPageChange(e) {
|
|
|
|
|
this.plansSelect.page = e
|
|
|
|
|
@ -688,10 +691,9 @@ import { listdeptNoAuth } from '@/api/system/department'
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDepartment()
|
|
|
|
|
this.getPlanTypes()
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
//await this.getBudgets()
|
|
|
|
|
await this.getPlanTypes()
|
|
|
|
|
mounted() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|