Commit dc9c857a authored by 罗超's avatar 罗超

no message

parent 412d6e51
...@@ -120,9 +120,9 @@ ...@@ -120,9 +120,9 @@
<el-tab-pane label="商机" name="5"> <el-tab-pane label="商机" name="5">
<Business v-if="activeName === '5'" :ID="CustomerId" /> <Business v-if="activeName === '5'" :ID="CustomerId" />
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane label="订单" name="6"> <el-tab-pane label="订单" name="6">
<Agreement :ID="CustomerId" /> <Agreement v-if="activeName === '6'" :ID="CustomerId" />
</el-tab-pane> --> </el-tab-pane>
<el-tab-pane label="回款" name="7" v-if="false"> <el-tab-pane label="回款" name="7" v-if="false">
<!-- <MoneyBack /> --> <!-- <MoneyBack /> -->
</el-tab-pane> </el-tab-pane>
......
...@@ -230,6 +230,7 @@ export default { ...@@ -230,6 +230,7 @@ export default {
"isGuest", "isGuest",
"TicketOrderId", "TicketOrderId",
"GuestId", "GuestId",
"OrderId"
], ],
data() { data() {
return { return {
...@@ -268,110 +269,35 @@ export default { ...@@ -268,110 +269,35 @@ export default {
watch: { watch: {
ID: { ID: {
handler(val, oldVal) { handler(val, oldVal) {
console.log(val,'-1-11-'); // console.log(val,'-1-11-');
this.form.GuestId = val // this.form.GuestId = val
}, },
deep: true, deep: true,
}, },
CustomerId: { GuestId: {
handler(val, oldVal) { handler(val, oldVal) {
console.log(val); this.form.GuestId = val
}, },
deep: true, deep: true,
}, },
isGuest: { CustomerId: {
handler(val, oldVal) { handler(val, oldVal) {
if (val) { console.log(val);
this.form.CustomerType = 1;
this.getGuestList();
} else {
this.getCustomerList();
}
}, },
deep: true, deep: true,
}, },
}, },
mounted() { mounted() {
// console.log(this.isGuest);
// if (this.isGuest) { this.form.GuestId = this.GuestId
// this.form.CustomerType = 1; this.form.OrderId = this.OrderId
// this.getGuestList(); // console.log(this.GuestId, '----------')
// } else {
// this.getCustomerList();
// }
this.getLineList();
this.GetBusinessStatusEnum();
let $this = this; let $this = this;
if (this.CustomerId !== 0) {
this.form.CustomerId = this.CustomerId;
}
setTimeout(() => { setTimeout(() => {
$this.dialogTableVisible = true; $this.dialogTableVisible = true;
}, 50); }, 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: { 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() { closedDialog() {
this.MsgBus.$emit("closeTicketOrderDialogBox"); this.MsgBus.$emit("closeTicketOrderDialogBox");
}, },
...@@ -379,15 +305,8 @@ export default { ...@@ -379,15 +305,8 @@ export default {
this.apipost("/api/Order/SetGuestOrderInfo", this.form, (res) => { this.apipost("/api/Order/SetGuestOrderInfo", this.form, (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dialogTableVisible = false; this.dialogTableVisible = false;
// 有id 发送更新抽屉消息 this.$message.success("操作成功");
if (this.CustomerId !== 0) { this.MsgBus.$emit("closeTicketOrderDialogBox");
this.$message.success("操作成功");
this.MsgBus.$emit("RefreshInfoBox");
} else {
this.$message.success("操作成功");
}
this.$emit("getList");
this.MsgBus.$emit("RefreshbusSelect");
this.resetForm("form"); this.resetForm("form");
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
...@@ -395,8 +314,8 @@ export default { ...@@ -395,8 +314,8 @@ export default {
}); });
}, },
submitForm(addMsg) { submitForm(addMsg) {
console.log(this.form, '-----') // console.log(this.form, '-----')
return // return
//提交创建、修改表单 //提交创建、修改表单
this.$refs[addMsg].validate((valid) => { this.$refs[addMsg].validate((valid) => {
if (valid) { if (valid) {
......
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
<!-- 添加机票订单 --> <!-- 添加机票订单 -->
<div v-if="dialogTicketOrderVisible"> <div v-if="dialogTicketOrderVisible">
<ticketOrder :name="dialogTicketOrderVisibleName" <ticketOrder :name="dialogTicketOrderVisibleName"
:ID="TicketOrderID" :GuestId="GuestId" :ID="TicketOrderID" :GuestId="GuestId" :obj="obj"
:msg="msg" type="1"/> type="1"/>
</div> </div>
<!-- 客户信息抽屉 --> <!-- 客户信息抽屉 -->
<el-drawer <el-drawer
...@@ -285,15 +285,16 @@ export default { ...@@ -285,15 +285,16 @@ export default {
SceneID: 0, SceneID: 0,
TicketOrderID: 0, TicketOrderID: 0,
GuestId: 0, GuestId: 0,
obj: {}
}; };
}, },
watch:{ watch:{
// ID: { ID: {
// handler(val, oldVal){ handler(val, oldVal){
// this.TicketOrderID = val this.TicketOrderID = val
// }, },
// deep:true deep:true
// } }
}, },
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
...@@ -318,13 +319,20 @@ export default { ...@@ -318,13 +319,20 @@ export default {
this.MsgBus.$on("closeBusinessDialogBox", function() { this.MsgBus.$on("closeBusinessDialogBox", function() {
$this.dialogBusinessVisible = false; $this.dialogBusinessVisible = false;
}); });
this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId,a,b) { this.MsgBus.$on("addTicketOrderBoxOpen", function(GuestId) {
$this.dialogTicketOrderVisibleName = "新建机票订单";
$this.GuestId = GuestId;
$this.dialogTicketOrderVisible = true;
});
this.MsgBus.$on("editTicketOrderBoxOpen", function(GuestId,obj) {
$this.dialogTicketOrderVisibleName = "编辑订单金额";
$this.GuestId = GuestId; $this.GuestId = GuestId;
$this.obj = obj;
$this.dialogTicketOrderVisible = true; $this.dialogTicketOrderVisible = true;
this.dialogTicketOrderVisibleName = "新建机票订单";
}); });
this.MsgBus.$on("closeTicketOrderDialogBox", function() { this.MsgBus.$on("closeTicketOrderDialogBox", function() {
$this.dialogTicketOrderVisible = false; $this.dialogTicketOrderVisible = false;
this.$emit("getList");
}); });
this.MsgBus.$on("closeCustomerDialogBox", function() { this.MsgBus.$on("closeCustomerDialogBox", function() {
$this.dialogCustomerVisible = false; $this.dialogCustomerVisible = 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