Commit fad01280 authored by zhengke's avatar zhengke

111

parent cea090ac
<style> <style>
@import "../../assets/css/customerManage.css"; @import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table { .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important; padding-bottom: 8px !important;
} }
</style> </style>
<template> <template>
<div class="customerManage"> <div class="customerManage">
...@@ -245,555 +245,478 @@ ...@@ -245,555 +245,478 @@
</div> </div>
</template> </template>
<script> <script>
import mySelect from "../dialogModel/select"; import mySelect from "../dialogModel/select";
import customerInfoBox from "./customerInfoBox"; import customerInfoBox from "./customerInfoBox";
import customerDialogBox from "./customerDialogBox"; import customerDialogBox from "./customerDialogBox";
export default { export default {
components: { components: {
mySelect, mySelect,
customerInfoBox, customerInfoBox,
customerDialogBox, customerDialogBox,
}, },
data() { data() {
return { return {
queryType2: [ queryType2: [{
{ label: "客户名称",
label: "客户名称", show: true,
show: true, }, {
}, label: "手机号码",
{ show: true,
label: "手机号码", }, {
show: true, label: "地址",
}, show: true,
{ }, {
label: "地址", label: "客户来源",
show: true, show: true,
}, }, {
{ label: "参团数",
label: "客户来源", show: true,
show: true, }, {
}, label: "商机数",
{ show: true,
label: "参团数", }, {
show: true, label: "总评分",
}, show: true,
{ }, {
label: "商机数", label: "客户等级",
show: true, show: true,
}, }, {
{ label: "余额",
label: "总评分", show: true,
show: true, }, {
}, label: "最后更新时间",
{ show: true,
label: "客户等级", }, {
show: true, label: "负责人",
}, show: true,
{ }, {
label: "余额", label: "创建时间",
show: true, show: true,
}, }, {
{ label: "创建人",
label: "最后更新时间", show: true,
show: true, }, {
}, label: "生日",
{ show: true,
label: "负责人", }, {
show: true, label: "是否结婚",
}, show: true,
{ }, {
label: "创建时间", label: "职务",
show: true, show: true,
}, }, {
{ label: "是否高中生",
label: "创建人", show: true,
show: true, }, {
}, label: "身份证",
{ show: true,
label: "生日", }, {
show: true, label: "护照号",
}, show: true,
{ }, {
label: "是否结婚", label: "护照签发地",
show: true, show: true,
}, }, {
{ label: "护照签发日期",
label: "职务", show: true,
show: true, }, {
}, label: "护照过期时间",
{ show: true,
label: "是否高中生", }, {
show: true, label: "签发机关",
}, show: true,
{ }, {
label: "身份证", label: "备注",
show: true, show: true,
}, }, {
{ label: "订单交易数",
label: "护照号", show: true,
show: true, }, {
}, label: "订单金额",
{ show: true,
label: "护照签发地", }, {
show: true, label: "出境记录",
}, show: true,
{ }, {
label: "护照签发日期", label: "家庭详细地址 ",
show: true, show: true,
}, }, {
{ label: "出生地点",
label: "护照过期时间", show: true,
show: true, }, {
}, label: "经济能力确认",
{ show: true,
label: "签发机关", }, {
show: true, label: "是否推存",
}, show: true,
{ }, ],
label: "备注", queryType: [{
show: true, label: "客户名称",
}, show: true,
{ }, {
label: "订单交易数", label: "手机号码",
show: true, show: true,
}, }, {
{ label: "地址",
label: "订单金额", show: true,
show: true, }, {
}, label: "客户来源",
{ show: true,
label: "出境记录", }, {
show: true, label: "参团数",
}, show: true,
{ }, {
label: "家庭详细地址 ", label: "商机数",
show: true, show: true,
}, }, {
{ label: "总评分",
label: "出生地点", show: true,
show: true, }, {
}, label: "客户等级",
{ show: true,
label: "经济能力确认", }, {
show: true, label: "余额",
}, show: true,
{ }, {
label: "是否推存", label: "最后更新时间",
show: true, show: true,
}, }, {
], label: "负责人",
queryType: [ show: true,
{ }, {
label: "客户名称", label: "创建时间",
show: true, show: true,
}, }, {
{ label: "创建人",
label: "手机号码", show: true,
show: true, }, {
}, label: "生日",
{ show: true,
label: "地址", }, {
show: true, label: "是否结婚",
}, show: true,
{ }, {
label: "客户来源", label: "职务",
show: true, show: true,
}, }, {
{ label: "是否高中生",
label: "参团数", show: true,
show: true, }, {
}, label: "身份证",
{ show: true,
label: "商机数", }, {
show: true, label: "护照号",
}, show: true,
{ }, {
label: "总评分", label: "护照签发地",
show: true, show: true,
}, }, {
{ label: "护照签发日期",
label: "客户等级", show: true,
show: true, }, {
}, label: "护照过期时间",
{ show: true,
label: "余额", }, {
show: true, label: "签发机关",
}, show: true,
{ }, {
label: "最后更新时间", label: "备注",
show: true, show: true,
}, }, {
{ label: "订单交易数",
label: "负责人", show: true,
show: true, }, {
}, label: "订单金额",
{ show: true,
label: "创建时间", }, {
show: true, label: "出境记录",
}, show: true,
{ }, {
label: "创建人", label: "家庭详细地址 ",
show: true, show: true,
}, }, {
{ label: "出生地点",
label: "生日", show: true,
show: true, }, {
}, label: "经济能力确认",
{ show: true,
label: "是否结婚", }, {
show: true, label: "是否推存",
}, show: true,
{ }, ],
label: "职务", CustomerId: 0,
show: true, CustomerIdStr: "",
}, transferVisible: false,
{ mySelectCtrl: false,
label: "是否高中生", drawer: false,
show: true, loading: true,
}, dialogTableVisible: false,
{ dialogTableVisibleName: "新建直客",
label: "身份证", tableData: [],
show: true, multipleSelection: [],
}, EmployeeList: [],
{ value: "",
label: "护照号", userInfo: {},
show: true, transferMsg: {
}, IDs: [],
{ EmpId: "",
label: "护照签发地", },
show: true, msg: {
}, GusetName: "",
{ pageIndex: 1,
label: "护照签发日期", pageSize: 30,
show: true, ContactNumber: "",
}, WhereType: -1,
{ OrderBy: "",
label: "护照过期时间", ID: 36,
show: true, },
}, total: 0,
{ WhereTypeList: [{
label: "签发机关", id: -1,
show: true, name: "全部",
}, }, {
{ id: 1,
label: "备注", name: "我负责的",
show: true, }, {
}, id: 2,
{ name: "下属的",
label: "订单交易数", }, {
show: true, id: 3,
}, name: "我关注的",
{ }, ],
label: "订单金额", selectionList: [{
show: true, name: "转移",
}, class: "iconfont iconplus-transfer",
{ myFun: this.transfer,
label: "出境记录", }, {
show: true, name: "删除",
}, class: "iconfont icondelete",
{ myFun: this.delete,
label: "家庭详细地址 ", }, ],
show: true, sceneList: [],
}, SceneEmployeeList: [],
{ sceneID: 36,
label: "出生地点", visible: false,
show: true, };
}, },
{ mounted() {
label: "经济能力确认", this.userInfo = this.getLocalStorage();
show: true, console.log(this.queryType);
}, this.getList();
{ this.Employee();
label: "是否推存", let $this = this;
show: true, this.MsgBus.$on("closeCustomerDialogBox", function() {
}, $this.dialogTableVisible = false;
], });
CustomerId: 0, this.GetSceneEmployeeList();
CustomerIdStr: "", this.MsgBus.$on("sceneSave", function(msg) {
transferVisible: false, $this.sceneList = [...msg];
mySelectCtrl: false, $this.GetSceneEmployeeList();
drawer: false, let obj = {};
loading: true, msg.forEach((element) => {
dialogTableVisible: false, obj[element.name] = element;
dialogTableVisibleName: "新建直客", });
tableData: [], $this.msg.Data = obj;
multipleSelection: [], $this.getList();
EmployeeList: [], });
value: "", this.MsgBus.$on("editScene", function() {
userInfo: {}, console.log(1);
transferMsg: { $this.GetSceneEmployeeList();
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 {
}
}, },
(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() { locking() {
console.log("锁定"); console.log("锁定");
}, },
//解锁 //解锁
Unlock() { Unlock() {
console.log("解锁"); console.log("解锁");
}, },
//删除团队成员 //删除团队成员
delCust() { delCust() {
console.log("删除团队成员"); console.log("删除团队成员");
}, },
//删除 //删除
delete() { delete() {
console.log("删除"); console.log("删除");
}, },
//导出 //导出
export() { export () {
console.log("导出"); console.log("导出");
}, },
// 更改状态 // 更改状态
changeState() { changeState() {
console.log("更改状态"); console.log("更改状态");
}, },
// 关注 // 关注
CareforCustomer(scope) { CareforCustomer(scope) {
this.apipost( this.apipost(
"/api/Customer/CareforGuesstCustomer", "/api/Customer/CareforGuesstCustomer", {
{ ID: scope.row.ID,
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) { </script>
this.$message.success("操作成功"); \ No newline at end of file
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>
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