Commit dc9c857a authored by 罗超's avatar 罗超

no message

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