{template "header.html"}

<form class="form-horizontal" method="post" role="form" id="myform">
    {dr_form_hidden()}
    <div class="form-body">
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('购买账号')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {Function_list::author($order.username)} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('订单编号')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$order.sn} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('订单金额')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> ￥{number_format($order.money, 2)} </p>
            </div>
        </div>
        {if !$order.deliver_status}
        <div class="form-group" id="dr_row_id">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('选择物流')}</label>
            <div class="col-xs-8">
                <select class="form-control" name="data[id]">
                    <option value="0"> -- </option>
                    {loop $delivery_corp $t}
                    <option value="{$t.id}">{$t.name}</option>
                    {/loop}
                </select>
            </div>
        </div>
        <div class="form-group" id="dr_row_sn">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('运单编号')}</label>
            <div class="col-xs-8">
                <input class="form-control" name="data[sn]" type="text">
            </div>
        </div>
        <div class="form-group" id="dr_row_name">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('收货人')}</label>
            <div class="col-xs-8">
                <input class="form-control" name="data[name]" value="{$order.name}" type="text">
            </div>
        </div>
        <div class="form-group" id="dr_row_phone">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('联系电话')}</label>
            <div class="col-xs-8">
                <input class="form-control" name="data[phone]" value="{$order.phone}" type="text">
            </div>
        </div>
        <div class="form-group" id="dr_row_address">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('详细地址')}</label>
            <div class="col-xs-8">
                <textarea class="form-control" id="dr_address" name="data[address]" rows="3">{$order.address}</textarea>
            </div>
        </div>
        <div class="form-group" id="dr_row_note">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('发货备注')}</label>
            <div class="col-xs-8">
                <textarea class="form-control" id="dr_note" name="data[note]" rows="5">货物已送出</textarea>
            </div>
        </div>
        {else}
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('收货人')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$delivery.name} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('联系电话')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$delivery.phone} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('收货地址')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$delivery.address} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('发货时间')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {dr_date($order.deliver_time)} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('配送方式')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$delivery.deliver_name} </p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label ajax_name">{dr_lang('运单编号')}</label>
            <div class="col-xs-8">
                <p class="form-control-static"> {$delivery.deliver_sn} </p>
                <p class="form-control-static kdinfo">  </p>
            </div>
        </div>
        {if $delivery.deliver_sn}
        <script>
            $.get('/index.php?s=mall&c=api&m=kuaidi&sn={$delivery.deliver_sn}&code={$delivery.deliver_code}', function (html) {
                $('.kdinfo').html(html);
            });
        </script>
        {/if}

        {/if}
    </div>
</form>


{template "footer.html"}