demingshangjia/components/order-item/index.vue

105 lines
2.7 KiB
Vue
Raw Permalink Normal View History

2020-06-11 17:54:15 +08:00
<template>
<view class="item" @click="toDetailsPage">
2020-07-30 09:41:08 +08:00
<image :src="info.extend_order_goods[0].goods_image"></image>
2020-06-11 17:54:15 +08:00
<view class="goods">
2020-07-30 19:49:12 +08:00
<view class="box">
2020-07-29 20:35:33 +08:00
<view class="">
编号{{info.order_sn}}
</view>
2020-08-05 17:42:06 +08:00
<!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 6拒绝退款 -->
2020-07-30 19:49:12 +08:00
<view class="status" v-if="info.view_type==1">待处理订单</view>
<view class="status" v-else-if="info.view_type==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</view>
2020-08-06 10:04:38 +08:00
<view class="status" v-else-if="info.view_type==4">申请退款</view>
2020-07-30 19:49:12 +08:00
<view class="status" v-else-if="info.view_type==5">已退款订单</view>
2020-08-06 17:02:11 +08:00
<view class="status" v-else-if="info.view_type==6">商家同意</view>
<view class="status" v-else-if="info.view_type==7">商家拒绝</view>
2020-09-21 15:03:27 +08:00
<view class="status" v-else-if="info.view_type==10">待支付订单</view>
2020-07-29 20:35:33 +08:00
</view>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
2020-06-11 17:54:15 +08:00
<view class="info">
2020-08-06 17:02:11 +08:00
<view class="num">{{info.count_number}}件商品</view>
2020-09-20 18:19:35 +08:00
<view class="price">{{ info.view_type==10 ? "待支付" : "实付" }}<span>{{info.order_amount}}</span></view>
<view class="time">{{ info.view_type==10 ? info.add_time.slice(5,16) : info.payment_time.slice(5,16) }}</view>
2020-06-11 17:54:15 +08:00
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
2020-07-29 20:35:33 +08:00
cur: [Number, String],
info: Object
2020-06-11 17:54:15 +08:00
},
methods: {
toDetailsPage() {
uni.navigateTo({
2020-08-05 17:42:06 +08:00
url: '/pages/index/details?id=' + this.info.order_id+"&type="+this.info.view_type
2020-06-11 17:54:15 +08:00
});
},
},
};
</script>
<style lang="scss" scoped>
.item {
margin: 0 auto 20rpx;
width: 690rpx;
height: 220rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
2020-08-14 20:48:14 +08:00
padding: 20rpx 10rpx;
2020-06-11 17:54:15 +08:00
display: flex;
align-items: center;
> image {
width: 160rpx;
height: 160rpx;
flex-shrink: 0;
2020-08-14 20:48:14 +08:00
margin-right: 20rpx;
2020-06-11 17:54:15 +08:00
}
.goods {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
2020-07-30 19:49:12 +08:00
.box{
width: 100%;
display: flex;
justify-content: space-between;
font-size: 24rpx;
}
2020-06-11 17:54:15 +08:00
.status {
2020-07-30 19:49:12 +08:00
width: 120rpx;
2020-06-11 17:54:15 +08:00
align-self: flex-end;
2020-07-30 19:49:12 +08:00
font-size: 24rpx;
2020-06-11 17:54:15 +08:00
color: rgba(255,49,49,1);
margin-bottom: 30rpx;
}
.name {
width: 439rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
margin-bottom: 30rpx;
}
.info {
2020-08-14 20:48:14 +08:00
width: 470rpx;
2020-06-11 17:54:15 +08:00
display: flex;
align-items: center;
2020-08-14 20:48:14 +08:00
justify-content: space-between;
2020-06-11 17:54:15 +08:00
font-size: 26rpx;
color: rgba(102,102,102,1);
.price {
margin-left: 10rpx;
> span {
color: #FF780F;
}
}
}
2020-08-14 20:48:14 +08:00
.time {
font-size: 20rpx;
}
2020-06-11 17:54:15 +08:00
}
}
</style>