{include file="public/mall_top" /} 
<style>
    .w1200{width:1000px;}
</style>
<link rel="stylesheet" href="{$Think.config.url_domain_root}static/home/css/home_cart.css">
<script src="{$Think.config.url_domain_root}static/plugins/jquery.validate.min.js"></script>
<script src="{$Think.config.url_domain_root}static/common/js/mlselection.js"></script>
<div class="dsc-header">
    <div class="logo">
        <a href="{$Think.config.url_domain_root}index.php"><img src="{$Think.config.url_attach_common}/{$Think.config.site_logo}"/></a>
    </div>
    <ul class="dsc-flow">
        <li class=""><i class="step1"></i>
            <p>我的购物车</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class=""><i class="step2"></i>
            <p>填写核对购物信息</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class="current"><i class="step3"></i>
            <p>支付提交</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class=""><i class="step4"></i>
            <p>订单完成</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
    </ul>
</div>
<div class="dsc-main">
  <div class="dsc-title">
    <h3>支付提交</h3>
    <h5>订单详情内容可通过查看<a href="{:url('/home/Memberorder/index')}" target="_blank">我的订单</a>进行核对处理。</h5>
  </div>
  <form action="{:url('/home/Payment/real_order')}" method="POST" id="buy_form">
    <input type="hidden" name="pay_sn" value="{$pay_info.pay_sn}">
    <input type="hidden" id="payment_code" name="payment_code" value="">
    <div class="dsc-receipt-info">
      <div class="dsc-receipt-info-title">
        <h3>
            {$order_remind}
            {if condition="$pay_amount_online gt 0"}
            在线支付金额：<strong>￥{$pay_amount_online}</strong>
            {/if}
          </h3>
      </div>
      <table class="dsc-table-style">
        <thead>
          <tr>
            <th class="w50"></th>
            <th class="w200 tl">订单号</th>
            <th class="tl w150">支付方式</th>
            <th class="tl">金额</th>
            <th class="w150">物流</th>
          </tr>
        </thead>
        <tbody>
          <?php if (count($order_list)>1) {?>
          <tr>
            <th colspan="20">由于您的商品由不同商家发出，此单将分为<?php echo count($order_list);?>个不同子订单配送！</th>
          </tr>
          <?php }?>
          <?php foreach ($order_list as $key => $order) {?>
          <tr>
            <td></td>
            <td class="tl"><?php echo $order['order_sn']; ?></td>
            <td class="tl"><?php echo $order['payment_state'];?></td>
            <td class="tl">￥<?php echo $order['order_amount'];?></td>
            <td>快递</td>
          </tr>
          <?php  }?>
        </tbody>
      </table>
    </div>
    <div class="dsc-receipt-info">
      <?php if (!isset($payment_list)) {?>
      <?php }else if (empty($payment_list)){?>
      <div class="nopay">抱歉，暂时没有符合条件的支付方式，请 联系卖家 进行后续购买流程</div>
      <?php } else {?>
      <div class="dsc-receipt-info-title">
        <h3>选择在线支付</h3>
      </div>
      <ul class="dsc-payment-list">
        <?php foreach($payment_list as $val) { ?>
        <li payment_code="<?php echo $val['payment_code']; ?>">
          <label for="pay_<?php echo $val['payment_code']; ?>">
          <i></i>
          <div class="logo" for="pay_<?php echo $val['payment_id']; ?>"> <img src="{$Think.config.url_domain_root}static/home/images/payment/<?php echo $val['payment_code']; ?>_logo.gif" /> </div>
          </label>
        </li>
        <?php } ?>
      </ul>
      <?php } ?>
    </div>
    <?php if ($pay_amount_online > 0) {?>
    <div class="dsc-bottom tc mb50"><a href="javascript:void(0);" id="next_button" class="dsc-btn dsc-btn-green"><i class="icon-shield"></i>确认提交支付</a></div>
    <?php }?>
  </form>
</div>
<script type="text/javascript">
$(function(){
    $('.dsc-payment-list > li').on('click',function(){
    	$('.dsc-payment-list > li').removeClass('using');
        $(this).addClass('using');
        $('#payment_code').val($(this).attr('payment_code'));
    });
    $('#next_button').on('click',function(){
        if ($('#payment_code').val() == '') {
        	showDialog('请选择支付方式', 'error','','','','','','','','',2);return false;
        }
        $('#buy_form').submit();
    });
});
</script>




{include file="public/mall_footer" /}