Commit 50716234 authored by 罗超's avatar 罗超

调整部分样式与功能

parent 35b8eb2a
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
}, },
addBusiness() { addBusiness() {
let $this = this; let $this = this;
this.MsgBus.$emit("addBusinessBoxOpen", $this.ID, 0, true); this.MsgBus.$emit("addTicketOrderBoxOpen", $this.ID, 0, true);
}, },
guanlian() {}, guanlian() {},
jiechuguanlian() {}, jiechuguanlian() {},
......
<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">
...@@ -116,8 +116,10 @@ ...@@ -116,8 +116,10 @@
width="120" width="120"
v-if="queryType[0].show" v-if="queryType[0].show"
show-overflow-tooltip> show-overflow-tooltip>
<template @click="openDetails(scope)" slot-scope="scope"> <template slot-scope="scope">
<div style="width:100%;min-height:38px" class="cp" @click="openDetails(scope)">
<p class="font-color-link cp">{{scope.row.GusetName}}</p> <p class="font-color-link cp">{{scope.row.GusetName}}</p>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="MobilePhone" label="手机号码" width="120" v-if="queryType[1].show" show-overflow-tooltip> <el-table-column prop="MobilePhone" label="手机号码" width="120" v-if="queryType[1].show" show-overflow-tooltip>
...@@ -243,254 +245,326 @@ ...@@ -243,254 +245,326 @@
</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: '手机号码', {
label: "手机号码",
show: true, show: true,
}, { },
label: '地址', {
label: "地址",
show: true, show: true,
}, { },
label: '客户来源', {
label: "客户来源",
show: true, show: true,
}, { },
label: '参团数', {
label: "参团数",
show: true, show: true,
}, { },
label: '商机数', {
label: "商机数",
show: true, show: true,
}, { },
label: '总评分', {
label: "总评分",
show: true, show: true,
}, { },
label: '客户等级', {
label: "客户等级",
show: true, show: true,
}, { },
label: '余额', {
label: "余额",
show: true, show: true,
}, { },
label: '最后更新时间', {
label: "最后更新时间",
show: true, show: true,
}, { },
label: '负责人', {
label: "负责人",
show: true, show: true,
}, { },
label: '创建时间', {
label: "创建时间",
show: true, show: true,
}, { },
label: '创建人', {
label: "创建人",
show: true, show: true,
}, { },
label: '生日', {
label: "生日",
show: true, show: true,
}, { },
label: '是否结婚', {
label: "是否结婚",
show: true, show: true,
}, { },
label: '职务', {
label: "职务",
show: true, show: true,
}, { },
label: '是否高中生', {
label: "是否高中生",
show: true, show: true,
}, { },
label: '身份证', {
label: "身份证",
show: true, show: true,
}, { },
label: '护照号', {
label: "护照号",
show: true, show: true,
}, { },
label: '护照签发地', {
label: "护照签发地",
show: true, show: true,
}, { },
label: '护照签发日期', {
label: "护照签发日期",
show: true, show: true,
}, { },
label: '护照过期时间', {
label: "护照过期时间",
show: true, show: true,
}, { },
label: '签发机关', {
label: "签发机关",
show: true, show: true,
}, { },
label: '备注', {
label: "备注",
show: true, show: true,
}, { },
label: '订单交易数', {
label: "订单交易数",
show: true, show: true,
}, { },
label: '订单金额', {
label: "订单金额",
show: true, show: true,
}, { },
label: '出境记录', {
label: "出境记录",
show: true, show: true,
}, { },
label: '家庭详细地址 ', {
label: "家庭详细地址 ",
show: true, show: true,
}, { },
label: '出生地点', {
label: "出生地点",
show: true, show: true,
}, { },
label: '经济能力确认', {
label: "经济能力确认",
show: true, show: true,
}, { },
label: '是否推存', {
label: "是否推存",
show: true, show: true,
}], },
queryType: [{ ],
label: '客户名称', queryType: [
{
label: "客户名称",
show: true, show: true,
}, { },
label: '手机号码', {
label: "手机号码",
show: true, show: true,
}, { },
label: '地址', {
label: "地址",
show: true, show: true,
}, { },
label: '客户来源', {
label: "客户来源",
show: true, show: true,
}, { },
label: '参团数', {
label: "参团数",
show: true, show: true,
}, { },
label: '商机数', {
label: "商机数",
show: true, show: true,
}, { },
label: '总评分', {
label: "总评分",
show: true, show: true,
}, { },
label: '客户等级', {
label: "客户等级",
show: true, show: true,
}, { },
label: '余额', {
label: "余额",
show: true, show: true,
}, { },
label: '最后更新时间', {
label: "最后更新时间",
show: true, show: true,
}, { },
label: '负责人', {
label: "负责人",
show: true, show: true,
}, { },
label: '创建时间', {
label: "创建时间",
show: true, show: true,
}, { },
label: '创建人', {
label: "创建人",
show: true, show: true,
}, { },
label: '生日', {
label: "生日",
show: true, show: true,
}, { },
label: '是否结婚', {
label: "是否结婚",
show: true, show: true,
}, { },
label: '职务', {
label: "职务",
show: true, show: true,
}, { },
label: '是否高中生', {
label: "是否高中生",
show: true, show: true,
}, { },
label: '身份证', {
label: "身份证",
show: true, show: true,
}, { },
label: '护照号', {
label: "护照号",
show: true, show: true,
}, { },
label: '护照签发地', {
label: "护照签发地",
show: true, show: true,
}, { },
label: '护照签发日期', {
label: "护照签发日期",
show: true, show: true,
}, { },
label: '护照过期时间', {
label: "护照过期时间",
show: true, show: true,
}, { },
label: '签发机关', {
label: "签发机关",
show: true, show: true,
}, { },
label: '备注', {
label: "备注",
show: true, show: true,
}, { },
label: '订单交易数', {
label: "订单交易数",
show: true, show: true,
}, { },
label: '订单金额', {
label: "订单金额",
show: true, show: true,
}, { },
label: '出境记录', {
label: "出境记录",
show: true, show: true,
}, { },
label: '家庭详细地址 ', {
label: "家庭详细地址 ",
show: true, show: true,
}, { },
label: '出生地点', {
label: "出生地点",
show: true, show: true,
}, { },
label: '经济能力确认', {
label: "经济能力确认",
show: true, show: true,
}, { },
label: '是否推存', {
label: "是否推存",
show: true, show: true,
}], },
],
CustomerId: 0, CustomerId: 0,
CustomerIdStr: '', CustomerIdStr: "",
transferVisible: false, transferVisible: false,
mySelectCtrl: false, mySelectCtrl: false,
drawer: false, drawer: false,
loading: true, loading: true,
dialogTableVisible: false, dialogTableVisible: false,
dialogTableVisibleName: '新建直客', dialogTableVisibleName: "新建直客",
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
EmployeeList: [], EmployeeList: [],
value: '', value: "",
userInfo: {}, userInfo: {},
transferMsg: { transferMsg: {
IDs: [], IDs: [],
EmpId: '', EmpId: "",
}, },
msg: { msg: {
GusetName: '', GusetName: "",
pageIndex: 1, pageIndex: 1,
pageSize: 30, pageSize: 30,
ContactNumber: '', ContactNumber: "",
WhereType: -1, WhereType: -1,
OrderBy: '', OrderBy: "",
ID: 36 ID: 36,
}, },
total: 0, total: 0,
WhereTypeList: [{ WhereTypeList: [
{
id: -1, id: -1,
name: '全部' name: "全部",
}, { },
{
id: 1, id: 1,
name: '我负责的' name: "我负责的",
}, { },
{
id: 2, id: 2,
name: '下属的' name: "下属的",
}, { },
{
id: 3, id: 3,
name: '我关注的' name: "我关注的",
}, ], },
selectionList: [{ ],
name: '转移', selectionList: [
class: 'iconfont iconplus-transfer', {
myFun: this.transfer name: "转移",
}, { class: "iconfont iconplus-transfer",
name: '删除', myFun: this.transfer,
class: 'iconfont icondelete', },
myFun: this.delete {
}, ], name: "删除",
class: "iconfont icondelete",
myFun: this.delete,
},
],
sceneList: [], sceneList: [],
SceneEmployeeList: [], SceneEmployeeList: [],
sceneID: 36, sceneID: 36,
...@@ -499,70 +573,74 @@ ...@@ -499,70 +573,74 @@
}, },
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
console.log(this.queryType) console.log(this.queryType);
this.getList() this.getList();
this.Employee() this.Employee();
let $this = this let $this = this;
this.MsgBus.$on('closeCustomerDialogBox', function() { this.MsgBus.$on("closeCustomerDialogBox", function() {
$this.dialogTableVisible = false $this.dialogTableVisible = false;
}) });
this.GetSceneEmployeeList() this.GetSceneEmployeeList();
this.MsgBus.$on('sceneSave', function(msg) { this.MsgBus.$on("sceneSave", function(msg) {
$this.sceneList = [...msg] $this.sceneList = [...msg];
$this.GetSceneEmployeeList() $this.GetSceneEmployeeList();
let obj = {} let obj = {};
msg.forEach(element => { msg.forEach((element) => {
obj[element.name] = element obj[element.name] = element;
});
$this.msg.Data = obj;
$this.getList();
});
this.MsgBus.$on("editScene", function() {
console.log(1);
$this.GetSceneEmployeeList();
}); });
$this.msg.Data = obj
$this.getList()
})
this.MsgBus.$on('editScene', function() {
console.log(1)
$this.GetSceneEmployeeList()
})
}, },
beforeDestroy() { beforeDestroy() {
this.MsgBus.$off('sceneSave'); this.MsgBus.$off("sceneSave");
this.MsgBus.$off('editScene'); this.MsgBus.$off("editScene");
}, },
methods: { methods: {
handleCommand(command) { handleCommand(command) {
this.$message.warning('功能正在开发中~'); this.$message.warning("功能正在开发中~");
}, },
changeWhere(item) { changeWhere(item) {
this.msg.ID = item.ID this.msg.ID = item.ID;
this.sceneID = item.ID this.sceneID = item.ID;
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {} this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {};
this.msg.WhereType = item.WhereType this.msg.WhereType = item.WhereType;
this.visible = false this.visible = false;
this.getList() this.getList();
}, },
GetSceneEmployeeList() { GetSceneEmployeeList() {
this.apipost('/api/Scene/GetSceneEmployeeList', { this.apipost(
LableType: 5 "/api/Scene/GetSceneEmployeeList",
}, res => { {
LableType: 5,
},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data this.SceneEmployeeList = res.data.data;
}
} }
}) );
}, },
deleteScene(index) { deleteScene(index) {
this.sceneList.splice(index, 1) this.sceneList.splice(index, 1);
let obj = {} let obj = {};
this.sceneList.forEach(element => { this.sceneList.forEach((element) => {
obj[element.name] = element obj[element.name] = element;
}); });
this.msg.Data = obj this.msg.Data = obj;
this.getList() this.getList();
}, },
getMarriageStr(type) { getMarriageStr(type) {
if (type === 5) return '其他' if (type === 5) return "其他";
if (type === 4) return '丧偶' if (type === 4) return "丧偶";
if (type === 3) return '未婚' if (type === 3) return "未婚";
if (type === 2) return '离婚' if (type === 2) return "离婚";
if (type === 1) return '已婚' if (type === 1) return "已婚";
if (type === 0) return '无' if (type === 0) return "无";
}, },
Employee() { Employee() {
let msg = { let msg = {
...@@ -571,106 +649,117 @@ ...@@ -571,106 +649,117 @@
DepartmentId: 0, DepartmentId: 0,
PostId: 0, PostId: 0,
IsLeave: 0, IsLeave: 0,
} };
this.apipost2( this.apipost2(
"admin_get_EmployeeGetList", "admin_get_EmployeeGetList",
this.msg, this.msg,
res => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data; this.EmployeeList = res.data.data;
} else {} } else {
}
}, },
err => {} (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('/api/Customer/CareforGuesstCustomer', { this.apipost(
ID: scope.row.ID "/api/Customer/CareforGuesstCustomer",
}, res => { {
ID: scope.row.ID,
},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success('操作成功'); this.$message.success("操作成功");
this.getList() this.getList();
}
} }
}) );
}, },
// 转移 // 转移
transfer(type) { transfer(type) {
if (type !== 2) { if (type !== 2) {
if (type === 3) { if (type === 3) {
this.multipleSelection.push(this.CustomerId) this.multipleSelection.push(this.CustomerId);
} }
this.transferVisible = true this.transferVisible = true;
} else { } else {
if (this.transferMsg.EmpId === '') { if (this.transferMsg.EmpId === "") {
return this.$message.error('请选择变更负责人!') return this.$message.error("请选择变更负责人!");
} }
let str = '' let str = "";
this.multipleSelection.map((x, i) => { this.multipleSelection.map((x, i) => {
str = str + x + ',' str = str + x + ",";
}) });
this.transferMsg.IDs = str.substring(0, str.length - 1) this.transferMsg.IDs = str.substring(0, str.length - 1);
this.apipost('/api/Customer/TransferGuesstCustomer', this.transferMsg, res => { this.apipost(
"/api/Customer/TransferGuesstCustomer",
this.transferMsg,
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.multipleSelection = [] this.multipleSelection = [];
this.transferVisible = false this.transferVisible = false;
if (type === 3) {} { if (type === 3) {
this.drawer = false }
{
this.drawer = false;
} }
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList() this.getList();
this.transferMsg = { this.transferMsg = {
IDs: [], IDs: [],
EmpId: '' EmpId: "",
};
} }
} }
}) );
} }
console.log('转移') console.log("转移");
}, },
showMessageFromChild(list) { showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl this.mySelectCtrl = !this.mySelectCtrl;
if (list) { if (list) {
this.queryType = list this.queryType = list;
this.getList() this.getList();
} }
}, },
editCust() { editCust() {
this.dialogTableVisibleName = '修改直客' this.dialogTableVisibleName = "修改直客";
this.dialogTableVisible = true this.dialogTableVisible = true;
}, },
openDetails(scope) { openDetails(scope) {
this.drawer = true this.drawer = true;
this.CustomerId = scope.row.ID this.CustomerId = scope.row.ID;
this.CustomerName = scope.row.GusetName this.CustomerName = scope.row.GusetName;
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.msg.pageSize = val this.msg.pageSize = val;
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -681,28 +770,30 @@ ...@@ -681,28 +770,30 @@
done(); done();
}, },
getList: function() { getList: function() {
this.tableData = [] this.tableData = [];
this.loading = true this.loading = true;
this.apipost('/api/Customer/GetGuesstCustomerPageList', this.msg, res => { this.apipost(
"/api/Customer/GetGuesstCustomerPageList",
this.msg,
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.tableData.map(x => { this.tableData.map((x) => {
if (x.EconomicCapability) { if (x.EconomicCapability) {
x.EconomicCapability = JSON.parse(x.EconomicCapability) x.EconomicCapability = JSON.parse(x.EconomicCapability);
} else { } else {
x.EconomicCapability = []; x.EconomicCapability = [];
} }
}) });
this.total = res.data.data.count; this.total = res.data.data.count;
this.loading = false; this.loading = false;
} }
}) }
);
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val.map(x => this.multipleSelection = val.map((x) => x.ID);
x.ID },
) },
} };
}
};
</script> </script>
<style>
.customerDialogBox.add-box .add-tit {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.customerDialogBox.add-box .add-tit p {
display: flex;
align-items: center;
font-weight: bold;
color: rgba(17, 17, 17, 1);
font-size: 14px;
}
.customerDialogBox.add-box .add-tit p span {
display: inline-block;
width: 6px;
height: 6px;
background: #409efe;
border-radius: 50%;
margin-right: 10px;
}
.customerDialogBox.add-box .el-dialog__header {
padding: 15px 20px;
background: rgba(255, 255, 255, 1);
}
.customerDialogBox.add-box .dialog-footer {
text-align: center;
background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px;
}
.customerDialogBox.add-box .el-dialog__footer {
padding: 0;
}
.customerDialogBox.add-box .el-dialog__body {
background-color: rgba(248, 250, 251, 1);
padding-top: 20px;
max-height: 500px;
overflow: auto;
}
.customerDialogBox .add-box-btn.el-button {
border-radius: 0;
background-color: #409efecc;
border-color: #409efecc;
color: white;
padding: 12px 43px;
}
.customerDialogBox .add-box-btn.el-button:hover {
background-color: #409efe;
border-color: #409efe;
color: white;
}
.customerDialogBox .add-box-btn.el-button.add-box-cancel {
color: #409efecc;
background-color: white;
}
.customerDialogBox .add-box-btn.el-button.add-box-cancel:hover {
color: #409efe;
background-color: white;
}
.customerDialogBox .el-input .el-input-group__append {
background-color: #409efe;
border-color: #409efe;
color: #fff;
}
.customerDialogBox .form-box .form-box-tit {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.customerDialogBox .form-box .radius {
display: flex;
width: 4px;
height: 4px;
background: rgba(255, 164, 117, 1);
border-radius: 50%;
margin-right: 10px;
}
.customerDialogBox .up-img-box .uib-item {
margin-right: 30px;
width: 120px;
height: 120px;
background-color: white;
position: relative;
margin-bottom: 30px;
}
.customerDialogBox .up-img-box .uib-item p {
position: absolute;
bottom: -30px;
font-size: 12px;
text-align: center;
width: 100%;
}
.customerDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
opacity: 1;
}
.customerDialogBox .imgzhe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
}
.customerDialogBox .imgzhe .imgzhe-btn {
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
text-align: center;
line-height: 120px;
position: absolute;
top: 0;
opacity: 1;
transition: all linear 0.5s;
}
.customerDialogBox .imgzhe .imgzhe-btn i {
font-size: 22px;
margin-right: 5px;
color: white;
cursor: pointer;
}
.customerDialogBox .up-ctrl {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.customerDialogBox .up-ctrl > div {
width: 100%;
height: 100%;
text-align: center;
line-height: 140px;
}
</style>
<template> <template>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false" class="add-box add-box1 customerDialogBox">
<div class="add-tit" slot="title">
<p><span></span>{{name}}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box" v-if="show">
<el-form :model="form" ref="form" class="MyEditForm" :rules="rules">
<p class="form-box-tit"><span class="radius"></span> 基本信息</p>
<el-row :gutter="30">
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="商机名称" prop="BusinessName">
<el-input placeholder="请输入商机名称" v-model="form.BusinessName"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户名称" prop="CustomerId">
<el-select v-model="form.CustomerId" :disabled="type==='1' ? true : false" placeholder="请选择客户" v-if="!isGuest">
<el-option
v-for="item in CustomerList"
:key="item.CustomerId"
:label="item.CustomerName"
:value="item.CustomerId">
</el-option>
</el-select>
<el-select v-model="form.CustomerId" :disabled="type==='1' ? true : false" placeholder="请选择客户" v-else>
<el-option
v-for="item in CustomerList"
:key="item.Id"
:label="item.GuestName"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="预计人数" prop="PeopleNumber">
<el-input placeholder="请输入预计人数" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" v-model="form.PeopleNumber"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="预算价格" prop="BudgetPrice">
<el-input placeholder="请输入预算价格" onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" v-model="form.BudgetPrice"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="线路" prop="LineId">
<el-select v-model="form.LineId" filterable @change="getLineTeamList(form.LineId)" placeholder="请选择线路">
<el-option
v-for="item in LineList"
:label='item.LineName' :value='item.LineID' :key='item.LineID'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="系列" prop="LineteamId">
<el-select v-model="form.LineteamId" filterable placeholder="请选择系列">
<el-option label='不限' value='0' key='0'></el-option>
<el-option
v-for="item in LineTeamList"
:label='item.name' :value='item.id' :key='item.id'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="8">
<div class="MyEditForm-item MyEditForm-item-time">
<el-form-item label="出发时间" prop="DepartTime">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.DepartTime"
:clearable="false"
type="datetime"
placeholder="选择出发时间">
</el-date-picker>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item MyEditForm-item-time">
<el-form-item label="商机状态" prop="BusinessStatus">
<el-select v-model="form.BusinessStatus" placeholder="请选择商机状态">
<el-option
v-for="item in BusinessStatusEnum"
:label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="备注">
<el-input type="textarea" placeholder="商机备注" v-model="form.Remark"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button>
</div>
</el-dialog>
</template> </template>
<script> <script>
export default {}; export default {
props: [
"ID",
"name",
"CustomerId",
"ContactId",
"type",
"isGuest",
"TicketOrderId",
"GuestId",
],
data() {
return {
CustomerList: [],
LineList: [],
LineTeamList: [],
dialogTableVisible: false,
form: {
ID: 0,
CustomerId: "",
BudgetPrice: "",
LineId: "",
BusinessName: "",
BusinessStatus: "",
LineteamId: "",
DepartTime: "",
PeopleNumber: 1,
Remark: "",
},
BusinessStatusEnum: [],
rules: {
CustomerId: [
{ required: true, message: "请选择客户", trigger: "change" },
],
BusinessName: [
{ required: true, message: "请输入商机名称", trigger: "blur" },
],
BudgetPrice: [
{ required: true, message: "请输入预算价格", trigger: "blur" },
],
BusinessStatus: [
{ required: true, message: "请选择商机状态", trigger: "change" },
],
LineId: [{ required: true, message: "请选择线路", trigger: "change" }],
LineteamId: [
{ required: true, message: "请选择系列", trigger: "change" },
],
DepartTime: [
{ required: true, message: "请选择时间", trigger: "change" },
],
PeopleNumber: [
{ required: true, message: "请输入预计人数", trigger: "blur" },
],
Remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
},
show: true,
};
},
watch: {
ID: {
handler(val, oldVal) {
console.log(val);
},
deep: true,
},
CustomerId: {
handler(val, oldVal) {
console.log(val);
},
deep: true,
},
isGuest: {
handler(val, oldVal) {
if (val) {
this.form.CustomerType = 1;
this.getGuestList();
} else {
this.getCustomerList();
}
},
deep: true,
},
},
mounted() {
console.log(this.isGuest);
if (this.isGuest) {
this.form.CustomerType = 1;
this.getGuestList();
} else {
this.getCustomerList();
}
this.getLineList();
this.GetBusinessStatusEnum();
let $this = this;
if (this.CustomerId !== 0) {
this.form.CustomerId = this.CustomerId;
}
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
if (this.ID !== 0) {
let msg = {
BusinessId: this.ID,
};
if (this.isGuest) {
msg.CustomerType = 1;
}
this.apipost("/api/Customer/GetAllBusinessModel", msg, (res) => {
if (res.data.resultCode == 1) {
let data = res.data.data;
if (data.LineId) {
this.getLineTeamList(data.LineId, 1);
}
this.form = data;
}
});
}
},
methods: {
//获取系列列表
getLineTeamList(lineId, type) {
if (!type) {
this.form.LineteamId = "";
}
this.apipost2(
"b2b_get_GetLineTeam",
{
lineId: lineId,
},
(res) => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
}
}
);
},
getLineList() {
this.apipost2("line_post_GetAllList", {}, (res) => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
GetBusinessStatusEnum() {
this.apipost("/api/Customer/GetBusinessStatusEnum", {}, (res) => {
if (res.data.resultCode == 1) {
this.BusinessStatusEnum = res.data.data;
}
});
},
getGuestList() {
this.apipost("/api/Customer/GetGuesstCustomerByCreateList", {}, (res) => {
if (res.data.resultCode == 1) {
this.CustomerList = res.data.data;
}
});
},
getCustomerList() {
this.apipost("/api/Customer/GetCustomerListByCreateInfo", {}, (res) => {
if (res.data.resultCode == 1) {
this.CustomerList = res.data.data;
}
});
},
closedDialog() {
this.MsgBus.$emit("closeBusinessDialogBox");
},
addData() {
this.apipost("/api/Customer/CreateCustomerBusiness", this.form, (res) => {
if (res.data.resultCode == 1) {
this.dialogTableVisible = false;
// 有id 发送更新抽屉消息
if (this.CustomerId !== 0) {
this.$message.success("操作成功");
this.MsgBus.$emit("RefreshInfoBox");
} else {
this.$message.success("操作成功");
}
this.$emit("getList");
this.MsgBus.$emit("RefreshbusSelect");
this.resetForm("form");
} else {
this.$message.error(res.data.message);
}
});
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
resetForm(formName) {
// 重置表单
this.form = {
ID: 0,
CustomerId: 0,
BudgetPrice: "",
LineId: "",
BusinessName: "",
BusinessStatus: "",
LineteamId: "",
DepartTime: "",
PeopleNumber: 0,
Remark: "",
};
this.$refs[formName].resetFields();
},
},
};
</script> </script>
<style>
</style>
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
url: "", url: "",
showViewer: false, showViewer: false,
dialogBusinessVisible: false, dialogBusinessVisible: false,
dialogTicketOrderVisibleName: "新建商机", dialogTicketOrderVisibleName: "新建机票订单",
dialogTicketOrderVisible: false, dialogTicketOrderVisible: false,
CustomerId: 0, CustomerId: 0,
ContactId: 0, ContactId: 0,
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId) { this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId) {
$this.GuestId = GuestId; $this.GuestId = GuestId;
$this.dialogTicketOrderVisible = true; $this.dialogTicketOrderVisible = true;
this.dialogTicketOrderVisibleName = "新建订单"; this.dialogTicketOrderVisibleName = "新建机票订单";
}); });
this.MsgBus.$on("closeTicketOrderDialogBox", function() { this.MsgBus.$on("closeTicketOrderDialogBox", function() {
$this.dialogTicketOrderVisible = false; $this.dialogTicketOrderVisible = false;
......
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