<template> 
 | 
    <view class="box"> 
 | 
        <u-sticky offset-top="0"> 
 | 
            <view class="box_search"> 
 | 
                <u-search placeholder="搜索出险人姓名" :showAction="false" v-model="from.memberName" @search="search"></u-search> 
 | 
                <view class="box_search_cate"> 
 | 
                    <view @click="sele(index)" :class="index === num ? 'box_search_cate_item active' : 'box_search_cate_item'" v-for="(item, index) in cate" :key="index">{{item.name}}</view> 
 | 
                </view> 
 | 
            </view> 
 | 
        </u-sticky> 
 | 
        <view class="box_list" v-if="list.length > 0"> 
 | 
            <view class="box_list_item" v-for="(item, index) in list" :key="index" @click="jump(item.id)"> 
 | 
                <view class="status yellow" v-if="item.status === 0 || item.status === 2 || item.status === 3">处理中</view> 
 | 
                <view class="status info" v-if="item.status === 1">已撤案</view> 
 | 
                <view class="status info" v-if="item.status === 4">已结案</view> 
 | 
                <view class="top"> 
 | 
                    <text>{{item.memberName}}</text> 
 | 
                    <text>身份证号:{{item.memberIdcardNo}}</text> 
 | 
                </view> 
 | 
                <view class="center"></view> 
 | 
                <view class="bottom"> 
 | 
                    <view class="bottom_row"> 
 | 
                        <view class="bottom_row_label">报案日期:</view> 
 | 
                        <view class="bottom_row_val">{{item.createDate}}</view> 
 | 
                    </view> 
 | 
                    <view class="bottom_row"> 
 | 
                        <view class="bottom_row_label">报案人:</view> 
 | 
                        <view class="bottom_row_val">{{item.informantName}} {{item.informantPhone}}</view> 
 | 
                    </view> 
 | 
                </view> 
 | 
            </view> 
 | 
        </view> 
 | 
        <view class="box_wu" v-else> 
 | 
            <image src="@/static/icon/default_nodata@2x.png" mode="widthFix"></image> 
 | 
        </view> 
 | 
        <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);"></view> 
 | 
        <view class="box_footer"> 
 | 
            <u-button type="primary" shape="circle" color="#437CB3" text="新增报案理赔" @click="baoan"></u-button> 
 | 
        </view> 
 | 
    </view> 
 | 
</template> 
 | 
  
 | 
<script> 
 | 
    export default { 
 | 
        data() { 
 | 
            return { 
 | 
                num: 0, 
 | 
                from: { 
 | 
                    memberName: '', 
 | 
                    status: '' 
 | 
                }, 
 | 
                page: 1, 
 | 
                list: [], 
 | 
                next: false, 
 | 
                cate: [ 
 | 
                    { name: '全部', id: '' }, 
 | 
                    { name: '已完成', id: '4' }, 
 | 
                    { name: '处理中', id: '0' }, 
 | 
                    { name: '已撤销', id: '1' } 
 | 
                ] 
 | 
            }; 
 | 
        }, 
 | 
        onLoad() { 
 | 
            this.getList() 
 | 
        }, 
 | 
        onReachBottom() { 
 | 
            this.getList() 
 | 
        }, 
 | 
        methods: { 
 | 
            baoan() { 
 | 
                uni.navigateTo({ 
 | 
                    url: '/pages/new_report/new_report' 
 | 
                }) 
 | 
            }, 
 | 
            sele(index) { 
 | 
                this.num = index 
 | 
                this.from.status = this.cate[index].id 
 | 
                this.search() 
 | 
            }, 
 | 
            jump(id) { 
 | 
                uni.navigateTo({ 
 | 
                    url: `/pages/report_details/report_details?id=${id}` 
 | 
                }) 
 | 
            }, 
 | 
            search() { 
 | 
                this.page = 1 
 | 
                this.list = [] 
 | 
                this.next = false 
 | 
                this.getList() 
 | 
            }, 
 | 
            getList() { 
 | 
                if (this.next) return 
 | 
                this.$u.api.settleClaimsPage({ 
 | 
                    capacity: 10, 
 | 
                    page: this.page, 
 | 
                    model: this.from 
 | 
                }).then(res => { 
 | 
                    if (res.code === 200) { 
 | 
                        if (res.data.records.length > 0) { 
 | 
                            this.page++ 
 | 
                            this.list.push(...res.data.records) 
 | 
                        } else { 
 | 
                            this.next = true 
 | 
                        } 
 | 
                    } 
 | 
                }) 
 | 
            } 
 | 
        } 
 | 
    } 
 | 
