<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>订单详情</a></li>
    </ul>
    <form action="{:url('ZjOrder/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-5">
                <table class="table table-bordered">

                    <tr>
                        <th>订单编号</th>
                        <td>
                            <span>{$one.order_num}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>所购服务</th>
                        <td>
                            <span>{$one.sname}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>服务分类</th>
                        <td>{$one['tname']}</td>
                    </tr>
                    <tr>
                        <th>服务价格</th>
                        <td>
                            <span>{$one.price}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>购买用户</th>
                        <td>
                            <span>{$one.uname}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>客户名称</th>
                        <td>
                            <span>{$one.name}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>是否加急</th>
                        <td>
                            <span>
                                <if condition="$one.status_buy eq 0">

                                    <else>

                                </if>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th>客户留言</th>
                        <td>
                            <span>{$one.remarks}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>下单时间</th>
                        <td>
                            <span>{:date('Y-m-d H-i-s',$one.create_time)}</span>
                        </td>
                    </tr>
                    <tr>
                        <th>用户支付时间</th>
                        <td>
                            <span>
                                <if condition="strlen($one.pay_time) eq 0">
                                    <else>
                                        {:date('Y-m-d H-i-s',$one.pay_time)}
                                </if>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th>交流完成时间</th>
                        <td>
                            <span><if condition="strlen($one.comm_time) eq 0">
                                    <else>
                                        {:date('Y-m-d H-i-s',$one.pay_time)}
                                </if>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th>订单状态</th>
                        <td>
                            <span>
                        <if condition="$one['order_type'] eq 0">
                            已取消订单
                        <elseif condition="$one['order_type'] eq 1">
                            未支付
                        <elseif condition="$one['order_type'] eq 2">
                            未分配
                        <elseif condition="$one['order_type'] eq 3">
                            已分配
                        <elseif condition="$one['order_type'] eq 4">
                            待评论
                        <elseif condition="$one['order_type'] eq 5">
                            已完成
                        </if>
                            </span>
                        </td>
                    </tr>
                    <if condition="$one.order_type eq 0">
                        <tr>
                            <th>取消订单时间</th>
                            <td>
                                <span>{:date('Y-m-d H-i-s',$one.delete_time)}</span>
                            </td>
                        </tr>
                    </if>
                    <tr>
                        <th>订单支付方式</th>
                        <td>
                            <span>
                        <if condition="$one.order_type=='0'||$one.order_type=='1'">

                        <else>
                            <if condition="$one['parment_type'] eq 0">
                                余额支付
                            <elseif condition="$one['parment_type'] eq 1">
                                支付宝支付
                            <elseif condition="$one['parment_type'] eq 2">
                                微信支付
                            </if>
                        </if>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <th>订单总价</th>
                        <td>
                            <span>{$one.whole}</span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="col-md-5">
                <if condition="$role eq 1&&$one.order_type lt '4'&&$one.order_type neq '0'">
                    <table class="table table-bordered">
                        <tr>
                            <th>客户电话</th>
                            <td>
                                <input type="text" value="{$one.phone}" name="phone" class="form-control">
                            </td>
                        </tr>
                        <tr>
                            <th>预约时间</th>
                            <td>
                                <input type="date" value="{$one.contact_date}" class="form-control" name="contact_date">
                                <select class="form-control" name="contact_time">
                                    <option value>选择时间</option>
                                    <foreach name="allcon" item="val">
                                        <option value="{$val.id}" <if condition="$val.contact eq $one.contact"> selected</if>>{$val['contact']}</option>
                                    </foreach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>订单分配导师</th>
                            <td>
                                <select class="form-control" name="admin_id">
                                    <option value>选择导师</option>
                                    <foreach name="admin" item="val">
                                        <option value="{$val.id}" <if condition="$val.id eq $one.admin_id"> selected </if>>{$val.user_login}</option>
                                    </foreach>
                                </select>
                            </td>
                        </tr>
                        <input type="hidden" name="order_type" value="{$one.order_type}">
                        <input type="hidden" name="id" value="{$one.id}">
                    </table>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
                                <a class="btn btn-default" href="{:url('ZjOrder/index')}">{:lang('BACK')}</a>
                            </div>
                        </div>
                    <else>
                        <table class="table table-bordered">
                            <tr>
                                <th>客户电话</th>
                                <td>
                                    {$one.phone}
                                </td>
                            </tr>
                            <tr>
                                <th>预约时间</th>
                                <td>
                                    {$one.contact_date} ,
                                        <foreach name="allcon" item="val">
                                            <if condition="$val.contact eq $one.contact">{$val['contact']}</if>
                                        </foreach>

                                </td>
                            </tr>

                            <tr>
                                <th>订单分配导师</th>
                                <td>
                                        <foreach name="admin" item="val">
                                            <if condition="$val.id eq $one.admin_id">{$val.user_login}</if>
                                        </foreach>
                                </td>
                            </tr>

                        </table>
                        <if condition="$one.order_type eq '3'">
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <a class="btn btn-default" href="javascript:parent.openIframeLayer('{:url('ZjOrder/complete',array('id'=>$one['id']))}');">辅导完成</a>
                                </div>
                            </div>
                        </if>

                </if>



            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>