ViewTransferPage.vue
4.73 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<template>
<view class="upload-transfer-page">
<!-- 顶部导航栏 -->
<!-- 资料上传区域 -->
<!-- 机动车登记证书 -->
<view class="document-item">
<view class="document-header">
<view class="document-title"><span style="color: red">*</span>机动车登记证书 (大绿本)</view>
</view>
<view class="upload-placeholder" v-if="order">
<van-image v-for="certificate in order.registrationCertificate" use-error-slot width="96" fit="cover" radius="16rpx"
height="96" :src="certificate?.thumbUrl" @click="previewImage(certificate?.url)">
</van-image>
</view>
</view>
<!-- 新的机动车行驶证 -->
<view class="document-item">
<view class="document-header">
<view class="document-title"><span style="color: red">*</span>新的机动车行驶证</view>
</view>
<view class="upload-area-row" v-if="order&&order.vehicleLicense">
<!-- 主页 -->
<view class="upload-area">
<view class="upload-placeholder">
<van-image use-error-slot width="96" fit="cover" radius="16rpx"
height="96" :src="order.vehicleLicense[0]?.thumbUrl" @click="previewImage(order.vehicleLicense[0]?.url)">
</van-image>
</view>
</view>
<!-- 副页 -->
<view class="upload-area">
<view class="upload-placeholder">
<van-image use-error-slot width="96" fit="cover" radius="16rpx"
height="96" :src="order.vehicleLicense[1]?.thumbUrl" @click="previewImage(order.vehicleLicense[1]?.url)">
</van-image>
</view>
</view>
</view>
</view>
<!-- 新车牌号 -->
<view class="document-item">
<view class="document-form-item">
<view class="document-title" style="width: 120px"><span style="color: red">*</span>新车牌号</view>
<text style="font-size: 14px">{{ order?.newPlateNumber }}</text>
</view>
</view>
</view>
</template>
<script lang="ts">
import {Component, Vue} from "vue-facing-decorator";
import plateInput from "@/components/uni-plate-input/uni-plate-input.vue";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import {AuctionOrderController} from "@/api/AuctionOrderController";
@Component({
components: {plateInput}
})
export default class ViewTransferPage extends Vue {
orderId: number;
order: AuctionOrder = null;
created(): void {
const that = this;
onLoad((option) => {
this.orderId = option.orderId;
this.loadData();
});
// 每次都加载
onShow((option) => {
});
}
loadData(): void {
AuctionOrderController.getAuctionOrderDetailById(this.axios, this.orderId).then(res => {
this.order = res.data;
});
}
previewImage(url: string): void {
uni.previewImage({
urls: [url], // 需要预览的图片链接列表
current: 0, // 当前显示图片的索引
indicator: 'number', // 图片指示器样式
loop: false // 是否可循环预览
});
}
}
</script>
<style lang="scss" scoped>
/* 全局样式 */
.upload-transfer-page {
background-color: #F8F9FC;
min-height: 100vh;
}
/* 资料上传区域 */
/* 文档项 */
.document-item {
background-color: #fff;
padding: 30rpx;
margin-bottom: 16px;
}
.document-item:last-child {
margin-bottom: 0;
}
.document-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.document-title {
font-size: 16px;
font-weight: 400;
color: #333;
}
.view-example {
font-size: 28rpx;
color: #185EFE;
}
.document-desc {
font-size: 26rpx;
color: #999;
margin-bottom: 20rpx;
display: block;
}
.document-form-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
/* 上传区域 - 单行 */
.upload-area {
width: 120px;
height: 100px;
}
/* 上传区域 - 两行 */
.upload-area-row {
display: flex;
justify-content: left;
}
/* 上传占位符 */
/* 车牌号输入框 */
.license-plate-input {
width: 100%;
padding: 0 24rpx;
font-size: 15px;
color: #333;
box-sizing: border-box;
}
.placeholder-text {
color: #ccc;
}
</style>