|
@@ -85,8 +85,8 @@
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="channelList">
|
|
|
|
- <el-table-column label="渠道编号" prop="channelId" width="100px" />
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="channelList" @sort-change="sortChannelId">
|
|
|
|
+ <el-table-column label="渠道编号" sortable="custom" prop="channelId" width="100px" />
|
|
<el-table-column label="渠道名称" prop="name" show-overflow-tooltip width="180px">
|
|
<el-table-column label="渠道名称" prop="name" show-overflow-tooltip width="180px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -101,7 +101,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="手机号码" prop="mobile" show-overflow-tooltip width="120px"/>
|
|
<el-table-column label="手机号码" prop="mobile" show-overflow-tooltip width="120px"/>
|
|
- <el-table-column label="佣金比例" prop="commRate">
|
|
|
|
|
|
+ <el-table-column label="佣金比例" sortable="custom" prop="commRate">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{scope.row.commRate}}%
|
|
{{scope.row.commRate}}%
|
|
</template>
|
|
</template>
|
|
@@ -111,8 +111,8 @@
|
|
{{scope.row.level}}级渠道
|
|
{{scope.row.level}}级渠道
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="经销商数" prop="siteCnt" />
|
|
|
|
- <el-table-column label="用户数" prop="userCnt" />
|
|
|
|
|
|
+ <el-table-column label="经销商数" sortable="custom" prop="siteCnt" />
|
|
|
|
+ <el-table-column label="用户数" sortable="custom" prop="userCnt" />
|
|
<el-table-column label="状态" key="statusV">
|
|
<el-table-column label="状态" key="statusV">
|
|
<template slot-scope="{ row, column }">
|
|
<template slot-scope="{ row, column }">
|
|
<el-tag :type="JSON.parse(row.status).value == '1' ? 'success' : 'info'">{{ JSON.parse(row.status).desc }}</el-tag>
|
|
<el-tag :type="JSON.parse(row.status).value == '1' ? 'success' : 'info'">{{ JSON.parse(row.status).desc }}</el-tag>
|
|
@@ -251,7 +251,9 @@ export default {
|
|
},
|
|
},
|
|
pageParams: {
|
|
pageParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: 10
|
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ orderByColumn: 'channelId',
|
|
|
|
+ isAsc: 'desc',
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -268,7 +270,7 @@ export default {
|
|
this.parentId = parentId
|
|
this.parentId = parentId
|
|
this.queryParams.parentId = parentId
|
|
this.queryParams.parentId = parentId
|
|
this.queryParams.parentName = title
|
|
this.queryParams.parentName = title
|
|
- console.log("parentId == "+parentId+ "title == "+title)
|
|
|
|
|
|
+ // console.log("parentId == "+parentId+ "title == "+title)
|
|
// this.$route.meta.title = title + " - 子渠道管理"
|
|
// this.$route.meta.title = title + " - 子渠道管理"
|
|
if(parentId){
|
|
if(parentId){
|
|
this.initList();
|
|
this.initList();
|
|
@@ -284,7 +286,7 @@ export default {
|
|
/** 查询用户列表 */
|
|
/** 查询用户列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listChannel('pageNum='+this.pageParams.pageNum + '&pageSize='+this.pageParams.pageSize+'&', this.queryParams).then(response => {
|
|
|
|
|
|
+ listChannel('pageNum='+this.pageParams.pageNum + '&pageSize='+this.pageParams.pageSize+'&orderByColumn='+ this.pageParams.orderByColumn +'&isAsc='+ this.pageParams.isAsc +'&', this.queryParams).then(response => {
|
|
this.channelList = response.rows;
|
|
this.channelList = response.rows;
|
|
this.channelList.forEach(item => {
|
|
this.channelList.forEach(item => {
|
|
item.statusV = JSON.parse(item.status).value+""
|
|
item.statusV = JSON.parse(item.status).value+""
|
|
@@ -295,6 +297,16 @@ export default {
|
|
);
|
|
);
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //切换排序
|
|
|
|
+ sortChannelId(row){
|
|
|
|
+ if (row){
|
|
|
|
+ let prop = row.prop == 'commRate' ? ('t1.'+ row.prop) : row.prop;
|
|
|
|
+ this.pageParams.orderByColumn = prop
|
|
|
|
+ this.pageParams.isAsc = row.order=='ascending'?"asc":"desc";
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
// 省
|
|
// 省
|
|
/* getProvinceList(){
|
|
/* getProvinceList(){
|
|
this.cityList = []
|
|
this.cityList = []
|