index.html 9.7 KB
<include file="public@header"/>
<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
<style>
    .popup{
        width: 250px;
        height: 100px;
        background-color: rgba(0,0,0,0.5);
        position: fixed;
        top: 50%;
        transform: translateY(-50px);
        left: 0;
        right: 0;
        margin: 0 auto;
        border-radius: 5px;
        color: #ffffff;
    }
    .popup p{
        text-align: center;
        margin-top: 20px;
    }
    .popup span{
        text-align: center;
        line-height: 30px;
        cursor: pointer;
    }
    .popup .queding{
        display: inline-block;
        width: 80px;
        height: 30px;
        background-color: #1E9FFF;
        border-radius: 3px;
    }
    .popup span:hover{
        opacity: 0.8;
    }
    .popup .quxiao{
        display: inline-block;
        width: 80px;
        height: 30px;
        ckground-color: #9cb945 ;
        color: #333333;
        border-radius: 3px;
        background-color:#fff;
        margin-left: 35px;
    }
    .btn_list{
        margin: 0 auto;
        width: 200px;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href=" ">需求列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('Need/index')}">
        <!--分类:-->
        <!--<select class="form-control" name="category" style="width: 140px;">-->
        <!--<option value='0'>全部</option>-->
        <!--{$category_tree|default=''}-->
        <!--</select> &nbsp;&nbsp;-->
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        用户名:
        <input type="text" class="form-control" name="name" style="width: 200px;"
               value="{$name|default=''}" placeholder="请输入用户名">
        手机号:
        <input type="text" class="form-control" name="tel" style="width: 200px;"
               value="{$tel|default=''}" placeholder="请输入手机号"> <br/>
        需求id:
        <input type="text" class="form-control" name="need_id" style="width: 200px;"
               value="{$need_id|default=''}" placeholder="请输入需求id">
        状态:
        <select name="status" style="border: 1px solid #dce4ec; margin-top: 20px;">
            <option name="status" value="0" <eq name="status" value="0">selected</eq>>&nbsp; &nbsp;---请选择---</option>
            <option name="status" value="1" <eq name="status" value="1">selected</eq>>未交押金</option>
            <option name="status" value="2" <eq name="status" value="2">selected</eq>>待中标</option>
            <option name="status" value="3" <eq name="status" value="3">selected</eq>>初选未中标</option>
            <option name="status" value="4" <eq name="status" value="4">selected</eq>>待用户选择</option>
            <option name="status" value="5" <eq name="status" value="5">selected</eq>>已中标</option>
            <option name="status" value="6" <eq name="status" value="6">selected</eq>>复选未中标</option>
            <option name="status" value="7" <eq name="status" value="7">selected</eq>>人数不足</option>
            <option name="status" value="8" <eq name="status" value="8">selected</eq>>复选用户未选择</option>
            <option name="status" value="10" <eq name="status" value="10">selected</eq>>中介未确认</option>
            <option name="status" value="11" <eq name="status" value="11">selected</eq>>成交</option>
            <option name="status" value="12" <eq name="status" value="12">selected</eq>>投诉申请中</option>
            <option name="status" value="13" <eq name="status" value="13">selected</eq>>同意投诉申请</option>
            <option name="status" value="14" <eq name="status" value="14">selected</eq>>拒绝投诉申请</option>

        </select>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('Need/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">
        <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('Need/del')}" data-subcheck="true" data-msg="您确定删除吗?">
                {:lang('DELETE')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <notempty name="category">
                    <th width="50">{:lang('SORT')}</th>
                </notempty>
                <th width="50">ID</th>
                <th>中介名</th>
                <th>中介手机号</th>
                <th>需求id</th>
                <th>房价(万元)</th>
                <th>总价(元)</th>
                <th>押金(元)</th>
                <th>状态</th>
                <th>提交时间</th>
                <th>操作</th>
                <th>操作</th>
            </tr>
            </thead>
            <foreach name="list" item="list">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$list.id}" title="ID:{$list.id}">
                    </td>

                    <td>{$list.id}</td>
                    <td>{$list.user_name}</td>
                    <td>{$list.user_tel}</td>
                    <td>{$list.need_id}</td>
                    <td>{$list.housing_price}</td>
                    <td>{$list.all_price}</td>
                    <td>{$list.deposit}</td>
                    <td>
                        <eq name="list.status" value="1">未交保证金</eq>
                        <eq name="list.status" value="2">待中标</eq>
                        <eq name="list.status" value="3">初选未中标</eq>
                        <eq name="list.status" value="4">待用户选择</eq>
                        <eq name="list.status" value="5">已中标</eq>
                        <eq name="list.status" value="6">复选未中标</eq>
                        <eq name="list.status" value="7">人数不足</eq>
                        <eq name="list.status" value="8">复选用户未选择</eq>
                        <eq name="list.status" value="10">中介未确认</eq>
                        <eq name="list.status" value="11">成交</eq>
                        <eq name="list.status" value="12">投诉申请中</eq>
                        <eq name="list.status" value="13">同意投诉申请</eq>
                        <eq name="list.status" value="14">拒绝投诉申请</eq>
                    </td>
                    <td>
                        {:date('Y-m-d H:i',$list['create_time'])}
                    </td>
                    <td>
                        <a href="{:url('Agency/detail',array('id'=>$list['id']))}">查看详情</a>
                    <a href="{:url('Agency/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                    <td>
                        <switch name="list.status" >
                            <case value="10|12|13|14">
                                <span id="level" index="{$list.need_id}" style="color: red;cursor: pointer; ">返回上一级状态</span>
                            </case>
                            <case value="1|2|3|4|5|6|7|8|11">
                                <span style="color:#aaaaaa; cursor: pointer; ">当前状态不可修改</span>
                            </case>

                        </switch>

                    </td>
                </tr>
            </foreach>

        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
    <div class="popup" style="display: none; z-index:100;">
        <p>确认返回上一级</p>
        <div class="btn_list">
            <span class="queding">确认</span>
            <span class="quxiao">取消</span>
        </div>
    </div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script>
    // 删除
    $('#level').click(function () {
        var id = $(this).attr('index');
        $('.popup').css('display','block');
        $('.queding').click(function () {
             $.ajax({
                    type:"POST",
                    url:"{:url('Agency/level')}",
                    data:{
                        "need_id":id,
                    },
                 success:function (data) {
                     new TipBox({type:'success',str:'操作成功',hasBtn:true});
                     $('.popup').css('display','none');
                 },
                 error:function () {
                     new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
                     $('.popup').css('display','none');
                 }
                })
        })
    })
    $('.quxiao').click(function () {
        $('.popup').css('display','none');
    })


</script>
</body>
</html>