jiangping
2024-03-05 7b336b5d570dece2d283d33221874e8dae1a2118
company/src/components/enterprise/renewalInsurance.vue
@@ -27,33 +27,57 @@
                </template>
            </el-table-column>
            <el-table-column prop="insureNum" label="投保人数"></el-table-column>
            <el-table-column prop="serviceDays" label="投保时长(天)"></el-table-column>
            <el-table-column prop="currentFee" 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="总费用(元)"></el-table-column>
            <el-table-column prop="checkDate" label="提交日期"></el-table-column>
            <el-table-column prop="startTime" label="投保生效日期"></el-table-column>
            <el-table-column prop="endTime" 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
                prop="address"
                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/OperaInsuranceApplyWindow'
    import { fetchList } from '@/api/business/insuranceApply'
    export default {
        name: 'renewalInsurance',
        extends: BaseOpera,
        components: { GlobalWindow },
        components: { GlobalWindow, OperaInsuranceApply },
        data () {
            return {
                form: {
                    id: null
                },
                tableData: []
                tableData: [],
                total: 0,
                currentPage: 1
            }
        },
        created () {
@@ -63,7 +87,31 @@
            })
        },
        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>