VUE 记账凭证模块组件的示例代码

 更新时间:2022年03月01日 17:07:27   作者:画画520  
这篇文章主要介绍了VUE记账凭证模块组件的实例代码,代码简单易懂,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

效果如下所示:

<template>
	<div class="voucher-container">
		<div class="voucher_header">
			<div class="voucher_header_title">记账凭证</div>
			<div class="voucher_header_number">单据号: {{voucher.numberId}}</div>
		</div>
		<table class="voucher" cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th class="voucher_summary">摘要</th>
					<th class="voucher_subject">会计科目</th>
					<th class="voucher_money">
						<strong class="voucher_title">借方金额</strong>
						<div class="voucher_column voucher_unit">
							<span>亿</span>
							<span>千</span>
							<span>百</span>
							<span>十</span>
							<span>万</span>
							<span>元</span>
							<span>角</span>
							<span class="voucher_last">分</span>
						</div>
					</th>
						<strong class="voucher_title">贷方金额</strong>
				</tr>
			</thead>
			<tbody>
				<tr class="voucher_item" v-for="(item) in voucher.items" :key="item.id">
					<td class="voucher_summary">{{item.summart}}</td>
					<td class="voucher_subject">{{item.subject}}</td>
					<td class="voucher_debite">
						<div class="voucher_number"><money-format :number="item.debite"></money-format></div>
					</td>
					<td class="voucher_credit">
						<div class="voucher_number"><money-format :number="item.credit"></money-format></div>
			</tbody>
			<tfoot>
					<td class="voucher_total" colspan="2">
						合计:
						<money-format :number="voucher.total" :chinese="true"></money-format>
						<div class="voucher_number"><money-format :number="voucher.debite" :colour="true"></money-format></div>
						<div class="voucher_number"><money-format :number="voucher.credit" :colour="true"></money-format></div>
			</tfoot>
		</table>
		<div class="voucher_footer">制单人:{{voucher.bookkeeper}}</div>
	</div>
</template>
<script>
import MoneyFormat from './MoneyFormat';
export default {
	name: 'Voucher',
	props: {
		voucher: {
			type: Object,
		}
	},
	components: {
		MoneyFormat
	}
};
</script>
<style lang="less" rel="stylesheet/less">
.voucher-container {
	height: 100%;
	width: 100%;
	overflow: hidden;
	margin: 0.625rem;
	padding: 0;
}
.voucher_header {
	padding-top: 20px;
	margin-bottom: 10px;
.voucher_header_title {
	float: left;
	display: inline;
	margin: -20px 130px 0px 100px;
	font: 28px/1.8 'Microsoft Yahei';
	text-align: center;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
.voucher_header_number {
	text-align: left;
	margin-left: 120px;
.voucher_footer {
	margin: 10px;
	font-weight: bold;
.voucher {
	border-collapse: collapse;
	th,
	td {
		border: 1px solid #ccc;
		height: 35px;
	th {
		height: 48px;
		color: #555555;
		font-size: 14px;
		text-align: center;
		font-weight: bold;
		overflow: hidden;
	.voucher_title {
		display: block;
		height: 25px;
		line-height: 25px;
	.voucher_last {
		margin-right: 0;
		width: 18px;
	.voucher_money {
		font-size: 12px;
		min-width: 221px;
		span {
			float: left;
			display: inline;
			width: 19px;
			height: 100%;
			margin-right: 1px;
	.voucher_column,
	.voucher_credit,
	.voucher_debite {
		background-image: url(../assets/image/money_column.png);
		background-repeat: repeat-y;
	.voucher_summary {
		min-width: 6.25rem;
		word-break: break-all;
		word-wrap: break-word;
	.voucher_subject {
	.voucher_unit {
		height: 22px;
		line-height: 22px;
		font-weight: normal;
		border-top: 1px solid #dadada;
	.voucher_total {
		letter-spacing: 1px;
	.voucher_number {
		position: relative;
		font-family: 'tahoma';
		letter-spacing: 11px;
		text-align: right;
		right: -5px;
	.voucher_item {
</style>

到此这篇关于VUE 记账凭证模块组件的示例代码的文章就介绍到这了,更多相关vue记账凭证内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • el-table实现搜索高亮展示并滚动到元素位置的操作代码

    el-table实现搜索高亮展示并滚动到元素位置的操作代码

    这篇文章主要介绍了el-table实现搜索高亮展示并滚动到元素位置,本文通过示例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧
    2024-01-01
  • 在 vue-cli v3.0 中使用 SCSS/SASS的方法

    在 vue-cli v3.0 中使用 SCSS/SASS的方法

    关于如何在 vue-cli v3.0 中使用 SCSS/SASS,这里提供三种方案。感兴趣的朋友通过本文一起学习吧
    2018-06-06
  • Vue2.0 ES6语法降级ES5的操作

    Vue2.0 ES6语法降级ES5的操作

    这篇文章主要介绍了Vue2.0 ES6语法降级ES5的操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2020-10-10
  • VueX模块的具体使用(小白教程)

    VueX模块的具体使用(小白教程)

    这篇文章主要介绍了VueX模块的具体使用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2020-06-06
  • VUE DEMO之模拟登录个人中心页面之间数据传值实例

    VUE DEMO之模拟登录个人中心页面之间数据传值实例

    今天小编就为大家分享一篇VUE DEMO之模拟登录个人中心页面之间数据传值实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2019-10-10
  • Vue 使用postMessage 实现父子跨域通信

    Vue 使用postMessage 实现父子跨域通信

    这篇文章主要介绍了Vue应用 postMessage 实现父子跨域通信,通过示例介绍了postMessage的使用,本文结合示例代码给大家介绍的非常详细,需要的朋友可以参考下
    2022-12-12
  • Vue项目从webpack3.x升级webpack4不完全指南

    Vue项目从webpack3.x升级webpack4不完全指南

    前段时间,泡面将自己的一个Vue-cli构建的前端框架从webpack3.x升级到了4.x版本,现在才拉出来记录一下,已备忘之用,也和大家分享一下,需要的朋友可以参考下
    2019-04-04
  • Vue实现virtual-dom的原理简析

    Vue实现virtual-dom的原理简析

    这篇文章主要介绍了Vue实现virtual-dom的原理简析,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
    2017-07-07
  • elementUI同一页面展示多个Dialog的实现

    elementUI同一页面展示多个Dialog的实现

    这篇文章主要介绍了elementUI同一页面展示多个Dialog的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2020-11-11
  • Vue进阶之利用transition标签实现页面跳转动画

    Vue进阶之利用transition标签实现页面跳转动画

    这篇文章主要为大家详细介绍了Vue如何利用transition标签实现页面跳转动画,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起一下
    2023-08-08

最新评论