Commit aae89676 by weijiguang

统一订单状态

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