{include file="public/header" /}
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>虚拟订单退款</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
  <table class="table tb-type2 order">
    <tbody>
      <tr class="space">
        <th colspan="2">{$Think.lang.order_detail}</th>
      </tr>
      <tr>
        <th>{$Think.lang.order_info}</th>
      </tr>
      <tr>
        <td colspan="2"><ul>
            <li>
            <strong>{$Think.lang.order_number}:</strong><?php echo $order_info['order_sn'];?>
            </li>
            <li><strong>{$Think.lang.order_state}:</strong><?php echo $order_info['state_desc'];?></li>
            <li><strong>{$Think.lang.order_total_price}:</strong><span class="red_common">{$Think.lang.currency}<?php echo $order_info['order_amount'];?> </span>
            </li>
            <li><strong>{$Think.lang.order_time}{$Think.lang.ds_colon}</strong><?php echo date('Y-m-d H:i:s',$order_info['add_time']);?></li>
            <li><strong>{$Think.lang.buyer_name}{$Think.lang.ds_colon}</strong><?php echo $order_info['buyer_name'];?></li>
            <li><strong>接收手机{$Think.lang.ds_colon}</strong><?php echo $order_info['buyer_phone'];?></li>
            <li><strong>{$Think.lang.payment}{$Think.lang.ds_colon}</strong><?php echo orderPaymentName($order_info['payment_code']);?></li>
            <?php if(intval($order_info['payment_time'])){?>
            <li><strong>{$Think.lang.payment_time}{$Think.lang.ds_colon}</strong><?php echo date('Y-m-d H:i:s',$order_info['payment_time']);?></li>
            <?php }?>
            <?php if(intval($order_info['shipping_time'])){?>
            <li><strong>{$Think.lang.ship_time}{$Think.lang.ds_colon}</strong><?php echo date('Y-m-d H:i:s',$order_info['shipping_time']);?></li>
            <?php }?>
            <?php if(intval($order_info['finnshed_time'])){?>
            <li><strong>{$Think.lang.complate_time}{$Think.lang.ds_colon}</strong><?php echo date('Y-m-d H:i:s',$order_info['finnshed_time']);?></li>
            <?php }?>
            <?php if($order_info['extend_order_common']['order_message'] != ''){?>
            <li><strong>{$Think.lang.buyer_message}{$Think.lang.ds_colon}</strong><?php echo $order_info['extend_order_common']['order_message'];?></li>
            <?php }?>
            <li><strong>{$Think.lang.store_name}{$Think.lang.ds_colon}</strong><?php echo $order_info['store_name'];?></li>
            <li><strong>买家留言{$Think.lang.ds_colon}</strong><?php echo $order_info['buyer_msg'];?></li>
          </ul></td>
      </tr>
      <tr>
        <th>{$Think.lang.product_info}</th>
      </tr>
      <tr>
        <td>
            <table class="table tb-type2 goods ">
            <tbody>
              <tr>
                <th></th>
                <th>商品</th>
                <th class="align-center">单价</th>
                <th class="align-center">数量</th>
                <th class="align-center">佣金比例</th>
                <th class="align-center">收取佣金</th>
              </tr>
              <tr>
                <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><a href="{:url('home/goods/index',['goods_id'=>$order_info.goods_id])}" target="_blank"><img alt="{$Think.lang.product_pic}" src="<?php echo thumb($order_info, 60);?>" /></a></span></div></td>
                <td class="w50pre"><p><a href="{:url('home/goods/index',['goods_id'=>$order_info.goods_id])}" target="_blank"><?php echo $order_info['goods_name'];?></a></p><p><?php if ($order_info['order_promotion_type'] == 1) {?>抢购，<?php } ?>使用时效：即日起 至 <?php echo date("Y-m-d",$order_info['vr_indate']);?>
              <?php if ($order_info['vr_invalid_refund'] == '0') { ?>
              ，过期不退款
              <?php } ?></p></td>
                <td class="w96 align-center"><span class="red_common">{$Think.lang.currency}<?php echo $order_info['goods_price'];?></span></td>
                <td class="w96 align-center"><?php echo $order_info['goods_num'];?></td>
                <td class="w96 align-center"><?php echo $order_info['commis_rate'] == 200 ? '' : $order_info['commis_rate'].'%';?></td>
                <td class="w96 align-center"><?php echo $order_info['commis_rate'] == 200 ? '' : dsPriceFormat($order_info['goods_price']*$order_info['commis_rate']/100);?></td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>

      <tr>
        <th>{$Think.lang.product_info}</th>
      </tr>
      <tr>
        <td><table class="table tb-type2 goods">
            <tbody>
              <tr>
          <th class="w10"></th>
          <th>兑换码</th>
          <th>价格 (元)</th>
          <th>数量</th>
          <th>兑换码状态</th>
              </tr>
         <?php if (!empty($order_info['extend_vr_order_code'])) { ?>
         <?php foreach($order_info['extend_vr_order_code'] as $code_info){?>
            <tr>
            <td></td>
            <td class="w50"><?php echo $code_info['vr_code'];?></td>
            <td class="bdl"><?php echo $order_info['goods_price'];?></td>
            <td class="bdl">1</td>
            </td>
            <td class="bdl"><?php echo $code_info['vr_code_desc'];?></td>
            </tr>
       <?php } ?>
	   <?php } else { ?>
	   <tr><td colspan="20" class="align-center">未生成电子兑换码</td></tr>
	   <?php } ?>
            </tbody>
          </table></td>
      </tr>
    </tbody>
    <tfoot>
      <tr class="tfoot">
        <td><a href="JavaScript:void(0);" class="btn" onclick="history.go(-1)"><span>{$Think.lang.ds_back}</span></a></td>
      </tr>
    </tfoot>
  </table>
</div>
