|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="{__TPL__}css/mobile-select-area.css"> |
|
|
|
<link rel="stylesheet" type="text/css" href="{__TPL__}css/dialog.css"> |
|
|
|
<form action="{U('flow/index/done')}" method="post" name="theForm" id="theForm"> |
|
|
|
<form action="{U('flow/index/done')}" method="post" name="theForm" id="theForm" onSubmit="return checkOrderForm(this)"> |
|
|
|
<div class="con"> |
|
|
|
<div class="flow-checkout"> |
|
|
|
<section class="flow-checkout-adr padding-all"> |
|
|
|
@ -98,19 +98,19 @@ |
|
|
|
</div> |
|
|
|
<span class="t-jiantou"><i class="iconfont icon-jiantou tf-180"></i></span> |
|
|
|
|
|
|
|
<!--配送方式star--> |
|
|
|
<div class="show-goods-dist ts-3 b-color-1 j-show-goods-text j-filter-show-div"> |
|
|
|
<section class="goods-show-title of-hidden padding-all b-color-f"> |
|
|
|
<h3 class="fl g-c-title-h3">配送方式</h3> |
|
|
|
<i class="iconfont icon-guanbi1 show-div-guanbi fr"></i> |
|
|
|
</section> |
|
|
|
<section class="s-g-list-con swiper-scroll"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide select-two"> |
|
|
|
<ul class="j-get-one padding-all select-shipping"> |
|
|
|
<li class="ect-select"> |
|
|
|
<label class="ts-1 dis-box {if $ru.shipping_type == 0}active{/if}" data-type="0" data-shipping="{$ru.shipping.shipping_id}" data-ruid="{$ru.ru_id}"> |
|
|
|
<dd> |
|
|
|
<!--配送方式star--> |
|
|
|
<div class="show-goods-dist ts-3 b-color-1 j-show-goods-text j-filter-show-div"> |
|
|
|
<section class="goods-show-title of-hidden padding-all b-color-f"> |
|
|
|
<h3 class="fl g-c-title-h3">配送方式</h3> |
|
|
|
<i class="iconfont icon-guanbi1 show-div-guanbi fr"></i> |
|
|
|
</section> |
|
|
|
<section class="s-g-list-con swiper-scroll"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide select-two"> |
|
|
|
<ul class="j-get-one padding-all select-shipping"> |
|
|
|
<li class="ect-select"> |
|
|
|
<label class="ts-1 dis-box {if $ru.shipping_type == 0}active{/if}" data-type="0" data-shipping="{$ru.shipping.shipping_id}" data-ruid="{$ru.ru_id}"> |
|
|
|
<dd> |
|
|
|
<span> |
|
|
|
{if $ru.shipping.shipping_name} |
|
|
|
商家配送 |
|
|
|
@ -118,76 +118,76 @@ |
|
|
|
该地区不支持配送 |
|
|
|
{/if} |
|
|
|
</span> |
|
|
|
{if $ru.shipping.shipping_name } |
|
|
|
<em class="t-first"> |
|
|
|
{if $ru.shipping.shipping_fee} |
|
|
|
{if $ru.shipping.shipping_name } |
|
|
|
<em class="t-first"> |
|
|
|
{if $ru.shipping.shipping_fee} |
|
|
|
{$ru.shipping.format_shipping_fee} |
|
|
|
{else} |
|
|
|
{else} |
|
|
|
免运费 |
|
|
|
{/if} |
|
|
|
</em> |
|
|
|
{/if} |
|
|
|
</em> |
|
|
|
{/if} |
|
|
|
</dd> |
|
|
|
<i class="fr iconfont icon-gou ts-1"></i> |
|
|
|
</label> |
|
|
|
<input type="hidden" name="ru_id[]" value="{$ru.ru_id}" /> |
|
|
|
<input type="hidden" name="ru_name[]" value="{$ru.ru_name}" /> |
|
|
|
</li> |
|
|
|
{if $ru.ru_id == 0 && $ru.self_point != '' && !empty($picksite_list)} |
|
|
|
<!-- 自营商家有自提点 --> |
|
|
|
<li class="ect-select goods-site"> |
|
|
|
<label class="ts-1 {if $ru.shipping_type == 1}active{/if}" data-type="1" data-shipping="{$ru.self_point.shipping_id}" data-ruid="{$ru.ru_id}"><dd><span>门店自提</span></dd><i class="fr iconfont icon-gou ts-1"></i></label> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
</ul> |
|
|
|
<input type="hidden" name="shipping[]" value="{if $ru.shipping_type == 0}{$ru.shipping.shipping_id}{else}{$ru.self_point.shipping_id}{/if}"/> |
|
|
|
</dd> |
|
|
|
<i class="fr iconfont icon-gou ts-1"></i> |
|
|
|
</label> |
|
|
|
<input type="hidden" name="ru_id[]" value="{$ru.ru_id}" /> |
|
|
|
<input type="hidden" name="ru_name[]" value="{$ru.ru_name}" /> |
|
|
|
</li> |
|
|
|
{if $ru.ru_id == 0 && $ru.self_point != '' && !empty($picksite_list)} |
|
|
|
<!-- 自营商家有自提点 --> |
|
|
|
<li class="ect-select goods-site"> |
|
|
|
<label class="ts-1 {if $ru.shipping_type == 1}active{/if}" data-type="1" data-shipping="{$ru.self_point.shipping_id}" data-ruid="{$ru.ru_id}"><dd><span>门店自提</span></dd><i class="fr iconfont icon-gou ts-1"></i></label> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
</ul> |
|
|
|
<input type="hidden" name="shipping[]" value="{if $ru.shipping_type == 0}{$ru.shipping.shipping_id}{else}{$ru.self_point.shipping_id}{/if}"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<!--配送方式end--> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<!--配送方式end--> |
|
|
|
</section> |
|
|
|
</li> |
|
|
|
<!-- 自营商家 --> |
|
|
|
{if $ru.ru_id == 0} |
|
|
|
{if $ru.shipping_type == 1 || ($ru.shipping_type == 0 && !empty($ru.shipping.shipping_name))} |
|
|
|
<li class="j-goods-site-li {if $ru.shipping_type == 0}show-temark-div{/if}"> |
|
|
|
<section class="distribution-time j-distribution-time b-color-f"> |
|
|
|
<div class="text-right dis-box"> |
|
|
|
<label class="t-remark g-t-temark">时间</label> |
|
|
|
<span class="t-goods1 box-flex distribution-time-con"> |
|
|
|
<section class="distribution-time j-distribution-time b-color-f"> |
|
|
|
<div class="text-right dis-box"> |
|
|
|
<label class="t-remark g-t-temark">时间</label> |
|
|
|
<span class="t-goods1 box-flex distribution-time-con"> |
|
|
|
<input type="text" name="shipping_dateStr" value="{$ru.self_point.shipping_dateStr}" id="txt_area2"/> |
|
|
|
<input type="hidden" id="hd_area"/> |
|
|
|
</span> |
|
|
|
<i class="iconfont icon-rili t-first"></i> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<script type="text/javascript" src="{__TPL__}js/dialog.js"></script> |
|
|
|
<script type="text/javascript" src="{__TPL__}js/mobile-select-area.js"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
var selectArea2 = new MobileSelectArea(); |
|
|
|
selectArea2.init({ |
|
|
|
trigger: '.j-distribution-time,#txt_area2', |
|
|
|
data: {$shipping_date}, |
|
|
|
eventName: 'click', |
|
|
|
level: 2, |
|
|
|
callback: function(scroller, text, value){ |
|
|
|
if(value[0] == 0 || value[1] == 0){ |
|
|
|
d_messages('该时间无法配送,请另选配送时间'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
$.post("{U('select_picksite')}", {shipping_date: text[0], time_range: text[1]}, function(result){ |
|
|
|
if(result.error > 0){ |
|
|
|
if(result.err_msg){ |
|
|
|
d_messages(result.err_msg); |
|
|
|
} |
|
|
|
<i class="iconfont icon-rili t-first"></i> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<script type="text/javascript" src="{__TPL__}js/dialog.js"></script> |
|
|
|
<script type="text/javascript" src="{__TPL__}js/mobile-select-area.js"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
var selectArea2 = new MobileSelectArea(); |
|
|
|
selectArea2.init({ |
|
|
|
trigger: '.j-distribution-time,#txt_area2', |
|
|
|
data: {$shipping_date}, |
|
|
|
eventName: 'click', |
|
|
|
level: 2, |
|
|
|
callback: function(scroller, text, value){ |
|
|
|
if(value[0] == 0 || value[1] == 0){ |
|
|
|
d_messages('该时间无法配送,请另选配送时间'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, 'json'); |
|
|
|
return true; |
|
|
|
} |
|
|
|
}); |
|
|
|
</script> |
|
|
|
$.post("{U('select_picksite')}", {shipping_date: text[0], time_range: text[1]}, function(result){ |
|
|
|
if(result.error > 0){ |
|
|
|
if(result.err_msg){ |
|
|
|
d_messages(result.err_msg); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, 'json'); |
|
|
|
return true; |
|
|
|
} |
|
|
|
}); |
|
|
|
</script> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
{if $ru.self_point != '' && !empty($picksite_list)} |
|
|
|
@ -195,34 +195,34 @@ |
|
|
|
<label class="t-remark g-t-temark">自提点</label> |
|
|
|
<div class="box-flex t-goods1 text-right onelist-hidden"><span>{$ru.self_point.name}</span></div> |
|
|
|
<span class="t-jiantou"><i class="iconfont icon-jiantou tf-180"></i></span> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-site-div"> |
|
|
|
<section class="close-filter-div j-close-filter-div"> |
|
|
|
<div class="close-f-btn"> |
|
|
|
<i class="iconfont icon-fanhui"></i> |
|
|
|
<span>关闭</span> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-site j-flow-site swiper-scroll"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide"> |
|
|
|
<ul class="j-get-one select-two"> |
|
|
|
{foreach $picksite_list as $pick} |
|
|
|
<li class="ect-select padding-lr"> |
|
|
|
<label class="ts-1 {if $ru.self_point.point_id == $pick.point_id}active{/if}" data-point="{$pick.point_id}"> |
|
|
|
<h4>{$pick.name}</h4> |
|
|
|
<p>地址:{$pick.address}</p> |
|
|
|
<p>电话:{$pick.mobile}</p> |
|
|
|
<i class="fr iconfont icon-gou ts-1"></i> |
|
|
|
</label> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-site-div"> |
|
|
|
<section class="close-filter-div j-close-filter-div"> |
|
|
|
<div class="close-f-btn"> |
|
|
|
<i class="iconfont icon-fanhui"></i> |
|
|
|
<span>关闭</span> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-site j-flow-site swiper-scroll"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide"> |
|
|
|
<ul class="j-get-one select-two"> |
|
|
|
{foreach $picksite_list as $pick} |
|
|
|
<li class="ect-select padding-lr"> |
|
|
|
<label class="ts-1 {if $ru.self_point.point_id == $pick.point_id}active{/if}" data-point="{$pick.point_id}"> |
|
|
|
<h4>{$pick.name}</h4> |
|
|
|
<p>地址:{$pick.address}</p> |
|
|
|
<p>电话:{$pick.mobile}</p> |
|
|
|
<i class="fr iconfont icon-gou ts-1"></i> |
|
|
|
</label> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<input type="hidden" name="point_id" value="{$ru.self_point.point_id}"> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
@ -336,103 +336,103 @@ |
|
|
|
<p class="receipt-name">{$order.inv_content}</p> |
|
|
|
</div> |
|
|
|
<span class="t-jiantou"><i class="iconfont icon-jiantou tf-180"></i></span> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-receipt-div"> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-site j-flow-site swiper-scroll swiper-container-vertical swiper-container-free-mode"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide swiper-slide-active"> |
|
|
|
<div class="flow-receipt"> |
|
|
|
<section class="flow-receipt-title m-top10 invhead"> |
|
|
|
<header class="b-color-f padding-all"> |
|
|
|
发票抬头 |
|
|
|
</header> |
|
|
|
<div class="b-color-f flow-receipt-title-con text-all-select"> |
|
|
|
<div class="text-all dis-box j-text-all"> |
|
|
|
<div class="box-flex input-text"> |
|
|
|
<input class="j-input-text" type="text" placeholder="可填写个人或单位名称" /> |
|
|
|
<i class="iconfont icon-guanbi is-null j-is-null"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="flow-receipt-cont m-top10"> |
|
|
|
<header class="b-color-f padding-all"> |
|
|
|
发票内容 |
|
|
|
</header> |
|
|
|
<div class="m-top1px flow-receipt-cont-con b-color-f select-two"> |
|
|
|
<ul class="j-get-one"> |
|
|
|
{foreach $inv_content_list as $key => $content} |
|
|
|
<li class="ect-select invliall "> |
|
|
|
<label class="{if $key == 0 }invli{else}invliothers{/if} ts-1 {if $order.inv_content == $content}active{/if}" data-content="{$content}">{$content}<i class="fr iconfont icon-gou ts-1"></i></label> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<div class="ect-button-more dis-box padding-all"> |
|
|
|
<button class="btn-submit box-flex r-btn-submit">确定</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-receipt-div"> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-site j-flow-site swiper-scroll swiper-container-vertical swiper-container-free-mode"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
<div class="swiper-slide swiper-slide-active"> |
|
|
|
<div class="flow-receipt"> |
|
|
|
<section class="flow-receipt-title m-top10 invhead"> |
|
|
|
<header class="b-color-f padding-all"> |
|
|
|
发票抬头 |
|
|
|
</header> |
|
|
|
<div class="b-color-f flow-receipt-title-con text-all-select"> |
|
|
|
<div class="text-all dis-box j-text-all"> |
|
|
|
<div class="box-flex input-text"> |
|
|
|
<input class="j-input-text" type="text" placeholder="可填写个人或单位名称" /> |
|
|
|
<i class="iconfont icon-guanbi is-null j-is-null"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<section class="flow-receipt-cont m-top10"> |
|
|
|
<header class="b-color-f padding-all"> |
|
|
|
发票内容 |
|
|
|
</header> |
|
|
|
<div class="m-top1px flow-receipt-cont-con b-color-f select-two"> |
|
|
|
<ul class="j-get-one"> |
|
|
|
{foreach $inv_content_list as $key => $content} |
|
|
|
<li class="ect-select invliall "> |
|
|
|
<label class="{if $key == 0 }invli{else}invliothers{/if} ts-1 {if $order.inv_content == $content}active{/if}" data-content="{$content}">{$content}<i class="fr iconfont icon-gou ts-1"></i></label> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<div class="ect-button-more dis-box padding-all"> |
|
|
|
<button class="btn-submit box-flex r-btn-submit">确定</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<input type="hidden" name="need_inv" value="0" id="ECS_NEEDINV"> |
|
|
|
<input type="hidden" name="inv_payee" value="{$order.inv_payee}" id="ECS_INVPAYEE"> |
|
|
|
<input type="hidden" name="inv_content" value="{$order.inv_content}" id="ECS_INVCONTENT"> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
{if $allow_use_bonus && $bonus_list} |
|
|
|
<li class="dis-box padding-all m-top1px b-color-f f-c-s-coupon j-f-c-s-coupon"> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
{if $allow_use_bonus && $bonus_list} |
|
|
|
<li class="dis-box padding-all m-top1px b-color-f f-c-s-coupon j-f-c-s-coupon"> |
|
|
|
<label class="t-remark g-t-temark">优惠券 ({$bonus_num}张)</label> |
|
|
|
<div class="box-flex t-goods1 text-right onelist-hidden"> |
|
|
|
{if $order_bonus} |
|
|
|
<span class="coupon-text">优惠金额</span> |
|
|
|
<em class="t-first coupon-price">{$order_bonus.type_money_format}</em> |
|
|
|
{else} |
|
|
|
<span class="coupon-text">不使用优惠券</span> |
|
|
|
<em class="t-first coupon-price"></em> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
<span class="t-jiantou"><i class="iconfont icon-jiantou tf-180"></i></span> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-coupon-div"> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-coupon"> |
|
|
|
<ul class="select-three flow-couon-list padding-all"> |
|
|
|
{foreach $bonus_list as $key=>$bonus} |
|
|
|
<li class="big-remark-all"> |
|
|
|
<div class="dis-box"> |
|
|
|
<div class="remark-all temark-{if $bonus.type_money>=0}{if $bonus.type_money>=50}{if $bonus.type_money>=100}1{else}2{/if}{else}3{/if}{else}3{/if} tb-lr-center"> |
|
|
|
<span class="b-r-a-price"><sup>¥</sup>{$bonus.type_money}</span> |
|
|
|
</div> |
|
|
|
<div class="box-flex b-color-f padding-all"> |
|
|
|
{if $bonus.shop_name} |
|
|
|
<h4>{$bonus.shop_name}</h4> |
|
|
|
{/if} |
|
|
|
<p>{$bonus.type_name}</p> |
|
|
|
<p class="t-remark">{$bonus.use_start_date} ~ {$bonus.use_end_date}</p> |
|
|
|
<div class="ect-select"> |
|
|
|
<label data-bonus="{$bonus.bonus_id}" data-money="{$bonus.type_money}" {if $order.bonus_id == $bonus.bonus_id}class="active"{/if}> |
|
|
|
<i class="j-select-btn"></i> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
<div class="box-flex t-goods1 text-right onelist-hidden"> |
|
|
|
{if $order_bonus} |
|
|
|
<span class="coupon-text">优惠金额</span> |
|
|
|
<em class="t-first coupon-price">{$order_bonus.type_money_format}</em> |
|
|
|
{else} |
|
|
|
<span class="coupon-text">不使用优惠券</span> |
|
|
|
<em class="t-first coupon-price"></em> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
<span class="t-jiantou"><i class="iconfont icon-jiantou tf-180"></i></span> |
|
|
|
<div id="j-filter-div" class="j-filter-div filter-div ts-5 filter-coupon-div"> |
|
|
|
<div class=" con-filter-div"> |
|
|
|
<div class="flow-coupon"> |
|
|
|
<ul class="select-three flow-couon-list padding-all"> |
|
|
|
{foreach $bonus_list as $key=>$bonus} |
|
|
|
<li class="big-remark-all"> |
|
|
|
<div class="dis-box"> |
|
|
|
<div class="remark-all temark-{if $bonus.type_money>=0}{if $bonus.type_money>=50}{if $bonus.type_money>=100}1{else}2{/if}{else}3{/if}{else}3{/if} tb-lr-center"> |
|
|
|
<span class="b-r-a-price"><sup>¥</sup>{$bonus.type_money}</span> |
|
|
|
</div> |
|
|
|
<div class="box-flex b-color-f padding-all"> |
|
|
|
{if $bonus.shop_name} |
|
|
|
<h4>{$bonus.shop_name}</h4> |
|
|
|
{/if} |
|
|
|
<p>{$bonus.type_name}</p> |
|
|
|
<p class="t-remark">{$bonus.use_start_date} ~ {$bonus.use_end_date}</p> |
|
|
|
<div class="ect-select"> |
|
|
|
<label data-bonus="{$bonus.bonus_id}" data-money="{$bonus.type_money}" {if $order.bonus_id == $bonus.bonus_id}class="active"{/if}> |
|
|
|
<i class="j-select-btn"></i> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
<div class="ect-button-more dis-box padding-all"> |
|
|
|
<button class="btn-submit box-flex c-btn-submit">确定</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<input type="hidden" name="bonus" value="{$order.bonus_id}" id="ECS_BONUS" /> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
{/foreach} |
|
|
|
</ul> |
|
|
|
<div class="ect-button-more dis-box padding-all"> |
|
|
|
<button class="btn-submit box-flex c-btn-submit">确定</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<input type="hidden" name="bonus" value="{$order.bonus_id}" id="ECS_BONUS" /> |
|
|
|
</li> |
|
|
|
{/if} |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
{if $allow_use_integral} |
|
|
|
<section class="radio-switching padding-all m-top10 b-color-f {if $order.integral}active{/if}" onclick="changeIntegral({$order_max_integral})"> |
|
|
|
<label class="fl">本单可使用积分抵扣 <span class="t-first">{if $integral_money > $total.goods_price}{$total.goods_price_formated}{else}{$integral_money}{/if}</span></label> |
|
|
|
@ -452,231 +452,153 @@ |
|
|
|
|
|
|
|
<span class="box-flex t-remark">实付款 {if $total.exchange_integral}<em class="t-first">{$total.exchange_integral}积分 + </em>{/if}<em class="t-first" id="amount">{$total.amount_formated}</em></span> |
|
|
|
|
|
|
|
<a href="javascript:;" type="button" class="btn-submit" onclick="wxpay(this)">{if $total.exchange_integral}确认兑换{else}提交订单{/if}</a> |
|
|
|
<a href="javascript:;" type="button" class="btn-submit" onclick="$('#theForm').submit();">{if $total.exchange_integral}确认兑换{else}提交订单{/if}</a> |
|
|
|
<!-- <a href="javascript:;" id="testPaymentBtn" type="button" class="btn-submit" onclick="processPayment()">测试支付</a> sc_test --> |
|
|
|
<!-- 引入jQuery库 --> |
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
|
|
|
<!-- 引入jQuery库 --> |
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
|
|
|
|
|
|
|
<!-- 引入SweetAlert2库 --> |
|
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> |
|
|
|
<!-- 引入SweetAlert2库 --> |
|
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> |
|
|
|
|
|
|
|
<!-- JavaScript代码 --> |
|
|
|
<script> |
|
|
|
function wxpay(a) { |
|
|
|
var paymentSelected = false; |
|
|
|
// 检查是否选择了支付配送方式 |
|
|
|
for (i = 0; i < frm.elements.length; i ++ ) |
|
|
|
{ |
|
|
|
if (frm.elements[i].name == 'payment' && frm.elements[i].value > 0) |
|
|
|
{ |
|
|
|
paymentSelected = true; |
|
|
|
} |
|
|
|
} |
|
|
|
<!-- JavaScript代码 --> |
|
|
|
<script> |
|
|
|
function processPayment() { |
|
|
|
// 在这里执行任何必要的操作 |
|
|
|
var param1 = 'some value'; // 将参数存储在变量中 |
|
|
|
var param2 = 'another value'; |
|
|
|
var url = "https://open.dalianpay.cn/payapi/unitorder/pay"; |
|
|
|
|
|
|
|
if ( ! paymentSelected) |
|
|
|
{ |
|
|
|
d_messages("请选择支付方式"); |
|
|
|
return false; |
|
|
|
// 显示loading提示框 |
|
|
|
Swal.fire({ |
|
|
|
title: '处理中,请稍后...', |
|
|
|
allowOutsideClick: false, |
|
|
|
onBeforeOpen: () => { |
|
|
|
Swal.showLoading(); |
|
|
|
} |
|
|
|
var ECS_SURPLUS = ''; |
|
|
|
var ECS_INTEGRAL = ''; |
|
|
|
// 检查用户输入的余额 |
|
|
|
if (document.getElementById("ECS_SURPLUS")) |
|
|
|
{ |
|
|
|
var surplus = document.getElementById("ECS_SURPLUS").value; |
|
|
|
}); |
|
|
|
|
|
|
|
var info = $.ajax({ |
|
|
|
url : 'index.php?r=flow/index/check_surplus', |
|
|
|
async : false, |
|
|
|
data: {surplus:surplus}, |
|
|
|
success: function(data){ |
|
|
|
ECS_SURPLUS = data; |
|
|
|
}, |
|
|
|
dataType: 'text' |
|
|
|
}); |
|
|
|
// 发送POST请求到source/apps/flow/demo/pay.php文件 |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
url: 'source/apps/flow/demo/pay.php', |
|
|
|
data: {param1: param1, param2: param2, url:url}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(data) { |
|
|
|
// var data = JSON.parse(response); |
|
|
|
|
|
|
|
if (ECS_SURPLUS) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
document.getElementById("ECS_SURPLUS_NOTICE").innerHTML = ECS_SURPLUS; |
|
|
|
} |
|
|
|
catch (ex) |
|
|
|
{ |
|
|
|
} |
|
|
|
return false; |
|
|
|
// 在这里处理服务器返回的数据 |
|
|
|
if (data.retcode === 'SUCCESS') { |
|
|
|
Swal.fire(data.retmsg, '', data.retcode); |
|
|
|
// 跳转到payinfo的页面 |
|
|
|
var payinfoUrl = data.payinfo; |
|
|
|
// 在前端跳转到payinfo URL |
|
|
|
window.location.href = payinfoUrl; |
|
|
|
} else { |
|
|
|
Swal.fire(data.retmsg, '', data.retcode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 检查用户输入的积分 |
|
|
|
if (document.getElementById("ECS_INTEGRAL")) |
|
|
|
{ |
|
|
|
var integral = document.getElementById("ECS_INTEGRAL").value; |
|
|
|
// 隐藏loading提示框 |
|
|
|
Swal.close(); |
|
|
|
}, |
|
|
|
error: function(jqXHR, textStatus, errorThrown) { |
|
|
|
console.error('Error:', errorThrown); |
|
|
|
|
|
|
|
var info = $.ajax({ |
|
|
|
url : 'index.php?r=flow/index/check_integral', |
|
|
|
async : false, |
|
|
|
data: {integral:integral}, |
|
|
|
success: function(data){ |
|
|
|
ECS_INTEGRAL = data; |
|
|
|
}, |
|
|
|
dataType: 'text' |
|
|
|
}); |
|
|
|
// 显示异常提示框 |
|
|
|
Swal.fire('系统错误,请稍后再试!', errorThrown, 'error'); |
|
|
|
|
|
|
|
if (ECS_INTEGRAL) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
try |
|
|
|
{ |
|
|
|
d_messages(ECS_INTEGRAL); |
|
|
|
} |
|
|
|
catch (ex) |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
// 隐藏loading提示框 |
|
|
|
// Swal.close(); |
|
|
|
} |
|
|
|
//避免重复提交 |
|
|
|
$("a.btn-submit").attr("disabled",true); |
|
|
|
setTimeout(function (){$("a.btn-submit").attr("disabled",false);},5000); |
|
|
|
$('#theForm').submit(); |
|
|
|
} |
|
|
|
function processPayment() { |
|
|
|
// 在这里执行任何必要的操作 |
|
|
|
var param1 = 'some value'; // 将参数存储在变量中 |
|
|
|
var param2 = 'another value'; |
|
|
|
var url = "https://open.dalianpay.cn/payapi/unitorder/pay"; |
|
|
|
|
|
|
|
// 显示loading提示框 |
|
|
|
Swal.fire({ |
|
|
|
title: '处理中,请稍后...', |
|
|
|
allowOutsideClick: false, |
|
|
|
onBeforeOpen: () => { |
|
|
|
Swal.showLoading(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 发送POST请求到source/apps/flow/demo/pay.php文件 |
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
url: 'source/apps/flow/demo/pay.php', |
|
|
|
data: {param1: param1, param2: param2, url:url}, |
|
|
|
dataType: 'json', |
|
|
|
success: function(data) { |
|
|
|
// var data = JSON.parse(response); |
|
|
|
|
|
|
|
// 在这里处理服务器返回的数据 |
|
|
|
if (data.retcode === 'SUCCESS') { |
|
|
|
Swal.fire(data.retmsg, '', data.retcode); |
|
|
|
// 跳转到payinfo的页面 |
|
|
|
var payinfoUrl = data.payinfo; |
|
|
|
// 在前端跳转到payinfo URL |
|
|
|
window.location.href = payinfoUrl; |
|
|
|
} else { |
|
|
|
Swal.fire(data.retmsg, '', data.retcode); |
|
|
|
} |
|
|
|
|
|
|
|
// 隐藏loading提示框 |
|
|
|
Swal.close(); |
|
|
|
}, |
|
|
|
error: function(jqXHR, textStatus, errorThrown) { |
|
|
|
console.error('Error:', errorThrown); |
|
|
|
|
|
|
|
// 显示异常提示框 |
|
|
|
Swal.fire('系统错误,请稍后再试!', errorThrown, 'error'); |
|
|
|
|
|
|
|
// 隐藏loading提示框 |
|
|
|
// Swal.close(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
</section> |
|
|
|
</form> |
|
|
|
<!--悬浮btn end--> |
|
|
|
<!--引用js--> |
|
|
|
{include file="script"} |
|
|
|
<script type="text/javascript" src="{__PUBLIC__}script/main/shopping_flow.js"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
var flow_no_payment = "{$lang.flow_no_payment}"; |
|
|
|
var flow_no_shipping = "{$lang.flow_no_shipping}"; |
|
|
|
$(function(){ |
|
|
|
//配送方式切换 |
|
|
|
$(".select-shipping li label").click(function(){ |
|
|
|
var type = $(this).attr("data-type"); |
|
|
|
var ru_id = $(this).attr("data-ruid"); |
|
|
|
var shipping = $(this).attr("data-shipping"); |
|
|
|
if(type == 1){ |
|
|
|
if($(".j-goods-site-li").hasClass("show-temark-div")){ |
|
|
|
$(".j-goods-site-li").removeClass("show-temark-div"); |
|
|
|
} |
|
|
|
var mySwiper = new Swiper('.swiper-scroll', { |
|
|
|
scrollbar: false, |
|
|
|
direction: 'vertical', |
|
|
|
slidesPerView: 'auto', |
|
|
|
mousewheelControl: true, |
|
|
|
freeMode: true |
|
|
|
}); |
|
|
|
</form> |
|
|
|
<!--悬浮btn end--> |
|
|
|
<!--引用js--> |
|
|
|
{include file="script"} |
|
|
|
<script type="text/javascript" src="{__PUBLIC__}script/main/shopping_flow.js"></script> |
|
|
|
<script type="text/javascript"> |
|
|
|
var flow_no_payment = "{$lang.flow_no_payment}"; |
|
|
|
var flow_no_shipping = "{$lang.flow_no_shipping}"; |
|
|
|
$(function(){ |
|
|
|
//配送方式切换 |
|
|
|
$(".select-shipping li label").click(function(){ |
|
|
|
var type = $(this).attr("data-type"); |
|
|
|
var ru_id = $(this).attr("data-ruid"); |
|
|
|
var shipping = $(this).attr("data-shipping"); |
|
|
|
if(type == 1){ |
|
|
|
if($(".j-goods-site-li").hasClass("show-temark-div")){ |
|
|
|
$(".j-goods-site-li").removeClass("show-temark-div"); |
|
|
|
} |
|
|
|
else{ |
|
|
|
if(!$(".j-goods-site-li").hasClass("show-temark-div")){ |
|
|
|
$(".j-goods-site-li").addClass("show-temark-div"); |
|
|
|
} |
|
|
|
var mySwiper = new Swiper('.swiper-scroll', { |
|
|
|
scrollbar: false, |
|
|
|
direction: 'vertical', |
|
|
|
slidesPerView: 'auto', |
|
|
|
mousewheelControl: true, |
|
|
|
freeMode: true |
|
|
|
}); |
|
|
|
} |
|
|
|
else{ |
|
|
|
if(!$(".j-goods-site-li").hasClass("show-temark-div")){ |
|
|
|
$(".j-goods-site-li").addClass("show-temark-div"); |
|
|
|
} |
|
|
|
$(this).parents(".select-shipping").siblings("input[type=hidden]").val(shipping); |
|
|
|
$.post("{U('shipping_fee')}", {ru_id: ru_id, type: type}, function(result){ |
|
|
|
if(result.message){ |
|
|
|
d_messages(result.message); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(result.content){ |
|
|
|
$("#ECS_ORDERTOTAL").html(result.content); |
|
|
|
} |
|
|
|
if(result.amount){ |
|
|
|
$("#amount").html(result.amount); |
|
|
|
} |
|
|
|
$("input[name=shipping_type]").val(type); |
|
|
|
}, 'json'); |
|
|
|
}); |
|
|
|
//自提点 |
|
|
|
$(".j-goods-site-li li label").click(function(){ |
|
|
|
var point = parseInt($(this).attr("data-point")); |
|
|
|
if(point > 0){ |
|
|
|
$.post("{U('select_picksite')}", {picksite_id: point}, function(result){ |
|
|
|
if(result.error > 0){ |
|
|
|
if(result.err_msg){ |
|
|
|
d_messages(result.err_msg); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
$("input[name=point_id]").val(point); |
|
|
|
}, 'json'); |
|
|
|
} |
|
|
|
$(this).parents(".select-shipping").siblings("input[type=hidden]").val(shipping); |
|
|
|
$.post("{U('shipping_fee')}", {ru_id: ru_id, type: type}, function(result){ |
|
|
|
if(result.message){ |
|
|
|
d_messages(result.message); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
//优惠券 |
|
|
|
$(".flow-couon-list .j-select-btn").click(function(){ |
|
|
|
var label = $(this).parent(); |
|
|
|
if(label.hasClass("active")){ |
|
|
|
label.removeClass("active"); |
|
|
|
if(result.content){ |
|
|
|
$("#ECS_ORDERTOTAL").html(result.content); |
|
|
|
} |
|
|
|
else{ |
|
|
|
$(".flow-couon-list li label").removeClass("active"); |
|
|
|
label.addClass("active"); |
|
|
|
if(result.amount){ |
|
|
|
$("#amount").html(result.amount); |
|
|
|
} |
|
|
|
}); |
|
|
|
//积分 |
|
|
|
$(".radio-switching").click(function(){ |
|
|
|
$("input[name=shipping_type]").val(type); |
|
|
|
}, 'json'); |
|
|
|
}); |
|
|
|
//自提点 |
|
|
|
$(".j-goods-site-li li label").click(function(){ |
|
|
|
var point = parseInt($(this).attr("data-point")); |
|
|
|
if(point > 0){ |
|
|
|
$.post("{U('select_picksite')}", {picksite_id: point}, function(result){ |
|
|
|
if(result.error > 0){ |
|
|
|
if(result.err_msg){ |
|
|
|
d_messages(result.err_msg); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
$("input[name=point_id]").val(point); |
|
|
|
}, 'json'); |
|
|
|
} |
|
|
|
}); |
|
|
|
//优惠券 |
|
|
|
$(".flow-couon-list .j-select-btn").click(function(){ |
|
|
|
var label = $(this).parent(); |
|
|
|
if(label.hasClass("active")){ |
|
|
|
label.removeClass("active"); |
|
|
|
} |
|
|
|
else{ |
|
|
|
$(".flow-couon-list li label").removeClass("active"); |
|
|
|
label.addClass("active"); |
|
|
|
} |
|
|
|
}); |
|
|
|
//积分 |
|
|
|
$(".radio-switching").click(function(){ |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$(".invhead").css('display','none'); |
|
|
|
$(".invhead").css('display','none'); |
|
|
|
|
|
|
|
$(".invliothers").click(function(){ |
|
|
|
$(".invhead").css('display','block'); |
|
|
|
}); |
|
|
|
$(".invli").click(function(){ |
|
|
|
$(".invhead").css('display','none'); |
|
|
|
}); |
|
|
|
}) |
|
|
|
</script> |
|
|
|
$(".invliothers").click(function(){ |
|
|
|
$(".invhead").css('display','block'); |
|
|
|
}); |
|
|
|
$(".invli").click(function(){ |
|
|
|
$(".invhead").css('display','none'); |
|
|
|
}); |
|
|
|
}) |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
|