Files
barter-app/components/store-order-details/store-order-details.vue
zhangmanman ec3c9428b3 更新代码
2021-09-23 10:18:51 +08:00

253 lines
7.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<view class="OrderInfo">
<!-- 订单状态 -->
<view class="order-status">
<block v-if="listType == 'deliver'">
<view class="info">
{{info.state_text}}
</view>
</block>
<block v-else>
<view class="info" v-if="info.state">
{{info.state.text}}
<span>{{info.state.remark}}</span>
</view>
</block>
<image src="../../static/icons/fire.png" mode="widthFix"></image>
</view>
<!-- 订单信息 -->
<view class="goods-info1">
<view class="top">
<view class="company">
<view class="company-logo" v-if="info.shop">
<image :src="info.shop.cover" mode="aspectFill" />
<view class="name nowrap">{{info.shop.name}}</view>
</view>
<view class="flexrow">
<view class="no nowrap" v-if="listType == 'deliver'">退货单号 {{info.shipment_no}}</view>
<view class="no nowrap" v-else>退货单号 {{info.refund_no}}</view>
</view>
</view>
</view>
<view class="goods-info">
<image class="goods-img" v-if="info.goods_sku" :src="info.goods_sku.cover" mode="aspectFill" />
<view class="goods" v-if="info.goods_sku">
<view class="nowrap name">{{info.goods_sku.goods_name}}</view>
<view class="sku">数权个数 <span>x {{info.qty}}</span> </view>
</view>
</view>
</view>
<view class="goods-info1">
<view class="goods-type">创建退货时间 <span>{{info.created_at}}</span></view>
<view class="goods-type">运费 <span>自行承担运费</span></view>
<view class="goods-type">退货数量 <span>{{info.qty}}</span></view>
</view>
<!-- 操作相关 -->
<view class="actions">
<view class="nowPay" @click="orderRun">返回列表</view>
<view v-if="listType != 'deliver'" @click="$Router.push({name: 'storeJournal', params: {id: info.refund_id}})" class="nowPay">查看退货日志</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"storeOrderDet",
props:{
// 数据列表
info : {},
listType: ''
},
created() {
},
methods: {
// 返回上一页
orderRun() {
uni.navigateBack({
delta: 1
})
}
}
}
</script>
<style lang="scss" scoped>
.OrderInfo {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
padding-bottom: 80rpx;
}
.order-status {
width: 100%;
height: 300rpx;
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
color: #Fff;
font-size: 36rpx;
padding: 30rpx 50rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.info {
font-size: 36rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
span {
font-size: 28rpx;
padding-top: 30rpx;
}
}
image {
width: 200rpx;
}
}
// 订单信息
.goods-info1 {
padding: 20rpx 40rpx;
background-color: #fff;
margin-bottom: $margin;
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #EFF4F2;
.company-logo {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.name {
width: 600rpx;
font-size: 30rpx;
color: #484848;
font-weight: bold;
}
.no {
margin-top: 16rpx;
font-size: $title-size*0.8;
color: #999;
}
}
}
.goods-info {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
margin-top: 40rpx;
.goods-img {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.goods {
width: calc(100% - 120rpx);
padding: 0 20rpx;
box-sizing: border-box;
.sku {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin-top: 20rpx;
font-size: 28rpx;
color: #999;
}
}
}
.goods-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
}
}
// 操作按钮
.actions {
position: fixed;
bottom: 0;
left: 0;
right: 0;
border-top: solid 1rpx #f2f2f2;
padding-top: 18rpx;
padding-right: 30rpx;
padding-left: 30rpx;
height: 110rpx;
background: white;
display: flex;
flex-wrap: wrap;
flex-direction: row-reverse;
.nowPay {
margin-left: 20rpx;
height: 54rpx;
line-height: 50rpx;
box-sizing: border-box;
border: solid 1rpx #747788;
padding: 0 20rpx;
font-size: 26rpx;
border-radius: 40rpx;
margin-top: 10rpx;
&.actions-color {
color: #e1293f;
border-color: #ec96a0;
}
}
.cancelOrder {
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
background-color: #DD524D;
}
.logistics {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.sign {
background-color: #DD524D;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
.evaluate {
background-color: $main-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
margin-left: 20rpx;
margin-top: 20rpx;
}
}
</style>