Commit 1addad72 authored by 黄奎's avatar 黄奎

合同行程调整

parent d3c8219a
This diff is collapsed.
...@@ -2211,165 +2211,27 @@ ...@@ -2211,165 +2211,27 @@
tcid: nTCID, tcid: nTCID,
isClick: 1, //不算统计 isClick: 1, //不算统计
}; };
if (id !== undefined) { //根据ID 获取行程内容
//根据ID 获取行程内容 this.apipost(
this.apipost( "b2b_get_GetB2BTravelInfoNoDes",
"b2b_get_GetB2BTravelInfoNoDes", msg,
msg, (res) => {
(res) => { if (res.data.resultCode == 1) {
if (res.data.resultCode == 1) { if (
if ( res.data.data.priceList &&
res.data.data.priceList && res.data.data.priceList.length > 0
res.data.data.priceList.length > 0 ) {
) { this.startDate = res.data.data.priceList[0].startDate;
this.startDate = res.data.data.priceList[0].startDate;
}
this.tripDays = res.data.data.dayList;
this.trifficList = res.data.data.trafficList;
this.tripList = res.data.data.dayList;
this.LineName = res.data.data.lineName;
this.init();
}
},
(err) => {}
);
} else {
var dayList = [];
this.subConfig.DayList.forEach((objItem, objIndex) => {
var dayItem = this.$tripUtils.daysArrayObj();
dayItem.dayNum = objItem.dayNum;
//每一天的数组
var dayArray = [];
//子项遍历
objItem.dayArray.forEach((subItem) => {
switch (subItem.Type) {
//交通
case "1":
var subTraffiArray = [];
subItem.childItem.SubTraffic.forEach((subTrafficItem) => {
subTraffiArray.push({
startCityName: subTrafficItem.StartCityName,
arrivalType: subTrafficItem.ArrivalType,
arrivalCityName: subTrafficItem.ArrivalCityName,
});
});
var trafficObj = {
type: subItem.Type,
childItem: {
description: subItem.childItem.Description,
subTraffic: subTraffiArray,
},
};
dayArray.push(trafficObj);
break;
//景点
case "2":
var imgArray = [];
subItem.childItem.ImaArray.forEach((imgItem) => {
imgArray.push({
url: imgItem.Url,
name: imgItem.Name,
});
});
var scenicObj = {
type: subItem.Type,
childItem: {
couponsName: subItem.childItem.CouponsName,
couponsTicketName: subItem.childItem.CouponsTicketName,
playTimeHour: subItem.childItem.PlayTimeHour,
playTimeMinutes: subItem.childItem.PlayTimeMinutes,
description: subItem.childItem.Description,
imaArray: imgArray,
},
};
dayArray.push(scenicObj);
break;
//酒店
case "3":
var imgArray = [];
subItem.childItem.ImaArray.forEach((imgItem) => {
imgArray.push({
url: imgItem.Url,
name: imgItem.Name,
});
});
var hotelObj = {
type: subItem.Type,
childItem: {
hotelName: subItem.childItem.HotelName,
hotelProductName: subItem.childItem.HotelProductName,
useDinnerType: subItem.childItem.UseDinnerType,
description: subItem.childItem.Description,
imaArray: imgArray,
},
};
dayArray.push(hotelObj);
break;
//餐厅
case "4":
var imgArray = [];
subItem.childItem.ImaArray.forEach((imgItem) => {
imgArray.push({
url: imgItem.Url,
name: imgItem.Name,
});
});
var dinnerObj = {
type: subItem.Type,
childItem: {
dinnerName: subItem.childItem.DinnerName,
mealName: subItem.childItem.MinnerName,
useDinnerType: subItem.childItem.UseDinnerType,
useTimeHour: subItem.childItem.UseTimeHour,
useTimeMinutes: subItem.childItem.UseTimeMinutes,
description: subItem.childItem.Description,
descriptionText: subItem.childItem.Description,
imaArray: imgArray,
},
};
dayArray.push(dinnerObj);
break;
//自由活动
case "5":
var freedomObj = {
type: subItem.Type,
childItem: {
description: subItem.Description,
descriptionText: subItem.Description,
},
};
dayArray.push(freedomObj);
break;
//温馨提示
case "6":
var warmObj = {
type: subItem.Type,
childItem: {
description: subItem.Description,
descriptionText: subItem.Description,
},
};
dayArray.push(warmObj);
break;
//行程大点
case "7":
var titleObj = {
type: subItem.Type,
childItem: {
title: subItem.childItem.Title,
description: subItem.childItem.Description,
},
};
dayArray.push(titleObj);
break;
} }
}); this.tripDays = res.data.data.dayList;
dayItem.dayArray = dayArray; this.trifficList = res.data.data.trafficList;
dayList.push(dayItem); this.tripList = res.data.data.dayList;
}); this.LineName = res.data.data.lineName;
this.tripList = dayList; this.init();
this.init(); }
} },
(err) => {}
);
}, },
init() { init() {
this.tripList.forEach((x, j) => { this.tripList.forEach((x, j) => {
......
This diff is collapsed.
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