init
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index"
|
||||
},
|
||||
"navigationBarTitleText": "出险详情"
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/* pages/backlog/insurance/insurance.wxss */
|
||||
.container {
|
||||
height: 100vh;
|
||||
padding-top: 2px;
|
||||
box-sizing: border-box;
|
||||
background: #EFF1F4;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.bg {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.top {
|
||||
margin: 8px 8px 10px;
|
||||
padding: 12px 10px;
|
||||
margin-bottom: 8px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
.row:first-child {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.row {
|
||||
color: #2E3A4F;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.number-plate {
|
||||
display: flex;
|
||||
.status {
|
||||
padding: 0 6px;
|
||||
margin-right: 4px;
|
||||
border-radius: 2px;
|
||||
color: #FFFFFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
.status1 {
|
||||
background: linear-gradient(90deg, #0D92FF 0%, #38B1FE 100%);
|
||||
}
|
||||
.status2 {
|
||||
background: linear-gradient(270deg, #4CDBAD 0%, #2FCBAB 100%);
|
||||
}
|
||||
.status3 {
|
||||
background: linear-gradient(270deg, #A1A8BB 0%, #838EAA 100%);
|
||||
}
|
||||
.val {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.project-name, .code {
|
||||
font-size: 14px;
|
||||
}
|
||||
.time {
|
||||
font-size: 14px;
|
||||
color: #858CA0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.detail-container {
|
||||
max-height: calc(100vh - 72px - 80px);
|
||||
box-sizing: border-box;
|
||||
padding: 0px 8px 0px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.tabs {
|
||||
display: flex;
|
||||
.tab {
|
||||
width: 50%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
// background: #fff;
|
||||
border-radius: 8px 8px 0 0;
|
||||
color: #4381FC;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
.bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.value {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.active::after {
|
||||
content: '';
|
||||
width: 26px;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
.content-borderall {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.content {
|
||||
max-height: calc(100vh - 72px - 80px - 80px);
|
||||
padding: 12px 8px;
|
||||
// box-sizing: border-box;
|
||||
border-radius: 0px 8px 8px 8px;
|
||||
background: #fff;
|
||||
overflow-y: auto;
|
||||
.row {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: center;
|
||||
.label {
|
||||
margin-right: 4px;
|
||||
color: #858CA0;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.val {
|
||||
color: #2E3A4F;
|
||||
font-size: 14px;
|
||||
}
|
||||
.pic-box {
|
||||
max-width: 70%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
.item {
|
||||
width: 84px;
|
||||
height: 84px;
|
||||
padding-left: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
width: 100%;
|
||||
padding: 10px 8px 30px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px 8px 0 0;
|
||||
box-shadow: 0px -2px 12px 0px rgba(0,0,0,0.2);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
.btn-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
// pages/backlog/insurance/insurance.ts
|
||||
import { getAction } from '../../../api/base';
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
tabActive: 0,
|
||||
id: '',
|
||||
item: {} as any
|
||||
},
|
||||
|
||||
getDetailInf() {
|
||||
let parms = {
|
||||
id: this.data.id
|
||||
};
|
||||
getAction('api/vehicles/backlog/getInsuranceRecordById', parms).then(
|
||||
(res: any) => {
|
||||
if (res.code == 200) {
|
||||
console.log(res.result);
|
||||
// res.result.forEach((item: any) => {
|
||||
res.result.accidentUrlList = res.result.accidentUrl
|
||||
? res.result.accidentUrl.split(',')
|
||||
: [];
|
||||
res.result.compensateAgreementUrlList = res.result
|
||||
.compensateAgreementUrl
|
||||
? res.result.compensateAgreementUrl.split(',')
|
||||
: [];
|
||||
res.result.lossAssessmentUrlList = res.result.lossAssessmentUrl
|
||||
? res.result.lossAssessmentUrl.split(',')
|
||||
: [];
|
||||
res.result.compensateUrlList = res.result.compensateUrl
|
||||
? res.result.compensateUrl.split(',')
|
||||
: [];
|
||||
res.result.otherUrlList = res.result.otherUrl
|
||||
? res.result.otherUrl.split(',')
|
||||
: [];
|
||||
// });
|
||||
this.setData({
|
||||
item: res.result
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
previewImg(e: any) {
|
||||
let that = this;
|
||||
let { index, key } = e.currentTarget.dataset;
|
||||
wx.previewImage({
|
||||
current: that.data.item[key][index | 0], // 当前显示图片的http链接 默认urls[0]
|
||||
urls: that.data.item[key] // 需要预览的图片http链接列表
|
||||
});
|
||||
},
|
||||
toFeedback() {
|
||||
let that = this;
|
||||
// 违章信息
|
||||
wx.setStorageSync('violation', '');
|
||||
// 跳转到违章处理反馈
|
||||
wx.navigateTo({
|
||||
url: '../insuranceFeedback/insuranceFeedback',
|
||||
success: function (res) {
|
||||
// 通过eventChannel向被打开页面传送数据
|
||||
res.eventChannel.emit('eventName', { ...that.data.item });
|
||||
},
|
||||
fail: e => {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
getApp().EventChannel = eventChannel;
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
let id = wx.getStorageSync('backlogInf').id;
|
||||
this.setData({
|
||||
id: id
|
||||
});
|
||||
this.getDetailInf();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {}
|
||||
});
|
||||
@@ -0,0 +1,137 @@
|
||||
<!--pages/backlog/insurance/insurance.wxml-->
|
||||
<view class="container">
|
||||
<view class="bg">
|
||||
<image src="../../../images/bg_page_blue.png" mode=""/>
|
||||
</view>
|
||||
<view class="top">
|
||||
<view class="row">
|
||||
<view class="code">{{item.id}}</view>
|
||||
<view class="number-plate">
|
||||
<view class="val">{{item.vehicleId_dictText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="project-name">{{item.projectId_dictText}}</view>
|
||||
<view class="time">{{item.insuranceDate}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-container">
|
||||
<view class="tabs">
|
||||
<view class="tab {{tabActive == 0 ? 'active' : ''}}" data-tab="0" catch:tap="changeTab">
|
||||
<view class="bg"><image src="../../../images/btn_l.png" mode=""/></view>
|
||||
<view class="value">出险信息</view>
|
||||
</view>
|
||||
<!-- <view class="tab {{tabActive == 1 ? 'active' : ''}}" data-tab="1" catch:tap="changeTab">报价信息</view> -->
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="row">
|
||||
<view class="label">保险公司</view>
|
||||
<view class="val">{{item.companyId_dictText ? item.companyId_dictText : '/'}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">理赔案号</view>
|
||||
<view class="val">{{item.insuranceNo ? item.insuranceNo : '/'}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">理赔金额</view>
|
||||
<view class="val">{{item.insurancePrice ? item.insurancePrice : '0'}}元</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">处理人</view>
|
||||
<view class="val"> {{item.handleUser ? item.handleUser : '/'}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">备注</view>
|
||||
<view class="val">{{item.remark ? item.remark : '/'}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">事故认定书</view>
|
||||
<view class="pic-box">
|
||||
<view class="item"
|
||||
wx:for="{{item.accidentUrlList}}"
|
||||
wx:key="index"
|
||||
wx:for-item="pic"
|
||||
wx:if="{{item.accidentUrlList.length > 0}}"
|
||||
data-index="{{index}}"
|
||||
data-key="accidentUrlList"
|
||||
bindtap="previewImg">
|
||||
<image src="{{pic}}" mode=""/>
|
||||
</view>
|
||||
<view class="val" wx:if="{{item.accidentUrlList.length == 0}}">无</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">赔偿协议书</view>
|
||||
<view class="pic-box">
|
||||
<view
|
||||
class="item"
|
||||
wx:for="{{item.compensateAgreementUrlList}}"
|
||||
wx:key="index"
|
||||
wx:for-item="pic"
|
||||
wx:if="{{item.compensateAgreementUrlList.length > 0}}"
|
||||
data-index="{{index}}"
|
||||
data-key="compensateAgreementUrlList"
|
||||
bindtap="previewImg">
|
||||
<image src="{{pic}}" mode=""/>
|
||||
</view>
|
||||
<view class="val" wx:if="{{item.compensateAgreementUrlList.length == 0}}">无</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">定损单</view>
|
||||
<view class="pic-box">
|
||||
<view
|
||||
class="item"
|
||||
wx:for="{{item.lossAssessmentUrlList}}"
|
||||
wx:key="index"
|
||||
wx:for-item="pic"
|
||||
wx:if="{{lossAssessmentUrlList.length > 0}}"
|
||||
data-index="{{index}}"
|
||||
data-key="lossAssessmentUrlList"
|
||||
bindtap="previewImg">
|
||||
<image src="{{pic}}" mode=""/>
|
||||
</view>
|
||||
<view class="val" wx:if="{{item.lossAssessmentUrlList.length == 0}}">无</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">理赔单据</view>
|
||||
<view class="pic-box">
|
||||
<view class="item"
|
||||
wx:for="{{item.compensateUrlList}}"
|
||||
wx:key="index"
|
||||
wx:for-item="pic"
|
||||
wx:if="{{item.compensateUrlList.length > 0}}"
|
||||
data-index="{{index}}"
|
||||
data-key="compensateUrlList"
|
||||
bindtap="previewImg">
|
||||
<image src="{{pic}}" mode=""/>
|
||||
</view>
|
||||
<view class="val" wx:if="{{item.compensateUrlList.length == 0}}">无</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">其他</view>
|
||||
<view class="pic-box">
|
||||
<view
|
||||
class="item"
|
||||
wx:for="{{item.otherUrlList}}"
|
||||
wx:key="index"
|
||||
wx:for-item="pic"
|
||||
wx:if="{{item.otherUrlList.length > 0}}"
|
||||
data-index="{{index}}"
|
||||
data-key="otherUrlList"
|
||||
bindtap="previewImg">
|
||||
<image src="{{pic}}" mode=""/>
|
||||
</view>
|
||||
<view class="val" wx:if="{{item.otherUrlList.length == 0}}">无</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="btn-box">
|
||||
<view class="btn" catch:tap="toFeedback">处理反馈</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user