carDamageDetail.vue
8.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!-- 报价单详情 -->
<template>
<d2-container class="order-detail">
<div class="d2-container-content">
<!-- <p class="edit-title">
报价单详情
</p> -->
<div class="form_gp">
<p class="edit-sub-title">
车辆信息
</p>
<el-form class="edit-sub-block" :inline="true">
<el-form-item label="车架号:">
{{ $$(detail, 'ownerDTO', 'carVin') }}
</el-form-item>
<el-form-item label="座位数:">
{{ $$(detail, 'ownerDTO', 'seat') }}
</el-form-item>
<el-form-item label="车辆发票价/元:">
{{ $$(detail, 'ownerDTO', 'price') / 100 }}
</el-form-item>
</el-form>
</div>
<div class="form_gp">
<p class="edit-sub-title">
车主信息
</p>
<el-form class="edit-sub-block" :inline="true">
<el-form-item label="姓名:">
{{ $$(detail, 'ownerDTO', 'owner') }}
</el-form-item>
<el-form-item label="手机号:">
{{ $$(detail, 'ownerDTO', 'phone') }}
</el-form-item>
<el-form-item label="证件号:">
{{ $$(detail, 'ownerDTO', 'certificateNo') }}
</el-form-item>
</el-form>
</div>
<div class="form_table_gp">
<p class="edit-sub-title">
商业险信息
</p>
<el-table :data="commerceInsureList" border
:header-cell-style="{ 'text-align': 'center', 'background-color': '#fafafa' }" style="width: 100%">
<el-table-column prop="company" align="center" label="保险公司" />
<el-table-column prop="base" align="center" label="基础车损险">
<template slot-scope="scope">{{ scope.row.base / 100 }}元</template>
</el-table-column>
<el-table-column prop="three" align="center" label="第三方责任险" />
<el-table-column prop="threePremium" align="center" label="保费">
<template slot-scope="scope">{{ scope.row.threePremium / 100 }}元</template>
</el-table-column>
<el-table-column prop="driver" align="center" label="车上人员责任险(司机)" />
<el-table-column prop="carInsidePremium" align="center" label="保费">
<template slot-scope="scope">{{ scope.row.carInsidePremium / 100 }}元</template>
</el-table-column>
<el-table-column prop="passenger" align="center" label="车上人员责任险(乘客)" />
<el-table-column prop="passengerPremium" align="center" label="保费">
<template slot-scope="scope">{{ scope.row.passengerPremium / 100 }}元</template>
</el-table-column>
</el-table>
</div>
<div class="form_gp">
<p class="edit-sub-title">
其他商业险
</p>
<el-table :data="otherInsuranceList" border
:header-cell-style="{ 'text-align': 'center', 'background-color': '#fafafa' }" style="width: 100%">
<el-table-column prop="typeName" align="center" label="商业险名称" />
<el-table-column prop="compensation" align="center" label="险种保额" />
<el-table-column prop="payPrice" align="center" label="保费">
<template slot-scope="scope">{{ scope.row.payPrice | divideByHundred }}元</template>
</el-table-column>
</el-table>
</div>
<div class="form_gp">
<p class="edit-sub-title">
交强和车船税
</p>
<el-form class="edit-sub-block" :inline="true">
<el-form-item label="交强险:">{{ $$(compulsoryInsure, 'compensation') }} / 保费:{{ $$(compulsoryInsure, 'payPrice')
/
100 }}元</el-form-item>
<el-form-item label="车船税:">{{ $$(vehicleInsure, 'compensation') }}年 / 保费:{{ $$(compulsoryInsure, 'payPrice') /
100 }}元</el-form-item>
</el-form>
</div>
<div class="form_gp">
<p class="edit-sub-title">
增值车损险服务
</p>
<el-form class="edit-sub-block" :inline="true">
<el-form-item label="商品:" class="goods">
<img v-if="$$(detail, 'quotationGoodsInfo', 'titlePictureUrl')" class="order-img"
:src="$$(detail, 'quotationGoodsInfo', 'titlePictureUrl')" @click="handleEnlargeImg" />
{{ $$(detail, 'goodsName') }}
</el-form-item>
<el-form-item label="商品别名:" class="goods">
{{ $$(detail, 'goodsNameAlias') }}
</el-form-item>
<el-form-item label="增值权益价格/元:" style="width:450px">
{{ detail.quotedPriceUpdate / 100 }}
</el-form-item>
</el-form>
</div>
<!-- <p style="text-align:left; padding-left: 30px; margin: 0 0 16px 0;">
<el-button type="primary"
@click="handleClose">
返回
</el-button>
</p> -->
</div>
<el-dialog :visible="imgVisible" :before-close="handleEnlargeImg">
<img width="100%" :src="$$(detail, 'quotationGoodsInfo', 'titlePictureUrl') || ''" alt="图片" />
</el-dialog>
</d2-container>
</template>
<script>
import { deepClone } from '@/common/util'
import { payType } from '@/common/constant.js'
import dayjs from 'dayjs'
// import { quotationFindById } from "@api/vehicleDamage"
export default {
name: 'VehicleDamageDetail',
components: {},
filters: {
// 除以100保留两位小数点
divideByHundred: str => {
let floatVal = parseFloat(str)
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 100) / 10000
let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.')
if (searchVal < 0) {
searchVal = strVal.length
strVal += '.'
}
while (strVal.length <= searchVal + 2) {
strVal += '0'
}
return parseFloat(strVal)
},
// 乘以100保留两位小数点
multipliedByHundred: str => {
let floatVal = parseFloat(str)
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 10000) / 100
let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.')
if (searchVal < 0) {
searchVal = strVal.length
strVal += '.'
}
while (strVal.length <= searchVal + 2) {
strVal += '0'
}
return parseFloat(strVal)
}
},
data() {
return {
imgVisible: false,
detail: {},
commerceInsureList: [], //商业险
compulsoryInsure: {}, //交强险
vehicleInsure: {}, //车船税
otherInsuranceList: []
}
},
computed: {},
mounted() {
this.detail = this.$route.query
this.quotationFindById()
},
methods: {
handleEnlargeImg() {
this.imgVisible = !this.imgVisible
},
handleClose() {
this.$router.push({ name: 'vehicleDamageList' })
this.close({ tagName: '/vehicleDamageDetail' })
},
quotationFindById() {
this.$apis.order.quotationFindByIdApi({ id: this.detail.id }).then(res => {
this.detail = res
if (this.detail.insureDTOList && this.detail.insureDTOList.length > 0) {
this.detail.insureDTOList.forEach(item => {
//保险类型(0-商业,1-交强,2-车船,3-增值车损,4-other)
if (item.type == 0) {
this.commerceInsureList.push(item)
} else if (item.type == 1) {
this.compulsoryInsure = item
} else if (item.type == 2) {
this.vehicleInsure = item
} else if (item.type == 4) {
this.otherInsuranceList.push(item)
}
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.order-detail {
.d2-container-content {
margin-top: 0 !important;
background-color: #fff;
}
.edit-title {
// padding-left: 0;
}
.form_gp {
color: #333333;
padding: 20px 30px;
border-bottom: 1px solid #eee;
// h4{
// margin: 0 0 10px;
// }
.edit-sub-title {
font-weight: bold;
margin-bottom: 10px;
}
.edit-sub-block {
padding: 0 16px;
}
.el-form-item {
width: 400px;
margin-bottom: 0px;
}
.goods {
// height: 100px;
::v-deep .el-form-item__content {
max-width: 240px;
word-break: break-all;
}
// display: flex;
}
.order-img {
width: 80px;
height: 80px;
cursor: pointer;
vertical-align: middle;
}
}
.form_table_gp {
padding: 20px 30px;
margin-bottom: 20px;
}
}
.signRefundBtn {
margin-left: 10px;
.signRefundIcon {
width: 12px;
margin-right: 5px;
}
span {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>