Commit e2259260 authored by 黄奎's avatar 黄奎

1

parent 579b2fd0
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
<li> <li>
<span> <span>
<em>酒店名称:</em> <em>酒店名称:</em>
<el-select class="w180 multiple_input" v-model="msg.CompanyId" clearable filterable @change="getCondition"> <el-select class="w180 multiple_input" v-model="msg.HotelId" clearable filterable>
<el-option v-for="item in BranchList" :key="item.Id" :label="item.BName" :value="item.Id"> <el-option v-for="item in hotelList" :key="item.HotelId" :label="item.DiDaHotelName"
:value="item.HotelId">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
...@@ -34,44 +35,46 @@ ...@@ -34,44 +35,46 @@
<div> <div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading='loading'> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading='loading'>
<tr> <tr>
<th width="120">{{$t('admin.admin_company')}}</th> <th width="200">酒店名称</th>
<th width="100">机票编号</th> <th width="70">类型</th>
<th width="150">进出点</th> <template v-if="dataList&&dataList.length>0">
<th width="100">出发城市</th> <template v-for="(hItem,hIndex) in dataList[0].SubList">
<th width="100">直客价</th> <th :key="`d_h_`+hIndex">
<th width="100">团队价</th> {{hItem.CheckInStr}}({{hItem.WeekStr}})
<th width="100">去程日期</th> </th>
<th width="100">回程日期</th>
<th width="130">同步时间</th>
<th width="200">航班信息</th>
</tr>
<tr v-for="(item,index) in dataList" :key="`d_`+index">
<td>{{item.CompanyName}}</td>
<td>{{item.AirticketId}}</td>
<td>{{item.InOutStr}}</td>
<td>{{item.StartCity}}</td>
<td>{{item.Price}}</td>
<td>
<template v-if="item.CostPrice>item.Price">
<font style="color:red;font-weight:bold;">{{item.CostPrice}}</font>
</template> </template>
<template v-else> </template>
{{item.CostPrice}} </tr>
<template v-for="(item,index) in dataList">
<tr :key="`d_1_`+index">
<td rowspan="2">
{{item.DiDaHotelName}}
</td>
<td>
直客价
</td>
<template v-for="(hItem,hIndex) in item.SubList">
<td :key="`d_1_`+index+`d1_`+hIndex">
<template v-if="hItem.Price<hItem.TeamPrice">
<font style="color:red;">{{hItem.Price}}</font>
</template>
<template v-else>
{{hItem.Price}}
</template>
</td>
</template> </template>
</td> </tr>
<td>{{item.GoDate}}</td> <tr :key="`d_2_`+index">
<td>{{item.BackDate}}</td> <td>
<td>{{item.CreateTime}}</td> 道旅价
<td style="text-align:left; padding-left:10px;"> </td>
<template v-if="item.FlightList&&item.FlightList.length>0"> <template v-for="(hItem,hIndex) in item.SubList">
<template v-for="(subItem,subIndex) in item.FlightList"> <td :key="`d_2_`+index+`d2_`+hIndex">
<p :key="`d_`+index+`_f`+subIndex" style="line-height:1.5;">{{subItem.FlightNo}}&nbsp; {{hItem.TeamPrice}}
({{subItem.DepartureTime}})&nbsp;{{subItem.DepartureAirport}}&nbsp;-&nbsp;{{subItem.ArrivalAirport}} </td>
</p>
</template>
</template> </template>
</td> </tr>
</tr> </template>
</table> </table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"></el-pagination> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"></el-pagination>
...@@ -110,25 +113,18 @@ ...@@ -110,25 +113,18 @@
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 14, pageSize: 14,
AirLineID: "", //航空公司编号 HotelId: "",
LineId: "", //线路编号
AirticketId: "", //机票编号
StartCity: "", //出发城市
InOutStr: "", //方案
CompanyId: "", //出团公司
total: 0, //总条数 total: 0, //总条数
QStartDate: "", QStartDate: "",
QEndDate: "", QEndDate: "",
PriceState: 1, //1-异常
}, },
userInfo: {}, //当前登录用户 userInfo: {}, //当前登录用户
dataList: [], //数据列表 dataList: [], //数据列表
hotelList: [], //酒店列表
loading: false, loading: false,
}; };
}, },
methods: { methods: {
//翻页功能按钮 //翻页功能按钮
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
...@@ -144,7 +140,7 @@ ...@@ -144,7 +140,7 @@
this.dataList = []; this.dataList = [];
this.loading = true; this.loading = true;
this.apipost( this.apipost(
"AirTicket_post_GetSpiderFlightPage", this.msg, "AirTicket_post_GetSpiderHotelPage", this.msg,
res => { res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -156,6 +152,19 @@ ...@@ -156,6 +152,19 @@
} }
); );
}, },
getHotelList() {
this.apipost(
"AirTicket_post_GetSpiderHotelList", {},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.hotelList = res.data.data;
} else {
this.Error(res.data.message);
}
}
);
}
}, },
created() { created() {
if (this.$route.query) { if (this.$route.query) {
...@@ -163,6 +172,20 @@ ...@@ -163,6 +172,20 @@
// this.msg.AirticketId = this.$route.query.AirticketId; // this.msg.AirticketId = this.$route.query.AirticketId;
// } // }
} }
let myDate = new Date();
let nowDate =
myDate.getFullYear() +
"-" +
parseInt(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
this.msg.QStartDate = nowDate;
var currentDate = new Date(); // 获取当前时间
currentDate.setMonth(currentDate.getMonth() + 1); // 将当前时间的月份加1
this.msg.QEndDate = currentDate.getFullYear() + "-" + parseInt(currentDate.getMonth() + 1) + "-" + currentDate
.getDate();
this.getHotelList();
}, },
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
......
...@@ -452,20 +452,20 @@ ...@@ -452,20 +452,20 @@
<div v-for="(fItem,fIndex) in editForm.SelfFlightList" :key="'f_'+fIndex" <div v-for="(fItem,fIndex) in editForm.SelfFlightList" :key="'f_'+fIndex"
style="border:1px solid #C0C4CC;margin-bottom:2px;border-radius:5px;"> style="border:1px solid #C0C4CC;margin-bottom:2px;border-radius:5px;">
<table class="tFlightTab"> <table class="tFlightTab">
<tr><td colspan="4"> <tr>
<el-form-item :label="$t('salesModule.FlighInfo')"> <td colspan="4">
<el-select v-model="fItem.baseAlNameFlight_number" @change="handleCheckChange(fIndex)" filterable clearable placeholder="请选择"> <el-form-item :label="$t('salesModule.FlighInfo')">
<el-option <el-select v-model="fItem.baseAlNameFlight_number" @change="handleCheckChange(fIndex)" filterable
v-for="item in baseTeamFlightList" clearable placeholder="请选择">
:key="item.Flight_number" <el-option v-for="item in baseTeamFlightList" :key="item.Flight_number"
:label="item.Flight_number+'/'+item.AlName" :label="item.Flight_number" :value="item.Flight_number">
:value="item.Flight_number"> <!-- <span style="float: left">{{ item. Flight_number}}</span>
<span style="float: left">{{ item. Flight_number}}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.AlName }}</span> -->
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.AlName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</td></tr> </td>
</tr>
<tr> <tr>
<td> <td>
<el-form-item :label="$t('system.query_type')"> <el-form-item :label="$t('system.query_type')">
...@@ -880,7 +880,7 @@ ...@@ -880,7 +880,7 @@
AirportNameList: [], //去程航班列表 AirportNameList: [], //去程航班列表
BackAirportNameList: [], //回程航班列表 BackAirportNameList: [], //回程航班列表
airlineList: [], //航空公司列表 airlineList: [], //航空公司列表
baseTeamFlightList:[],//基础航班信息travelteam_GetBaseTeamFlightList baseTeamFlightList: [], //基础航班信息travelteam_GetBaseTeamFlightList
isVirtuallyFlight: 0, //0-虚拟航班,1-绑定真实机票 isVirtuallyFlight: 0, //0-虚拟航班,1-绑定真实机票
editForm: { editForm: {
GTeamName: "", // 业务名称 GTeamName: "", // 业务名称
...@@ -994,50 +994,41 @@ ...@@ -994,50 +994,41 @@
} }
}, },
methods: { methods: {
//获取基础航班信息 //获取基础航班信息
getBaseTeamFlightList() { getBaseTeamFlightList() {
this.apipost( this.apipost(
"travelteam_GetBaseTeamFlightList", {}, "travelteam_GetBaseTeamFlightList", {},
res => { res => {
console.log("travelteam_GetBaseTeamFlightList",res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.baseTeamFlightList = res.data.data; this.baseTeamFlightList = res.data.data;
} }
} }
); );
}, },
handleCheckChange(index){ handleCheckChange(index) {
if(this.editForm.SelfFlightList!=null&&this.editForm.SelfFlightList.length>0){ if (this.editForm.SelfFlightList != null && this.editForm.SelfFlightList.length > 0) {
// 获取当前航班 // 获取当前航班
const currentFlight = this.editForm.SelfFlightList[index]; const currentFlight = this.editForm.SelfFlightList[index];
console.log("currentFlight",currentFlight); // 创建深拷贝(避免引用问题)
const newFlight = JSON.parse(JSON.stringify(currentFlight));
// 创建深拷贝(避免引用问题) this.baseTeamFlightList.forEach(item => {
const newFlight = JSON.parse(JSON.stringify(currentFlight)); if (item.Flight_number === newFlight.baseAlNameFlight_number) {
this.baseTeamFlightList.forEach(item => { // 修改拷贝后的对象
if(item.Flight_number===newFlight.baseAlNameFlight_number){ newFlight.AlName = item.AlName;
console.log("item.baseAlNameFlight_number",item); newFlight.AIATA = item.AIATA;
newFlight.ArrivalCityName = item.ArrivalCityName;
// 修改拷贝后的对象 newFlight.aName = item.aName;
newFlight.AlName = item.AlName; newFlight.Arrival_time = item.Arrival_time;
newFlight.aDay = item.aDay;
newFlight.AIATA = item.AIATA; newFlight.DIATA = item.DIATA;
newFlight.ArrivalCityName = item.ArrivalCityName; newFlight.DepartureName = item.DepartureName;
newFlight.aName = item.aName; newFlight.Departure_time = item.Departure_time;
newFlight.Arrival_time = item.Arrival_time; newFlight.dName = item.dName;
newFlight.aDay = item.aDay; newFlight.Flight_number = item.Flight_number;
newFlight.DIATA = item.DIATA; // 替换原对象
newFlight.DepartureName = item.DepartureName; this.$set(this.editForm.SelfFlightList, index, newFlight);
newFlight.Departure_time = item.Departure_time; }
newFlight.dName = item.dName; });
newFlight.Flight_number = item.Flight_number;
// 替换原对象
this.$set(this.editForm.SelfFlightList, index, newFlight);
}
});
} }
}, },
//获取线路列表 //获取线路列表
...@@ -1197,7 +1188,7 @@ ...@@ -1197,7 +1188,7 @@
dName: "", //到达机场名称 dName: "", //到达机场名称
FlightDate: "", //出发日期 FlightDate: "", //出发日期
Flight_number: "", //航班号 Flight_number: "", //航班号
baseAlNameFlight_number:"", baseAlNameFlight_number: "",
}; };
this.editForm.SelfFlightList.push(seleFObj); this.editForm.SelfFlightList.push(seleFObj);
}, },
...@@ -1285,7 +1276,7 @@ ...@@ -1285,7 +1276,7 @@
} }
); );
}, },
//日期计算 //日期计算
daysCalculate(date, addDay) { daysCalculate(date, addDay) {
var date = new Date(date); //获取当前时间 var date = new Date(date); //获取当前时间
date.setDate(date.getDate() + addDay); date.setDate(date.getDate() + addDay);
......
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