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/>
        状态:
        <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="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>城市</th>
                <th>小区</th>
                <th>联系人姓名</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.city}</td>
                    <td>{$list.quarters}</td>
                    <td>{$list.name}</td>
                    <td>{$list.tel}</td>
                    <td>{$list.people}</td>
                    <td>{$list.pay_money}</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="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('Need/detail',array('id'=>$list['id']))}">查看详情</a>
                    <a href="{:url('Need/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                    <td>
                        <switch name="list.status" >
                            <case value="7|12|13|14">
                                <span class="level" index="{$list.id}" style="color: red;cursor: pointer; ">返回上一级状态</span>
                            </case>
                            <case value="1|2|3|4|5|6|8|10|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('Need/level')}",
                    data:{
                        "need_id":id,
                    },
                 success:function (data) {
                     if(data.code == 1){
                         new TipBox({type:'success',str:'操作成功',hasBtn:true});
                         $('.popup').css('display','none');
                     }else{
                         new TipBox({type:'error',str:data.msg,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>