分销员
This commit is contained in:
parent
54acac218f
commit
61cee9d5af
|
@ -152,8 +152,76 @@
|
|||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 邀请用户列表弹框 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-->
|
||||
<el-dialog :title=titles :visible.sync="dialogInvitationListFormVisible" width="60%" center @close="closeInvitation">
|
||||
<div style="margin-left: 10px; display: inline-block;">
|
||||
<span>姓名:</span>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入姓名"
|
||||
v-model="invitationName"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-left: 10px; display: inline-block">
|
||||
<span>手机号:</span>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入手机号"
|
||||
v-model="invitationPhone"
|
||||
></el-input>
|
||||
</div>
|
||||
<el-button
|
||||
style="margin-left: 10px;"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleSelectInvitation">查询
|
||||
</el-button>
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleClearInvitation">重置
|
||||
</el-button>
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleUserView">用户列表
|
||||
</el-button>
|
||||
<el-table :data="invitationTableData.list" style="width: 100%">
|
||||
<el-table-column prop="userId" label="用户ID"></el-table-column>
|
||||
<el-table-column prop="avatar" label="头像">
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
v-if="scope.row.avatar && scope.row.avatar != ''"
|
||||
:src="scope.row.avatar"
|
||||
width="40"
|
||||
height="40"
|
||||
/>
|
||||
<span v-else>暂无图片</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="phone" label="手机号"></el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center; margin-top: 10px">
|
||||
<el-pagination
|
||||
@size-change="handleInvitationSizeChange"
|
||||
@current-change="handleInvitationCurrentChange"
|
||||
:page-size="invitationLimit"
|
||||
:current-page="invitationPage"
|
||||
layout="total, prev, pager, next,jumper"
|
||||
:total="invitationTableData.totalCount"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<邀请用户列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 用户列表弹框 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-->
|
||||
<el-dialog :title=titles :visible.sync="dialogUserListFormVisible" width="60%" center @close="closeUserList">
|
||||
<el-dialog title="用户列表" :visible.sync="dialogUserListFormVisible" width="60%" center @close="closeUserList">
|
||||
<div style="margin-left: 10px; display: inline-block;">
|
||||
<span>姓名:</span>
|
||||
<el-input
|
||||
|
@ -175,14 +243,14 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleSelectUsers">查询
|
||||
@click="handleSelectUser">查询
|
||||
</el-button>
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleClearUsers">重置
|
||||
@click="handleClearUser">重置
|
||||
</el-button>
|
||||
<el-table :data="userTableData.list" style="width: 100%">
|
||||
<el-table-column prop="userId" label="用户ID"></el-table-column>
|
||||
|
@ -199,6 +267,18 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="phone" label="手机号"></el-table-column>
|
||||
<el-table-column label="操作" prop="id">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
style="margin: 10px 0"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="handleInvitationUser(scope.row)"
|
||||
>邀请
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center; margin-top: 10px">
|
||||
<el-pagination
|
||||
|
@ -211,7 +291,7 @@
|
|||
></el-pagination>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<技师列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
@ -234,21 +314,21 @@ export default {
|
|||
endTime: "",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
dialogInvitationListFormVisible: false,
|
||||
invitationTableDataLoading: false,
|
||||
flag: "",
|
||||
invitationName: "",
|
||||
invitationPhone: "",
|
||||
invitationPage: 1,
|
||||
invitationLimit: 10,
|
||||
invitationTableData:{},
|
||||
dialogUserListFormVisible: false,
|
||||
userTableDataLoading: false,
|
||||
flag: "",
|
||||
userName: "",
|
||||
userPhone: "",
|
||||
userPage: 1,
|
||||
userLimit: 10,
|
||||
userTableData:{},
|
||||
dialogArtificerListFormVisible: false,
|
||||
artificerTableDataLoading: false,
|
||||
artificerName: "",
|
||||
artificerPhone: "",
|
||||
artificerPage: 1,
|
||||
artificerLimit: 10,
|
||||
artificerTableData:{},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -307,8 +387,8 @@ export default {
|
|||
this.handleSelect();
|
||||
},
|
||||
|
||||
closeUserList(){
|
||||
this.handleClear();
|
||||
closeInvitation(){
|
||||
this.handleSelect();
|
||||
},
|
||||
|
||||
handleInvitationView(row,flag){
|
||||
|
@ -319,19 +399,79 @@ export default {
|
|||
this.titles = '邀请的用户列表';
|
||||
}
|
||||
this.invitationCode = row.invitationCode;
|
||||
this.handleSelectUsers();
|
||||
this.userId = row.userId;
|
||||
this.handleSelectInvitation();
|
||||
this.dialogInvitationListFormVisible = true;
|
||||
},
|
||||
|
||||
handleSelectInvitation(){
|
||||
this.invitationTableDataLoading = true;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("commission/fxyData/invitationPage"),
|
||||
method: "get",
|
||||
params: this.$http.adornParams({
|
||||
page: this.invitationPage,
|
||||
limit: this.invitationLimit,
|
||||
invitationCode: this.invitationCode,
|
||||
name: this.invitationName,
|
||||
phone: this.invitationPhone,
|
||||
flag: this.flag
|
||||
}),
|
||||
}).then(({data}) => {
|
||||
if (data.code == 0) {
|
||||
this.invitationTableData = data.data;
|
||||
} else {
|
||||
this.$notify({
|
||||
title: "提示",
|
||||
duration: 1800,
|
||||
message: data.msg,
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
this.invitationTableDataLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
//分页
|
||||
handleInvitationSizeChange(val) {
|
||||
this.invitationLimit = val;
|
||||
this.handleSelectInvitation();
|
||||
},
|
||||
|
||||
//翻页
|
||||
handleInvitationCurrentChange(val) {
|
||||
this.invitationPage = val;
|
||||
this.handleSelectInvitation();
|
||||
},
|
||||
|
||||
// 重置
|
||||
handleClearInvitation() {
|
||||
this.invitationName = "";
|
||||
this.invitationPhone = "";
|
||||
this.invitationPage = 1;
|
||||
this.invitationLimit = 10;
|
||||
this.handleSelectInvitation();
|
||||
},
|
||||
|
||||
closeUserList(){
|
||||
this.handleSelectInvitation();
|
||||
},
|
||||
|
||||
handleUserView(){
|
||||
this.handleSelectUser();
|
||||
this.dialogUserListFormVisible = true;
|
||||
},
|
||||
|
||||
handleSelectUsers(){
|
||||
handleSelectUser(){
|
||||
this.userTableDataLoading = true;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("commission/fxyData/invitationPage"),
|
||||
url: this.$http.adornUrl("commission/fxyData/userPage"),
|
||||
method: "get",
|
||||
params: this.$http.adornParams({
|
||||
page: this.userPage,
|
||||
limit: this.userLimit,
|
||||
invitationCode: this.invitationCode,
|
||||
userId: this.userId,
|
||||
name: this.userName,
|
||||
phone: this.userPhone,
|
||||
flag: this.flag
|
||||
|
@ -354,24 +494,54 @@ export default {
|
|||
//分页
|
||||
handleUserSizeChange(val) {
|
||||
this.userLimit = val;
|
||||
this.handleSelectUsers();
|
||||
this.handleSelectUser();
|
||||
},
|
||||
|
||||
//翻页
|
||||
handleUserCurrentChange(val) {
|
||||
this.userPage = val;
|
||||
this.handleSelectUsers();
|
||||
this.handleSelectUser();
|
||||
},
|
||||
|
||||
// 重置
|
||||
handleClearUsers() {
|
||||
handleClearUser() {
|
||||
this.userName = "";
|
||||
this.userPhone = "";
|
||||
this.userPage = 1;
|
||||
this.userLimit = 10;
|
||||
this.handleSelectUsers();
|
||||
this.handleSelectUser();
|
||||
},
|
||||
|
||||
handleInvitationUser(row){
|
||||
let userId = row.userId;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("commission/fxyData/invitationUser"),
|
||||
method: "post",
|
||||
params: this.$http.adornParams({
|
||||
userId: userId,
|
||||
invitationCode: this.invitationCode,
|
||||
}),
|
||||
}).then(({data}) => {
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: "邀请成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
},
|
||||
});
|
||||
this.handleSelectUser()
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: "warning",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.handleSelect();
|
||||
|
|
Loading…
Reference in New Issue