Commit 94685836 authored by 黄奎's avatar 黄奎

页面修改

parent 77448cdb
......@@ -560,8 +560,7 @@ export default {
},
created() {
let that = this;
require(["http://pv.sohu.com/cityjson?ie=utf-8"], () => {
require(["http://pv.sohu.com/cityjson?ie=utf-8"], () => {
setTimeout(() => {
console.log("returnCitySN",returnCitySN)
if (returnCitySN) {
......
......@@ -620,10 +620,10 @@
<i class="iconfont icon-hangchenganpai"></i>
PDF下载
</li>
<!-- <li :class="crtnav==7?'active':''">
<i class="iconfont icon-feiyongshuoming"></i>
点评(99+)
</li> -->
<li @click="goUrlTrip()" v-if="dataList.lineId!=2&&dataList.lineId!=8">
<i class="iconfont icon-hangchenganpai"></i>
直客版行程
</li>
</ul>
</el-col>
<el-col :span="6">
......@@ -650,7 +650,7 @@
</div>
</div>
<div style="height:100px;"></div>
<!-- <el-button class="pdfDom_btn" type="primary" size="small" @click="donwLoad()" v-if="loadNone==false">点击下载</el-button> -->
<template v-if="sonData">
<confirmationOrderDownLoad ref="confirmationOrderDownLoad" :sonData="sonData" :TripLayer="TripLayer" />
</template>
......@@ -698,35 +698,6 @@
for="vshowK">景点图片</label></td>
</tr>
</tbody>
<!-- <tbody>
<tr height="36">
<td width="50%"><input id="vshowA" v-model="TripLayer.vshowA" type="checkbox" /><label for="vshowA">基础信息</label></td>
<td width="50%"><input id="vshowL" v-model="TripLayer.vshowL" type="checkbox" /><label for="vshowL">集合地点</label></td>
</tr>
<tr height="36">
<td><input id="vshowK" v-model="TripLayer.vshowK" type="checkbox" /><label for="vshowK">景点图片</label></td>
<td><input id="vshowB" v-model="TripLayer.vshowB" type="checkbox" /><label for="vshowB">航班信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowC" v-model="TripLayer.vshowC" type="checkbox" /><label for="vshowC">行程特色</label></td>
<td><input id="vshowD" v-model="TripLayer.vshowD" type="checkbox" /><label for="vshowD">行程安排</label></td>
</tr>
<tr height="36">
<td><input id="vshowE" v-model="TripLayer.vshowE" type="checkbox" /><label for="vshowE">费用说明</label></td>
<td><input id="vshowF" v-model="TripLayer.vshowF" type="checkbox" /><label for="vshowF">购物说明</label></td>
</tr>
<tr height="36">
<td><input id="vshowG" v-model="TripLayer.vshowG" type="checkbox" /><label for="vshowG">订单须知</label></td>
<td><input id="vshowH" v-model="TripLayer.vshowH" type="checkbox" /><label for="vshowH">签证信息</label></td>
</tr>
<tr height="36">
<td><input id="vshowI" v-model="TripLayer.vshowI" type="checkbox" /><label for="vshowI">同行备注</label></td>
<td><input id="vshowJ" v-model="TripLayer.vshowJ" type="checkbox" /><label for="vshowJ">印象标识</label></td>
</tr>
<tr height="36">
<td><input id="vshowLLR" v-model="TripLayer.vshowLLR" type="checkbox" /><label for="vshowLLR">紧急联络人</label></td>
</tr>
</tbody> -->
<tr height="66">
<td colspan="2" align="center">
<input type="button" class="TripBtn" @click="PDFDownLoad();" value="确定" />
......@@ -923,67 +894,93 @@
} else {
let orderMsg = this.sonData.orderMsg
this.travelControlTripLayerShow = false
this.$refs.confirmationOrderDownLoad.toPDF(orderMsg.startDate + orderMsg.lineteamName + orderMsg
.dayNum + '日游');
var title=orderMsg.startDate + orderMsg.lineteamName + orderMsg
.dayNum + '日游';
this.toPDF(title);
}
},
ToWord: function () {
this.loadingDataList = true
let title = this.dataList.currentPriceInfo.startDate + this.dataList.ltName + this.dataList.dayNum +
'日游'
// 生成pdf
toPDF: function (title) {
this.pdfLoading = true
let urlObj = this.domainManager();
var tcid=0;
var cId = 0;
if(this.sonData&&this.sonData.priceList.length>0&&this.sonData.priceList[0].tcid){
tcid=this.sonData.priceList[0].tcid;
}
if(this.sonData){
cId = this.sonData.id;
}
let msg = {
configId: this.dayList.id,
cityId: this.city,
tcid: this.tcid,
configId: cId,
cityId: 0,
tcid: tcid,
orderId: 0,
FileName: title,
//是否显示基础信息
isShowBase: 1,
isShowBase: this.TripLayer.vshowA ? 1 : 0,
//是否显示航班
isShowFlight: 1,
isShowFlight: this.TripLayer.vshowB ? 1 : 0,
//是否显示行程特色
isShowFeature: 1,
isShowFeature: this.TripLayer.vshowC ? 1 : 0,
//自费、费用包含、费用不含
isShowFee: 1,
isShowFee: this.TripLayer.vshowE ? 1 : 0,
//购物说明,购物安排
isShowShop: 1,
isShowShop: this.TripLayer.vshowF ? 1 : 0,
//重要提示、温馨提示 [订单须知]
isShowTip: 1,
isShowTip: this.TripLayer.vshowG ? 1 : 0,
//是否显示同行备注
isShowB2B: 1,
isShowB2B: this.TripLayer.vshowI ? 1 : 0,
//是否显示行程
isShowTrip: 1,
isShowTrip: this.TripLayer.vshowD ? 1 : 0,
//是否显示标题
isShowTitle: 1,
isShowTitle: this.TripLayer.vshowL ? 1 : 0,
//是否显示旅客名单
isShowGuest: 0,
isShowGuest: this.TripLayer.vshowM ? 1 : 0,
//是否显示紧急联系人
isShowMan: 0,
isShowMan: this.TripLayer.vshowLLR ? 1 : 0,
//是否显示团号
isShowTCNUM: 0,
isShowTCNUM: this.TripLayer.vshowTCNUM ? 1 : 0,
//是否显示行程图片
isShowTripImage: 1,
isShowTripImage: this.TripLayer.vshowK ? 1 : 0,
//是否显示签证信息
isShowVisa: 1,
isShowVisa: this.TripLayer.vshowH ? 1 : 0,
//是否显示视频图片
isShowVideoImg: this.TripLayer.vshowO ? 1 : 0,
//isPc是否PC下载
isPc: 1,
isPc: 2,
//模板参数
templateId: this.showType,
//用户Id
UId: 0
};
this.GetLocalFile("DownLoadTripWord", msg, title + ".doc", res => {
this.loadingDataList = false
});
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 => {
})
},
donwLoad() {
this.loadNone = true;
this.loadingDataList = true;
let imgs = document.getElementsByTagName('img');
for (let i = 0; i < imgs.length; i++) {
document.getElementsByTagName('img')[i].setAttribute('crossOrigin', 'Anonymous')
}
window.setTimeout(this.getPdf('#pdfDom'), 3000);
},
DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-")
......@@ -1045,7 +1042,6 @@
getData: function (msg) {
this.loadingDataList = true
this.apipost('b2b_get_GetB2BTravelInfoV1', msg, r => {
if (r.data.resultCode == 1) {
let data = (r.data.data);
this.sonData = data;
......
......@@ -11,15 +11,7 @@ export default {
},
//域名管理对象
Vue.prototype.domainManager = function () {
// var domainUrl = "http://test_reborn.oytour.com";//主域名
// var domainUrl = "http://reborn.oytour.com"; //主域名
//var domainUrl = "http://192.168.2.65:8025"//主域名
// let domainUrl = "https://reborn.oytour.com";
// let domainUrl = "http://testapi.oytour.com"
let domainUrl = "http://192.168.2.65:8069"
//let domainUrl = "http://192.168.0.106"
// let domainUrl = "http://192.168.2.214:8082"
// var domainUrl = "http://reborn.oytour.com";
let domainUrl = "http://testapi.oytour.com"
let locationName = window.location.hostname;
if (this.isOnline()) {
if (window.location.host.indexOf('testb2b.oytour.com') != -1)
......@@ -32,14 +24,9 @@ export default {
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
// javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000",
javaUrl: locationName.indexOf('testb2b') == -1 ? "http://efficient.oytour.com" : locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://47.96.12.235:9001" : "http://192.168.2.215:9000",
//javaUrl:'http://192.168.2.215:9000',
// javaUrl: "http://efficient.oytour.com",
// javaUrl: "http://47.96.12.235:9001",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://uploadfile.oytour.com" : "http://192.168.2.214:8130",
// UploadUrl: "http://uploadfile.oytour.com",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
};
return obj;
......@@ -91,10 +78,10 @@ export default {
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
},
//消息成功提示
Vue.prototype.Success = function (msg) {
this.$message({
......@@ -192,8 +179,7 @@ export default {
"sign": md5Str
}
if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2;
postData.groupId = 2;
}
this.$http.post(apiurl, postData, {
headers: {
......@@ -201,7 +187,7 @@ export default {
'Referer-Viitto': this.$route.path
}
})
.then(res => {
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
......@@ -222,15 +208,13 @@ export default {
this.apiurl = apiurl;
var token = "";
var key = "";
// let userInfo = localStorage.userInfo ? JSON.parse(localStorage.userInfo) : ''
// let uid = userInfo.accountId ? userInfo.accountId : 0
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().secretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"timestamp": timestamp,
......@@ -238,8 +222,7 @@ export default {
"sign": md5Str
}
if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2;
postData.groupId = 2;
}
this.$http.post(apiurl, postData, {
headers: {
......@@ -249,68 +232,56 @@ export default {
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
// if (window.location.href.indexOf('IntegralMall') === -1 && window.location.href.indexOf('productDetail') === -1) {
this.$router.push({
path: '/login'
})
// }
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else {
if (res.data.award && res.data.award.mName!==null) {
if (res.data.award && res.data.award.mName !== null) {
this.MsgBus.$emit('openRaffleTickets', res.data.award)
}
successCall(res)
}
}, faildCall)
},
Vue.prototype.getAction = function(actionId,lineId){
// if(actionId==1){
// console.log("浏览签证产品",actionId)
// }
// if(actionId==7){
// console.log("浏览跟团游",actionId)
// }
// if(actionId==9){
// console.log("浏览跟团游下单",actionId)
// }
let msg={};
msg.actionId=actionId;
if(lineId){
msg.lineId=lineId;
Vue.prototype.getAction = function (actionId, lineId) {
let msg = {};
msg.actionId = actionId;
if (lineId) {
msg.lineId = lineId;
}
this.apiJavaPost('/api/b2b/home/getSpecialAction',msg,res=>{
this.Travelload=false;
if(res.data.resultCode==1){
}else{
this.Error(res.data.message);
}
},null)
}
this.apiJavaPost('/api/b2b/home/getSpecialAction', msg, res => {
this.Travelload = false;
if (res.data.resultCode == 1) {
} else {
this.Error(res.data.message);
}
}, null)
}
//验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
if (value.indexOf(".") < 0 && value != "") {
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value = parseFloat(value);
}
item[filed] = value;
//验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
if (value.indexOf(".") < 0 && value != "") {
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value = parseFloat(value);
}
item[filed] = value;
}
//验证只能输入整数
Vue.prototype.checkInteger = function (item, filed) {
var value = "";
......
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