Commit e974ef39 authored by qipeng's avatar qipeng

退票判断增加 DAY

parent 85d25356
...@@ -290,13 +290,26 @@ export default { ...@@ -290,13 +290,26 @@ export default {
this.orderRefundRuleListShowMessage.forEach((item,index)=>{ this.orderRefundRuleListShowMessage.forEach((item,index)=>{
if(item.refundVisitorApply==1){ if(item.refundVisitorApply==1){
var todayTimer = this.$commonjs.today()+' '+this.$commonjs.todayTime() //获取今天时间 var todayTimer = this.$commonjs.today()+' '+this.$commonjs.todayTime() //获取今天时间
var playdateTimer = this.orderInfo.playDate+' '+item.refundTime //获取游玩时间开始 var playdateTimer = '' //获取游玩时间开始
if(item.refundDay!=undefined&&item.refundDay!=0){
var itemDay = -item.refundDay//将天数改为负数
var orderEndPlayDate = this.getNextDate(this.orderInfo.playDate,itemDay)//最迟退票天数
playdateTimer = orderEndPlayDate+' '+item.refundTime
}else{
playdateTimer = this.orderInfo.playDate+' '+item.refundTime
}
var todayTimerNum = this.$commonjs.changeTime(todayTimer) //今天时间转化数字 var todayTimerNum = this.$commonjs.changeTime(todayTimer) //今天时间转化数字
var playdateTimerNum = this.$commonjs.changeTime(playdateTimer) //游玩时间转化数字 var playdateTimerNum = this.$commonjs.changeTime(playdateTimer) //游玩时间转化数字
var playdateEndTimer = ''//退票截止时间 var playdateEndTimer = ''//退票截止时间
var playdateEndTimerNum = '' //截止时间转化数字 var playdateEndTimerNum = '' //截止时间转化数字
if(item.refundDateType!=undefined&&item.refundDateType==2){//refundDateType 退款时间展示文字(0之前1之后2至(用于区间)) if(item.refundDateType!=undefined&&item.refundDateType==2){//refundDateType 退款时间展示文字(0之前1之后2至(用于区间))
if(item.refundDay!=undefined&&item.refundDay!=0){
var itemDay = -item.refundDay//将天数改为负数
var orderEndPlayDate = this.getNextDate(this.orderInfo.playDate,itemDay)//最迟退票天数
playdateEndTimer = orderEndPlayDate+' '+item.refundEndTime
}else{
playdateEndTimer = this.orderInfo.playDate+' '+item.refundEndTime //获取游玩时间开始 playdateEndTimer = this.orderInfo.playDate+' '+item.refundEndTime //获取游玩时间开始
}
playdateEndTimerNum = this.$commonjs.changeTime(playdateEndTimer) playdateEndTimerNum = this.$commonjs.changeTime(playdateEndTimer)
} }
if(item.refundDateType!=undefined&&item.refundDateType==2){ if(item.refundDateType!=undefined&&item.refundDateType==2){
...@@ -334,6 +347,14 @@ export default { ...@@ -334,6 +347,14 @@ export default {
} }
}) })
}, },
getNextDate(date,day) {//天数计算器
var dd = new Date(date)
dd.setDate(dd.getDate() + day)
var y = dd.getFullYear()
var m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1
var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()
return y + '-' + m + '-' + d
},
//当前选择的原因 //当前选择的原因
clickNewFun(labelNum){ clickNewFun(labelNum){
this.causeNum = labelNum this.causeNum = labelNum
...@@ -556,9 +577,11 @@ export default { ...@@ -556,9 +577,11 @@ export default {
left: 0; left: 0;
z-index: 998; z-index: 998;
background-color: rgba(0,0,0,.3); background-color: rgba(0,0,0,.3);
display: flex;
flex-direction:column;
justify-content:center;
.mask-box{ .mask-box{
width: 500rpx; width: 500rpx;
height: 300rpx;
padding: 24rpx; padding: 24rpx;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
...@@ -566,12 +589,6 @@ export default { ...@@ -566,12 +589,6 @@ export default {
display: flex; display: flex;
flex-direction:column; flex-direction:column;
justify-content:center; justify-content:center;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 998;
.box-text{ .box-text{
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
......
...@@ -848,13 +848,26 @@ export default { ...@@ -848,13 +848,26 @@ export default {
this.orderRefundRuleListShowMessage.forEach((item,index)=>{ this.orderRefundRuleListShowMessage.forEach((item,index)=>{
if(item.refundVisitorApply==1){ if(item.refundVisitorApply==1){
var todayTimer = this.$commonjs.today()+' '+this.$commonjs.todayTime() //获取今天时间 var todayTimer = this.$commonjs.today()+' '+this.$commonjs.todayTime() //获取今天时间
var playdateTimer = this.orderInfo.playDate+' '+item.refundTime //获取游玩时间开始 var playdateTimer = '' //获取游玩时间开始
if(item.refundDay!=undefined&&item.refundDay!=0){
var itemDay = -item.refundDay//将天数改为负数
var orderEndPlayDate = this.getNextDate(this.orderInfo.playDate,itemDay)//最迟退票天数
playdateTimer = orderEndPlayDate+' '+item.refundTime
}else{
playdateTimer = this.orderInfo.playDate+' '+item.refundTime
}
var todayTimerNum = this.$commonjs.changeTime(todayTimer) //今天时间转化数字 var todayTimerNum = this.$commonjs.changeTime(todayTimer) //今天时间转化数字
var playdateTimerNum = this.$commonjs.changeTime(playdateTimer) //游玩时间转化数字 var playdateTimerNum = this.$commonjs.changeTime(playdateTimer) //游玩时间转化数字
var playdateEndTimer = ''//退票截止时间 var playdateEndTimer = ''//退票截止时间
var playdateEndTimerNum = '' //截止时间转化数字 var playdateEndTimerNum = '' //截止时间转化数字
if(item.refundDateType!=undefined&&item.refundDateType==2){//refundDateType 退款时间展示文字(0之前1之后2至(用于区间)) if(item.refundDateType!=undefined&&item.refundDateType==2){//refundDateType 退款时间展示文字(0之前1之后2至(用于区间))
if(item.refundDay!=undefined&&item.refundDay!=0){
var itemDay = -item.refundDay//将天数改为负数
var orderEndPlayDate = this.getNextDate(this.orderInfo.playDate,itemDay)//最迟退票天数
playdateEndTimer = orderEndPlayDate+' '+item.refundEndTime
}else{
playdateEndTimer = this.orderInfo.playDate+' '+item.refundEndTime //获取游玩时间开始 playdateEndTimer = this.orderInfo.playDate+' '+item.refundEndTime //获取游玩时间开始
}
playdateEndTimerNum = this.$commonjs.changeTime(playdateEndTimer) playdateEndTimerNum = this.$commonjs.changeTime(playdateEndTimer)
} }
if(item.refundDateType!=undefined&&item.refundDateType==2){ if(item.refundDateType!=undefined&&item.refundDateType==2){
...@@ -886,6 +899,14 @@ export default { ...@@ -886,6 +899,14 @@ export default {
}, 2000) }, 2000)
}) })
}, },
getNextDate:function(date,day) {//
var dd = new Date(date)
dd.setDate(dd.getDate() + day)
var y = dd.getFullYear()
var m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1
var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()
return y + '-' + m + '-' + d
},
getSortInfo(){//-------------------------排号信息加载 getSortInfo(){//-------------------------排号信息加载
var areaCode = this.orderInfo.areaCode var areaCode = this.orderInfo.areaCode
var orderNum = this.orderInfo.orderNum var orderNum = this.orderInfo.orderNum
......
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