Commit aae89676 by weijiguang

统一订单状态

parent 618f048e
<template> <template>
<div class="pages"> <div class="pages">
<div class="order_status"> <div class="order_status">
<view class="status_text">{{ orderStatusText }}</view> <view class="status_text">{{ orderStatusText }}</view>
<div class="btns"> <div class="btns">
<a type="primary" @click="cancelOrder" v-if="orderInfo.state == 1" class="btn">取消订单</a> <a type="primary" @click="cancelOrder" v-if="orderInfo.state == 1" class="btn_cancel">取消订单</a>
<a type="primary" @click="PayNow" v-if="orderInfo.state == 1" class="btn">立即支付</a> <a type="primary" @click="PayNow" v-if="orderInfo.state == 1" class="btn">立即支付</a>
<a type="primary" @click="toRefund" v-if="orderInfo.state == 2" class="btn">申请退款</a> <a type="primary" @click="toRefund" v-if="orderInfo.state == 2" class="btn">申请退款</a>
<a type="primary" @click="oneMoreOrder(orderInfo)" v-if="!qrShow || orderInfo.state == 6" <a type="primary" @click="oneMoreOrder(orderInfo)" class="btn">再来一单</a>
class="btn">再来一单</a>
</div> </div>
</div> </div>
<div class="order_flow"> <div class="order_flow">
...@@ -197,16 +195,32 @@ export default { ...@@ -197,16 +195,32 @@ export default {
isBuildQrcode() { isBuildQrcode() {
return return
}, },
// 1 未支付
// 2 已支付
// 3 支付制作中
// 4 制作完成未取
// 5 取餐中
// 6 正常完成
// 7 待取超时
// 8 未支付取消
// 9 支付后制作前取消
// 10 制作中取消
// 11 制作完成取消
// 12 退款中
// 13 退款失败
// 14 部分退款
// 15 已退款
// 50 其他人工干预状态
orderStatusText() { orderStatusText() {
switch (this.orderInfo.state) { switch (this.orderInfo.state) {
case '1': case '1':
return '未支付' return '未支付'
case '2': case '2':
return '已支付' return '待制作'
case '3': case '3':
return '排队中' return '制作中'
case '4': case '4':
return '制作完成' return '待取餐'
case '5': case '5':
return '取餐中' return '取餐中'
case '6': case '6':
...@@ -282,8 +296,21 @@ export default { ...@@ -282,8 +296,21 @@ export default {
color: #FFFFFF; color: #FFFFFF;
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
}
.btn_cancel {
width: 160rpx;
height: 52rpx;
border: 1rpx solid #006ECF;
border-radius: 6rpx;
display: inline-block;
margin: 20rpx;
padding: 0;
line-height: 52rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #006ECF;
font-size: 20rpx;
text-align: center;
} }
} }
......
...@@ -19,11 +19,10 @@ ...@@ -19,11 +19,10 @@
:src="item.pics.thumbnailApplet"></image> :src="item.pics.thumbnailApplet"></image>
<image v-else class="goods_img" :src="item.pics.thumbnail"></image> <image v-else class="goods_img" :src="item.pics.thumbnail"></image>
<div class="goods_text"> <div class="goods_text">
<div class="goods_name"> <div class="goods_name">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="price">¥{{ setPrice(item.sku.price) }}</div> <div class="price">¥{{ setPrice(item.sku.discount) }}</div>
</div> </div>
<div class="goods_psce"> <div class="goods_psce">
<div class="psce_name"> <div class="psce_name">
...@@ -33,7 +32,7 @@ ...@@ -33,7 +32,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="discount"> <!-- <div class="discount">
<div class="discount_1"> <div class="discount_1">
<div class="name">优惠免减</div> <div class="name">优惠免减</div>
<div class="price">- ¥{{ itemReduction(item.sku.discount, item.sku.price, item.num) }}</div> <div class="price">- ¥{{ itemReduction(item.sku.discount, item.sku.price, item.num) }}</div>
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,7 @@
<div class="name">特惠价</div> <div class="name">特惠价</div>
<div class="price">¥{{ setPrice(item.sku.discount * item.num) }}</div> <div class="price">¥{{ setPrice(item.sku.discount * item.num) }}</div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="total"> <div class="total">
...@@ -67,9 +66,9 @@ ...@@ -67,9 +66,9 @@
<span class="name">合计</span> <span class="name">合计</span>
<span class="price">{{ totalPrice }}</span> <span class="price">{{ totalPrice }}</span>
</div> </div>
<div class="sun"> <!-- <div class="sun">
<div class="price">总优惠¥{{ reduction }}</div> <div class="price">总优惠¥{{ reduction }}</div>
</div> </div> -->
</div> </div>
<view class="payment" @click="messageAndSave" v-if="userms"> <view class="payment" @click="messageAndSave" v-if="userms">
付款 付款
...@@ -300,8 +299,7 @@ export default { ...@@ -300,8 +299,7 @@ export default {
.take_order { .take_order {
margin-top: 28rpx; margin-top: 28rpx;
padding-top: 28rpx; padding-top: 28rpx;
border-top: 1rpx solid #666; border-top: 1rpx solid #CCCCCC;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
...@@ -346,7 +344,7 @@ export default { ...@@ -346,7 +344,7 @@ export default {
.goods { .goods {
margin-top: 42rpx; margin-top: 42rpx;
border-bottom: 1rpx solid #666; border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx; padding-bottom: 20rpx;
.goods_item { .goods_item {
...@@ -520,6 +518,7 @@ export default { ...@@ -520,6 +518,7 @@ export default {
padding-left: 32rpx; padding-left: 32rpx;
.the_sum { .the_sum {
line-height: 92rpx;
.name { .name {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
...@@ -541,8 +540,6 @@ export default { ...@@ -541,8 +540,6 @@ export default {
font-weight: 400; font-weight: 400;
color: #FF0E00; color: #FF0E00;
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
<text class="order_time">{{ item.createdAt }}</text> <text class="order_time">{{ item.createdAt }}</text>
</view> </view>
<view class="order_status" v-if="item.state == 0">创建未校验</view> <view class="order_status" v-if="item.state == 0">创建未校验</view>
<view class=" order_status" v-if="item.state == 1">未支付</view> <view class="order_status" v-if="item.state == 1">未支付</view>
<view class=" order_status" v-if="item.state == 2">已支付</view> <view class="order_status" v-if="item.state == 2">待制作</view>
<view class=" order_status" v-if="item.state == 3">支付制作中</view> <view class="order_status" v-if="item.state == 3">制作中</view>
<view class=" order_status" v-if="item.state == 4">制作完成未取</view> <view class="order_status" v-if="item.state == 4">待取餐</view>
<view class=" order_status" v-if="item.state == 5">取餐中</view> <view class="order_status" v-if="item.state == 5">取餐中</view>
<view class=" order_status" v-if="item.state == 6">正常完成</view> <view class="order_status" v-if="item.state == 6">完成</view>
<view class=" order_status" v-if="item.state == 7">待取超时</view> <view class="order_status" v-if="item.state == 7">待取超时</view>
<view class=" order_status" v-if="item.state == 8">未支付取消</view> <view class="order_status" v-if="item.state == 8">取消</view>
<view class=" order_status" v-if="item.state == 9">支付后制作前取消</view> <view class="order_status" v-if="item.state == 9">取消</view>
<view class=" order_status" v-if="item.state == 10">制作中取消</view> <view class="order_status" v-if="item.state == 10">取消</view>
<view class=" order_status" v-if="item.state == 11">制作完成取消</view> <view class="order_status" v-if="item.state == 11">取消</view>
<view class=" order_status" v-if="item.state == 12">退款中</view> <view class="order_status" v-if="item.state == 12">退款中</view>
<view class=" order_status" v-if="item.state == 13">退款失败</view> <view class="order_status" v-if="item.state == 13">退款失败</view>
<view class=" order_status" v-if="item.state == 14">部分退款</view> <view class="order_status" v-if="item.state == 14">部分退款</view>
<view class=" order_status" v-if="item.state == 15">已退款</view> <view class="order_status" v-if="item.state == 15">已退款</view>
<view class=" order_status" v-if="item.state == 50">其他人工干预状态</view> <view class="order_status" v-if="item.state == 50">未知状态</view>
</view> </view>
<div class="order_content"> <div class="order_content">
<view> <view>
......
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