details-item.vue
3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<template>
<view style="background-color: #fff;">
<view class="order-item">
<!-- 待取货 -->
<view class="pickup-code" v-if="status === '3'" @click="checkOrder(item,index)">
<image v-if="!item.checkType" src="/static/checkbox.png" mode=""></image>
<image v-else src="/static/checked.png" mode=""></image>
<text style="margin: 0 12rpx 0 18rpx;font-size: 28rpx;">取货码</text>
<text class="code-number">{{item.quhuo_code}}</text>
</view>
<!-- 待接单 -->
<view class="address-wrap">
<view class="" v-if="status === '2'||status === '4'" @click="checkOrder(item,index)">
<image v-if="!item.checkType" :style="{'margin-right':status==='2'||status === '4'?'12rpx':''}"
src="/static/checkbox.png" mode=""></image>
<image v-else :style="{'margin-right':status==='2'||status === '4'?'12rpx':''}"
src="/static/checked.png" mode=""></image>
</view>
<view class="address">{{item.sh_address}}</view>
</view>
<!-- 收货地址 -->
<view :style="{'margin-left':status==='2'||status === '4'?'46rpx':''}" class="address-desc">
<text style="font-size: 26rpx;">{{item.sh_name}}</text>
<text style="margin-left: 16rpx;">{{item.sh_mobile}}</text>
</view>
<!-- 订单详细 -->
<view class="shopping-desc">
<!-- 订单编号 -->
<view class="title">订单编号:{{item.order_no}}</view>
<!-- 具体商品 -->
<view class="shopping-item" v-for="(it,idx) in item.goods_detail" :key="it.id"
:style="{'margin-bottom':index!==1?'48rpx':''}">
<image :src="it.image" mode=""></image>
<view class="right-desc">
<view class="desc-title">{{it.goods_name}}</view>
<view class="product-specifications">
<text>{{it.goods_attr}}</text><text>x{{it.total_num}}</text>
</view>
<view v-if="it.describe!=''" class="expedited-orders">{{it.describe}}</view>
</view>
</view>
</view>
</view>
<view class="split-line"></view>
</view>
</template>
<script>
export default {
props: {
status: {
type: String,
default: '2'
},
item: {
type: Object,
},
index: {
type: String,
},
},
data() {
return {
cur: ''
}
},
methods: {
// 选择订单
checkOrder(item, index) {
console.log(item, index, '选择订单')
this.$emit('isCheck',index)
}
}
}
</script>
<style lang="scss">
.order-item {
@include wrapPadding(750rpx, 32rpx, 24rpx, 32rpx, 24rpx);
width: 702rpx;
}
.pickup-code {
font-weight: 700;
@include flexcenter();
image {
@include commonIconWh(36rpx);
}
.code-number {
color: #EC3323;
font-size: 55rpx;
}
}
.address-wrap {
@include flexcenter();
margin: 16rpx 0 8rpx 0;
image {
@include commonIconWh(36rpx);
}
.address {
font-size: 28rpx;
font-weight: 700;
}
}
.shopping-desc {
@include wrapPadding(702rpx, 24rpx, 24rpx, 24rpx, 24rpx);
margin-top: 16rpx;
padding: 24rpx;
border-radius: 16rpx;
background: #f5f5f5ff;
.title {
margin-bottom: 14rpx;
}
.shopping-item {
@include flexCj();
height: 160rpx;
border-radius: 8rpx;
image {
@include commonIconWh(160rpx, 16rpx);
margin-right: 16rpx;
}
.right-desc {
height: 160rpx;
.desc-title {
width: 478rpx;
@include oneLine(2);
}
.product-specifications {
@include flexCj();
color: #00000066;
margin-top: 8rpx;
}
.expedited-orders {
color: #EC3323;
margin-top: 8rpx;
padding-left: 16rpx;
width: 478rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 8rpx;
background: #ffffffff;
}
}
}
}
.split-line {
width: 750rpx;
height: 16rpx;
background: #f5f5f5ff;
}
</style>