Commit fad01280 authored by zhengke's avatar zhengke

111

parent cea090ac
<style>
@import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
@import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
</style>
<template>
<div class="customerManage">
......@@ -245,555 +245,478 @@
</div>
</template>
<script>
import mySelect from "../dialogModel/select";
import customerInfoBox from "./customerInfoBox";
import customerDialogBox from "./customerDialogBox";
export default {
components: {
mySelect,
customerInfoBox,
customerDialogBox,
},
data() {
return {
queryType2: [
{
label: "客户名称",
show: true,
},
{
label: "手机号码",
show: true,
},
{
label: "地址",
show: true,
},
{
label: "客户来源",
show: true,
},
{
label: "参团数",
show: true,
},
{
label: "商机数",
show: true,
},
{
label: "总评分",
show: true,
},
{
label: "客户等级",
show: true,
},
{
label: "余额",
show: true,
},
{
label: "最后更新时间",
show: true,
},
{
label: "负责人",
show: true,
},
{
label: "创建时间",
show: true,
},
{
label: "创建人",
show: true,
},
{
label: "生日",
show: true,
},
{
label: "是否结婚",
show: true,
},
{
label: "职务",
show: true,
},
{
label: "是否高中生",
show: true,
},
{
label: "身份证",
show: true,
},
{
label: "护照号",
show: true,
},
{
label: "护照签发地",
show: true,
},
{
label: "护照签发日期",
show: true,
},
{
label: "护照过期时间",
show: true,
},
{
label: "签发机关",
show: true,
},
{
label: "备注",
show: true,
},
{
label: "订单交易数",
show: true,
},
{
label: "订单金额",
show: true,
},
{
label: "出境记录",
show: true,
},
{
label: "家庭详细地址 ",
show: true,
},
{
label: "出生地点",
show: true,
},
{
label: "经济能力确认",
show: true,
},
{
label: "是否推存",
show: true,
},
],
queryType: [
{
label: "客户名称",
show: true,
},
{
label: "手机号码",
show: true,
},
{
label: "地址",
show: true,
},
{
label: "客户来源",
show: true,
},
{
label: "参团数",
show: true,
},
{
label: "商机数",
show: true,
},
{
label: "总评分",
show: true,
},
{
label: "客户等级",
show: true,
},
{
label: "余额",
show: true,
},
{
label: "最后更新时间",
show: true,
},
{
label: "负责人",
show: true,
},
{
label: "创建时间",
show: true,
},
{
label: "创建人",
show: true,
},
{
label: "生日",
show: true,
},
{
label: "是否结婚",
show: true,
},
{
label: "职务",
show: true,
},
{
label: "是否高中生",
show: true,
},
{
label: "身份证",
show: true,
},
{
label: "护照号",
show: true,
},
{
label: "护照签发地",
show: true,
},
{
label: "护照签发日期",
show: true,
},
{
label: "护照过期时间",
show: true,
},
{
label: "签发机关",
show: true,
},
{
label: "备注",
show: true,
},
{
label: "订单交易数",
show: true,
},
{
label: "订单金额",
show: true,
},
{
label: "出境记录",
show: true,
},
{
label: "家庭详细地址 ",
show: true,
},
{
label: "出生地点",
show: true,
},
{
label: "经济能力确认",
show: true,
},
{
label: "是否推存",
show: true,
},
],
CustomerId: 0,
CustomerIdStr: "",
transferVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: "新建直客",
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: "",
userInfo: {},
transferMsg: {
IDs: [],
EmpId: "",
},
msg: {
GusetName: "",
pageIndex: 1,
pageSize: 30,
ContactNumber: "",
WhereType: -1,
OrderBy: "",
ID: 36,
},
total: 0,
WhereTypeList: [
{
id: -1,
name: "全部",
},
{
id: 1,
name: "我负责的",
},
{
id: 2,
name: "下属的",
},
{
id: 3,
name: "我关注的",
},
],
selectionList: [
{
name: "转移",
class: "iconfont iconplus-transfer",
myFun: this.transfer,
},
{
name: "删除",
class: "iconfont icondelete",
myFun: this.delete,
},
],
sceneList: [],
SceneEmployeeList: [],
sceneID: 36,
visible: false,
};
},
mounted() {
this.userInfo = this.getLocalStorage();
console.log(this.queryType);
this.getList();
this.Employee();
let $this = this;
this.MsgBus.$on("closeCustomerDialogBox", function() {
$this.dialogTableVisible = false;
});
this.GetSceneEmployeeList();
this.MsgBus.$on("sceneSave", function(msg) {
$this.sceneList = [...msg];
$this.GetSceneEmployeeList();
let obj = {};
msg.forEach((element) => {
obj[element.name] = element;
});
$this.msg.Data = obj;
$this.getList();
});
this.MsgBus.$on("editScene", function() {
console.log(1);
$this.GetSceneEmployeeList();
});
},
beforeDestroy() {
this.MsgBus.$off("sceneSave");
this.MsgBus.$off("editScene");
},
methods: {
handleCommand(command) {
this.$message.warning("功能正在开发中~");
},
changeWhere(item) {
this.msg.ID = item.ID;
this.sceneID = item.ID;
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {};
this.msg.WhereType = item.WhereType;
this.visible = false;
this.getList();
},
GetSceneEmployeeList() {
this.apipost(
"/api/Scene/GetSceneEmployeeList",
{
LableType: 5,
},
(res) => {
if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data;
}
}
);
},
deleteScene(index) {
this.sceneList.splice(index, 1);
let obj = {};
this.sceneList.forEach((element) => {
obj[element.name] = element;
});
this.msg.Data = obj;
this.getList();
},
getMarriageStr(type) {
if (type === 5) return "其他";
if (type === 4) return "丧偶";
if (type === 3) return "未婚";
if (type === 2) return "离婚";
if (type === 1) return "已婚";
if (type === 0) return "无";
},
Employee() {
let msg = {
RB_Group_id: this.userInfo.RB_Group_id,
BranchId: -1,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
}
import mySelect from "../dialogModel/select";
import customerInfoBox from "./customerInfoBox";
import customerDialogBox from "./customerDialogBox";
export default {
components: {
mySelect,
customerInfoBox,
customerDialogBox,
},
data() {
return {
queryType2: [{
label: "客户名称",
show: true,
}, {
label: "手机号码",
show: true,
}, {
label: "地址",
show: true,
}, {
label: "客户来源",
show: true,
}, {
label: "参团数",
show: true,
}, {
label: "商机数",
show: true,
}, {
label: "总评分",
show: true,
}, {
label: "客户等级",
show: true,
}, {
label: "余额",
show: true,
}, {
label: "最后更新时间",
show: true,
}, {
label: "负责人",
show: true,
}, {
label: "创建时间",
show: true,
}, {
label: "创建人",
show: true,
}, {
label: "生日",
show: true,
}, {
label: "是否结婚",
show: true,
}, {
label: "职务",
show: true,
}, {
label: "是否高中生",
show: true,
}, {
label: "身份证",
show: true,
}, {
label: "护照号",
show: true,
}, {
label: "护照签发地",
show: true,
}, {
label: "护照签发日期",
show: true,
}, {
label: "护照过期时间",
show: true,
}, {
label: "签发机关",
show: true,
}, {
label: "备注",
show: true,
}, {
label: "订单交易数",
show: true,
}, {
label: "订单金额",
show: true,
}, {
label: "出境记录",
show: true,
}, {
label: "家庭详细地址 ",
show: true,
}, {
label: "出生地点",
show: true,
}, {
label: "经济能力确认",
show: true,
}, {
label: "是否推存",
show: true,
}, ],
queryType: [{
label: "客户名称",
show: true,
}, {
label: "手机号码",
show: true,
}, {
label: "地址",
show: true,
}, {
label: "客户来源",
show: true,
}, {
label: "参团数",
show: true,
}, {
label: "商机数",
show: true,
}, {
label: "总评分",
show: true,
}, {
label: "客户等级",
show: true,
}, {
label: "余额",
show: true,
}, {
label: "最后更新时间",
show: true,
}, {
label: "负责人",
show: true,
}, {
label: "创建时间",
show: true,
}, {
label: "创建人",
show: true,
}, {
label: "生日",
show: true,
}, {
label: "是否结婚",
show: true,
}, {
label: "职务",
show: true,
}, {
label: "是否高中生",
show: true,
}, {
label: "身份证",
show: true,
}, {
label: "护照号",
show: true,
}, {
label: "护照签发地",
show: true,
}, {
label: "护照签发日期",
show: true,
}, {
label: "护照过期时间",
show: true,
}, {
label: "签发机关",
show: true,
}, {
label: "备注",
show: true,
}, {
label: "订单交易数",
show: true,
}, {
label: "订单金额",
show: true,
}, {
label: "出境记录",
show: true,
}, {
label: "家庭详细地址 ",
show: true,
}, {
label: "出生地点",
show: true,
}, {
label: "经济能力确认",
show: true,
}, {
label: "是否推存",
show: true,
}, ],
CustomerId: 0,
CustomerIdStr: "",
transferVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: "新建直客",
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: "",
userInfo: {},
transferMsg: {
IDs: [],
EmpId: "",
},
msg: {
GusetName: "",
pageIndex: 1,
pageSize: 30,
ContactNumber: "",
WhereType: -1,
OrderBy: "",
ID: 36,
},
total: 0,
WhereTypeList: [{
id: -1,
name: "全部",
}, {
id: 1,
name: "我负责的",
}, {
id: 2,
name: "下属的",
}, {
id: 3,
name: "我关注的",
}, ],
selectionList: [{
name: "转移",
class: "iconfont iconplus-transfer",
myFun: this.transfer,
}, {
name: "删除",
class: "iconfont icondelete",
myFun: this.delete,
}, ],
sceneList: [],
SceneEmployeeList: [],
sceneID: 36,
visible: false,
};
},
mounted() {
this.userInfo = this.getLocalStorage();
console.log(this.queryType);
this.getList();
this.Employee();
let $this = this;
this.MsgBus.$on("closeCustomerDialogBox", function() {
$this.dialogTableVisible = false;
});
this.GetSceneEmployeeList();
this.MsgBus.$on("sceneSave", function(msg) {
$this.sceneList = [...msg];
$this.GetSceneEmployeeList();
let obj = {};
msg.forEach((element) => {
obj[element.name] = element;
});
$this.msg.Data = obj;
$this.getList();
});
this.MsgBus.$on("editScene", function() {
console.log(1);
$this.GetSceneEmployeeList();
});
},
(err) => {}
);
},
beforeDestroy() {
this.MsgBus.$off("sceneSave");
this.MsgBus.$off("editScene");
},
methods: {
handleCommand(command) {
this.$message.warning("功能正在开发中~");
},
changeWhere(item) {
this.msg.ID = item.ID;
this.sceneID = item.ID;
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {};
this.msg.WhereType = item.WhereType;
this.visible = false;
this.getList();
},
GetSceneEmployeeList() {
this.apipost(
"/api/Scene/GetSceneEmployeeList", {
LableType: 5,
},
(res) => {
if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data;
}
}
);
},
deleteScene(index) {
this.sceneList.splice(index, 1);
let obj = {};
this.sceneList.forEach((element) => {
obj[element.name] = element;
});
this.msg.Data = obj;
this.getList();
},
getMarriageStr(type) {
if (type === 5) return "其他";
if (type === 4) return "丧偶";
if (type === 3) return "未婚";
if (type === 2) return "离婚";
if (type === 1) return "已婚";
if (type === 0) return "无";
},
Employee() {
let msg = {
RB_Group_id: this.userInfo.RB_Group_id,
BranchId: -1,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
};
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {}
},
(err) => {}
);
},
//锁定
locking() {
console.log("锁定");
},
//解锁
Unlock() {
console.log("解锁");
},
//删除团队成员
delCust() {
console.log("删除团队成员");
},
//删除
delete() {
console.log("删除");
},
//导出
export() {
console.log("导出");
},
// 更改状态
changeState() {
console.log("更改状态");
},
// 关注
CareforCustomer(scope) {
this.apipost(
"/api/Customer/CareforGuesstCustomer",
{
ID: scope.row.ID,
//锁定
locking() {
console.log("锁定");
},
//解锁
Unlock() {
console.log("解锁");
},
//删除团队成员
delCust() {
console.log("删除团队成员");
},
//删除
delete() {
console.log("删除");
},
//导出
export () {
console.log("导出");
},
// 更改状态
changeState() {
console.log("更改状态");
},
// 关注
CareforCustomer(scope) {
this.apipost(
"/api/Customer/CareforGuesstCustomer", {
ID: scope.row.ID,
},
(res) => {
if (res.data.resultCode == 1) {
this.$message.success("操作成功");
this.getList();
}
}
);
},
// 转移
transfer(type) {
if (type !== 2) {
if (type === 3) {
this.multipleSelection.push(this.CustomerId);
}
this.transferVisible = true;
} else {
if (this.transferMsg.EmpId === "") {
return this.$message.error("请选择变更负责人!");
}
let str = "";
this.multipleSelection.map((x, i) => {
str = str + x + ",";
});
this.transferMsg.IDs = str.substring(0, str.length - 1);
this.apipost(
"/api/Customer/TransferGuesstCustomer",
this.transferMsg,
(res) => {
if (res.data.resultCode == 1) {
this.multipleSelection = [];
this.transferVisible = false;
if (type === 3) {} {
this.drawer = false;
}
this.$message.success(res.data.message);
this.getList();
this.transferMsg = {
IDs: [],
EmpId: "",
};
}
}
);
}
console.log("转移");
},
showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl;
if (list) {
this.queryType = list;
this.getList();
}
},
editCust() {
this.dialogTableVisibleName = "修改直客";
this.dialogTableVisible = true;
},
openDetails(scope) {
this.drawer = true;
this.CustomerId = scope.row.ID;
this.CustomerName = scope.row.GusetName;
},
handleSizeChange(val) {
this.msg.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleClose(done) {
done();
},
getList: function() {
this.tableData = [];
this.loading = true;
this.apipost(
"/api/Customer/GetGuesstCustomerPageList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.tableData.map((x) => {
if (x.EconomicCapability) {
x.EconomicCapability = JSON.parse(x.EconomicCapability);
} else {
x.EconomicCapability = [];
}
});
this.total = res.data.data.count;
this.loading = false;
}
}
);
},
handleSelectionChange(val) {
this.multipleSelection = val.map((x) => x.ID);
},
},
(res) => {
if (res.data.resultCode == 1) {
this.$message.success("操作成功");
this.getList();
}
}
);
},
// 转移
transfer(type) {
if (type !== 2) {
if (type === 3) {
this.multipleSelection.push(this.CustomerId);
}
this.transferVisible = true;
} else {
if (this.transferMsg.EmpId === "") {
return this.$message.error("请选择变更负责人!");
}
let str = "";
this.multipleSelection.map((x, i) => {
str = str + x + ",";
});
this.transferMsg.IDs = str.substring(0, str.length - 1);
this.apipost(
"/api/Customer/TransferGuesstCustomer",
this.transferMsg,
(res) => {
if (res.data.resultCode == 1) {
this.multipleSelection = [];
this.transferVisible = false;
if (type === 3) {
}
{
this.drawer = false;
}
this.$message.success(res.data.message);
this.getList();
this.transferMsg = {
IDs: [],
EmpId: "",
};
}
}
);
}
console.log("转移");
},
showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl;
if (list) {
this.queryType = list;
this.getList();
}
},
editCust() {
this.dialogTableVisibleName = "修改直客";
this.dialogTableVisible = true;
},
openDetails(scope) {
this.drawer = true;
this.CustomerId = scope.row.ID;
this.CustomerName = scope.row.GusetName;
},
handleSizeChange(val) {
this.msg.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleClose(done) {
done();
},
getList: function() {
this.tableData = [];
this.loading = true;
this.apipost(
"/api/Customer/GetGuesstCustomerPageList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.tableData.map((x) => {
if (x.EconomicCapability) {
x.EconomicCapability = JSON.parse(x.EconomicCapability);
} else {
x.EconomicCapability = [];
}
});
this.total = res.data.data.count;
this.loading = false;
}
}
);
},
handleSelectionChange(val) {
this.multipleSelection = val.map((x) => x.ID);
},
},
};
</script>
};
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment