Commit e32655b5 authored by zhengke's avatar zhengke
parents 5b604e51 5f67ca01
......@@ -268,7 +268,8 @@
margin-top:15px;
background:rgba(255,248,249,1);
border:1px solid rgba(249, 229, 232, 1);
height:80px;padding-top:15px;
/* height:80px; */
padding:15px 15px;
box-sizing: border-box;
}
.LocalCuisineDetails .ydDiv .el-form-item{
......
......@@ -183,3 +183,111 @@
.brd0{
border-radius: 0;
}
.pfR{
font-family: "PingFangR"
}
.commonF ._choice_box{
height: 19px;
position: absolute;
right: 10px;
bottom: 8px;
display: flex;
align-items: center;
}
.commonF ._choice_box span{
width: 16px;
height: 16px;
border-radius: 50%;
line-height: 16px;
text-align: center;
background-color: white;
display: inline-block;
font-size: 12px !important;
}
.commonF .sawtooth .input{
position: relative;
top: 2px;
}
.commonF .sawtooth {
/* 相对定位,方便让before和after伪元素绝对定位偏移 */
position: relative;
/* 把超出p的部分隐藏起来 */
overflow: hidden;
width:234px;
height:84px;
background: #6776D2;
display: inline-block;
margin-right:26px;
padding-left:20px;
color:#fff;
}
.commonF .sawtooth .kdj{
position: absolute;
display: inline-block;
width:51px;
height:22px;
background:rgba(255,231,27,1);
right:20px;
top:12px;
color:#7C6F01;
font-size: 12px;
text-align: center;
line-height: 22px;
}
.commonF .sawtooth:before, .sawtooth:after {
content: ' ';
width: 0;
height: 100%;
/* 绝对定位进行偏移 */
position: absolute;
top: 10px;
}
.commonF .sawtooth:before {
/* 圆点型的border */
border-right: 10px dotted white;
/* 偏移一个半径,让圆点的一半覆盖p */
left: -5px;
}
.commonF .Yhq{
background: #fff;
padding:20px 0;
}
.commonF .yhqUl{
padding:0 20px;
margin:20px 0;
}
.commonF .icon-xuanzhong2{
color: #31AA21;
}
.commonF .sawtooth:hover {
cursor: pointer;
/* box-shadow: 0px 1px 13px 0px rgb(189, 189, 189);
transition: all linear .5s; */
}
.commonF .yhqUl .blue{
background-color: #8794E2;
}
.commonF .yhqUl .blue:hover{
background-color: #6776D2;
}
.commonF .yhqUl .blue ._time{
color: #4C58A4 !important;
}
.commonF .yhqUl ._active{
background-color: #D9A24D;
}
.commonF .yhqUl .blue._active{
background-color: #6776D2;
}
.commonF ._trip_xiangqing_tips{
color: red !important;
font-size: 14px !important;
}
.commonF ._trip_xiangqing_tips span{
color: #3965B0;
cursor: pointer;
}
\ No newline at end of file
......@@ -609,7 +609,7 @@
</div>
</el-col>
</el-row>
<div class="empty-data" v-if="dataList.length<1">
<div class="empty-data" v-if="dataList.length<1 && !laoding">
<i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
......@@ -897,15 +897,22 @@ export default {
if(item.id == "TAG_0") {
delete this.msg.cat_main_keys
this.msg.cat_keys = [item.list[0].id]
} else {
delete this.msg.keywords
} else if(item.id == "TAG_4") {
this.msg.cat_main_keys = [item.id]
this.msg.keywords = '一日游'
delete this.msg.cat_keys
}else {
this.msg.cat_main_keys = [item.id]
delete this.msg.cat_keys
delete this.msg.keywords
}
this.getList()
} else {
delete this.msg.cat_main_keys
delete this.msg.cat_keys
delete this.msg.keywords
this.getList()
}
},
......
......@@ -488,7 +488,7 @@
<div class="fl-ad-cont">
<div class="search">
<span class="el-icon-close __cp" @click="addShow = !addShow"></span>
<el-input size="mini"></el-input>
<!-- <el-input size="mini"></el-input> -->
</div>
<el-row v-if="CCList.length>0 ">
<el-col :span="6">
......@@ -643,7 +643,7 @@
</div>
</el-col>
</el-row>
<div class="empty-data" v-if="dataList.length<1">
<div class="empty-data" v-if="dataList.length<1 && !laoding">
<i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
......@@ -704,6 +704,7 @@ export default {
],
"page_size": 16,
"start": 0,
"keywords": '一日游'
},
priceSort: "PASC", // PDESC 高到低
KkdayDomain: '',
......@@ -952,13 +953,13 @@ export default {
this.getList()
},
changeMainTag(e){
console.log(e)
if(e.length > 0) {
this.msg.cat_keys = e
} else {
delete this.msg.cat_keys
}
delete this.msg.cat_main_keys
delete this.msg.keywords
this.getList()
},
changeNav(id, num){
......@@ -966,12 +967,18 @@ export default {
x.checkedCities = [];
})
this.typeTagIndex = num
if (id !== 'TAG_0') {
if (id !== 'TAG_0' && id !== "TAG_4") {
this.msg.cat_main_keys = [id]
delete this.msg.cat_keys
delete this.msg.keywords
} else if(id == "TAG_4") {
this.msg.cat_main_keys = [id]
this.msg.keywords = '一日游'
delete this.msg.cat_keys
} else {
delete this.msg.cat_main_keys
this.msg.cat_keys = ["TAG_2_5"]
delete this.msg.keywords
}
this.getList()
},
......@@ -980,36 +987,6 @@ export default {
name: "FreeHome",
});
},
// 选中小标签 加载数据
setChangeTag(item){
delete this.msg.cat_main_keys;
this.msg.cat_keys = item.checkedCities
this.getList()
},
// 游玩类型切换 取消其他选中
setChange(item, index){
if (item.checkd) {
this.typeTag.map((x, i)=>{
if (i !== index) {
x.checkd = false;
x.checkedCities = [];
}
})
if(item.id == "TAG_0") {
delete this.msg.cat_main_keys
this.msg.cat_keys = [item.list[0].id]
} else {
this.msg.cat_main_keys = [item.id]
delete this.msg.cat_keys
}
this.getList()
} else {
this.msg.cat_main_keys = ["TAG_4"]
delete this.msg.cat_keys
this.getList()
}
},
goDetails(obj){
let dom = document.querySelector("#blankLink")
let fullPath = `/FreeDetail?id=${obj.prod_no}`;
......
......@@ -6,6 +6,7 @@
<div class="left" style="width:795px;margin-right:17px">
<div class="ListDiv">
<el-form class="OrderConForm" ref="freeMsg" :model="freeMsg" label-width="100px">
<div class="commomStyle">
<div class="titleDiv">
......@@ -287,6 +288,55 @@
</div>
</div>
</el-form>
<div class="commomStyle">
<div class="titleDiv">
<span class="redSpan"></span>
<span class="f18 pfR">优惠</span>
</div>
<div style="padding:20px">
<p style="margin:10px 0;">兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
<el-row class="_trip_xiangqing _coupon_box">
<p style="width:100%;margin:10px 0;">优惠券</p>
<p v-if="!Verification.length || Verification[0].ApplyState !== 1" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<div v-if="UserCanUseCouponList.length>0" class="_coupon_box">
<div class="_coupon_item" v-for="(item, index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)">
<div class="_left_raduis">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="_coupon_info">
<p class="_coupon_name" :title="item.couponName">{{item.couponName}}</p>
<p v-if="item.couponsType===1"><span class="_sale">{{item.denomination}}</span></p>
<p v-else><span class="_sale">{{item.denomination}}</span></p>
<p class="_info_full">{{item.useCondition}}可用</p>
<p class="_info_time _time">有效时间:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}</p>
<p class="_repeat" v-if="item.overlapUse === 1">可叠加</p>
<div class="_choice_box">
<span v-if="!item.active"></span>
<span v-else class="iconfont icon-xuanzhong2"></span>
</div>
</div>
</div>
</div>
<div v-else class="_no_coupon">
<p>暂无可用优惠券</p>
</div>
</el-row>
</div>
</div>
<el-button :loading="BtnLoading" @click="PayBtn" class="OrderConBtn">
下一步,支付
......@@ -345,6 +395,13 @@
<el-col style="text-align:center" :span="6">{{freeMsg.price4_b2c}}</el-col>
</el-row>
</div>
<div class="f14" style="padding:20px">
<el-row style="margin-bottom:7px" >
<el-col :span="6">优惠金额</el-col>
<el-col :span="12"><div class="dashDiv"></div></el-col>
<el-col style="text-align:center" :span="6">{{SettlementPrice == 0 ? 0 : freeMsg.MySelfTotalPrice - SettlementPrice}}</el-col>
</el-row>
</div>
</div>
......@@ -352,6 +409,7 @@
</div>
</div>
</div>
<a :href='blankUrl' id='blankLink' target="_blank" style="display:none">1</a>
</div>
</template>
<script>
......@@ -367,7 +425,15 @@ export default {
freeMsg:{
custom:[],
},
UserCanUseCouponList: [],
CouponList: [],
CouponIds: '',
Verification: '',
blankUrl: '',
ActivateCode: '',
SettlementPrice: 0,
booking_field:{},
markMsg:{
contact:false,
......@@ -428,6 +494,8 @@ export default {
this.freeMsg.custom=[];
this.freeMsg.pay={};
this.freeMsg.buyer_tel_country_code="86";
this.freeMsg.OrderSource=2;
this.freeMsg.OrderForm=1;
// this.freeMsg.buyer_tel_number="13183813102";
......@@ -447,11 +515,135 @@ export default {
};
this.getDetails(id)
this.GetInfo();
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
this.getUserCanUseCouponList()
},
mounted() {
},
methods: {
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
if (item.overlapUse === 1) { // 1允许叠加使用
this.CouponList.forEach(x=>{
if (x.overlapUse === 1 && x.couponsType === item.couponsType) { // 优惠券列表筛选出允许叠加并且type相同的
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
} else { // 不允许叠加使用
this.CouponList.forEach(x=>{ // 筛选掉其他
if (x.id === item.id) {
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
}
} else {
item.active = !item.active
if (this.UserCanUseCouponList.length===1) { // 取消优惠券选中状态 之前直选择了一个优惠券
this.UserCanUseCouponList = this.CouponList
} else { //... 之前选择了多个优惠券 循环判断是否已全部取消
let num = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active)
num +=1
})
if (num===0) {
this.CouponList.forEach(x=>{
x.active = false
})
this.UserCanUseCouponList = this.CouponList
}
}
}
if (this.UserCanUseCouponList.length>0) {
let CouponIds = ''
let CouponMoney = 0
let CouponSale = 1
let type = 0
this.UserCanUseCouponList.forEach((x, index)=>{
if (x.active) {
type = x.couponsType
CouponIds = CouponIds + x.id + (index!==this.UserCanUseCouponList.length-1 ? ',' : '')
if (x.couponsType === 1) {
CouponMoney = CouponMoney + x.denomination
} else {
CouponSale = CouponSale * (x.denomination/10)
}
}
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = this.freeMsg.MySelfTotalPrice - CouponMoney
} else if (type === 2) {
this.SettlementPrice = this.freeMsg.MySelfTotalPrice * CouponSale
} else if (type === 0) {
this.SettlementPrice = this.freeMsg.MySelfTotalPrice
}
} else {
this.SettlementPrice = this.freeMsg.MySelfTotalPrice
}
// 计算幸福存折
// this.SettlementPrice = this.SettlementPrice - this.RedEnvelopeMoney
},
getUserCanUseCouponList: function () {
let msg = {
lineId: 0,
lineteamId: 0,
CouponsUseScope: 7,
}
this.apiJavaPost('/api/b2b/user/getUserCanUseCouponList',msg,res=>{
if(res.data.resultCode==1){
let data = res.data.data;
data.forEach(x=>{
x.active = false
})
this.CouponList = data
this.filterCoupon()
}else{
this.Error(res.data.message);
}
this.dataLoading = false;
},null)
},
filterCoupon: function () {
let list = []
this.CouponList.forEach(x=>{
if (this.freeMsg.MySelfTotalPrice>x.useCondition) {
x.active = false
list.push(x)
}
})
this.UserCanUseCouponList = list
},
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
rePlace(str){
if(str.indexOf('KKday')!=-1){
return str.replace('KKday', '印象之旅');
......@@ -621,8 +813,10 @@ export default {
// console.log("可以下单")
// return;
this.BtnLoading=true;
this.apipost('dmc_post_Get_KKDayOrderBooking',this.freeMsg,res=>{
this.freeMsg.DiscountMoney = this.SettlementPrice == 0 ? 0 : this.freeMsg.MySelfTotalPrice - this.SettlementPrice;
this.freeMsg.CouponAllotIds = this.CouponIds;
this.freeMsg.CustomerPayMoney = this.SettlementPrice < 0 ? 0 : this.SettlementPrice;
this.apipost('dmc_post_Get_KKDayOrderBooking', this.freeMsg,res=>{
this.BtnLoading=false;
if(res.data.data&&res.data.data.orderId) {
......@@ -979,4 +1173,123 @@ export default {
float: left;
}
._coupon_box{
display: flex;
flex-wrap: wrap;
}
.OrderCon ._coupon_box ._coupon_item{
width: 224px;
padding: 12px 20px 12px 25px;
margin:0 26px 20px 0;
position: relative;
background-color: #F1BC69;
cursor: pointer;
}
._coupon_box ._coupon_item ._coupon_info p{
color: #FFFFFF;
}
._coupon_box ._coupon_item:hover{
background-color: #D9A24D;
}
._coupon_box ._coupon_item.blue{
background-color: #8794E2;
}
._coupon_box ._coupon_item.blue:hover{
background-color: #6776D2;
}
._coupon_box ._coupon_item.blue ._time{
color: #4C58A4 !important;
}
._coupon_box ._coupon_item._active{
background-color: #D9A24D;
}
._coupon_box ._coupon_item.blue._active{
background-color: #6776D2;
}
._coupon_box ._coupon_item.disab,._coupon_box ._coupon_item.blue.disab ._repeat,._coupon_box ._coupon_item.blue.disab ._info_time{
background-color: #C3C3C3 !important;
color: #777777 !important
}
._coupon_box ._coupon_item ._time{
color: #A7711C !important;
}
._coupon_box ._coupon_item ._left_raduis span{
display: inline-block;
width: 8px;
height: 8px;
margin: 2px 3px;
border-radius: 50%;
background-color: white;
}
._left_raduis{
width: 15px;
position: absolute;
left: -7px;
top: 0;
}
._coupon_box ._coupon_item ._coupon_info p{
font-size: 16px !important;
margin: 0
}
.OrderCon ._coupon_box ._coupon_item ._coupon_info p._coupon_name{
font-size: 14px !important;
margin-bottom: 10px;
max-width: 190px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
._coupon_box ._coupon_item ._coupon_info p span._sale{
font-size: 24px;
}
.OrderCon ._coupon_box ._coupon_item ._coupon_info p._repeat{
padding: 0 5px;
color: #7C6F01;
position: absolute;
top: 0px;
right: 0px;
background-color: #FFE71B;
font-size: 12px !important;
}
._coupon_box ._coupon_item ._coupon_info ._info_full {
color: #FFFFFF;
font-size: 12px;
padding: 5px 0;
}
._coupon_box ._coupon_item ._coupon_info ._info_time {
font-size: 12px !important;
}
._choice_box{
height: 19px;
position: absolute;
right: 20px;
bottom: 14px;
}
._choice_box span{
width: 16px;
height: 16px;
border-radius: 50%;
line-height: 16px;
text-align: center;
background-color: white;
display: inline-block;
font-size: 12px !important;
}
.icon-xuanzhong2{
color: #31AA21;
}
._no_coupon{
width: 100%;
margin: 0 !important;
color: gray !important;
}
._trip_xiangqing_tips{
color: red !important;
font-size: 14px !important;
}
._trip_xiangqing_tips span{
color: #3965B0;
cursor: pointer;
}
</style>
......@@ -53,7 +53,13 @@
<el-col style="text-align:center" :span="6">{{oldModel.OldContent.price2_b2c}}</el-col>
</el-row>
</div>
<div class="f14" >
<el-row style="margin-bottom:7px">
<el-col :span="6">优惠金额</el-col>
<el-col :span="12"><div class="dashDiv"></div></el-col>
<el-col style="text-align:center" :span="6">{{oldModel.DiscountMoney}}</el-col>
</el-row>
</div>
</ul>
</div>
......@@ -101,7 +107,7 @@
</li>
<div class="btnDiv">
<span @click="Exit" v-if="IsCanOrder==0" style="border:1px solid #EE4454;color:#EE4454">取消订单</span>
<span @click="Pay" v-if="oldModel.Income!=oldModel.TotalPrice" style="background:#EE4454;color:#fff">立即付款</span>
<span @click="Pay" v-if="oldModel.Income!=oldModel.TotalPrice && oldModel.CustomerPayMoney > 0" style="background:#EE4454;color:#fff">立即付款</span>
</div>
</ul>
......@@ -200,7 +206,7 @@ export default {
defaultImg: 'this.src="' + require('assets/img/juan/error.png') + '"',
dialogFormVisible:false,
exitMsg:{
order_no:'',
orderId:'',
cancel_type:"",
cancel_desc:"",
CancelBy:'',
......@@ -239,7 +245,7 @@ export default {
let payInfoGo=this.payInfoGo;
msg.CancelTime=payInfoGo.CancelTime;
msg.OrderSource=15;
msg.total_fee=data.TotalPrice;
msg.total_fee=data.CustomerPayMoney;
msg.body=payInfoGo.Describe;
msg.orderId=data.OrderID;
msg.costType=payInfoGo.costType;
......@@ -277,8 +283,8 @@ export default {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit('queryDays')
this. exitMsg={
order_no:'',
this.exitMsg={
orderId:'',
cancel_type:"",
cancel_desc:"",
CancelBy:'',
......
<style>
@import '../../assets/css/common.css';
.HotelSure{
width:1200px;
margin:20px auto;
......@@ -234,9 +235,9 @@
}
.HS_RitTop{
width:348px;
height:72px;
/* height:72px; */
background-color: #EDF4FF;
padding:0 20px;
padding:10px 20px;
position: relative;
}
.HS_RitTop_Left{
......@@ -334,11 +335,16 @@
.HotelSure .HS_div3 .el-textarea__inner{
border-radius: 0;
}
.HS_div4{
box-sizing: border-box;
margin-top: 20px;
border: 1px solid #E0E0E0;
}
</style>
<template>
<div class="HotelSure">
<div class="HotelSure commonF">
<div class="HS_LeftInfo">
<div class="HS_div1">
<!-- <div class="HS_divFirst Hs_OneType">
......@@ -540,6 +546,49 @@
</div>
</div>
</div>
<div class="HS_div4">
<div class="HS_bookTitle" style="margin-bottom:20px;box-sizing: border-box;">
优惠信息
</div>
<div style="background:#fff;padding:20px">
<p class="pfR" style="margin-bottom:10px">兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
</div>
<!-- 优惠券 -->
<div class="Yhq">
<p class="pfR" style="color:#000000;padding-left:20px">优惠券使用</p>
<ul class="yhqUl">
<p v-if="!Verification.length || Verification[0].ApplyState !== 1" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<li v-for="(item,index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)" :key="index+5000" class="sawtooth">
<span class="kdj">
<span v-if="item.overlapUse==1">可叠加</span>
<span v-else>不可叠加</span>
</span>
<p style="margin-top:10px">
<span v-if="item.couponsType==1"><span>{{item.denomination}}</span></span>
<span v-else>{{item.denomination}}折</span>
</p>
<p style="font-size:14px">满{{item.useCondition}}使用</p>
<p style="font-size:12px;color:#4C58A4;margin-top:6px">
有效期:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}
</p>
<div @click="clickCoupon(item)" class="_choice_box">
<span v-if="!item.active"></span>
<span v-else class="iconfont icon-xuanzhong2"></span>
</div>
</li>
<div v-if="UserCanUseCouponList.length==0" class="_no_coupon">
<p>暂无可用优惠券</p>
</div>
</ul>
</div>
</div>
<input type="button" class="HD_payBtn" :class="{'disBtn':isBaoChild}" @click="submitForm('sureMsg')" value="下单" />
</div>
<div class="HS_RightList">
......@@ -603,11 +652,14 @@
</ul>
</div>
<div class="HS_RightBtm">
<div class="HS_RitTop">
<div class="HS_RitTop basefix">
<div style="float:left;margin-top:25px;">订单总额</div>
<div style="margin-top:10px;float:right">
<div class="sureMsgTotalMon"><span>人民币:</span>{{sureMsg.totalChargeableRateInfo}}</div>
<div class="sureMsgTotalMon"><span>日元:</span>{{sureMsg.totalPriceJapanese}}</div>
<div class="sureMsgTotalMon"><span>人民币:</span>{{sureMsg.totalChargeableRateInfo}}</div>
<div class="sureMsgTotalMon"><span>优惠:</span>{{sureMsg.DiscountMoney}}</div>
<div class="sureMsgTotalMon"><span>实付款:</span>{{SettlementPrice}}</div>
</div>
<!-- <span class="HS_RitTop_Left">订单总额</span>
<span class="HS_RitPrice">
......@@ -672,7 +724,13 @@ export default {
HotelName:'',
HotelPic:'',
EmployeeIdStr:'',
OldTotalPrice:0
OldTotalPrice:0,
CustomerPayMoney:0,
DiscountMoney:0,
OrderSource:2,
OrderForm:1,
},
//验证规则
rules: {
......@@ -774,6 +832,15 @@ export default {
//选了的儿童数
chekedChildCount:0,
isBaoChild:false,
CouponList:[],
UserCanUseCouponList:[],
CouponIds: '',
SettlementPrice:0,
ActivateCode:'',
price:0,
Verification:'',
};
},
mounted() {
......@@ -804,9 +871,147 @@ export default {
}
this.getWeek();
this.getBookInfo();
}
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
},
methods: {
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
if(item.denomination>this.SettlementPrice){
this.Error("该优惠券不满足使用条件!")
return;
}
if (item.overlapUse === 1) { // 1允许叠加使用
this.CouponList.forEach(x=>{
if (x.overlapUse === 1 && x.couponsType === item.couponsType) { // 优惠券列表筛选出允许叠加并且type相同的
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
} else { // 不允许叠加使用
this.CouponList.forEach(x=>{ // 筛选掉其他
if (x.id === item.id) {
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
}
} else {
item.active = !item.active
if (this.UserCanUseCouponList.length===1) { // 取消优惠券选中状态 之前直选择了一个优惠券
this.UserCanUseCouponList = this.CouponList
} else { //... 之前选择了多个优惠券 循环判断是否已全部取消
let num = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active)
num +=1
})
if (num===0) {
this.CouponList.forEach(x=>{
x.active = false
})
this.UserCanUseCouponList = this.CouponList
}
}
}
if (this.UserCanUseCouponList.length>0) {
let CouponIds = ''
let CouponMoney = 0
let CouponSale = 1
let type = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active) {
type = x.couponsType
CouponIds = CouponIds + x.id + ','
if (x.couponsType === 1) {
CouponMoney = CouponMoney + x.denomination
} else {
CouponSale = CouponSale * (x.denomination/10)
}
}
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = this.price - CouponMoney
} else if (type === 2) {
this.SettlementPrice = this.price * CouponSale
} else if (type === 0) {
this.SettlementPrice = this.price
}
} else {
this.SettlementPrice = this.price
}
// this.SettlementPrice=parseInt(this.SettlementPrice).toFixed(2);
let allmonney=this.price - this.SettlementPrice;
this.sureMsg.DiscountMoney = (this.price - this.SettlementPrice).toFixed(2);
this.CouponIds=this.CouponIds.substring(0,this.CouponIds.length-1)
this.sureMsg.CouponAllotIds=this.CouponIds;
},
filterCoupon() {
let list = []
this.CouponList.forEach(x=>{
if (this.price>x.useCondition) {
x.active = false
list.push(x);
}
})
this.UserCanUseCouponList = list;
},
// 获取优惠券
getUserCanUseCouponList(){
let msg={
lineId:0,
lineteamId:0,
CouponsUseScope:10,
};
this.apiJavaPost("/api/b2b/user/getUserCanUseCouponList",msg,
res => {
if(res.data.resultCode==1){
this.CouponList=res.data.data;
this.CouponList.forEach(item=>{
item.active=false;
})
this.filterCoupon();
}
},
null
);
},
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
//获取房型
getGradeType(type){
let gradeType=''
......@@ -909,11 +1114,15 @@ export default {
this.sureMsg.OldTotalPrice+=parseFloat(oldAount+childAount);
AdultJapanCount+=AdultJapanPrice*x.roomAdultCount;
childJapanCount+=ChildJapanPrice*x.roomChildCount;
this.SettlementPrice=this.sureMsg.totalChargeableRateInfo;
this.SettlementPrice=this.sureMsg.totalChargeableRateInfo;
this.price=this.sureMsg.totalChargeableRateInfo;
// AdultJapanCount+=AdultJapanPrice;
// childJapanCount+=ChildJapanPrice;
this.sureMsg.totalPriceJapanese += parseFloat(AdultJapanCount+childJapanCount);
this.getUserCanUseCouponList();
})
} else {
......@@ -981,6 +1190,8 @@ export default {
},
//提交
submitForm(addMsg) {
// console.log("this.sureMsg",this.sureMsg)
// return;
//提交创建、修改表单
if(!this.isBaoChild){
this.$refs[addMsg].validate(valid => {
......@@ -994,6 +1205,7 @@ export default {
},
//点击下单
BuyHoTel(){
if(sessionStorage.getItem('OpenB2BCode')==null && !localStorage.userInfo){
return this.Error('请登录!')
}
......@@ -1055,7 +1267,7 @@ export default {
costType:res.data.data.costType,
orderId:res.data.data.orderId,
bookingNumber:res.data.data.parmResult.bookingNumber,
bookMoney:this.sureMsg.totalChargeableRateInfo,
bookMoney:this.SettlementPrice,
CancelTime:res.data.data.CancelTime,
hotelName:res.data.data.parmResult.hotelName,
totalPnumber:num
......
......@@ -263,23 +263,20 @@ export default {
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = this.price - CouponMoney
this.SettlementPrice = Math.round((this.price - CouponMoney) * 100) / 100
} else if (type === 2) {
this.SettlementPrice = this.price * CouponSale
this.SettlementPrice = Math.round((this.price * CouponSale) * 100) / 100
} else if (type === 0) {
this.SettlementPrice = this.price
this.SettlementPrice = Math.round(this.price * 100) / 100
}
} else {
this.SettlementPrice = this.price
this.SettlementPrice = Math.round(this.price * 100) / 100
}
// this.SettlementPrice=parseInt(this.SettlementPrice).toFixed(2);
let allmonney=this.price - this.SettlementPrice;
// let allmonney=this.price - this.SettlementPrice;
this.form.discountMoney = (this.price - this.SettlementPrice).toFixed(2);
this.CouponIds=this.CouponIds.substring(0,this.CouponIds.length-1)
this.form.couponAllotIds=this.CouponIds;
},
filterCoupon() {
......@@ -293,7 +290,7 @@ export default {
this.UserCanUseCouponList = list
},
SaveOrder(formName){
this.form.preferPrice=this.SettlementPrice;
this.form.preferPrice=this.price;
if(this.form.useDate==""){
this.Error("请选择使用日期!")
return;
......
......@@ -17,6 +17,128 @@
.otherdate .month_circle{
cursor: pointer;
}
._coupon_box{
display: flex;
flex-wrap: wrap;
}
.LocalCuisine ._coupon_box ._coupon_item{
width: 224px;
padding: 12px 20px 12px 25px;
margin:0 26px 20px 0;
position: relative;
background-color: #F1BC69;
cursor: pointer;
}
._coupon_box ._coupon_item ._coupon_info p{
color: #FFFFFF;
}
._coupon_box ._coupon_item:hover{
background-color: #D9A24D;
}
._coupon_box ._coupon_item.blue{
background-color: #8794E2;
}
._coupon_box ._coupon_item.blue:hover{
background-color: #6776D2;
}
._coupon_box ._coupon_item.blue ._time{
color: #4C58A4 !important;
}
._coupon_box ._coupon_item._active{
background-color: #D9A24D;
}
._coupon_box ._coupon_item.blue._active{
background-color: #6776D2;
}
._coupon_box ._coupon_item.disab,._coupon_box ._coupon_item.blue.disab ._repeat,._coupon_box ._coupon_item.blue.disab ._info_time{
background-color: #C3C3C3 !important;
color: #777777 !important
}
._coupon_box ._coupon_item ._time{
color: #A7711C !important;
}
._coupon_box ._coupon_item ._left_raduis span{
display: inline-block;
width: 8px;
height: 8px;
margin: 2px 3px;
border-radius: 50%;
background-color: white;
}
._left_raduis{
width: 15px;
position: absolute;
left: -7px;
top: 0;
}
._coupon_box ._coupon_item ._coupon_info p{
font-size: 16px !important;
margin: 0
}
.LocalCuisine ._coupon_box ._coupon_item ._coupon_info p._coupon_name{
font-size: 14px !important;
margin-bottom: 10px;
max-width: 190px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
._coupon_box ._coupon_item ._coupon_info p span._sale{
font-size: 24px;
}
.LocalCuisine ._coupon_box ._coupon_item ._coupon_info p._repeat{
padding: 0 5px;
color: #7C6F01;
position: absolute;
top: 0px;
right: 0px;
background-color: #FFE71B;
font-size: 12px !important;
}
._coupon_box ._coupon_item ._coupon_info ._info_full {
color: #FFFFFF;
font-size: 12px;
padding: 5px 0;
}
._coupon_box ._coupon_item ._coupon_info ._info_time {
font-size: 12px !important;
}
._choice_box{
height: 19px;
position: absolute;
right: 20px;
bottom: 14px;
}
._choice_box span{
width: 16px;
height: 16px;
border-radius: 50%;
line-height: 16px;
text-align: center;
background-color: white;
display: inline-block;
font-size: 12px !important;
}
.icon-xuanzhong2{
color: #31AA21;
}
._no_coupon{
width: 100%;
margin: 0 !important;
color: gray !important;
}
._trip_xiangqing_tips{
color: red !important;
font-size: 14px !important;
}
._trip_xiangqing_tips span{
color: #3965B0;
cursor: pointer;
}
.LocalCuisine .commomStyle{
padding: 15px 0;
}
</style>
<template>
......@@ -63,6 +185,7 @@
<el-row class="ydDiv">
<el-form label-width="80px">
<el-col :span="18">
<el-row>
<el-form-item style="position:relative;" label="使用日期">
<el-popover v-model="tcPopover" popper-class="calendarPopover"
placement="bottom" @show="Click"
......@@ -94,12 +217,72 @@
<el-form-item label="儿童">
<el-input-number v-model="msg.childNum" size="mini" :min="0" :max="10" label="描述文字"></el-input-number>
</el-form-item>
</el-row>
<el-row>
<div class="commomStyle">
<div class="titleDiv">
<span class="redSpan"></span>
<span class="f18 pfR">优惠</span>
</div>
<div style="padding:20px">
<p style="margin:0 0 10px 0;">兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
<el-row class="_trip_xiangqing _coupon_box">
<p style="width:100%;margin:10px 0;">优惠券</p>
<p v-if="!Verification.length || Verification[0].ApplyState !== 1" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<div v-if="UserCanUseCouponList.length>0" class="_coupon_box">
<div class="_coupon_item" v-for="(item, index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)">
<div class="_left_raduis">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="_coupon_info">
<p class="_coupon_name" :title="item.couponName">{{item.couponName}}</p>
<p v-if="item.couponsType===1"><span class="_sale">{{item.denomination}}</span></p>
<p v-else><span class="_sale">{{item.denomination}}</span></p>
<p class="_info_full">{{item.useCondition}}可用</p>
<p class="_info_time _time">有效时间:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}</p>
<p class="_repeat" v-if="item.overlapUse === 1">可叠加</p>
<div class="_choice_box">
<span v-if="!item.active"></span>
<span v-else class="iconfont icon-xuanzhong2"></span>
</div>
</div>
</div>
</div>
<div v-else class="_no_coupon">
<p>暂无可用优惠券</p>
</div>
</el-row>
</div>
</div>
</el-row>
</el-col>
<el-col :span="6" style="padding-right:20px;text-align:right">
<p>
<span CLASS="f12" style="color:#999999">价格:</span>
<span class="f12">
<span class="pfR" style="color:#FF0101;font-size:28px;">{{SignelPrice * (msg.adultNum + msg.childNum)}}</span>
<span style="color:#FF0101;"></span></span>
</p>
<p>
<span CLASS="f12" style="color:#999999">优惠:</span>
<span class="f12">
<span class="pfR" style="color:#FF0101;">{{SettlementPrice}}</span>
</span>
</p>
<el-button @click="YD" :loading="Btnload" style="background:#EE4454;color:#fff;border-radius:0;border:none;margin-left:30px">立即预定</el-button>
</el-col>
......@@ -168,6 +351,7 @@
</div>
</div>
</div>
<a :href='blankUrl' id='blankLink' target="_blank" style="display:none">1</a>
</div>
</template>
<script>
......@@ -179,6 +363,13 @@ export default {
},
data(){
return{
UserCanUseCouponList: [],
CouponList: [],
CouponIds: '',
Verification: '',
blankUrl: '',
ActivateCode: '',
SettlementPrice: 0,
activeName:'first',
startDate:"",
idDes:"",
......@@ -214,6 +405,14 @@ export default {
if(localStorage.LikeList){
this.LikeList=JSON.parse(localStorage.LikeList);
}
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
},
......@@ -221,6 +420,121 @@ export default {
this.GetIds();
},
methods:{
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
filterCoupon: function () {
let list = []
this.CouponList.forEach(x=>{
if (this.SignelPrice > x.useCondition) {
x.active = false
list.push(x)
}
})
this.UserCanUseCouponList = list
},
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
if (item.overlapUse === 1) { // 1允许叠加使用
this.CouponList.forEach(x=>{
if (x.overlapUse === 1 && x.couponsType === item.couponsType) { // 优惠券列表筛选出允许叠加并且type相同的
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
} else { // 不允许叠加使用
this.CouponList.forEach(x=>{ // 筛选掉其他
if (x.id === item.id) {
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
}
} else {
item.active = !item.active
if (this.UserCanUseCouponList.length===1) { // 取消优惠券选中状态 之前直选择了一个优惠券
this.UserCanUseCouponList = this.CouponList
} else { //... 之前选择了多个优惠券 循环判断是否已全部取消
let num = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active)
num +=1
})
if (num===0) {
this.CouponList.forEach(x=>{
x.active = false
})
this.UserCanUseCouponList = this.CouponList
}
}
}
if (this.UserCanUseCouponList.length>0) {
let CouponIds = ''
let CouponMoney = 0
let CouponSale = 1
let type = 0
this.UserCanUseCouponList.forEach((x, index)=>{
if (x.active) {
type = x.couponsType
CouponIds = CouponIds + x.id + (index!==this.UserCanUseCouponList.length-1 ? ',' : '')
if (x.couponsType === 1) {
CouponMoney = CouponMoney + x.denomination
} else {
CouponSale = CouponSale * (x.denomination/10)
}
}
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = CouponMoney
} else if (type === 2) {
this.SettlementPrice = (this.SignelPrice * (this.msg.adultNum + this.msg.childNum)) - (this.SignelPrice * (this.msg.adultNum + this.msg.childNum)) * CouponSale
} else if (type === 0) {
this.SettlementPrice = 0
}
} else {
this.SettlementPrice = 0
}
// 计算幸福存折
// this.SettlementPrice = this.SettlementPrice - this.RedEnvelopeMoney
},
getUserCanUseCouponList: function () {
let msg = {
lineId: 0,
lineteamId: 0,
CouponsUseScope: 11,
}
this.apiJavaPost('/api/b2b/user/getUserCanUseCouponList',msg,res=>{
if(res.data.resultCode==1){
let data = res.data.data;
data.forEach(x=>{
x.active = false
})
this.CouponList = data
this.filterCoupon()
}else{
this.Error(res.data.message);
}
this.dataLoading = false;
},null)
},
YD(){
if(this.SignelPrice==0){
this.Error("请选择时间!");
......@@ -232,6 +546,8 @@ export default {
}
this.msg.preferPrice=this.SignelPrice * (this.msg.adultNum + this.msg.childNum);
this.Btnload=true;
this.msg.couponAllotIds = this.CouponIds;
this.msg.discountMoney = this.SettlementPrice;
this.apiJavaPost('/api/b2b/food/setFoodOrder',this.msg,res=>{
this.Btnload=false;
if(res.data.resultCode==1){
......@@ -278,6 +594,7 @@ export default {
this.msg.priceId=item.priceId;
this.selectDay=item.date_str;
this.tcPopover=false;
this.getUserCanUseCouponList()
},
ChangeDateList(){
let list=[];
......@@ -379,6 +696,7 @@ export default {
this.calendarTit = dateList;
this.$nextTick(() => {
this.$refs.child[0].getYearMonthDay(this.classArray);
});
},
LiHover(item,index){
......
......@@ -206,22 +206,73 @@
<el-form-item label="邮箱" prop="ContactEmail" :rules="[{ required: true, message: '请输入邮箱地址', trigger: 'blur' },{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]">
<el-input size="small" v-model="personNum.ContactEmail"></el-input>
</el-form-item>
<el-form-item style="width:99%" label="备注">
<el-input size="small" v-model="personNum.Remarks"></el-input>
<el-form-item style="width:450px" label="备注">
<el-input size="small" type="textarea" v-model="personNum.Remarks"></el-input>
</el-form-item>
</el-form>
</div>
<div v-show="!personnums" style="border:1px solid #E0E0E0">
<div style="background:#fff;padding:20px">
<p class="pfR" style="margin-bottom:10px">兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
</div>
<!-- 优惠券 -->
<div class="Yhq">
<p class="pfR" style="color:#000000;padding-left:20px">优惠券使用</p>
<ul class="yhqUl">
<p v-if="!Verification.length || Verification[0].ApplyState !== 1" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<li v-for="(item,index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)" :key="index+5000" class="sawtooth">
<span class="kdj">
<span v-if="item.overlapUse==1">可叠加</span>
<span v-else>不可叠加</span>
</span>
<p style="margin-top:10px">
<span v-if="item.couponsType==1"><span>{{item.denomination}}</span></span>
<span v-else>{{item.denomination}}</span>
</p>
<p style="font-size:14px">{{item.useCondition}}使用</p>
<p style="font-size:12px;color:#4C58A4;margin-top:6px">
有效期:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}
</p>
<div @click="clickCoupon(item)" class="_choice_box">
<span v-if="!item.active"></span>
<span v-else class="iconfont icon-xuanzhong2"></span>
</div>
</li>
<div v-if="UserCanUseCouponList.length==0" class="_no_coupon">
<p>暂无可用优惠券</p>
</div>
</ul>
</div>
</div>
</el-row>
<!-- 提交订单 -->
<div class='tjorder' v-show="!personnums">
<div style="width:80%;margin:0 auto;color:#cccccc;position:relative">
<p style="font-size:14px;padding:4px 50px;text-align:right;">条款和限制<span style="color:#49C0A1">《网上购票须知》</span> </p>
<p class="total" style="margin-top:12px">
<p style="font-size:14px;text-align:right;">条款和限制<span style="color:#49C0A1">《网上购票须知》</span> </p>
<p>
<span>总价</span>
<span style="font-size:20px;font-weight:400;color:rgba(255,255,255,1);margin:0 15px;">{{personNum.PreferPrice| priceFormat}}</span>
<span :loading="submitLoad" @click="submitForm('personNum')" style="cursor: pointer;;height:32px;background:rgba(238,68,84,1);border-radius:4px;color:#fff;padding:4px 15px">同意以上协议条款,提交订单</span>
</p>
<p>
<span>优惠券</span>
<span style="font-size:20px;font-weight:400;color:rgba(255,255,255,1);margin:0 15px;">{{personNum.DiscountMoney}}</span>
</p>
<p>
<span>实付款</span>
<span style="font-size:20px;font-weight:400;color:rgba(255,255,255,1);margin:0 15px;">{{SettlementPrice}}</span>
</p>
<p class="total" style="margin-top:12px">
<span :loading="submitLoad" @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>
......@@ -252,6 +303,11 @@ export default {
EnterID:0,
OrderForm:1,
OrderSource:2,
CustomerPayMoney:0,
DiscountMoney:0,
},
AirTicketId:this.$route.params.id,
ruleForm:{},
......@@ -261,14 +317,163 @@ export default {
customer:{},
countroylist:[],
SellInfoList:[],
price:0,
CouponList:[],
UserCanUseCouponList:[],
CouponIds: '',
SettlementPrice:0,
ActivateCode:'',
Verification:'',
}
},
created(){
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
},
mounted () {
this.GetDes();
this.GetCountroy()
this.SellInfo();
this.getUserCanUseCouponList();
},
methods: {
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
if(item.denomination>this.SettlementPrice){
this.Error("该优惠券不满足使用条件!")
return;
}
if (item.overlapUse === 1) { // 1允许叠加使用
this.CouponList.forEach(x=>{
if (x.overlapUse === 1 && x.couponsType === item.couponsType) { // 优惠券列表筛选出允许叠加并且type相同的
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
} else { // 不允许叠加使用
this.CouponList.forEach(x=>{ // 筛选掉其他
if (x.id === item.id) {
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
}
} else {
item.active = !item.active
if (this.UserCanUseCouponList.length===1) { // 取消优惠券选中状态 之前直选择了一个优惠券
this.UserCanUseCouponList = this.CouponList
} else { //... 之前选择了多个优惠券 循环判断是否已全部取消
let num = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active)
num +=1
})
if (num===0) {
this.CouponList.forEach(x=>{
x.active = false
})
this.UserCanUseCouponList = this.CouponList
}
}
}
if (this.UserCanUseCouponList.length>0) {
let CouponIds = ''
let CouponMoney = 0
let CouponSale = 1
let type = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active) {
type = x.couponsType
CouponIds = CouponIds + x.id + ','
if (x.couponsType === 1) {
CouponMoney = CouponMoney + x.denomination
} else {
CouponSale = CouponSale * (x.denomination/10)
}
}
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = this.price - CouponMoney
} else if (type === 2) {
this.SettlementPrice = this.price * CouponSale
} else if (type === 0) {
this.SettlementPrice = this.price
}
} else {
this.SettlementPrice = this.price
}
// this.SettlementPrice=parseInt(this.SettlementPrice).toFixed(2);
let allmonney=this.price - this.SettlementPrice;
this.personNum.DiscountMoney = (this.price - this.SettlementPrice).toFixed(2);
this.CouponIds=this.CouponIds.substring(0,this.CouponIds.length-1)
this.personNum.CouponAllotIds=this.CouponIds;
},
filterCoupon() {
let list = [];
this.CouponList.forEach(x=>{
if (this.price>x.useCondition) {
x.active = false
list.push(x);
}
})
this.UserCanUseCouponList = list;
},
// 获取优惠券
getUserCanUseCouponList(){
let msg={
lineId:0,
lineteamId:0,
CouponsUseScope:4,
};
this.apiJavaPost("/api/b2b/user/getUserCanUseCouponList",msg,
res => {
if(res.data.resultCode==1){
this.CouponList=res.data.data;
this.CouponList.forEach(item=>{
item.active=false;
})
this.filterCoupon();
}
},
null
);
},
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
PersonNumChange(){
if(this.personNum.ManNum+this.personNum.ChirdNum+this.personNum.OldPeopleNum>this.getlistSigel.residue){
this.Error("票数不够!");
......@@ -333,6 +538,10 @@ export default {
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.SettlementPrice=this.personNum.PreferPrice;
this.price=this.personNum.PreferPrice;
this.filterCoupon();
this.personNum.GuestList=[];
// 成年
for(let i=0;i<this.personNum.ManNum;i++){
......@@ -411,7 +620,7 @@ export default {
}
this.personnums=false;
},
submitForm(addMsg) {
submitForm() {
let status1=false;
let status2=false;
this.$refs.personNumList.validate((valid) => {
......@@ -502,6 +711,9 @@ export default {
}
</script>
<style>
.FillItinerary .el-textarea__inner{
border-radius: 0px;
}
.FillItinerary .el-input__inner{
border-radius: 0px;
}
......@@ -595,16 +807,13 @@ export default {
}
.tjorder p{
margin: 0;
text-align: right;
}
.total{
position: absolute;
right: 0;
}
.tjorder{
height:80px;
background:rgba(51,51,51,1);
margin: 20px 0;
padding:10px 0;
}
.lxr_info .el-form-item{
display: inline-block;
......
......@@ -23,7 +23,7 @@
<div style="text-align:center;float:right">
<span style="font-weight:200">应付金额</span>
<span style="color:#FF680B;font-size:18px">{{Commoditydetails.preferPrice | priceFormat}}</span>
<span style="color:#FF680B;font-size:18px">{{Commoditydetails.customerPayMoney | priceFormat}}</span>
</div>
</div>
......@@ -38,7 +38,7 @@
<div class="triangle_border_left"></div>
</div>
<p style="text-align:center;font-size:18px">支付金额
<span style="color:#FF680B;font-size:20px;font-weight:700">{{Commoditydetails.preferPrice | priceFormat}}</span>
<span style="color:#FF680B;font-size:20px;font-weight:700">{{Commoditydetails.customerPayMoney | priceFormat}}</span>
</p>
<el-row style="margin-top:15px" v-loading="codeLoading">
<el-col class="position" style="padding-right:50px" :span="12">
......@@ -110,7 +110,7 @@
</div>
<div class="div_2">
<p>
<span>支付金额:¥{{Commoditydetails.preferPrice | priceFormat}}</span>
<span>支付金额:¥{{Commoditydetails.customerPayMoney | priceFormat}}</span>
<!-- <span>支付平台:支付宝</span> -->
</p>
<p>
......@@ -172,8 +172,9 @@ export default {
let Visainfo=JSON.parse(sessionStorage.Visainfo);
this.Commoditydetails=Visainfo;
this.Commoditydetails.airOrderId=Visainfo.AirOrderId;
this.Commoditydetails.customerPayMoney = Visainfo.customerPayMoney;
this.code.OrderSource=Visainfo.orderResourceId;
this.code.total_fee=Visainfo.preferPrice+'';
this.code.total_fee=Visainfo.customerPayMoney+'';
this.code.body=Visainfo.description;
this.code.attach=`${Visainfo.costType}|${Visainfo.customerName}|${Visainfo.AirOrderId}|${Visainfo.customerId}|${Visainfo.outBranchId}`
}else{
......@@ -194,8 +195,9 @@ export default {
res => {
if (res.data.resultCode == 1) {
this.Commoditydetails = res.data.data;
console.log("this.Commoditydetails",this.Commoditydetails)
this.code.OrderSource=this.Commoditydetails.orderResourceId;
this.code.total_fee=this.Commoditydetails.preferPrice+'';
this.code.total_fee=this.Commoditydetails.customerPayMoney+'';
this.code.body=this.Commoditydetails.description;
this.code.attach=`${this.Commoditydetails.costType}|${this.Commoditydetails.customerName}|${this.AirOrderId}|${this.Commoditydetails.customerId}|${this.Commoditydetails.outBranchId}`
// this.Time15();
......
......@@ -24,7 +24,7 @@
<el-dropdown-item @click.native="dropdownText = '定制游'">定制游</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '签证', msg.couponsUseScope = 3, getList(), resetPageIndex()">签证</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '机票', msg.couponsUseScope = 4, getList(), resetPageIndex()">机票</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '酒店'">酒店</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '酒店', msg.couponsUseScope = 10, getList(), resetPageIndex()">酒店</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
......
......@@ -60,12 +60,15 @@
</td>
<td class="money">
<p>总额 ¥{{item.TotalPrice | priceFormat}}</p>
<p>实付款 ¥{{item.CustomerPayMoney}}</p>
<p v-if="item.DiscountMoney">优惠金额 ¥{{item.DiscountMoney | priceFormat}}</p>
</td>
<td class="color333 font-size14">
<span>{{item.OrderStatus}}</span>
</td>
<td style="text-align:center;">
<el-button size="mini"type="danger" v-if="item.OrderStatus!='已取消'" @click="goPay(item)">立即付款</el-button>
<el-button size="mini" type="danger" v-if="item.OrderStatus!='已取消'" @click="goPay(item)">立即付款</el-button>
<el-button style="margin: 10px 0 0 0;" v-if="item.OrderStatus!='已取消'" size="mini" @click="canCelHotel(item.ThirdOrderNo)">取消订单</el-button>
<el-button style="margin: 10px 0 0 0;" size="mini" @click="goDetail(item.OrderID)">详情</el-button>
</td>
......@@ -191,7 +194,7 @@ export default {
RB_Branch_id:item.RB_Branch_id,
costType:item.costType,
orderId:item.OrderID,
bookMoney:item.TotalPrice,
bookMoney:item.CustomerPayMoney,
CancelTime:item.EndTime,
hotelName:item.HotelName,
totalPnumber:item.Number
......
......@@ -193,7 +193,6 @@
<td colspan="6">
<span class="time">{{item.createDate}}</span>
<span class="num">订单号:<span>{{item.id}}</span></span>
<!-- <span class="contacts"><i class="iconfont icon-dianhua"></i> <span>{{item.salesName}} {{item.salesMobile}}</span></span> -->
</td>
</tr>
<tr class="info" @mouseenter="enter(index)" :key="index+100" @mouseleave="enter()" :class="{hover_bg: activeRow === index}">
......@@ -205,7 +204,6 @@
<div class="_right">
<p class="color333 font-size14">{{item.diningName}}</p>
<p>{{item.mealName}}</p>
<!-- <p>团号:{{item.tcid}}</p> -->
</div>
</div>
</td>
......@@ -215,8 +213,9 @@
<p>使用日期:{{item.useDate}}</p>
</td>
<td class="money">
<p>{{item.preferPrice | priceFormat}}</p>
<p>总金额:{{item.preferPrice | priceFormat}}</p>
<p>应付款:{{item.customerPayMoney | priceFormat}}</p>
<p>优惠金额:{{item.discountMoney | priceFormat}}</p>
</td>
<td class="color333 font-size12">
<span v-if="item.status === 1">正常</span>
......@@ -226,15 +225,10 @@
<td>
<p v-if="item.status === 3" style="margin-bottom:10px;">
<el-button @click="Pay(item)" size="mini" type="danger">立即付款</el-button>
</p>
<!-- <p v-if="item.status === 3" style="margin-bottom:10px;">
<el-button @click="Pay(item)" size="mini" type="danger">查看详情</el-button>
</p> -->
<p v-if="item.status === 1 || item.status === 3" style="margin-bottom:10px;">
<el-button @click="Exit(item)" size="mini">取消订单</el-button>
</p>
</td>
</tr>
</template>
......@@ -296,12 +290,12 @@ export default {
});
},
Pay(item){
console.log(item)
let data={};
data=item.payInfo;
data.AirOrderId=item.payInfo.airOrderId;
item.payInfo.preferPrice = item.customerPayMoney
sessionStorage.Visainfo=JSON.stringify(item.payInfo)
this.$router.push({
name: "Pay",
query: {
......
......@@ -230,6 +230,8 @@
</td>
<td class="money">
<p>总额 ¥{{item.TotalPrice | priceFormat}}</p>
<p v-if="item.DiscountMoney > 0">优惠金额 ¥{{item.DiscountMoney | priceFormat}}</p>
<p>应付金额 ¥{{item.CustomerPayMoney | priceFormat}}</p>
<p>实付金额 ¥{{item.Income | priceFormat}}</p>
<!-- <p class="__cp pay_no" v-if="!item.payShow" @click="item.payShow = true">已付总额 ¥{{item.customerPayMoney | priceFormat}} <i class="iconfont icon-xia"></i></p> -->
<!-- <p class="__cp pay_no" v-if="item.payShow" @click="item.payShow = false">已付总额 ¥{{item.customerPayMoney | priceFormat}} <i class="iconfont icon-xia shang"></i></p> -->
......@@ -247,7 +249,7 @@
<span>{{item.OrderStateStr}}</span>
</td>
<td>
<p style="margin-bottom:6px" v-if="item.Income!=item.TotalPrice &&item.OrderStatus!=2">
<p style="margin-bottom:6px" v-if="item.Income!=item.TotalPrice &&item.OrderStatus!=2 && item.CustomerPayMoney > 0">
<el-button @click="Pay(item)" size="mini" type="danger">立即支付</el-button>
</p>
......@@ -323,7 +325,7 @@ export default {
],
dialogFormVisible:false,
exitMsg:{
order_no:'',
orderId:'',
cancel_type:"",
cancel_desc:"",
CancelBy:'',
......@@ -346,8 +348,8 @@ export default {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit('queryDays')
this. exitMsg={
order_no:'',
this.exitMsg={
orderId:'',
cancel_type:"",
cancel_desc:"",
CancelBy:'',
......@@ -362,7 +364,7 @@ export default {
Exit(item){
let userInfo = this.getLocalStorage();
this.dialogFormVisible=true;
this.exitMsg.order_no=item.OrderID;
this.exitMsg.orderId=item.OrderID;
this.exitMsg.CancelBy=userInfo.name;
},
gopayInfo(item){
......@@ -382,7 +384,7 @@ export default {
let data=item;
msg.CancelTime=data.EndTime;
msg.OrderSource=15;
msg.total_fee=data.TotalPrice;
msg.total_fee=data.CustomerPayMoney;
msg.body=data.Describe;
msg.orderId=data.OrderID;
msg.costType=data.costType;
......
......@@ -223,7 +223,8 @@
<p style="margin-top:6px">{{item.contactMobile}}</p>
</td>
<td class="money">
<p>{{item.preferPrice | priceFormat}}</p>
<p>总金额:{{item.preferPrice | priceFormat}}</p>
<p>实付款:{{item.customerPayMoney | priceFormat}}</p>
<p style="color:#999999">已优惠:{{item.discountMoney | priceFormat}}</p>
</td>
......
......@@ -236,8 +236,10 @@
</td>
<td class="money">
<p>总额 ¥{{item.totalPrice | priceFormat}}</p>
<p>实付款 ¥{{item.customerPayMoney | priceFormat}}</p>
<!-- <p class="__cp pay_no" v-if="!item.payShow" @click="item.payShow = true">已付总额 ¥{{item.totalPrice | priceFormat}} <i class="iconfont icon-xia"></i></p> -->
<p class="__cp pay_no" @click="item.payShow = false">已付总额 ¥{{item.income | priceFormat}}
<p>优惠金额 ¥{{item.discountMoney | priceFormat}}
<!-- <i class="iconfont icon-xia shang"></i> -->
</p>
<!-- :class="{height_aotu: item.payShow}" -->
......
......@@ -106,6 +106,7 @@
<p>总金额:¥{{scope.row.preferPrice | priceFormat}}</p>
<p>实付金额:¥{{scope.row.customerPayMoney | priceFormat}}</p>
<p>退款金额:¥{{scope.row.refund | priceFormat}}</p>
<p>优惠金额:¥{{scope.row.discountMoney | priceFormat}}</p>
</template>
</el-table-column>
......@@ -329,6 +330,9 @@ export default {
</script>
<style>
.CustomizedList .el-table thead{
color:#666666;
}
.CustomizedList .clearfix li.__cp._active {
color: #E73828;
}
......
......@@ -426,57 +426,19 @@
@current-change="handleCurrentChange"
></el-pagination>
</el-row>
<!-- <div class="content">
<vue-waterfall-easy ref="waterfall" :enablePullDownEvent='enableEvent' :maxCols='3' :imgWidth="385" :imgsArr="dataList" @scrollReachBottom="getDatatype">
<div class="img-info" slot-scope="props">
<div @click="Gourl(props.value)" class="moreItem">
<div class="itemImg">
<div class="noneData">
<img src="../../assets/img/logo_t.png" alt="">
</div>
</div>
<div class="textDiv">
<p class="text2 pfR" style="padding:16px 0">{{props.value.title}}</p>
<p class="text2 f12 c88">
<span v-html="props.value.descriptions"></span>
</p>
<p style="display:flex;align-item:center;justify-content: flex-end;margin-top:10px">
<span class="f12 cee pfR" style="text-decoration: underline">Read More</span>
<img style="margin-left:10px" src="../../assets/img/juan/more.png" alt="">
</p>
</div>
</div>
</div>
</vue-waterfall-easy>
</div> -->
</div>
<div class="nodataDiv" v-if='dataList.length==0' style='width:100%;margin-top:50px;color: #ccc;'>
<div class="moreItem">
<div class="itemImg">
<div class="noneData">
<img src="../../assets/img/logo_t.png" alt="">
</div>
</div>
<div class="textDiv">
<p class="text2 pfR" style="padding:16px 0">暂无数据</p>
<p class="text2 f12 c88">
<span>暂无数据</span>
</p>
<p style="display:flex;align-item:center;justify-content: flex-end;margin-top:10px">
<span class="f12 cee pfR" style="text-decoration: underline">暂无数据</span>
<img style="margin-left:10px" src="../../assets/img/juan/more.png" alt="">
</p>
</div>
<div class="empty-data">
<i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
</div>
<div class="GreyDiv">
<p class="f30" style="text-align:center">旅行<span style="color:#EE4454"> . 体验师</span></p>
<p class="f20" style="color:#999999;text-align:center">Hot Destinations</p>
<p class="f20" style="color:#999999;text-align:center">Travel Experiencer</p>
<div class="iconDiv" style="margin-top:40px">
<div class="w1200 basefix">
<div class="iconItem">
......
......@@ -2,9 +2,6 @@
@import url('../../../assets/trip/trade/index.css');
._coupon_box{
border-bottom: 1px dashed #E5E5E5;
}
._no_coupon{
}
._pay_info{
margin: 20px 0 0 0;
......
<template>
<div class="SchedProduct" >
<div class="SchedProduct commonF" >
<el-row :gutter="20">
<el-col :span="16" :offset="4">
<div style="margin:15px 0">
......@@ -242,10 +242,62 @@
</el-form>
</div>
<div style="padding:0 15px;background:#fff;border:1px solid #ECECEC;font-size:12px;height:50px;line-height:50px">
<div v-show="step==2" style="background:#fff;margin:20px 0;padding:20px">
<p class="pfR" style="margin-bottom:10px">兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
</div>
<!-- 优惠券 -->
<div class="Yhq" v-show="step==2">
<p class="pfR" style="color:#000000;padding-left:20px">优惠券使用</p>
<ul class="yhqUl">
<p v-if="!Verification.length || Verification[0].ApplyState !== 1" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<li v-for="(item,index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': !Verification.length || Verification[0].ApplyState !== 1}" @click="!Verification.length || Verification[0].ApplyState !== 1 ? '' : clickCoupon(item)" class="sawtooth">
<span class="kdj">
<span v-if="item.overlapUse==1">可叠加</span>
<span v-else>不可叠加</span>
</span>
<p style="margin-top:10px">
<span v-if="item.couponsType==1"><span>{{item.denomination}}</span></span>
<span v-else>{{item.denomination}}</span>
</p>
<p style="font-size:14px">{{item.useCondition}}使用</p>
<p style="font-size:12px;color:#4C58A4;margin-top:6px">
有效期:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}
</p>
<div @click="clickCoupon(item)" class="_choice_box">
<span v-if="!item.active"></span>
<span v-else class="iconfont icon-xuanzhong2"></span>
</div>
</li>
<div v-if="UserCanUseCouponList.length==0" class="_no_coupon">
<p>暂无可用优惠券</p>
</div>
</ul>
</div>
<div class="basefix" style="padding:15px;background:#fff;border:1px solid #ECECEC;font-size:12px;">
<span @click="StepStetus(1)" v-show="step==2" style="color:#5893EB;cursor: pointer;">&lt;返回上一步</span>
<span style="float:right">订单金额:¥
<span style="color:#FF680B;font-size:18px;">{{formInline.TotalPrice | priceFormat}}</span>
<span style="float:right">
<div v-show="step==2">
<p>
<span class="Spanwidth">订单金额:</span>
<span style="color:#FF680B;font-size:18px;">{{formInline.TotalPrice | priceFormat}}</span>
</p>
<p>
<span class="Spanwidth">优惠:</span>
<span style="color:#FF680B;font-size:18px;">{{formInline.DiscountMoney}}</span>
</p>
<p>
<span class="Spanwidth pfR">实付款:</span>
<span style="color:#FF680B;font-size:18px;">{{SettlementPrice}}</span>
</p>
</div>
<el-button @click="StepStetus(2)" v-show="step==1" size="small" class="btn_common">下一步</el-button>
<el-button @click="submitForm('formInline')" v-show="step==2" size="small" class="btn_common">去支付</el-button>
</span>
......@@ -264,10 +316,18 @@
<span>基本团费</span>
<span>{{price | priceFormat}}</span>
</li>
<li style="color:#FF680B;font-weight:600">
<li style="color:#FF680B;font-weight:600;border-bottom:1px solid #FFE7AE;">
<span>总额</span>
<span><span style="font-size:18px;">{{formInline.TotalPrice | priceFormat}}</span></span>
</li>
<li style="color:#FF680B;font-weight:600;border-bottom:1px solid #FFE7AE;">
<span>优惠</span>
<span><span style="font-size:18px;">{{formInline.DiscountMoney}}</span></span>
</li>
<li style="color:#FF680B;font-weight:600">
<span>实付款</span>
<span><span style="font-size:18px;">{{SettlementPrice}}</span></span>
</li>
</ul>
</el-col>
</el-row>
......@@ -304,6 +364,8 @@ export default {
},//联系人
GuestList:[],
DiscountMoney:0,
CustomerPayMoney:0,
},
mode:true,
step:1,
......@@ -313,6 +375,14 @@ export default {
provinceList:[],
cityList:[],
price:0,
CouponList:[],
UserCanUseCouponList:[],
CouponIds: '',
SettlementPrice:0,
ActivateCode:'',
Verification:'',
}
},
mounted () {
......@@ -332,8 +402,143 @@ export default {
this.InitPersonnum()
}
this.getProvince();
this.getUserCanUseCouponList();
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
},
methods: {
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
if(item.denomination>this.SettlementPrice){
this.Error("该优惠券不满足使用条件!")
return;
}
if (item.overlapUse === 1) { // 1允许叠加使用
this.CouponList.forEach(x=>{
if (x.overlapUse === 1 && x.couponsType === item.couponsType) { // 优惠券列表筛选出允许叠加并且type相同的
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
} else { // 不允许叠加使用
this.CouponList.forEach(x=>{ // 筛选掉其他
if (x.id === item.id) {
list.push(x)
}
})
item.active = !item.active
this.UserCanUseCouponList = list
}
} else {
item.active = !item.active
if (this.UserCanUseCouponList.length===1) { // 取消优惠券选中状态 之前直选择了一个优惠券
this.UserCanUseCouponList = this.CouponList
} else { //... 之前选择了多个优惠券 循环判断是否已全部取消
let num = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active)
num +=1
})
if (num===0) {
this.CouponList.forEach(x=>{
x.active = false
})
this.UserCanUseCouponList = this.CouponList
}
}
}
if (this.UserCanUseCouponList.length>0) {
let CouponIds = ''
let CouponMoney = 0
let CouponSale = 1
let type = 0
this.UserCanUseCouponList.forEach(x=>{
if (x.active) {
type = x.couponsType
CouponIds = CouponIds + x.id + ','
if (x.couponsType === 1) {
CouponMoney = CouponMoney + x.denomination
} else {
CouponSale = CouponSale * (x.denomination/10)
}
}
})
this.CouponIds = CouponIds
if (type === 1) {
this.SettlementPrice = this.price - CouponMoney
} else if (type === 2) {
this.SettlementPrice = this.price * CouponSale
} else if (type === 0) {
this.SettlementPrice = this.price
}
} else {
this.SettlementPrice = this.price
}
// this.SettlementPrice=parseInt(this.SettlementPrice).toFixed(2);
let allmonney=this.price - this.SettlementPrice;
this.formInline.DiscountMoney = (this.price - this.SettlementPrice).toFixed(2);
this.CouponIds=this.CouponIds.substring(0,this.CouponIds.length-1)
this.formInline.CouponAllotIds=this.CouponIds;
},
filterCoupon() {
let list = []
this.CouponList.forEach(x=>{
if (this.price>x.useCondition) {
x.active = false
list.push(x);
}
})
this.UserCanUseCouponList = list;
},
// 获取优惠券
getUserCanUseCouponList(){
let msg={
lineId:14,
lineteamId:0,
CouponsUseScope:3,
};
this.apiJavaPost("/api/b2b/user/getUserCanUseCouponList",msg,
res => {
if(res.data.resultCode==1){
this.CouponList=res.data.data;
this.CouponList.forEach(item=>{
item.active=false;
})
this.filterCoupon();
}
},
null
);
},
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
setEngName(type,index, name) {
if (type == 1 && name != "") {
this.formInline.GuestList[index].ESurName = this.$languageUtils.ConvertChineseToPinYin(name);
......@@ -343,7 +548,7 @@ export default {
},
submitForm(formName) {
let that=this;
// console.log("formInline",this.formInline)
console.log("formInline",this.formInline)
this.$refs[formName].validate((valid) => {
if (valid) {
// 开具发票
......@@ -394,6 +599,8 @@ export default {
this.price=res.data.data.visaPrice;
let num=this.formInline.AdultPeopleNum+this.formInline.ChildPeopleNum;
this.formInline.TotalPrice= num * this.price;
this.SettlementPrice=this.formInline.TotalPrice;
this.price=this.formInline.TotalPrice;
} else {
this.Error(res.data.message);
......@@ -451,6 +658,11 @@ export default {
}
</script>
<style>
@import '../../assets/css/common.css';
.SchedProduct .Spanwidth{
display: inline-block;
width: 100px;
}
.SchedProduct .double_form{
margin-left: 0!important;
display: inline-block;
......@@ -463,8 +675,9 @@ export default {
font-weight:bold;
}
.SchedProduct .btn_common{
margin-left:30px;border:none;background:#EE4454;color:#fff;
margin-top:10px;
float: right;
border:none;background:#EE4454;color:#fff;
}
.SchedProduct .color_form{
color: #999999;
......
......@@ -15,13 +15,13 @@ export default {
//var domainUrl = "http://reborn.oytour.com"; //主域名
// var domainUrl = "http://192.168.2.65:8025"//主域名
// let domainUrl = "https://reborn.oytour.com";
let domainUrl = "http://test.viitto.com"
let domainUrl = "http://testapi.oytour.com"
// let domainUrl = "http://192.168.2.214:8082"
// var domainUrl = "http://reborn.oytour.com";
let locationName = window.location.hostname;
if (this.isOnline()) {
if (window.location.host.indexOf('viitto.com') != -1)
domainUrl = "http://test.viitto.com"
if (window.location.host.indexOf('testb2b.oytour.com') != -1)
domainUrl = "http://testapi.oytour.com"
else if (window.location.host.indexOf('oytour.com') != -1)
domainUrl = "https://reborn.oytour.com"
}
......@@ -30,26 +30,14 @@ export default {
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
// javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000",
// 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://efficient.oytour.com",
javaUrl: "http://47.96.12.235:9001",
// javaUrl: locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : locationName.indexOf('viitto') !== -1 ? "http://47.96.12.235:9001" : "http://192.168.2.215:9000",
javaUrl: "http://efficient.oytour.com",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
// javaUrl: "http://47.96.12.235:9001",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
};
// domainUrl = "https://reborn.oytour.com"
// var obj = {
// //主地址
// DomainUrl: domainUrl,
// //常用提交数据URL
// PostUrl: domainUrl + "/api/common/post",
// javaUrl: "http://efficient.oytour.com",
// ViittoFileUrl:"http://imgfile.oytour.com",
// UploadUrl: "http://upload.oytour.com",
// LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
// };
return obj;
},
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
......
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