index.html 7.6 KB
<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">订单列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
        订单号:
        <input class="form-control" type="text" name="num" style="width: 200px;" value="{$num|default=''}"
               placeholder="请输入订单号">
        订单状态:
        <select name="step" class="form-control" style="width: 120px;">
            <option value>订单状态</option>
            <option value="1" <eq name="$step" value="1"> selected </eq> >待支付</option>
            <option value="2" <eq name="$step" value="2"> selected </eq> >待发货</option>
            <option value="3" <eq name="$step" value="3"> selected </eq> >待收货</option>
            <option value="4" <eq name="$step" value="4"> selected </eq> >待评论</option>
            <option value="5" <eq name="$step" value="5"> selected </eq> >已完成</option>
            <option value="6" <eq name="$step" value="6"> selected </eq> >待审核</option>
            <option value="7" <eq name="$step" value="7"> selected </eq> >待退货</option>
            <option value="8" <eq name="$step" value="8"> selected </eq> >待退款</option>
            <option value="9" <eq name="$step" value="9"> selected </eq> >已退款</option>
        </select>
        收货人:
        <input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
               placeholder="请输入收货姓名">
        一级分类:
        <select name="yi" class="form-control" style="width: 120px;" onchange="lie(this.value,0)">
            <option value>请选择分类</option>
            <foreach name="cate1" item="vo">
                <option value="{$vo.id}" <eq name="$yi" value="$vo.id"> selected </eq>  >{$vo.name}</option>
            </foreach>
        </select>
        二级分类:
        <select name="er" class="form-control" style="width: 120px;" id="er">
            <option value>请选择分类</option>
        </select>
        <br/>
        手机号:
        <input class="form-control" type="number" name="mobile" style="width: 200px;" value="{$mobile|default=''}"
               placeholder="请输入收货手机号">

        下单时间:
        <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="hidden" name="uid" value="{$uid|default=''}">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('index',array('uid'=>$uid))}">清空</a>

        <div style="float: right; margin-right: 20px"><font size="+1">总消费积分:{$whole_num} &nbsp;&nbsp;&nbsp;&nbsp;总消费金额:¥{$total}</font></div>

    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <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>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="all" item="vo">
                <tr>
                    <td>{$vo.order_num}</td>
                    <td>{$vo.out_trade_no}</td>
                    <td>{$vo['user_nickname']}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$vo.site}</td>
                    <td>{:date('Y-m-d H:i',$vo.create_time)}</td>
                    <td>
                        <if condition="$vo.pay_type eq 1">
                            微信支付
                            <elseif condition="$vo.pay_type eq 2">
                                组合支付
                                <elseif condition="$vo.pay_type eq 3">
                                    积分支付
                        </if>
                    </td>
                    <td>
                        <if condition="$vo.step eq 5||$vo.step eq 9">
                            {:date('Y-m-d H:i',$vo.end_time)}
                            <elseif condition="$vo.step lt 5">
                                订单未完成
                                <elseif condition="$vo.step gt 5&&$vo.step neq 9">
                                    退款未完成
                        </if>
                    </td>
                    <td>
                        <if condition="$vo.step eq 1">
                            待支付
                            <elseif condition="$vo.step eq 2">
                                待发货
                                <elseif condition="$vo.step eq 3">
                                    待收货
                                    <elseif condition="$vo.step eq 4">
                                        待评价
                                        <elseif condition="$vo.step eq 5">
                                            已完成
                                            <elseif condition="$vo.step eq 6">
                                                待审核
                                                <elseif condition="$vo.step eq 7">
                                                    待退货
                                                    <elseif condition="$vo.step eq 8">
                                                        待退款
                                                        <elseif condition="$vo.step eq 9">
                                                            已退款
                        </if>
                    </td>
                    <td>{$vo.whole}</td>
                    <td>{$vo.whole_num}</td>
                    <td>
                        <a href="{:url('detail',array('id'=>$vo['id'],'sta'=>'1'))}">订单详情</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    //分类默认选中
    var yi="{$yi}";
    var er0="{$er}";
    var er1={:json_encode($cate2)};

    function lie(ii,ll) {
        var ee=document.getElementById('er')
        var op=document.createElement('option')
        rem(ee)
        op.text='请选择分类';
        op.value='';
        ee.add(op);
        if (ii!=''){
            for (i=0;i<=er1.length-1;i++){
                if (ii==er1[i]['cid']){
                    var opt=document.createElement('option');
                    opt.text=er1[i]['name']
                    opt.value=er1[i]['id']
                    if (ll==er1[i]['id']){
                        opt.selected =true
                    }
                    ee.add(opt)
                }
            }
        }
    }

    lie(yi,er0);

    //删除option
    function rem(ii) {
        for (i=ii.options.length-1;i>=0;i--){
            ii.remove(i)
        }
    }
</script>
</body>
</html>