2023-11-27 09:24:16 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<view class="my-header">
|
|
|
|
<view class="my-icons" @click="goback"> <uni-icons type="left" color="#ffffff" size="16"></uni-icons>
|
|
|
|
</view>
|
|
|
|
<view class="my-text">详情页</view>
|
|
|
|
<view class="my-icons"></view>
|
|
|
|
</view>
|
|
|
|
<!-- 顶部区域 -->
|
|
|
|
<view class="top-size">
|
2024-01-24 14:35:00 +08:00
|
|
|
<!-- <view style="font-weight: bold;margin-bottom: 5px;">已支付订单</view> -->
|
|
|
|
<view style="font-weight: bold;margin-bottom: 5px;" v-if="oilOrder.orderStatus=='paid'">已支付订单</view>
|
|
|
|
<view style="font-weight: bold;margin-bottom: 5px;" v-else-if="oilOrder.orderStatus=='payFail'">支付失败订单</view>
|
|
|
|
<view style="font-weight: bold;margin-bottom: 5px;" v-else-if="oilOrder.orderStatus=='refund'">已退款订单</view>
|
|
|
|
<view style="font-weight: bold;margin-bottom: 5px;" v-else-if="oilOrder.orderStatus=='refunding'">退款中订单</view>
|
|
|
|
<view style="font-weight: bold;margin-bottom: 5px;" v-else>未支付订单</view>
|
|
|
|
<view class="">如果有疑问请向商家进行咨询</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
<view class="centen-box">
|
|
|
|
<view class="box-title">订单信息</view>
|
|
|
|
<view class="dis-fx">
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="hui-size">油站名称</view>
|
|
|
|
<view class="">{{oilOrder.storeName}}{{oilOrder.description ? "("+oilOrder.description+")" : ""}}</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
<view class="dis-fx">
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="hui-size">加油员工</view>
|
2024-03-06 11:28:57 +08:00
|
|
|
<view class="">{{oilOrder.realName || "--"}}</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
<view class="dis-fx">
|
|
|
|
<view class="hui-size">油号油枪</view>
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="">{{oilOrder.oilName}}/{{oilOrder.gunName}}</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
<view class="dis-fx">
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="hui-size">油品单价</view>
|
|
|
|
<view class="">¥{{oilPrice}}/L</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
<view class="box-title">加油信息</view>
|
|
|
|
<view class="dis-fx">
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="hui-size">加油金额</view>
|
|
|
|
<view class="">{{oilOrder.orderAmount}}元</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
2024-02-06 18:10:15 +08:00
|
|
|
<view class="dis-fx">
|
|
|
|
<view class="hui-size">加油数量</view>
|
|
|
|
<view class="">{{oilOrder.oilNum}}升</view>
|
|
|
|
</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
<view class="dis-fx">
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="hui-size">实付金额</view>
|
|
|
|
<view class="">{{oilOrder.payAmount}}元</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.orderStatus=='paid'">
|
2024-02-06 16:35:34 +08:00
|
|
|
<view class="hui-size">储值卡付款金额</view>
|
|
|
|
<view class="">{{ oilOrder.balanceAmount }}元</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.orderStatus=='paid'">
|
2024-02-06 16:35:34 +08:00
|
|
|
<view class="hui-size">囤油卡付款升数</view>
|
|
|
|
<view class="">{{ oilOrder.oilCardAmount }}元</view>
|
|
|
|
</view>
|
2024-02-20 13:33:34 +08:00
|
|
|
<view class="box-title" v-if="AppToken && oilOrder.discountAmount>0">优惠信息</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.activeId && oilOrder.activeType=='1'">
|
2024-03-08 14:14:30 +08:00
|
|
|
<view class="hui-size">满减活动优惠</view>
|
|
|
|
<view class="">{{oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.activeId && oilOrder.activeType=='2'">
|
|
|
|
<view class="hui-size">折扣活动优惠</view>
|
|
|
|
<view class="">{{oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId">
|
|
|
|
<view class="hui-size">优惠券优惠</view>
|
|
|
|
<view class="">{{oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.discountAmount>0 && !oilOrder.cardFavorableId && !oilOrder.activeId">
|
|
|
|
<view class="hui-size">会员等级优惠</view>
|
|
|
|
<view class="">{{oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
|
|
|
<!-- <view class="dis-fx" v-if="AppToken && oilOrder.activeId && oilOrder.activeType=='2'">
|
2024-02-06 18:10:15 +08:00
|
|
|
<view class="hui-size">满减活动优惠</view>
|
|
|
|
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.activeId && oilOrder.activeType=='2'">
|
2024-02-06 18:10:15 +08:00
|
|
|
<view class="hui-size">折扣活动优惠</view>
|
|
|
|
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId">
|
2024-02-06 18:10:15 +08:00
|
|
|
<view class="hui-size">优惠券优惠</view>
|
|
|
|
<view class="">{{cardFavorable.discountAmount || oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
2024-03-06 11:28:57 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId && oilOrder.discountAmount>0 && (oilOrder.discountAmount - cardFavorable.discountAmount)>0">
|
|
|
|
<view class="hui-size">会员等级优惠</view>
|
|
|
|
<view class="">{{cardFavorable.discountAmount ? (oilOrder.discountAmount - cardFavorable.discountAmount) : oilOrder.discountAmount}}元</view>
|
|
|
|
</view>
|
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.cardFavorableId && oilOrder.activeId && (oilOrder.discountAmount - fullOrDiscount.deductionAmount)>0">
|
|
|
|
<view class="hui-size">会员等级优惠</view>
|
|
|
|
<view class="">{{fullOrDiscount.deductionAmount ? (oilOrder.discountAmount - fullOrDiscount.deductionAmount) : oilOrder.discountAmount}}元</view>
|
2024-03-08 14:14:30 +08:00
|
|
|
</view> -->
|
2024-02-06 16:35:34 +08:00
|
|
|
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="dis-fx" v-if="AppToken && oilOrder.discountAmount>0">
|
2024-02-06 16:35:34 +08:00
|
|
|
<view class="hui-size">优惠合计金额</view>
|
2024-01-24 14:35:00 +08:00
|
|
|
<view class="">{{oilOrder.discountAmount}}元</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
2024-01-24 17:10:37 +08:00
|
|
|
<view class="dis-fx" v-if="oilOrder.payTime">
|
|
|
|
<view class="hui-size">交易时间</view>
|
2024-02-06 16:35:34 +08:00
|
|
|
<view class="">{{oilOrder.payTime}}</view>
|
2024-01-24 17:10:37 +08:00
|
|
|
</view>
|
2024-02-18 18:09:52 +08:00
|
|
|
|
|
|
|
<view class="box-title" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark">订单评价</view>
|
|
|
|
<view class="dis-fx" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark">
|
|
|
|
<view class="hui-size">订单评价</view>
|
|
|
|
<view class="">{{ oilOrder.remark }}</view>
|
|
|
|
</view>
|
2023-11-27 09:24:16 +08:00
|
|
|
|
|
|
|
</view>
|
2024-02-20 11:00:47 +08:00
|
|
|
<view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark==null || oilOrder.orderStatus=='paid' && oilOrder.remark==''"
|
|
|
|
@click="gocomment()">
|
2024-01-24 14:35:00 +08:00
|
|
|
<text>去评价</text>
|
2023-11-27 09:24:16 +08:00
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-01-24 14:35:00 +08:00
|
|
|
import request from '../../utils/request'
|
2023-11-27 09:24:16 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '',
|
2024-02-06 18:10:15 +08:00
|
|
|
orderNo:"",
|
2024-01-24 14:35:00 +08:00
|
|
|
oilOrder:{},
|
|
|
|
oilPrice:"",
|
2024-02-06 16:35:34 +08:00
|
|
|
// 优惠券信息
|
|
|
|
cardFavorable:{},
|
|
|
|
// 满减或折扣信息
|
|
|
|
fullOrDiscount:{},
|
2024-02-20 11:00:47 +08:00
|
|
|
// 判断是否有登录token
|
|
|
|
AppToken: uni.getStorageSync("App-Token"),
|
2023-11-27 09:24:16 +08:00
|
|
|
}
|
|
|
|
},
|
2024-01-23 18:14:56 +08:00
|
|
|
onLoad(e) {
|
2024-02-06 18:10:15 +08:00
|
|
|
this.orderNo = e.orderNo
|
2024-01-24 14:35:00 +08:00
|
|
|
this.getOilOrder()
|
2024-01-23 18:14:56 +08:00
|
|
|
},
|
2024-02-20 13:33:34 +08:00
|
|
|
onShow() {
|
|
|
|
this.getOilOrder()
|
|
|
|
},
|
2023-11-27 09:24:16 +08:00
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
2024-01-24 14:35:00 +08:00
|
|
|
// 获取油品订单
|
|
|
|
getOilOrder() {
|
|
|
|
request({
|
2024-02-06 18:10:15 +08:00
|
|
|
url: "business/oilOrder/oilOrderId/" + this.orderNo,
|
2024-01-24 14:35:00 +08:00
|
|
|
method: 'get',
|
|
|
|
}).then((res) => {
|
|
|
|
if(res.data){
|
|
|
|
this.oilOrder = res.data
|
|
|
|
this.getOilNumber(res.data.storeId)
|
2024-03-08 14:14:30 +08:00
|
|
|
// this.getCardFavorable(res.data.cardFavorableId)
|
|
|
|
// if ( res.data.activeId && res.data.activeType){
|
|
|
|
// if (res.data.activeType == "1"){
|
|
|
|
// this.getFullFavorable(res.data.activeId)
|
|
|
|
// }
|
|
|
|
// if (res.data.activeType == "2"){
|
|
|
|
// this.getDiscountFavorable(res.data.activeId)
|
|
|
|
// }
|
|
|
|
// }
|
2024-01-24 14:35:00 +08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2024-02-06 18:10:15 +08:00
|
|
|
getCardFavorable(id){
|
|
|
|
if (id){
|
|
|
|
request({
|
|
|
|
url: "business/marketingActivity/cardFavorable/" + id,
|
|
|
|
method: 'get',
|
|
|
|
}).then((res) => {
|
|
|
|
this.cardFavorable = res.data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getFullFavorable(id){
|
|
|
|
request({
|
|
|
|
url: "business/marketingActivity/activeFullminus/" + id,
|
|
|
|
method: 'get',
|
|
|
|
}).then((res) => {
|
|
|
|
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
|
|
|
|
list.forEach(item => {
|
|
|
|
if (item.amount <= this.oilOrder.orderAmount){
|
|
|
|
this.fullOrDiscount = item
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getDiscountFavorable(id){
|
|
|
|
request({
|
|
|
|
url: "business/marketingActivity/activeDiscount/" + id,
|
|
|
|
method: 'get',
|
|
|
|
}).then((res) => {
|
|
|
|
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
|
|
|
|
list.forEach(item => {
|
|
|
|
if (item.amount <= this.oilOrder.orderAmount){
|
|
|
|
this.fullOrDiscount = item
|
|
|
|
this.fullOrDiscount.deductionAmount = this.oilOrder.orderAmount - (this.oilOrder.orderAmount*item.discount)
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
2024-01-24 14:35:00 +08:00
|
|
|
// 获取当前店铺油号信息
|
|
|
|
getOilNumber(storeId) {
|
|
|
|
let _this = this;
|
|
|
|
request({
|
|
|
|
url: "business/petrolStationManagement/oilNumber/getOilNumberName/" + storeId,
|
|
|
|
method: 'get',
|
|
|
|
}).then((res) => {
|
|
|
|
res.data.forEach(item => {
|
|
|
|
if (item.oilName == _this.oilOrder.oils) {
|
|
|
|
_this.oilPrice = item.oilPrice;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
2023-11-27 09:24:16 +08:00
|
|
|
gocomment() {
|
|
|
|
uni.navigateTo({
|
2024-02-18 18:09:52 +08:00
|
|
|
url: '/pagesMy/comment/comment?orderId=' + this.oilOrder.id
|
2023-11-27 09:24:16 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
|
|
|
background: #f4f5f6;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 88px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
width: 100%;
|
|
|
|
height: 88px;
|
|
|
|
background: #1678ff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #ffffff;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0px 15px;
|
|
|
|
padding-top: 40px;
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
top: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.top-size {
|
|
|
|
width: 100%;
|
|
|
|
height: 80px;
|
|
|
|
background: #1678ff;
|
|
|
|
color: white;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.centen-box {
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 20px;
|
|
|
|
background-color: #ffffff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.box-title {
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding-bottom: 8px;
|
|
|
|
border-bottom: 1px solid #dfdfdf;
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dis-fx {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin: 0px auto;
|
|
|
|
margin-top: 10px;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hui-size {
|
|
|
|
color: #999999;
|
|
|
|
}
|
|
|
|
|
|
|
|
.anniu {
|
|
|
|
width: 95%;
|
|
|
|
height: 55px;
|
|
|
|
background: #1678ff;
|
|
|
|
color: white;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
border-radius: 8px;
|
|
|
|
margin: 30px auto;
|
|
|
|
}
|
|
|
|
</style>
|