|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button size="small" type="text" @click="onShow(dialogFormVisible = true)">明 细</el-button>
|
|
|
+<!-- <el-button size="small" type="text" @click="onShow(dialogFormVisible = true)">明 细</el-button>-->
|
|
|
<el-drawer
|
|
|
title="账户流水明细"
|
|
|
:visible.sync="dialogFormVisible"
|
|
|
@@ -46,10 +46,16 @@
|
|
|
<div v-if="scope.column.columnname === 'type'">
|
|
|
{{scope.column.data[[scope.column.columnname]] == '1' ? '收入':'支出'}}
|
|
|
</div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'amount'">
|
|
|
+ {{tool.formatAmount(scope.column.data[[scope.column.columnname]],2)}}
|
|
|
+ </div>
|
|
|
<div v-else>
|
|
|
{{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <el-button type="text" size="mini" @click="detailGo(scope.data)">详情</el-button>
|
|
|
+ </template>
|
|
|
</tableNewLayout>
|
|
|
<!-- <div class="container normal-panel" style="text-align:right">
|
|
|
<el-pagination
|
|
|
@@ -102,10 +108,11 @@ export default {
|
|
|
},
|
|
|
methods:{
|
|
|
onShow(){
|
|
|
+ /*this.$emit('detailId',this.hrid)*/
|
|
|
this.listData()
|
|
|
},
|
|
|
async listData(){
|
|
|
- this.param.content.hrid = this.hrid
|
|
|
+ this.param.content.hrid = this.$route.query.id
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data.rows
|
|
|
/*this.total = res.total
|
|
|
@@ -123,6 +130,8 @@ export default {
|
|
|
this.listData()
|
|
|
},
|
|
|
onClose(){
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ this.dialogFormVisible = false
|
|
|
this.param.content.where = {
|
|
|
"condition": "",
|
|
|
"begdate": "",
|
|
|
@@ -140,6 +149,48 @@ export default {
|
|
|
this.param.content.pageNumber = val
|
|
|
this.listData()
|
|
|
},
|
|
|
+ detailGo(row){
|
|
|
+ console.log(row)
|
|
|
+ if (row.type === '1'){
|
|
|
+ let route = this.$route
|
|
|
+ if (route.path !== '/salerIncomeDetail') {
|
|
|
+ this.oldRoute = {path:route.path,query:route.query}
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+ }
|
|
|
+ this.$store.dispatch('changeDetailDrawer',true)
|
|
|
+ this.$router.push({
|
|
|
+ path:'/salerIncomeDetail',
|
|
|
+ query:{
|
|
|
+ id:row.sa_hrcashbillid,
|
|
|
+ rowindex:row.rowindex
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ let route = this.$route
|
|
|
+ if (route.path !== '/salerExpenditureDetail') {
|
|
|
+ this.oldRoute = {path:route.path,query:route.query}
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+ }
|
|
|
+ this.$store.dispatch('changeDetailDrawer',true)
|
|
|
+ this.$router.push({
|
|
|
+ path:'/salerExpenditureDetail',
|
|
|
+ query:{
|
|
|
+ id:row.sa_hrcashbillid,
|
|
|
+ rowindex:row.rowindex
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async drawerGo(id){
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.param.content.hrid = id
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
+ this.list = res.data.rows
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.listData()
|
|
|
},
|
|
|
created() {
|
|
|
this.tablecols = this.tool.tabelCol(this.$route.name).accountDetailTable.tablecols
|