master
parent
16a3098cc1
commit
2b65500ce9
File diff suppressed because it is too large
Load Diff
@ -1,255 +1,255 @@
|
||||
<template>
|
||||
<div>
|
||||
<hr />
|
||||
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
|
||||
<el-table-column align="center" prop="memberNum" label="编码" min-width="80" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="sex" label="性别" min-width="80">
|
||||
<template slot-scope="scope">{{scope.row.label==1?'男':'女'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80">
|
||||
<template slot-scope="scope">{{scope.row.label==null?'暂时没有标签':scope.row.label}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable>
|
||||
<template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="跟进人" align="center">
|
||||
<el-table-column align="center" prop="staffId" label="编码" min-width="100" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="staffName" label="名称" min-width="100" sortable></el-table-column>
|
||||
</el-table-column>-->
|
||||
<el-table-column fixed="right" align="center" label="操作" min-width="150" v-role='4008001'>
|
||||
<template slot-scope="scope" fixed="right">
|
||||
<el-button size="small" type="primary" @click="changeAllote(scope.row,scope.$index,(changeVisible=true))" plain>改派</el-button>
|
||||
<el-button size="small" type="primary" @click="allote(scope.row,scope.$index,(lookVisible=true))">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top:15px;">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||
</div>
|
||||
<!-- 查看 -->
|
||||
<el-drawer :visible.sync="lookVisible" size="30%" direction="rtl">
|
||||
<div class="drawerForm">
|
||||
<el-form :model="lookDrawer">
|
||||
<el-form-item label="会员编号:" :label-width="formLabelwidth">{{lookDrawer.memberNum}}</el-form-item>
|
||||
<el-form-item label="会员名称:" :label-width="formLabelwidth">{{lookDrawer.memberName}}</el-form-item>
|
||||
<el-form-item label="会员性别:" :label-width="formLabelwidth">{{lookDrawer.sex}}</el-form-item>
|
||||
<el-form-item label="跟进人:" :label-width="formLabelwidth">{{lookDrawer.staffName}}</el-form-item>
|
||||
<el-form-item label="标签:" :label-width="formLabelwidth">{{lookDrawer.label}}</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
</el-drawer>
|
||||
<!-- 改派 -->
|
||||
<!-- 分派 -->
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag title="改派" :visible.sync="changeVisible" width="800px">
|
||||
<el-form :model="allotForm" :inline="true">
|
||||
<el-form-item label="会员编码:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.memberNum}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名称:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.memberName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员性别:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.sex==1?'男':'女'}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="原跟进人员:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.allotstaff}}</span>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="新跟进人员:" :label-width="formLabelwidth">
|
||||
<span>{{newallotstaff}}</span>
|
||||
</el-form-item>
|
||||
<div style="width:400px;margin:0px auto">
|
||||
<div class="tableDiv">
|
||||
<el-table :data="staffList" style="padding-left:20px;" @current-change="changetable" @row-dblclick="confirm">
|
||||
<el-table-column align="center" label="选择" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radiotable" :label="scope.row.id" @change.native="(scope.row)"></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="brandNumber" label="水牌号" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="staffName" label="名字" min-width="80"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block" style="margin-top:15px;">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination align="left" @size-change="handleSizeChanges" @current-change="handleCurrentChanges" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="staffList.length"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="changeVisible = false">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="confirm(changeVisible=false)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { staffPage, pageassign, storeMemberassign } from "@/api/storeManage.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
changeVisible: false, //改派弹窗
|
||||
lookVisible: false, //查看抽屉开关
|
||||
pageNum: 1, // 当前页码
|
||||
total: "", // 总条数
|
||||
pageSize: 10, // 每页的数据条数,
|
||||
input: "", //当前页查询输入值
|
||||
lookDrawer: {}, //查看分派表单
|
||||
radiotable: "", //选中员工值
|
||||
allotstaffList: "", //选中员工表单
|
||||
formLabelwidth: "130px", //表单提示标题宽度
|
||||
newallotstaff: "", //新的分派人员
|
||||
list: [], //主数组
|
||||
staffList: [], //员工列表
|
||||
total: 0, //分页总条数
|
||||
queryForm: {
|
||||
//查询对象
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
allotForm: {}, //分派表单
|
||||
pageInfo: {
|
||||
total: 0, //分页总条数
|
||||
tableList: [],
|
||||
},
|
||||
staffForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
state: 1,
|
||||
},
|
||||
Index: -1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//改派 显示员工信息
|
||||
changeAllote(row, index) {
|
||||
this.allotForm = { ...row };
|
||||
this.allotForm.allotstaff = row.staffName;
|
||||
//console.log(row);
|
||||
this.getStaff();
|
||||
|
||||
this.radiotable = row.staffId;
|
||||
},
|
||||
//获取员工列表
|
||||
getStaff() {
|
||||
staffPage(this.staffForm).then((res) => {
|
||||
this.staffList = res.pageInfo.list;
|
||||
});
|
||||
},
|
||||
//选择改派员工
|
||||
changetable(row) {
|
||||
console.log(row);
|
||||
if (row) {
|
||||
this.newallotstaff = row.staffName;
|
||||
this.radiotable = row.id;
|
||||
this.allotstaffList = row;
|
||||
}
|
||||
},
|
||||
//改派确定
|
||||
//确定返回方法
|
||||
confirm() {
|
||||
// this.allotForm.allotstaff = this.allotstaff;
|
||||
var allotForm = {
|
||||
id: this.allotForm.id,
|
||||
staffId: this.allotstaffList.id,
|
||||
staffName: this.allotstaffList.staffName,
|
||||
};
|
||||
storeMemberassign(allotForm).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
if (this.radiotable !== "") {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "已成功改派!",
|
||||
});
|
||||
this.visible = false;
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "请选择改派人员!",
|
||||
});
|
||||
}
|
||||
this.getData();
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//查看
|
||||
allote(row) {
|
||||
this.lookDrawer = { ...row };
|
||||
},
|
||||
//分页方法
|
||||
handleSizeChange(val) {
|
||||
this.queryForm.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.queryForm.pageNum = val;
|
||||
this.getData();
|
||||
},
|
||||
//员工列表分页方法
|
||||
handleSizeChanges(val) {
|
||||
this.staffForm.pageSize = val;
|
||||
this.getStaff();
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.staffForm.pageNum = val;
|
||||
this.getStaff();
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
pageassign(this.queryForm).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.list = res.pageInfo.list;
|
||||
this.total = res.pageInfo.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//组件传值
|
||||
show(form) {
|
||||
if (form) {
|
||||
this.queryForm = Object.assign(form, this.queryForm);
|
||||
}
|
||||
this.queryForm.assignState = 1;
|
||||
this.queryForm.storeId = JSON.parse(
|
||||
sessionStorage.getItem("storeInfo")
|
||||
).id;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-drawer label {
|
||||
margin: 0px 0px 20px 10px;
|
||||
color: rgb(117, 117, 117);
|
||||
}
|
||||
.el-drawer hr {
|
||||
margin: 10px auto;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.fenpai {
|
||||
display: block;
|
||||
margin-left: 110px;
|
||||
}
|
||||
.drawerForm .el-drawer label {
|
||||
margin: 0;
|
||||
}
|
||||
.drawerForm .el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.tableDiv /deep/ .el-radio__label {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<hr />
|
||||
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
|
||||
<el-table-column align="center" prop="memberNum" label="编码" min-width="80" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="sex" label="性别" min-width="80">
|
||||
<template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80">
|
||||
<template slot-scope="scope">{{scope.row.label==null?'暂时没有标签':scope.row.label}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable>
|
||||
<template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="跟进人" align="center">
|
||||
<el-table-column align="center" prop="staffId" label="编码" min-width="100" sortable></el-table-column>
|
||||
<el-table-column align="center" prop="staffName" label="名称" min-width="100" sortable></el-table-column>
|
||||
</el-table-column>-->
|
||||
<el-table-column fixed="right" align="center" label="操作" min-width="150" v-role='4008001'>
|
||||
<template slot-scope="scope" fixed="right">
|
||||
<el-button size="small" type="primary" @click="changeAllote(scope.row,scope.$index,(changeVisible=true))" plain>改派</el-button>
|
||||
<el-button size="small" type="primary" @click="allote(scope.row,scope.$index,(lookVisible=true))">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top:15px;">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||
</div>
|
||||
<!-- 查看 -->
|
||||
<el-drawer :visible.sync="lookVisible" size="30%" direction="rtl">
|
||||
<div class="drawerForm">
|
||||
<el-form :model="lookDrawer">
|
||||
<el-form-item label="会员编号:" :label-width="formLabelwidth">{{lookDrawer.memberNum}}</el-form-item>
|
||||
<el-form-item label="会员名称:" :label-width="formLabelwidth">{{lookDrawer.memberName}}</el-form-item>
|
||||
<el-form-item label="会员性别:" :label-width="formLabelwidth">{{lookDrawer.sex}}</el-form-item>
|
||||
<el-form-item label="跟进人:" :label-width="formLabelwidth">{{lookDrawer.staffName}}</el-form-item>
|
||||
<el-form-item label="标签:" :label-width="formLabelwidth">{{lookDrawer.label}}</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
</el-drawer>
|
||||
<!-- 改派 -->
|
||||
<!-- 分派 -->
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag title="改派" :visible.sync="changeVisible" width="800px">
|
||||
<el-form :model="allotForm" :inline="true">
|
||||
<el-form-item label="会员编码:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.memberNum}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名称:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.memberName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员性别:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.sex==1?'男':'女'}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="原跟进人员:" :label-width="formLabelwidth">
|
||||
<span>{{allotForm.allotstaff}}</span>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="新跟进人员:" :label-width="formLabelwidth">
|
||||
<span>{{newallotstaff}}</span>
|
||||
</el-form-item>
|
||||
<div style="width:400px;margin:0px auto">
|
||||
<div class="tableDiv">
|
||||
<el-table :data="staffList" style="padding-left:20px;" @current-change="changetable" @row-dblclick="confirm">
|
||||
<el-table-column align="center" label="选择" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radiotable" :label="scope.row.id" @change.native="(scope.row)"></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="brandNumber" label="水牌号" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="staffName" label="名字" min-width="80"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block" style="margin-top:15px;">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination align="left" @size-change="handleSizeChanges" @current-change="handleCurrentChanges" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="staffList.length"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="changeVisible = false">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="confirm(changeVisible=false)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { staffPage, pageassign, storeMemberassign } from "@/api/storeManage.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
changeVisible: false, //改派弹窗
|
||||
lookVisible: false, //查看抽屉开关
|
||||
pageNum: 1, // 当前页码
|
||||
total: "", // 总条数
|
||||
pageSize: 10, // 每页的数据条数,
|
||||
input: "", //当前页查询输入值
|
||||
lookDrawer: {}, //查看分派表单
|
||||
radiotable: "", //选中员工值
|
||||
allotstaffList: "", //选中员工表单
|
||||
formLabelwidth: "130px", //表单提示标题宽度
|
||||
newallotstaff: "", //新的分派人员
|
||||
list: [], //主数组
|
||||
staffList: [], //员工列表
|
||||
total: 0, //分页总条数
|
||||
queryForm: {
|
||||
//查询对象
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
allotForm: {}, //分派表单
|
||||
pageInfo: {
|
||||
total: 0, //分页总条数
|
||||
tableList: [],
|
||||
},
|
||||
staffForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
state: 1,
|
||||
},
|
||||
Index: -1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//改派 显示员工信息
|
||||
changeAllote(row, index) {
|
||||
this.allotForm = { ...row };
|
||||
this.allotForm.allotstaff = row.staffName;
|
||||
//console.log(row);
|
||||
this.getStaff();
|
||||
|
||||
this.radiotable = row.staffId;
|
||||
},
|
||||
//获取员工列表
|
||||
getStaff() {
|
||||
staffPage(this.staffForm).then((res) => {
|
||||
this.staffList = res.pageInfo.list;
|
||||
});
|
||||
},
|
||||
//选择改派员工
|
||||
changetable(row) {
|
||||
console.log(row);
|
||||
if (row) {
|
||||
this.newallotstaff = row.staffName;
|
||||
this.radiotable = row.id;
|
||||
this.allotstaffList = row;
|
||||
}
|
||||
},
|
||||
//改派确定
|
||||
//确定返回方法
|
||||
confirm() {
|
||||
// this.allotForm.allotstaff = this.allotstaff;
|
||||
var allotForm = {
|
||||
id: this.allotForm.id,
|
||||
staffId: this.allotstaffList.id,
|
||||
staffName: this.allotstaffList.staffName,
|
||||
};
|
||||
storeMemberassign(allotForm).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
if (this.radiotable !== "") {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "已成功改派!",
|
||||
});
|
||||
this.visible = false;
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "请选择改派人员!",
|
||||
});
|
||||
}
|
||||
this.getData();
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//查看
|
||||
allote(row) {
|
||||
this.lookDrawer = { ...row };
|
||||
},
|
||||
//分页方法
|
||||
handleSizeChange(val) {
|
||||
this.queryForm.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.queryForm.pageNum = val;
|
||||
this.getData();
|
||||
},
|
||||
//员工列表分页方法
|
||||
handleSizeChanges(val) {
|
||||
this.staffForm.pageSize = val;
|
||||
this.getStaff();
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.staffForm.pageNum = val;
|
||||
this.getStaff();
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
pageassign(this.queryForm).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.list = res.pageInfo.list;
|
||||
this.total = res.pageInfo.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//组件传值
|
||||
show(form) {
|
||||
if (form) {
|
||||
this.queryForm = Object.assign(form, this.queryForm);
|
||||
}
|
||||
this.queryForm.assignState = 1;
|
||||
this.queryForm.storeId = JSON.parse(
|
||||
sessionStorage.getItem("storeInfo")
|
||||
).id;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-drawer label {
|
||||
margin: 0px 0px 20px 10px;
|
||||
color: rgb(117, 117, 117);
|
||||
}
|
||||
.el-drawer hr {
|
||||
margin: 10px auto;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.fenpai {
|
||||
display: block;
|
||||
margin-left: 110px;
|
||||
}
|
||||
.drawerForm .el-drawer label {
|
||||
margin: 0;
|
||||
}
|
||||
.drawerForm .el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.tableDiv /deep/ .el-radio__label {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue