Commit fdd8dcee authored by 黄奎's avatar 黄奎

页面修改

parent ed0a5a1c
......@@ -47,33 +47,15 @@
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown" class="travelControlDropDown">
<el-dropdown-item style="display:none;"
<el-dropdown-item
@click.native="toPDF_2023(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')">
2023版PDF
</el-dropdown-item>
<el-dropdown-item @click.native="toPDF_V2(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')">
下载电脑版PDF
</el-dropdown-item>
<el-dropdown-item @click.native="gernalFeature(0)">
下载手机版WORD
</el-dropdown-item>
<el-dropdown-item @click.native="gernalFeature(1)">
下载电脑版WORD
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<input type="button" value="新版行程" class="travelControlTripBtn" @click="goUrlView()" style="display:none;" />
<el-checkbox v-model="isShowTime">显示行程日期</el-checkbox>
<a class="travelControlTripBtn" v-if="priceList.length>0&& priceList[0].wordPath!=''" style="display:inline-block;text-decoration:none;
width:135px;text-align:center;line-height:30px;font-size:13px;position:relative;top:2px;"
:href="domainManager().ViittoFileUrl+priceList[0].wordPath">下载WORD行程</a>
</el-col>
</el-row>
<div id="pdfNode" class="LeaveGroupDownload-form">
<div id="pdfDom" style="padding:0 20px;">
<!-- 首页 -->
......@@ -105,9 +87,6 @@
</template>
<script>
import html2Canvas from 'html2canvas'
import LeaveGroupDownload from './LeaveGroupDownload/index'
import ItineraryFeatures from './LeaveGroupDownload/ItineraryFeatures'
import travelDays from './LeaveGroupDownload/travelDays'
......@@ -117,9 +96,7 @@
import {
setTimeout
} from 'timers';
import {
types
} from 'util';
export default {
components: {
LeaveGroupDownload,
......@@ -204,16 +181,11 @@
this.isopOperation = this.$route.query.isopOperation;
this.getWxCode();
this.init();
this.initAirlines()
setTimeout(() => {
this.appendParent()
}, 2000)
},
methods: {
//获取微信二维码
getWxCode: function () {
this.apipost('survey_post_GetSurveyWeiXinShare', {
......@@ -224,91 +196,6 @@
}
}, err => {})
},
gernalFeature(isPc) {
this.pdfLoading = true;
let tcid = this.$route.query.tcid;
let UploadUrl = this.domainManager().UploadUrl
let _this = this
if (this.showType >= 4) { // 判断是否为行程特色
_this.ToWord_V2(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
'日游', isPc)
} else {
this.ToWord_V2(this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游', isPc)
}
},
airLineSelectChange: function (airLineId, item, type) {
item.airLineID = airLineId
this.airLineList.forEach(x => {
if (x.AirLineId == airLineId) {
item.alName = x.AlName
}
});
if (type == 1) {
item.flightID = 0;
item.flightNumber = "";
item.departureAirPortName = "";
item.departureTime = "";
item.arrivalAirPortName = "";
item.arrivalTime = "";
}
let msg = {
airlineID: airLineId
}
this.apipost(
'flight_post_GetAirportNameList',
msg,
res => {
if (res.data.resultCode == 1) {
item.airportNameList = res.data.data;
}
},
err => {}
)
this.$forceUpdate();
},
flightSelectChange(flightId, item) {
item.airportNameList.forEach(x => {
if (x.ID == flightId) {
item.flightNumber = x.Flight_number.split('/')[0];
item.departureAirPortName = x.dName;
item.departureTime = x.DepartureTime;
item.arrivalAirPortName = x.aName;
item.arrivalTime = x.ArrivalTime;
}
});
},
//初始化航空公司下拉
initAirlines: function () {
this.apipost(
'airline_post_GetList', {},
res => {
if (res.data.resultCode == 1) {
this.airLineList = res.data.data
}
},
err => {}
)
},
addFlight: function () {
let obj = {
airLineID: 0,
flightID: 0,
alName: '',
flightNumber: '',
startDate: '',
departureTime: '',
departureAirPortName: '',
arrivalTime: '',
arrivalAirPortName: '',
stopoverAirPortName: '',
flightState: 0,
arriveDate: '',
airportNameList: [],
}
this.editForm.travelOrderFlightList.push(obj)
},
setDate: function (j) {
let stDate = "";
if (this.priceList && this.priceList.length > 0) {
......@@ -343,17 +230,14 @@
});
}
},
// 生成pdf
toPDF_V3: function (title) {
this.pdfLoading = true
let urlObj = this.domainManager();
let msg = {
//获取参数
getPostMsg() {
var postData = {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
unionfid: this.$route.query.unionfid,
FileName: title,
//是否显示基础信息
isShowBase: this.vshowA ? 1 : 0,
//是否显示航班
......@@ -390,155 +274,14 @@
templateId: this.showType,
//用户Id
UId: this.getLocalStorage().EmployeeId
};
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetWebHtmlTwo_V3',
data: {
"msg": msg
}
}).then(res => {
if (res.data.resultCode === 1) {
let sign = title + "V3"
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.data.data);
a.click();
} else {
this.$message.error('PDF获取失败');
}
this.pdfLoading = false
}).catch(err => {
})
},
// 生成pdf
toPDF_V2: function (title) {
this.pdfLoading = true
let pageData = document.getElementById('pdfNode').innerHTML
let urlObj = this.domainManager();
let msg = {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
unionfid: this.$route.query.unionfid,
FileName: title,
//是否显示基础信息
isShowBase: this.vshowA ? 1 : 0,
//是否显示航班
isShowFlight: this.vshowB ? 1 : 0,
//是否显示行程特色
isShowFeature: this.vshowC ? 1 : 0,
//自费、费用包含、费用不含
isShowFee: this.vshowE ? 1 : 0,
//购物说明,购物安排
isShowShop: this.vshowF ? 1 : 0,
//重要提示、温馨提示 [订单须知]
isShowTip: this.vshowG ? 1 : 0,
//是否显示同行备注
isShowB2B: this.vshowI ? 1 : 0,
//是否显示行程
isShowTrip: this.vshowD ? 1 : 0,
//是否显示标题
isShowTitle: this.vshowL ? 1 : 0,
//是否显示旅客名单
isShowGuest: this.vshowM ? 1 : 0,
//是否显示紧急联系人
isShowMan: this.vshowLLR ? 1 : 0,
//是否显示团号
isShowTCNUM: this.vshowTCNUM ? 1 : 0,
//是否显示行程图片
isShowTripImage: this.vshowK ? 1 : 0,
//是否显示签证信息
isShowVisa: this.vshowH ? 1 : 0,
//是否显示视频图片
isShowVideoImg: this.vshowO ? 1 : 0,
//isPc是否PC下载
isPc: 2,
//模板参数
templateId: this.showType,
//用户Id
UId: this.getLocalStorage().EmployeeId
};
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetWebHtmlTwo_V2',
data: {
"msg": msg
}
}).then(res => {
if (res.data.resultCode === 1) {
let sign = title + "V2"
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.data.data);
a.click();
} else {
this.$message.error('PDF获取失败');
}
this.pdfLoading = false
}).catch(err => {
})
}
return postData;
},
// 生成pdf
toPDF_2023: function (title) {
this.pdfLoading = true
let pageData = document.getElementById('pdfNode').innerHTML
let urlObj = this.domainManager();
let msg = {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
unionfid: this.$route.query.unionfid,
FileName: title,
//是否显示基础信息
isShowBase: this.vshowA ? 1 : 0,
//是否显示航班
isShowFlight: this.vshowB ? 1 : 0,
//是否显示行程特色
isShowFeature: this.vshowC ? 1 : 0,
//自费、费用包含、费用不含
isShowFee: this.vshowE ? 1 : 0,
//购物说明,购物安排
isShowShop: this.vshowF ? 1 : 0,
//重要提示、温馨提示 [订单须知]
isShowTip: this.vshowG ? 1 : 0,
//是否显示同行备注
isShowB2B: this.vshowI ? 1 : 0,
//是否显示行程
isShowTrip: this.vshowD ? 1 : 0,
//是否显示标题
isShowTitle: this.vshowL ? 1 : 0,
//是否显示旅客名单
isShowGuest: this.vshowM ? 1 : 0,
//是否显示紧急联系人
isShowMan: this.vshowLLR ? 1 : 0,
//是否显示团号
isShowTCNUM: this.vshowTCNUM ? 1 : 0,
//是否显示行程图片
isShowTripImage: this.vshowK ? 1 : 0,
//是否显示签证信息
isShowVisa: this.vshowH ? 1 : 0,
//是否显示视频图片
isShowVideoImg: this.vshowO ? 1 : 0,
//isPc是否PC下载
isPc: 2,
//模板参数
templateId: this.showType,
//用户Id
UId: this.getLocalStorage().EmployeeId
};
let msg = this.getPostMsg();
this.$http({
headers: {
'Content-Type': 'application/json'
......@@ -563,128 +306,7 @@
}).catch(err => {
})
},
ToWord: function (title, isPc) {
let msg = {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
unionfid: this.$route.query.unionfid,
FileName: title,
//是否显示基础信息
isShowBase: this.vshowA ? 1 : 0,
//是否显示航班
isShowFlight: this.vshowB ? 1 : 0,
//是否显示行程特色
isShowFeature: this.vshowC ? 1 : 0,
//自费、费用包含、费用不含
isShowFee: this.vshowE ? 1 : 0,
//购物说明,购物安排
isShowShop: this.vshowF ? 1 : 0,
//重要提示、温馨提示 [订单须知]
isShowTip: this.vshowG ? 1 : 0,
//是否显示同行备注
isShowB2B: this.vshowI ? 1 : 0,
//是否显示行程
isShowTrip: this.vshowD ? 1 : 0,
//是否显示标题
isShowTitle: this.vshowL ? 1 : 0,
//是否显示旅客名单
isShowGuest: this.vshowM ? 1 : 0,
//是否显示紧急联系人
isShowMan: this.vshowLLR ? 1 : 0,
//是否显示团号
isShowTCNUM: this.vshowTCNUM ? 1 : 0,
//是否显示行程图片
isShowTripImage: this.vshowK ? 1 : 0,
//是否显示签证信息
isShowVisa: this.vshowH ? 1 : 0,
//是否显示视频图片
isShowVideoImg: this.vshowO ? 1 : 0,
//isPc是否PC下载
isPc: isPc,
//模板参数
templateId: this.showType,
//用户Id
UId: this.getLocalStorage().EmployeeId
};
this.GetLocalFile("DownLoadTripWord", msg, title + ".doc", res => {
this.pdfLoading = false
});
},
ToWord_V2: function (title, isPc) {
let msg = {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
unionfid: this.$route.query.unionfid,
FileName: title,
//是否显示基础信息
isShowBase: this.vshowA ? 1 : 0,
//是否显示航班
isShowFlight: this.vshowB ? 1 : 0,
//是否显示行程特色
isShowFeature: this.vshowC ? 1 : 0,
//自费、费用包含、费用不含
isShowFee: this.vshowE ? 1 : 0,
//购物说明,购物安排
isShowShop: this.vshowF ? 1 : 0,
//重要提示、温馨提示 [订单须知]
isShowTip: this.vshowG ? 1 : 0,
//是否显示同行备注
isShowB2B: this.vshowI ? 1 : 0,
//是否显示行程
isShowTrip: this.vshowD ? 1 : 0,
//是否显示标题
isShowTitle: this.vshowL ? 1 : 0,
//是否显示旅客名单
isShowGuest: this.vshowM ? 1 : 0,
//是否显示紧急联系人
isShowMan: this.vshowLLR ? 1 : 0,
//是否显示团号
isShowTCNUM: this.vshowTCNUM ? 1 : 0,
//是否显示行程图片
isShowTripImage: this.vshowK ? 1 : 0,
//是否显示签证信息
isShowVisa: this.vshowH ? 1 : 0,
//是否显示视频图片
isShowVideoImg: this.vshowO ? 1 : 0,
//isPc是否PC下载
isPc: isPc,
//模板参数
templateId: this.showType,
//用户Id
UId: this.getLocalStorage().EmployeeId
};
let urlObj = this.domainManager();
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetToWord_V2',
data: {
"msg": msg
}
}).then(res => {
if (res.data.resultCode === 1) {
let sign = title + "V2"
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.doc&&fPath=' + res.data.data);
a.click();
} else {
this.Error('WORD获取失败');
}
this.pdfLoading = false
}).catch(err => {
})
},
},
DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-")
......@@ -713,74 +335,6 @@
this.orderTripdiff = data.orderTripdiff;
this.lineId = data.lineId;
this.orderMsg = data.orderMsg;
console.log(this.orderTripdiff)
console.log(this.orderMsg, '------')
if (this.orderTripdiff && this.orderTripdiff.flightInfoJson) {
this.orderTripdiff.travelOrderFlightList = JSON.parse(this.orderTripdiff.flightInfoJson);
if (this.orderMsg.outNotice == 1) {
if (this.orderTripdiff.travelOrderFlightList != null && this.orderTripdiff.travelOrderFlightList
.length > 0) {
this.orderTripdiff.travelOrderFlightList.forEach(subItem => {
subItem.flightState = 1;
});
}
}
}
//HK新加
this.SourceData.Id = 0;
if (this.$route.query.orderId > 0) {
this.SourceData.orderId = this.$route.query.orderId;
var str = "";
if (this.orderMsg.leaderName) {
str = this.orderMsg.leaderName;
}
if (this.orderMsg.leaderMobile) {
str += "/" + this.orderMsg.leaderMobile;
}
this.SourceData.leaderInfo = str;
this.SourceData.gatheringTime = this.orderMsg.gatheringTime;
this.SourceData.airportService = this.orderMsg.airportServicePerson + "/" + this.orderMsg
.airportServicePhone;
this.SourceData.gatherIdent = this.orderMsg.bName;
this.SourceData.emergencyContact = this.orderMsg.sellName + "/" + this.orderMsg.sellTel;
this.SourceData.gatheringAddress = this.orderMsg.gatheringAddress;
if (data.priceList != null && data.priceList.length > 0) {
var array = JSON.parse(JSON.stringify(data.priceList[0].priceFlight));
this.SourceData.travelOrderFlightList = [];
array.forEach(fItem => {
this.SourceData.travelOrderFlightList.push({
airLineID: fItem.airLineID,
flightID: fItem.flightID,
alName: fItem.alName,
flightNumber: fItem.flightNumber,
startDate: fItem.startDate,
departureTime: fItem.departureTime,
departureAirPortName: fItem.departureAirPortName,
arrivalTime: fItem.arrivalTime,
arrivalAirPortName: fItem.arrivalAirPortName,
stopoverAirPortName: fItem.stopoverAirPortName,
flightState: fItem.flightState,
arriveDate: fItem.arriveDate,
airportNameList: [],
});
});
}
if (this.orderTripdiff) {
this.editForm = JSON.parse(JSON.stringify(this.orderTripdiff));
if (this.orderTripdiff.flightInfoJson) {
this.editForm.travelOrderFlightList = JSON.parse(this.orderTripdiff.flightInfoJson);
}
} else {
this.editForm = JSON.parse(JSON.stringify(this.SourceData));
}
this.editForm.travelOrderFlightList.forEach(fItem => {
fItem.airportNameList = [];
this.airLineSelectChange(fItem.airLineID, fItem);
});
}
this.title = this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游'
document.title = this.title;
//初始化行程
......@@ -797,11 +351,11 @@
},
//初始化行程
initTrip(res, data) {
let arrlist = function(arr){
arr.forEach(x=>{
x.showImgOne = true
x.showImgTwo = true
x.imgMapId = null
let arrlist = function (arr) {
arr.forEach(x => {
x.showImgOne = true
x.showImgTwo = true
x.imgMapId = null
})
}
arrlist(res.data.data.dayList)
......@@ -1034,59 +588,7 @@
x.dateTime = this.setDate(j);
})
},
//上移下移(IsUp:0上移,1下移)
MoveItem(item, subIndex, IsUp) {
var currentItem = this.editForm.travelOrderFlightList[subIndex];
//上移
if (IsUp == 0) {
if (subIndex > 0) {
var upItem = this.editForm.travelOrderFlightList[subIndex - 1];
this.$set(this.editForm.travelOrderFlightList, subIndex - 1, currentItem);
this.$set(this.editForm.travelOrderFlightList, subIndex, upItem);
this.$forceUpdate();
}
} else {
//下移
if (subIndex != this.editForm.travelOrderFlightList.length - 1) {
var downItem = this.editForm.travelOrderFlightList[subIndex + 1];
this.$set(this.editForm.travelOrderFlightList, subIndex + 1, currentItem);
this.$set(this.editForm.travelOrderFlightList, subIndex, downItem);
this.$forceUpdate();
}
}
},
//跳转至预览
goUrlView() {
let routeData = this.$router.resolve({
name: 'newConfimationOrder',
query: {
configId: this.$route.query.configId,
cityId: this.$route.query.cityId,
tcid: this.$route.query.tcid,
orderId: this.$route.query.orderId,
isClick: 1, //不计算点击
vshowA: this.vshowA,
vshowB: this.vshowB,
vshowC: this.vshowC,
vshowD: this.vshowD,
vshowE: this.vshowE,
vshowF: this.vshowF,
vshowG: this.vshowG,
vshowH: this.vshowH,
vshowI: this.vshowI,
vshowJ: this.vshowJ,
vshowK: this.vshowK,
vshowL: this.vshowL,
vshowM: this.vshowM,
vshowLLR: this.vshowLLR,
vshowTCNUM: this.vshowTCNUM,
vshowO: this.vshowO,
}
});
window.open(routeData.href, "_blank");
}
},
}
</script>
......
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