|
@@ -1,54 +1,59 @@
|
|
<template>
|
|
<template>
|
|
<view class="order-pages">
|
|
<view class="order-pages">
|
|
- <u-cell-group>
|
|
|
|
- <u-cell-item title="订单状态" :arrow="false">
|
|
|
|
- <view slot="right-icon">
|
|
|
|
- <text :class="orderInfo.orderStatus">{{getOptionName(orderStatusList,orderInfo?orderInfo.orderStatus:'')}}</text>
|
|
|
|
|
|
+ <view class="order-info">
|
|
|
|
+ <u-cell-group>
|
|
|
|
+ <u-cell-item title="订单状态" :arrow="false">
|
|
|
|
+ <view slot="right-icon">
|
|
|
|
+ <text :class="orderInfo.orderStatus">{{getOptionName(orderStatusList,orderInfo?orderInfo.orderStatus:'')}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="订单编号" :arrow="false" >
|
|
|
|
+ {{orderInfo.orderNo}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="创建时间" :arrow="false" >
|
|
|
|
+ {{orderInfo.orderTime}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="服务网点" :arrow="false">
|
|
|
|
+ {{orderInfo.storeName}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="服务项目" :arrow="false">
|
|
|
|
+ {{orderInfo.itemName}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="手机号" :arrow="false">
|
|
|
|
+ {{orderInfo.customerMobile}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="支付方式" :arrow="false">
|
|
|
|
+ {{orderInfo.payType}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="应付金额" :arrow="false">
|
|
|
|
+ ¥{{orderInfo.payableAmount}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="优惠价" :arrow="false">
|
|
|
|
+ {{orderInfo.couponAmount?orderInfo.couponAmount:0}}
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ <u-cell-item title="实付金额" :arrow="false">
|
|
|
|
+ <text class="order-price">¥{{orderInfo.payStatus=='paid' ? orderInfo.paymentAmount : 0}}</text>
|
|
|
|
+ </u-cell-item>
|
|
|
|
+ </u-cell-group>
|
|
|
|
+ <view class="order-photo">
|
|
|
|
+ <view v-if="orderInfo.beginImage">
|
|
|
|
+ <view>洗车前</view>
|
|
|
|
+ <u-image width="100%" height="400rpx" :src="orderInfo.beginImage"></u-image>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if="orderInfo.endImage">
|
|
|
|
+ <view>洗车后</view>
|
|
|
|
+ <u-image width="100%" height="400rpx" :src="orderInfo.endImage"></u-image>
|
|
</view>
|
|
</view>
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="订单编号" :arrow="false" >
|
|
|
|
- {{orderInfo.orderNo}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="创建时间" :arrow="false" >
|
|
|
|
- {{orderInfo.orderTime}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="服务网点" :arrow="false">
|
|
|
|
- {{orderInfo.storeName}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="服务项目" :arrow="false">
|
|
|
|
- {{orderInfo.itemName}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="手机号" :arrow="false">
|
|
|
|
- {{orderInfo.customerMobile}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="支付方式" :arrow="false">
|
|
|
|
- {{orderInfo.payType}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="应付金额" :arrow="false">
|
|
|
|
- ¥{{orderInfo.payableAmount}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="优惠价" :arrow="false">
|
|
|
|
- {{orderInfo.couponAmount?orderInfo.couponAmount:0}}
|
|
|
|
- </u-cell-item>
|
|
|
|
- <u-cell-item title="实付金额" :arrow="false">
|
|
|
|
- <text class="order-price">¥{{orderInfo.payStatus=='已支付' ? orderInfo.paymentAmount : 0}}</text>
|
|
|
|
- </u-cell-item>
|
|
|
|
- </u-cell-group>
|
|
|
|
- <view class="order-photo">
|
|
|
|
- <view v-if="orderInfo.beginImage">
|
|
|
|
- <view>洗车前</view>
|
|
|
|
- <u-image width="100%" height="400rpx" :src="orderInfo.beginImage"></u-image>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="orderInfo.endImage">
|
|
|
|
- <view>洗车后</view>
|
|
|
|
- <u-image width="100%" height="400rpx" :src="orderInfo.endImage"></u-image>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view v-if="orderInfo.orderStatus=='UN_PAY'" class="footer">
|
|
|
|
+ <u-button @click="cancleOrder" type="error" plain>取消订单</u-button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {orderDetail} from '@/api/order.js'
|
|
|
|
|
|
+ import {orderDetail, cancleOrder} from '@/api/order.js'
|
|
import {getLookUpDatas} from '@/api/data.js'
|
|
import {getLookUpDatas} from '@/api/data.js'
|
|
export default{
|
|
export default{
|
|
data() {
|
|
data() {
|
|
@@ -85,45 +90,71 @@
|
|
} else {
|
|
} else {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 取消订单
|
|
|
|
+ cancleOrder (){
|
|
|
|
+ cancleOrder({id:this.orderInfo.id}).then(res=>{
|
|
|
|
+ if (res.status==200) {
|
|
|
|
+ this.toashMsg(res.message)
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ },500)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
+ page {
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
.order-pages{
|
|
.order-pages{
|
|
width: 100%;
|
|
width: 100%;
|
|
- .u-cell{
|
|
|
|
- padding:10rpx 32rpx;
|
|
|
|
- }
|
|
|
|
- .order-photo{
|
|
|
|
- padding:0 30rpx;
|
|
|
|
- >view{
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 20rpx;
|
|
|
|
|
|
+ height: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ .order-info{
|
|
|
|
+ width: 100%;
|
|
|
|
+ flex: 1;
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
+ .u-cell{
|
|
|
|
+ padding:10rpx 32rpx;
|
|
|
|
+ }
|
|
|
|
+ .order-photo{
|
|
|
|
+ padding:0 30rpx;
|
|
|
|
+ >view{
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .FINISHED{
|
|
|
|
+ color: #00aa00;
|
|
|
|
+ }
|
|
|
|
+ .UN_PAY{
|
|
|
|
+ color: #ff0000;
|
|
|
|
+ }
|
|
|
|
+ .CANCELED{
|
|
|
|
+ color: #7e7b88;
|
|
|
|
+ }
|
|
|
|
+ .PAID{
|
|
|
|
+ color: #00aaff;
|
|
|
|
+ }
|
|
|
|
+ .REFUNDING{
|
|
|
|
+ color: #00557f;
|
|
|
|
+ }
|
|
|
|
+ .REFUNDED{
|
|
|
|
+ color: #005500;
|
|
|
|
+ }
|
|
|
|
+ .order-price{
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ color: red;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .FINISHED{
|
|
|
|
- color: #00aa00;
|
|
|
|
- }
|
|
|
|
- .UN_PAY{
|
|
|
|
- color: #ff0000;
|
|
|
|
- }
|
|
|
|
- .CANCELED{
|
|
|
|
- color: #7e7b88;
|
|
|
|
- }
|
|
|
|
- .PAID{
|
|
|
|
- color: #00aaff;
|
|
|
|
- }
|
|
|
|
- .REFUNDING{
|
|
|
|
- color: #00557f;
|
|
|
|
- }
|
|
|
|
- .REFUNDED{
|
|
|
|
- color: #005500;
|
|
|
|
- }
|
|
|
|
- .order-price{
|
|
|
|
- font-size: 36rpx;
|
|
|
|
- color: red;
|
|
|
|
|
|
+ .footer{
|
|
|
|
+ padding: 20rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|