<template>
|
<div>
|
<el-dialog :visible.sync="dialogShow" :loading="loading" title="对账单详情" :close-on-click-modal="false" :modal-append-to-body="false">
|
<el-table size="mini" :data="tableData" border>
|
<el-table-column label="业务流水号" prop="business">
|
</el-table-column>
|
<el-table-column label="订单号" prop="orderId">
|
</el-table-column>
|
<el-table-column label="数据来源" prop="orderSource">
|
</el-table-column>
|
<el-table-column label="账单时间" width="160px" prop="acountDate">
|
</el-table-column>
|
<el-table-column label="账户类型" prop="acountType">
|
</el-table-column>
|
<!-- <el-table-column label="账户余额" prop="balance">
|
<template slot-scope="scope">
|
¥ {{scope.row.balance}}
|
</template>
|
</el-table-column> -->
|
<el-table-column label="账单收入" prop="income">
|
<template slot-scope="scope">
|
¥ {{scope.row.income}}
|
</template>
|
</el-table-column>
|
<el-table-column label="账单支出" prop="outgoings">
|
<template slot-scope="scope">
|
¥ {{scope.row.outgoings}}
|
</template>
|
</el-table-column>
|
<!-- <el-table-column label="交易号" prop="dealSn">
|
</el-table-column> -->
|
</el-table>
|
<div class="accountStatementText">对账单金额:¥ {{totalStatementAccount}}</div>
|
<div slot="footer" class="buttonPosition dialog-footer">
|
<el-button size="mini" @click="closeDialog()">关闭</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import BillingResources from '@/api/invoice/invoiceapi.js'
|
import orderSourceArr from '@/utils/constant/orderSourceArr'
|
export default {
|
props: ['show'],
|
watch: {
|
/**
|
* 监控外部显示变量变化
|
* 传递到dialog组件
|
*/
|
show: function (newShow, oldShow) {
|
this.dialogShow = newShow
|
},
|
/**
|
* 监控内部显示属性变化
|
* 传递到外部调用变量
|
*/
|
dialogShow: function (newDialogShow, oldDialogShow) {
|
this.$emit('update:show', newDialogShow)
|
}
|
},
|
data () {
|
return {
|
dialogShow: false,
|
tableData: [],
|
loading: false,
|
orderSourceArr,
|
totalStatementAccount: 0
|
}
|
},
|
methods: {
|
closeDialog () {
|
this.dialogShow = false
|
this.$emit('update:show', false)
|
},
|
// 查询对账单信息
|
async accountStatementInfo (orderId) {
|
try {
|
this.loading = true
|
const res = await BillingResources.queryStatementAccount(orderId)
|
if (res.code === '0') {
|
this.tableData = res.data
|
this.totalStatementAccount = 0
|
res.data.forEach(item => {
|
this.totalStatementAccount += item.income
|
})
|
this.loading = false
|
} else {
|
this.loading = false
|
}
|
} catch (error) {
|
this.loading = false
|
}
|
}
|
}
|
}
|
</script>
|
|
<style>
|
.accountStatementText{
|
text-align: right;
|
margin-top: 20px;
|
}
|
</style>
|