k94314517
2024-04-09 02bc3bfe47e3d5311a0bb041c94e70a34b1ca73c
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
<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>