<template>
|
<view class="box">
|
<view class="box_head" :style="{ background: returnStyle(info.solutionsStatus) }">
|
<view class="box_head_hz">
|
<view class="left">
|
<view class="left_top">
|
<text>{{info.name}}</text>
|
<text>{{IdCard(info.idcardNo, 2)}}|{{IdCard(info.idcardNo, 3)}}岁</text>
|
</view>
|
<view class="left_bottom">身份证号:{{info.idcardNo}}</view>
|
</view>
|
<image src="@/static/icon/progress_baozhangzhong@2x.png" mode="widthFix" v-if="info.solutionsStatus === 1"></image>
|
<image src="@/static/icon/progress_buzaibao.png" mode="widthFix" v-if="info.solutionsStatus === 2"></image>
|
</view>
|
</view>
|
<view class="box_title">投保记录</view>
|
<view class="box_list">
|
<view class="box_list_item" v-for="(item, index) in list" :key="index">
|
<view class="row">
|
<view class="row_label">保险方案:</view>
|
<view class="row_val">{{item.solutionName}}</view>
|
</view>
|
<view class="row">
|
<view class="row_label">派遣单位:</view>
|
<view class="row_val">{{item.duName}}</view>
|
</view>
|
<view class="row">
|
<view class="row_label">所属工种:</view>
|
<view class="row_val">{{item.worktypeName}}</view>
|
</view>
|
<view class="row">
|
<view class="row_label">保险生效期:</view>
|
<view class="row_val">{{item.startTime}}-{{item.endTime}}</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
id: null,
|
info: {},
|
list: []
|
};
|
},
|
onLoad(options) {
|
this.id = options.id
|
this.getDetails()
|
this.getInfo()
|
},
|
methods: {
|
getInfo() {
|
this.$u.api.memberInsuranceFindList({
|
memberId: this.id
|
}).then(res => {
|
if (res.code === 200) {
|
console.log(res)
|
this.list = res.data
|
}
|
})
|
},
|
IdCard(UUserCard, num) {
|
let idcard = UUserCard.toString();
|
if (num == 1) {
|
//获取出生日期
|
birth = idcard.substring(6, 10) + "-" + idcard.substring(10, 12) + "-" + idcard.substring(12, 14);
|
return birth;
|
}
|
if (num == 2) {
|
//获取性别
|
if (parseInt(idcard.substr(16, 1)) % 2 == 1) {
|
//男
|
return "男";
|
} else {
|
//女
|
return "女";
|
}
|
}
|
if (num == 3) {
|
//获取年龄
|
var myDate = new Date();
|
var month = myDate.getMonth() + 1;
|
var day = myDate.getDate();
|
var age = myDate.getFullYear() - idcard.substring(6, 10) - 1;
|
if (idcard.substring(10, 12) < month || idcard.substring(10, 12) == month && idcard.substring(12, 14) <= day) {
|
age++;
|
}
|
return age;
|
}
|
},
|
getDetails() {
|
this.$u.api.memberById(this.id)
|
.then(res => {
|
if (res.code === 200) {
|
this.info = res.data
|
}
|
})
|
},
|
returnStyle(type) {
|
if (type === 1) {
|
return 'linear-gradient(#97DDC5 0%, #F7F7F7 100%)'
|
} else {
|
return 'linear-gradient(#CDCDCD 0%, #F7F7F7 100%)'
|
}
|
}
|
}
|
}
|
</script>
|
<style>
|
page {
|
background-color: #f7f7f7;
|
}
|
</style>
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_list {
|
width: 100%;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
margin-top: 30rpx;
|
.box_list_item {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
border-radius: 16rpx;
|
background-color: #ffffff;
|
position: relative;
|
margin-bottom: 20rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
.row {
|
width: 100%;
|
display: flex;
|
align-items: flex-start;
|
margin-bottom: 16rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.row_label {
|
flex-shrink: 0;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
.row_val {
|
flex: 1;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
}
|
.green {
|
background: #26BE89;
|
}
|
.info {
|
background-color: #CCCCCC;
|
}
|
.status {
|
position: absolute;
|
top: 0;
|
right: 0;
|
width: 118rpx;
|
height: 52rpx;
|
line-height: 52rpx;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #FFFFFF;
|
font-style: normal;
|
text-align: center;
|
border-radius: 0rpx 16rpx 0rpx 32rpx;
|
}
|
}
|
}
|
.box_title {
|
width: 100%;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #222222;
|
font-style: normal;
|
margin-top: 10rpx;
|
}
|
.box_head {
|
width: 750rpx;
|
height: 220rpx;
|
padding: 30rpx;
|
box-sizing: border-box;
|
background: linear-gradient(#97DDC5 0%, #F7F7F7 100%);
|
.box_head_hz {
|
width: 100%;
|
height: 100%;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
background-color: #ffffff;
|
border-radius: 16rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.left {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
.left_top {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-weight: 500;
|
font-size: 36rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
&:nth-child(2) {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
font-style: normal;
|
margin-left: 16rpx;
|
}
|
}
|
}
|
.left_bottom {
|
width: 100%;
|
margin-top: 18rpx;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
}
|
image {
|
width: 100rpx;
|
height: 100rpx;
|
}
|
}
|
}
|
}
|
</style>
|