打印字段名更改

master
xy 2 years ago
parent 9e22890d57
commit 501aef2eda

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

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

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

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

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

Loading…
Cancel
Save