</script> 
 | 
<style> 
 | 
    page { 
 | 
        background-color: #f7f7f7; 
 | 
    } 
 | 
</style> 
 | 
<style lang="scss" scoped> 
 | 
    .box { 
 | 
        width: 100%; 
 | 
        .box_list { 
 | 
            width: 100%; 
 | 
            padding: 20rpx 30rpx; 
 | 
            box-sizing: border-box; 
 | 
            .box_list_item { 
 | 
                width: 100%; 
 | 
                padding: 24rpx 30rpx; 
 | 
                background-color: #ffffff; 
 | 
                border-radius: 16rpx; 
 | 
                margin-bottom: 20rpx; 
 | 
                position: relative; 
 | 
                box-sizing: border-box; 
 | 
                &:last-child { 
 | 
                    margin-bottom: 0 !important; 
 | 
                } 
 | 
                .yellow { 
 | 
                    background: #FF971D; 
 | 
                } 
 | 
                .info { 
 | 
                    background: #CCCCCC; 
 | 
                } 
 | 
                .status { 
 | 
                    position: absolute; 
 | 
                    top: 0; 
 | 
                    right: 0; 
 | 
                    width: 118rpx; 
 | 
                    height: 52rpx; 
 | 
                    line-height: 52rpx; 
 | 
                    text-align: center; 
 | 
                    font-weight: 400; 
 | 
                    font-size: 26rpx; 
 | 
                    color: #FFFFFF; 
 | 
                    font-style: normal; 
 | 
                    border-radius: 0rpx 16rpx 0rpx 32rpx; 
 | 
                } 
 | 
                .top { 
 | 
                    width: 100%; 
 | 
                    display: flex; 
 | 
                    flex-direction: column; 
 | 
                    text { 
 | 
                        &:nth-child(1) { 
 | 
                            font-weight: 500; 
 | 
                            font-size: 30rpx; 
 | 
                            color: #222222; 
 | 
                            font-style: normal; 
 | 
                        } 
 | 
                        &:nth-child(2) { 
 | 
                            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_row { 
 | 
                        width: 100%; 
 | 
                        display: flex; 
 | 
                        align-items: center; 
 | 
                        margin-bottom: 16rpx; 
 | 
                        &:last-child { 
 | 
                            margin-bottom: 0 !important; 
 | 
                        } 
 | 
                        .bottom_row_label { 
 | 
                            flex-shrink: 0; 
 | 
                            font-weight: 400; 
 | 
                            font-size: 26rpx; 
 | 
                            color: #777777; 
 | 
                            font-style: normal; 
 | 
                        } 
 | 
                        .bottom_row_val { 
 | 
                            flex: 1; 
 | 
                            font-weight: 400; 
 | 
                            font-size: 26rpx; 
 | 
                            color: #222222; 
 | 
                            font-style: normal; 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
        .box_wu { 
 | 
            width: 100%; 
 | 
            display: flex; 
 | 
            align-items: center; 
 | 
            justify-content: center; 
 | 
            margin-top: 304rpx; 
 | 
            image { 
 | 
                width: 272rpx; 
 | 
                height: 272rpx; 
 | 
            } 
 | 
        } 
 | 
        .box_footer { 
 | 
            width: 100%; 
 | 
            padding: 0 30rpx; 
 | 
            box-sizing: border-box; 
 | 
            height: calc(env(safe-area-inset-bottom) + 70rpx); 
 | 
            position: fixed; 
 | 
            bottom: 30rpx; 
 | 
            left: 0; 
 | 
        } 
 | 
        .box_search { 
 | 
            width: 100%; 
 | 
            padding: 12rpx 30rpx; 
 | 
            box-sizing: border-box; 
 | 
            background-color: #ffffff; 
 | 
            .box_search_cate { 
 | 
                width: 100%; 
 | 
                margin-top: 24rpx; 
 | 
                display: flex; 
 | 
                align-items: center; 
 | 
                .active { 
 | 
                    border: 1rpx solid #437CB3 !important; 
 | 
                    color: #437CB3 !important; 
 | 
                } 
 | 
                .box_search_cate_item { 
 | 
                    padding: 12rpx 20rpx; 
 | 
                    border-radius: 30rpx; 
 | 
                    border: 1rpx solid #999999; 
 | 
                    font-weight: 400; 
 | 
                    font-size: 26rpx; 
 | 
                    color: #333333; 
 | 
                    font-style: normal; 
 | 
                    margin-right: 20rpx; 
 | 
                    &:last-child { 
 | 
                        margin: 0 !important; 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
    } 
 | 
</style> 
 |