Commit 52e82fa1 authored by 黄奎's avatar 黄奎

页面修改

parent a59a0846
...@@ -25,14 +25,13 @@ ...@@ -25,14 +25,13 @@
float: left; float: left;
width: 14.28%; width: 14.28%;
height: 70px; height: 70px;
cursor: pointer;
border: 1px solid transparent; border: 1px solid transparent;
background-color: #F5F5F5; background-color: #F5F5F5;
font-size: 12px; font-size: 12px;
} }
.dayList.noPrice { .dayList.noPrice {
cursor: default;
color: #ccc; color: #ccc;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
...@@ -208,8 +207,8 @@ ...@@ -208,8 +207,8 @@
} }
.otherMonth { .otherMonth {
color: gray; color: gainsboro;
background: #d1d1d1;
} }
.daysItem { .daysItem {
...@@ -217,9 +216,9 @@ ...@@ -217,9 +216,9 @@
float: left; float: left;
width: 14.28%; width: 14.28%;
height: 70px; height: 70px;
cursor: pointer;
font-size: 16px; font-size: 16px;
padding-top:10px; padding-top: 10px;
text-align: center; text-align: center;
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
} }
...@@ -236,21 +235,25 @@ ...@@ -236,21 +235,25 @@
font-size: 14px; font-size: 14px;
font-family: 'PingFangR'; font-family: 'PingFangR';
} }
.calendarItem_month{
width:100%; .calendarItem_month {
width: 100%;
text-align: center; text-align: center;
height:50px; height: 50px;
line-height: 50px; line-height: 50px;
font-size:20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
.trip-Seat{
font-size:12px; .trip-Seat {
font-size: 12px;
} }
.ckedDate{
.ckedDate {
background-color: blue; background-color: blue;
color:#fff; color: #fff;
} }
</style> </style>
<template> <template>
<div class="q-mt-lg q-mb-lg"> <div class="q-mt-lg q-mb-lg">
...@@ -271,13 +274,20 @@ ...@@ -271,13 +274,20 @@
<div v-for="(i,index) in week" :key="index">{{i}}</div> <div v-for="(i,index) in week" :key="index">{{i}}</div>
</div> </div>
<div class="calendarItem_day"> <div class="calendarItem_day">
<div class="daysItem ckedDate" v-for="(subItem, index2) in item.dayArray" :key="index2" <div class="daysItem" v-for="(subItem, index2) in item.dayArray" :key="index2"
:class="subItem.daymonth===item.month? 'nowMonth':'otherMonth'"> :class="subItem.daymonth===item.month? 'nowMonth':'otherMonth'">
<div> <template v-if="subItem.b2BPrice||subItem.seat">
{{subItem.day}} <div style="cursor:pointer;" @click="clickDay(subItem)" :class="subItem.checked?'ckedDate':''">
<div class="trip-Seat">27900</div> {{subItem.day}}
<div class="trip-Seat">余6</div> <div class="trip-Seat">{{subItem.b2BPrice}}</div>
</div> <div class="trip-Seat">{{subItem.seat}}</div>
</div>
</template>
<template v-else>
<div>
{{subItem.day}}
</div>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -286,35 +296,43 @@ ...@@ -286,35 +296,43 @@
<div class="trafficInfo"> <div class="trafficInfo">
<div class="trafficTitle">交通资讯</div> <div class="trafficTitle">交通资讯</div>
<div class="trafficFlight"> <div class="trafficFlight">
<div class="trafficList"> <template v-if="CurrentPriceInfo.priceFlight&&CurrentPriceInfo.priceFlight.length>0"
<div class="trafficTime"><span>06/11</span><span>14:30</span></div> v-for="(fItem,fIndex) in CurrentPriceInfo.priceFlight">
<div>双流国际机场</div> <div class="trafficList" :key="fIndex+100">
</div> <div class="trafficTime">
<div class="trafficList"> <span>{{fItem.startDate.substring(5).replace('-','/')}}</span><span>{{fItem.departureTime}}</span>
<div>中国航空</div> </div>
<div class="traffic_Line"> <div>{{fItem.departureAirPortName}}</div>
<div></div>
<div></div>
</div> </div>
<div>CA168</div> <div class="trafficList" :key="fIndex+500">
</div> <div>{{fItem.alName}}</div>
<div class="trafficList"> <div class="traffic_Line">
<div class="trafficTime"><span>06/11</span><span>14:30</span></div> <div></div>
<div>双流国际机场</div> <div></div>
</div> </div>
<div>{{fItem.flightNumber}}</div>
</div>
<div class="trafficList" :key="fIndex+1000">
<div class="trafficTime">
<span>{{fItem.arriveDate.substring(5).replace('-','/')}}</span><span>{{fItem.arrivalTime}}</span>
</div>
<div>{{fItem.arrivalAirPortName}}</div>
</div>
</template>
</div> </div>
</div> </div>
<div class="TripStartInfo"> <div class="TripStartInfo">
<div> <div>
出发日期 :<span class="tripRightspan">2019-06-11(二)</span> 出发日期 :<span class="tripRightspan">{{CurrentPriceInfo.startDate}}</span>
</div> </div>
<div> <div>
团位编号 :<span class="tripRightspan">191919</span> 团位编号 :<span class="tripRightspan">{{CurrentPriceInfo.tcnum.toUpperCase()}}</span>
</div> </div>
<div class="TripCanbao"> <div class="TripCanbao">
<div>可报名人数 <span class="tripRightspan">6位</span></div> <div>可报名人数 <span class="tripRightspan">{{ CurrentPriceInfo.seat}}位</span>
</div>
<div> <div>
27900<span class="TripQi"></span> {{CurrentPriceInfo.b2BPrice}}<span class="TripQi"></span>
</div> </div>
</div> </div>
<div class="trip_BtnDiv"> <div class="trip_BtnDiv">
...@@ -331,55 +349,101 @@ ...@@ -331,55 +349,101 @@
export default { export default {
props: { props: {
dateData: Array, dateData: Array,
day: String, priceInfo: Object,
}, },
data() { data() {
return { return {
week: ['日', '一', '二', '三', '四', '五', '六'], week: ['日', '一', '二', '三', '四', '五', '六'],
monthList: [], //月份数据 monthList: [], //月份数据
priceData: this.dateData, CurrentPriceInfo: {}, //当前选择的数据
currentDay: this.day,
//daysData: [],
isSelect: -1,
} }
}, },
mounted() { mounted() {
this.getMonthsData() this.getMonthsData()
//console.log(this.dateData, 'dateDate'); if (this.priceInfo) {
//console.log(this.day, 'daydaydaydayday'); this.CurrentPriceInfo = {
b2BMemberPrice: this.priceInfo.b2BMemberPrice,
b2BPrice: this.priceInfo.b2BPrice,
b2CMemberPrice: this.priceInfo.b2CMemberPrice,
b2CPrice: this.priceInfo.b2CPrice,
configID: this.priceInfo.configID,
dayNum: this.priceInfo.dayNum,
isSubstitution: this.priceInfo.isSubstitution,
seat: (this.priceInfo.ySeat + this.priceInfo.fSeat + this.priceInfo.cSeat) - (this.priceInfo.surplusCSeat +
this.priceInfo.surplusFSeat + this.priceInfo.surplusYSeat),
startDate: this.priceInfo.startDate,
tcState: this.priceInfo.tcState,
tcid: this.priceInfo.tcid,
tcnum: this.priceInfo.tcnum,
teamType: this.priceInfo.teamType,
totalSeat: (this.priceInfo.ySeat + this.priceInfo.fSeat + this.priceInfo.cSeat),
priceFlight: this.priceInfo.priceFlight
}
}
}, },
created() { created() {
//this.getMonthsData()
}, },
methods: { methods: {
orderChosen: function (date) { //点击日期
// let day = parseInt(date.split('-')[2]).toString() clickDay(subItem) {
// this.daysData.forEach((x, index) => { if (this.monthList && this.monthList.length > 0) {
// if (x.day === day) { this.monthList.forEach(item => {
// this.isSelect = index; if (item.dayArray && item.dayArray.length > 0) {
// this.$emit('ChildrenSelect', date) item.dayArray.forEach(childItem => {
// } childItem.checked = false;
// }); })
}
});
}
subItem.checked = !subItem.checked;
if (this.dateData && this.dateData.length > 0) {
this.dateData.forEach(item => {
if (item.startDate == subItem.dayStr) {
this.CurrentPriceInfo = {
b2BMemberPrice: item.b2BMemberPrice,
b2BPrice: item.b2BPrice,
b2CMemberPrice: item.b2CMemberPrice,
b2CPrice: item.b2CPrice,
configID: item.configID,
dayNum: item.dayNum,
isSubstitution: item.isSubstitution,
seat: (item.ySeat + item.fSeat + item.cSeat) - (item.surplusCSeat +
item.surplusFSeat + item.surplusYSeat),
startDate: item.startDate,
tcState: item.tcState,
tcid: item.tcid,
tcnum: item.tcnum,
teamType: item.teamType,
totalSeat: (item.ySeat + item.fSeat + item.cSeat),
priceFlight: item.priceFlight
};
}
});
}
}, },
//组装团期数据
selectDate(index) { selectDate() {
// if (this.$data.daysData[index].day == 0) { if (this.monthList && this.monthList.length > 0) {
// return; this.monthList.forEach(item => {
// } if (item && item.dayArray) {
// if (this.isSelect == index) { item.dayArray.forEach(subItem => {
// this.isSelect = -1; if (this.dateData) {
// return; this.dateData.forEach(dItem => {
// } if (dItem.startDate == subItem.dayStr) {
// this.isSelect = index; subItem.b2BPrice = dItem.b2BPrice;
subItem.b2BMemberPrice = dItem.b2BMemberPrice;
// let currentDay = this.currentDay.split('-') subItem.seat = dItem.seat;
// let clickDay = parseInt(this.$data.daysData[index].day) subItem.isSubstitution = dItem.isSubstitution;
// clickDay = clickDay < 10 ? ('0' + clickDay) : clickDay }
// let clickDate = currentDay[0] + '-' + currentDay[1] + '-' + clickDay });
// this.$emit('ChildrenSelect', clickDate) }
});
}
});
}
}, },
//生成月份和每一天 //生成月份和月份下每一天
getCalendarMonth(qDate, key) { getCalendarMonth(qDate, key) {
let tempMonthData = this.createCalendar(qDate); let tempMonthData = this.createCalendar(qDate);
let tempMonth = tempMonthData.DayArray; let tempMonth = tempMonthData.DayArray;
...@@ -391,15 +455,16 @@ ...@@ -391,15 +455,16 @@
date: tempMonth[i].day, date: tempMonth[i].day,
daymonth: (tempDay.getMonth() + 1), daymonth: (tempDay.getMonth() + 1),
dayStr: newDayStr, dayStr: newDayStr,
day: tempDay.getDate() day: tempDay.getDate(),
checked: false,
}); });
}; };
this.monthList.push({ this.monthList.push({
monthStr: tempMonthData.CurrentYear + "-" + tempMonthData.CurrentMonth, monthStr: tempMonthData.CurrentYear + "年-" + tempMonthData.CurrentMonth + "月",
month: tempMonthData.CurrentMonth, month: tempMonthData.CurrentMonth,
dayArray: days, dayArray: days,
}); });
console.log("this.monthList", this.monthList); this.selectDate();
}, },
//获取月份 //获取月份
getMonthsData: function () { getMonthsData: function () {
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!-- 行程資訊 --> <!-- 行程資訊 -->
<!-- TripListStyle 1月历 2列表 --> <!-- TripListStyle 1月历 2列表 -->
<tripList v-if="item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==2" :key="index+100" :plugData="dataList"></tripList> <tripList v-if="item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==2" :key="index+100" :plugData="dataList"></tripList>
<tripcalendar v-if="item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==1" :key="index+200" :dateData="dataList.priceList" :day="dataList.priceList[0].startDate"></tripcalendar> <tripcalendar v-if="item.Id=='TripList'&&TripConfig.TripConfig.TripListStyle==1" :key="index+200" :dateData="dataList.priceList" :priceInfo="dataList.currentPriceInfo"></tripcalendar>
<!-- 每日行程 --> <!-- 每日行程 -->
<!-- TripDayStyle 1竖起排 2横起 --> <!-- TripDayStyle 1竖起排 2横起 -->
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
cityId: 0, cityId: 0,
preview: 0, preview: 0,
tcid: 10090, tcid: 10090,
teamType: 0 teamType: 0,
isGetPriceFlight:true,
}, },
isShow: false, isShow: false,
dataList: {}, dataList: {},
......
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