|
|
|
|
@ -28,6 +28,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input
|
|
|
|
|
:readonly="type === 'detail'"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请填写付款金额"
|
|
|
|
|
v-model="paymentRegistrationForm.applyMoney"
|
|
|
|
|
@ -205,6 +206,7 @@
|
|
|
|
|
<el-table-column label="使用金额(元)" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Input
|
|
|
|
|
:readonly="type === 'detail'"
|
|
|
|
|
:value="scope.row.useMoney"
|
|
|
|
|
@input="(e) => (scope.row.useMoney = e)"
|
|
|
|
|
/>
|
|
|
|
|
@ -223,7 +225,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getparameter, getparameterTree} from "@/api/system/dictionary";
|
|
|
|
|
import { getFundLog, addFundLog } from "@/api/paymentRegistration/fundLog";
|
|
|
|
|
import { getFundLog, addFundLog, detailFundLog } from "@/api/paymentRegistration/fundLog";
|
|
|
|
|
import { getBudget } from "@/api/budget/budget";
|
|
|
|
|
import { detailContract, editorContract } from "@/api/contract/contract";
|
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
|
@ -235,6 +237,7 @@ import { save } from "@/api/away";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
type: "add",
|
|
|
|
|
departments: [],
|
|
|
|
|
plansSelect: {
|
|
|
|
|
page: 1,
|
|
|
|
|
@ -313,6 +316,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
planTable: [
|
|
|
|
|
{
|
|
|
|
|
selectable: () => this.type !== 'detail',
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 46,
|
|
|
|
|
type: "selection",
|
|
|
|
|
@ -375,7 +379,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.pageIndex = e;
|
|
|
|
|
this.plansSelect.page = e;
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -483,9 +487,7 @@ export default {
|
|
|
|
|
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)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$nextTick(() => this.$refs["planTable"].doLayout())
|
|
|
|
|
},500)
|
|
|
|
|
@ -512,14 +514,15 @@ export default {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let plans = this.paymentRegistrationForm.plan.map((item) => {
|
|
|
|
|
return item.plan_id;
|
|
|
|
|
return item.id;
|
|
|
|
|
});
|
|
|
|
|
console.log(plans)
|
|
|
|
|
if (plans) {
|
|
|
|
|
this.plans
|
|
|
|
|
.filter((plan) => {
|
|
|
|
|
return plans.includes(plan.id);
|
|
|
|
|
})
|
|
|
|
|
.map((row) => {
|
|
|
|
|
.forEach((row) => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs["planTable"].toggleRowSelection(row);
|
|
|
|
|
});
|
|
|
|
|
@ -534,6 +537,25 @@ export default {
|
|
|
|
|
this.departments = res;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getDetail () {
|
|
|
|
|
const res = await detailFundLog({
|
|
|
|
|
id: this.contract.id
|
|
|
|
|
})
|
|
|
|
|
res.plan_link.forEach(item => {
|
|
|
|
|
let temp = this.plans.find(j => j.id === item.plan.id)
|
|
|
|
|
if (temp) {
|
|
|
|
|
this.$refs["planTable"].toggleRowSelection(temp)
|
|
|
|
|
temp.useMoney = item.use_money
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.paymentRegistrationForm = {
|
|
|
|
|
applyMoney: res.apply_money,
|
|
|
|
|
plan: res.plan_link.map(item => item.plan),
|
|
|
|
|
remark: res.remark,
|
|
|
|
|
files: []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
priceFormat() {
|
|
|
|
|
@ -560,6 +582,12 @@ export default {
|
|
|
|
|
isShowPaymentRegistration(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
|
|
|
|
|
if (this.type === "detail") {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.type = "add";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|