Files
cai-ui/src/views/cai/accountChangeLog/index.vue
dute7liang c084e9f849 init
2024-01-05 23:23:37 +08:00

147 lines
4.7 KiB
Vue

<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="蜜瓜号" prop="usercode">
<el-input
v-model="queryParams.usercode"
placeholder="请输入蜜瓜号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账户类型" prop="accountType">
<el-select v-model="queryParams.accountType" placeholder="账户类型" clearable size="small">
<el-option
v-for="dict in accountTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="业务操作" prop="cateId">
<el-select v-model="queryParams.cateId" placeholder="业务操作" clearable size="small">
<el-option
v-for="dict in changeTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountChangeLogList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="蜜瓜号" align="center" prop="usercode" />
<el-table-column label="账户类型" align="center" prop="accountType" >
<template v-slot="scope">
<cai-dict-tag :options="accountTypeList" :value="scope.row.accountType"/>
</template>
</el-table-column>
<el-table-column label="业务操作" align="center" prop="cateAdminName" />
<el-table-column label="客户显示" align="center" prop="cateAppName" />
<el-table-column label="变动" align="center" prop="changeValue" />
<el-table-column label="说明" align="center" prop="remark" />
<el-table-column label="后台操作" align="center" prop="isAdmin" >
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAdmin"/>
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listAccountChangeLog, listChangeType} from "@/api/cai/accountChangeLog";
import {accountTypeList, yesOrNoList} from "@/constant/statusMap";
export default {
name: "AccountChangeLog",
data() {
return {
accountTypeList,yesOrNoList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
accountChangeLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
accountType: undefined,
cateId: undefined
},
changeTypeList:[],
};
},
created() {
this.getList();
listChangeType().then(res => {
this.changeTypeList = res.data
})
},
methods: {
/** 查询账户明细列表 */
getList() {
this.loading = true;
listAccountChangeLog(this.queryParams).then(response => {
this.accountChangeLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>