{include file="public/mall_top" /}
{include file="public/mall_header" /}

<link rel="stylesheet" href="{$Think.config.url_domain_root}static/home/css/member.css">
<div class="dsm-container">
<div class="dsm-oredr-show">
  <div class="dsm-order-info">
    <div class="dsm-order-details">
      <div class="title">{:lang('member_pointorder_info_ordersimple')}</div>
      <div class="content">
        <dl>
          <dt>{:lang('member_pointorder_info_shipinfo')}{:lang('ds_colon')}</dt>
          <dd>
            <span>{$orderaddress_info.point_truename}</span>
            <span>{$orderaddress_info.point_mobphone}</span>
            <span>{$orderaddress_info.point_telphone}</span>
            <span>{$orderaddress_info.point_areainfo}</span>
            <span>{$orderaddress_info.point_address}</span>
        </dl>
        <dl>
          <dt>{:lang('member_pointorder_info_ordermessage')}{:lang('ds_colon')}</dt>
          <dd>
            {if $order_info.point_ordermessage}
            {$order_info.point_ordermessage}
           {/if}
          </dd>
        </dl>
        <dl class="line">
          <dt>{:lang('member_pointorder_ordersn')}{:lang('ds_colon')}</dt>
          <dd>{$order_info.point_ordersn}<a href="javascript:void(0);">更多<i class="icon-angle-down"></i>
            <div class="more"><span class="arrow"></span>
              <ul>
                <li>{:lang('member_pointorder_addtime')}{:lang('ds_colon')}
                  <span>{:date('Y-m-d H:i:s',$order_info.point_addtime)}</span>
                </li>
                {if $order_info.point_shippingtime !=''}
                <li>{:lang('member_pointorder_shipping_time')}{:lang('ds_colon')}
                  <span> {:date('Y-m-d H:i:s',$order_info.point_shippingtime)} </span>
                </li>
               {/if}
              </ul>
            </div>
            </a>
          </dd>
        </dl>
      </div>
    </div>
    <div class="dsm-order-condition">
      {if $order_info.point_orderstate == $pointorderstate_arr.canceled.0}
      <dl>
        <dt><i class="icon-off orange"></i>兑换订单状态：</dt>
        <dd>{$pointorderstate_arr.canceled.1}</dd>
      </dl>
      <ul>
        <li>已取消了该兑换订单，<a href="{:url('pointprod/plist')}">马上去看看其他兑换礼品</a></li>
      </ul>
      {else /}
      <div class="dsm-order-step">
        <dl class="step-first current">
          <dt>提交兑换</dt>
          <dd class="bg"></dd>
          <dd class="date" title="{:lang('member_pointorder_addtime')}">{:date('Y-m-d H:i:s',$order_info.point_addtime)}</dd>
        </dl>
        <dl class="{if $order_info.point_shippingtime !=''}current{/if}">
          <dt>礼品发货</dt>
          <dd class="bg"> </dd>
          <dd class="date" title="{:lang('member_pointorder_shipping_time')} ">{:date('Y-m-d H:i:s',$order_info.point_shippingtime)}</dd>
        </dl>
        <dl class="{if $order_info.point_finnshedtime !=''}current{/if}">
          <dt>确认收货</dt>
          <dd class="bg"> </dd>
          <dd class="date" title="">{:date('Y-m-d H:i:s',$order_info.point_finnshedtime)}</dd>
        </dl>
      </div>
      {/if}
    </div>
  </div>
  <div class="dsm-order-contnet">
    <table class="dsm-default-table order">
      <thead>
        <tr>
          <th class="w10"></th>
          <th colspan="2">{:lang('member_pointorder_info_prodinfo')}</th>
          <th class="w120">{:lang('member_pointorder_exchangepoints')}</th>
          <th class="w100">{:lang('member_pointorder_info_prodinfo_exnum')}</th>
          <th class="w100">{:lang('member_pointorder_orderstate')}</th>
          <th class="w150">兑换单操作</th>
        </tr>
      </thead>
      <tbody>
      {notempty name="prod_list"}
        {if $order_info.point_shippingtime !=''}
        <tr>
          <th colspan="20">
          <div class="order-deliver">
            <span>物流公司： <a target="_blank" href="{$express_info.e_url}">{$express_info.e_name}</a></span>
            <span> {:lang('member_pointorder_shipping_code')}{:lang('ds_colon')} {$order_info.point_shippingcode} </span>
            <span><a href="javascript:void(0);" id="show_shipping">物流跟踪<i class="icon-angle-down"></i>
              <div class="more"><span class="arrow"></span>
              <ul id="shipping_ul"><li>加载中...</li></ul>
              </div>
              </a></span></div></th>
        </tr>
        {/if}
      {volist name="prod_list" id="val"}
        <tr>
          <td></td>
          <td class="w50">
            <div class="pic-thumb">
              <a href="{:url('pointprod/pinfo',['id'=>$val.point_goodsid])}" target="_blank">
                <img src="{$val.point_goodsimage_small}"/>
              </a>
            </div>
          </td>
          <td class="tl">
            <dl class="goods-name">
              <dt>
                <a href="{:url('pointprod/pinfo',['id'=>$val.point_goodsid])}" target="_blank">{$val.point_goodsname}</a>
              </dt>
            </dl>
          </td>
          <td>{$val.point_goodspoints}</td>
          <td>{$val.point_goodsnum}</td>
          <?php if ((count($prod_list) > 1 && $key ==0) || (count($prod_list) == 1)){?>
          <td class="bdl" rowspan="<?php echo count($prod_list);?>">{$order_info.point_orderstatetext}</td>
          <td class="bdl" rowspan="<?php echo count($prod_list);?>">
            {if $order_info.point_orderallowcancel}
            <p><a href="javascript:void(0)" class="dsm-btn dsm-btn-orange"
                  onclick="ajax_get_confirm('{:lang('member_pointorder_cancel_confirmtip')}','{:url('memberpointorder/cancel_order',['order_id'=>$order_info.point_orderid])}');">{:lang('member_pointorder_cancel_title')}</a></p>
            {/if}
            {if $order_info.point_orderallowreceiving}
            <p>
              <a href="javascript:void(0)" class="dsm-btn"
                 onclick="ajax_get_confirm('{:lang('member_pointorder_confirmreceivingtip')}','{:url('memberpointorder/receiving_order',['order_id'=>$order_info.point_orderid])}');">{:lang('member_pointorder_confirmreceiving')}</a>
            </p>
            {/if}
          </td>
          <?php } ?>
        </tr>
       {/volist}
      {/notempty}
      </tbody>
      <tfoot>
        <tr>
          <td colspan="20">
            <dl class="sum">
              <dt>兑换单所需：</dt>
              <dd><em>{$order_info.point_allpoint}</em>分</dd>
            </dl></td>
        </tr>
      </tfoot>
    </table>
  </div>
</div>
</div>
<script type="text/javascript">
$(function(){
    $('#show_shipping').on('hover',function(){
        var_send = '<?php echo @date("Y-m-d H:i:s",$order_info.point_shippingtime); ?>&nbsp;&nbsp;平台已发货<br/>';
        $.getJSON(SITE_URL+'index.php/home/member_order/get_express',function(data){
            if(data){
                data = var_send+data.join('<br/>');
                $('#shipping_ul').html('<li>'+data+'</li>');
                $('#show_shipping').unbind('hover');
            }else{
                $('#shipping_ul').html(var_send);
                $('#show_shipping').unbind('hover');
            }
        });
    });
});
</script>