<template>
    <view>
        <view class="aviationCard bgFFF row-sbas-n relative" 
        v-for="(item,index) in dataList"
        @click="getPriceDetail(item)">
            <view v-if="item.FlightList.length>2" class="aviationCard-wf absolute bg111 colorFFF fz20 z-index2">异地往返</view>
            <view class="column flexG">
                <view
                :class="[item.FlightList.length-1!=indexs?'MB30':'']"
                v-for="(childs,indexs) in item.NewFlightList">
                    <view class="row-sb-n MT25">
                        <view class="flexS MR20">
                            <view class="FlightDirection-qc bgE1C278 fz24 color111 overflow textCenter">
                                <template v-if="childs.FlightSubType==1">去程</template>
                                <template v-if="childs.FlightSubType==3">返程</template>
                            </view>
                        </view>
                        <view class="column flexS">
                            <text class="fz36 fontBold">{{childs.Departure_time}} </text>
                            <text class="fz22 MT5 width100 ellipsis1">{{childs.dName}}</text>
                        </view>
                        <view class="FlightDirection-box relative">
                            <view class="FlightDirection-Title column">
                                <!-- :style="{'height':'90rpx'}" -->
                                <view class="row-ajc-n">
                                    <text class="fz20 color9999A5">{{childs.duration}}</text>
                                    <view class="FlightDirection-zhuan z-index2 ML10" v-if="childs.frequency">
                                        <!-- childs.FlightType==2 -->
                                        <text class="block bgECF1F4 fz21 nowrap">
                                            转<template v-if="childs.frequency>1">+{{childs.frequency}}</template>
                                        </text>
                                    </view>
                                </view>
                                <view>
                                    <text class="fz19 textCenter width100 ellipsis1">
                                        {{childs.DepartureName}} {{childs.ArrivalCityName}}
                                    </text>
                                </view>
                            </view>
                            <view class="FlightDirection-line absolute row-aic-n">
                                <view class="FlightDirection-line-one bgECF1F4"></view>
                                <view  class="FlightDirection-line-two">
                                    <view class="height-line1"></view>
                                </view>
                                <view class="FlightDirection-line-one bgECF1F4"></view>
                            </view>
                        </view>
                        <view class="relative">
                            <view class="column">
                                <text class="fz36 fontBold">{{childs.Arrival_time}} </text>
                                <text class="fz22 MT5 width100 ellipsis1">{{childs.aName}}</text>
                            </view>
                            <!-- <view class="FlightDirection-time absolute colorFF5858 fz20 nowrap">
                                <text>+</text>
                                <text class="ML5">1</text>
                                <text class="ML5">天</text>
                            </view> -->
                        </view>
                        
                    </view>
                    <view class="row-w MT15">
                        <view class="aviationTitle row-aic-n">
                            <img class="inlineblock" mode="widthFix" style="width: 36rpx;height: 30rpx;"
                            :src="item.AirlineUrl"/>
                            <text class="fz22 ML10 color9999A5">{{item.AirLineName}}</text>
                        </view>
                    </view>
                </view>
            </view>
            <view class="FlightDirection-Price flexS column">
                <view class="colorC09D4F fontBold row-aic-n MT25">
                    <view class="FlightDirection-Price-symbol MR10">
                        <text class="fz20 relative" v-if="item.Price>0">¥</text>        
                    </view>
                    <text :class="[item.Price>0?'fz36':'fz22 fontWeight400']">
                        <template v-if="item.Price>0">
                            {{item.Price}}
                        </template>
                        <template v-else>暂无报价</template>
                    </text>
                </view>
                <view class="textRight">
                    <text class="FlightDirection-zhang border1 borde  fz18"
                    :class="[item.B2BSellNum>0?'borderFF5858 colorFF5858':'borderF5 color9999A5']">
                        <template v-if="item.B2BSellNum>0">剩{{item.B2BSellNum}}张</template>
                        <template v-if="item.Price>0&&item.B2BSellNum==0">售罄</template>
                    </text>
                </view>
            </view>
        </view>
    </view>
    
</template>
<script>
    export default {
        props:['dataList'],
        components: {},
        data() {
            return {
            }
        },
        onLoad(options){

        },
        created() {},
        methods: {
            getPriceDetail(item){
                uni.navigateTo({
					url: `/pages/airTicket/airTicketDetails?TCID=${item.TCID}&Price=${item.Price}`
				});
            },
        }
    }
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../style.css");
.aviationCard{
    border-radius: 20rpx;
    padding: 37rpx 34rpx 48rpx 37rpx;
    margin: 0 30rpx 40rpx;
}
.aviationCard-wf{
    left: 0;
    top: 0;
    border-top-left-radius: 50rpx;
    border-bottom-right-radius: 50rpx;
    padding: 7rpx 27rpx;
}
.aviationTitle{
    margin-right: 31rpx;
}
.aviationTitle:last-child{
    margin-right: 0;
}
.FlightDirection-time{
    left: 0;
    right: 0;
    top: -33rpx;
}
.FlightDirection-Price{
    margin-left: 45rpx;
}
.FlightDirection-Price>view{
    
}
.FlightDirection-Price-symbol text{
    top: -3rpx;
}
</style>