<template>
	<div>
		<base-dialog :dialogVisible.sync="dialogVisible" :closeModal="false" :footerShow="true" :title="'查看分录信息'"
			width="800px" top="15vh">
			<div class="rightDialogClass_main" style="background-color: #fff;">
				<base-table ref="assistTable" :showIndex="false" :slotrow="false" tableHeight="calc(60vh - 80px)"
					:tableData="tableData" :tableColumn="tableColumn" id="printMe">

				</base-table>

			</div>
		</base-dialog>
	</div>
</template>

<script>
	import baseDialog from '@/components/base/BaseNewDialog/index.vue'
	import baseTable from '@/components/base/baseTable/index.vue'
	import {queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher'
	export default {
		components: {
			baseDialog,
			baseTable
		},
		data() {
			return {
				dialogVisible: false,
				tableData: [],
				tableColumn: [{
						label: '摘要',
						prop: 'abstractStr'
					},
					{
						label: '会计科目',
						prop: 'subjdispname'
					},
					{
						label: '辅助核算',
						prop: 'assist'
					},
					{
						label: '币种编码',
						prop: 'currencyCode'
					},
					{
						label: '币种名称',
						prop: 'currencyName'
					},
					{
						label: '借方原币',
						prop: 'jybSum'
					},
					{
						label: '借方本币',
						prop: 'jbbSum'
					},
					{
						label: '贷方原币',
						prop: 'dybSum'
					},
					{
						label: '贷方本币',
						prop: 'dbbSum'
					},
				]
			}
		},
		methods: {
			async openDialog(row) {
				this.dialogVisible = true
				let res = await queryDetailsByBillCodeAPI({
					id: row.id
				})
				this.tableData = res.attribute
			}
		}
	}
</script>

<style>
</style>
