Commit d332210a authored by 18224442217's avatar 18224442217

no message

parent 7e97d3c3
......@@ -4,7 +4,8 @@
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">姓名(英文)</text>
<input class="flexG fontBold" type="text" placeholder="英文姓名,请于乘机证件相同"
<input class="flexG"
:class="[addMsg.SurName?'fontBold':'']" type="text" placeholder="英文姓名,请于乘机证件相同"
v-model="addMsg.SurName"/>
</view>
<view class="height-line1"></view>
......@@ -25,9 +26,11 @@
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件号</text>
<input v-if="addMsg.GuestType==1" class="flexG fontBold" type="text" placeholder="请输入身份证号码"
<input v-if="addMsg.GuestType==1" class="flexG" type="text" placeholder="请输入身份证号码"
:class="[addMsg.IdCard?'fontBold':'']"
v-model="addMsg.IdCard" @blur="setBirthday"/>
<input v-if="addMsg.GuestType==2" class="flexG fontBold" type="text" placeholder="请输入护照号码"
:class="[addMsg.PassportNo?'fontBold':'']"
v-model="addMsg.PassportNo" @blur="setBirthday"/>
</view>
<view class="height-line1"></view>
......
......@@ -3,7 +3,7 @@
:class="[NewDataList.length==0||2>NewDataList.length?'height100vh':'height100']">
<view class="bgFFF">
<AirTicketHeader></AirTicketHeader>
<view class="StartStopAddress">
<view class="StartStopAddress" v-if="(DepartureCityList&&DepartureCityList.length>0)||(ArrivalCity&&ArrivalCity.length>0)">
<view class="row-sb-n">
<view class="StartStopAddressText-box">
<view class="column">
......@@ -40,6 +40,7 @@
<view class="height-line1 MT20" ></view>
</view>
<view class="DepartureTime column">
<!--
<text class="fz24 color9999A6">出发时间</text>
<text class="fz30 fontBold MT31 MB20"
:class="[StartDateObj.math?'':'color9999A5']">
......@@ -49,7 +50,17 @@
<template v-else>
{{!StartDateObj.math&&NewDateList.length>0?'点击以下日期进行筛查':'--'}}
</template>
</text>
</text> -->
<text class="fz24 color9999A6">行程类型</text>
<view class="fz30 fontBold MT31 MB20 row-aic-n">
<view v-for="(item,index) in typeList"
:class="[index?'ML20':'']"
@click="getType(item)">
<uni-icons :color="msgAddress.TicketType==item.Id?'#2EC726':'#C6C1BC'"
:type="msgAddress.TicketType==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view>
</view>
<view class="height-line1"></view>
<view class="DepartureTimeList row-sb-n">
<view style="width: 590rpx;overflow: hidden;">
......@@ -114,19 +125,20 @@
length="90%"
:safe-area-inset-bottom="true"
@close="OffPopup(1)">
<!-- <canlendar
<!-- StartDateObj.times -->
<canlendar
@finish="chosenDateResult"
:immediately="true"
:defaultDate="currentPrice.startDate"
:priceList="dataList.priceList"
:defaultDate="StartDateObj.times"
:priceList="dataList"
title="选择日期"
></canlendar> -->
<canlendar
></canlendar>
<!-- <canlendar
:StartDate="msg.StartDate"
:EndDate="msg.EndDate"
@finish="chosenDateResult"
title="选起止出发日期">
</canlendar>
</canlendar> -->
</u-popup>
<u-popup
v-model="showAddressPreviwe"
......@@ -144,7 +156,7 @@
</template>
<script>
import AirTicketHeader from "./components/airTicketHeader.vue";
import canlendar from "./components/time/index.vue";
import canlendar from "./components/sign/index.vue";
import Address from "./components/address/index.vue";
import AirTicketList from "./components/airTicketList.vue";
import { gegerateDates,getBeforeDate,getDateWeek } from "./dates.js";
......@@ -157,6 +169,10 @@
},
data() {
return {
typeList:[
{Name:'单程',Id:1},
{Name:'往返',Id:2},
],
DepartureCityList:[],
ArrivalCity:[],
AddressType: null,//1出发 2目的地
......@@ -167,12 +183,17 @@
ArriveCityId: 0,//653
},
msgAddress:{
StartDate: '',
EndDate: '',
ArriveCityId: 0,
DepartCityId: 0,
AirLineID:'',
TicketType:'',
TicketType:1,//1单程 2往返
},
StartDateObj:{},
NewDateList:[],
dateList:[],
priceList:[],
activeId: 1,
showAddressPreviwe: false,
loading: false,
......@@ -184,7 +205,7 @@
DepartCityId: 0,//343
ArriveCityId: 0,//653
AirLineID: 0,
TicketType: '',//1单程 2往返
TicketType: 1,//1单程 2往返
},
pageCount: 0,
showTimePreviwe: false,
......@@ -210,9 +231,8 @@
}
},
onLoad(options){
this.msg.DepartCityId = this.OriginAddress.DepartCityId = options.DepartCityId?options.DepartCityId:0,
console.log(options.ArriveCityId,'-----')
this.msg.ArriveCityId = this.OriginAddress.DepartCityId = options.ArriveCityId?options.ArriveCityId:0
this.msg.DepartCityId = this.msgAddress.DepartCityId = this.OriginAddress.DepartCityId = options.DepartCityId?options.DepartCityId:0,
this.msg.ArriveCityId = this.msgAddress.ArriveCityId = this.OriginAddress.ArriveCityId = options.ArriveCityId?options.ArriveCityId:0
this.U = uni.getStorageSync("mall_UserInfo")
if(this.U&&this.U.Token){
this.isToken = true
......@@ -220,12 +240,18 @@
},
created() {},
mounted() {
this.msg.StartDate = this.msgAddress.StartDate = getBeforeDate(-1, new Date()),
// this.msg.EndDate = getBeforeDate(-183, new Date()),
this.msgAddress.EndDate = getBeforeDate(-183, new Date()),
this.getDataAddressList()
this.msg.StartDate = getBeforeDate(1, new Date()),
this.msg.EndDate = getBeforeDate(-60, new Date()),
this.getDateList(60)
this.getDateList(184)
},
methods: {
getType(item){
this.msg.TicketType = this.msgAddress.TicketType = item.Id
this.getDataAddressList()
this.getDataList()
},
AddressSelection(AddressType){
// 1去程地址 2返程地址 0调换地址
if(AddressType){
......@@ -250,11 +276,12 @@
RenewalAddres(SelectObj,AddressType){
if(AddressType==1){
this.OriginAddress.DepartCityName = SelectObj.Name,
this.msg.DepartCityId = this.OriginAddress.DepartCityId = SelectObj.ID
this.msg.DepartCityId = this.msgAddress.DepartCityId = this.OriginAddress.DepartCityId = SelectObj.ID
}else{
this.OriginAddress.ArriveCityName = SelectObj.Name,
this.msg.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID
this.msg.ArriveCityId = this.msgAddress.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID
}
this.showAddressPreviwe = false
this.getDataList()
},
......@@ -281,11 +308,20 @@
x.Price = 0
x.frequency = 0
x.frequencyA = 0
x.startDate = '',
x.remainNum = 0,
x.b2BPrice = 0,
x.b2CPrice = 0
})
}
arr(this.dataList)
this.dateList.forEach(x => {
this.dataList.forEach(y=>{
y.remainNum = y.B2BSellNum
y.startDate = y.FlightDate
y.b2BPrice = y.B2BPrice
y.b2CPrice = y.B2CPrice
y.Price = this.isToken?y.B2BPrice:y.B2CPrice
y.NewFlightList = []
if(y.FlightList.length>0&&y.FlightList.length<3){
......@@ -347,7 +383,7 @@
})
});
this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
this.StartDateObj = this.NewDateList.length>0&&this.NewDateList.length==1?this.NewDateList[0]:{}
this.StartDateObj = this.NewDateList.length>0?this.NewDateList[0]:{}
}
uni.hideLoading()
});
......@@ -396,10 +432,17 @@
}
},
chosenDateResult(obj) {
this.msg.StartDate = obj.start;
this.msg.EndDate = obj.end;
let NewDateList =this.NewDateList.filter(x=> {
return x.times==obj.start
})
this.StartDateObj = NewDateList.length>0?NewDateList[0]:{}
this.NewDataList = this.dataList.filter(x=> {
return x.FlightDate==obj.start
})
setTimeout(()=>{
uni.hideLoading()
},300)
this.showTimePreviwe = false
this.getDateList(obj.day)
},
OffPopup(){
......@@ -422,6 +465,7 @@
})
this.OriginAddress.ArriveCityName = ArriveCityName.length>0?ArriveCityName[0].Name:''
}
}
});
},
......
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