123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- {include file="default/base/mall_top" /}
- <link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/home_cart.css">
- <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
- <!--{if $Think.config.ds_config.mapak_type eq '1'}-->
- <script type="text/javascript">
- window._AMapSecurityConfig = {
- securityJsCode:"{$Think.config.ds_config.gaode_jscode}",
- }
- </script>
- <script type="text/javascript" src="//webapi.amap.com/maps?v=2.0&key={$Think.config.ds_config.gaode_ak}"></script>
- <!--{else}-->
- <script type="text/javascript" src="{$Think.HTTP_TYPE}api.map.baidu.com/api?v=2.0&ak={$Think.config.ds_config.baidu_ak}"></script>
- <!--{/if}-->
- <div class="dsc-header">
- <div class="logo">
- <a href="{$Think.HOME_SITE_URL}"><img src="{:ds_get_pic(ATTACH_COMMON,$Think.config.ds_config.site_logo)}"/></a>
- </div>
- <ul class="dsc-flow">
- <li class=""><i class="iconfont"></i>
- <p>{$Think.lang.cart_index_ensure_order}</p>
- <sub></sub>
- <div class="hr"></div>
- </li>
- <li class="current"><i class=" iconfont"></i>
- <p>{$Think.lang.cart_index_ensure_info}</p>
- <sub></sub>
- <div class="hr"></div>
- </li>
- <li class=""><i class="iconfont"></i>
- <p>{$Think.lang.cart_index_payment}</p>
- <sub></sub>
- <div class="hr"></div>
- </li>
- <li class=""><i class="iconfont"></i>
- <p>{$Think.lang.cart_index_buy_finish}</p>
- <sub></sub>
- <div class="hr"></div>
- </li>
- </ul>
- </div>
- <div class="dsc-line"></div>
- <form method="post" id="order_form" name="order_form" action="{:url('Buy/buy_step2')}">
- {include file="default/member/buy/buy_fcode" /}
- <div class="dsc-main">
- <div class="dsc-title">
- <h3>{$Think.lang.cart_index_ensure_info}</h3>
- <h5>{$Think.lang.check_information}</h5>
- </div>
- {include file="default/member/buy/buy_address" /}
- {include file="default/member/buy/buy_payment" /}
- {include file="default/member/buy/buy_invoice" /}
- {include file="default/member/buy/buy_goods_list" /}
- {include file="default/member/buy/buy_amount" /}
- <!-- 订单来源1为PC 2为手机 -->
- <input value="1" type="hidden" name="order_from">
- <!-- 来源于购物车标志 -->
- <input value="{$ifcart}" type="hidden" name="ifcart">
- <!-- offline/online -->
- <input value="online" name="pay_name" id="pay_name" type="hidden">
- <!-- 是否保存增值税发票判断标志 -->
- <input value="{$vat_hash}" name="vat_hash" type="hidden">
- <!-- 收货地址ID -->
- <input value="{$address_info.address_id}" name="address_id" id="address_id" type="hidden">
- <!-- 城市ID(运费) -->
- <input value="" name="buy_city_id" id="buy_city_id" type="hidden">
-
- <!-- 记录所选地区是否支持货到付款 第一个前端JS判断 第二个后端PHP判断 -->
- <input value="" id="allow_offpay" name="allow_offpay" type="hidden">
- <input value="" id="allow_offpay_batch" name="allow_offpay_batch" type="hidden">
- <input value="" id="offpay_hash" name="offpay_hash" type="hidden">
- <input value="" id="offpay_hash_batch" name="offpay_hash_batch" type="hidden">
- <input value="{present name='inv_info.invoice_id'}{$inv_info.invoice_id}{/present}" name="invoice_id" id="invoice_id" type="hidden">
- </div>
- </form>
- <script>
- var SUBMIT_FORM = true;
- //计算总运费和每个店铺小计
- function calcOrder() {
- var allTotal = 0;
- $('em[ds_type="eachStoreTotal"]').each(function(){
- store_id = $(this).attr('store_id');
- var eachTotal = 0;
- if ($('#eachStoreFreight_'+store_id).length > 0) {
- if($('#chain_'+store_id).val()>0){
- $('#eachStoreFreight_' + store_id).html('0.00');
- }else{
- $('#eachStoreFreight_' + store_id).html(number_format($('#eachStoreFreight_' + store_id).attr('data-freight'), 2));
- }
- eachTotal += parseFloat($('#eachStoreFreight_'+store_id).html());
- }
- if ($('#eachStoreGoodsTotal_'+store_id).length > 0) {
- eachTotal += parseFloat($('#eachStoreGoodsTotal_'+store_id).html());
- }
- if ($('#eachStoreManSong_'+store_id).length > 0) {
- eachTotal += parseFloat($('#eachStoreManSong_'+store_id).html());
- }
- if ($('#eachStoreVoucher_'+store_id).length > 0) {
- eachTotal += parseFloat($('#eachStoreVoucher_'+store_id).html());
- }
-
- $(this).html(number_format(eachTotal,2));
- allTotal += eachTotal;
- });
-
- //计算平台代金券
- if ($('#MallVoucher').length > 0) {
- var mallvoucharTotal = parseFloat($('#MallVoucher').html());
- allTotal += mallvoucharTotal;
- }
- $('#orderTotal').html(number_format(allTotal,2));
- }
- $(function(){
- $.ajaxSetup({
- async : false
- });
- $('select[dstype="voucher"]').on('change',function(){
- if ($(this).val() == '') {
- $('#eachStoreVoucher_'+items[1]).html('-0.00');
- } else {
- var items = $(this).val().split('|');
- $('#eachStoreVoucher_'+items[1]).html('-'+number_format(items[2],2));
- }
- calcOrder();
- });
- $('select[dstype="mallvoucher"]').on('change',function(){
- if ($(this).val() == '') {
- $('#MallVoucher').html('-0.00');
- } else {
- var items = $(this).val().split('|');
- $('#MallVoucher').html('-'+number_format(items[1],2));
- }
- calcOrder();
- });
- });
- function disableOtherEdit(showText) {
- $('a[ds_type="buy_edit"]').each(function() {
- if ($(this).css('display') != 'none') {
- $(this).after('<font color="#B0B0B0">' + showText + '</font>');
- $(this).hide();
- }
- });
- disableSubmitOrder();
- }
- function ableOtherEdit() {
- $('a[ds_type="buy_edit"]').show().next('font').remove();
- ableSubmitOrder();
- }
- function ableSubmitOrder() {
- $('#submitOrder').on('click', function() {
- submitNext()
- }).css('cursor', '').addClass('dsc-btn-acidblue');
- }
- function disableSubmitOrder() {
- $('#submitOrder').unbind('click').css('cursor', 'not-allowed').removeClass('dsc-btn-acidblue');
- }
- </script>
- {include file="default/base/mall_footer" /}
|