Commit 6f8ba4c1 authored by 黄奎's avatar 黄奎

页面修改

parent 7107e7af
...@@ -2,35 +2,47 @@ ...@@ -2,35 +2,47 @@
</style> </style>
<template> <template>
<div class="clearfix"> <div class="clearfix">
<el-table :data="orderUnionList" stripe style="width:500px;"> <el-table :data="orderUnionList" stripe style="width:550px;">
<el-table-column prop="GuestNameInfo" label="旅客信息" width="120px"> <el-table-column prop="GuestNameInfo" label="旅客信息" width="120px">
</el-table-column> </el-table-column>
<el-table-column prop="FlightName" label="去程" width="160px"> <el-table-column prop="FlightName" label="去程" width="160px">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.FlightName"> <template v-if="scope.row.FlightName">
{{scope.row.FlightName.GoDate}}
<br />
{{scope.row.FlightName.Flight_number}} {{scope.row.FlightName.Flight_number}}
{{scope.row.FlightName.Departure_time}}-{{scope.row.FlightName.Arrival_time}} {{scope.row.FlightName.Departure_time}}-{{scope.row.FlightName.Arrival_time}}
<br /> <br />
{{scope.row.FlightName.DepartureCityName}}({{scope.row.FlightName.DIATA}}) {{scope.row.FlightName.DepartureCityName}}({{scope.row.FlightName.DIATA}})
-{{scope.row.FlightName.ArrivalCityName}}({{scope.row.FlightName.AIATA}}) -{{scope.row.FlightName.ArrivalCityName}}({{scope.row.FlightName.AIATA}})
</template> </template>
<template v-else>
<span style="color:red;">未配置</span>
</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="BackFlightName" label="回程" width="160px"> <el-table-column prop="BackFlightName" label="回程" width="160px">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.BackFlightName"> <template v-if="scope.row.BackFlightName">
{{scope.row.BackFlightName.BackDate}}
<br />
{{scope.row.BackFlightName.Flight_number}} {{scope.row.BackFlightName.Flight_number}}
{{scope.row.BackFlightName.Departure_time}}-{{scope.row.BackFlightName.Arrival_time}} {{scope.row.BackFlightName.Departure_time}}-{{scope.row.BackFlightName.Arrival_time}}
<br /> <br />
{{scope.row.BackFlightName.DepartureCityName}}({{scope.row.BackFlightName.DIATA}}) {{scope.row.BackFlightName.DepartureCityName}}({{scope.row.BackFlightName.DIATA}})
-{{scope.row.BackFlightName.ArrivalCityName}}({{scope.row.BackFlightName.AIATA}}) -{{scope.row.BackFlightName.ArrivalCityName}}({{scope.row.BackFlightName.AIATA}})
</template> </template>
<template v-else>
<span style="color:red;">未配置</span>
</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column> <el-table-column>
<template slot-scope="scope"> <template slot-scope="scope">
<a style="color:blue;cursor:pointer" @click="editOrderUnion(scope.row)">修改</a> <template v-if="scope.row.TicketUnionId>0">
<a style="color:blue;cursor:pointer" @click="deleteOrderUnion(scope.row)">删除</a> <a style="color:blue;cursor:pointer" @click="editOrderUnion(scope.row)">修改</a>
<a style="color:blue;cursor:pointer" @click="deleteOrderUnion(scope.row)">删除</a>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -46,6 +58,12 @@ ...@@ -46,6 +58,12 @@
<el-radio v-model="postMsg.IsSure" :label="0">暂定</el-radio> <el-radio v-model="postMsg.IsSure" :label="0">暂定</el-radio>
<el-radio v-model="postMsg.IsSure" :label="1">确定</el-radio> <el-radio v-model="postMsg.IsSure" :label="1">确定</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="适用旅客">
<el-select v-model="postMsg.GuestList" placeholder="请选择" multiple>
<el-option v-for="(item,index) in orderGuestList" :key="index" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="机票命令"> <el-form-item label="机票命令">
<el-input type="textarea" v-model="postMsg.TicketOrder" :autosize="{ minRows: 2, maxRows: 4}"></el-input> <el-input type="textarea" v-model="postMsg.TicketOrder" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
</el-form-item> </el-form-item>
...@@ -68,8 +86,11 @@ ...@@ -68,8 +86,11 @@
TicketUnionId: 0, //判断新增还是修改 TicketUnionId: 0, //判断新增还是修改
IsSure: 0, //0-暂定,1-确定 IsSure: 0, //0-暂定,1-确定
selectFlight: 1, //查询航班 selectFlight: 1, //查询航班
GuestList: [], //选择的旅客
}, },
orderUnionList: [], orderUnionList: [], //订单联运信息
orderGuestList: [], //订单旅客信息
} }
}, },
mounted() { mounted() {
...@@ -78,18 +99,38 @@ ...@@ -78,18 +99,38 @@
methods: { methods: {
//修改联运 //修改联运
editOrderUnion(item) { editOrderUnion(item) {
console.log("item", item) if (item.TicketUnionId) {
this.postMsg.TicketUnionId = item.TicketUnionId;
}
if (item.GuestList && item.GuestList.length > 0) {
this.postMsg.GuestList = item.GuestList;
}
if (item.IsSure) {
this.postMsg.IsSure = item.IsSure;
}
}, },
//删除联运 //删除联运
deleteOrderUnion(item) { deleteOrderUnion(item) {
var that = this;
console.log("item", item) that.Confirm("是否要删除此订单的联运信息?", function () {
var msg = {
TicketUnionId: item.TicketUnionId
};
that.apipost("AirTicket_post_DeleteUnionOrderFlight", msg,
res => {
if (res.data.resultCode == 1) {
that.Success('删除联运成功!');
that.getOrderUnionList();
} else {
that.Error(res.data.data);
}
}, null);
});
}, },
//获取订单设置联运信息 //获取订单设置联运信息
getOrderUnionList() { getOrderUnionList() {
this.apipost("AirTicket_get_GetUnionTicketListByTCIDNew", this.postMsg, this.apipost("AirTicket_get_GetUnionTicketListByTCIDNew", this.postMsg,
(res) => { (res) => {
console.log("AirTicket_get_GetUnionTicketListByTCIDNew", res.data);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.orderUnionList = res.data.data; this.orderUnionList = res.data.data;
} }
...@@ -101,8 +142,9 @@ ...@@ -101,8 +142,9 @@
this.apipost("AirTicket_post_ImportUnionOrderFlight", this.postMsg, this.apipost("AirTicket_post_ImportUnionOrderFlight", this.postMsg,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.clearMsg(); this.clearMsg();
this.Success(res.data.message);
this.closeDialog();
//调用父页面刷新方法 //调用父页面刷新方法
this.$emit("success"); this.$emit("success");
} }
...@@ -111,27 +153,39 @@ ...@@ -111,27 +153,39 @@
}, },
//清空表单 //清空表单
clearMsg() { clearMsg() {
this.postMsg.TCID = 0; this.postMsg.TCID = this.orderInfo.TCID;
this.postMsg.OrderId = 0; this.postMsg.OrderId = this.orderInfo.OrderId;
this.postMsg.TicketOrder = ""; this.postMsg.TicketOrder = "";
this.postMsg.TicketUnionId = 0; this.postMsg.TicketUnionId = 0;
this.postMsg.IsSure = 0; this.postMsg.IsSure = 0;
this.postMsg.GuestList = [];
}, },
//关闭弹窗 //关闭弹窗
closeDialog() { closeDialog() {
this.$emit("close"); this.$emit("close");
}, },
//获取订单旅客信息
getOrderGuestList() {
var guestMsg = {
OrderId: this.postMsg.OrderId
}
this.apipost("sellorder_get_GetTravelGuestList", guestMsg, res => {
if (res.data.resultCode == 1) {
this.orderGuestList = res.data.data.list;
}
})
},
}, },
watch: { watch: {
//监听订单属性编号 //监听订单属性编号
orderInfo: { orderInfo: {
handler(newVal) { handler(newVal, oldVal) {
this.orderGuestList = [];
this.orderUnionList = [];
this.postMsg.TCID = this.orderInfo.TCID; this.postMsg.TCID = this.orderInfo.TCID;
this.postMsg.OrderId = this.orderInfo.OrderId; this.postMsg.OrderId = this.orderInfo.OrderId;
this.postMsg.TicketUnionId = this.orderInfo.TicketUnionId; this.getOrderUnionList();
if (this.postMsg.TCID > 0 || this.postMsg.OrderId > 0) { this.getOrderGuestList();
this.getOrderUnionList();
}
}, },
deep: true, deep: true,
immediate: true, immediate: true,
......
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