打印字段名更改

master
xy 2 years ago
parent 9e22890d57
commit 501aef2eda

@ -1,387 +1,387 @@
<template> <template>
<div> <div>
<xy-dialog :is-show.sync="isShow" title="付款登记编辑" type="form" v-if="form && id" :form="form" :rules="rules" <xy-dialog :is-show.sync="isShow" title="付款登记编辑" type="form" v-if="form && id" :form="form" :rules="rules"
@submit="editor"> @submit="editor">
<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">{{form.contract.supply}}</div> <div class="payment-registration-row-content">{{form.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">{{form.contract.name}}</div> <div class="payment-registration-row-content">{{form.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(form.contract.money)}} </div> <div class="payment-registration-row-content">{{moneyFormat(form.contract.money)}} </div>
</div> </div>
</template> </template>
<template v-slot:apply_money> <template v-slot:apply_money>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>申请付款金额 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>申请付款金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <div class="xy-table-item-content xy-table-item-price">
<el-input clearable placeholder="请填写付款金额" v-model="form.apply_money" style="width: 150px;" /> <el-input clearable placeholder="请填写付款金额" v-model="form.apply_money" style="width: 150px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:audit_money> <template v-slot:audit_money>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">审计金额 <div class="xy-table-item-label">审计金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <div class="xy-table-item-content xy-table-item-price">
<el-input clearable placeholder="请填写审计金额" v-model="contract_form.audit_money" style="width: 150px;" /> <el-input clearable placeholder="请填写审计金额" v-model="contract_form.audit_money" style="width: 150px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:act_money> <template v-slot:act_money>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>实际支付金额 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>实际支付金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <div class="xy-table-item-content xy-table-item-price">
<el-input disabled clearable placeholder="请填写实际支付金额" v-model="form.act_money" style="width: 150px;" /> <el-input disabled clearable placeholder="请填写实际支付金额" v-model="form.act_money" style="width: 150px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:discount_money> <template v-slot:discount_money>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>本期扣款金额 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>本期扣款金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <div class="xy-table-item-content xy-table-item-price">
<el-input clearable placeholder="请填写本期扣款金额" v-model="form.discount_money" style="width: 150px;" /> <el-input clearable placeholder="请填写本期扣款金额" v-model="form.discount_money" style="width: 150px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:type> <template v-slot:type>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>款项类型 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>款项类型
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select placeholder="选择款项类型或直接填写其他类型" v-model="form.type" style="width: 150px;" filterable allow-create <el-select placeholder="选择款项类型或直接填写其他类型" v-model="form.type" style="width: 150px;" filterable allow-create
clearable> clearable>
<el-option v-for="item in paymentType" :key="item" :label="item" :value="item"> <el-option v-for="item in paymentType" :key="item" :label="item" :value="item">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
</template> </template>
<template v-slot:is_end> <template v-slot:is_end>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px;"> <div class="xy-table-item-label" style="width: 200px;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为最后一笔 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为最后一笔
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-switch :value="form.is_end === 1" @change="e => e ? form.is_end = 1 : form.is_end = 0" /> <el-switch :value="form.is_end === 1" @change="e => e ? form.is_end = 1 : form.is_end = 0" />
<!-- @change="toggleSelection"--> <!-- @change="toggleSelection"-->
</div> </div>
</div> </div>
</template> </template>
<template v-slot:remark> <template v-slot:remark>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">备注 <div class="xy-table-item-label">备注
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-input type="textarea" clearable placeholder="进度款日期2022.6.8-2022.7.7" v-model="form.remark" <el-input type="textarea" clearable placeholder="进度款日期2022.6.8-2022.7.7" v-model="form.remark"
style="width: 300px;" /> style="width: 300px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:extraFormBottom v-if="false"> <template v-slot:extraFormBottom v-if="false">
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" /> <Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" />
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" <xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;"
ref="planTable" @select="selectPlan"> ref="planTable" @select="selectPlan">
<template v-slot:btns> <template v-slot:btns>
<el-table-column label="使用金额" header-align="center"> <el-table-column label="使用金额" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<Input :value="scope.row.use_money" @input="planInput($event,scope.row)" /> <Input :value="scope.row.use_money" @input="planInput($event,scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</xy-table> </xy-table>
<!-- <div style="display: flex;justify-content: flex-end;">--> <!-- <div style="display: flex;justify-content: flex-end;">-->
<!-- <Page :total="planTotal" show-elevator @on-change="pageChange"/>--> <!-- <Page :total="planTotal" show-elevator @on-change="pageChange"/>-->
<!-- </div>--> <!-- </div>-->
</template> </template>
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
moneyFormatter moneyFormatter
} from '@/utils' } from '@/utils'
import { import {
editorContract editorContract
} from "@/api/contract/contract"; } from "@/api/contract/contract";
import { import {
detailFundLog, detailFundLog,
editorFundLog editorFundLog
} from "@/api/paymentRegistration/fundLog" } from "@/api/paymentRegistration/fundLog"
import { import {
getBudget getBudget
} from "@/api/budget/budget"; } from "@/api/budget/budget";
import { import {
Message Message
} from "element-ui"; } from "element-ui";
export default { export default {
data() { data() {
return { return {
isShow: false, isShow: false,
id: '', id: '',
form: null, form: null,
paymentType: ["进度款", "结算款", "质保金"], paymentType: ["预付款","进度款", "结算款", "质保金"],
plansPageIndex: 1, plansPageIndex: 1,
planTotal: 0, planTotal: 0,
plans: [], plans: [],
contract_form: { contract_form: {
audit_money: 0 audit_money: 0
}, },
searchContent: "", searchContent: "",
planTable: [{ planTable: [{
sortable: false, sortable: false,
width: 36, width: 36,
type: 'selection' type: 'selection'
}, },
{ {
label: "分类", label: "分类",
prop: 'type', prop: 'type',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
switch (value) { switch (value) {
case 1: case 1:
return "部门预算" return "部门预算"
break; break;
case 2: case 2:
return "水务计划" return "水务计划"
break; break;
case 3: case 3:
return '补助经费' return '补助经费'
break; break;
case 4: case 4:
return '其他' return '其他'
break; break;
default: default:
return "未知" return "未知"
} }
} }
}, },
{ {
label: "名称", label: "名称",
prop: 'name', prop: 'name',
align: 'left' align: 'left'
}, },
{ {
label: "计划金额", label: "计划金额",
prop: 'money', prop: 'money',
align: 'right' align: 'right'
} }
], ],
rules: { rules: {
apply_money: [{ apply_money: [{
required: true, required: true,
message: "必填" message: "必填"
}, },
{ {
pattern: /^\d+(\.\d+)?$/, pattern: /^\d+(\.\d+)?$/,
message: '必须为数字' message: '必须为数字'
} }
], ],
act_money: [{ act_money: [{
required: true, required: true,
message: "必填" message: "必填"
}, },
{ {
pattern: /^\d+(\.\d+)?$/, pattern: /^\d+(\.\d+)?$/,
message: '必须为数字' message: '必须为数字'
} }
], ],
discount_money: [{ discount_money: [{
required: true, required: true,
message: "必填" message: "必填"
}, },
{ {
pattern: /^\d+(\.\d+)?$/, pattern: /^\d+(\.\d+)?$/,
message: '必须为数字' message: '必须为数字'
} }
], ],
type: [{ type: [{
required: true, required: true,
message: "必选" message: "必选"
}] }]
}, },
} }
}, },
methods: { methods: {
// //
planInput(e, row) { planInput(e, row) {
if (e <= (Number(row.money) - Number(row.use_money_total))) { if (e <= (Number(row.money) - Number(row.use_money_total))) {
row.useMoney = e row.useMoney = e
} else { } else {
Message({ Message({
type: 'warning', type: 'warning',
message: '使用金额大于剩余预算' message: '使用金额大于剩余预算'
}) })
row.useMoney = 0 row.useMoney = 0
} }
}, },
async getFundLog(id) { async getFundLog(id) {
this.id = id this.id = id
const res = await detailFundLog({ const res = await detailFundLog({
id id
}) })
this.form = res; this.form = res;
this.contract_form.audit_money=res.contract.audit_money; this.contract_form.audit_money=res.contract.audit_money;
console.log(this.form) console.log(this.form)
}, },
async getBudgets() { async getBudgets() {
let res = await getBudget({ let res = await getBudget({
name: this.searchContent, name: this.searchContent,
page_size: 10, page_size: 10,
page: this.plansPageIndex page: this.plansPageIndex
}) })
this.plans = res.list.data this.plans = res.list.data
this.planTotal = res.list.total this.planTotal = res.list.total
}, },
planPageChange(e) { planPageChange(e) {
this.plansPageIndex = e this.plansPageIndex = e
this.getBudgets() this.getBudgets()
}, },
editor() { editor() {
editorFundLog(this.form).then(res => { editorFundLog(this.form).then(res => {
this.$emit('success') this.$emit('success')
this.isShow = false this.isShow = false
// //
editorContract({ editorContract({
id: this.form.contract_id, id: this.form.contract_id,
audit_money: this.contract_form.audit_money audit_money: this.contract_form.audit_money
}).then(r => { }).then(r => {
Message({ Message({
type: 'success', type: 'success',
message: "操作成功" message: "操作成功"
}) })
}); });
}) })
}, },
async toggleSelection(e) { async toggleSelection(e) {
if (!e) { if (!e) {
return return
} }
await this.getBudgets() await this.getBudgets()
let plans = this.form.plan_link.map(item => { let plans = this.form.plan_link.map(item => {
return item.plan_id return item.plan_id
}) })
if (plans) { if (plans) {
plans.map((plan, index) => { plans.map((plan, index) => {
let list = this.plans.map(item => { let list = this.plans.map(item => {
return item.id return item.id
}) })
if (list.indexOf(plan) != -1) { if (list.indexOf(plan) != -1) {
this.plans[list.indexOf(plan)].use_money = this.form.plan_link[index].use_money this.plans[list.indexOf(plan)].use_money = this.form.plan_link[index].use_money
console.log(this.plans[list.indexOf(plan)]) console.log(this.plans[list.indexOf(plan)])
} }
}) })
this.plans.filter(plan => { this.plans.filter(plan => {
return plans.includes(plan.id) return plans.includes(plan.id)
}).map(row => { }).map(row => {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['planTable'].toggleRowSelection(row); this.$refs['planTable'].toggleRowSelection(row);
}) })
}) })
} else { } else {
this.$refs['planTable'].clearSelection(); this.$refs['planTable'].clearSelection();
} }
}, },
selectPlan(sel, row) { selectPlan(sel, row) {
if (sel) { if (sel) {
this.form.plan_link = sel.map(item => { this.form.plan_link = sel.map(item => {
return { return {
plan_id: item.id, plan_id: item.id,
use_money: item.useMoney, use_money: item.useMoney,
new_money: item.money new_money: item.money
} }
}) })
} else { } else {
this.form.plan_link = [] this.form.plan_link = []
} }
}, },
}, },
computed: { computed: {
moneyFormat() { moneyFormat() {
return function(money) { return function(money) {
return moneyFormatter(money) return moneyFormatter(money)
} }
} }
}, },
mounted() { mounted() {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.payment-registration { .payment-registration {
&-row { &-row {
display: flex; display: flex;
padding: 6px 0; padding: 6px 0;
&-title { &-title {
padding: 0 10px; padding: 0 10px;
} }
&-content {} &-content {}
} }
} }
.xy-table-item-label { .xy-table-item-label {
width: 140px; width: 140px;
} }
.xy-table-item-price { .xy-table-item-price {
position: relative; position: relative;
&::after { &::after {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
content: '(元)' content: '(元)'
} }
::v-deep .el-input__clear { ::v-deep .el-input__clear {
position: relative; position: relative;
right: 30px; right: 30px;
z-index: 2; z-index: 2;
} }
} }
.xy-table-item-price-wan { .xy-table-item-price-wan {
position: relative; position: relative;
&::after { &::after {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
content: '(万元)' content: '(万元)'
} }
::v-deep .el-input__clear { ::v-deep .el-input__clear {
position: relative; position: relative;
right: 46px; right: 46px;
z-index: 2; z-index: 2;
} }
} }
</style> </style>

@ -164,7 +164,7 @@ export default {
} }
} }
], ],
paymentType:["进度款","结算款","质保金"], paymentType:["预付款","进度款","结算款","质保金"],
isShow:false, isShow:false,
registrationId:"", registrationId:"",
paymentRegistrationForm:{ paymentRegistrationForm:{

@ -214,7 +214,7 @@
} }
} }
], ],
paymentType: ["进度款", "结算款", "质保金"], paymentType: ["预付款","进度款", "结算款", "质保金"],
isShowPaymentRegistration: false, isShowPaymentRegistration: false,
paymentRegistrationForm: { paymentRegistrationForm: {
applyMoney: "", applyMoney: "",

@ -1,279 +1,280 @@
<template> <template>
<div v-if="registration"> <div v-if="registration">
<xy-dialog title="打印预览" :is-show.sync="isShow" :width="70" @on-ok="print" ok-text=""> <xy-dialog title="打印预览" :is-show.sync="isShow" :width="70" @on-ok="print" ok-text="">
<template v-slot:normalContent> <template v-slot:normalContent>
<div class="print-table1" id="printtable1" ref="printtable"> <div class="print-table1" id="printtable1" ref="printtable">
<div class="print-table1-title">苏州市河道管理处资金划拨审批单</div> <div class="print-table1-title">苏州市河道管理处资金划拨审批单</div>
<div class="print-table1-grid"> <div class="print-table1-grid">
<div style="grid-area: tb1-1" class="print-table1-grid-top">项目名称<span <div style="grid-area: tb1-1" class="print-table1-grid-top">项目名称<span
style="font-weight: 600">{{registration.contract.name}}</span></div> style="font-weight: 600">{{registration.contract.name}}</span></div>
<div style="grid-area: tb1-2;justify-content: center;align-items: center;flex-direction: column;"> <div style="grid-area: tb1-2;justify-content: center;align-items: center;flex-direction: column;">
<div>本次为第 <span style="font-weight: 600;padding: 0 1vw;">{{payIndex}}</span> 次付款</div> <div>本次为第 <span style="font-weight: 600;padding: 0 1vw;">{{payIndex}}</span> 次付款</div>
<div>{{registration.remark}}</div> <div>{{registration.remark}}</div>
</div> </div>
<div style="grid-area: tb2-1" class="print-table1-grid-top">承包商/供货商<span <div style="grid-area: tb2-1" class="print-table1-grid-top">承包商/供货商<span
style="font-weight: 600">{{registration.contract.supply}}</span></div> style="font-weight: 600">{{registration.contract.supply}}</span></div>
<div style="grid-area: tb2-2" class="print-table1-grid-top">合同服务时间<span <div style="grid-area: tb2-2" class="print-table1-grid-top">合同服务时间<span
style="font-weight: 600">{{registration.contract.start_date}} - style="font-weight: 600">{{registration.contract.start_date}} -
{{registration.contract.end_date}}</span></div> {{registration.contract.end_date}}</span></div>
<div style="grid-area: tb3-1" class="print-table1-grid-title1">付款情形</div> <div style="grid-area: tb3-1" class="print-table1-grid-title1">付款情形</div>
<div style="grid-area: tb3-2" class="print-table1-grid-title1">金额单位</div> <div style="grid-area: tb3-2" class="print-table1-grid-title1">金额单位</div>
<div style="grid-area: tb3-3" class="print-table1-grid-title1">备注</div> <div style="grid-area: tb3-3" class="print-table1-grid-title1">备注</div>
<div style="grid-area: tb4-1" class="print-table1-grid-center">A</div> <div style="grid-area: tb4-1" class="print-table1-grid-center">A</div>
<div style="grid-area: tb4-2" class="print-table1-grid-center">合同金额</div> <div style="grid-area: tb4-2" class="print-table1-grid-center">合同金额</div>
<div style="grid-area: tb4-3" class="print-table1-grid-center">{{priceFormat(registration.contract.money)}} <div style="grid-area: tb4-3" class="print-table1-grid-center">{{priceFormat(registration.contract.money)}}
</div> </div>
<div style="grid-area: tb4-4"></div> <div style="grid-area: tb4-4"></div>
<div style="grid-area: tb5-1" class="print-table1-grid-center">B</div> <div style="grid-area: tb5-1" class="print-table1-grid-center">B</div>
<div style="grid-area: tb5-2" class="print-table1-grid-center">审计金额</div> <div style="grid-area: tb5-2" class="print-table1-grid-center">审计金额</div>
<div style="grid-area: tb5-3" class="print-table1-grid-center">{{priceFormat(registration.contract.audit_money)}}</div> <div style="grid-area: tb5-3" class="print-table1-grid-center">{{priceFormat(registration.contract.audit_money)}}</div>
<div style="grid-area: tb5-4"></div> <div style="grid-area: tb5-4"></div>
<div style="grid-area: tb6-1" class="print-table1-grid-center">C</div> <div style="grid-area: tb6-1" class="print-table1-grid-center">C</div>
<div style="grid-area: tb6-2" class="print-table1-grid-center">前期累计已支付</div> <div style="grid-area: tb6-2" class="print-table1-grid-center">前期累计已付款</div>
<div style="grid-area: tb6-3" class="print-table1-grid-center">{{priceFormat(registration.total_act_money)}} <div style="grid-area: tb6-3" class="print-table1-grid-center">{{priceFormat(registration.total_act_money)}}
</div> </div>
<div style="grid-area: tb6-4"></div> <div style="grid-area: tb6-4"></div>
<div style="grid-area: tb7-1" class="print-table1-grid-center">D</div> <div style="grid-area: tb7-1" class="print-table1-grid-center">D</div>
<div style="grid-area: tb7-2" class="print-table1-grid-center">本期扣款</div> <div style="grid-area: tb7-2" class="print-table1-grid-center">本期扣款</div>
<div style="grid-area: tb7-3" class="print-table1-grid-center">{{priceFormat(registration.discount_money)}} <div style="grid-area: tb7-3" class="print-table1-grid-center">{{priceFormat(registration.discount_money)}}
</div> </div>
<div style="grid-area: tb7-4"></div> <div style="grid-area: tb7-4"></div>
<div style="grid-area: tb8-1" class="print-table1-grid-center">E</div> <div style="grid-area: tb8-1" class="print-table1-grid-center">E</div>
<div style="grid-area: tb8-2;font-weight: 600" class="print-table1-grid-center">本期应付款</div> <div style="grid-area: tb8-2;font-weight: 600" class="print-table1-grid-center">本期应付款</div>
<div style="grid-area: tb8-3;font-weight: 600" class="print-table1-grid-center"> <div style="grid-area: tb8-3;font-weight: 600" class="print-table1-grid-center">
{{priceFormat(registration.apply_money)}}</div> {{priceFormat(registration.apply_money)}}</div>
<div style="grid-area: tb8-4;padding-left: 0.6vw;display: block;"> <div style="grid-area: tb8-4;padding-left: 0.6vw;display: block;">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<div><span v-if="registration.type == '进度款'"></span></div> <div><span v-if="registration.type == '预付款'"></span></div>
<div style="padding-left: 2vw"><span v-if="registration.type == '结算款'"></span></div> <div style="padding-left: 1.6vw"><span v-if="registration.type == '进度款'"></span></div>
</div> <div style="padding-left: 1.6vw"><span v-if="registration.type == '结算款'"></span></div>
<div style="display: flex;align-items: center;"> </div>
<div><span v-if="registration.type == '质保金'"></span></div> <div style="display: flex;align-items: center;">
<div <div><span v-if="registration.type == '质保金'"></span></div>
style="height: 1.8vw;min-width: 6vw;border-bottom: 2px #000 solid;margin-left: 2vw;font-size: 15px;"> <div
<span v-if="registration.type!='进度款'&&registration.type!='质保金'&&registration.type!='结算款'"> style="height: 1.8vw;min-width: 6vw;border-bottom: 2px #000 solid;margin-left: 2vw;font-size: 15px;">
{{registration.type}} </span> <span v-if="registration.type!='进度款'&&registration.type!='质保金'&&registration.type!='结算款'">
</div> {{registration.type}} </span>
<div>其他</div> </div>
</div> <div>其他</div>
</div> </div>
<div style="grid-area: tb9-1" class="print-table1-grid-center">F</div> </div>
<div style="grid-area: tb9-2" class="print-table1-grid-center">累计支付</div> <div style="grid-area: tb9-1" class="print-table1-grid-center">F</div>
<div style="grid-area: tb9-3" class="print-table1-grid-center"> <div style="grid-area: tb9-2" class="print-table1-grid-center">累计支付</div>
{{priceFormat(Number(registration.total_act_money)+Number(registration.apply_money))}}</div> <div style="grid-area: tb9-3" class="print-table1-grid-center">
<div style="grid-area: tb9-4"></div> {{priceFormat(Number(registration.total_act_money)+Number(registration.apply_money))}}</div>
<div style="grid-area: tb10-1" class="print-table1-grid-center">G</div> <div style="grid-area: tb9-4"></div>
<div style="grid-area: tb10-2" class="print-table1-grid-center">累计扣款</div> <div style="grid-area: tb10-1" class="print-table1-grid-center">G</div>
<div style="grid-area: tb10-3" class="print-table1-grid-center"> <div style="grid-area: tb10-2" class="print-table1-grid-center">累计扣款</div>
{{priceFormat(Number(registration.total_discount_money)+Number(registration.discount_money))}}</div> <div style="grid-area: tb10-3" class="print-table1-grid-center">
<div style="grid-area: tb10-4"></div> {{priceFormat(Number(registration.total_discount_money)+Number(registration.discount_money))}}</div>
<div style="grid-area: tb11-1" class="print-table1-grid-center">H</div> <div style="grid-area: tb10-4"></div>
<div style="grid-area: tb11-2" class="print-table1-grid-center">质保金</div> <div style="grid-area: tb11-1" class="print-table1-grid-center">H</div>
<div style="grid-area: tb11-3;align-items: center;"> <div style="grid-area: tb11-2" class="print-table1-grid-center">质保金</div>
{{guaranteeRate(registration.contract.guarantee_money,registration.contract.money,registration.contract.audit_money)}}%质保期{{registration.contract.guarantee_year}}需审计的以审计价为计费依据 <div style="grid-area: tb11-3;align-items: center;">
</div> {{guaranteeRate(registration.contract.guarantee_money,registration.contract.money,registration.contract.audit_money)}}%质保期{{registration.contract.guarantee_year}}需审计的以审计价为计费依据
</div>
<div style="grid-area: tb12" class="print-table1-grid-bottom1">
资金列支渠道{{moneyWayFormat(registration.money_way_detail)}} <div style="grid-area: tb12" class="print-table1-grid-bottom1">
</div> 资金列支渠道{{moneyWayFormat(registration.money_way_detail)}}
</div>
<div style="grid-area: tb13-1;" class="print-table1-grid-bottom2">
<div> <div style="grid-area: tb13-1;" class="print-table1-grid-bottom2">
<div>业务科室</div> <div>
<div style="padding-top: 1vw;"> 经办人</div> <div>业务科室</div>
</div> <div style="padding-top: 1vw;"> 经办人</div>
</div> </div>
<div style="grid-area: tb13-2" class="print-table1-grid-bottom2">科室负责人</div> </div>
<div style="grid-area: tb13-3" class="print-table1-grid-bottom2">业务科室分管领导</div> <div style="grid-area: tb13-2" class="print-table1-grid-bottom2">业务科室负责人</div>
<div style="grid-area: tb14-1;" class="print-table1-grid-bottom3">财审科</div> <div style="grid-area: tb13-3" class="print-table1-grid-bottom2">业务科室分管领导</div>
<div style="grid-area: tb14-2;" class="print-table1-grid-bottom3">财审科分管领导</div> <div style="grid-area: tb14-1;" class="print-table1-grid-bottom3">财务审计科</div>
<div style="grid-area: tb14-3;" class="print-table1-grid-bottom3">单位负责人</div> <div style="grid-area: tb14-2;" class="print-table1-grid-bottom3">财务审计科分管领导</div>
</div> <div style="grid-area: tb14-3;" class="print-table1-grid-bottom3">单位负责人</div>
</div>
<div style="text-align: right;padding-top: 0.3vw;font-size: 1.5vw;">
打印时间{{new Date().getFullYear()}}.{{new Date().getMonth()+1}}.{{new Date().getDate()}}</div> <div style="text-align: right;padding-top: 0.3vw;font-size: 1.5vw;">
</div> 打印时间{{new Date().getFullYear()}}.{{new Date().getMonth()+1}}.{{new Date().getDate()}}</div>
</template> </div>
</xy-dialog> </template>
</xy-dialog>
</div>
</template> </div>
</template>
<script>
import { <script>
detailFundLog, import {
getFundLog detailFundLog,
} from "@/api/paymentRegistration/fundLog" getFundLog
} from "@/api/paymentRegistration/fundLog"
import html2canvas from 'html2canvas'
import * as printJS from "print-js"; import html2canvas from 'html2canvas'
import { import * as printJS from "print-js";
parseTime, import {
moneyRecovery parseTime,
} from "@/utils"; moneyRecovery
} from "@/utils";
export default {
data() { export default {
return { data() {
isShow: false, return {
registration: null, isShow: false,
beforeTotalMoney: 0, registration: null,
payIndex: 1, beforeTotalMoney: 0,
} payIndex: 1,
}, }
methods: { },
moneyWayFormat(arr) { methods: {
let res = arr.map(item => { moneyWayFormat(arr) {
return item.value let res = arr.map(item => {
}) return item.value
return res.toString() })
}, return res.toString()
},
guaranteeRate(gua, money, auditmoney) { guaranteeRate(gua, money, auditmoney) {
let _money = money; let _money = money;
if(auditmoney&&auditmoney>0) _money=auditmoney; if(auditmoney&&auditmoney>0) _money=auditmoney;
if (gua && _money) return ((moneyRecovery(gua) / _money) * 100).toFixed(2) if (gua && _money) return ((moneyRecovery(gua) / _money) * 100).toFixed(2)
}, },
async getDetailFundLog(id) { async getDetailFundLog(id) {
let res = await detailFundLog({ let res = await detailFundLog({
id id
}) })
this.registration = res this.registration = res
let res1 = await getFundLog({ let res1 = await getFundLog({
page_size: 999, page_size: 999,
contract_id: this.registration.contract.id contract_id: this.registration.contract.id
}) })
if (res1.data.length > 0) { if (res1.data.length > 0) {
res1.data.map(item => { res1.data.map(item => {
this.beforeTotalMoney += Number(item.act_money) this.beforeTotalMoney += Number(item.act_money)
}) })
this.beforeTotalMoney -= Number(this.registration.act_money) this.beforeTotalMoney -= Number(this.registration.act_money)
} else { } else {
this.beforeTotalMoney = 0 this.beforeTotalMoney = 0
} }
let nowIndex = res?.id let nowIndex = res?.id
let idList = res1.data.map(item => { let idList = res1.data.map(item => {
return item.id return item.id
}) })
// //
idList.sort((a, b) => { idList.sort((a, b) => {
return a - b; return a - b;
}) })
console.log("nowIndex", nowIndex) console.log("nowIndex", nowIndex)
console.log("idList", idList) console.log("idList", idList)
this.payIndex = idList.indexOf(nowIndex) + 1 this.payIndex = idList.indexOf(nowIndex) + 1
}, },
async print() { async print() {
let canvas = await html2canvas(this.$refs['printtable'], { let canvas = await html2canvas(this.$refs['printtable'], {
backgroundColor: null, backgroundColor: null,
useCORS: true, useCORS: true,
}) })
printJS({ printJS({
printable: canvas.toDataURL(), printable: canvas.toDataURL(),
type: 'image', type: 'image',
documentTitle: '苏州市河道管理处资金划拨审批单', documentTitle: '苏州市河道管理处资金划拨审批单',
style: '@page{margin:auto;}' style: '@page{margin:auto;}'
}) })
} }
}, },
computed: { computed: {
dateFormat() { dateFormat() {
return function(date) { return function(date) {
return parseTime(new Date(date)) return parseTime(new Date(date))
} }
}, },
priceFormat() { priceFormat() {
return function(price) { return function(price) {
return Number(price).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return Number(price).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.print-table1 { .print-table1 {
box-sizing: border-box; box-sizing: border-box;
&-title { &-title {
font-size: 2vw; font-size: 2vw;
letter-spacing: 2px; letter-spacing: 2px;
text-align: center; text-align: center;
font-weight: 600; font-weight: 600;
border: none; border: none;
padding: 1.6vw 0; padding: 1.6vw 0;
} }
&-grid { &-grid {
font-size: 1.75vw; font-size: 1.75vw;
border: 1px #000 solid; border: 1px #000 solid;
display: grid; display: grid;
grid-template-rows: repeat(14, auto); grid-template-rows: repeat(14, auto);
grid-template-columns: repeat(6, 1fr); grid-template-columns: repeat(6, 1fr);
grid-template-areas: grid-template-areas:
"tb1-1 tb1-1 tb1-1 tb1-2 tb1-2 tb1-2" "tb1-1 tb1-1 tb1-1 tb1-2 tb1-2 tb1-2"
"tb2-1 tb2-1 tb2-1 tb2-2 tb2-2 tb2-2" "tb2-1 tb2-1 tb2-1 tb2-2 tb2-2 tb2-2"
"tb3-1 tb3-1 tb3-2 tb3-2 tb3-3 tb3-3" "tb3-1 tb3-1 tb3-2 tb3-2 tb3-3 tb3-3"
"tb4-1 tb4-2 tb4-3 tb4-3 tb4-4 tb4-4" "tb4-1 tb4-2 tb4-3 tb4-3 tb4-4 tb4-4"
"tb5-1 tb5-2 tb5-3 tb5-3 tb5-4 tb5-4" "tb5-1 tb5-2 tb5-3 tb5-3 tb5-4 tb5-4"
"tb6-1 tb6-2 tb6-3 tb6-3 tb6-4 tb6-4" "tb6-1 tb6-2 tb6-3 tb6-3 tb6-4 tb6-4"
"tb7-1 tb7-2 tb7-3 tb7-3 tb7-4 tb7-4" "tb7-1 tb7-2 tb7-3 tb7-3 tb7-4 tb7-4"
"tb8-1 tb8-2 tb8-3 tb8-3 tb8-4 tb8-4" "tb8-1 tb8-2 tb8-3 tb8-3 tb8-4 tb8-4"
"tb9-1 tb9-2 tb9-3 tb9-3 tb9-4 tb9-4" "tb9-1 tb9-2 tb9-3 tb9-3 tb9-4 tb9-4"
"tb10-1 tb10-2 tb10-3 tb10-3 tb10-4 tb10-4" "tb10-1 tb10-2 tb10-3 tb10-3 tb10-4 tb10-4"
"tb11-1 tb11-2 tb11-3 tb11-3 tb11-3 tb11-3" "tb11-1 tb11-2 tb11-3 tb11-3 tb11-3 tb11-3"
"tb12 tb12 tb12 tb12 tb12 tb12" "tb12 tb12 tb12 tb12 tb12 tb12"
"tb13-1 tb13-1 tb13-2 tb13-2 tb13-3 tb13-3" "tb13-1 tb13-1 tb13-2 tb13-2 tb13-3 tb13-3"
"tb14-1 tb14-1 tb14-2 tb14-2 tb14-3 tb14-3"; "tb14-1 tb14-1 tb14-2 tb14-2 tb14-3 tb14-3";
&>div { &>div {
border: 1px #000 solid; border: 1px #000 solid;
display: flex; display: flex;
} }
&-top { &-top {
padding: 0.4vw 0 3.6vw 0.4vw; padding: 0.4vw 0 3.6vw 0.4vw;
} }
&-title1 { &-title1 {
text-align: center; text-align: center;
justify-content: center; justify-content: center;
padding: 0.2vw 0; padding: 0.2vw 0;
} }
&-center { &-center {
text-align: center; text-align: center;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 1vw 0; padding: 1vw 0;
} }
&-bottom1 { &-bottom1 {
padding: 0.4vw 0 4vw 0.4vw; padding: 0.4vw 0 4vw 0.4vw;
} }
&-bottom2 { &-bottom2 {
padding: 0.4vw 0 4vw 0.4vw; padding: 0.4vw 0 4vw 0.4vw;
} }
&-bottom3 { &-bottom3 {
padding: 0.4vw 0 6vw 0.4vw; padding: 0.4vw 0 6vw 0.4vw;
} }
} }
} }
</style> </style>

@ -234,7 +234,7 @@
} }
} }
], ],
paymentType: ["进度款", "结算款", "质保金"], paymentType: ["预付款","进度款", "结算款", "质保金"],
isShow: false, isShow: false,
registrationId: "", registrationId: "",
paymentRegistrationForm: { paymentRegistrationForm: {

Loading…
Cancel
Save