|
@@ -3,8 +3,12 @@
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px"
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px"
|
|
|
@submit.prevent="handleQuery">
|
|
@submit.prevent="handleQuery">
|
|
|
|
|
|
|
|
- <el-form-item label="角色名称" prop="roleName">
|
|
|
|
|
- <el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable size="small"
|
|
|
|
|
|
|
+ <el-form-item label="销售名称" prop="memberName">
|
|
|
|
|
+ <el-input v-model="queryParams.memberName" placeholder="请输入销售名称" clearable size="small"
|
|
|
|
|
+ @keydown.enter.native="handleQueryEnter" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="所属公司" prop="roleName">
|
|
|
|
|
+ <el-input v-model="queryParams.roleName" placeholder="请输入所属公司" clearable size="small"
|
|
|
@keydown.enter.native="handleQueryEnter" />
|
|
@keydown.enter.native="handleQueryEnter" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
@@ -14,9 +18,9 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
- <el-table
|
|
|
|
|
- v-loading="loading"
|
|
|
|
|
- :data="roleList"
|
|
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ :data="roleList"
|
|
|
ref="roleList"
|
|
ref="roleList"
|
|
|
:row-key="row => String(row.id)"
|
|
:row-key="row => String(row.id)"
|
|
|
:class="{ 'cus-role-single': !multiple }"
|
|
:class="{ 'cus-role-single': !multiple }"
|
|
@@ -24,16 +28,17 @@
|
|
|
@select-all="allSelectHandler"
|
|
@select-all="allSelectHandler"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="角色id" align="center" prop="id"/>
|
|
|
|
|
- <el-table-column label="角色名称" align="center" prop="roleName"/>
|
|
|
|
|
- <el-table-column label="角色备注" align="center" prop="remark"/>
|
|
|
|
|
|
|
+ <el-table-column label="销售id" align="center" prop="id" min-width="100"/>
|
|
|
|
|
+ <el-table-column label="销售名称" align="center" prop="memberName" min-width="140" show-overflow-tooltip/>
|
|
|
|
|
+ <el-table-column label="所属公司" align="center" prop="roleName" min-width="140" show-overflow-tooltip/>
|
|
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" min-width="160" show-overflow-tooltip/>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
<div style="margin-top: 30px;display: flex;justify-content: center">
|
|
<div style="margin-top: 30px;display: flex;justify-content: center">
|
|
|
<el-button type="warning" icon="el-icon-search" @click="confirmSelect">确定选择</el-button>
|
|
<el-button type="warning" icon="el-icon-search" @click="confirmSelect">确定选择</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <pagination
|
|
|
|
|
|
|
+ <pagination
|
|
|
v-show="total > 0"
|
|
v-show="total > 0"
|
|
|
:total="total"
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
:page.sync="queryParams.pageNum"
|
|
@@ -65,10 +70,12 @@ export default {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: true,
|
|
default: true,
|
|
|
},
|
|
},
|
|
|
|
|
+ // 排除的销售id
|
|
|
ignoreIds: {
|
|
ignoreIds: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: () => [],
|
|
default: () => [],
|
|
|
},
|
|
},
|
|
|
|
|
+ // 仅查询指定销售id
|
|
|
ids: {
|
|
ids: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: () => [],
|
|
default: () => [],
|
|
@@ -80,12 +87,13 @@ export default {
|
|
|
loading: true,
|
|
loading: true,
|
|
|
// 总条数
|
|
// 总条数
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- // 客服角色表格数据
|
|
|
|
|
|
|
+ // 客服成员表格数据
|
|
|
roleList: [],
|
|
roleList: [],
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
|
|
+ memberName: null,
|
|
|
roleName: null
|
|
roleName: null
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
@@ -105,16 +113,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/**
|
|
/**
|
|
|
- * 查询用户列表
|
|
|
|
|
|
|
+ * 查询客服成员列表
|
|
|
*/
|
|
*/
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
let qp = this.queryParams;
|
|
let qp = this.queryParams;
|
|
|
- if (this.ignoreIds) {
|
|
|
|
|
|
|
+ if (this.ignoreIds && this.ignoreIds.length) {
|
|
|
qp['ignoreIds'] = this.ignoreIds;
|
|
qp['ignoreIds'] = this.ignoreIds;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete qp.ignoreIds;
|
|
|
}
|
|
}
|
|
|
- if (this.ids) {
|
|
|
|
|
|
|
+ if (this.ids && this.ids.length) {
|
|
|
qp['ids'] = this.ids;
|
|
qp['ids'] = this.ids;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete qp.ids;
|
|
|
}
|
|
}
|
|
|
listRole(qp).then(response => {
|
|
listRole(qp).then(response => {
|
|
|
this.roleList = response.rows;
|
|
this.roleList = response.rows;
|
|
@@ -151,6 +163,7 @@ export default {
|
|
|
this.queryParams = {
|
|
this.queryParams = {
|
|
|
pageNum: this.defaultPageNum,
|
|
pageNum: this.defaultPageNum,
|
|
|
pageSize: this.defaultPageSize,
|
|
pageSize: this.defaultPageSize,
|
|
|
|
|
+ memberName: null,
|
|
|
roleName: null,
|
|
roleName: null,
|
|
|
}
|
|
}
|
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
@@ -188,8 +201,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 单选
|
|
* 单选
|
|
|
- * @param selection
|
|
|
|
|
- * @param row
|
|
|
|
|
|
|
+ * @param selection
|
|
|
|
|
+ * @param row
|
|
|
*/
|
|
*/
|
|
|
singleSelectHandler(selection, row) {
|
|
singleSelectHandler(selection, row) {
|
|
|
// 单选模式:只保留当前行
|
|
// 单选模式:只保留当前行
|
|
@@ -230,7 +243,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 全选
|
|
* 全选
|
|
|
- * @param selection
|
|
|
|
|
|
|
+ * @param selection
|
|
|
*/
|
|
*/
|
|
|
allSelectHandler(selection) {
|
|
allSelectHandler(selection) {
|
|
|
// 单选模式不允许全选
|
|
// 单选模式不允许全选
|