Commit 85b4a1cd authored by 黄奎's avatar 黄奎

团控保存修改

parent 273e4c44
......@@ -394,112 +394,7 @@
err => {}
);
},
/*保存数据*/
SaveData_V2(SaveType) {
this.MsgBus.$emit('saveTravel', true);
this.FeatureData.IsSave = true;
this.submitText = "保存中";
//团队配置
var basicData = {};
basicData.PriceList = this.PostPrice;
//配置编号
basicData.ID = this.ConfigId;
basicData.LineId = this.PostConfig.LineId;
basicData.LineteamId = this.PostConfig.LineteamId;
basicData.Title = this.PostConfig.Title;
basicData.OpRemark = this.PostConfig.OpRemark;
basicData.ProductRecommend = this.PostConfig.ProductRecommend;
basicData.VideoStr = this.PostConfig.VideoStr;
basicData.PDFAlias = this.PostConfig.PDFAlias;
basicData.ImgCover = this.PostConfig.ImgCover;
basicData.PriceIsDirect = this.PostConfig.PriceIsDirect;
basicData.IsDirect = this.PostConfig.IsDirect;
basicData.RemoveChild = this.PostConfig.RemoveChild;
basicData.TeamType = this.PostConfig.TeamType;
basicData.DayNum = (this.PostDaysTrip && this.PostDaysTrip.DayNum != "") ? this.PostDaysTrip.DayNum : 0;
basicData.NightNum = (this.PostDaysTrip && this.PostDaysTrip.NightNum != "") ? this.PostDaysTrip.NightNum : 0;
basicData.StartCityId = (this.PostDaysTrip && this.PostDaysTrip.StartCityId != "") ? this.PostDaysTrip.StartCityId :
0;
basicData.ReturnArriveCityId = (this.PostDaysTrip && this.PostDaysTrip.ReturnArriveCityId != "") ? this.PostDaysTrip
.ReturnArriveCityId : 0;
basicData.SelfpayingList = this.PostConfig.SelfpayingList;
basicData.ShopList = this.PostConfig.ShopList;
basicData.DinnerList = this.PostDaysTrip.DinnerList;
basicData.FreedomList = this.PostDaysTrip.FreedomList;
var tripHotelArray = this.PostDaysTrip.HotelList;
var chooseHotelArray=[];
var newHotelArray=[];
// chooseHotelArray.forEach(item=>{
// tripHotelArray.forEach(subItem=>{
// if(item.Hotel==1 && item.DayNum==1)
// {
// newHotelArray.push(subItem)
// }
// });
// });
basicData.HotelList=newHotelArray;
basicData.ScenicList = this.PostDaysTrip.ScenicList;
basicData.TrafficList = this.PostDaysTrip.TrafficList;
basicData.WarmTipList = this.PostDaysTrip.WarmTipList;
basicData.TitleList = this.PostDaysTrip.TitleList;
basicData.RemoveImg = this.PostDaysTrip.RemoveImg;
//行程特色数据
var TripFeature = {};
if (this.PostFeature == "") {
TripFeature = this.FeatureData;
} else {
TripFeature = this.PostFeature;
}
TripFeature.FeatureHtmlJson = TripFeature.FeatureHtmlJson ?
JSON.stringify(TripFeature.FeatureHtmlJson) :
"";
TripFeature.FeatureHtmlJsonDelete = TripFeature.FeatureHtmlJsonDelete ? JSON.stringify(TripFeature.FeatureHtmlJsonDelete) :
"";
TripFeature.FeeInclude = this.PostNotice.FeeInclude;
TripFeature.FeeNonInclude = this.PostNotice.FeeNonInclude;
TripFeature.ImportantTip = this.PostNotice.ImportantTip;
TripFeature.WarmTip = this.PostNotice.WarmTip;
TripFeature.B2BRemark = this.PostNotice.B2BRemark;
TripFeature.ShopRemark = this.PostNotice.ShopRemark;
TripFeature.VisaRemark = this.PostNotice.VisaRemark;
if (
basicData.TrafficList != null &&
basicData.TrafficList.length > 0 &&
basicData.TrafficList[0].SubTraffic != null &&
basicData.TrafficList[0].SubTraffic.length > 0
) {
basicData["ArriveCityId"] =
basicData.TrafficList[0].SubTraffic[0].ArrivalCityId;
}
if (basicData.OpenState == 1) {
basicData["AfterOpenModify"] = true;
}
//"另存"新增团期
if (SaveType == 3) {
basicData.TravelInfoIsCopy = true;
}
//小包团
if (this.flagWangYue) {
basicData.TeamType = 1;
} else {
basicData.TeamType = 0;
}
this.apipost(
"travel_post_SetTravelConfigInfo_V2",
basicData,
res => {
if (res.data.resultCode == 1) {
console.log("res",res.data);
}
},
err => {}
);
},
//初始化团的幻灯片
initFileList() {
for (var i = 0; i < 5; i++) {
......
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