Commit e2259260 authored by 黄奎's avatar 黄奎

1

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