<template>
|
<view class="box">
|
<view class="box_head">
|
<view class="box_head_info">
|
<view class="box_head_info_title">{{info.solutionsName}}</view>
|
<view class="box_head_info_list">
|
<image src="@/static/icon/ic_toubao@2x.png" mode="widthFix"></image>
|
<view class="box_head_info_list_item">
|
<view class="label">保单号:</view>
|
<view class="value">{{code}}</view>
|
</view>
|
<view class="box_head_info_list_item">
|
<view class="label">保单生效期:</view>
|
<view class="value">{{info.startTime}}~{{info.endTime}}</view>
|
</view>
|
<view class="box_head_info_list_item">
|
<view class="label">批单生效期:</view>
|
<view class="value">{{startDate}}</view>
|
</view>
|
</view>
|
</view>
|
<view class="box_head_cate">
|
<text>更换派遣单位人员名单</text>
|
</view>
|
<view class="box_head_list">
|
<view class="box_head_list_item" v-for="(item, index) in user" :key="index">
|
<view class="dele" @click="dele(index)">
|
<image src="@/static/icon/ic_delete@2x.png" mode="widthFix"></image>
|
</view>
|
<view class="top">
|
<view class="top_a">
|
<text>{{item.memberName}}</text>
|
<text>{{IdCard(item.idcardNo, 2)}}|{{IdCard(item.idcardNo, 3)}}岁</text>
|
</view>
|
<view class="top_b">身份证号:{{item.idcardNo}}</view>
|
</view>
|
<view class="center"></view>
|
<view class="bottom">
|
<view class="bottom_item">
|
<view class="bottom_item_label">原派遣单位:</view>
|
<view class="bottom_item_val">{{item.oldDuName}}</view>
|
</view>
|
<view class="bottom_item">
|
<view class="bottom_item_label">原所属工种:</view>
|
<view class="bottom_item_val">{{item.oldWorkTypeName}}</view>
|
</view>
|
<view class="bottom_item">
|
<view class="bottom_item_label">更换后派遣单位:</view>
|
<view class="bottom_item_val">{{item.duName}}</view>
|
</view>
|
<view class="bottom_item">
|
<view class="bottom_item_label">更换后所属工种:</view>
|
<view class="bottom_item_val">{{item.workTypeName}}</view>
|
</view>
|
</view>
|
</view>
|
<view class="box_head_list_add" @click="jump">
|
<view class="box_head_list_add_yuan">
|
<view class="add_icon">+</view>
|
</view>
|
<text>添加人员</text>
|
</view>
|
</view>
|
<view style="width: 100%; height: calc(230rpx + env(safe-area-inset-bottom));"></view>
|
</view>
|
<view class="box_footer">
|
<view class="box_footer_xy">
|
<image src="@/static/icon/ic_tips@2x.png" mode="widthFix"></image>
|
<text>请阅读《投保须知》</text>
|
</view>
|
<view class="box_footer_info">
|
<view class="left">
|
更换派遣单位人数:{{user.length}}人
|
</view>
|
<view class="right">
|
<u-button type="primary" shape="circle" color="#437CB3" text="投保申请" @click="submit"></u-button>
|
</view>
|
</view>
|
<view style="width: 100%; height: env(safe-area-inset-bottom); background-color: #ffffff;"></view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
id: null,
|
codeId: null,
|
code: null,
|
startDate: null,
|
cyclePrice: null,
|
info: null,
|
user: []
|
};
|
},
|
onLoad(options) {
|
this.id = options.id
|
this.codeId = options.codeId
|
this.code = options.code
|
this.startDate = options.startDate
|
this.cyclePrice = options.cyclePrice
|
this.getDetails()
|
uni.$on('data', (res) => {
|
this.user.unshift(res)
|
})
|
},
|
methods: {
|
jump() {
|
uni.navigateTo({
|
url: `/pages/factory_change_personnel/factory_change_personnel?validTime=${this.startDate}&insuranceApplyId=${this.codeId}&solutionId=${this.id}`
|
})
|
},
|
dele(index) {
|
this.user.splice(index, 1)
|
},
|
submit() {
|
if (this.user.length === 0) return uni.showToast({
|
title: '至少选择一名人员',
|
icon: 'none'
|
})
|
this.$u.api.applyChangeCreate({
|
applyId: this.codeId,
|
changeDetailList: this.user,
|
validTime: this.startDate,
|
type: 1
|
}).then(res => {
|
if (res.code === 200) {
|
uni.showToast({ title: '提交成功', icon: 'success' })
|
setTimeout(() => {
|
uni.navigateBack({ delta: 2 })
|
}, 1500)
|
}
|
})
|
},
|
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.insuranceApplyById(this.codeId)
|
.then(res => {
|
this.info = res.data
|
})
|
}
|
}
|
}
|
</script>
|
<style>
|
page {
|
background-color: #f7f7f7;
|
}
|
</style>
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_footer {
|
width: 100%;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
.box_footer_xy {
|
width: 100%;
|
height: 80rpx;
|
display: flex;
|
align-items: center;
|
background: #FFF7E7;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
image {
|
width: 32rpx;
|
height: 32rpx;
|
margin-right: 16rpx;
|
}
|
text {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #437CB3;
|
font-style: normal;
|
}
|
}
|
.box_footer_info {
|
width: 100%;
|
height: 120rpx;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.left {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
height: 100%;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #666666;
|
font-style: normal;
|
}
|
.right {
|
flex-shrink: 0;
|
}
|
}
|
}
|
.box_head {
|
width: 100%;
|
height: 240rpx;
|
padding: 30rpx;
|
box-sizing: border-box;
|
background: linear-gradient( 180deg, #437CB3 0%, #F7F7F7 100%);
|
.box_head_info {
|
width: 100%;
|
padding: 32rpx 30rpx;
|
box-sizing: border-box;
|
background-color: rgba(255, 255, 255, 0.7);
|
border-radius: 16rpx;
|
.box_head_info_title {
|
font-weight: 500;
|
font-size: 40rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
.box_head_info_list {
|
width: 100%;
|
margin-top: 24rpx;
|
position: relative;
|
image {
|
width: 200rpx;
|
height: 202rpx;
|
position: absolute;
|
bottom: 0;
|
right: 0;
|
}
|
.box_head_info_list_item {
|
width: 100%;
|
display: flex;
|
align-items: flex-start;
|
margin-bottom: 20rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
.label {
|
flex-shrink: 0;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
.value {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
}
|
}
|
}
|
.box_head_cate {
|
width: 100%;
|
margin-top: 30rpx;
|
text {
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
}
|
.box_head_list {
|
width: 100%;
|
margin-top: 30rpx;
|
.box_head_list_item {
|
width: 100%;
|
padding: 24rpx 30rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
position: relative;
|
border-radius: 16rpx;
|
margin-bottom: 20rpx;
|
.dele {
|
width: 56rpx;
|
height: 56rpx;
|
position: absolute;
|
right: 0;
|
top: 0;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.top {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.top_a {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
.top_a_tips1 {
|
width: 64rpx;
|
height: 38rpx;
|
line-height: 38rpx;
|
text-align: center;
|
border-radius: 4rpx;
|
border: 1rpx solid #FF971D;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #FF971D;
|
font-style: normal;
|
margin-left: 8rpx;
|
}
|
.top_a_tips {
|
width: 64rpx;
|
height: 38rpx;
|
line-height: 38rpx;
|
text-align: center;
|
border-radius: 4rpx;
|
border: 1rpx solid #26BE89;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #26BE89;
|
font-style: normal;
|
margin-left: 8rpx;
|
}
|
text {
|
&:first-child {
|
font-weight: 500;
|
font-size: 30rpx;
|
color: #222222;
|
font-style: normal;
|
margin-right: 30rpx;
|
}
|
&:last-child {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
}
|
}
|
.top_b {
|
width: 100%;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
font-style: normal;
|
margin-top: 8rpx;
|
}
|
}
|
.center {
|
width: 100%;
|
margin: 20rpx 0;
|
border-bottom: 1rpx dashed #E5E5E5;
|
}
|
.bottom {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.bottom_item {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
margin-bottom: 16rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
.bottom_item_label {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
.bottom_item_val {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
}
|
}
|
}
|
.box_head_list_add {
|
width: 100%;
|
height: 280rpx;
|
background: #FFFFFF;
|
border-radius: 16rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
.box_head_list_add_yuan {
|
width: 68rpx;
|
height: 68rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border-radius: 36rpx;
|
border: 4rpx solid #437CB3;
|
.add_icon {
|
font-size: 55rpx;
|
color: #437CB3;
|
}
|
}
|
text {
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #437CB3;
|
font-style: normal;
|
margin-top: 24rpx;
|
}
|
}
|
}
|
}
|
}
|
</style>
|