|
@@ -1,10 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
- <el-form
|
|
|
|
- :model="queryParams"
|
|
|
|
- ref="queryForm"
|
|
|
|
- :inline="true"
|
|
|
|
- v-show="showSearch"
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ :model="queryParams"
|
|
|
|
+ ref="queryForm"
|
|
|
|
+ :inline="true"
|
|
|
|
+ v-show="showSearch"
|
|
label-width="75px"
|
|
label-width="75px"
|
|
>
|
|
>
|
|
<el-form-item label="上级渠道" prop="parentId">
|
|
<el-form-item label="上级渠道" prop="parentId">
|
|
@@ -104,21 +104,21 @@
|
|
<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="siteList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="siteList" @sort-change="sortChannelId" @selection-change="handleSelectionChange">
|
|
<!-- <el-table-column type="selection" width="55" /> -->
|
|
<!-- <el-table-column type="selection" width="55" /> -->
|
|
- <el-table-column label="经销商编号" prop="channelId" width="100px"/>
|
|
|
|
|
|
+ <el-table-column label="经销商编号" sortable="custom" prop="channelId" width="110px"/>
|
|
<el-table-column label="经销商名称" show-overflow-tooltip prop="name" max-width="100px" />
|
|
<el-table-column label="经销商名称" show-overflow-tooltip prop="name" max-width="100px" />
|
|
<el-table-column label="手机号码" prop="mobile" width="120px"/>
|
|
<el-table-column label="手机号码" prop="mobile" width="120px"/>
|
|
- <el-table-column label="佣金比例" prop="commRate">
|
|
|
|
|
|
+ <el-table-column label="佣金比例" sortable="custom" prop="commRate">
|
|
<template slot-scope="{ row, column }">
|
|
<template slot-scope="{ row, column }">
|
|
<span>{{row.commRate}}%</span>
|
|
<span>{{row.commRate}}%</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="上级渠道" prop="parentsName" min-width="170px" />
|
|
<el-table-column label="上级渠道" prop="parentsName" min-width="170px" />
|
|
- <el-table-column label="盲票库存" prop="offLineQtyCnt" />
|
|
|
|
- <el-table-column label="线下销量" prop="offLineSaleCnt" />
|
|
|
|
- <el-table-column label="线上销量" prop="onLineSaleCnt" />
|
|
|
|
- <el-table-column label="用户数" prop="userCnt" />
|
|
|
|
|
|
+ <el-table-column label="盲票库存" sortable="custom" prop="offLineQtyCnt" />
|
|
|
|
+ <el-table-column label="线下销量" sortable="custom" prop="offLineSaleCnt" />
|
|
|
|
+ <el-table-column label="线上销量" sortable="custom" prop="onLineSaleCnt" />
|
|
|
|
+ <el-table-column label="用户数" sortable="custom" prop="userCnt" />
|
|
<el-table-column label="认证状态" prop="certifyStatus" >
|
|
<el-table-column label="认证状态" prop="certifyStatus" >
|
|
<template slot-scope="{ row, column }">
|
|
<template slot-scope="{ row, column }">
|
|
<span v-if="getValue(row.certifyStatus) == 'y'" style="color: blue;"> {{getDesc(row.certifyStatus)}}</span>
|
|
<span v-if="getValue(row.certifyStatus) == 'y'" style="color: blue;"> {{getDesc(row.certifyStatus)}}</span>
|
|
@@ -208,6 +208,7 @@ import { listAreaByPid} from "@/api/admin/area";
|
|
import { listSaleSite, updateSaleSiteStatus} from "@/api/admin/salesite";
|
|
import { listSaleSite, updateSaleSiteStatus} from "@/api/admin/salesite";
|
|
import SiteCreate from './components/Create'
|
|
import SiteCreate from './components/Create'
|
|
import SiteDetail from './components/Detail'
|
|
import SiteDetail from './components/Detail'
|
|
|
|
+import data from "../../system/dict/data";
|
|
export default {
|
|
export default {
|
|
name: "SaleSiteIndex",
|
|
name: "SaleSiteIndex",
|
|
components: {
|
|
components: {
|
|
@@ -261,7 +262,9 @@ export default {
|
|
},
|
|
},
|
|
pageParams: {
|
|
pageParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: 10
|
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ orderByColumn: 't1.channelId',
|
|
|
|
+ isAsc: 'desc',
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
@@ -282,7 +285,7 @@ export default {
|
|
/** 查询经销商列表 */
|
|
/** 查询经销商列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listSaleSite('pageNum='+this.pageParams.pageNum + '&pageSize='+this.pageParams.pageSize+'&',this.queryParams).then(response => {
|
|
|
|
|
|
+ listSaleSite('pageNum='+this.pageParams.pageNum + '&pageSize='+this.pageParams.pageSize+'&orderByColumn='+ this.pageParams.orderByColumn +'&isAsc='+ this.pageParams.isAsc +'&',this.queryParams).then(response => {
|
|
this.siteList = response.rows;
|
|
this.siteList = response.rows;
|
|
this.siteList.forEach(item => {
|
|
this.siteList.forEach(item => {
|
|
item.statusV = JSON.parse(item.status).value+""
|
|
item.statusV = JSON.parse(item.status).value+""
|
|
@@ -291,6 +294,17 @@ export default {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ //切换排序
|
|
|
|
+ sortChannelId(row){
|
|
|
|
+ if (row){
|
|
|
|
+ let prop = row.prop == 'channelId' || row.prop == 'commRate' ? ('t1.'+ row.prop) : row.prop;
|
|
|
|
+ this.pageParams.orderByColumn = prop
|
|
|
|
+ this.pageParams.isAsc = row.order=='ascending'?"asc":"desc";
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
// 获取上级渠道下拉列表
|
|
// 获取上级渠道下拉列表
|
|
getChannelList(){
|
|
getChannelList(){
|
|
listAllChannel().then(response => {
|
|
listAllChannel().then(response => {
|
|
@@ -393,12 +407,14 @@ export default {
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
|
|
+
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.postId)
|
|
this.ids = selection.map(item => item.postId)
|
|
this.single = selection.length!=1
|
|
this.single = selection.length!=1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
|
|
+
|
|
handleDetail(row){
|
|
handleDetail(row){
|
|
this.detailShow = true
|
|
this.detailShow = true
|
|
this.editId = row.channelId
|
|
this.editId = row.channelId
|