付款确认显示

master
xy 2 years ago
parent b811bfc8f7
commit 07010b14ff

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

@ -360,7 +360,9 @@ export default {
width: 100, width: 100,
label: "财务审核", label: "财务审核",
customFn:row => { customFn:row => {
return (row.FLOWSTATUS.financial.getStatus() === 2) ? (<span style="color: green;">已确认</span>) : (<span style="color: #666;">待审核</span>) return (row.FLOWSTATUS.financial.getStatus() === 2) ?
(<span style="color: green;">已确认</span>) :
(<span style="color: #666;">待审核</span>)
} }
} }
] ]

@ -6,16 +6,16 @@
<template v-slot:extraFormTop> <template v-slot:extraFormTop>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">受款单位</div> <div class="payment-registration-row-title">受款单位</div>
<div class="payment-registration-row-content">{{contract.supply}}</div> <div class="payment-registration-row-content">{{contract ? contract.supply : ''}}</div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">合同名称</div> <div class="payment-registration-row-title">合同名称</div>
<div class="payment-registration-row-content">{{contract.name}}</div> <div class="payment-registration-row-content">{{contract ? contract.name : ''}}</div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">合同金额</div> <div class="payment-registration-row-title">合同金额</div>
<div class="payment-registration-row-content">{{moneyFormat(contract.money)}} </div> <div class="payment-registration-row-content">{{contract ? moneyFormat(contract.money) : 0}} </div>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div class="payment-registration-row"> <div class="payment-registration-row">
@ -534,7 +534,7 @@ import {listdeptNoAuth} from "@/api/system/department";
this.payment.map(item => { this.payment.map(item => {
total += Number(item.act_money) total += Number(item.act_money)
}) })
return ((total / this.contract.money) * 100).toFixed(2) || 0 return ((total / this.contract?.money??0) * 100).toFixed(2) || 0
}, },
async getRegistration(id) { async getRegistration(id) {
@ -542,6 +542,7 @@ import {listdeptNoAuth} from "@/api/system/department";
const res = await detailFundLog({ const res = await detailFundLog({
id id
}) })
console.log(res)
this.fileList = res.files_detail?.map(i => { this.fileList = res.files_detail?.map(i => {
return { return {
url: i?.url, url: i?.url,

@ -488,6 +488,7 @@ export default {
date: this.selectDate, date: this.selectDate,
status: this.status, status: this.status,
act_plan_link_id: this.select.plan_id, act_plan_link_id: this.select.plan_id,
show_type: 1
}).then((res) => { }).then((res) => {
let tokens = getToken(); let tokens = getToken();
if (is_export) { if (is_export) {

Loading…
Cancel
Save