Commit 55adb539 authored by 罗超's avatar 罗超

修改机票信息

parent 1e478a69
......@@ -22,7 +22,7 @@
margin-left: 32rpx;
}
.q-mt-md{
margin-top: 32rpx;
margin-top: 32rpx !important;
}
.q-mb-md{
margin-bottom: 32rpx;
......
@font-face {
font-family: "tffont"; /* Project id 4816119 */
src: url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.woff2?t=1739957291854') format('woff2'),
url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.woff?t=1739957291854') format('woff'),
url('//at.alicdn.com/t/c/font_4816119_3fhqn0zoshb.ttf?t=1739957291854') format('truetype');
src: url('//at.alicdn.com/t/c/font_4816119_6zzxojucd79.woff2?t=1740378953818') format('woff2'),
url('//at.alicdn.com/t/c/font_4816119_6zzxojucd79.woff?t=1740378953818') format('woff'),
url('//at.alicdn.com/t/c/font_4816119_6zzxojucd79.ttf?t=1740378953818') format('truetype');
}
.tffont {
......@@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale;
}
.tffont-checkmark:before {
content: "\e611";
}
.tffont-close-circle-o:before {
content: "\e848";
}
.tffont-clock:before {
content: "\e621";
}
.tffont-baby:before {
content: "\e650";
}
......
......@@ -751,6 +751,13 @@
{
"navigationBarTitleText" : "填写机票订单信息"
}
},
{
"path" : "airTicketOrderDetail",
"style" :
{
"navigationBarTitleText" : ""
}
}
]
},
......
......@@ -8,8 +8,8 @@
<img class="inlineblock MR20" mode="widthFix" style="width: 44rpx;height: 44rpx;"
:src="orderStatus.icon"/>
<!-- 已付款 待付款 已取消 -->
<text class="fz36 fontBold"
:class="[orderStatus.code==-1?'colorC6C1BC':'']">{{orderStatus.text}}</text>
<!-- <text class="fz36 fontBold"
:class="[orderStatus.code==-1?'colorC6C1BC':'']">{{orderStatus.text}}</text> -->
</view>
<view @click="getDetail">
<text class="fz26 colorC09D4F">¥</text>
......
<template>
<view class="f-order column" :style="{'background-image': `linear-gradient(180deg, ${orderStyle.bg}, #F5F5F5)`}">
<scroll-view scroll-y="true" class="col" style="height: 1px;">
<template v-if="order.CreateDate" v-for="x in lowData">
<view class="f-order-card" style="background:transparent;" :style="{color:orderStyle.color}">
<view class="title row items-center">
<u-icon v-if="order.status==0" name='clock' custom-prefix="tffont" size="44"></u-icon>
<u-icon v-if="order.status==1" name='checkmark' custom-prefix="tffont" size="44"></u-icon>
<u-icon v-if="order.status==2" name='close-circle-o' custom-prefix="tffont" size="44"></u-icon>
<text class="q-ml-sm col bold">
{{(order.status==0?'待支付':(order.status==1?'正常':'已取消'))}}
</text>
<u-count-down :timestamp="endts" v-if="order.status==0" color="#ffffffdd" separator-color="#ffffffdd" :show-days="false" bg-color="transparent"></u-count-down>
</view>
<view class="content q-mt-sm">
<view v-if="order.status==0">
<view>
<text>请您于{{dielineTime}}前支付:¥</text>
<text class="bold">{{order.PreferPrice}}</text>
</view>
<view class="small">
完成支付才能锁定机位
</view>
</view>
<view class="small" v-else-if="order.status==2">
取消原因:用户超时未付款,自动取消
</view>
<view class="small" v-else>
感谢您的预定,服务专员将会持续为您提供服务
</view>
</view>
</view>
<view class="f-order-card">
<view class="row items-center">
<view class="col">
<text>总计:¥</text>
<text class="bold title" style="color: #FF3166;">{{order.PreferPrice}}</text>
<view class="small" style="color: #9999A5 ;">
订单编号:{{id}}
</view>
</view>
<view style="color: #9999A5;" @click="priceVisible=true">
<view class="content row items-center" style="justify-content: flex-end;">
<text style="line-height: 1;">明细</text>
<u-icon name='arrow_right' custom-prefix="tffont" color="#00000066" size="28"></u-icon>
</view>
<view class="small" style="margin-top: 10rpx;">
创建日期:{{order.CreateDate}}
</view>
</view>
</view>
<template v-if="order.status==1">
<view class="split-line full"></view>
<view class="row items-center" style="color: #9999A5;">
<view class="small col">
<text>出票状态:</text>
<text style="color: #000;font-size: 28rpx;" :style="{color:order.TicketList[0].TicketProductList[0].TicketState==0?'#000':'#FF5858'}">{{order.TicketList[0].TicketProductList[0].TicketState==0?'等待出票':'已出票'}}</text>
</view>
<view class="small">
出票日期:
<text style="color:#000">
{{order.TicketList[0].TicketProductList[0].TicketDeadline.split(' ')[0]}}
</text>
</view>
</view>
</template>
</view>
<view class="q-mt-md f-order-card uppart" @click="setFlightDetailHandle(0)">
<view class="row items-center">
<view class="flight-status">去程</view>
<view class="content text-right col">
{{x.GoFlightList[0].DepartureName}}-{{x.GoFlightList[x.GoFlightList.length-1].ArrivalCityName}} {{formatDateStringByChinese(x.GoFlightList[0].FlightDate)}}
</view>
</view>
<view class="row items-center">
<view class="first-blond col" style="margin-top: 60rpx;">
<view class="row items-center">
<view class="flight-time">
<view class="">{{x.GoFlightList[0].Departure_time}}</view>
<view class="thin">{{x.GoFlightList[0].dName.replaceAll('国际机场','').replaceAll('机场','')}}</view>
<view style="margin-top: 16rpx;font-size: 30rpx;">{{x.GoFlightList[0].DIATA}}</view>
</view>
<view class="used-time column col">
<view class="how-time row items-center justify-center">
<text>{{x.DepartureTime.Days*24+x.DepartureTime.Hours}}h {{x.DepartureTime.Minutes}}m</text>
<view class="other-status" v-if="x.GoFlightList.length>1">
中转{{x.GoFlightList.length-1}}次
</view>
</view>
<view class="line">&nbsp;</view>
<view class="t-cities" v-if="x.GoFlightList.length>1">
<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 class="flight-time">
<view class="day-diff" v-if="x.GoDiffDay!=0">
{{`${x.GoDiffDay>0?'+':''}${x.GoDiffDay}`}}天
</view>
<view class="">{{x.GoFlightList[x.GoFlightList.length-1].Arrival_time}}</view>
<view class="thin">{{x.GoFlightList[x.GoFlightList.length-1].aName.replaceAll('国际机场','').replaceAll('机场','')}}</view>
<view style="margin-top: 16rpx;font-size: 30rpx;">{{x.GoFlightList[x.GoFlightList.length-1].AIATA}}</view>
</view>
</view>
<view class="row items-center" style="margin-top: 14rpx;">
<view class="row items-center" v-for="(a,ai) in x.GoFlightList">
<view class="login-box">
<image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image>
</view>
<text class="login-text">{{a.Flight_number}} </text>
</view>
</view>
</view>
<view class="">
<u-icon class="q-ml-sm" name='arrow_down' custom-prefix="tffont" color="#00000066" size="32"></u-icon>
</view>
</view>
</view>
<view class="f-order-card downpart" @click="setFlightDetailHandle(1)">
<view class="row items-center">
<view class="flight-status">回程</view>
<view class="content text-right col">
{{x.BackFlightList[0].DepartureName}}-{{x.BackFlightList[x.BackFlightList.length-1].ArrivalCityName}} {{formatDateStringByChinese(x.BackFlightList[0].FlightDate)}}
</view>
</view>
<view class="row items-center">
<view class="first-blond col" style="margin-top: 60rpx;">
<view class="row items-center">
<view class="flight-time">
<view class="">{{x.BackFlightList[0].Departure_time}}</view>
<view class="thin">{{x.BackFlightList[0].dName.replaceAll('国际机场','').replaceAll('机场','')}}</view>
<view style="margin-top: 16rpx;font-size: 30rpx;">{{x.BackFlightList[0].DIATA}}</view>
</view>
<view class="used-time column col">
<view class="how-time row items-center justify-center">
<text>{{x.ArrivalTime.Days*24+x.ArrivalTime.Hours}}h {{x.ArrivalTime.Minutes}}m</text>
<view class="other-status" v-if="x.BackFlightList.length>1">
中转{{x.BackFlightList.length-1}}次
</view>
</view>
<view class="line">&nbsp;</view>
<view class="t-cities" v-if="x.BackFlightList.length>1">
<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 class="flight-time">
<view class="day-diff" v-if="x.BackDiffDay!=0">
{{`${x.BackDiffDay>0?'+':''}${x.BackDiffDay}`}}天
</view>
<view class="">{{x.BackFlightList[x.BackFlightList.length-1].Arrival_time}}</view>
<view class="thin">{{x.BackFlightList[x.BackFlightList.length-1].aName.replaceAll('国际机场','').replaceAll('机场','')}}</view>
<view style="margin-top: 16rpx;font-size: 30rpx;">{{x.BackFlightList[x.BackFlightList.length-1].AIATA}}</view>
</view>
</view>
<view class="row items-center" style="margin-top: 14rpx;">
<view class="row items-center" v-for="(a,ai) in x.BackFlightList">
<view class="login-box">
<image :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${a.AlCode}.png`" mode="widthFix"></image>
</view>
<text class="login-text">{{a.Flight_number}} </text>
</view>
</view>
</view>
<view class="">
<u-icon class="q-ml-sm" name='arrow_down' custom-prefix="tffont" color="#00000066" size="32"></u-icon>
</view>
</view>
</view>
<view class="f-order-card q-mt-md">
<view class="row items-center">
<view style="font-size: 32rpx;" class="col">
出行信息
</view>
<text class="q-ml-sm">{{crCount}}成人</text>
<text class="q-ml-sm">{{etCount}}儿童</text>
<text class="q-ml-sm">{{babyCount}}婴儿</text>
</view>
<view class="q-mt-md">
<view class="guest row items-center" v-for="(x,i) in order.GuestList" :key="i">
<text>{{String(i+1).padStart(2,'0')}}</text>
<view class="q-ml-md col">
<text class="bold" style="color: #000;">{{x.ESurName}}/{{x.EName}}</text>
<text class="q-ml-sm">({{x.Sex==1?'男':'女'}})</text>
</view>
<view>
护照号:{{x.PassportNo}}
</view>
</view>
</view>
<view class="split-line full"></view>
<view class="row items-center q-mb-sm q-mb-md">
<text style="color: #9999A5;width: 56px;" class="q-mr-md">联系人</text>
<text>{{order.ContactName}}</text>
</view>
<view class="row items-center">
<text style="color: #9999A5;" class="q-mr-md">联系电话</text>
<text>+86 {{order.ContactMobile}}</text>
</view>
</view>
</template>
<view style="padding-bottom: 20rpx;"></view>
</scroll-view>
<view class="botton-box" :style="{paddingBottom:`${bottomSafeHeight}rpx`}">
<view class="text-center cities-name" @click="cancelVisible=true" v-if="order.status==0" style="background-color: #1d1d20;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4">取消订单</view>
<view class="text-center cities-name" @click="requeryHandle" v-if="order.status==2" style="background-color: #1d1d20;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4">再次预定</view>
<view class="row" v-if="order.ResultPrice && order.status==1">
<view class="col" style="color: #9999A5;">
<text class="small">已支付:¥ </text>
<text style="font-size: 40rpx;font-weight: bold;color:#ff3166;">
{{order.ResultPrice-Number(order.DueInMoney)}}
</text>
</view>
<view style="font-size: 22rpx;">
<view class="text-right">
如有变更,请联系:
</view>
<view class="">
{{order.SaleName}}/{{order.SalePhone}}
</view>
</view>
</view>
</view>
<u-popup mode="bottom" border-radius="20" :popup="false" v-model="flightVisible" :maskCloseAble="true" length="auto" :safeAreaInsetBottom="true" @close="popupClose" :z-index="9999">
<view style="padding:30rpx;min-height: 60vh;">
<flight :value="currentFlight"></flight>
</view>
</u-popup>
<u-popup mode="bottom" border-radius="20" :popup="false" v-model="priceVisible" :maskCloseAble="true" length="auto" :safeAreaInsetBottom="true" @close="popupClose" :z-index="9999">
<view style="padding:50rpx;">
<view style="font-size: 32rpx;font-weight: bold;">
价格明细
</view>
<view class="q-mt-md">
<view v-if="crCount>0" class="row items-center price-list-details">
<view class="col">
<text style="margin-right: 30rpx">成人</text>
</view>
<view>{{ crCount }}人 × ¥{{B2BPrice}}</view>
</view>
<view v-if="etCount>0" class="row items-center price-list-details">
<view class="col">
<text style="margin-right: 30rpx">儿童</text>
</view>
<view>{{ etCount }}人 × ¥{{B2BPrice}}</view>
</view>
<view v-if="babyCount>0" class="row items-center price-list-details">
<view class="col">
<text style="margin-right: 30rpx">婴儿</text>
</view>
<view>{{ babyCount }}人 × ¥{{babyPrice}}</view>
</view>
<view style="border-top: 1px dashed #f1f1f1;padding-top: 40rpx;" class="row items-center price-list-details">
<view class="col">
<text style="margin-right: 30rpx">小记</text>
</view>
<view>¥{{order.PreferPrice}}</view>
</view>
<view v-if="order.DiscountMone>0" class="row items-center price-list-details" :style="{color:'#FF5858'}">
<view class="col">
<text style="margin-right: 30rpx">优惠券</text>
</view>
<view>-¥{{order.DiscountMone}}</view>
</view>
<view style="border-top: 1px dashed #f1f1f1;padding-top: 40rpx;" class="row items-center price-list-details">
<view class="col">
<text style="margin-right: 30rpx">合计应收</text>
</view>
<view style="color: #FF5858;">
<text>¥</text>
<text style="font-size: 32rpx;">{{order.ResultPrice}}</text>
</view>
</view>
</view>
</view>
</u-popup>
<u-modal :border-radius="16" @confirm="cancleOrderHandle" title="订单取消提醒" content="你正在取消订单,是否确认执行" @cancel="cancelVisible=false" v-model="cancelVisible" confirm-text='确认取消' cancel-text='关闭' confirm-color='#DEBF7B' cancel-color='#080A09' :show-cancel-button="true"></u-modal>
</view>
</template>
<script>
import Flight from './components/flight/Index.vue'
export default {
data() {
return {
timestamp: 86400,
statusColors:['#ff3166','#ECDFC4','#dddddd'],
fontsColors:['#FFFFFFbb','#1D1D20','#1D1D20'],
order:{status:4},
id:0,
flightVisible:false,
lowData:[],
orderStyle:{
bg:'',
color:''
},
currentFlight:[],
bottomSafeHeight:30,
endts:0,
cancelVisible:false,
priceVisible:false,
dielineTime:'',
guest:[]
}
},
computed:{
crCount() {
const r = this.guest.filter(x => x.year >= 12)
return r.length
},
etCount() {
const r = this.guest.filter(x => x.year >= 2 && x.year < 12)
return r.length
},
babyCount() {
const r = this.guest.filter(x => x.year < 2)
return r.length
},
B2BPrice(){
if(!this.order.TicketList) return 0
return this.order.TicketList[0].TicketProductList[0].B2BPrice
},
babyPrice() {
if(!this.order.TicketList) return 0
const p = this.order.TicketList[0].TicketProductList[0].B2BPrice
let bp = this.order.TicketList[0].TicketProductList[0].BabyPrecent
bp = bp && bp != '' ? (parseFloat(bp) / 100.00) : 0
return Math.ceil(bp * p)
},
},
components:{Flight},
onLoad(options) {
if (options.id) {
this.id = options.id
this.order.status = options.status?options.status:1
uni.setNavigationBarTitle({
title:'特价机票订单详细信息'
})
this.setThemeHandle()
this.getOrderDetailHandle()
return
}
this.navigatorToHomeHandle()
},
methods: {
calcSafeArea() {
const { safeAreaInsets } = uni.getSystemInfoSync()
this.bottomSafeHeight = safeAreaInsets.bottom > 0 ? (safeAreaInsets.bottom*2) : 30
},
setThemeHandle(){
uni.setNavigationBarColor({
backgroundColor: this.statusColors[this.order.status],
frontColor:'#000000'
})
this.orderStyle = {
color:this.fontsColors[this.order.status],
bg:this.statusColors[this.order.status]
}
},
navigatorToHomeHandle() {
uni.redirectTo({
url: '/pages/index/index'
})
},
popupClose(){
this.flightVisible=false
this.priceVisible=false
},
setFlightDetailHandle(t){
this.currentFlight = t==0?this.lowData[0].GoFlightList:this.lowData[0].BackFlightList
this.flightVisible=true
},
getOrderDetailHandle(){
uni.showLoading()
this.apipost("sellorder_post_Get2025OrderEntityAirTicket",{ID:this.id,IsGetGuest:1},(res) => {
uni.hideLoading()
if(res.resultCode==1){
res.data.status = res.data.OrderState==1?1:(res.data.OrderState==4?2:0)
if(res.data.status==0){
let endTime = new Date(res.data.CreateDate)
endTime.setHours(endTime.getHours()+6)
this.endts = Math.floor(( endTime.getTime() - new Date().getTime())/1000)
if(this.endts<=0){
this.cancleOrderHandle()
}
this.dielineTime = `${endTime.getHours()}${endTime.getMinutes()}分`
}
this.order = res.data
this.setThemeHandle()
this.lowData = this.formatLowData(res.data.TicketList)
this.getGuestHandle()
}
},(e)=>{
uni.hideLoading()
})
},
getGuestHandle(){
this.order.GuestList.forEach(x=>{
x.year = this.calculateAge(x.Birthday)
})
this.guest = this.order.GuestList
console.log(this.guest)
},
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;
},
cancleOrderHandle(){
this.cancelVisible=false
uni.showLoading()
this.apipost("sellorder_post_B2BRemoveOrder",{ID:this.id},(res) => {
uni.hideLoading()
this.order.status=2
this.setThemeHandle()
},(e)=>{
uni.hideLoading()
})
},
requeryHandle(){
const x = this.lowData[0].GoFlightList
const d=[
{
type:0,
ID:x[0].DepartureCity,
Name:x[0].DepartureName
},
{
type:1,
ID:x[x.length-1].ArrivalCityId,
Name:x[x.length-1].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'
uni.navigateTo({
url
})
},
formatLowData(d) {
if (!d || d.length == 0) return []
const list = d[0].TicketProductList
list.sort((a, b) => {
return new Date(a.FlightDate) - new Date(b.FlightDate);
})
list.forEach(x=>{
x.GoFlightList = x.FlightList.filter(f=>f.FlightType==1)
x.BackFlightList = x.FlightList.filter(f=>f.FlightType==3)
const go = x.GoFlightList[0]
const back = x.BackFlightList[0]
x.GoDiffDay = this.resolveDiffDayHandle(`${go.FlightDate} ${go.Departure_time}`,go.DepartureUTCZone,go.ArrivalCityUTCZone,x.DepartureTime)
x.BackDiffDay = this.resolveDiffDayHandle(`${back.FlightDate} ${back.Departure_time}`,back.DepartureUTCZone,back.ArrivalCityUTCZone,x.ArrivalTime)
})
this.formatDisplayHandle(list)
return list
},
formatDisplayHandle(list){
this.dateDisplay = list.reduce((acc, item) => {
const arr = item.FlightDate.split('-')
const groupValue = `${arr[0]}${Number(arr[1])}${Number(arr[2])}`;
const currentPrice = item.B2BPrice;
if (!acc[groupValue]) {
acc[groupValue] = '¥'+currentPrice;
} else {
acc[groupValue] = '¥'+Math.min(parseFloat(acc[groupValue].replaceAll('¥','')), currentPrice);
}
return acc;
}, {});
},
formatDateString(d) {
const date = new Date(d)
const weeks = ['日', '一', '二', '三', '四', '五', '六']
return `${String(date.getMonth()+1).padStart(2,'0')}.${String(date.getDate()).padStart(2,'0')}${weeks[date.getDay()]}` //周${weeks[date.getDay()]}
},
formatDateStringByChinese(d) {
const date = new Date(d)
return `${String(date.getMonth()+1).padStart(2,'0')}${String(date.getDate()).padStart(2,'0')}日`
},
flightDateChangeHandle(date){
this.currentDate = date
this.centerSelectedItem()
},
resolveDiffDayHandle(s,sz,ez,ti){
const sDate = new Date(s)
const sourceDate = new Date(s)
sDate.setHours(sDate.getHours()+(ez-sz))
sDate.setDate(sDate.getDate()+ti.Days)
sDate.setHours(sDate.getHours()+ti.Hours)
sDate.setMinutes(sDate.getMinutes()+ti.Minutes)
sDate.setHours(0,0,0)
sourceDate.setHours(0,0,0)
return (((sDate.getTime()-sourceDate.getTime())/(24 * 60 * 60 * 1000)))
},
}
}
</script>
<style>
@import url('../../asset/css/flex.css');
.f-order{
height: 100vh;
background-color: #F5f5f5;
background-image: linear-gradient(180deg, #ECDFC4, #F5F5F5);
background-size: 100% 40vh;
background-repeat: no-repeat;
padding-top: 30rpx;
}
.f-order *{
line-height: 1;
}
.f-order .f-order-card{
margin: 0 30rpx;
background-color: #FFF;
border-radius: 16rpx;
padding:30rpx;
color: #1d1d20;
}
.f-order .f-order-card.top-status{
padding: 0;
}
.f-order .f-order-card .title{
font-size: 36rpx;
}
.f-order .f-order-card.uppart{
border-radius: 16rpx 16rpx 0 0;
position: relative;
}
.f-order .f-order-card.uppart::after{
position: absolute;
width: 16px;
height: 16px;
border-radius: 16px;
bottom: -8px;
background: #f5f5f5;
display: block;
content: ' ';
left: -8px;
z-index: 2;
}
.f-order .f-order-card.downpart{
border-radius: 0 0 16rpx 16rpx;
position: relative;
border-top: 1rpx dashed #f5f5f5;
}
.f-order .f-order-card.downpart::before{
position: absolute;
width: 16px;
height: 16px;
border-radius: 16px;
top: -8px;
background: #f5f5f5;
display: block;
content: ' ';
right: -8px;
z-index: 2;
}
.f-order .f-order-card .split-line{
margin: 20rpx 0;
height: 1px;
background-color: #00000014;
}
.f-order .f-order-card .split-line.full{
margin: 20rpx -30rpx;
}
.f-order .f-order-card .content{
font-size: 26rpx;
}
.f-order .bold{
font-weight: bold;
}
.f-order .small{
font-size: 22rpx;
}
.f-order .flight-status {
background: #E1C278;
border-radius: 8rpx;
font-size: 24rpx;
color: #111111;
font-weight: 400;
padding: 7rpx 14rpx;
}
.f-order .flight-time{
font-weight: bold;
font-size: 42rpx;
color: #000000;
line-height: 1;
margin:0 20rpx;
position: relative;
}
.f-order .flight-time .day-diff{
position: absolute;
top: -35rpx;
line-height: 1;
font-size: 22rpx;
color: #FF5858;
left: 4rpx;
}
.f-order .flight-time .thin{
line-height: 1;
margin-top: 16rpx;
font-weight: 400;
font-size: 22rpx;
color: #9999A5;
max-width: 45px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.f-order .used-time{
margin-top: -16rpx;
}
.f-order .used-time .how-time{
height: 24rpx;
font-size: 20rpx;
color: #9999A5;
}
.f-order .used-time .other-status{
background: #ECF1F4;
border-radius: 4rpx;
height: 24rpx;
font-size: 18rpx;
color: #111111;
padding: 0 7rpx;
margin-left: 14rpx;
font-weight: 500;
}
.f-order .used-time .line{
height: 4rpx;
background: #ECF1F4;
position: relative;
margin-top: 6rpx;
}
.f-order .used-time .line::before,
.f-order .used-time .line::after{
position: absolute;
left: 0;
top:-4rpx;
width: 12rpx;
height: 12rpx;
border-radius: 12rpx;
display: block;
content: ' ';
background: #ECF1F4;
}
.f-order .used-time .line::after{
left: unset;
right: 0;
}
.f-order .used-time .t-cities{
font-size: 19rpx;
color: #111111;
margin-top: 8rpx;
text-align: center;
}
.f-order .flight-time .day-diff{
position: absolute;
top: -35rpx;
line-height: 1;
font-size: 22rpx;
color: #FF5858;
left: 4rpx;
}
.f-order .login-box{
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #ECF1F4;
width: 36rpx;
height: 36rpx;
text-align: center
}
.f-order .login-box image{
width: 26rpx;
height: 26rpx;
}
.f-order .login-text{
font-size: 22rpx;
color: #9999A5;
margin-right: 36rpx;
margin-left: 10rpx;
}
.f-order .guest{
font-size: 26rpx;
color: #9999A5;
padding: 20rpx 0;
border-top: 1rpx dashed #f5f5f5;
}
.f-order .guest:first-child{
border-top:none;
padding: 0;
padding-bottom: 20rpx;
}
.f-order .botton-box{
padding:30rpx 40rpx;
box-shadow: 0 0 20rpx #00000014;
background-color: #FFF;
}
.price-list-details {
margin-bottom: 40rpx;
color: #999;
font-size: 24rpx;
}
</style>
......@@ -2,7 +2,7 @@
<view>
<template v-for="(item,i) in DataLists">
<view class="TicketOrderListCard bgFFF relative"
@click="getDetail(item.orderId)" v-if="item.NewFlightList.length>0">
@click="getDetail(item.orderId,item.orderState)" v-if="item.NewFlightList.length>0">
<view v-if="item.different" class="TicketOrderListCard-wf absolute bg111 colorFFF fz24 z-index2">异地</view>
<template v-for="(childs,index) in item.NewFlightList">
......@@ -80,7 +80,7 @@
</view>
</template>
<view class="row-sb-n MT30">
<view class="fz324 color9999A5 MR30 flexG">
<view class="fz324 color9999A5 MR30 flexG" style="font-size: 22rpx;">
<txet class="block TicketOrderListCard-title width100One ellipsis1" v-if="item.guestList&&item.guestList.length>0">
<template v-for="(n,is) in item.guestList"
v-if="2>is">
......@@ -89,24 +89,7 @@
</template>
等 {{item.guestList.length}} 人</txet>
</view>
<view class="flexS">
<view v-if="(item.orderState==1||item.orderState==2)"
class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1"
:class="[item.loading?'bgF5 borderF5 colorDEBF7B':'bgDEBF7B borderDEBF7B']"
@click.stop="queren(item.orderId,i)">
待付款
</view>
<!-- <view v-if="(item.orderState==1||item.orderState==2)&&item.loading"
class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1 bgF5 borderF5 colorDEBF7B"
@click.stop="queren(item.orderId,i)">
待付款
</view> -->
<view v-if="item.orderState==3||item.orderState==4"
class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1"
:class="[item.orderState==3?'bgFFF borderDEBF7B colorDEBF7B':'bgF5 borderF5 color9999A5']">
{{item.orderState==3?'已支付':'已取消'}}
</view>
</view>
</view>
</view>
......@@ -221,9 +204,10 @@
);
}
},
getDetail(orderId){
getDetail(orderId,s){
const status = s==1?1:(s==4?2:0)
uni.navigateTo({
url: `/pages/airTicket/TicketOrderDetails?orderId=${orderId}`
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}`
});
},
//微信支付
......
<template>
<view class="f-info">
<u-alert-tips type="warning" description="注意:航班起降时间均为机场当地时间."></u-alert-tips>
<view class="q-mt-md" v-if="showTitle && flight.length>0">
<view class="row items-center">
<view class="city bold">{{flight[0].DepartureName}}</view>
<u-icon name='qianwangx' custom-prefix="tffont" color="#00000033" size="28"></u-icon>
<view class="city bold">{{flight[flight.length-1].ArrivalCityName}}</view>
<view class="col row" style="font-size: 14px;justify-content: flex-end;">
<text> {{formatDateStringByChinese(flight[0].FlightDate)}}</text>
</view>
</view>
</view>
<view style="margin-top: 48rpx;">
<view class="" v-for="(x,i) in flight" :key="i">
<view class="row">
<view class="" style="width:80rpx">
<view class="item-city">
{{x.Departure_time}}
<view class="day-diff" v-if="x.startDiff && x.startDiff.nd!=''">
{{x.startDiff.nd}}
</view>
</view>
<view class="item-info text-right" style="margin: 48rpx 0;">{{x.endDiff.hours}}h{{x.endDiff.minutes}}m</view>
<view class="item-city">
{{x.Arrival_time}}
<view class="day-diff" v-if="x.endDiff && x.endDiff.nd!=''">
{{x.endDiff.nd}}
</view>
</view>
</view>
<view class="item-split"></view>
<view class="col">
<view class="item-city">{{x.DIATA}} {{x.dName}}</view>
<view class="item-info text-right row items-center" style="margin: 48rpx 0;">
<image style="width: 28rpx;" :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/${x.AlCode}.png`" mode="widthFix"></image>
<text class="q-ml-sm">{{x.AlName}} {{x.Flight_number}}</text>
</view>
<view class="item-city">{{x.AIATA}} {{x.aName}}</view>
</view>
</view>
<view class="row" v-if="x.transfer">
<view class="item-city" style="opacity: 0; width:80rpx"></view>
<view class="item-split-dashed"></view>
<view class="q-mt-md q-mb-md col">
<view class="zhongzhuan item-info">
{{x.transfer.city}}中转,{{x.transfer.hours}}h{{x.transfer.minutes}}m
<text class="warning q-ml-sm" v-if="x.transfer.isCross">跨天中转</text>
<text class="q-ml-sm" style="color:#FF5858" v-if="x.transfer.changeAirport!=''">注意更换机场</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
flight:[]
}
},
props:{
value:{
type:Array,
default:[],
require:true
},
showTitle:{
type:Boolean,
default:true
}
},
watch: {
value: {
deep: true,
immediate: true,
handler: function(newVal, oldVal) {
const d = this.formatTimeDifferenceHandle(this.value)
this.flight = d
},
},
},
methods:{
formatTimeDifferenceHandle(vals){
vals.forEach((x,i)=>{
const a = `${x.FlightDate} ${x.Departure_time}`
const diffZoneOffset = x.ArrivalCityUTCZone - x.DepartureUTCZone
x.ArrivalDate = this.calcArrivalDateHandle(a,diffZoneOffset,x.Arrival_time)
const b = `${x.ArrivalDate} ${x.Arrival_time}`
x.endDiff = this.calculateTimeDifference(a,b,diffZoneOffset)
if(i>0){
const p = `${vals[i-1].ArrivalDate} ${vals[i-1].Arrival_time}`
const pzone = vals[i-1].ArrivalCityUTCZone - x.DepartureUTCZone
console.log(p,a)
x.startDiff = this.calculateTimeDifference(p,a,pzone)
}
if(i<vals.length-1){
x.transfer = this.formatTransferHandle(x,vals[i+1])
}
})
return vals
},
formatTransferHandle(perv,next){
const a = new Date(`${perv.ArrivalDate} ${perv.Arrival_time}`)
const b = new Date(`${next.FlightDate} ${next.Departure_time}`)
const c = Math.abs(a.getTime()-b.getTime())
const hours = Math.floor(c / 3600000);
const minutes = Math.round((c % 3600000) / 60000);
return {
hours,
minutes,
isCross:a.getDate()!=b.getDate(),
city:perv.ArrivalCityName,
changeAirport:perv.AIATA!=next.DIATA?next.dName:''
}
},
formatDateStringByChinese(d,needWeek=true) {
const date = new Date(d)
const weeks = ['日', '一', '二', '三', '四', '五', '六']
let dateStr = `${String(date.getMonth()+1).padStart(2,'0')}${String(date.getDate()).padStart(2,'0')}日`
if(needWeek)
dateStr += `周${weeks[date.getDay()]}`
return dateStr
},
calcArrivalDateHandle(start,timezone,time){
const a = new Date(new Date(start).getTime()+(timezone * 3600 * 1000))
const tempb = new Date(`${a.getFullYear()}/${a.getMonth()+1}/${a.getDate()} ${time}`)
if(tempb<a){
tempb.setDate(a.getDate()+1)
}
return `${tempb.getFullYear()}-${tempb.getMonth()+1}-${tempb.getDate()}`
},
parseToUTC(datetimeStr, timezoneOffset) {
const [datePart, timePart] = datetimeStr.split(' ');
const [year, month, day] = datePart.split('-').map(Number);
const [hours, minutes] = timePart.split(':').map(Number);
const utcTimestamp = new Date(year, month - 1, day, hours, minutes)
- timezoneOffset * 3600 * 1000;
return new Date(utcTimestamp);
},
calculateTimeDifference(timeA, timeB, shicha) {
timeA = timeA.replaceAll('-','/')
timeB = timeB.replaceAll('-','/')
const a = new Date(new Date(timeA).getTime()+(shicha * 3600 * 1000))
const b = new Date(timeB)
console.log(shicha)
const diffMs = Math.abs(b.getTime() - a.getTime());
return {
hours:Math.floor(diffMs / 3600000),
minutes:Math.round((diffMs % 3600000) / 60000),
nd:a.getDate()!=b.getDate()?this.formatDateStringByChinese(b,false):''
}
}
}
}
</script>
<style>
@import url('../../../../asset/css/flex.css');
.f-info *{
line-height: 1;
}
.f-info .city {
margin: 0 12rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #080A09;
}
.f-info .bold {
font-size: 28rpx;
font-weight: bold;
line-height: 1;
}
.f-info .item-city{
font-weight: bold;
font-size: 30rpx;
color: #000000;
line-height: 1;
position: relative;
}
.f-info .item-info{
font-size: 22rpx;
color: #9999A5;
line-height: 1;
}
.f-info .item-split{
margin: 0 16rpx;
margin-bottom: 20rpx;
width:12rpx;
background-color: #E1C27899;
border-radius: 12rpx;
margin-top: 10rpx;
}
.f-info .item-split-dashed{
margin: 0 16rpx;
border-right: 12rpx dotted #E1C27899;
margin-top: -5px;
}
.f-info .zhongzhuan{
padding:30rpx;
background:#E1C27814;
border-radius:12rpx;
}
.f-info .warning{
color: #FF5858;
}
.f-info .item-city .day-diff{
position: absolute;
top: -35rpx;
line-height: 1;
font-size: 18rpx;
color: #FF5858;
left: 0rpx;
right: 0rpx;
text-align:center
}
</style>
\ No newline at end of file
......@@ -32,7 +32,7 @@
<u-icon name="pen_" custom-prefix="tffont" color="#B99846" size="30"></u-icon>
</view>
</view>
<view class="add" @click="listVisible=true">
<view class="add" @click="chosenListHandle">
{{showGuests.length==0?'添加乘机人':'更多乘机人'}}
</view>
......@@ -135,6 +135,10 @@
}
//console.log('setCheckStatusHandle',x.Checked)
},
chosenListHandle(){
this.listVisible=true
this.$refs.guestManagerRef.resetVisible()
},
guestChangeHandle(val){
this.guests = val
},
......
......@@ -38,7 +38,7 @@
</view>
<view class="q-mt-sm">
护照号 {{x.Passport}}
<text class="q-ml-sm">{{x.Sex==1?'男':'女'}}</text>
<text class="q-ml-sm">{{x.Sex=='M'?'男':'女'}}</text>
</view>
</view>
<view @click="createNewGuest(x)" style="width: 50px;height: 50rpx;align-items: flex-end;" class="column justify-center">
......@@ -210,6 +210,9 @@
},
methods:{
resetVisible(){
this.showFormVisible = false
},
setCheckStatusHandle(x){
if(!x.Checked && !this.canChecked && x.year>1) return
x.Checked = !x.Checked
......
......@@ -6,7 +6,7 @@
</view>
<scroll-view v-if="flight && !loading" scroll-y="true" class="col" style="height: 1px;">
<view class="flight-card">
<view class="row items-center">
<view class="row items-center" @click="goVisible=!goVisible">
<view class="flight-status">去程</view>
<view class="city bold">{{goList[0].DepartureName}}</view>
<u-icon name='qianwangx' custom-prefix="tffont" color="#00000033" size="28"></u-icon>
......@@ -17,9 +17,12 @@
size="32"></u-icon>
</view>
</view>
<view class="q-mt-md" style="padding: 32rpx 0;" v-if="goVisible">
<flight :value="goList" :show-title="false"></flight>
</view>
</view>
<view class="flight-card">
<view class="row items-center">
<view class="row items-center" @click="backVisible=!backVisible">
<view class="flight-status">回程</view>
<view class="city bold">{{backList[0].DepartureName}}</view>
<u-icon name='qianwangx' custom-prefix="tffont" color="#00000033" size="28"></u-icon>
......@@ -30,6 +33,9 @@
size="32"></u-icon>
</view>
</view>
<view class="q-mt-md" style="padding: 32rpx 0;" v-if="backVisible">
<flight :value="backList" :show-title="false"></flight>
</view>
</view>
<view class="flight-card q-mt-md">
......@@ -117,7 +123,7 @@
</view>
<view>{{ babyCount }}人 × ¥{{babyPrice}}</view>
</view>
<view v-if="useCouponId>0" class="row items-center price-list-details" :style="{color:mainColor}">
<view v-if="useCouponId.length>0" class="row items-center price-list-details" :style="{color:mainColor}">
<view class="col">
<text style="margin-right: 30rpx">优惠券</text>
</view>
......@@ -156,7 +162,8 @@
<script>
import guest from './components/guest/index.vue'
import coupon from '@/components/coupon/index';
import coupon from '@/components/coupon/index';
import Flight from './components/flight/Index.vue'
export default {
data() {
return {
......@@ -219,12 +226,15 @@
},
sales:[],
saleVisable:false,
statusVisible:false
statusVisible:false,
backVisible:false,
goVisible:false
}
},
components: {
guest,
coupon
coupon,
Flight
},
computed: {
price() {
......@@ -489,12 +499,12 @@
this.backList = t.FlightList.filter(x => x.FlightType == 3)
this.flight = t
const demo = {
g: this.goList,
b: this.backList,
f: this.flight
}
uni.setStorageSync('demo_flight', demo)
// const demo = {
// g: this.goList,
// b: this.backList,
// f: this.flight
// }
// uni.setStorageSync('demo_flight', demo)
},
getWeeks(d) {
const date = new Date(d)
......
......@@ -389,7 +389,7 @@
})
this.formatDisplayHandle(list)
this.lowHeadData =this.foramtHeaderListHandle(list)
if(this.lowHeadData.findIndex(x=>x.FlightDate==this.currentDate)==-1){
if( this.lowHeadData.length>0 && this.lowHeadData.findIndex(x=>x.FlightDate==this.currentDate)==-1){
this.currentDate = this.lowHeadData[0].FlightDate
}
return list
......
<template>
<scroll-view scroll-y="true" style="height: 100vh;" @scroll="handleScroll">
<view v-if="showStart == true" style="width: 100vw; height: 100vh">
<image :src="startData.PicUrl" mode="aspectFit" style="width: 100%; height: 100%; position: relative">
<view class="Startbtn" :style="{ top: pagePaddingBottom }" @click="startb">
跳过
</view>
</image>
</view>
<view v-if="myPageData.home_pages" class="safe-top" v-show="showStart == false" :style="[myPageData.home_pages.navs[active].templateBg]">
<view class="content" :style="{
'padding-bottom':(pageId==0?'calc(57px + env(safe-area-inset-bottom))':'0px'),
}">
<view :style="{opacity:`${pageId!=0?100:(scrollTop-20)}%`}">
<view class="index-title" :class="{ MainTopLeft: pageTitleStr.length > 10 }" :style="[
myPageData.home_pages.navs[active].templateBg,
titleStyle,
{
color: myPageData.home_pages.navs[active].templateBg
? myPageData.home_pages.navs[active].templateBg.titleColor
: '',
}]">
<text v-if="isNavPosition == 0">{{ pageTitleStr }}</text>
<view v-if="pageId!=0" class="back-arrow row items-center" @click="goback">
<u-icon name="home_1" custom-prefix="tffont" color="#111" size="38"
style="font-weight: bolder;"></u-icon>
</view>
<view style="height: 100vh;">
<scroll-view :bounces="false" scroll-y="true" style="height: 100vh;" @scroll="handleScroll">
<view v-if="showStart == true" style="width: 100vw; height: 100vh">
<image :src="startData.PicUrl" mode="aspectFit" style="width: 100%; height: 100%; position: relative">
<view class="Startbtn" :style="{ top: pagePaddingBottom }" @click="startb">
跳过
</view>
</view>
<u-tabs v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" name="name" :list="myPageData.home_pages.navs"
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false"
@change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
<view :key="i" v-if="active == i">
<template v-for="(d, di) in item.template.data">
<search v-if="d.id == 'search' && isNavPosition == 0" :style-str="d.data" :key="di"></search>
<swiper v-if="d.id == 'banner'" :swipers="d.data" :key="di"></swiper>
<empty v-if="d.id == 'empty'" :block="d.data" :key="di"></empty>
<rubik v-if="d.id == 'rubik'" :ad="d.data" :key="di"></rubik>
<goods v-if="d.id == 'goods'" :goods="d.data" :key="di"></goods>
<notice v-if="d.id == 'notice'" :notice="d.data" :key="di"></notice>
<gridnav v-if="d.id == 'nav'" :navs="d.data" :key="di"></gridnav>
<pagetitle v-if="d.id == 'link'" :ts="d.data" :key="di"></pagetitle>
<videopage v-if="d.id == 'video'" :video="d.data" :key="di"></videopage>
<copyright v-if="d.id == 'copyright'" :cop="d.data" :key="di"></copyright>
<checkin v-if="d.id == 'check-in'" :check="d.data" :key="di"></checkin>
<userbox v-if="d.id == 'user-info'" :ts="d.data" :key="di"></userbox>
<userorder v-if="d.id == 'user-order'" :uo="d.data" :key="di"></userorder>
<checkform v-if="d.id == 'form'" :forms="d.data" :key="di"></checkform>
<addialog v-if="d.id == 'modal' && d.data.opened" :ads="d.data" :key="di"></addialog>
<quicknav v-if="d.id == 'quick-nav' && d.data.navSwitch == 1" :navs="d.data" :key="di"></quicknav>
<shopinfo v-if="d.id == 'shop-info'" :ad="d.data" :key="di" ref="son"></shopinfo>
</template>
</image>
</view>
<view v-if="myPageData.home_pages" class="safe-top" v-show="showStart == false" :style="[myPageData.home_pages.navs[active].templateBg]">
<view class="content" :style="{
'padding-bottom':(pageId==0?'calc(57px + env(safe-area-inset-bottom))':'0px'),
}">
<view :style="{opacity:`${pageId!=0?100:(scrollTop-20)}%`}">
<view class="index-title" :class="{ MainTopLeft: pageTitleStr.length > 10 }" :style="[
myPageData.home_pages.navs[active].templateBg,
titleStyle,
{
color: myPageData.home_pages.navs[active].templateBg
? myPageData.home_pages.navs[active].templateBg.titleColor
: '',
}]">
<text v-if="isNavPosition == 0">{{ pageTitleStr }}</text>
<view v-if="pageId!=0" class="back-arrow row items-center" @click="goback">
<u-icon name="home_1" custom-prefix="tffont" color="#111" size="38"
style="font-weight: bolder;"></u-icon>
</view>
</view>
</view>
</template>
<view v-if="showtabs">
<tabbar></tabbar>
<u-tabs v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" name="name" :list="myPageData.home_pages.navs"
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false"
@change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
<view :key="i" v-if="active == i">
<template v-for="(d, di) in item.template.data">
<search v-if="d.id == 'search' && isNavPosition == 0" :style-str="d.data" :key="di"></search>
<swiper v-if="d.id == 'banner'" :swipers="d.data" :key="di"></swiper>
<empty v-if="d.id == 'empty'" :block="d.data" :key="di"></empty>
<rubik v-if="d.id == 'rubik'" :ad="d.data" :key="di"></rubik>
<goods v-if="d.id == 'goods'" :goods="d.data" :key="di"></goods>
<notice v-if="d.id == 'notice'" :notice="d.data" :key="di"></notice>
<gridnav v-if="d.id == 'nav'" :navs="d.data" :key="di"></gridnav>
<pagetitle v-if="d.id == 'link'" :ts="d.data" :key="di"></pagetitle>
<videopage v-if="d.id == 'video'" :video="d.data" :key="di"></videopage>
<copyright v-if="d.id == 'copyright'" :cop="d.data" :key="di"></copyright>
<checkin v-if="d.id == 'check-in'" :check="d.data" :key="di"></checkin>
<userbox v-if="d.id == 'user-info'" :ts="d.data" :key="di"></userbox>
<userorder v-if="d.id == 'user-order'" :uo="d.data" :key="di"></userorder>
<checkform v-if="d.id == 'form'" :forms="d.data" :key="di"></checkform>
<addialog v-if="d.id == 'modal' && d.data.opened" :ads="d.data" :key="di"></addialog>
<quicknav v-if="d.id == 'quick-nav' && d.data.navSwitch == 1" :navs="d.data" :key="di"></quicknav>
<shopinfo v-if="d.id == 'shop-info'" :ad="d.data" :key="di" ref="son"></shopinfo>
</template>
</view>
</template>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="()=>showCoupons = false" @closeBtn="()=>showCoupons = false"></coupon>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<official-account></official-account>
</view>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="()=>showCoupons = false" @closeBtn="()=>showCoupons = false"></coupon>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<official-account></official-account>
</view>
</scroll-view>
<view v-if="showtabs">
<tabbar></tabbar>
</view>
</scroll-view>
</view>
</template>
<script>
......
......@@ -1367,7 +1367,11 @@
created() {},
onLoad(option) {
this.mc = this.$uiConfig.mainColor;
console.log("option",option);
if(!uni.getStorageSync("b2b_user")){
uni.redirectTo({
url:'/pages/index/index'
})
}
this.customer = uni.getStorageSync("b2b_user");
this.delMsg.customerId = this.customer.customerId
if (!option.scene) {
......@@ -1749,7 +1753,7 @@
if (x.tcid == this.delMsg.tcid) {
this.delMsg.tcnum = x.tcnum;
}
if (x.remainNum > 0) {
if (x.remainNum > 0 || x.isSubstitution==1) {
this.canCreateOrder = true;
}
});
......@@ -2049,7 +2053,7 @@
}
return {
title: this.dataList.title ? this.dataList.title : "帖子",
path: "/pages/index/index?tcid=" +
path: "/pages/jiuzhai/jz_LineDetail?tcid=" +
this.delMsg.tcid +
"&user_id=" +
uid +
......
......@@ -349,7 +349,7 @@
//未付款-调用后台取消
if (
(item.paymentTime == null || item.paymentTime == "") &&
item.orderState == 2
(item.orderState == 2 || item.orderState == 3)
) {
this.apipost(
"sellorder_post_B2BRemoveOrder", {
......
......@@ -612,7 +612,7 @@
goCancel() {
if (this.submit || this.submitCancel) return;
//未付款-调用后台取消
if (this.orderData.model.OrderState == 2) {
if (this.orderData.model.OrderState == 2 || this.orderData.model.OrderState == 3) {
this.apipost(
"sellorder_post_B2BRemoveOrder", {
ID: this.orderData.model.OrderId,
......@@ -702,6 +702,10 @@
this.orderStatus.code = 0;
this.orderStatus.text = "待付款";
this.showPayBtn = true;
} else if (status == 3 && isCancel != 1) {
this.orderStatus.code = 0;
this.orderStatus.text = "候补中";
this.showPayBtn = true;
} else if (status == 2 && isCancel == 1) {
this.orderStatus.code = -2;
this.orderStatus.text = "审核中";
......
......@@ -24,9 +24,9 @@ export default {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.5.46:8300"
Vue.prototype.host3 = "http://192.168.5.46:8501"
//Vue.prototype.host3 = "http://192.168.5.46:8501"
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
//Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.request = function(param, success, failed) {
//网络请求
......
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