index.html 10.6 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_970727_pul0ncci0v.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
    <script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
    <script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
    <title>全部保单</title>
    <style>
        body {
            background: #F5F7F7;
        }

    </style>
</head>
<body>
<a class="agree_top my_trsuttop" href="javascript:history.back(-1);">
    <div class="iconfont icon-xiangzuo"></div>
    <div>返回</div>
</a>
<div class="my_info">
    <div class="my_infoimg">
        <img src="{$user.avatar}" alt="">
    </div>
    <div class="my_inforigth">
        <div class=" my_payinforigth">
            <div class="my_inforigthtitle">{$user.name}</div>
            <div class="my_rigthblod">托管说明</div>
        </div>
        <div class="my_payinfominitxt">编号:{$user.number}</div>
    </div>

</div>
<div class="my_main">
    <div class="all_trust">
        <div class="all_active select_status" data-status="0">全部</div>
        <div class="select_status" data-status="1">托管中</div>
        <div class="select_status" data-status="2">即将到期</div>
        <div class="select_status" data-status="3">未托管</div>
    </div>
    <div class="my_mianbox">
       <div class="my_alltxt">
           <div>保单总数{$no_collocation_count}份</div>
           <div>被保险人{$no_people_count}人</div>
           <div>本年保险支出{$no_total_sum}元</div>
       </div>
        <div class="swiperbox">
            <div class="my_main_minibox">
                <div id="swiper1" >
                    <div class="swiper-wrapper">
                        <foreach name="insurer" item="vo">
                            <if condition="$key eq 0">
                                <div class="swiper-slide my_main_miniboxitem select_status my_mainactive" style="width:auto;text-align: center;">{$vo.insurer}</div>
                                <else/>
                                <div class="swiper-slide my_main_miniboxitem select_status" style="width:auto;text-align: center;">{$vo.insurer}</div>
                            </if>
                        </foreach>
                    </div>
                </div>
            </div>
            <div class="iconfont icon-xiangyou "></div>
        </div>
    </div>
    <div id="dom">
        <foreach name="collocation_data" item="c_d">
            <div class="my_trustitem">
                <div class="detail_logo">
                    <div class="logo_img">
                        <img src="{:cmf_get_image_url($c_d.thumbnail)}" alt="">
                    </div>
                    <div>
                        <if condition="$c_d['status'] eq 1 && $c_d['order_about_time'] gt (time()-30*24*60*60)">
                            托管中
                            <elseif condition="$c_d['status'] eq 3 && $c_d['order_about_time'] lt time() && ($c_d['order_about_time']+30*24*60*60) gt time() || ($c_d['status'] eq 1 && $c_d['order_about_time'] lt time() && ($c_d['order_about_time']+30*24*60*60) gt time())"/>
                            即将到期
                            <elseif condition="$c_d['status'] eq 3 && $c_d['order_expire_time'] gt time() && $c_d['order_about_time'] gt time()"/>
                            托管中
                            <elseif condition="$c_d['status'] eq 2 || $c_d['order_expire_time'] lt time() || ($c_d['order_about_time']+24*30*60*60) lt time()"/>
                            未托管
                        </if>
                    </div>
                </div>
                <div class="dateil_info dateil_info_my">
                    <div class="dateil_info_mytxt">
                        <div>{$c_d.product_name}</div>
                        <div class="dateil_info_mytxt_9">
                            <if condition="$c_d['status'] eq 1">
                                免费托管
                            </if>
                        </div>
                    </div>
                    <div>保险单号:{$c_d.insurance_num}</div>
                    <div class="dateil_infomian">
                        <div class="detail_infoleft">
                            <div>投保人:{$c_d.application}</div>
                            <div>缴费方式:{$c_d.pay_method_id}</div>
                            <div>投保日期:{:date('Y-m-d',$c_d.insurer_time)}</div>
                            <div>投保人是否豁免:<if condition="$c_d['remit'] eq 1"><else /></if></div>
                        </div>
                        <div class="detail_inforigth">
                            <div>被保险人:{$c_d.insurer}</div>
                            <div>保单金额:{$c_d.insurance_price}元</div>
                            <div>合同生效日期:{:date('Y-m-d',$c_d.take_time)}</div>
                        </div>
                    </div>

                </div>
                <div class="look_detal"><a href="{:cmf_url('all_guarantee/guarantee_info',array('id'=>$c_d['o_id']))}">查看详情</a></div>
            </div>
        </foreach>
    </div>
