Commit 89b4e8b0 authored by huangyuanyuan's avatar huangyuanyuan

update

parent 335f6169
<template>
<div>
<div class="choose_back">
<el-row class="msg">
<div style="margin-bottom:10px">
<el-radio v-model="choose_info.ticketType" :label=1>单程</el-radio>
......@@ -8,7 +8,7 @@
<el-col :span="5">
<div class="city" style="margin-bottom:15px">
<span>出发地 | </span>
<el-select style="width:80%" v-model="choose_info.departure_city" filterable placeholder="请选择">
<el-select style="width:75%" v-model="choose_info.departure_city" filterable placeholder="请选择">
<el-option :value=0 label="不限"></el-option>
<el-option
v-for="item in cfd"
......@@ -20,7 +20,7 @@
</div>
<div class="city">
<span>目的地 | </span>
<el-select style="width:80%" v-model="choose_info.arrival_city" filterable placeholder="请选择">
<el-select style="width:75%" v-model="choose_info.arrival_city" filterable placeholder="请选择">
<el-option :value=0 label="不限"></el-option>
<el-option
v-for="item in cfd"
......@@ -39,7 +39,7 @@
type="date"
placeholder="选择日期">
</el-date-picker>
<span>{{startweek}}</span>
<!-- <span>{{startweek}}</span> -->
</div>
<div class="city">
<span>归期 | </span>
......@@ -48,7 +48,7 @@
type="date"
placeholder="选择日期">
</el-date-picker>
<span>{{endweek}}</span>
<!-- <span>{{endweek}}</span> -->
</div>
</el-col>
<el-col :span="13">
......@@ -72,7 +72,7 @@
</div>
<div>
<div class="city" style="width:200px;display:inline-block;">
<div class="city" style="width:220px;display:inline-block;">
<span>舱位选择 | </span>
<el-select v-model="choose_info.freightSpace" placeholder="请选择">
<el-option
......@@ -85,7 +85,7 @@
</div>
<div class="city" style="width:250px;display:inline-block;margin:0 10px">
<span>航空公司 | </span>
<el-select style="width:180px" filterable v-model="choose_info.airLineID" placeholder="请选择">
<el-select style="width:160px" filterable v-model="choose_info.airLineID" placeholder="请选择">
<el-option :value=0 label="不限"></el-option>
<el-option v-for="item in airlineList" :label="item.AlName" :value="item.AirLineId"
:key="item.AirLineId"></el-option>
......@@ -109,7 +109,7 @@ export default {
pageIndex:1,
pageSize:10,
id:0,
qFlightDateStart:"",
qFlightDateStart:moment().format('YYYY-MM-DD'),
qFlightDateEnd:"",
flight_number:"",
airLineID:0,
......@@ -237,7 +237,7 @@ export default {
width: 130px;
height: 100%;
}
.el-select>.el-input{
.msg .el-select>.el-input{
width: 100%;
}
.msg .el-button{
......@@ -248,11 +248,11 @@ export default {
color: #ffffff;
border: none;
}
.el-input-number .el-input{
.msg .el-input-number .el-input{
width: 95px;
}
.msg .number{
width:140px;
.choose_back .msg .number{
width:150px;
height:34px;
background:rgba(255,255,255,1);
border:1px solid rgba(216,218,220,1);
......@@ -262,7 +262,7 @@ export default {
display: inline-block;
margin-right: 20px;
}
.el-input-number{
.msg .el-input-number{
width:95px;
height: 100%;
}
......@@ -273,24 +273,25 @@ export default {
}
.msg .city{
width:80%;
height:34px;
height:36px;
background:rgba(255,255,255,1);
border:1px solid rgba(216,218,220,1);
border-radius:4px;
padding-bottom: 2px;
padding-left: 6px;
box-sizing: border-box
}
.el-input{
.msg .el-input{
width: 145px;
height: 100%;
}
.el-input.is-active .el-input__inner, .el-input__inner:focus{
.msg .el-input.is-active .el-input__inner, .el-input__inner:focus{
border-color: none;
}
.el-date-editor.el-input, .el-date-editor.el-input__inner{
.msg .el-date-editor.el-input, .el-date-editor.el-input__inner{
width: 145px;
}
.el-input__inner{
.msg .el-input__inner{
border: none;
height: 100%;
}
......
......@@ -12,18 +12,20 @@
<el-col :span="18" :offset="3">
<!-- 订单详情 -->
<div class="ticket_list">
<el-col :span="9">
<div>
<p style="font-size:16px;color:#333333">{{getlistSigel.flightDate}}
{{getlistSigel.goStartAirPlace}} - {{getlistSigel.goEndAirPlace}}
<el-col :span="9" style="position:relative">
<div class="bz">去程</div>
<div class="padd">
<p style="font-size:16px;color:#333333;padding-top:10px">{{getlistSigel.flightDate}}
{{getlistSigel.goStartCityName}} - {{getlistSigel.goEndCityName}}
</p>
<p style="font-size:12px;color:#666666">
<img style="width:15px;height:15px;color:#000000" src="" alt="">
<img style="width:18px;height:18px;margin:0 5px" :src="getlistSigel.airlineUrl" alt="">
<span>{{getlistSigel.airlineName}}</span>
<span>{{getlistSigel.alCode}} </span>
</p>
<div class="xcxq">
<div class="bz"></div>
<el-col :span="8" style="text-align:right">
<p class="time">{{getlistSigel.goStartHouseTime}}</p>
<p>{{getlistSigel.goStartAirPlace}}</p>
......@@ -42,18 +44,19 @@
</div>
</div>
</el-col>
<el-col :span="9" style="border-right:1px dashed #AAAAAA;">
<div>
<p style="font-size:16px;color:#333333">{{getlistSigel.backDate}}
{{getlistSigel.backStartAirPlace}} - {{getlistSigel.backEndAirPlace}}
<el-col :span="9" style="border-right:1px dashed #AAAAAA;position:relative">
<div class="bz">返程</div>
<div class="padd">
<p style="font-size:16px;color:#333333;padding-top:10px">{{getlistSigel.backDate}}
{{getlistSigel.backStartCityName}} - {{getlistSigel.backEndCityName}}
</p>
<p style="font-size:12px;color:#666666">
<img style="width:15px;height:15px;color:#000000" src="" alt="">
<img style="width:18px;height:18px;margin:0 5px" :src="getlistSigel.airlineUrl" alt="">
<span>{{getlistSigel.airlineName}}</span>
<span>{{getlistSigel.alCode}} </span>
</p>
<div class="xcxq">
<div class="bz"></div>
<el-col :span="8" style="text-align:right">
<p class="time">{{getlistSigel.backStartHouseTime}}</p>
<p>{{getlistSigel.goStartAirPlace}}</p>
......@@ -76,13 +79,21 @@
<p>订单金额
<span class="yu">{{getlistSigel.synum}}</span>
</p>
<p>
<p style="font-size:12px;padding-top:20px">
<span>票价</span>
<span style="float:right;color:#FF680B;font-size:20px">{{getlistSigel.b2BPrice}}</span>
<span style="float:right;color:#FF680B;font-size:20px">{{personNum.preferPrice}}</span>
</p>
<P>
<P style="font-size:12px;margin-top:12px">
成人票:
<span style="float:right;">{{personNum.manNum}}</span>
<span style="float:right;">{{getlistSigel.scatterB2BPrice }} x {{personNum.manNum}}</span>
</P>
<P style="font-size:12px;">
儿童票:
<span style="float:right;">{{getlistSigel.scatterB2BPrice }} x {{personNum.chirdNum}}</span>
</P>
<P style="font-size:12px;">
老人票:
<span style="float:right;">{{getlistSigel.scatterB2BPrice }} x {{personNum.oldPeopleNum}}</span>
</P>
</el-col>
</div>
......@@ -142,28 +153,27 @@
</div>
</el-col>
<el-col :span="20">
<el-form-item label="乘机人" :prop="'guestList.'+index+'.name'" :rules="[{required: true, message: '名不能为空', trigger: 'blur'}]">
<el-form-item label="乘机人" :prop="'guestList.'+index+'.name'" :rules="[{required: true, message: '名不能为空', trigger: 'blur'}]">
<el-input size="mini" v-model="item.name"></el-input>
</el-form-item>
<el-form-item label="护照信息" :prop="'guestList.'+index+'.passportNo'" :rules="[{ required: true, message: '请输入护照信息', trigger: 'blur' }]">
<el-input size="mini" v-model="item.passportNo"></el-input>
</el-form-item>
<el-form-item label="出生日期" :prop="'guestList.'+index+'.birthday'" :rules="[{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }]">
<el-date-picker size="mini" type="date" placeholder="选择日期" v-model="item.birthday" style="width: 100%;"></el-date-picker>
<el-form-item label="出生日期" :prop="'guestList.'+index+'.birthday'" :rules="[{ type: 'string', required: true, message: '请选择日期', trigger: 'change' }]">
<el-date-picker size="mini" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" v-model="item.birthday" style="width: 100%;"></el-date-picker>
</el-form-item>
<el-form-item label="性别" :prop="'guestList.'+index+'.sex'" :rules="[{ required: true, message: '请选择性别', trigger: 'change' }]">
<el-radio-group v-model="item.sex">
<el-radio label="男" value="1"></el-radio>
<el-radio label="女" value="2"></el-radio>
<el-radio label="1" value="1"></el-radio>
<el-radio label="2" value="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="国籍">
<el-select size="mini" v-model="item.nationality" filterable placeholder="请选择国籍">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-option v-for="(item,key) in countroylist" :key="key" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
<el-form-item label="手机号">
<el-form-item label="手机号" :prop="'guestList.'+index+'.mobilePhone'" :rules="[{required: true, message: '电话号码不能为空', trigger: 'blur'}]">
<el-input size="mini" v-model="item.mobilePhone"></el-input>
</el-form-item>
</el-col>
......@@ -175,18 +185,18 @@
<!-- 联系人 -->
<div v-show="!personnums" class="lxr_info" style="margin-top:20px;background:#fff;">
<p class="lxr">联系人信息</p>
<el-form style="width:90%" :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="联系人" prop="name" :rules="{ required: true, message: '请输入姓名', trigger: 'blur' }">
<el-input size="mini" v-model="ruleForm.name"></el-input>
<el-form style="width:90%" :model="personNum" ref="personNum" label-width="100px" class="demo-ruleForm">
<el-form-item label="联系人" prop="contactName" :rules="{ required: true, message: '请输入联系人姓名', trigger: 'blur' }">
<el-input size="mini" v-model="personNum.contactName"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="name" :rules="{ required: true, message: '请输入护照信息', trigger: 'blur' }">
<el-input size="mini" v-model="ruleForm.name"></el-input>
<el-form-item label="手机号" prop="contactMobile" :rules="{ required: true, message: '请输入联系电话', trigger: 'blur' }">
<el-input size="mini" v-model="personNum.contactMobile"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="name" :rules="{ required: true, message: '请输入出生日期', trigger: 'blur' }">
<el-input size="mini" v-model="ruleForm.name"></el-input>
<el-form-item label="邮箱" prop="contactEmail" :rules="[{ required: true, message: '请输入邮箱地址', trigger: 'blur' },{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]">
<el-input size="mini" v-model="personNum.contactEmail"></el-input>
</el-form-item>
<el-form-item style="width:99%" label="备注" prop="name">
<el-input size="mini" v-model="ruleForm.name"></el-input>
<el-form-item style="width:99%" label="备注">
<el-input size="mini" v-model="personNum.remarks"></el-input>
</el-form-item>
</el-form>
</div>
......@@ -199,7 +209,7 @@
<p class="total" style="margin-top:12px">
<span>总价</span>
<span style="font-size:20px;font-weight:400;color:rgba(255,255,255,1);margin:0 15px;">480</span>
<span style="font-size:20px;font-weight:400;color:rgba(255,255,255,1);margin:0 15px;">{{personNum.preferPrice}}</span>
<span @click="submitForm('personNum')" style="cursor: pointer;;height:32px;background:rgba(238,68,84,1);border-radius:4px;color:#fff;padding:4px 15px">同意以上协议条款,提交订单</span>
</p>
</div>
......@@ -208,8 +218,9 @@
</div>
</template>
<script>
import moment from 'moment'
export default {
components: {
},
......@@ -222,27 +233,58 @@ export default {
babyNum:0,
oldPeopleNum:0,
guestList:[],
preferPrice:0,//应收总金额,
contactMobile:'',
contactEmail:'',
contactName:'',
},
AirTicketId:this.$route.params.id,
ruleForm:{},
getlistSigel:{},
flightList:[]
flightList:[],
userInfo:this.getLocalStorage(),
customer:{},
countroylist:[],
}
},
mounted () {
this.GetDes();
this.GetCountroy()
},
methods: {
// 国籍
GetCountroy(){
this.apipost(
"b2b_get_GetCountryForSMAirTick", {},
res => {
// console.log(res)
if (res.data.resultCode == 1) {
this.countroylist = res.data.data;
}
},
err => {
}
);
},
//获取订单详情
GetDes(){
this.apiJavaPost('/api/dmc/airticket/getB2BAirticketInfo',{AirTicketId:this.AirTicketId},res=>{
console.log("机票订单详情",res)
// console.log("订单",res)
this.getlistSigel=res.data.data;
this.getlistSigel.synum=this.getlistSigel.airTicketScatterNum-this.getlistSigel.useScatterNum;
this.flightList=this.getlistSigel.flightList;
this.personNum.airProductId=this.getlistSigel.airProductId;
this.personNum.airTicketId=this.getlistSigel.id;
this.personNum.departureCityId=this.getlistSigel.departure_city;
this.personNum.unitPrice=this.getlistSigel.scatterB2BPrice;// 成交单价
this.personNum.tcPrice=this.getlistSigel.scatterB2BPrice;//机票单价
this.personNum.returnArriveCityId=this.getlistSigel.arrival_city;
},null)
},
// 确认订单人数
......@@ -251,41 +293,38 @@ export default {
this.$message.error("乘机人数至少1人!")
return;
}
this.$refs.personNum.resetFields();
this.personNum.guestNum=this.personNum.manNum+this.personNum.chirdNum+this.personNum.oldPeopleNum+this.personNum.babyNum;
this.personNum.seatNum=this.personNum.manNum+this.personNum.chirdNum+this.personNum.oldPeopleNum;
this.personNum.preferPrice=this.personNum.seatNum*this.getlistSigel.scatterB2BPrice;
this.personNum.guestList=[];
// 成年
for(let i=0;i<this.personNum.manNum;i++){
let info={
ageType:'1',//1 成年 2小孩 3婴儿 4老人
airOrderId:'',//机票订单id
airProductId:'',//机票产品id
airOrderId:this.personNum.airTicketId,//机票订单id
airProductId:this.personNum.airProductId,//机票产品id
birthday:'',//出生日期
eName:'',
mobilePhone:'',
name:"",
nationality:'',
nationality:2,
passportNo:"",//护照号码
sex:'',
}
this.personNum.guestList.push(info);
}
console.log(this.personNum.guestList,'guestList');
// 小孩
for(let i=0;i<this.personNum.chirdNum;i++){
let info={
ageType:'2',//1 成年 2小孩 3婴儿 4老人
airOrderId:'',//机票订单id
airProductId:'',//机票产品id
airOrderId:this.personNum.airTicketId,//机票订单id
airProductId:this.personNum.airProductId,//机票产品id
birthday:'',//出生日期
eName:'',
mobilePhone:'',
name:"",
nationality:'',
nationality:2,
passportNo:"",//护照号码
sex:'',
......@@ -297,13 +336,13 @@ export default {
for(let i=0;i<this.personNum.babyNum;i++){
let info={
ageType:'3',//1 成年 2小孩 3婴儿 4老人
airOrderId:'',//机票订单id
airOrderId:this.personNum.airTicketId,//机票订单id
airProductId:this.personNum.airProductId,//机票产品id
airProductId:'',//机票产品id
birthday:'',//出生日期
eName:'',
mobilePhone:'',
name:"",
nationality:'',
nationality:2,
passportNo:"",//护照号码
sex:'',
......@@ -315,13 +354,13 @@ export default {
for(let i=0;i<this.personNum.oldPeopleNum;i++){
let info={
ageType:'4',//1 成年 2小孩 3婴儿 4老人
airOrderId:'',//机票订单id
airOrderId:this.personNum.airTicketId,//机票订单id
airProductId:this.personNum.airProductId,//机票产品id
airProductId:'',//机票产品id
birthday:'',//出生日期
eName:'',
mobilePhone:'',
name:"",
nationality:'',
nationality:2,
passportNo:"",//护照号码
sex:'',
......@@ -329,18 +368,26 @@ export default {
this.personNum.guestList.push(info);
}
// console.log(num);
console.log(this.personNum);
this.personnums=false;
},
PlaceOrder(formName){
console.log(this.personNum);
},
submitForm(addMsg) { //提交创建、修改表单
submitForm(addMsg) {
this.$refs[addMsg].validate((valid) => {
if(valid) {
//this.addNotice(_type)
this.personNum.customerId=this.userInfo.accountId;
this.apiJavaPost('/api/dmc/airticket/SetB2BAirticketOrder',this.personNum,res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message);
this.personNum={};
this.$router.push({ path: `/ticket/Pay/${res.data.data}`})
}else{
this.$message.error(res.data.message)
}
console.log("下单",res);
},null)
} else {
return false;
}
......@@ -352,8 +399,18 @@ export default {
}
</script>
<style>
.ticket_list .padd{
padding-left:25px;
box-sizing: border-box;
}
.ticket_list .el-col-9{
padding-left:0!important;
padding-right:15px;
padding-bottom:15px;
box-sizing: border-box;
}
.w31 p{
margin:8px 0;
margin:6px 0;
}
......@@ -434,7 +491,7 @@ font-size: 14px;
display: inline-block;
background: #fff;
margin:0 6px;
padding:4px;
padding:4px 6px;
box-sizing: border-box;
border-radius: 4px;
font-size: 12px;
......@@ -456,9 +513,8 @@ font-size: 14px;
}
.bz{
position: absolute;
width:30px;
height:30px;
line-height: 30px;
width:20px;
font-size: 12px;
text-align: center;
color: #fff;
background:rgba(73,192,161,1);
......@@ -477,6 +533,7 @@ font-size: 14px;
background:rgba(245,245,245,1);
overflow: auto;
font-size: 12px;
margin-top:20px;
}
.ticket_list{
background: #fff;
......@@ -484,7 +541,7 @@ font-size: 14px;
justify-content: space-around;
box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);
margin-top: 15px;
padding: 15px;
/* padding: 15px; */
box-sizing: border-box;
}
/* .ticket_list .left{
......
<template>
<div>
<div class="orderPay">
<div class="div_1">
<img src="../../assets/img/ticket/gou.png" alt="">
<div style="padding-left:80px;box-sizing: border-box;width:100%">
<p style="font-size:24px;color:#333;font-weight:700">订单支付成功!</p>
<p style="font-size:12px;color:#333">如有疑问 可致电028-565464646,点击
<a style="color:#ee4454;text-decoration:underline">查看订单>></a></p>
</div>
</div>
<div class="div_2">
<p>
<span>支付金额:¥12545</span>
<span>支付平台:支付宝</span>
</p>
<p>
<span>订单编号:584569846568</span>
<span>下单时间:2019-02-02</span>
</p>
</div>
<el-button size="mini" style="background:rgba(238,68,84,1);border-radius:4px;color:#fff">返回首页</el-button>
<img class="back" src="../../assets/img/ticket/back.png" alt="">
</div>
</div>
</template>
<script>
export default {
}
</script>
<style>
.orderPay .div_2 p span:nth-child(2){
float: right;
}
.orderPay .div_2 {
margin-top: 20px;
width: 320px;
}
.orderPay .div_2 p{
padding:6px 0;
margin:20px 0;
font-size: 12px;
color:#333;
border-bottom:1px solid rgba(221,221,221,1);
}
.orderPay .div_1 img{
width: 54px;
height:54px;
position: absolute;
}
.orderPay .div_1{
position: relative;
box-sizing: border-box;
}
.orderPay{
padding-top:130px;
padding-left:150px;
margin:30px auto;
width:1039px;
height:553px;
position: relative;
box-shadow:0px 4px 38px 0px rgba(107,107,107,0.2);
box-sizing: border-box;
}
.back{
position: absolute;
width: 384px;
height: 289px;
right:10px;
top:110px;
}
</style>
<template>
<div class="pay_vue">
<el-row :gutter="18">
<el-col :span="18" :offset="3">
<!-- 头部 -->
<div class="head">
<p style="font-size:14px">订单提交成功!剩余支付时间
<span style="color:#FF680B;font-size:18px">{{time_15}}</span>
<span style="text-align:center;float:right">应付金额
<span style="color:#FF680B;font-size:18px">¥1259</span>
</span>
</p>
<p style="font-size:12px">请您在
<span style="color:#FF680B;">15分钟</span>
内完成支付,否则订单会自动取消</p>
</div>
<div class="payvue_content">
<p class="ordernum">订单号</p>
<p style="text-align:center">支付金额
<span style="color:#FF680B;font-size:18px">¥1259</span>
</p>
<el-row style="margin-top:15px">
<el-col class="position" style="padding-right:50px" :span="12">
<div style="float:right" class="pay_img">
<div class="w21">
<img class="title_img" src="../../assets/img/ticket/zfb.png" alt="">
<div class="title_content">
<p>支付宝</p>
<p>
<span @click="Code('3')" style="cursor:pointer;color:#FF680B;font-size:14px">点击生成二维码</span>
打开支付宝扫码支付
</p>
</div>
</div>
<div v-show="pay_imgcode" style="text-align:center">
<img class="pay_imgcode" src="../../assets/img/ticket/weixin.png" alt="">
<p>二维码有效时限
<span style="color:#FF680B;font-size:14px">{{time_zfb_5}}</span>
</p>
</div>
</div>
</el-col>
<!-- <el-col class="position" style="padding-left:50px" :span="12">
<div class="pay_img">
<div class="w21">
<img class="title_img" src="../../assets/img/ticket/weixin.png" alt="">
<div class="title_content">
<p>微信</p>
<p>
<span @click="Code('1')" style="cursor:pointer;color:#FF680B;font-size:14px">点击生成二维码</span>
打开支付宝扫码支付
</p>
</div>
</div>
<div v-show="pay_imgcode" style="text-align:center">
<img class="pay_imgcode" src="../../assets/img/ticket/weixin.png" alt="">
<p>二维码有效时限
<span style="color:#FF680B;font-size:14px">{{time_zfb_5}}</span>
</p>
</div>
</div>
</el-col> -->
</el-row>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
pay_imgcode:false,
time_15:0,
time_zfb_5:0,
code:{
OrderSource:"",
body:"",
attach:'',
total_fee:'',
payway:'',
},
// AirOrderId:this.$route.params.id,
};
},
created() {
this.Time15();
},
methods: {
Code(str){
console.log(str)
this.code.payway=str;
this.pay_imgcode=true;
this.apipost(
"OnlinePay_post_GetCodeUrl",this.code,
res => {
console.log(res)
if (res.data.resultCode == 1) {
}
},
err => {
}
);
// this.Time5();
},
Time15(){
clearInterval(timer);
let timer;
let numall=15*60*1000;
timer=setInterval(()=>{
numall--;
if(numall<=0){
clearInterval(timer);
}
this.time_15=this.s_to_hs(numall)
},1000)
},
Time5(){
clearInterval(timer);
let timer;
let numall=5*60*1000;
timer=setInterval(()=>{
numall--;
if(numall<=0){
clearInterval(timer);
}
this.time_zfb_5=this.s_to_hs(numall)
},1000)
},
s_to_hs(s){
//计算分钟
//算法:将秒数除以60,然后下舍入,既得到分钟数
var h;
h = Math.floor(s/60/1000);
//计算秒
//算法:取得秒%60的余数,既得到秒数
s = s%60;
//将变量转换为字符串
h += '';
s += '';
//如果只有一位数,前面增加一个0
h = (h.length==1)?'0'+h:h;
s = (s.length==1)?'0'+s:s;
return h+'分'+s+"秒";
}
}
};
</script>
<style>
.position{
box-sizing: border-box;
}
.payvue_content .pay_img .pay_imgcode{
display: block;
margin:15px auto;
width:216px;
height:216px;
border:1px solid rgba(221,221,221,1);
}
.payvue_content .pay_img .w21 .title_content{
padding-left: 70px;
box-sizing: border-box;
overflow: auto;
}
.payvue_content .pay_img .w21{
position: relative;
}
.payvue_content .pay_img .title_img{
width: 47px;
height: 47px;
border-radius: 50%;
position: absolute;
}
.payvue_content .pay_img{
width:338px;
background:rgba(255,255,255,1);
box-shadow:0px 0px 6px 0px rgba(107,107,107,0.2);
padding:28px;
box-sizing: border-box;
}
.payvue_content .ordernum{
width:203px;
height:35px;
line-height:35px;
background: #49C0A1;
font-size:14px;
font-weight:400;
color:rgba(255,255,255,1);
padding-left:16px;
box-sizing: border-box;
}
.pay_vue p{
margin:0;
}
.pay_vue .head{
padding:4px 0;
}
.payvue_content{
margin-top:15px;
padding-bottom: 25px;
padding-top:16px;
background:rgba(255,255,255,1);
box-shadow:0px 4px 38px 0px rgba(107,107,107,0.2);
}
</style>
......@@ -185,7 +185,7 @@ export default {
},null)
},
ChooseInfo(val){
console.log("ChooseInfo",val)
// console.log("ChooseInfo",val)
if(val){
this.Choose_Info=val;
this.Choose_Info.airTicketScatterNum=this.Choose_Info.cr+this.Choose_Info.lr+this.Choose_Info.child;
......@@ -369,11 +369,12 @@ p{
}
.msg .city{
width:95%;
height:34px;
height:36px;
background:rgba(255,255,255,1);
border:1px solid rgba(216,218,220,1);
border-radius:4px;
padding-left: 6px;
padding-bottom: 2px;
box-sizing: border-box
}
.el-input{
......@@ -386,7 +387,7 @@ p{
.el-date-editor.el-input, .el-date-editor.el-input__inner{
width: 145px;
}
.el-input__inner{
.msg .el-input__inner{
border: none;
height: 100%;
}
......@@ -404,7 +405,7 @@ p{
}
.choose{
position: absolute;
min-width: 1300px;
min-width: 1350px;
background: rgba(255, 255, 255, 0.24);
height:175px;
padding:10px;
......
<template>
<div>
<div style="background:rgba(255,255,255,1);box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);">
<div v-loading="loading" element-loading-text="加载中">
<div class="ticket_1" style="background:rgba(255,255,255,1);box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);">
<el-row :gutter="20">
<el-col :span="20" :offset="2">
<el-row class="msg">
......@@ -77,7 +77,7 @@
</div>
<div>
<div class="city" style="width:200px;display:inline-block;">
<div class="city" style="width:220px;display:inline-block;">
<span>舱位选择 | </span>
<el-select v-model="choose_info.freightSpace" placeholder="请选择">
<el-option :value="zero" label="不限"></el-option>
......@@ -91,7 +91,7 @@
</div>
<div class="city" style="width:250px;display:inline-block;margin:0 10px">
<span>航空公司 | </span>
<el-select style="width:180px" filterable v-model="choose_info.airLineID" placeholder="请选择">
<el-select style="width:160px" filterable v-model="choose_info.airLineID" placeholder="请选择">
<el-option :value="zero" label="不限"></el-option>
<el-option v-for="item in airlineList" :label="item.AlName" :value="item.AirLineId"
:key="item.AirLineId"></el-option>
......@@ -122,7 +122,7 @@
<div @click="AfterDate" style="color:#dddddd;font-size:20px" class="margin common">&gt;</div>
<div class="font_12" style="margin-top:30px;color:#FF680B;width:6%;position:relative">
<span @click="OtherToggle">其他日期</span>
<span @click="OtherToggle" style="cursor:pointer">其他日期</span>
<div class="otherdate" v-show="other">
<div style="font-size:16px;padding:10px">
<el-col :span="8"><span @click="ChangeMonth(1)" class="month_circle">&lt;</span> </el-col>
......@@ -131,7 +131,7 @@
</div>
<div style="margin-top:22px">
<v-calendar ref="child" v-for="(item,index) in classArray" :key="index" :dateData= "item" :month="tomonth" :day = "item[0].dateStr" @ChildrenSelect="ListenChildren">
<v-calendar ref="child" v-for="(item,index) in classArray" :key="index" v-bind:dateData="classArray" :day ="tomonth" v-on:SelectChild="SelectChild">
</v-calendar>
</div>
......@@ -216,9 +216,9 @@
<p class="info">航班信息</p>
<div class="content" v-for="(flight,i) in item.flightList" :key="i">
<p v-if="i>0" style="text-align:center">中转</p>
<div>
<!-- <img class="imgsrc" src="" alt=""> -->
<span>{{flight.alName}}</span>
<div style="vertical-align:middle">
<img class="imgsrc" :src="item.airlineUrl" alt="">
<span style="vertical-align:middle">{{flight.alName}}</span>
</div>
<ul class="list_cn">
<li>
......@@ -231,9 +231,9 @@
</div>
<div class="content" v-for="(back,k) in item.backFlightList" :key="k.id">
<p v-if="k>0" style="text-align:center">中转</p>
<div>
<!-- <img class="imgsrc" src="" alt=""> -->
<span>{{back.alName}}</span>
<div style="vertical-align:middle">
<img class="imgsrc" :src="item.airlineUrl" alt="">
<span style="vertical-align:middle">{{back.alName}}</span>
</div>
<ul class="list_cn">
<li>
......@@ -301,7 +301,7 @@ export default {
today:moment().format("YYYY-MM-DD HH:mm:ss"),
datalist:[],
datainfo:{
qFlightDateStart:moment().format("YYYY-MM-DD HH:mm:ss")
qFlightDateStart:""
},
dateList:[],
changeday:moment().format("YYYY-MM-DD HH:mm:ss"),
......@@ -354,6 +354,7 @@ export default {
value:"",
airlineList:[],
cfd:[],
loading:false,
}
},
......@@ -362,6 +363,7 @@ export default {
},
created(){
this.choose_info=JSON.parse(sessionStorage.getItem("ChooseInfo"));
this.datainfo.qFlightDateStart=moment(this.choose_info.qFlightDateStart).format("YYYY-MM-DD HH:mm:ss")
this.getList();
this.Datelist();
......@@ -371,6 +373,13 @@ export default {
},
methods: {
SelectChild(item){
this.datainfo.qFlightDateStart=moment(item.date_str).format("YYYY-MM-DD HH:mm:ss")
this.other=false;
this.Datelist();
this.choose_info.qFlightDateStart=item.date_str;
},
Purchase(item){
let isLogin=this.$store.state.isLogin;
if(isLogin==0){
......@@ -379,8 +388,11 @@ export default {
path: '/login'
})
}else{
this.$store.commit('HomePage','ticket')
sessionStorage.setItem("Homepage",'ticket');
// localStorage.homePage = 'ticket';
this.$router.push({
path: `/FillItinerary/${item.id}`
path: `/ticket/FillItinerary/${item.id}`
})
}
......@@ -450,6 +462,7 @@ export default {
// moment("2018-10-29",'YYYY-MM-DD').format('E')
handleChange(){},
Search(){
this.loading=true;
this.getList();
this.Datelist();
sessionStorage.setItem("ChooseInfo",JSON.stringify(this.choose_info));
......@@ -457,15 +470,6 @@ export default {
},
ListenChildren(word){
let data = this.dataList.priceList;
for ( let i = 0; i < data.length; i++) {
if (word===data[i].startDate.slice(data[i].startDate.length-2,data[i].startDate.length)){
this.priceListIndex = i;
}
}
},
OtherToggle(){
this.other=!this.other;
},
......@@ -478,32 +482,34 @@ export default {
this.other_date.flithtMonthDate=this.tomonth;
}
this.OtherDate();
console.log(this.$refs.child)
this.$refs.child[0].getYearMonthDay();
},
// 其他日期
OtherDate(){
this.apiJavaPost('/api/dmc/airticket/getB2BAirticketForMonthMinPrice',this.other_date,res=>{
let list=res.data.data;
// console.log("let list",this.list)
this.creatCalendar(list);
// this.$refs.children.getYearMonthDay();
},null)
},
AfterDate(){
this.changeday=moment(this.changeday).add(1, 'days').format('YYYY-MM-DD HH:mm:ss');
this.datainfo.qFlightDateStart=this.changeday;
this.choose_info.qFlightDateStart=moment(this.changeday).format('YYYY-MM-DD');
this.Datelist();
},
// 获取当前日期的前一天
BeforeDate(){
this.changeday=moment(this.changeday).subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss');
this.datainfo.qFlightDateStart=this.changeday;
this.choose_info.qFlightDateStart=moment(this.changeday).format('YYYY-MM-DD');
this.Datelist();
},
Datelist(){
this.loading=true;
this.apiJavaPost('/api/dmc/airticket/getB2BAirticketForMinPrice',this.datainfo,res=>{
console.log(res);
// console.log(res);
this.loading=false;
this.dateList=res.data.data;
},null)
......@@ -576,7 +582,9 @@ export default {
},[]
)
this.calendarTit = dateList;
this.$nextTick(() => {
this.$refs.child[0].getYearMonthDay(this.classArray);
})
},
}
......@@ -585,6 +593,18 @@ export default {
<style>
@import '../../assets/global/font.css';
@import '../../assets/css/reset.css';
.ticket_1 .msg .number{
width:150px;
height:34px;
background:rgba(255,255,255,1);
border:1px solid rgba(216,218,220,1);
border-radius:4px;
padding-left: 6px;
box-sizing: border-box;
display: inline-block;
margin-right: 20px;
padding-bottom:2px;
}
.el-popover{
padding:0;
}
......@@ -614,6 +634,8 @@ li{
width:22px;
height:20px;
border-radius:50%;
margin:0 6px;
vertical-align: middle;
}
.describe .info{
......@@ -660,8 +682,7 @@ li{
color: #ffffff;
}
.otherdate{
width: 500px;
height: 417px;
width: 520px;
position: absolute;
right: 0;
z-index: 5;
......
<style>
@import "../../assets/global/header.css";
.header .Info div{
float: left;
margin-top:10px;
}
.header .ckxx{
width:38px;
height:38px;
background:rgba(73,192,161,1);
border-radius:50%;
color:#fff;
font-size: 10px;
text-align: center;
}
.header .zf{
width:38px;
height:38px;
background:rgba(170,170,170,1);
border-radius:50%;
color: #fff;
font-size: 12px;
text-align: center;
line-height: 38px;
/* margin-top:8px */
}
.header .fg{
margin: 0 6px;
margin-top:30px!important;
width:86px;
height:1px;
background:rgba(170,170,170,1);
}
.header .head_title{
padding-top:15px;
font-size:14px;
font-family:MicrosoftYaHei-Bold;
font-weight:bold;
color:rgba(51,51,51,1);
}
</style>
<template>
......@@ -32,7 +71,7 @@
</el-row>
</div>
<div class="second-nav">
<el-row v-if="homePage=='true'||!homePage">
<el-row v-if="homePage=='true'|| homePage==true">
<el-col :span="20" :offset="2">
<el-row>
<el-col :span="6">
......@@ -48,7 +87,7 @@
<!-- <el-menu-item index="2-3">单团</el-menu-item>
<el-menu-item index="2-4">私人订制</el-menu-item> -->
</el-submenu>
<!-- <el-menu-item index="3"><a href="javascript:void(0);">机票</a></el-menu-item> -->
<el-menu-item index="3" @click="goUrl('TicketHome',true)"><a href="javascript:void(0);">机票</a></el-menu-item>
<!-- <el-menu-item index="5"><a href="javascript:void(0);">机票</a></el-menu-item>
......@@ -70,7 +109,22 @@
</el-row>
</el-col>
</el-row>
<el-row v-if="homePage=='false'">
<el-row v-if="homePage=='ticket'">
<el-col :span="20" :offset="2" >
<el-row>
<el-col :span="6">
<img src='../../assets/img/logo.png' class="logo" />
</el-col>
<el-col :span="4" :offset="14" class="Info">
<div class="ckxx">乘客信息</div>
<div class="fg"></div>
<div class="zf">支付</div>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row v-if="homePage=='false' || homePage==false">
<el-col :span="20" :offset="2" >
<el-row>
<el-col :span="6">
......@@ -93,7 +147,7 @@
</template>
<script>
export default {
name: 'header',
props: {
msg: String
},
......@@ -101,21 +155,28 @@ export default {
return {
city:0,
sites:[],
defaultKey:'2-1',
defaultKey:sessionStorage.getItem("defaultKey"),
isLogin:false,
homePage:localStorage.homePage?localStorage.homePage:false,
// homePage:localStorage.homePage?localStorage.homePage:false,
// homePage:this.$store.state.homePage,
groupInfo:{}
}
},
created(){
console.log(this.defaultKey)
},
computed: {
user(){
return this.$store.state.user
},
homePage(){
return this.$store.state.homePage
}
},
watch:{
homePage:{
handler: function(val, oldVal) {
// console.log(val)
// console.log(oldVal)
},
deep: true
......@@ -142,8 +203,11 @@ export default {
this.$emit('forword', this.defaultKey)
},
methods: {
handleSelect(key, keyPath) {
// console.log(key)
console.log(key)
this.defaultKey=key;
sessionStorage.setItem("defaultKey",this.defaultKey);
this.$emit('forword', key)
},
loadSites(){
......@@ -166,13 +230,19 @@ export default {
goLoginUrl(path,t){
this.$store.commit('changeLogin',0);
this.$store.commit('updateUser',{});
this.$store.commit('HomePage','true')
localStorage.removeItem("userInfo");
localStorage.homePage = 'true';
sessionStorage.setItem("Homepage",'true');
// localStorage.homePage = 'true';
// console.log(" this.homePage.", this.homePage)
this.$router.push({name:path,query:{'type':t}})
},
goUrl(path,bl){
// console.log("path",path)
// console.log("bl",bl)
localStorage.homePage = bl;
this.homePage = localStorage.homePage;
this.$store.commit('HomePage',bl)
// console.log(" this.homePage.", this.homePage)
this.$router.push({name:path});
}
}
......
......@@ -52,6 +52,14 @@
margin: 10px 0;
color: #ff4646;
}
.dayList:hover{
background: #FF680B;
color:#fff!important;
}
.dayList:hover .price{
color:#fff;
}
</style>
<template>
<div class="calendar-box" id='calendar'>
......@@ -61,7 +69,7 @@
</thead>
</table>
<div class="monthDayList">
<div v-for="(item,index) in daysData" class="dayList" :key="index" @click="item.price?selectDate(index):''" :class="{selectDay:isSelect == index,noPrice:!item.price,yesPrice:item.price}">
<div v-for="(item,index) in daysData" class="dayList" :key="index" @click="item.price?selectDate(item):''" :class="{selectDay:isSelect == index,noPrice:!item.price,yesPrice:item.price}">
<p>{{item.day}}</p>
<p v-if="item.price!='0.00' && item.price" class="price">{{item.price}}</p>
</div>
......@@ -79,7 +87,8 @@ export default {
data(){
return{
week:['日','一','二','三','四','五','六'],
priceData:this.dateData,
// priceData:this.dateData[0],
priceData:[],
currentDay: this.day,
DaysInMonth:[],
daysData:[],
......@@ -91,31 +100,21 @@ export default {
},created(){
// this.getYearMonthDay();
},methods:{
selectDate(index){
if(this.$data.daysData[index].day == 0) {
bus.$emit('chosen-tripdate', null)
return;
}
if(this.isSelect == index){
this.isSelect = -1;
bus.$emit('chosen-tripdate', null)
selectDate(item){
// console.log(item);
if(item.price=="0.00"){
return;
}else{
this.$emit('SelectChild',item);
}
this.isSelect = index;
let currentDay = this.currentDay.split('-')
let clickDay = parseInt(this.$data.daysData[index].day)
clickDay = clickDay < 10 ? ('0' + clickDay) : clickDay
let clickDate = currentDay[0] + '-' + currentDay[1] + '-' + clickDay
this.$emit('ChildrenSelect', clickDate)
bus.$emit('chosen-tripdate', this.currentDay.substring(0,7) + '-' + clickDay)
},
getYearMonthDay(){
let day=moment(this.day).add(1, 'month').format('YYYY-MM-DD');
// let day=this.day;
getYearMonthDay(list){
// console.log("dfsdgsg",list)
this.priceData=list[0];
// let day=moment(this.day).add(1, 'month').format('YYYY-MM-DD');
let day=this.day;
let currentYear = day.substring(0,4); //当前年份
let currentMonth =day.substring(5,7); //当前月份
// console.log("currentYear",currentYear)
// console.log("currentMonth",currentMonth)
let date = new Date();
let strDate = date.getDate();
......@@ -130,19 +129,23 @@ export default {
let monthDay = this.$data.DaysInMonth[Number(currentMonth)-1];//当前月的天数
let daysData = [];
//给数据源赋值
for (var i = 0 ;i < Number(monthDay) ;i++) {
var priceDict = {'day':String(i+1),'price':0,'dis':false};
for (let i = 0 ;i < Number(monthDay) ;i++) {
var priceDict = {'day':String(i+1),'price':0,'dis':false,date_str:''};
daysData.push(priceDict);
}
this.daysData = daysData;
var currentDay = `${currentYear}-${currentMonth}-01`;
var dateObject = new Date(currentDay);
var firstDay = dateObject.getDay();//得到每个月1号是周几
for (var i in this.priceData) {
// for (let i in this.priceData) {
for (let i=0;i<this.priceData.length;i++) {
let price = this.priceData[i];
var dayIndex = price.dateStr.substring(price.dateStr.length-2,price.dateStr.length);
var dayDict = daysData[Number(dayIndex)-1];
// console.log("dayIndex",dayIndex)
// console.log("dayDict",dayDict)
dayDict.price = price.price;
dayDict.date_str=price.dateStr;
if(dayIndex<strDate&&strMonth==currentMonth){
dayDict.price='';
}
......
......@@ -29,6 +29,16 @@ Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils
Vue.prototype.$echarts = echarts
router.beforeEach((to, from, next) => {
let ticket=to.path.substring(1, 7);
if(ticket=="ticket"){
sessionStorage.setItem("Homepage",'ticket');
store.commit('HomePage','ticket')
}else{
sessionStorage.setItem("Homepage",'true');
store.commit('HomePage','true')
}
if (to.meta.title) {
if(localStorage.g && localStorage.g!='undefined'){
if(JSON.parse(localStorage.g).i!=2)
......
......@@ -12,9 +12,9 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function() {
// var domainUrl = "http://test_reborn.oytour.com";//主域名
var domainUrl = "http://reborn.oytour.com"; //主域名
//var domainUrl = "http://reborn.oytour.com"; //主域名
// var domainUrl = "http://192.168.2.214:8082"//主域名
// let domainUrl = "http://192.168.2.16:8083"; //刘东主域名
let domainUrl = "http://192.168.2.16:8083"; //刘东主域名
if (this.isOnline()) {
if(window.location.host.indexOf('viitto.com')!=-1)
domainUrl = "http://test.viitto.com"
......
......@@ -140,12 +140,28 @@ export default new Router({
}
},
{
path: '/FillItinerary/:id',
path: '/ticket/FillItinerary/:id',
name: 'FillItinerary',
component: resolve => require(['@/components/Ticket/FillItinerary'], resolve),
meta: {
title: '行程填写'
}
},
{
path: '/ticket/OrderPayOk',
name: 'OrderPayOk',
component: resolve => require(['@/components/Ticket/OrderPayOk'], resolve),
meta: {
title: '确认订单'
}
},
{
path: '/ticket/Pay/:id',
name: 'Pay',
component: resolve => require(['@/components/Ticket/Pay'], resolve),
meta: {
title: '支付'
}
}
]
}
......
......@@ -8,8 +8,13 @@ export default new Vuex.Store({
user:{},
site:0,
isLogin:0,
homePage:sessionStorage.getItem("Homepage") ? sessionStorage.getItem("Homepage") :true,
},
mutations: {
HomePage(state,data){
state.homePage=data;
},
updateSite(state, p) {
state.site = p
},
......
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