Commit b9eb6016 authored by youjie's avatar youjie

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

# Conflicts:
#	components/coupon/index.vue
parents 68f22e39 6251094e
...@@ -132,6 +132,9 @@ ...@@ -132,6 +132,9 @@
.flexS{ .flexS{
flex-shrink: 0; flex-shrink: 0;
} }
.text-right{
text-align: right;
}
.column{ .column{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -170,10 +173,7 @@ ...@@ -170,10 +173,7 @@
left: 0; left: 0;
right: 0; right: 0;
overflow: hidden; overflow: hidden;
-webkit-border-radius: 50rpx 50rpx 0px 0px; border-radius: 20rpx;
-moz-border-radius: 50rpx 50rpx 0px 0px;
-ms-border-radius: 50rpx 50rpx 0px 0px;
-o-border-radius: 50rpx 50rpx 0px 0px;
} }
.relative{ .relative{
position: relative; position: relative;
......
@font-face { @font-face {
font-family: "tffont"; /* Project id 4816119 */ font-family: "tffont"; /* Project id 4816119 */
src: url('//at.alicdn.com/t/c/font_4816119_61ojoauzfi8.woff2?t=1739876734691') format('woff2'), src: url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.woff2?t=1739957291854') format('woff2'),
url('//at.alicdn.com/t/c/font_4816119_61ojoauzfi8.woff?t=1739876734691') format('woff'), url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.woff?t=1739957291854') format('woff'),
url('//at.alicdn.com/t/c/font_4816119_61ojoauzfi8.ttf?t=1739876734691') format('truetype'); url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.ttf?t=1739957291854') format('truetype');
} }
.tffont { .tffont {
...@@ -13,6 +13,22 @@ ...@@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.tffont-baby:before {
content: "\e650";
}
.tffont-chengren:before {
content: "\e75f";
}
.tffont-ertong:before {
content: "\e760";
}
.tffont-pen_:before {
content: "\e8a5";
}
.tffont-qianwangx:before { .tffont-qianwangx:before {
content: "\e608"; content: "\e608";
} }
......
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
</scroll-view> </scroll-view>
<view class="btton-box"> <view class="btton-box">
<u-button size="80" :ripple="true" shape="circle" :custom-style="{ <u-button size="80" :ripple="true" shape="circle" :custom-style="{
backgroundColor: mc, backgroundColor: mc,
height: '80rpx', height: '80rpx',
color: '#FFF', color: '#FFF',
fontSize: '14px', fontSize: '14px',
margin: '0 3vw', margin: '0 3vw',
width: '90vw', width: '90vw',
}" }"
@click="popupClose">确定</u-button> @click="popupClose">确定</u-button>
</view> </view>
</view> </view>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<script> <script>
export default { export default {
props: ["list", "current","currentPrice","order"], props: ["list", "current","price","currentPrice","order"],
data() { data() {
return { return {
mc: "", mc: "",
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
}, },
methods: { methods: {
checkOrderCoupon(){ checkOrderCoupon(){
if (this.currentPrice.teamType==1) { if (this.currentPrice && this.currentPrice.teamType==1) {
//totalSeat:总机位 isSubstitution:1 (可候补) leaderNum:领队 //totalSeat:总机位 isSubstitution:1 (可候补) leaderNum:领队
const shengyu = this.currentPrice.totalSeat-this.currentPrice.leaderNum const shengyu = this.currentPrice.totalSeat-this.currentPrice.leaderNum
...@@ -108,32 +108,28 @@ ...@@ -108,32 +108,28 @@
let errorMsg = null let errorMsg = null
if(shengyu!=remainNum) errorMsg = '当前定制团存在其他订单,无法使用专享优惠券' if(shengyu!=remainNum) errorMsg = '当前定制团存在其他订单,无法使用专享优惠券'
else if(orderNum<shengyu) errorMsg = '报名人数小于团队机位人数,无法使用专享优惠券' else if(orderNum<shengyu) errorMsg = '报名人数小于团队机位人数,无法使用专享优惠券'
console.log(errorMsg,shengyu,remainNum,orderNum)
this.ts.forEach(x => { this.ts.forEach(x => {
if(x.couponsUseScope==10) x.err = errorMsg if(x.couponsUseScope==10) x.err = errorMsg
}) })
this.ts.sort((a,b) => {
console.log(this.ts) const aerr = (a.err?a.err:'').length
const berr = (b.err?b.err:'').length
return aerr-berr
})
} }
this.ts.forEach((x)=>{
if(!x.err && x.useCondition>this.price){
x.err = '订单金额不满足'
}
})
}, },
popupClose() { popupClose() {
if(this.stacking==0){ if(this.currentChosen.length>0){
if (this.currentChosen.length>0 this.$emit('close', this.currentChosen)
&& this.currentChosen[0] != this.current[0]) {
this.$emit('close', this.currentChosen)
} else {
this.$emit('close', -1)
}
}else{ }else{
if(this.currentChosen.length>0){ this.$emit('close', -1)
this.$emit('close', this.currentChosen)
}else{
this.$emit('close', -1)
}
} }
console.log(this.currentChosen,'-----')
}, },
// 不可叠加使用优惠券 // 不可叠加使用优惠券
radioChange(e){ radioChange(e){
...@@ -145,13 +141,12 @@ ...@@ -145,13 +141,12 @@
x.checkId = 0 x.checkId = 0
x.check = false x.check = false
}) })
if(this.currentChosen.length==0||(this.currentChosen.length==1&&this.currentChosen[0] != e)){ if(!this.currentChosen||this.currentChosen.length==0||(this.currentChosen.length==1&&this.currentChosen[0] != e)){
this.currentChosen = [e] this.currentChosen = [e]
}else{ }else{
this.currentChosen = 0; this.currentChosen = 0;
this.value = 0 this.value = 0
} }
// console.log('---单选',this.currentChosen)
}, },
// 叠加使用优惠券 // 叠加使用优惠券
multipleChoice(e,i){ multipleChoice(e,i){
...@@ -170,7 +165,6 @@ ...@@ -170,7 +165,6 @@
let list = this.currentChosen.findIndex(x=>x==this.ts[i].id) let list = this.currentChosen.findIndex(x=>x==this.ts[i].id)
if(list==-1) this.currentChosen.push(e) if(list==-1) this.currentChosen.push(e)
} }
// console.log(e,'---多选',this.currentChosen)
} }
}, },
}; };
......
<template> <template>
<view> <view>
<u-popup :zoom="zoom" mode="center" :z-index="uZIndex" v-model="value" :length="width" :mask-close-able="false" :border-radius="borderRadius"> <u-popup :zoom="zoom" mode="center" :z-index="uZIndex" v-model="value" :length="width" :mask-close-able="false" :border-radius="borderRadius">
<view class="u-model"> <view class="u-model" :style="{'border-radius': `${borderRadius}rpx`}">
<view v-if="showTitle" class="u-model-title u-line-1" :style="[titleStyle]">{{ title }}</view> <view v-if="showTitle" class="u-model-title u-line-1" :style="[titleStyle]">{{ title }}</view>
<view class="u-model-content"> <view class="u-model-content">
<slot v-if="contentSlot"> <slot v-if="contentSlot">
......
...@@ -719,10 +719,9 @@ ...@@ -719,10 +719,9 @@
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表"
}, },
{ {
"path": "TicketOrderDetails", //机票订单详情 "path": "TicketOrderDetails",
"navigationBarTitleText": "订单详情",
"style": { "style": {
"navigationStyle": "custom" "navigationBarTitleText": "机票订单详情"
} }
}, },
{ {
......
<template> <template>
<view class="TicketOrderDetailsBg height100vh"> <view class="TicketOrderDetailsBg height100vh column">
<scroll-view <scroll-view scroll-y="true" style="box-sizing: border-box;height: 1px;" class="col">
scroll-y="true" <view class="TicketOrderDetailsC overflow" v-if="orderData&&orderData.model">
style="height: 100%; flex: 1; box-sizing: border-box"
@scroll="scroll"
>
<NavigationHeader :title="title" :titleStyle="titleStyle"></NavigationHeader>
<!-- :style="{top:topheight+'px'}" -->
<view class="TicketOrderDetailsC overflow PT123 PB260" v-if="orderData&&orderData.model">
<view class="PX53"> <view class="PX53">
<view class="row-sb-n MT20"> <view class="row-sb-n MT20">
<view class="flexS row-aic-n"> <view class="flexS row-aic-n">
...@@ -64,7 +58,7 @@ ...@@ -64,7 +58,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="airTicketDetailsFooter fixedFooter bgFFF fixed z-index2"> <view style="border-radius: 20rpx 20rpx 0 0;" class="airTicketDetailsFooter bgFFF">
<view class="TicketOrderDetailsFooter row-sbs-n" <view class="TicketOrderDetailsFooter row-sbs-n"
v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3"> v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3">
<view v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3" <view v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3"
...@@ -73,12 +67,12 @@ ...@@ -73,12 +67,12 @@
@click="cancelOrder(dataModel)"> @click="cancelOrder(dataModel)">
<text class="fz32">取消订单</text> <text class="fz32">取消订单</text>
</view> </view>
<view v-if="dataModel.OrderState==1||dataModel.OrderState==2" <!-- <view v-if="dataModel.OrderState==1||dataModel.OrderState==2"
class="airTicketDetailsFooter-order row-ajc-w fontBold MR50" class="airTicketDetailsFooter-order row-ajc-w fontBold MR50"
:class="[loading?'bgF5':'bgDEBF7B']" :class="[loading?'bgF5':'bgDEBF7B']"
@click="queren(orderMsg.ID)"> @click="queren(orderMsg.ID)">
<text class="fz32">立即支付</text> <text class="fz32">立即支付</text>
</view> </view> -->
</view> </view>
<view class="TicketOrderDetailsFooter row-ajc-n" v-if="dataModel.OrderState==5||dataModel.OrderState==4"> <view class="TicketOrderDetailsFooter row-ajc-n" v-if="dataModel.OrderState==5||dataModel.OrderState==4">
<view <view
...@@ -139,12 +133,12 @@ ...@@ -139,12 +133,12 @@
class="fz32 relative TicketOrderListCard-PrQx MR20" class="fz32 relative TicketOrderListCard-PrQx MR20"
:class="[loading?'color9999A5':'colorDEBF7B']" :class="[loading?'color9999A5':'colorDEBF7B']"
@click="cancelOrder(dataModel)">取 消</view> @click="cancelOrder(dataModel)">取 消</view>
<view v-if="dataModel.OrderState==1||dataModel.OrderState==2" <!-- <view v-if="dataModel.OrderState==1||dataModel.OrderState==2"
class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold" class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold"
:class="[loading?'bgF5':'bgDEBF7B']" :class="[loading?'bgF5':'bgDEBF7B']"
@click="queren(orderMsg.ID)"> @click="queren(orderMsg.ID)">
<text class="fz32">立即支付</text> <text class="fz32">立即支付</text>
</view> </view> -->
<view v-if="dataModel.OrderState==5||dataModel.OrderState==4" <view v-if="dataModel.OrderState==5||dataModel.OrderState==4"
class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold bgDEBF7B borderDEBF7B" class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold bgDEBF7B borderDEBF7B"
@click="goUndOrder(dataModel.TCID)"> @click="goUndOrder(dataModel.TCID)">
...@@ -195,6 +189,10 @@ ...@@ -195,6 +189,10 @@
} }
}, },
onLoad(options){ onLoad(options){
uni.setNavigationBarColor({
backgroundColor: '#ECDFC4',
frontColor:'#000000'
})
this.orderMsg.ID = options.orderId this.orderMsg.ID = options.orderId
this.getOrderDetails() this.getOrderDetails()
let that = this; let that = this;
...@@ -216,7 +214,7 @@ ...@@ -216,7 +214,7 @@
methods: { methods: {
goUndOrder(TCID){ goUndOrder(TCID){
uni.navigateTo({ uni.navigateTo({
url: `/pages/airTicket/airTicketDetails?TCID=${TCID}&Price=${this.dataModel.Unit_Price}` url: '/pages/airTicket/airIndex'
}); });
}, },
TicketDetails(){ TicketDetails(){
...@@ -564,17 +562,7 @@ ...@@ -564,17 +562,7 @@
}); });
}, },
}); });
}, }
scroll(e) {
this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5);
this.titleStyle.opacity =
e.detail.scrollTop - 100 < 0
? 0
: Math.floor(e.detail.scrollTop - 100) / 100 > 1
? 1
: 1;//Math.floor(e.detail.scrollTop - 100) / 10
this.$forceUpdate();
},
} }
} }
</script> </script>
...@@ -602,7 +590,9 @@ ...@@ -602,7 +590,9 @@
margin-bottom: 0; margin-bottom: 0;
} }
.TicketOrderDetailsFooter{ .TicketOrderDetailsFooter{
padding: 38rpx 0 67rpx 0; padding: 20rpx 0;
padding-bottom: calc(10rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(10rpx + env(safe-area-inset-bottom));
} }
.TicketOrderDetailsGet-box{ .TicketOrderDetailsGet-box{
margin: 46rpx 53rpx 51rpx 53rpx; margin: 46rpx 53rpx 51rpx 53rpx;
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
mode="aspectFill"> mode="aspectFill">
</image> </image>
<view class="city-list-item col"> <view class="city-list-item col">
<view @click="goListHandle('')" style="margin-bottom: 30rpx;" class=" row items-center"> <view @click="goListHandle('',x)" style="margin-bottom: 30rpx;" class=" row items-center">
<view class="bold col">{{x.DepartureName}} - {{x.ArrivalCityName}}</view> <view class="bold col">{{x.DepartureName}} - {{x.ArrivalCityName}}</view>
<view class="row items-center"> <view class="row items-center">
<view style="font-size: 22rpx;">更多日期</view> <view style="font-size: 22rpx;">更多日期</view>
<u-icon name='arrow_right' custom-prefix="tffont" color="#00000066" size="28"></u-icon> <u-icon name='arrow_right' custom-prefix="tffont" color="#00000066" size="28"></u-icon>
</view> </view>
</view> </view>
<view @click="goListHandle(f.FlightDate)" class="flights row items-center" v-for="(f,fi) in x.TicketProductList"> <view @click="goListHandle(f.FlightDate,x)" class="flights row items-center" v-for="(f,fi) in x.TicketProductList">
<image style="width: 30rpx;" :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${f.AlCode}.png`" mode="widthFix"></image> <image style="width: 30rpx;" :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${f.AlCode}.png`" mode="widthFix"></image>
<view style="font-size: 22rpx;width:50rpx;margin:0 4px"> <view style="font-size: 22rpx;width:50rpx;margin:0 4px">
{{ f.DayCount }} {{ f.DayCount }}
...@@ -252,7 +252,22 @@ ...@@ -252,7 +252,22 @@
}) })
this.getTopLowTicketHandle() this.getTopLowTicketHandle()
}, },
goListHandle(val){ goListHandle(val,x){
const newCityInfo = [{
type: 0,
ID: x.DepartureCity,
Name: x.DepartureName
},
{
type: 1,
ID: x.ArrivalCityId,
Name: x.ArrivalCityName
}
]
uni.setStorageSync('scf',{
cities:newCityInfo,
dateRange: this.dateRangeValue
})
let url ='/pages/airTicket/ticketList/ticketList' let url ='/pages/airTicket/ticketList/ticketList'
if(val!=''){ if(val!=''){
url += `?dv=${encodeURIComponent(val)}` url += `?dv=${encodeURIComponent(val)}`
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<u-empty mode="data"></u-empty> <u-empty mode="data"></u-empty>
</view> </view>
<view v-else> <view v-else>
<view class="row items-center q-mb-md" v-for="(x,i) in lowData" :key="i"> <view class="row items-center q-mb-md" @click="openFlightHandle(x,0)" v-for="(x,i) in lowData" :key="i">
<image style="width: 160rpx;height: 186rpx;border-radius: 14rpx;" :src="`https://pic.c-ctrip.com/flight/fuzzy/${x.ArrivalCityCode}/640.jpg`" mode="aspectFill"></image> <image style="width: 160rpx;height: 186rpx;border-radius: 14rpx;" :src="`https://pic.c-ctrip.com/flight/fuzzy/${x.ArrivalCityCode}/640.jpg`" mode="aspectFill"></image>
<view class="city-list-item col"> <view class="city-list-item col">
<view class="row"> <view class="row">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<image style="width: 30rpx;" :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${x.Flight.AlCode}.png`" mode="widthFix"></image> <image style="width: 30rpx;" :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${x.Flight.AlCode}.png`" mode="widthFix"></image>
<view class="info-text q-ml-sm"> <view class="info-text q-ml-sm">
<text>{{ x.Flight.AirLineName }}</text> <text>{{ x.Flight.AirLineName }}</text>
<text class="q-ml-md">{{x.Flight.FlightDate.split('-').splice(0,1).join('-')}} {{x.Flight.WeekDayStr}}</text> <text class="q-ml-md">{{x.Flight.FlightDate.split('-').splice(1,2).join('-')}} {{x.Flight.WeekDayStr}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<text style="color:#FF3166;font-size: 22rpx;">¥</text> <text style="color:#FF3166;font-size: 22rpx;">¥</text>
<text style="font-size: 32rpx;font-weight: bold;color:#FF3166;">{{x.Flight.B2BPrice}}</text> <text style="font-size: 32rpx;font-weight: bold;color:#FF3166;">{{x.Flight.B2BPrice}}</text>
</view> </view>
<view class="more-date">更多日期</view> <view class="more-date" @click="openFlightHandle(x,1)">更多日期</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -164,9 +164,9 @@ ...@@ -164,9 +164,9 @@
}, },
components:{CityList,DateRange}, components:{CityList,DateRange},
created() { created() {
if(uni.getStorageSync("tdr")){ // if(uni.getStorageSync("tdr")){
this.dateRangeValue = uni.getStorageSync("tdr") // this.dateRangeValue = uni.getStorageSync("tdr")
} // }
this.getTopLowTicketHandle() this.getTopLowTicketHandle()
}, },
mounted() { mounted() {
...@@ -195,6 +195,43 @@ ...@@ -195,6 +195,43 @@
}) })
} }
}, },
openFlightHandle(x,t){
const d=[
{
type:0,
ID:x.DepartureCity,
Name:x.DepartureName
},
{
type:1,
ID:x.ArrivalCityId,
Name:x.ArrivalCityName
}
]
const dr={
type:0,
startDate:'',
fuzzy:{
fuzzyType:-2,
fuzzyTypeName:'未来三个月',
weeks:[],
dayRangStatus:false,
dayRange:[4,10]
},
formatStartDate:'未来三个月'
}
uni.setStorageSync('scf',{
cities:d,
dateRange: dr
})
let url = '/pages/airTicket/ticketList/ticketList'
if(t==0){
url+=`?dv=${encodeURIComponent(x.Flight.FlightDate)}`
}
uni.navigateTo({
url
})
},
async getContainerWidth() { async getContainerWidth() {
const width = await this.getDomWidthAsync(".toolsContainer"); const width = await this.getDomWidthAsync(".toolsContainer");
this.containerWidth = width-18; this.containerWidth = width-18;
...@@ -219,6 +256,10 @@ ...@@ -219,6 +256,10 @@
},(e)=>{ },(e)=>{
this.loadingLow = false this.loadingLow = false
}) })
uni.setStorageSync('scf',{
cities:this.chosenResult,
dateRange: this.dateRangeValue
})
}, },
formatLowData(d){ formatLowData(d){
d.forEach((x)=>{ d.forEach((x)=>{
......
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
</view> </view>
</view> </view>
<view :style="{'height':!childs.frequency&&!childs.duration?'79rpx':''}"> <view :style="{'height':!childs.frequency&&!childs.duration?'79rpx':''}">
<text class="fz19 textCenter width100 ellipsis1 relative relativeFT8"> <!-- <text class="fz19 textCenter width100 ellipsis1 relative relativeFT8">
{{childs.departureName}} {{childs.arrivalCityName}} {{childs.departureName}} {{childs.arrivalCityName}}
</text> </text> -->
<text style="color: transparent;">&nbsp;1</text>
</view> </view>
</view> </view>
<view class="FlightDirection-line absolute row-aic-n"> <view class="FlightDirection-line absolute row-aic-n">
...@@ -322,9 +323,9 @@ ...@@ -322,9 +323,9 @@
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
@import url("../style.css"); @import url("../style.css");
.TicketOrderListCard{ .TicketOrderListCard{
border-radius: 50rpx; border-radius: 18rpx;
padding: 27rpx 39rpx 34rpx 50rpx; padding: 26rpx 36rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.TicketOrderListCard-wf{ .TicketOrderListCard-wf{
left: 0; left: 0;
......
<template> <template>
<view> <view class="flight-guest">
<view class="row items-center"> <view class="row items-center" style="margin-top: 24rpx;">
<u-radio-group v-model="ia"> <view class="num row items-center">
<u-radio shape="circle">月明人倚楼</u-radio> <text style="padding: 6rpx;">剩余</text>
</u-radio-group> <text class="col text-center" style="padding:6rpx;background-color: #B99846;">{{maxNum}}</text>
</view>
<view v-if="(crCount+etCount+babyCount)>0" class="col text-right" style="font-size: 26rpx;color: #1D1D20;">
<text>已选:</text>
<text class="q-ml-sm">{{crCount}}成人</text>
<text class="q-ml-sm">{{etCount}}儿童</text>
<text class="q-ml-sm">{{babyCount}}婴儿</text>
</view>
</view> </view>
<view class="row items-center" v-for="(x,i) in showGuests" style="padding: 30rpx 0;">
<u-checkbox-group>
<u-checkbox :disabled="!x.Checked && !canChecked && x.year>1" shape="circle" v-model="x.Checked" active-color="#B99846"></u-checkbox>
</u-checkbox-group>
<view class="col q-ml-md q-mr-md">
<view class="row items-center">
<view class="guest-name">{{x.SurName}}/{{x.GivenName}} {{x.Name!=''?`(${x.Name})`:''}}</view>
<view class="guest-tag" :class="{'cr':x.year>11,'et':x.year>1&&x.year<12,'baby':x.year<2}">
{{x.year>11?'成人':(x.year>2?'儿童':'婴儿')}}
</view>
</view>
<view class="guest-card">
护照号 {{x.Passport}}
<text class="q-ml-sm">{{x.Sex=='M'?'男':'女'}}</text>
</view>
</view>
<view @click="updateGuestHandle(x)" style="width: 50px;height: 50rpx;align-items: flex-end;" class="column justify-center">
<u-icon name="pen_" custom-prefix="tffont" color="#B99846" size="30"></u-icon>
</view>
</view>
<view class="add" @click="listVisible=true">
{{showGuests.length==0?'添加乘机人':'更多乘机人'}}
</view>
<u-popup mode="bottom" border-radius="20" :popup="false" v-model="listVisible" :maskCloseAble="true" length="auto" :safeAreaInsetBottom="true" @close="()=>listVisible=false" :z-index="9999">
<guest-list :list="guests" ref="guestManagerRef" :max-num="maxNum" @selected="selectedHandle" @change="guestChangeHandle"></guest-list>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import GuestList from './list.vue'
export default{ export default{
data(){ data(){
return { return {
ia:false checked:false,
guestObj:{
Id:'',
Name:'',
SurName:'',
GivenName:'',
Sex:'M',
BrithDay:'',
Country:'',
IdCard:'',
IdCardExpired:'',
Passport:'',
PassportExpired:'',
Mobile:''
},
guests:[],
listVisible:false
}
},
props:{
maxNum:{
type:Number
}
},
components:{GuestList},
computed: {
showGuests() {
this.guests.forEach(x=>{
if(x.Checked) x.Display=true
})
const r = this.guests.filter(x=>x.Display)
return r
},
crCount(){
const r = this.guests.filter(x=>x.year>=12 && x.Checked)
return r.length
},
etCount(){
const r = this.guests.filter(x=>x.year>=2 && x.year<12 && x.Checked)
return r.length
},
babyCount(){
const r = this.guests.filter(x=>x.year<2 && x.Checked)
return r.length
},
canChecked(){
const r = this.guests.filter(x=>x.year>=2 && x.Checked)
return r.length<this.maxNum
}
},
watch: {
guests: {
deep: true,
immediate: true,
handler: function(newVal, oldVal) {
this.checkedChange()
},
},
},
created() {
if(uni.getStorageSync('guest')){
this.guests = uni.getStorageSync('guest').filter(x=>x.Id!='')
this.guests.forEach((x,i)=>{
x.Checked=false
x.Display=i==0
})
this.calcYearHandle()
this.chosenGuest = this.guests.slice(0, 1)
}
},
methods:{
guestChangeHandle(val){
this.guests = val
},
checkedChange(){
const r = this.guests.filter(x=>x.Checked)
this.$emit('selected',r)
},
selectedHandle(val){
this.guests=val
this.listVisible=false
},
calcYearHandle(date){
this.guests.forEach(x=>{
x.year=this.calculateAge(x.BirthDay)
})
},
updateGuestHandle(g){
this.$refs.guestManagerRef.createNewGuest(g)
this.listVisible = true
},
calculateAge(birthDate) {
const birth = new Date(birthDate);
const now = new Date();
let birthYear = birth.getFullYear();
let birthMonth = birth.getMonth();
let birthDay = birth.getDate();
let currentYear = now.getFullYear();
let currentMonth = now.getMonth();
let currentDay = now.getDate();
let age = currentYear - birthYear;
if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
age--;
}
return age;
} }
} }
} }
</script> </script>
<style> <style>
.flight-guest {
margin: 10px;
}
.flight-guest *{
line-height: 1;
}
.flight-guest .guest-name{
font-weight: bold;
font-size: 30rpx;
color: #1D1D20;
line-height: 1;
}
.flight-guest .guest-card{
font-size: 26rpx;
color: #9999A5;
font-weight: 300;
margin-top: 10rpx;
}
.flight-guest .add{
padding: 22rpx;
background-color: #00000009;
font-size: 26rpx;
font-weight: bold;
text-align: center;
color: #000;
border-radius: 12rpx;
margin-top: 30rpx;
}
.flight-guest .num{
margin-top: 24rpx;
border-radius: 7rpx;
background-color: #080A09;
font-size: 22rpx;
font-weight: 400;
color: #FFF;
overflow: hidden;
padding: 0;
line-height: 1;
}
.flight-guest .num{
border-radius: 7rpx;
background-color: #080A09;
font-size: 22rpx;
font-weight: 400;
color: #FFF;
overflow: hidden;
padding: 0;
line-height: 1;
width: 120rpx;
}
.guest-tag{
font-size: 22rpx;
padding: 6rpx 14rpx;
line-height: 1;
border-radius: 8rpx;
margin-left: 20rpx;
}
.guest-tag.cr{
background-color: #FFFFFF;
color: #2979ff;
border: 1px solid #2979ff;
}
.guest-tag.et{
background-color: #FFFFFF;
color: #f90;
border: 1px solid #f90;
}
.guest-tag.baby{
background-color: #FFFFFF;
color: #fa3534;
border: 1px solid #fa3534;
}
</style> </style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
<template v-else> <template v-else>
<view class="time-list row" style="padding:0 12rpx;"> <view class="time-list row" style="padding:0 12rpx;">
<scroll-view :scroll-left="scrollLeft" scroll-x class="col header-scroll" style="padding:12rpx 0;width:1px"> <scroll-view :scroll-left="scrollLeft" scroll-x class="col header-scroll" style="padding:12rpx 0;width:1px;">
<view class="row items-center"> <view class="row items-center">
<view class="time-item" :id="'a'+x.FlightDate.replaceAll('-','')" @click="flightDateChangeHandle(x.FlightDate)" <view class="time-item" :id="'a'+x.FlightDate.replaceAll('-','')" @click="flightDateChangeHandle(x.FlightDate)"
:class="{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i"> :class="{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i">
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</scroll-view> </scroll-view>
<view class="time-item more row items-center justify-center"> <view class="time-item more row items-center justify-center">
<date-select @change="dateFilterChange" :default-value="[filterDate.start,filterDate.end]"> <date-select @change="dateFilterChange" :default-value="[filterDate.start,filterDate.end]">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638753835239709518.png" mode="widthFix" style="width: 30rpx;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638753835239709518.png" mode="widthFix" style="width: 30rpx;max-height: 60px;"></image>
</date-select> </date-select>
</view> </view>
</view> </view>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</view> </view>
<scroll-view scroll-y="true" class="col" style="width: 100%;height: 1px;"> <scroll-view scroll-y="true" class="col" style="width: 100%;height: 1px;">
<view style="padding:30rpx"> <view style="padding:30rpx">
<view class="flight-card" v-for="(x,i) in flights"> <view class="flight-card" @click="nativageToOrderHandle(x.TCID)" v-for="(x,i) in flights">
<view class="q-mt-md row items-start"> <view class="q-mt-md row items-start">
<view class="col"> <view class="col">
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
</view> </view>
<view class="line">&nbsp;</view> <view class="line">&nbsp;</view>
<view class="t-cities" v-if="x.GoFlightList.length>1"> <view class="t-cities" v-if="x.GoFlightList.length>1">
<text v-for="(c,ci) in x.GoFlightList" :key="ci">{{ci==0?c.ArrivalCityName:c.DepartureName}} </text> <template v-for="(c,ci) in x.BackFlightList">
<text :key="ci" v-if="ci>0" style="margin-right: 6rpx;">{{c.DepartureName}}</text>
</template>
</view> </view>
</view> </view>
<view class="flight-time"> <view class="flight-time">
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
<view class="login-box"> <view class="login-box">
<image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image> <image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image>
</view> </view>
<text class="login-text">{{a.AlName}}{{a.Flight_number}} </text> <text class="login-text">{{a.Flight_number}} </text>
</view> </view>
</view> </view>
</view> </view>
...@@ -105,7 +107,9 @@ ...@@ -105,7 +107,9 @@
</view> </view>
<view class="line">&nbsp;</view> <view class="line">&nbsp;</view>
<view class="t-cities" v-if="x.BackFlightList.length>1"> <view class="t-cities" v-if="x.BackFlightList.length>1">
<text v-for="(c,ci) in x.BackFlightList" :key="ci">{{ci==0?c.ArrivalCityName:c.DepartureName}} </text> <template v-for="(c,ci) in x.BackFlightList">
<text v-if="ci>0" :key="ci" style="margin-right: 6rpx;">{{c.DepartureName}}</text>
</template>
</view> </view>
</view> </view>
<view class="flight-time"> <view class="flight-time">
...@@ -121,7 +125,7 @@ ...@@ -121,7 +125,7 @@
<view class="login-box"> <view class="login-box">
<image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image> <image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image>
</view> </view>
<text class="login-text">{{a.AlName}}{{a.Flight_number}} </text> <text class="login-text">{{a.Flight_number}} </text>
</view> </view>
</view> </view>
</view> </view>
...@@ -240,6 +244,11 @@ ...@@ -240,6 +244,11 @@
}); });
}, },
methods: { methods: {
nativageToOrderHandle(id){
uni.navigateTo({
url:'/pages/airTicket/flightDetail?id='+id
})
},
applySorting(flights) { applySorting(flights) {
switch (this.sortBy) { switch (this.sortBy) {
case 0: case 0:
......
...@@ -422,11 +422,9 @@ ...@@ -422,11 +422,9 @@
</view> </view>
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<coupon v-if="couponList.length > 0 && showCoupon"
:list="couponList" <coupon v-if="couponList.length > 0 && showCoupon" :price="price" :list="couponList" :current="useCouponIds" @close="closeCouponHandler" :current-price="realCurrentPriceInfo" :order="orderMsg"></coupon>
:current="useCouponIds"
@close="closeCouponHandler"
:current-price="realCurrentPriceInfo" :order="orderMsg"></coupon>
<view style="padding: 50rpx 40rpx" v-if="tips != ''"> <view style="padding: 50rpx 40rpx" v-if="tips != ''">
<view class="big-title"> <view class="big-title">
<text>重要提示</text> <text>重要提示</text>
...@@ -577,7 +575,6 @@ ...@@ -577,7 +575,6 @@
closeCouponHandler(e) { closeCouponHandler(e) {
if (e != -1) { if (e != -1) {
this.useCouponIds = e; this.useCouponIds = e;
console.log(this.useCouponIds,'==========')
//叠加使用优惠券 //叠加使用优惠券
let TotalDiscountAmount = 0 let TotalDiscountAmount = 0
this.couponList.forEach(x=>{ this.couponList.forEach(x=>{
...@@ -595,19 +592,6 @@ ...@@ -595,19 +592,6 @@
}) })
if(TotalDiscountAmount)this.currentCoupon.discountMoney = TotalDiscountAmount if(TotalDiscountAmount)this.currentCoupon.discountMoney = TotalDiscountAmount
else this.currentCoupon.discountMoney = 0 else this.currentCoupon.discountMoney = 0
// if(this.useCouponIds.length==0){
// this.currentCoupon = this.couponList.find(x => x.id == this.useCouponIds)
// if (this.currentCoupon.couponsType == 1) {
// this.currentCoupon.discountMoney = this.currentCoupon.denomination
// } else {
// this.currentCoupon.discountMoney = (parseFloat(this.price) * (1 - parseFloat(this.currentCoupon.denomination / 10)))
// .toFixed(2)
// }
// }else{
// this.currentCoupon.discountMoney = 0
// }
}else{ }else{
this.currentCoupon.discountMoney = 0 this.currentCoupon.discountMoney = 0
this.useCouponIds = [] this.useCouponIds = []
......
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