Commit 66a52476 authored by 罗超's avatar 罗超

修改线路订单预览

parent cb9a05a8
@font-face {
font-family: "iconfont"; /* Project id 1830471 */
src: url('//at.alicdn.com/t/font_1830471_b1q5b9z71n.woff2?t=1622518908789') format('woff2'),
url('//at.alicdn.com/t/font_1830471_b1q5b9z71n.woff?t=1622518908789') format('woff'),
url('//at.alicdn.com/t/font_1830471_b1q5b9z71n.ttf?t=1622518908789') format('truetype');
src: url('//at.alicdn.com/t/font_1830471_9s93fs3i7o.woff2?t=1622777058762') format('woff2'),
url('//at.alicdn.com/t/font_1830471_9s93fs3i7o.woff?t=1622777058762') format('woff'),
url('//at.alicdn.com/t/font_1830471_9s93fs3i7o.ttf?t=1622777058762') format('truetype');
}
.iconfont {
......@@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
.iconshenhezhong:before {
content: "\e606";
}
.iconquxiao:before {
content: "\e60e";
}
.icondaizhifu-:before {
content: "\e618";
}
.iconzhengchang:before {
content: "\e783";
}
.iconartboard9-copy:before {
content: "\e726";
}
......
......@@ -507,6 +507,11 @@
},
methods: {
// goOrderDetails(){
// uni.navigateTo({
// url:"/pages/jiuzhai/jz_SureOrder?orderId=42389"
// })
// },
getunilogin(res){
let that = this
//静默登录操作
......
......@@ -191,8 +191,9 @@
},
methods: {
goOrderDetail(item){
console.log(item)
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(JSON.stringify(item))
url: "/pages/jiuzhai/jz_SureOrder?orderId="+item.orderId
});
},
change(i) {
......
......@@ -612,11 +612,11 @@
},
res => {
this.orderInfo = JSON.parse(res.data);
this.Pay()
this.Pay(OrderId)
}
);
},
Pay(){
Pay(OrderId){
let that=this;
uni.requestPayment({
provider: 'wxpay',
......@@ -643,7 +643,7 @@
})
setTimeout(()=>{
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+this.orderData
url: "/pages/jiuzhai/jz_SureOrder?orderId="+OrderId
});
}, 100 )
}
......
......@@ -77,57 +77,412 @@
line-height: 80rpx;
font-size: 28rpx;
}
.jz_Reserve{
padding-bottom: 180rpx;
}
.jz_ReserTop {
width: 100%;
min-height: 300rpx;
box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13);
background-color: #fff;
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
padding: 40rpx;
}
.jz_ReserTitle {
color: #111111;
font-weight: 600;
font-size: 36rpx;
}
.jz_ReserIn {
color: #111;
font-size: 24rpx;
font-weight: 500;
}
.jz_ReseQue {
color: #DFBE6E;
font-size: 24rpx;
padding-top: 30rpx;
border-top: 1px solid #E7E7E7;
margin-top: 20px;
}
.jz_ReseQue img {
width: 16px;
height: 14px;
position: relative;
top: 2px;
margin-right: 5px;
}
.jz_ReseOrder {
padding: 40rpx;
}
.jz_ReDix {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.jz_RedixTitle {
width: 90px;
flex-shrink: 0;
}
/* .jz_OrderDiv {
position: fixed;
width: 90%;
height: 100rpx;
background-color: #fff;
margin: auto;
bottom: 20px;
padding: 20rpx;
left: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2);
border-radius: 16px;
z-index: 999;
} */
.jz_orderbox{
position: fixed;
background-color: #fff;
bottom: 0;
width: 100vw;
left: 0;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0px 0rpx 50rpx 0px rgba(76, 76, 76, 0.13);
z-index: 99;
justify-content: flex-end;
padding:20rpx 30rpx;
}
.jz_OrderDiv{
width:90%;
height:100rpx;
background-color: #fff;
margin:auto;
padding:20rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0px 10rpx 30rpx 0px rgba(36, 36, 36, 0.2);
border-radius: 16px;
z-index:999;
}
.jz_OrderReNow {
width: 150rpx;
height: 80rpx;
background-color: #111111;
text-align: center;
line-height: 80rpx;
color: #fff;
font-weight: 600;
font-size: 28rpx;
border-radius: 16rpx;
}
.jz_form{
margin-top: 60rpx;
padding:0 45rpx;
}
.jz_form .form-items{
margin-bottom: 20rpx;
display: flex;
align-items: center;
padding-bottom: 20rpx;
border-bottom:1px solid #f5f5f5;
font-size: 28px;
font-weight: 500;
}
.jz_form .form-items:last-child{
border-bottom: none;
}
.jz_form .form-items .label{
font-size: 28rpx;
font-weight: 600;
margin-right: 60rpx;
flex-shrink: 0;
}
.jz_form .form-items .val{
flex:1;
}
.jz_ReserTop .o-timer{
height: 100rpx;
background: #ECF1F4;
border-radius: 20rpx;
padding: 0 40rpx;
margin-bottom: 30rpx;
}
.jz_ReserTop .o-timer .time-item{
font-size: 32rpx;
font-weight: 800;
}
/* .jz_ReserTop .o-timer .time-item:last-child{
text-align: right;
} */
.jz_ReserTop .o-timer .time-split{
font-size: 24rpx;
font-weight: 400;
text-align: center;
margin:0 20rpx;
}
.jz_ReserTop .o-timer .update{
font-size: 24rpx;
font-weight: 400;
text-align: right;
color:#000;
display: flex;
align-items: center;
}
.jz_Reserve .flex{
display: flex;
align-items: center;
}
.jz_Reserve .big-title {
position: relative;
}
.jz_Reserve .big-title::before {
display: block;
width: 71rpx;
height: 12rpx;
background: #DFBE6E;
border-radius: 4rpx;
content: ' ';
position: absolute;
left: 0;
bottom: 6rpx;
z-index: 1;
}
.jz_Reserve .big-title text {
font-size: 34rpx;
font-weight: bold;
color: #1F1F1F;
position: relative;
z-index: 2;
}
.jz_Reserve .empty-block{
height: 20rpx;
background: #ECF1F4;
}
.jz_form .form-items .val text{
border:none;
padding: 0;
margin: 0;
outline: none;
height: 38rpx;
line-height: 38rpx;
font-size: 28rpx;
font-weight: 500;
width: 100%;
}
.jz_Reserve .grey{
color:#6E6E6E !important
}
.jz_Reserve .f12 {
font-size:24rpx !important;
}
.jz_Reserve .f11 {
font-size:22rpx !important;
}
.jz_Reserve .f14 {
font-size:28rpx !important;
}
.jz_Reserve .regular {
font-weight: 500 !important;
}
.jz_Reserve .sheshi{
margin-top: 50rpx;
}
.jz_Reserve .sheshi .she-title{
font-size: 28rpx;
font-weight: 800;
}
.jz_Reserve .sheshi .she-content{
margin-top: 24rpx;
}
.jz_Reserve .sheshi .she-content text{
font-size: 24rpx;
font-weight: 500;
color: #4A4A4A;
line-height: 40rpx;
margin-right: 24rpx;
}
</style>
<template>
<view class="jz_SureOrder" style="height:100vh;">
<view class="jz_SureTop">
<view style="display:flex;align-items: center;">
<img style="width:53rpx;height:53rpx;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dfk.png" alt="" />
<text class="jz_SureDfk">待付款</text>
<view class="jz_Reserve" v-if="orderData">
<view class="jz_ReserTop">
<view class="flex" style="margin-bottom: 30rpx;">
<u-icon customPrefix="iconfont" name="icondaizhifu-" size="52" color="#DFBE6E" v-if="orderStatus.code==0"></u-icon>
<u-icon customPrefix="iconfont" name="iconquxiao" size="52" color="#f26c6c" v-if="orderStatus.code==-1"></u-icon>
<u-icon customPrefix="iconfont" name="iconshenhezhong" size="52" color="#86d9a5" v-if="orderStatus.code==-2"></u-icon>
<u-icon customPrefix="iconfont" name="iconzhengchang" size="52" color="#111" v-if="orderStatus.code==1"></u-icon>
<text style="margin-left: 26rpx;font-size: 40rpx;font-weight: 600;color:#111;">
{{orderStatus.text}}
</text>
</view>
<view style="margin-bottom: 30rpx;" v-if="orderData.model.RejectRemark&&orderData.model.RejectRemark!=''">
<u-alert-tips type="error" title="订单取消失败" :description="orderData.model.RejectRemark"></u-alert-tips>
</view>
<view class="o-timer flex">
<view class="time-item">{{getDate(orderData.model.StartDate)}} {{getWeek(orderData.model.StartDate)}}</view>
<view class="time-split">
<view>{{orderData.model.DayNum}}</view>
</view>
<view class="time-item" style="font-size: 26rpx;font-weight: 500;flex:1;">
<text v-if="orderData.model.ManNum>0">{{orderData.model.ManNum}}成人</text>
<text v-if="orderData.model.ChirdNum>0">{{orderData.model.ChirdNum}}儿童</text>
<text v-if="orderData.model.BabyNum>0">{{orderData.model.BabyNum}}婴儿</text>
</view>
<view class="update">
<!-- <text style="margin-right: 8rpx;">修改</text>
<u-icon name="arrow" size="20" /> -->
</view>
</view>
<view class="jz_ReserTitle">
{{orderData.model.Title}}
</view>
<view class="jz_ReserIn" style="margin:33rpx 0 18rpx 0">
<!-- {{currentPriceInfo.startCityName}}出发 {{currentPriceInfo.startDate}} -->
{{orderData.model.LtName}}
</view>
<view class="big-title">
<text>{{orderData.model.StartCityName}}出发</text>
</view>
<view class="jz_ReseQue">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png" />即时确认:本产品付款后可快速确认,放心期待您的旅行
</view>
</view>
<view class="jz_SureContent">
<view class="jz_SureCommodity">
<view class="jz_SuOrder_img">
<img mode="aspectFill" :src="orderData.CoverImg" alt="" />
</view>
<view style="display:flex;justify-content: space-between;">
<view class="jz_GoodName">
{{orderData.GoodsName}}
</view>
<view class="jzSureMoney">
<text style="font-size:20rpx;margin-right:10rpx;">¥</text>
<text style="font-size:28rpx;">{{orderData.PreferPrice}}</text>
</view>
<view class="jz_form">
<view class="form-items">
<view class="label">订单编号</view>
<view class="val">
<text>{{orderData.model.OrderId}}</text>
</view>
</view>
<view class="form-items">
<view class="label">下单日期</view>
<view class="val">
<text>{{orderData.model.CreateDate.replace('T',' ')}}</text>
</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">订单编号</view>
<view class="jz_OrderBold">{{orderData.OrderNo}}</view>
<view class="form-items">
<view class="label">下单日期</view>
<view class="val">
<text>{{orderData.model.CreateDate.replace('T',' ')}}</text>
</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">下单时间</view>
<view class="jz_OrderBold">{{orderData.CreateDateStr}}</view>
<view class="form-items">
<view class="label">游客姓名</view>
<view class="val">
<text>{{orderData.model.ContactName}}</text>
</view>
</view>
<view class="jz_SureCommodity">
<view class="jz_OrderNum">支付方式</view>
<view class="jz_OrderBold"></view>
<view class="form-items">
<view class="label">联系电话</view>
<view class="val">
<text>{{orderData.model.ContactMobile}}</text>
</view>
</view>
<view class="jz_SureCommodity" style="justify-content: space-between;">
<view class="jz_OrderNum">商品总额</view>
<view><text style="margin-right:10rpx;">¥</text>{{orderData.PreferPrice}}</view>
</view>
<view class="empty-block"></view>
<view style="padding:50rpx 40rpx">
<view class="big-title">
<text>费用明细</text>
</view>
<view class="jz_SureCommodity" style="justify-content: flex-end;">
<view style="color:#08090E;font-size:28rpx;">实付款:</view>
<view style="color:#F20707;font-weight: bold;">
<text style="font-size:22rpx;margin-right:10rpx;">¥</text>
<text style="font-size:28rpx;">{{orderData.PreferPrice}}</text>
<view class="jz_form" style="margin:40rpx 0;padding: 0;">
<view class="form-items">
<view class="label">
在线支付
</view>
<view class="val f14 regular" style="text-align: right;">
<text style="margin-right: 30rpx;">{{orderData.model.GuestNum}}</text>
<text class="red">{{orderData.model.PreferPrice}}</text>
</view>
</view>
<view class="form-items" style="border-bottom: none;">
<view class="label">
明细
</view>
</view>
<view class="flex f12 grey" style="margin-bottom:40rpx;" :key="index">
<view style="flex:1">
<text style="margin-right: 30rpx;">成人</text>
</view>
<view style="text-align: right;">{{orderData.model.ManNum}}人 × ¥{{orderData.model.Unit_Price}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom:40rpx;" :key="index" v-if="orderData.model.ChirdNeedBedNum>0">
<view style="flex:1">
<text style="margin-right: 30rpx;">儿童(占床)</text>
</view>
<view style="text-align: right;">{{orderData.model.ChirdNeedBedNum}}人 × ¥{{(orderData.model.Unit_Price+(orderData.modelPrice.ChildNeedPrice?orderData.modelPrice.ChildNeedPrice:0))}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom:40rpx;" :key="index" v-if="orderData.model.ChirdNum-orderData.model.ChirdNeedBedNum>0">
<view style="flex:1">
<text style="margin-right: 30rpx;">儿童(不占床)</text>
</view>
<view style="text-align: right;">{{orderData.model.ChirdNum-orderData.model.ChirdNeedBedNum}}人 × ¥{{(orderData.model.Unit_Price+(orderData.modelPrice.ChildNoNeedPrice?orderData.modelPrice.ChildNoNeedPrice:0))}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom:40rpx;" :key="index" v-if="orderData.model.BabyNum>0">
<view style="flex:1">
<text style="margin-right: 30rpx;">婴儿</text>
</view>
<view style="text-align: right;">
{{orderData.model.BabyNum}}人 × ¥{{orderData.modelPrice.BabyPrice?orderData.modelPrice.BabyPrice:0}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom:40rpx;" :key="index" v-if="orderData.model.BabyNum>0&&orderData.modelPrice.BabyChargePrice&&orderData.modelPrice.BabyChargePrice>0">
<view style="flex:1">
<text style="margin-right: 30rpx;">婴儿(附加费)</text>
</view>
<view style="text-align: right;">
{{orderData.model.BabyNum}}人 × ¥{{orderData.modelPrice.BabyChargePrice}}</view>
</view>
</view>
<view class="jz_PayDiv">
<view class="jz_CancleBtn">取消</view>
<view class="jz_CancleBtn" @click="goFukuan()" style="background-color: #111111;color:#fff;">去付款</view>
</view>
<view class="empty-block"></view>
<view style="padding:50rpx 40rpx" v-if="Refund>0&&orderStatus.code==-1">
<view class="big-title">
<text>取消订单</text>
</view>
<view class="jz_form" style="margin:40rpx 0;padding: 0;">
<view class="form-items">
<view class="label">
已退款总额
</view>
<view class="val f14 regular" style="text-align: right;">
<text style="margin-right: 30rpx;">{{orderData.model.GuestNum}}</text>
<text class="red">{{orderData.model.PreferPrice}}</text>
</view>
</view>
</view>
</view>
<view class="jz_orderbox flex">
<view style="display:flex;">
<view class="jz_OrderReNow" @click="goCancel" style="background: #FFF;color:#111;border:1px solid #111;">
<text v-if="!submitCancel">取消</text>
<u-loading v-if="submitCancel" size="32" color="#111"></u-loading>
</view>
</view>
<view style="display:flex;margin-left:30rpx;">
<view class="jz_OrderReNow" @click="goFukuan">
<text v-if="!submit">立即支付</text>
<u-loading v-if="submit" size="32" color="#f5f5f5"></u-loading>
</view>
</view>
</view>
</view>
......@@ -149,8 +504,10 @@
pageSize:15,
MiniAppUserId:0
},
orderData:{}
orderData:null,
orderStatus:{},
submit:false,
submitCancel:false
};
},
created() {
......@@ -159,11 +516,66 @@
onLoad(option) {
if(option.orderData){
this.orderData= JSON.parse(decodeURIComponent(option.orderData))
}else if(option.orderId){
this.initOrderInfo(option.orderId);
}
console.log(this.orderData,'this.orderData');
},
methods: {
goCancel(){
if(this.submit||this.submitCancel)
return;
},
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
return '周'+week;
},
getDate(date){
if(date){
let arr = date.split('-');
return arr[1]+'月'+arr[2]+'日'
}
},
initOrderInfo(orderId){
let msg={
ID:orderId
}
this.apipost("sellorder_post_GetOrderEntity", msg,
res => {
if (res.resultCode == 1) {
this.orderData=res.data
this.formatStatus(this.orderData.model.OrderState,this.orderData.model.IsChargeLossOrders,this.orderData.model.IsApplyForCancel)
} else {
this.orderData={
result:-1
}
}
console.log(res)
},
e=>{
}
);
},
formatStatus(status,loss,isCancel){
loss=loss?loss:-1;
//1、已申请;!=1未申请
if(loss==1||status==4){
this.orderStatus.code=-1
this.orderStatus.text='已取消'
} else if(status==2 && isCancel!=1){
this.orderStatus.code=0
this.orderStatus.text='待付款'
} else if(status==2 && isCancel==1){
this.orderStatus.code=-2
this.orderStatus.text='审核中'
} else if(status==1){
this.orderStatus.code=1
this.orderStatus.text='正常'
}
},
goFukuan(){
if(this.submit||this.submitCancel)
return;
var that = this;
var tempObj = uni.getStorageSync('basedata').mall.wechatmessage;
var tmplIds = [];
......@@ -183,13 +595,14 @@
},
//支付
goZhifu(){
this.submit=true
let url='/api/WeChatPay/GetTravlePayInfo'
let GoodsName = this.orderData.GoodsName;
let GoodsName = this.orderData.model.Title;
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
data: {
OrderId:this.orderData.OrderId,
OrderId:this.orderData.model.OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
......@@ -199,6 +612,7 @@
let orderInfo = JSON.parse(res.data);
console.log(orderInfo)
this.goPay(orderInfo)
}
);
},
......@@ -216,19 +630,18 @@
uni.showToast({
title: "支付成功"
})
that.submit=false
//todo
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.orderData.PreferPrice+'&isFrom=1'
});
that.initOrderInfo(that.orderData.model.OrderId)
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
title: "支付失败",
icon: 'none'
})
uni.redirectTo({
url: '/pages/jiuzhai/jz_MyOrder'
});
that.submit=false
that.initOrderInfo(that.orderData.model.OrderId)
}
});
}
......
......@@ -2,10 +2,10 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
//Vue.prototype.host2 = "https://localhost:5001"
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
//Vue.prototype.host3 = "http://192.168.20.24"
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.host2 = "http://192.168.20.24:8400"
// Vue.prototype.host2 = "https://erpmallapi.oytour.com"
Vue.prototype.host3 = "http://192.168.20.24"
//Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.request = function(param, success, failed) {
//网络请求
......
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