    <div class="col-md-10" role="main">

        <nav class="breadcrumb"> 积分商城模块<span class="c-gray en">&gt;</span>商品管理</nav>
       
        <div class="xgsj_wbox"> 
            <div class="title-box" style="border:0;padding: 20px 0px;">
               
                    <p class="t-p" style="width: 500px;display: inline-block;">兑换管理</p>
                 <a href="javascript:history.go(-1)">    
                    <button type="button" class="sjxg_fh" data-dismiss="modal" style="margin-top:8px;">返回</button>
                </a>        
            </div>
            <div class="m_table_box" style="width:auto;margin-left:0px;margin-top: 25px;  padding-left: 20px;">
                <table>
                    <thead>
                        <tr>
                            <th class="s-thead">用户名</th>
                            <th class="s-thead">UID</th>
                            <th class="s-thead" style="width:30%">兑换时间</th>
                            <th class="s-thead">状态</th>
                            <th class="s-thead" style="width:15%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($listInfo as $v):?>
                         <tr>
                            <td><?php echo $v['name'];?></td>
                            <td><?php echo $v['uid'];?></td>
                            <td><?php echo $v['exchange_time'];?></td>
                            <?php echo $cate == 2?'<td>'.$v['extra'].'</td>':'';?>
                            <td><?php echo $v['status'];?></td>
                            <td>
                                 <?php
                                    if($v['c_status'] == 1)
                                    {
                                ?> 
                                     <button class="delshop spgj_dhgl_fh" sid="<?php echo $v['id']?>" status='4' type="button"   data-target="#delModal" data-toggle="modal">
                                        <span>处理</span>
                                    </button>                             
                                 <?php
                                    }
                                ?>
      
                            </td>                
                        </tr> 
                        <?php endforeach;?>              
                    </tbody>
                </table>
            </div>
            <?php echo $pageinfo;?>
        </div>
    </div>

    <!--确认删除弹出框-->
    <input type="hidden" name="shopid" value="" status=''>
    <div class="modal fade equity" id="delModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="width: 360px; height: 190px; border-radius: 0px; top: 20%; ">
        <div class="modal-dialog" style="  width: 100%!important;margin: 0">
            <p class="delete-title">确定处理该记录？</p>
            <div class="equity-button">
                <button type="button" class="h5a-btn btn  btn-primary equitycof" id='optdel'>确定</button>
                <button type="button" class="h5a-btn btn  btn-default equityclose" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="<?php echo asset_url('js/paging.js');?>"></script>
    <script>
    var cate = <?php echo $cate;?>;
    jQuery(document).ready(function($) {
        if(cate == 2)
        {
            $('th').eq(2).after('<th>代充账号</th>');
        }
    $(".delshop").on('click',function(event) {
        event.preventDefault();
        /* Act on the event */
        $("input[name=shopid]").val($(this).attr('sid'));
        $("input[name=shopid]").attr('status',$(this).attr('status'));
    });
    $("#optdel").on('click', function(event) {
        event.preventDefault();
        var id = $("input[name=shopid]").val();
        var status = $("input[name=shopid]").attr('status');
        $.post("<?php echo site_url('score/exchange/operate')?>", {id: id,status:status},
           function(data){
             if(data.code == 1){
                location.href='';
             }else{
                alert(data.msg);
             }
        },'json');       
    });

    });
    </script>



