MrShi
2024-11-15 30cfb2b836a8a3d609518cc295753b58b17a9bc7
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
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <el-table
            :data="tableData"
            border
            style="width: 100%">
            <el-table-column label="序号" width="80px">
                <template slot-scope="scope">
                    <span>{{scope.$index + 1}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="statusInfo" label="状态">
                <template slot-scope="{row}">
                    <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
            <el-table-column label="保单号">
                <template slot-scope="{row}">
                    <span>{{row.code ? row.code : '-'}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="guaranteeNum"  align="center" label="当前在保人数" width="120">
                <template slot-scope="{row}">
                    <span>{{(row.guaranteeNum||0)}} 人</span>
                </template>
            </el-table-column>
<!--            <el-table-column prop="insureNum" label="投保人数"></el-table-column>-->
<!--          <el-table-column prop="guaranteeNum" label="在保人数" ></el-table-column>-->
            <el-table-column label="投保时长(天)">
                <template slot-scope="{row}">
                    <span>{{row.serviceDays < 0 ? `-` : row.serviceDays}}</span>
                </template>
            </el-table-column>
<!--            <el-table-column prop="currentFee" label="已产生费用"></el-table-column>-->
            <el-table-column prop="fee" label="批改费用合计"  align="center" width="120">
                <template slot-scope="{row}">
                    <span>{{row.changeMoney+' 元'}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="fee" label="总费用(元)"></el-table-column>
            <el-table-column prop="endTime" label="保险生效止期"></el-table-column>
            <el-table-column label="失效剩余(天)">
                <template slot-scope="{row}">
                    <span style="color: #F95601;">{{row.loseEfficacyDays}}</span>
                </template>
            </el-table-column>
            <el-table-column
                min-width="100"
                label="操作">
                <template slot-scope="{row}">
                    <el-button type="text" @click="$refs.OperaInsuranceApply.open('续保', { id: row.id, type: 1 })">一件续保</el-button>
<!--                    <el-button type="text" @click="dele(row)">删除提醒</el-button>-->
                </template>
            </el-table-column>
        </el-table>
        <div style="width: 100%; height: 10px;"></div>
        <el-pagination
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            layout="total, prev, pager, next, jumper"
            :total="total">
        </el-pagination>
        <!--    续保    -->
        <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
    </GlobalWindow>
</template>
 
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyAddWindow'
    import { fetchList } from '@/api/business/insuranceApply'
    export default {
        name: 'renewalInsurance',
        extends: BaseOpera,
        components: { GlobalWindow, OperaInsuranceApply },
        data () {
            return {
                form: {
                    id: null
                },
                tableData: [],
                total: 0,
                currentPage: 1
            }
        },
        created () {
            this.config({
                api: '/business/insuranceApply',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
                this.getList()
            },
            handleCurrentChange(page) {
                this.currentPage = page
                this.getList()
            },
            getList() {
                fetchList({
                    capacity: 10,
                    page: this.currentPage,
                    model: {
                        loseEfficacy: 1,
                        status: 5
                    }
                }).then(res => {
                    this.tableData = res.records
                    this.total = res.total
                })
            },
            successEvent(){
                this.$emit('success')
            }
        }
    }
</script>
 
<style lang="scss" scoped>
 
</style>