提交
This commit is contained in:
parent
184ead5b2d
commit
115079c9b4
18
src/api/mch/vip.js
Normal file
18
src/api/mch/vip.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 商户会员列表
|
||||
export function mchListVip(params) {
|
||||
return request({
|
||||
url: '/mch/vip/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 商户删除会员
|
||||
export function mchDelVip(id) {
|
||||
return request({
|
||||
url: '/mch/vip/delete/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -1,16 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<vip-table ref="table" @selection-change="handleSelectionChange" >
|
||||
<vip-table ref="table" @selection-change="handleSelectionChange" :list-api="mchListVip" :hide-columns="hideColumns">
|
||||
<template #table-operator>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
@ -23,19 +14,11 @@
|
|||
</el-col>
|
||||
</template>
|
||||
<template v-slot:row-operator="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['ss:vip:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ss:vip:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</vip-table>
|
||||
|
@ -47,7 +30,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { delVip } from "@/api/ss/vip";
|
||||
import { mchListVip, mchDelVip } from '@/api/mch/vip'
|
||||
import UserInput from '@/components/Business/SmUser/UserInput.vue'
|
||||
import StoreInput from '@/components/Business/Store/StoreInput.vue'
|
||||
import VipLevelInput from '@/components/Business/VipLevel/VipLevelInput.vue'
|
||||
|
@ -66,10 +49,12 @@ export default {
|
|||
open: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
hideColumns: ['mchName']
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
isEmpty,
|
||||
mchListVip,
|
||||
getList() {
|
||||
this.$refs.table.getList();
|
||||
},
|
||||
|
@ -91,7 +76,7 @@ export default {
|
|||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除会员编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delVip(ids);
|
||||
return mchDelVip(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户" prop="userName">
|
||||
<el-form-item label="用户" prop="userName" v-if="isShow('userName')">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户名称"
|
||||
|
@ -9,7 +9,15 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="vipLevelName">
|
||||
<el-form-item label="商户" prop="mchName" v-if="isShow('mchName')">
|
||||
<el-input
|
||||
v-model="queryParams.mchName"
|
||||
placeholder="请输入商户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="vipLevelName" v-if="isShow('vipLevelName')">
|
||||
<el-input
|
||||
v-model="queryParams.vipLevelName"
|
||||
placeholder="请输入会员等级名称"
|
||||
|
@ -17,6 +25,13 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有效" prop="inValid" v-if="isShow('inValid')">
|
||||
<el-radio-group v-model="queryParams.inValid" @change="handleQuery">
|
||||
<el-radio :label="null">全部</el-radio>
|
||||
<el-radio :label="true">有效</el-radio>
|
||||
<el-radio :label="false">无效</el-radio>
|
||||
</el-radio-group>
|
||||
</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>
|
||||
|
|
|
@ -397,4 +397,7 @@ export default {
|
|||
flex: 1;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.mr-4 {
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user