</div>
<!--托管说明-->
<div class="my_mold" style="display: none">
    <div class="my_moldbox">
        <div class="my_topbtn">托管说明</div>
        <div class="my_moldmian">
            {$page_html.content}
        </div>
        <div class="my_moldbtn">关闭</div>
    </div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/common.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/Augly_Verification.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script>
    var mySwiper = new Swiper('#swiper1', {
        slidesPerView : 3,
        slidesPerGroup : 3,
    });
    $('.my_main_miniboxitem').click(function () {
        $(this).addClass('my_mainactive').siblings().removeClass('my_mainactive');
    });
    $('.all_trust div').click(function () {
        $(this).addClass('all_active').siblings().removeClass('all_active');
    });
    $('.my_rigthblod').click(function () {
        $('.my_mold').show();
    });
    $('.select_status').click(function () {
        var status = $('.all_active').attr('data-status');
        var insurer = $('.my_mainactive').text();
        $.ajax({
            url: "{:url('me_guarantee/select_status')}",
            type: "POST",
            data: {'status': status,'insurer': insurer},
            success: function (data) {
                var mydata = '';
                var type = "";
                var data = eval("(" + data + ")");
                var result = data.data;
                if(data.code == 20000){
                    $.each(result,function(k,n){
                        if(status == 1){
                            type = "托管中";
                        }else if(status == 2){
                            type = "即将到期";
                        }else if(status == 3){
                            type = "未托管";
                        }else if(status == 0){
                            console.log(n.status)
                            if(n.status == 1 && n.order > {:time()}){
                                type = "托管中";
                            }else if(n.status == 3 && n.order_about_time < {:time()} && (n.order_about_time+30*24*60*60) > {:time()} || n.status == 1 && n.order_about_time < {:time()} && (n.order_about_time+30*24*60*60) > {:time()}){
                                type = "即将到期";
                            }else if(n.status == 3 && n.order_expire_time > {:time()} && n.order_about_time > {:time()}){
                                type = "托管中";
                            }else if(n.status == 2 || n.order_expire_time < {:time()} || (n.order_about_time+30*24*60*60) < {:time()}){
                                type = "未托管";
                            }else{
                                type = "未托管";
                            }
                        }
                        if(n.status == 1){
                            mydata += '<div class="my_trustitem"><div class="detail_logo"><div class="logo_img"><img src="'+n.thumbnail+'" alt=""></div><div>'+type+'</div></div><div class="dateil_info dateil_info_my"><div class="dateil_info_mytxt"><div>'+n.product_name+'</div><div class="dateil_info_mytxt_9">免费托管</div></div><div>保险单号:'+n.insurance_num+'</div><div class="dateil_infomian"><div class="detail_infoleft"><div>投保人:'+n.application+'</div><div>缴费方式:'+n.pay_method_id+'</div><div>投保日期:'+n.insurer_time+'</div><div>投保人是否豁免:是</div></div><div class="detail_inforigth"><div>被保险人:'+n.insurer+'</div><div>保单金额:'+n.insurance_price+'元</div><div>合同生效日期:'+n.take_time+'</div></div></div></div><div class="look_detal"><a href="{:url('all_guarantee/guarantee_info','','')}/id/'+n.o_id+'">查看详情</a></div></div>';
                        }else{
                            mydata += '<div class="my_trustitem"><div class="detail_logo"><div class="logo_img"><img src="'+n.thumbnail+'" alt=""></div><div>'+type+'</div></div><div class="dateil_info dateil_info_my"><div class="dateil_info_mytxt"><div>'+n.product_name+'</div></div><div>保险单号:'+n.insurance_num+'</div><div class="dateil_infomian"><div class="detail_infoleft"><div>投保人:'+n.application+'</div><div>缴费方式:'+n.pay_method_id+'</div><div>投保日期:'+n.insurer_time+'</div><div>投保人是否豁免:是</div></div><div class="detail_inforigth"><div>被保险人:'+n.insurer+'</div><div>保单金额:'+n.insurance_price+'元</div><div>合同生效日期:'+n.take_time+'</div></div></div></div><div class="look_detal"><a href="{:url('all_guarantee/guarantee_info','','')}/id/'+n.o_id+'">查看详情</a></div></div>';
                        }
                    });
                    $('#dom').html(mydata);
                }else{
                    toast('与服务器断开连接');
                }
            }
        })
    })
</script>
</body>
</html>