Commit 1085099b authored by 18224442217's avatar 18224442217

no message

parent e2b1033f
......@@ -3,7 +3,7 @@
:class="[NewDataList.length==0||2>NewDataList.length?'height100vh':'height100']">
<view class="bgFFF">
<AirTicketHeader></AirTicketHeader>
<view class="StartStopAddress" v-if="(DepartureCityList&&DepartureCityList.length>0)||(ArrivalCity&&ArrivalCity.length>0)">
<view class="StartStopAddress" v-if="(AddressListAll&&AddressListAll.length>0)||(ArrivalCity&&ArrivalCity.length>0)">
<view class="row-sb-n">
<view class="StartStopAddressText-box">
<view class="column">
......@@ -40,17 +40,6 @@
<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']">
<template v-if="StartDateObj.math">
{{StartDateObj.math}}{{StartDateObj.date}}日(周{{StartDateObj.week}})
</template>
<template v-else>
{{!StartDateObj.math&&NewDateList.length>0?'点击以下日期进行筛查':'--'}}
</template>
</text> -->
<text class="fz24 color9999A6">行程类型</text>
<view class="fz30 fontBold MT31 MB20 row-aic-n">
<view v-for="(item,index) in typeList"
......@@ -99,14 +88,6 @@
</view>
</view>
</view>
<!-- <view class="ScreeningCondition row-sb-n bgFFF">
<view class="ScreeningConditionC bgF5"
:class="[item.Id==activeId?'active':'']" v-for="(item,index) in ConditionList"
@click="clickSearch(item.Id,2)">
<text class="fz24">{{item.Name}}</text>
</view>
</view> -->
<view class="MT40"></view>
<u-empty v-if="NewDataList.length==0" text="暂无数据" mode="data" padding-top="20"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;"
......@@ -132,12 +113,6 @@
:priceList="dataList"
title="选择日期"
></canlendar>
<!-- <canlendar
:StartDate="msg.StartDate"
:EndDate="msg.EndDate"
@finish="chosenDateResult"
title="选起止出发日期">
</canlendar> -->
</u-popup>
<u-popup
v-model="showAddressPreviwe"
......@@ -145,10 +120,10 @@
border-radius="50"
:safe-area-inset-bottom="true"
@close="OffPopup(2)">
<Address :AddressType="AddressType"
<AddressGroup
:OriginAddressObj="OriginAddress"
:dataList="AddressType==1?DepartureCityList:ArrivalCity"
@RenewalAddres="RenewalAddres"></Address>
:dataList="AddressList"
@RenewalAddres="RenewalAddres"></AddressGroup>
</u-popup>
</view>
......@@ -157,6 +132,7 @@
import AirTicketHeader from "./components/airTicketHeader.vue";
import canlendar from "./components/sign/index.vue";
import Address from "./components/address/index.vue";
import AddressGroup from "./components/address/indexGroup.vue";
import AirTicketList from "./components/airTicketList.vue";
import { gegerateDates,getBeforeDate,getDateWeek } from "./dates.js";
export default {
......@@ -164,6 +140,7 @@
AirTicketHeader,
canlendar,
Address,
AddressGroup,
AirTicketList
},
data() {
......@@ -172,8 +149,8 @@
{Name:'往返',Id:2},
{Name:'单程',Id:1},
],
DepartureCityList:[],
ArrivalCity:[],
AddressListAll:[],
AddressList:[],
AddressType: null,//1出发 2目的地
OriginAddress:{
DepartCityName: '',
......@@ -274,14 +251,11 @@
}
}
},
RenewalAddres(SelectObj,AddressType){
if(AddressType==1){
this.OriginAddress.DepartCityName = SelectObj.Name,
this.msg.DepartCityId = this.msgAddress.DepartCityId = this.OriginAddress.DepartCityId = SelectObj.ID
}else{
this.OriginAddress.ArriveCityName = SelectObj.Name,
this.msg.ArriveCityId = this.msgAddress.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID
}
RenewalAddres(SelectObj){
this.OriginAddress.DepartCityName = SelectObj.DepartCityName,
this.msg.DepartCityId = this.msgAddress.DepartCityId = this.OriginAddress.DepartCityId = SelectObj.DepartCityId
this.OriginAddress.ArriveCityName = SelectObj.ArriveCityName,
this.msg.ArriveCityId = this.msgAddress.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ArriveCityId
this.showAddressPreviwe = false
this.getDataList()
},
......@@ -451,16 +425,33 @@
this.apipost("AirTicket_get_GetTicketCity",this.msgAddress,
(res) => {
if(res.resultCode==1){
this.DepartureCityList = res.data.DepartureCityList
this.ArrivalCity = res.data.ArrivalCity
this.AddressListAll = []
res.data.forEach(x=>{
let obj = {
Name: x.Name,
ID: x.ID,
}
this.AddressListAll.push(obj)
x.CityList.forEach(y=>{
let obj2 = {
Name: y.Name,
ID: y.ID,
}
this.AddressListAll.push(obj2)
if(this.msg.ArriveCityId==y.ID){
this.msg.DepartCityId = x.ID
}
})
})
this.AddressList = res.data
if(this.msg.DepartCityId){
let DepartCityName = this.DepartureCityList.filter(x=>{
let DepartCityName = this.AddressListAll.filter(x=>{
return x.ID==this.msg.DepartCityId
})
this.OriginAddress.DepartCityName = DepartCityName.length>0?DepartCityName[0].Name:''
}
if(this.msg.ArriveCityId){
let ArriveCityName = this.ArrivalCity.filter(x=>{
let ArriveCityName = this.AddressListAll.filter(x=>{
return x.ID==this.msg.ArriveCityId
})
this.OriginAddress.ArriveCityName = ArriveCityName.length>0?ArriveCityName[0].Name:''
......
<template>
<view class="addressIndex-box">
<view class="fz30 fontBold textCenter MB30 PX53 relative">选择出发地/目的地
<text v-if="SelectObj.DepartCityId||SelectObj.ArriveCityId" class="fz24 color9999A5 absolute PX10"
style="right: 53rpx;top: 0;bottom: 0;" @click="Clear">清空</text>
</view>
<view class="fz30 fontBold MB30 PX53 row-aic-n">
<text style="width: 50%;">当前出发地</text>
<text>当前目的地</text>
</view>
<view class="MT30 PX53 row-aic-n">
<view style="width: 50%;">
<view class="addressIndex-Orientation inlineblock bgF5 row-ajc-n textCenter" style="width: auto; padding: 15rpx 50rpx;">
<img class="inlineblock MR10" mode="widthFix" style="width: 18rpx;height: 22rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"/>
<text class="fz30">
<template v-if="SelectObj.DepartCityName">
{{SelectObj.DepartCityName}}
</template>
<template v-else>
--
</template>
</text>
</view>
</view>
<view>
<view class="addressIndex-Orientation inlineblock bgF5 row-ajc-n textCenter" style="width: auto; padding: 15rpx 50rpx;">
<img class="inlineblock MR10" mode="widthFix" style="width: 18rpx;height: 22rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"/>
<text class="fz30">
<template v-if="SelectObj.ArriveCityName">
{{SelectObj.ArriveCityName}}
</template>
<template v-else>
--
</template>
</text>
</view>
</view>
</view>
<view class="height-line1 MT25" ></view>
<view class="fz30 fontBold MT20 PX53 MB20 row-aic-n">
<view style="width: 150rpx;">出发地</view>
<view class="flexG">目的地</view>
</view>
<view class="hidden" style="height: calc(100vh - 60vh);">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{ height: '100%' }">
<template v-for="(item,index) in dataList">
<view class="addressIndex-toponym row-aic-n" :key="item.ID">
<view style="width: 150rpx;"
:class="[SelectObj.DepartCityId==item.ID?'colorDEBF7B':'']"
@click="getAddress(item)">
{{item.Name}}
</view>
<view class="flexG row-aic-w">
<view class="addressIndex-toponym-box" v-for="(items,index) in item.CityList" :key="items.ID">
<view class="addressIndex-Orientation inlineblock textCenter MT10 fz30"
:class="[SelectObj.ArriveCityId==items.ID?'bgDEBF7B':'bgF5']"
@click="getAddress(item,items)">{{items.Name}}</view>
</view>
</view>
</view>
<view class="height-line1 MT10" ></view>
</template>
</scroll-view>
</view>
<view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2">
<view
class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
@click="RenewalAddres">
确认
</view>
</view>
</view>
</template>
<script>
export default {
props:['OriginAddressObj','dataList'],
data() {
return {
SelectObj: {},
}
},
onLoad(options){
},
watch: {
OriginAddressObj: {
handler(newVal, oldval) {
this.SelectObj = JSON.parse(JSON.stringify(this.OriginAddressObj))
},
deep: true
},
},
created() {},
mounted() {
},
methods: {
RenewalAddres(){
this.$emit('RenewalAddres',this.SelectObj)
},
Clear(){
this.ClearData(null,null,1)
},
ClearData(item,items,type){
if(item||type){
this.SelectObj.DepartCityName = ''
this.SelectObj.DepartCityId = 0
}
if(items||type){
this.SelectObj.ArriveCityName = ''
this.SelectObj.ArriveCityId = 0
}
},
getAddress(item,items){
if(item&&items){
this.ClearData(item,items)
}
if(!items){
this.ClearData(item,items,1)
}
this.ClearData(item,items)
this.SelectObj.DepartCityName = item.Name
this.SelectObj.DepartCityId = item.ID
if(items){
this.SelectObj.ArriveCityName = items.Name
this.SelectObj.ArriveCityId = items.ID
}
// this.$forceUpdate()
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../../style.css");
.addressIndex-box{
padding: 46rpx 0 139rpx 0;
}
.addressIndex-Orientation{
width: 160rpx;
padding: 15rpx 0;
border-radius: 30rpx;
}
.addressIndex-toponym{
padding: 0 0 0 53rpx;
}
.addressIndex-toponym-box{
flex: 0 0 33.33%;
}
</style>
\ No newline at end of file
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