MrShi
2024-02-23 4c236ba83da7c69ac838b004d0a4b83c25fc9bea
company/src/views/enterprise/myPolicy.vue
@@ -56,6 +56,18 @@
        </el-form>
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <div style="margin-bottom: 30px;" v-if="obj.waitSignNum > 0 && obj.renewalNum > 0">
                <el-alert type="warning" show-icon :closable="false" style="margin-bottom: 15px;" v-if="obj.renewalNum > 0">
                    <span style="margin-right: 15px;">续保提醒: 您有即将到期保险</span>
                    <el-button type="text" @click="$refs.renewalInsurance.open('续保提醒')">查看详情</el-button>
                    <el-button type="text" @click="closeRemind(1)">关闭提醒</el-button>
                </el-alert>
                <el-alert type="warning" :closable="false" show-icon v-if="obj.waitSignNum > 0">
                    <span style="margin-right: 15px;">投保提醒: 您有投保申请待签署</span>
                    <el-button type="text" @click="see">查看详情</el-button>
                    <el-button type="text" @click="closeRemind(2)">关闭提醒</el-button>
                </el-alert>
            </div>
            <ul class="toolbar" v-permissions="['business:dispatchunit:create']">
                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyWindow.open('投保申请')">投保申请</el-button></li>
            </ul>
@@ -114,6 +126,8 @@
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
        <!--    加减保申请    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="handlePageChange" />
        <!--    续保弹窗    -->
        <renewalInsurance ref="renewalInsurance" @success="handlePageChange" />
    </TableLayout>
</template>
@@ -124,12 +138,21 @@
    import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
    import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
    import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
    import renewalInsurance from '@/components/enterprise/renewalInsurance'
    import { all as solutionAll} from '@/api/business/solutions'
    import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
    export default {
        name: 'myPolicy',
        extends: BaseTable,
        components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails, additionSubtractionApplication },
        components: {
            TableLayout,
            Pagination,
            OperaInsuranceApplyWindow,
            OperaInsuranceApplyDetails,
            renewalInsurance,
            additionSubtractionApplication
        },
        data () {
            return {
                // 搜索
@@ -141,6 +164,10 @@
                    startTimeS: '',
                    baseSolutionId: '',
                    statusCollect: '2'
                },
                obj: {
                    renewalNum: 0,
                    waitSignNum: 0
                },
                time1: [],
                time2: [],
@@ -156,8 +183,34 @@
            })
            this.search()
            this.loadSelectList()
            this.getNum()
        },
        methods:{
            see() {
                this.searchForm.statusCollect = '7'
                this.search()
            },
            closeRemind(type) {
                this.$confirm('确定关闭此提示吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    closeApplyNotice(type)
                        .then(res => {
                            this.getNum()
                        })
                }).catch(() => {
                });
            },
            getNum() {
                getCaptcha()
                    .then(res => {
                        this.obj.renewalNum = res.renewalNum
                        this.obj.waitSignNum = res.waitSignNum
                    })
            },
            reset() {
                this.time1 = []
                this.time2 = []