Commit d332210a authored by 18224442217's avatar 18224442217

no message

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