buy_step2.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. {include file="default/base/mall_top" /}
  2. <link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/home_cart.css">
  3. <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  4. <div class="dsc-header">
  5. <div class="logo">
  6. <a href="{$Think.HOME_SITE_URL}"><img src="{:ds_get_pic(ATTACH_COMMON,$Think.config.ds_config.site_logo)}"/></a>
  7. </div>
  8. <ul class="dsc-flow">
  9. <li class=""><i class="iconfont">&#xe69a;</i>
  10. <p>{$Think.lang.cart_index_ensure_order}</p>
  11. <sub></sub>
  12. <div class="hr"></div>
  13. </li>
  14. <li class=""><i class="iconfont">&#xe731;</i>
  15. <p>{$Think.lang.cart_index_ensure_info}</p>
  16. <sub></sub>
  17. <div class="hr"></div>
  18. </li>
  19. <li class="current"><i class="iconfont">&#xe64f;</i>
  20. <p>{$Think.lang.cart_index_payment}</p>
  21. <sub></sub>
  22. <div class="hr"></div>
  23. </li>
  24. <li class=""><i class="iconfont">&#xe67e;</i>
  25. <p>{$Think.lang.cart_index_buy_finish}</p>
  26. <sub></sub>
  27. <div class="hr"></div>
  28. </li>
  29. </ul>
  30. </div>
  31. <div class="dsc-line"></div>
  32. <div class="dsc-main">
  33. <div class="dsc-title">
  34. <h3>{$Think.lang.cart_index_payment}</h3>
  35. <h5>{$Think.lang.order_details_can_viewed}<a href="{:url('Memberorder/index')}" target="_blank">{$Think.lang.my_order}</a>{$Think.lang.carry_out_check}。</h5>
  36. </div>
  37. <form action="{:url('Payment/real_order')}" method="POST" id="buy_form">
  38. <input type="hidden" name="pay_sn" value="{$pay_info.pay_sn}">
  39. <input type="hidden" id="payment_code" name="payment_code" value="">
  40. <div class="dsc-receipt-info">
  41. <div class="dsc-receipt-info-title">
  42. <h3>
  43. {$order_remind}
  44. {if condition="$pay_amount_online gt 0"}
  45. {$Think.lang.online_payment_amount}:<strong>¥{$pay_amount_online}</strong>
  46. {/if}
  47. </h3>
  48. </div>
  49. <table class="dsc-table-style">
  50. <thead>
  51. <tr>
  52. <th class="w50"></th>
  53. <th class="w200 tl">{$Think.lang.order_number}</th>
  54. <th class="tl w150">{$Think.lang.payment_method}</th>
  55. <th class="tl">{$Think.lang.amount_of}</th>
  56. <th class="w150">{$Think.lang.logistics}</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. {if count($order_list)>1}
  61. <tr>
  62. <th colspan="20">{$Think.lang.different_businesses}{:count($order_list)}{$Think.lang.different_suborder_deliveries}</th>
  63. </tr>
  64. {/if}
  65. {foreach name="order_list" item="order" key="key" }
  66. <tr>
  67. <td></td>
  68. <td class="tl">{$order.order_sn}</td>
  69. <td class="tl">{$order.payment_state}</td>
  70. <td class="tl">¥{$order.order_amount}</td>
  71. <td>{$Think.lang.courier}</td>
  72. </tr>
  73. {/foreach}
  74. </tbody>
  75. </table>
  76. </div>
  77. <!-- S 预存款 & 充值卡 -->
  78. {if $pay_amount_online>0 && (!empty($available_pd_amount) || !empty($available_rcb_amount))}
  79. <div id="pd_panel">
  80. <div class="pd-account" colspan="6"><div class="dsc-pd-account">
  81. {notempty name="available_rcb_amount"}
  82. <div class="mt5 mb5">
  83. <label>
  84. <input type="checkbox" class="vm mr5" value="1" name="rcb_pay">
  85. {$Think.lang.use_top_up_cards}:<em>{$available_rcb_amount}</em>{$Think.lang.ds_yuan}
  86. </label>
  87. </div>
  88. {/notempty}
  89. {notempty name="available_pd_amount"}
  90. <div class="mt5 mb5">
  91. <label>
  92. <input type="checkbox" class="vm mr5" value="1" name="pd_pay">
  93. {$Think.lang.pre_deposit}:<em>{$available_pd_amount}</em>{$Think.lang.ds_yuan})</label>
  94. </div>
  95. {/notempty}
  96. {if !empty($available_pd_amount) && !empty($available_rcb_amount)}
  97. <div class="mt5 mb5">{$Think.lang.system_priority}&nbsp;&nbsp;</div>
  98. {/if}
  99. <div id="pd_password" style="display: none">{$Think.lang.pay_the_password}({$Think.lang.pay_the_password_tips}):
  100. <input type="password" class="text w120" value="" name="password" id="pay-password" maxlength="35" autocomplete="off">
  101. <input type="hidden" value="" name="password_callback" id="password_callback">
  102. <a class="dsc-btn-mini dsc-btn-orange" id="pd_pay_submit" href="javascript:void(0)">{$Think.lang.use}</a>
  103. {if !$member_paypwd}
  104. {$Think.lang.no_payment_password_set},<a href="{:url('Membersecurity/auth',['type'=>'modify_paypwd'])}" target="_blank">{$Think.lang.set_up_immediately}</a>
  105. {/if}
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. {/if}
  111. <!-- E 预存款 -->
  112. <div class="dsc-receipt-info">
  113. {notempty name="payment_list"}
  114. <div class="dsc-receipt-info-title">
  115. <h3>{$Think.lang.choose_online_payment}</h3>
  116. </div>
  117. <ul class="dsc-payment-list">
  118. {foreach name="payment_list" item="val"}
  119. {if $val.payment_code=='allinpay'}
  120. {php}$sub_payment_list=array('W01','A01','Q01','U01');{/php}
  121. <input type="hidden" id="{$val.payment_code}_sub_payment_code" name="paytype" value="">
  122. {else}
  123. {php}$sub_payment_list=array('');{/php}
  124. {/if}
  125. {foreach name="sub_payment_list" item="sub"}
  126. <li payment_code="{$val.payment_code}" sub_payment_code="{$sub}">
  127. <label for="pay_{$val.payment_code}">
  128. <i></i>
  129. <div class="logo" for="pay_{$val.payment_code}"> <img src="{$Think.HOME_SITE_ROOT}/images/payment/{$val.payment_code}{notempty name='sub'}_{$sub}{/notempty}_logo.gif" /> </div>
  130. </label>
  131. </li>
  132. {/foreach}
  133. {/foreach}
  134. </ul>
  135. {else /}
  136. {if $pay_amount_online>0}
  137. <div class="nopay">{$Think.lang.satisfy_condition_means_payment}</div>
  138. {/if}
  139. {/notempty}
  140. </div>
  141. {if $pay_amount_online > 0}
  142. <div class="dsc-bottom tc mb50"><a href="javascript:void(0);" id="next_button" class="dsc-btn dsc-btn-green"><i class="iconfont">&#xe6f0;</i>{$Think.lang.confirm_submit_payment}</a></div>
  143. {/if}
  144. </form>
  145. </div>
  146. <script type="text/javascript">
  147. $(function(){
  148. var ifSubmit=false
  149. $('.dsc-payment-list > li').on('click',function(){
  150. $('.dsc-payment-list > li').removeClass('using');
  151. $(this).addClass('using');
  152. $('#payment_code').val($(this).attr('payment_code'));
  153. if($(this).attr('sub_payment_code')!=''){
  154. $('#'+$(this).attr('payment_code')+'_sub_payment_code').val($(this).attr('sub_payment_code'));
  155. }
  156. });
  157. $('.dsc-payment-list > li:eq(0)').click()
  158. $('#next_button').on('click',function(){
  159. if ($('#payment_code').val() == '') {
  160. layer.alert('{$Think.lang.cart_step2_choose_pay_method}');return false;
  161. }
  162. if (($('input[name="pd_pay"]').prop('checked') || $('input[name="rcb_pay"]').prop('checked')) && $('#password_callback').val()==''){
  163. ifSubmit=true
  164. $('#pd_pay_submit').click()
  165. return false;
  166. }
  167. $('#buy_form').submit();
  168. });
  169. {if !empty($available_pd_amount) || !empty($available_rcb_amount)}
  170. function showPaySubmit() {
  171. if ($('input[name="pd_pay"]').prop('checked') || $('input[name="rcb_pay"]').prop('checked')) {
  172. $('#pay-password').val('');
  173. $('#password_callback').val('');
  174. $('#pd_password').show();
  175. } else {
  176. $('#pd_password').hide();
  177. }
  178. }
  179. $('#pd_pay_submit').on('click',function(){
  180. if ($('#pay-password').val() == '') {
  181. ifSubmit=false
  182. layer.alert('{$Think.lang.enter_payment_password}');return;
  183. }
  184. $('#password_callback').val('');
  185. var url = HOMESITEURL+'/Buy/check_pd_pwd.html'
  186. $.post(url, {'password':$('#pay-password').val()}, function(data){
  187. if (data == '1') {
  188. $('#password_callback').val('1');
  189. $('#pd_password').hide();
  190. if(ifSubmit){
  191. $('#buy_form').submit();
  192. }
  193. } else {
  194. ifSubmit=false
  195. $('#pay-password').val('');
  196. layer.alert('{$Think.lang.payment_password_error}');return;
  197. }
  198. });
  199. });
  200. {/if}
  201. {if !empty($available_rcb_amount)}
  202. $('input[name="rcb_pay"]').on('change',function(){
  203. showPaySubmit();
  204. if ($(this).prop('checked') && !$('input[name="pd_pay"]').prop('checked')) {
  205. if ({$available_rcb_amount} >= parseFloat($('#orderTotal').html())) {
  206. $('input[name="pd_pay"]').prop('checked',false).prop('disabled',true);
  207. }
  208. } else {
  209. $('input[name="pd_pay"]').prop('disabled',false);
  210. }
  211. });
  212. {/if}
  213. {if !empty($available_pd_amount)}
  214. $('input[name="pd_pay"]').on('change',function(){
  215. showPaySubmit();
  216. if ($(this).prop('checked') && !$('input[name="rcb_pay"]').prop('checked')) {
  217. if ({$available_pd_amount} >= parseFloat($('#orderTotal').html())) {
  218. $('input[name="rcb_pay"]').prop('checked',false).prop('disabled',true);
  219. }
  220. } else {
  221. $('input[name="rcb_pay"]').prop('disabled',false);
  222. }
  223. });
  224. {/if}
  225. });
  226. </script>
  227. <style>
  228. .pd-account { background-color: #FFAA01; padding: 2px;}
  229. </style>
  230. {include file="default/base/mall_footer" /}