Commit 25cd54a4 authored by 18224442217's avatar 18224442217

支付已调通

parent 23b75f00
......@@ -3,9 +3,9 @@
<view class="AirplanePassengerAddEditingC">
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">姓名</text>
<input class="flexG fontBold" type="text" placeholder="文姓名,请于乘机证件相同"
v-model="text"/>
<text class="flexS AirplanePassengerAddEditingC-textL">姓名(英文)</text>
<input class="flexG fontBold" type="text" placeholder="文姓名,请于乘机证件相同"
v-model="addMsg.SurName"/>
</view>
<view class="height-line1"></view>
</view>
......@@ -13,9 +13,9 @@
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件</text>
<view class="flexG row-aic-n">
<view v-for="(item,index) in certificateList" class="AirplanePassengerAddEditingC-choose MR30">
<!-- circle -->
<uni-icons color="#DEBF7B" type="checkbox-filled" size="18"></uni-icons>
<view v-for="(item,index) in certificateList" class="AirplanePassengerAddEditingC-choose MR30"
@click="getType(item,1)">
<uni-icons color="#DEBF7B" :type="addMsg.GuestType==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view>
</view>
......@@ -25,16 +25,35 @@
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件号</text>
<input class="flexG fontBold" type="text" placeholder="请输入身份证号码"
v-model="text"/>
<input v-if="addMsg.GuestType==1" class="flexG fontBold" type="text" placeholder="请输入身份证号码"
v-model="addMsg.IdCard" @blur="setBirthday"/>
<input v-if="addMsg.GuestType==2" class="flexG fontBold" type="text" placeholder="请输入护照号码"
v-model="addMsg.PassportNo" @blur="setBirthday"/>
</view>
<view class="height-line1"></view>
</view>
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">成人/婴儿</text>
<view class="flexG row-aic-n">
<view v-for="(item,index) in GuestTypeList" class="AirplanePassengerAddEditingC-choose MR30"
@click="getType(item,2)">
<uni-icons color="#DEBF7B" :type="addMsg.GuestNum==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view>
</view>
</view>
<view class="height-line1"></view>
</view>
</view>
<view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2">
<view class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
<view v-if="addMsg.SurName&&(addMsg.PassportNo||addMsg.IdCard)"
class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
@click="showAddEditingPreviwe=true">
确认添加
确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view>
<view v-else class="AirplanePassengerList-buttom bgF5 fz32 fontBold textCenter">
确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view>
</view>
<u-popup
......@@ -52,26 +71,28 @@
<view class="showAddEditing-Details bgF5 MT15">
<view class="row-aic-n">
<text class="fz26 flexS">姓名</text>
<text class="fz30 fontBold colorFF5858 flexG">王俊苏</text>
<text class="fz30 fontBold colorFF5858 flexG">{{addMsg.SurName}}</text>
</view>
<view class="row-aic-n">
<text class="fz26 flexS">证件号</text>
<text class="fz30 fontBold colorFF5858 flexG">212114555698544</text>
<text class="fz30 fontBold colorFF5858 flexG">{{addMsg.GuestType==1?addMsg.IdCard:addMsg.PassportNo}}</text>
</view>
<view class="row-aic-n">
<view class="row-aic-n" v-if="addMsg.result">
<text class="fz26 flexS">出生日期</text>
<text class="fz30 fontBold flexG">2017-01-25</text>
<text class="fz30 fontBold flexG">{{addMsg.result.birthday}}</text>
</view>
</view>
<view class="showAddEditing-buttom fz32 fontBold textCenter row-sb-n">
<view class="border1 colorDEBF7B borderDEBF7B" @click="showAddEditingPreviwe=false">返回修改</view>
<view class="border1 borderDEBF7B" @click="submit">确认添加</view>
<view v-if="!loading" class="border1 borderDEBF7B" @click="submit">确认{{editorIndex||editorIndex==0?'编辑':'添加'}}</view>
<view v-else class="border1 bgF5">确认{{editorIndex||editorIndex==0?'编辑':'添加'}}</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { parseIDCard } from "./dates.js";
export default {
components: {
......@@ -83,23 +104,75 @@
{Name:'身份证',Id:1},
{Name:'护照',Id:2},
],
GuestTypeList:[
{Name:'成人',Id:1},
{Name:'婴儿',Id:2},
],
text:'',
showAddEditingPreviwe: false
showAddEditingPreviwe: false,
addMsg: {
SurName:'',PassportNo:'',IdCard:'',MobilePhone:'',
result:null,show: false,GuestType:1,GuestNum: 1,Id:0
},
GuestList: [],
editorIndex: null
}
},
onLoad(options){
this.editorIndex = options.editorIndex||options.editorIndex==0?options.editorIndex:null
uni.setNavigationBarTitle({
title: options.item?'编辑乘机人':'新增乘机人'
title: options.editorIndex||options.editorIndex==0?'编辑乘机人':'新增乘机人'
})
},
onBackPress(options){
console.log(options,'-----navigateBack')
},
created() {},
mounted() {
let GuestList = uni.getStorageSync("GuestList")
this.GuestList = GuestList?GuestList:[]
if(this.editorIndex||this.editorIndex==0){
this.addMsg = this.GuestList[this.editorIndex]
}
},
watch: {
addMsg:{
handler(newVal, oldval) {
}
}
},
methods: {
submit(){
// uni.showLoading({
// title: "",
// });
// uni.hideLoading();
this.addMsg.Id = Math.floor(Math.random()*(100-1)+1)
if(!this.editorIndex){
this.GuestList.push(this.addMsg)
}
if(this.GuestList.length>0){
uni.setStorageSync("GuestList",this.GuestList)
}
setTimeout(()=>{
uni.navigateBack({
delta: -1
})
},200)
},
setBirthday(){
if(this.addMsg.GuestType==1){
this.addMsg.result = parseIDCard(this.addMsg.IdCard)
}
},
getType(item,type){
if(type==1){
if(this.addMsg.GuestType!=item.Id){
this.addMsg.IdCard = ''
this.addMsg.PassportNo = ''
}
this.addMsg.GuestType = item.Id
}else{
this.addMsg.GuestNum = item.Id
}
}
}
}
</script>
......
This diff is collapsed.
......@@ -29,7 +29,7 @@
<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="StartStopAddressText fz30 fontBold"
:class="[!OriginAddress.DepartCityName?'color9999A5':'']">
:class="[!OriginAddress.ArriveCityName?'color9999A5':'']">
{{OriginAddress.ArriveCityName?OriginAddress.ArriveCityName:'选择目的地'}}
</text>
</view>
......@@ -40,7 +40,8 @@
</view>
<view class="DepartureTime column">
<text class="fz24 color9999A6">出发时间</text>
<text class="fz30 fontBold MT31 MB20">
<text class="fz30 fontBold MT31 MB20"
:class="[StartDateObj.math?'':'color9999A5']">
<template v-if="StartDateObj.math">
{{StartDateObj.math}}{{StartDateObj.date}}日(周{{StartDateObj.week}})
</template>
......@@ -52,8 +53,9 @@
<view class="DepartureTimeList row-sb-n">
<view style="width: 590rpx;overflow: hidden;">
<scroll-view scroll-x style="width:100%;white-space: nowrap;">
<view class="row-aic-n">
<template v-for="(item,index) in NewDateList">
<view
:class="[NewDateList&&NewDateList.length>0?'row-aic-n':'row-w']">
<template v-if="NewDateList&&NewDateList.length>0" v-for="(item,index) in NewDateList">
<view class="DepartureTimeListC flexS column-ajc fz20"
:class="[StartDateObj.times==item.times?'bgE1C278':'active']"
@click="clickSearch(item,1)">
......@@ -65,6 +67,13 @@
</text>
</view>
</template>
<view v-if="NewDateList.length==0" class="DepartureTimeListC flexS column-ajc fz20" style="width: 100%;">
<text></text>
<text class="MT10 MB10"></text>
<text class="fz26 color9999A5">
无可选日期
</text>
</view>
</view>
</scroll-view>
</view>
......@@ -200,9 +209,9 @@
onLoad(options){
if(options.data){
let obj = JSON.parse(options.data)
this.OriginAddress.DepartCityName = obj.DepartCityName,
// this.OriginAddress.DepartCityName = obj.DepartCityName,
this.msg.DepartCityId = this.OriginAddress.DepartCityId = obj.DepartCityId,
this.OriginAddress.ArriveCityName = obj.ArriveCityName,
// this.OriginAddress.ArriveCityName = obj.ArriveCityName,
this.msg.ArriveCityId = this.OriginAddress.DepartCityId = obj.ArriveCityId
}
this.U = uni.getStorageSync("mall_UserInfo")
......@@ -234,7 +243,6 @@
this.msg.DepartCityId = this.OriginAddress.DepartCityId
this.msg.ArriveCityId = this.OriginAddress.ArriveCityId
}
},
RenewalAddres(SelectObj,AddressType){
if(AddressType==1){
......@@ -245,6 +253,7 @@
this.msg.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID
}
this.showAddressPreviwe = false
this.getDataList()
},
//滚动加载
lower(e) {
......@@ -264,8 +273,15 @@
// this.pageCount = res.data.pageCount
this.NewDateList = []
this.dataList = res.data
let arr = function(list){
list.forEach(x=>{
x.Price = 0
})
}
arr(this.dataList)
this.dateList.forEach(x => {
this.dataList.forEach(y=>{
y.Price = this.isToken?y.B2BPrice:y.B2CPrice
y.NewFlightList = []
if(y.FlightList.length>0&&y.FlightList.length<3){
y.FlightList.forEach(z=>{
......@@ -297,10 +313,11 @@
}
})
});
this.StartDateObj = this.NewDateList[0]
this.NewDataList = this.dataList.filter(x=> {
return x.FlightDate==this.NewDateList[0].times
})
this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
// this.StartDateObj = this.NewDateList[0]
// this.NewDataList = this.dataList.filter(x=> {
// return x.FlightDate==this.NewDateList[0].times
// })
}
uni.hideLoading()
});
......@@ -326,16 +343,24 @@
},
clickSearch(item,type){
if(type==1){
uni.showLoading()
if(this.StartDateObj.times==item.times){
this.StartDateObj = {}
this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
setTimeout(()=>{
uni.hideLoading()
},500)
}else{
this.StartDateObj = item
this.msg.StartDate = item.times
this.NewDataList = this.dataList.filter(x=> {
return x.FlightDate==item.times
})
setTimeout(()=>{
uni.hideLoading()
},500)
}
}else{
this.activeId = item
}
......@@ -355,6 +380,18 @@
if(res.resultCode==1){
this.DepartureCityList = res.data.DepartureCityList
this.ArrivalCity = res.data.ArrivalCity
if(this.msg.DepartCityId){
let DepartCityName = this.DepartureCityList.filter(x=>{
return x.ID==this.msg.DepartCityId
})
this.OriginAddress.DepartCityName = DepartCityName[0].Name
}
if(this.msg.ArriveCityId){
let ArriveCityName = this.ArrivalCity.filter(x=>{
return x.ID==this.msg.ArriveCityId
})
this.OriginAddress.ArriveCityName = ArriveCityName[0].Name
}
}
});
},
......
......@@ -71,9 +71,16 @@
},
methods: {
getAddress(item){
this.SelectObj = {
Name: item.Name,
ID: item.ID,
if(item.ID==this.SelectObj.ID){
this.SelectObj = {
Name: '',
ID: 0,
}
}else{
this.SelectObj = {
Name: item.Name,
ID: item.ID,
}
}
this.$emit('RenewalAddres',this.SelectObj ,this.AddressType)
// this.$forceUpdate()
......
......@@ -6,32 +6,33 @@
<view class="row-aic-n">
<view>
<view class="airTicketDetailsCard-qfc bgE1C278 fz30 color111 fontBold">
去程
<template v-if="items.FlightSubType==1">去程</template>
<template v-if="items.FlightSubType==3">返程</template>
</view>
</view>
<view class="fz28 color111 ML20">
<text>09-30</text> <text class="ML10">周六</text>
<text>{{items.time}}</text> <text class="ML10">周{{items.week}}</text>
</view>
<view class="fz28 color111 ML31">
总时长 5h
总时长 {{items.duration}}
</view>
</view>
<view class="fz28 colorE1C278 row-aic-n" @click="TicketDetails(items)">
<view v-if="items.FlightList.length>1" class="fz28 colorE1C278 row-aic-n" @click="TicketDetails(items)">
<text>详情</text>
<uni-icons class="ML10" color="#DEBF7B" :type="items.show?'arrowdown':'arrowright'" size="14"></uni-icons>
<!-- <uni-icons class="ML10" color="#DEBF7B" type="arrowright" size="14"></uni-icons> -->
</view>
</view>
<view class="MT60 PX50" v-if="!items.show">
<view class="row relative" v-for="(item,index) in 2"
<view class="row relative" v-for="(item,index) in items.NewFlightList"
:class="[index==0?'MB50':'']">
<text v-if="index==1" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
10-01 周日
{{item.time}} 周{{item.week}}
</text>
<view class="airTicketDetailsCard-timeL column flexS MR20 textRight">
<view v-if="index==0" class="fz28 fontBold relative relativeFT10">09:00 </view>
<view v-if="index==1" class="MT25 fz28 fontBold">
11:30
<view v-if="index==0" class="fz28 fontBold relative relativeFT10">{{item.Departure_time}} </view>
<view v-if="items.NewFlightList.length-1==index" class="MT25 fz28 fontBold">
{{item.Arrival_time}}
</view>
</view>
<view class="flexS MR30">
......@@ -49,33 +50,38 @@
</view>
</view>
<view class="column flexG relative">
<view v-if="index==1" class="airTicketDetailsCard-ZhuanNum bgE1C278 fz18 colorFFF absolute">转+2</view>
<view v-if="index!=0" class="airTicketDetailsCard-ZhuanNum bgE1C278 fz18 colorFFF absolute">
<template v-if="items.FlightList.length-1>1">+{{items.FlightList.length-1}}</template>
</view>
<view class="airTicketDetailsCard-title row-aic-n absolute" v-if="index==0">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696749257000_469.png"/>
:src="item.AlImage"/>
<view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">东航 CA1852 </text>
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}} </text>
</view>
</view>
<view class="fz28 fontBold relative relativeFT8" v-if="index==0">
<text class="block width100One hidden">CTU 双流机场 T2</text>
<text class="block width100One hidden">{{item.DepartureName}} {{item.dName}}</text>
</view>
<view class="fz28 fontBold MT25" v-if="index==1">
<text class="block width100One hidden">PEK 首都机场 T3</text>
<text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}}</text>
</view>
</view>
</view>
</view>
<view class="MT60 PX50"
:class="[index!=1?'MB50':'']" v-if="items.show">
<view class="row-aic-n MB70 relative" v-for="(item,index) in 3">
<text v-if="index==2" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
10-01 周日
<template v-if="items.show">
<view class="MT60 PX50" v-for="(item,index) in items.FlightList"
:class="[items.FlightList.length-1!=index?'MB50':'']">
<view class="row-aic-n relative"
:class="[items.FlightList.length-1!=index?'MB70':'']">
<text v-if="items.FlightList.length-1==index" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
{{item.time}}{{item.week}}
</text>
<view class="airTicketDetailsCard-timeL column flexS MR20 textRight">
<view :class="[index?'fz24':'fz28 fontBold']">09:00 </view>
<view class="MT35" :class="[index!=2?'fz24':'fz28 fontBold']">
11:30
<view :class="[index?'fz24':'fz28 fontBold']">{{item.Departure_time}} </view>
<view class="MT35" :class="[items.FlightList.length-1!=index?'fz24':'fz28 fontBold']">
{{item.Arrival_time}}
</view>
</view>
<view class="flexS MR30">
......@@ -86,35 +92,39 @@
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT3"></view>
</template>
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinB"></view>
<template v-if="index!=2">
<template v-if="items.FlightList.length-1>index">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinB2"></view>
<view class="bgE1C278 fz18 colorFFF absolute airTicketDetailsCard-LinText">中转</view>
<view class="bgE1C278 fz18 colorFFF absolute airTicketDetailsCard-LinText">
中转
</view>
</template>
</view>
</view>
<view class="column flexG relative">
<view class="airTicketDetailsCard-title row-aic-n absolute">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696749257000_469.png"/>
:src="item.AlImage"/>
<view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">东航 CA1852 </text>
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}}</text>
</view>
</view>
<view class="fz28 fontBold relative relativeFT8">
<text class="block width100One hidden">CTU 双流机场 T2</text>
<text class="block width100One hidden">{{item.DepartureName}} {{item.dName}} </text>
</view>
<view class="fz28 fontBold MT25">
<text class="block width100One hidden">PEK 首都机场 T3</text>
<text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}} </text>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script>
export default {
props:['DetailsList'],
components: {
},
......@@ -132,6 +142,15 @@
},
onLoad(options){
},
watch: {
DetailsList:{
handler(newVal, oldval) {
this.dataList = JSON.parse(JSON.stringify(this.DetailsList))
},
deep: true,
immediate: true
}
},
created() {},
methods: {
......
......@@ -75,11 +75,11 @@
<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="(isToken?item.B2BPrice:item.B2CPrice)>0">¥</text>
<text class="fz20 relative" v-if="item.Price>0">¥</text>
</view>
<text :class="[(isToken?item.B2BPrice:item.B2CPrice)>0?'fz36':'fz22 fontWeight400']">
<template v-if="(isToken?item.B2BPrice:item.B2CPrice)>0">
{{isToken?item.B2BPrice:item.B2CPrice}}
<text :class="[item.Price>0?'fz36':'fz22 fontWeight400']">
<template v-if="item.Price>0">
{{item.Price}}
</template>
<template v-else>暂无报价</template>
</text>
......@@ -88,7 +88,7 @@
<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="(isToken?item.B2BPrice:item.B2CPrice)>0&&item.B2BSellNum==0">售罄</template>
<template v-if="item.Price>0&&item.B2BSellNum==0">售罄</template>
</text>
</view>
</view>
......@@ -109,10 +109,9 @@
},
created() {},
methods: {
getPriceDetail(item){
uni.navigateTo({
url: '/pages/airTicket/airTicketDetails'
url: `/pages/airTicket/airTicketDetails?TCID=${item.TCID}&Price=${item.Price}`
});
},
}
......
......@@ -168,4 +168,33 @@ export const formatDate = (date, fmt) => {
else{week = '日'}
return week;
}
// 根据身份证获取生日 年龄 性别
export const parseIDCard = (idCard)=> {
// 正则表达式匹配身份证号格式
var reg = /^\d{17}[\dXx]$/;
if (reg.test(idCard)) {
// 提取出生日期
var birthday = idCard.substring(6, 14);
var year = birthday.substring(0, 4);
var month = birthday.substring(4, 6);
var day = birthday.substring(6, 8);
// 计算年龄
var currentYear = new Date().getFullYear();
var age = currentYear - parseInt(year);
// 提取性别
var genderCode = parseInt(idCard.charAt(16));
var gender = genderCode % 2 === 0 ? "女" : "男";
return {
birthday: year + "-" + month + "-" + day,
age: age,
gender: gender
};
}
return null; // 身份证号格式不正确
}
\ 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