|
@@ -23,12 +23,7 @@
|
|
|
<el-col :span="4">
|
|
|
<el-form-item>
|
|
|
<el-select v-model="searchForm.userLevel" placeholder="app用户类型">
|
|
|
- <el-option
|
|
|
- v-for="item in customerTypeList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
+ <el-option v-for="item in customerTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -46,18 +41,8 @@
|
|
|
icon="el-icon-plus"
|
|
|
@click="showAddEditDialog(null)"
|
|
|
>新建</el-button>-->
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- @click="sendRedEnvelopes(1)"
|
|
|
- >卡券发放</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- @click="sendRedEnvelopes(2)"
|
|
|
- >红包发放</el-button>
|
|
|
+ <el-button type="primary" plain round @click="sendRedEnvelopes(1)">卡券发放</el-button>
|
|
|
+ <el-button type="primary" plain round @click="sendRedEnvelopes(2)">红包发放</el-button>
|
|
|
<!-- <el-button
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -76,37 +61,18 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="MaintenanceTable">
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- tooltip-effect="dark"
|
|
|
- @selection-change="selectionChange"
|
|
|
- class="OutTable"
|
|
|
- border
|
|
|
- v-loading="listLoading"
|
|
|
- >
|
|
|
+ <el-table ref="multipleTable" :data="tableData" style="width: 100%" tooltip-effect="dark" @selection-change="selectionChange" class="OutTable" border v-loading="listLoading">
|
|
|
<el-table-column type="selection"></el-table-column>
|
|
|
<el-table-column prop="mobile" label="手机号" :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="name" label="昵称" :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="realName" label="真实名" :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="companyName" label="公司" :show-overflow-tooltip="true">
|
|
|
- <template
|
|
|
- slot-scope="scope"
|
|
|
- >{{ scope.row.companyName ? scope.row.companyName : '- 无 -' }}</template>
|
|
|
+ <template slot-scope="scope">{{ scope.row.companyName ? scope.row.companyName : '- 无 -' }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="roleName" label="app用户类型"></el-table-column>
|
|
|
<el-table-column prop="deleteFlag" label="冻结开关" min-width="110px;">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.deleteFlag"
|
|
|
- active-text="开"
|
|
|
- inactive-text="关"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- :disabled="scope.row.userLevel === 6"
|
|
|
- @change="switchChange(scope.row)"
|
|
|
- ></el-switch>
|
|
|
+ <el-switch v-model="scope.row.deleteFlag" active-text="开" inactive-text="关" :active-value="1" :inactive-value="0" :disabled="scope.row.userLevel === 6" @change="switchChange(scope.row)"></el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="vipEndTime" label="会员结束时间" :show-overflow-tooltip="true">
|
|
@@ -122,57 +88,17 @@
|
|
|
@click="deleteData(scope.row.userId)"
|
|
|
>删除</el-button>-->
|
|
|
<!-- 非会员及VIP个人会员可以升级角色(vip个人会员可以升级为vip企业会员) vipFlag:1 非会员,2 会员 -->
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- v-if="scope.row.vipFlag === 1"
|
|
|
- :disabled="scope.row.userLevel === 6"
|
|
|
- @click="editRoleShow(scope.row.userId)"
|
|
|
- >升级角色</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round v-if="scope.row.vipFlag === 1" :disabled="scope.row.userLevel === 6" @click="editRoleShow(scope.row.userId)">升级角色</el-button>
|
|
|
<!-- 个人与企业会员都可以取消会员 -->
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- v-if="scope.row.vipFlag === 2"
|
|
|
- @click="cancelVip(scope.row)"
|
|
|
- >取消会员</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- :disabled="scope.row.expertFlag ===1 || scope.row.userLevel === 6"
|
|
|
- @click="invite(scope.row)"
|
|
|
- >邀请成为专家</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- :disabled="scope.row.userLevel === 6"
|
|
|
- @click="viewRebates(scope.row)"
|
|
|
- >查看分销返利</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- @click="showDetailsDialog(scope.row)"
|
|
|
- >详情</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round v-if="scope.row.vipFlag === 2" @click="cancelVip(scope.row)">取消会员</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round :disabled="scope.row.expertFlag ===1 || scope.row.userLevel === 6" @click="invite(scope.row)">邀请成为专家</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round :disabled="scope.row.userLevel === 6" @click="viewRebates(scope.row)">查看分销返利</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round @click="showDetailsDialog(scope.row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagenation">
|
|
|
- <PageComponent
|
|
|
- :total="total"
|
|
|
- @pagination="handlePagination"
|
|
|
- :pageSize.sync="page.pageSize"
|
|
|
- :pageNum.sync="page.pageNum"
|
|
|
- ></PageComponent>
|
|
|
+ <PageComponent :total="total" @pagination="handlePagination" :pageSize.sync="page.pageSize" :pageNum.sync="page.pageNum"></PageComponent>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -234,7 +160,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
selectionChange(data) {
|
|
|
- this.ids = data.map(item => {
|
|
|
+ this.ids = data.map((item) => {
|
|
|
return item.userId;
|
|
|
});
|
|
|
},
|
|
@@ -254,9 +180,9 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
queryPageUser(obj)
|
|
|
- .then(res => {
|
|
|
- if(res.statusCode == "10"){
|
|
|
- this.$router.replace("/login");
|
|
|
+ .then((res) => {
|
|
|
+ if (res.statusCode == '10') {
|
|
|
+ this.$router.replace('/login');
|
|
|
}
|
|
|
this.tableData = res.data.records;
|
|
|
this.total = res.data.total;
|
|
@@ -268,7 +194,7 @@ export default {
|
|
|
},
|
|
|
getCustomerType() {
|
|
|
queryCustomerType({})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.customerTypeList = res.data.records || [];
|
|
|
})
|
|
|
.catch();
|
|
@@ -279,13 +205,13 @@ export default {
|
|
|
if (this.ids.length === 0) return this.$message.warning('请至少选中一项 !');
|
|
|
// console.log(this.ids, "ids");
|
|
|
obj = {
|
|
|
- ids: this.ids
|
|
|
- }
|
|
|
+ ids: this.ids,
|
|
|
+ };
|
|
|
this.delete(obj);
|
|
|
} else {
|
|
|
obj = {
|
|
|
- ids: [id]
|
|
|
- }
|
|
|
+ ids: [id],
|
|
|
+ };
|
|
|
this.delete(obj);
|
|
|
}
|
|
|
},
|
|
@@ -344,7 +270,7 @@ export default {
|
|
|
maintenanceCompanyId: data.maintenanceCompanyId,
|
|
|
};
|
|
|
cancelVip(obj)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log(res);
|
|
|
if (res.statusCode == '1') {
|
|
|
this.$message.success(res.message);
|
|
@@ -372,10 +298,10 @@ export default {
|
|
|
// 冻结解冻
|
|
|
switchChange(data) {
|
|
|
console.log(data.userId);
|
|
|
- let ids = {ids:[data.userId]};
|
|
|
+ let ids = { ids: [data.userId] };
|
|
|
if (data.deleteFlag) {
|
|
|
freezeUser(ids)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log(res);
|
|
|
this.queryListData();
|
|
|
this.$message.success('操作成功!');
|
|
@@ -383,7 +309,7 @@ export default {
|
|
|
.catch();
|
|
|
} else {
|
|
|
unfreezeUser(ids)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log(res);
|
|
|
this.queryListData();
|
|
|
this.$message.success('操作成功!');
|
|
@@ -394,7 +320,7 @@ export default {
|
|
|
// 邀请成为专家
|
|
|
invite(data) {
|
|
|
inviteToBeAnExpert(data.userId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log(res);
|
|
|
if (res.statusCode == '1') {
|
|
|
this.$message.success('邀请成功!');
|