<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>

<div class="layui-card right-content" style="width: 700px;">
    <div class="layui-form">  
        <table class="layui-table YpTable">
            <thead class="Filter Sortable">
                <tr>
                    <th class="Sort" width="200px" style="overflow:hidden;"><span>客户名称</span></th>
                    <th class="Sort"><span>修改前内容</span></th>
                    <th class="Sort" width="90px"><span>修改人</span></th>
                    <th class="Sort" width="120px"><span>修改时间</span></th>
                </tr>
            </thead>
            <tbody>
                <?php if(!$listArr){?>
                    <tr>
                        <td colspan="4">无对应条件的付款记录</td>
                    </tr>
                <?php }else{?>
                    <?php foreach ($listArr as $key => $val) {?>
                        <tr>
                            <td>
                               <a lay-href="<?=mvc::$cfg['SELF_URI']?>customer/detail?ctrId=<?=$val['ccl_ctr_id']?>" class="a_blue"><?=$val['ctr_uname']?:$val['ctr_comname']?></a>
                            </td>
                            <td>
                                <?php if($val['ccl_data']){?>
                                    联系人:<?=$val['ccl_data']['ctr_contact']?><br/>
                                    手机号:<?=$val['ccl_data']['ctr_tel']?>
                                <?php }?>
                            </td>
                            <td><?=$auArr[$val['ccl_uid']]?></td>
                            <td><?=date('Y-m-d H:i:s', $val['ccl_etime'])?></td>
                        </tr>
                    <?php }?>
                <?php }?>
            </tbody>
            
        </table>
        <?=$pageMsg?>
    </div>
</div>

<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<script>
    layui.use(['laydate'],function(){
            var laydate = layui.laydate;
        laydate.render({
            elem:'#atime',
            range:'~'
        })
        autoImgViewer($('td'));
    })
    function ChkApplyPay(Obj, faeId)
    {
        var PostUrl = SELF_URI + "customer/chkApplyPay?isAjax=1";
        $.post(PostUrl, {'faeId':faeId},function(res){
            if(AJAX.checkData(res)){
                layer.msg('操作成功',{time:2000},function(){
                    location.reload();
                })
            }
            
        }, "json");
    }

    function DelApplyPay(faeId)
    {
        if(confirm('确定要删除该记录吗？'))
        {
            var PostUrl = SELF_URI + "customer/delApplyPay?isAjax=1";
            $.post(PostUrl, { 'faeId':faeId},function(res){
                if(AJAX.checkData(res)){
                    layer.msg('操作成功',{time:2000},function(){
                        location.reload();
                    })
                }
            }, "json");
        }
    }
</script>