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

页面修改

parent 7107e7af
......@@ -2,36 +2,48 @@
</style>
<template>
<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>
<el-table-column prop="FlightName" label="去程" width="160px">
<template slot-scope="scope">
<template v-if="scope.row.FlightName">
{{scope.row.FlightName.GoDate}}
<br />
{{scope.row.FlightName.Flight_number}}
{{scope.row.FlightName.Departure_time}}-{{scope.row.FlightName.Arrival_time}}
<br />
{{scope.row.FlightName.DepartureCityName}}({{scope.row.FlightName.DIATA}})
-{{scope.row.FlightName.ArrivalCityName}}({{scope.row.FlightName.AIATA}})
</template>
<template v-else>
<span style="color:red;">未配置</span>
</template>
</template>
</el-table-column>
<el-table-column prop="BackFlightName" label="回程" width="160px">
<template slot-scope="scope">
<template v-if="scope.row.BackFlightName">
{{scope.row.BackFlightName.BackDate}}
<br />
{{scope.row.BackFlightName.Flight_number}}
{{scope.row.BackFlightName.Departure_time}}-{{scope.row.BackFlightName.Arrival_time}}
<br />
{{scope.row.BackFlightName.DepartureCityName}}({{scope.row.BackFlightName.DIATA}})
-{{scope.row.BackFlightName.ArrivalCityName}}({{scope.row.BackFlightName.AIATA}})
</template>
<template v-else>
<span style="color:red;">未配置</span>
</template>
</template>
</el-table-column>
<el-table-column>
<template slot-scope="scope">
<template v-if="scope.row.TicketUnionId>0">
<a style="color:blue;cursor:pointer" @click="editOrderUnion(scope.row)">修改</a>
<a style="color:blue;cursor:pointer" @click="deleteOrderUnion(scope.row)">删除</a>
</template>
</template>
</el-table-column>
</el-table>
<br />
......@@ -46,6 +58,12 @@
<el-radio v-model="postMsg.IsSure" :label="0">暂定</el-radio>
<el-radio v-model="postMsg.IsSure" :label="1">确定</el-radio>
</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-input type="textarea" v-model="postMsg.TicketOrder" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
</el-form-item>
......@@ -68,8 +86,11 @@
TicketUnionId: 0, //判断新增还是修改
IsSure: 0, //0-暂定,1-确定
selectFlight: 1, //查询航班
GuestList: [], //选择的旅客
},
orderUnionList: [],
orderUnionList: [], //订单联运信息
orderGuestList: [], //订单旅客信息
}
},
mounted() {
......@@ -78,18 +99,38 @@
methods: {
//修改联运
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) {
console.log("item", item)
var that = this;
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() {
this.apipost("AirTicket_get_GetUnionTicketListByTCIDNew", this.postMsg,
(res) => {
console.log("AirTicket_get_GetUnionTicketListByTCIDNew", res.data);
if (res.data.resultCode == 1) {
this.orderUnionList = res.data.data;
}
......@@ -101,8 +142,9 @@
this.apipost("AirTicket_post_ImportUnionOrderFlight", this.postMsg,
(res) => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.clearMsg();
this.Success(res.data.message);
this.closeDialog();
//调用父页面刷新方法
this.$emit("success");
}
......@@ -111,27 +153,39 @@
},
//清空表单
clearMsg() {
this.postMsg.TCID = 0;
this.postMsg.OrderId = 0;
this.postMsg.TCID = this.orderInfo.TCID;
this.postMsg.OrderId = this.orderInfo.OrderId;
this.postMsg.TicketOrder = "";
this.postMsg.TicketUnionId = 0;
this.postMsg.IsSure = 0;
this.postMsg.GuestList = [];
},
//关闭弹窗
closeDialog() {
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: {
//监听订单属性编号
orderInfo: {
handler(newVal) {
handler(newVal, oldVal) {
this.orderGuestList = [];
this.orderUnionList = [];
this.postMsg.TCID = this.orderInfo.TCID;
this.postMsg.OrderId = this.orderInfo.OrderId;
this.postMsg.TicketUnionId = this.orderInfo.TicketUnionId;
if (this.postMsg.TCID > 0 || this.postMsg.OrderId > 0) {
this.getOrderUnionList();
}
this.getOrderGuestList();
},
deep: 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