more.html 9.5 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_8ia65mkkncu.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>
</head>
<body>
<a class="agree_top" href="javascript:history.back(-1);">
    <div class="iconfont icon-xiangzuo"></div>
    <div>返回</div>
</a>
<div class="go_top">
    <div class="go_topitem">
        <div>保险人:{$application}</div>
        <div>托管中</div>
    </div>
    <div class="go_topitem">
        <!--<div>保单总数:4张</div>-->
        <div>免费托管</div>
    </div>
</div>
<div class="go_line"></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="my_main_minibox">
            <foreach name="$insurer" item="vo">
                <if condition="$key eq 0">
                    <div class="swiper-slide my_main_miniboxitem select_status my_mainactive" style="width:auto">{$vo.insurer}</div>
                    <else/>
                    <div class="swiper-slide my_main_miniboxitem select_status" style="width:auto">{$vo.insurer}</div>
                </if>
            </foreach>
            <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">
                            托管中
                            <elseif condition="$c_d['status'] eq 3 && ($c_d['order_about_time']-30*24*60*60) lt time() && $c_d['order_about_time'] 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['status'] eq 3 && $c_d['order_expire_time'] lt time() || $c_d['status'] eq 3 && $c_d['order_about_time'] 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>投保日期:{$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('agent/guarantee_info',array('id'=>$c_d['o_id']))}">查看详情</a></div>
            </div>
        </foreach>
    </div>
</div>
</body>
<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>
    $('.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 application = "{$application}";
        var agent_phone = "{$agent_phone}";
        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,'application': application,'agent_phone': agent_phone},
            success: function (data) {
                var mydata = '';
                var type = "";
                var data = eval("(" + data + ")");
                var result = data.data;
                console.log(result);
                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){
                            if(n.status == 1){
                                type = "托管中";
                            }else if(n.status == 3 && n.order_about_time-30*24*60*60 < {:time()} && n.order_about_time > {:time()}){
                                type = "即将到期";
                            }else if(n.status == 3 && n.order_expire_time > {:time()} && n.order_about_time > {:time()}){
                                type = "托管中";
                            }else if(n.status == 2 || (n.status == 3 && n.order_expire_time < time()) || n.status == 3 && n.order_about_time < {: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('agent/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('agent/guarantee_info','','')}/id/'+n.o_id+'">查看详情</a></div></div>';
                        }
                    });
                    $('#dom').html(mydata);
                }else{
                    toast('与服务器断开连接');
                }
            }
        })
    })
</script>
</html>