Commit 18de3810 authored by 黄奎's avatar 黄奎

预览行程新增日期

parent f0e4ee52
<style> <style>
@import "../../assets/css/trip/index.css"; @import "../../assets/css/trip/index.css";
</style> </style>
<template> <template>
...@@ -13,7 +14,12 @@ ...@@ -13,7 +14,12 @@
</div> </div>
<div class="trip-block-commonTeam" v-for="(item,i) in tripList" :key="i"> <div class="trip-block-commonTeam" v-for="(item,i) in tripList" :key="i">
<div class="trip-title"> <div class="trip-title">
<div class="day"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</div> <div>
<p class="day"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</p>
<template v-if="startDate&&startDate!=''">
<p>{{GetDayStr(startDate,item.dayNum-1)}}</p>
</template>
</div>
<div class="desc" v-html="item.title"></div> <div class="desc" v-html="item.title"></div>
</div> </div>
<oneday v-if="item.details && item.details.length==1" :day='item'></oneday> <oneday v-if="item.details && item.details.length==1" :day='item'></oneday>
...@@ -25,17 +31,18 @@ ...@@ -25,17 +31,18 @@
</div> </div>
</template> </template>
<script> <script>
import oneday from "../commonPage/TravelTripPreview/oneday"; import oneday from "../commonPage/TravelTripPreview/oneday";
import twoday from "../commonPage/TravelTripPreview/twoday"; import twoday from "../commonPage/TravelTripPreview/twoday";
import threeday from "../commonPage/TravelTripPreview/threeday"; import threeday from "../commonPage/TravelTripPreview/threeday";
import fourday from "../commonPage/TravelTripPreview/fourday"; import fourday from "../commonPage/TravelTripPreview/fourday";
import fiveday from "../commonPage/TravelTripPreview/fiveday"; import fiveday from "../commonPage/TravelTripPreview/fiveday";
export default { export default {
props: ["subConfig"], props: ["subConfig"],
data() { data() {
return { return {
tripList: [], tripList: [],
loading:false loading: false,
startDate: ""
}; };
}, },
components: { components: {
...@@ -47,19 +54,31 @@ export default { ...@@ -47,19 +54,31 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
GetTrip(id) { GetDayStr(dateStr, dayNum) {
this.tripList=[]; return this.$commonUtils.AddDay(dateStr, dayNum);
},
GetTrip(id, TCID) {
this.tripList = [];
this.startDate = '';
var nTCID = 0;
if (TCID) {
nTCID = TCID;
}
var msg = {
configId: id,
tcid: nTCID
};
if (id !== undefined) { if (id !== undefined) {
//根据ID 获取行程内容 //根据ID 获取行程内容
this.loading=true; this.loading = true;
this.apipost( this.apipost(
"b2b_get_GetB2BTravelInfoNoDes", "b2b_get_GetB2BTravelInfoNoDes", msg,
{
configId: id
},
res => { res => {
this.loading=false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (res.data.data.priceList && res.data.data.priceList.length > 0) {
this.startDate = res.data.data.priceList[0].startDate;
}
this.tripList = res.data.data.dayList; this.tripList = res.data.data.dayList;
this.init(); this.init();
} }
...@@ -224,10 +243,8 @@ export default { ...@@ -224,10 +243,8 @@ export default {
let obj = { let obj = {
title: y.childItem.title, title: y.childItem.title,
content: y.childItem.description, content: y.childItem.description,
img: img: y.childItem.imaArray && y.childItem.imaArray.length > 0 ?
y.childItem.imaArray && y.childItem.imaArray.length > 0 y.childItem.imaArray[0].url : "",
? y.childItem.imaArray[0].url
: "",
ticketName: "", ticketName: "",
playTimeHour: null, playTimeHour: null,
playTimeMinutes: null playTimeMinutes: null
...@@ -358,11 +375,11 @@ export default { ...@@ -358,11 +375,11 @@ export default {
details = activy; details = activy;
} }
x.title = x.title =
dadian.length > 0 dadian.length > 0 ?
? dadian[0].title dadian[0].title :
: jiao.length > 0 jiao.length > 0 ?
? jiao[0].title jiao[0].title :
: "集合出发"; "集合出发";
x.details = details; x.details = details;
if (x.details.length == 0) { if (x.details.length == 0) {
...@@ -415,5 +432,6 @@ export default { ...@@ -415,5 +432,6 @@ export default {
} }
} }
} }
}; };
</script> </script>
...@@ -515,7 +515,7 @@ ...@@ -515,7 +515,7 @@
<tr> <tr>
<td colspan="22" style="text-align: left!important;padding:0 20px;"> <td colspan="22" style="text-align: left!important;padding:0 20px;">
<div class="link"> <div class="link">
<p @click="getJourney(item.ConfigID,item.Title)" style="padding-top:4px;">{{item.Title}}</p> <p @click="getJourney(item)" style="padding-top:4px;">{{item.Title}}</p>
<div v-if="outItem.PriceCommonList[index].DMCNum && outItem.PriceCommonList[index].DMCNum!=''" <div v-if="outItem.PriceCommonList[index].DMCNum && outItem.PriceCommonList[index].DMCNum!=''"
class="colorE95252" style="padding-top:5px;">地接备注团号:{{outItem.PriceCommonList[index].DMCNum}} class="colorE95252" style="padding-top:5px;">地接备注团号:{{outItem.PriceCommonList[index].DMCNum}}
</div> </div>
...@@ -690,11 +690,11 @@ ...@@ -690,11 +690,11 @@
return "(临时领队)" return "(临时领队)"
} }
}, },
getJourney(id, title) { getJourney(item) {
var that = this; var that = this;
this.tripTitle = title; this.tripTitle = item.Title;
this.$nextTick(() => { this.$nextTick(() => {
that.$refs.comTeam.GetTrip(id); that.$refs.comTeam.GetTrip(item.ConfigID,item.TCID);
}); });
that.teamVisible = true; that.teamVisible = true;
}, },
......
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