Commit 83b3a187 by weijiguang

优化结算、订单ui

parent 31e89ad2
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<h3>门店确认</h3> <h3>门店确认</h3>
<div class="address"> <div class="address">
<div class="address_1">{{ shopData.name }}</div> <div class="address_1">{{ shopData.name }}</div>
<div class="address_2">距您{{ shopData.distance }},请确定门店后下单</div> <div v-if="shopData.distance" class="address_2">距您{{ shopData.distance }},请确定门店后下单</div>
<div v-else class="address_2">请确定门店后下单</div>
</div> </div>
<div class="take_order"> <div class="take_order">
<div class="title">取单时间</div> <div class="title">取单时间</div>
...@@ -26,7 +27,10 @@ ...@@ -26,7 +27,10 @@
</div> </div>
<div class="goods_psce"> <div class="goods_psce">
<div class="psce_name"> <div class="psce_name">
<span v-for="rule in item.sku.rules" :key="rule.ruleId">{{ rule.ruleName }}/</span> <span v-for="(rule,index) in item.sku.rules" :key="rule.ruleId">
{{ rule.ruleName }}
<span v-if="index!=item.sku.rules.length-1">/</span>
</span>
</div> </div>
<div class="size">x {{ item.num }}</div> <div class="size">x {{ item.num }}</div>
</div> </div>
...@@ -345,7 +349,7 @@ export default { ...@@ -345,7 +349,7 @@ export default {
.goods { .goods {
margin-top: 42rpx; margin-top: 42rpx;
border-bottom: 1rpx solid #EEEEEE; border-bottom: 1rpx solid #EEEEEE;
padding-bottom: 20rpx; padding-bottom: 30rpx;
.goods_item { .goods_item {
display: flex; display: flex;
...@@ -356,7 +360,7 @@ export default { ...@@ -356,7 +360,7 @@ export default {
height: 80rpx; height: 80rpx;
width: 80rpx; width: 80rpx;
background-color: #eee; background-color: #eee;
margin-right: 50rpx; margin-right: 30rpx;
} }
.goods_text { .goods_text {
...@@ -400,15 +404,12 @@ export default { ...@@ -400,15 +404,12 @@ export default {
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
} }
.discount { .discount {
margin-top: 15rpx; margin-top: 15rpx;
padding-top: 15rpx; padding-top: 15rpx;
.discount_1 { .discount_1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -419,7 +420,6 @@ export default { ...@@ -419,7 +420,6 @@ export default {
color: #333333; color: #333333;
.price { .price {
font-family: Arial-BoldMT, Arial; font-family: Arial-BoldMT, Arial;
font-weight: normal; font-weight: normal;
color: #EB5F17; color: #EB5F17;
...@@ -450,7 +450,7 @@ export default { ...@@ -450,7 +450,7 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 52rpx; margin-top: 30rpx;
.size { .size {
font-size: 24rpx; font-size: 24rpx;
...@@ -464,7 +464,6 @@ export default { ...@@ -464,7 +464,6 @@ export default {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 600; font-weight: 600;
color: #000000; color: #000000;
} }
.money { .money {
......
...@@ -18,23 +18,7 @@ ...@@ -18,23 +18,7 @@
<h3 class="order_adrass">{{ item.shop.name }}</h3> <h3 class="order_adrass">{{ item.shop.name }}</h3>
<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">{{ getStateText(item.state) }}></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> </view>
<div class="order_content"> <div class="order_content">
<view> <view>
...@@ -102,9 +86,46 @@ export default { ...@@ -102,9 +86,46 @@ export default {
computed: { computed: {
userms() { userms() {
return this.$store.getters.Authorization; return this.$store.getters.Authorization;
}, }
}, },
methods: { methods: {
getStateText(state) {
state = '' + state;
switch (state) {
case '1':
return '未支付'
case '2':
return '待制作'
case '3':
return '制作中'
case '4':
return '待取餐'
case '5':
return '取餐中'
case '6':
return '已完成'
case '7':
return '待取超时'
case '8':
return '已取消'
case '9':
return '已取消'
case '10':
return '已取消'
case '11':
return '已取消'
case '12':
return '退款中'
case '13':
return '退款失败'
case '14':
return '部分退款'
case '15':
return '已退款'
default:
return '未知状态'
}
},
async oneMoreOrder(item) { async oneMoreOrder(item) {
uni.removeStorageSync('shopCarInfo'); uni.removeStorageSync('shopCarInfo');
$EventBus.$emit('updateCar'); $EventBus.$emit('updateCar');
......
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