Commit 72b977bd by wangyalan-git

余额审核/会员管理页面添加余额详情

parent 7ab587ee
...@@ -24,9 +24,12 @@ ...@@ -24,9 +24,12 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
icon="el-icon-detail"
@click="addOrUpdateHandle(scope.row.id,false)">详情</el-button> @click="addOrUpdateHandle(scope.row.id,false)">详情</el-button>
<el-button <el-button
type="success"
size="small"
@click="viewBalance(scope.row.userId)">余额</el-button>
<el-button
v-if="!scope.row.applyStatus" v-if="!scope.row.applyStatus"
type="primary" type="primary"
size="small" size="small"
...@@ -40,18 +43,21 @@ ...@@ -40,18 +43,21 @@
<add-or-update v-if="addOrUpdateVisible" <add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update> @refreshDataList="getDataList"></add-or-update>
<view-balance v-if="viewBalanceVisible"
ref="viewBalance"></view-balance>
</div> </div>
</template> </template>
<script> <script>
import { tableOption } from '@/crud/order/audit' import { tableOption } from '@/crud/order/audit'
import AddOrUpdate from './audit-add-or-update' import AddOrUpdate from './audit-add-or-update'
import ViewBalance from '../user/view-balance'
export default { export default {
data () { data () {
return { return {
dataForm: { dataForm: {
}, },
viewBalanceVisible: false,
dataList: [], dataList: [],
page: { page: {
total: 0, // 总页数 total: 0, // 总页数
...@@ -65,7 +71,8 @@ export default { ...@@ -65,7 +71,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate AddOrUpdate,
ViewBalance
}, },
filters:{ filters:{
filterStatus(data){ filterStatus(data){
...@@ -149,7 +156,13 @@ export default { ...@@ -149,7 +156,13 @@ export default {
}, },
refreshChange () { refreshChange () {
this.getDataList(this.page) this.getDataList(this.page)
} },
viewBalance(id){
this.viewBalanceVisible = true
this.$nextTick(() => {
this.$refs.viewBalance.init(id)
})
},
} }
} }
</script> </script>
<template> <template>
<div class="mod-user"> <div class="mod-user">
<avue-crud ref="crud" <avue-crud ref="crud"
:page="page" :page="page"
:data="dataList" :data="dataList"
:option="tableOption" :option="tableOption"
@search-change="searchChange" @search-change="searchChange"
@selection-change="selectionChange" @selection-change="selectionChange"
@on-load="getDataList"> @on-load="getDataList">
<template slot="menuLeft"> <template slot="menuLeft">
<el-button type="danger" <el-button type="danger"
@click="deleteHandle()" @click="deleteHandle()"
v-if="isAuth('admin:user:delete')" v-if="isAuth('admin:user:delete')"
size="small" size="small"
:disabled="dataListSelections.length <= 0">批量删除</el-button> :disabled="dataListSelections.length <= 0">批量删除</el-button>
</template> </template>
<template slot-scope="scope" <template slot-scope="scope"
slot="status"> slot="status">
<el-tag v-if="scope.row.status === 0" <el-tag v-if="scope.row.status === 0"
size="small" size="small"
type="danger">禁用</el-tag> type="danger">禁用</el-tag>
<el-tag v-else <el-tag v-else
size="small">正常</el-tag> size="small">正常</el-tag>
</template> </template>
<template slot-scope="scope" <template slot-scope="scope"
slot="menu"> slot="menu">
<el-button type="primary" <el-button type="primary"
icon="el-icon-edit" icon="el-icon-edit"
size="small" size="small"
v-if="isAuth('admin:user:update')" v-if="isAuth('admin:user:update')"
@click.stop="addOrUpdateHandle(scope.row.userId)">编辑</el-button> @click.stop="addOrUpdateHandle(scope.row.userId)">编辑</el-button>
<el-button type="primary"
icon="el-icon-user"
size="small"
@click.stop="viewBalance(scope.row.userId)">查看余额</el-button>
<el-button type="danger" <el-button type="danger"
icon="el-icon-delete" icon="el-icon-delete"
size="small" size="small"
v-if="isAuth('admin:user:delete')" v-if="isAuth('admin:user:delete')"
@click.stop="deleteHandle(scope.row.userId)">删除</el-button> @click.stop="deleteHandle(scope.row.userId)">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" <add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update> @refreshDataList="getDataList"></add-or-update>
</div> <view-balance v-if="viewBalanceVisible"
ref="viewBalance"></view-balance>
</div>
</template> </template>
<script> <script>
import { tableOption } from '@/crud/user/user' import { tableOption } from '@/crud/user/user'
import AddOrUpdate from './user-add-or-update' import AddOrUpdate from './user-add-or-update'
import ViewBalance from './view-balance'
export default { export default {
data () { data () {
return { return {
...@@ -57,6 +64,7 @@ export default { ...@@ -57,6 +64,7 @@ export default {
dataListLoading: false, dataListLoading: false,
dataListSelections: [], dataListSelections: [],
addOrUpdateVisible: false, addOrUpdateVisible: false,
viewBalanceVisible: false,
tableOption: tableOption, tableOption: tableOption,
page: { page: {
total: 0, // 总页数 total: 0, // 总页数
...@@ -66,7 +74,8 @@ export default { ...@@ -66,7 +74,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate AddOrUpdate,
ViewBalance
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表
...@@ -97,6 +106,12 @@ export default { ...@@ -97,6 +106,12 @@ export default {
this.$refs.addOrUpdate.init(id) this.$refs.addOrUpdate.init(id)
}) })
}, },
viewBalance(id){
this.viewBalanceVisible = true
this.$nextTick(() => {
this.$refs.viewBalance.init(id)
})
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment