You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

197 lines
9.8 KiB

<?php echo $this->smarty_insert_scripts(array('files'=>'transport_jquery.js,utils.js')); ?>
<div id="ECS_ORDERTOTAL">
<div class="order-summary">
<div class="statistic">
<div class="list">
<span><?php echo $this->_var['lang']['goods_all_price']; ?>:</span>
<em class="price" id="warePriceId"><?php echo $this->_var['total']['goods_price_formated']; ?></em>
</div>
<?php if ($this->_var['total']['discount'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['discount']; ?>:</span>
<em class="price" id="cachBackId"> -<?php echo $this->_var['total']['discount_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['tax'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['tax']; ?>:</span>
<em class="price" id="cachBackId"> +<?php echo $this->_var['total']['tax_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['shipping_fee'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['shipping_fee']; ?>:</span>
<em class="price" id="freightPriceId">
<?php echo $this->_var['total']['shipping_fee_formated']; ?>
</em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['shipping_insure'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['insure_fee']; ?>:</span>
<em class="price" id="cachBackId"> +<?php echo $this->_var['total']['shipping_insure_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['pay_fee'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['pay_fee']; ?>:</span>
<em class="price" id="cachBackId"> +<?php echo $this->_var['total']['pay_fee_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['pack_fee'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['pack_fee']; ?>:</span>
<em class="price" id="cachBackId"> +<?php echo $this->_var['total']['pack_fee_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['card_fee'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['card_fee']; ?>:</span>
<em class="price" id="cachBackId"> +<?php echo $this->_var['total']['card_fee_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['surplus'] > 0 || $this->_var['total']['integral'] > 0 || $this->_var['total']['bonus'] > 0): ?>
<?php if ($this->_var['total']['surplus'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['use_surplus']; ?>:</span>
<em class="price" id="cachBackId"> -<?php echo $this->_var['total']['surplus_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['integral'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['use_integral']; ?>:</span>
<em class="price" id="cachBackId"> -<?php echo $this->_var['total']['integral_formated']; ?></em>
</div>
<?php endif; ?>
<?php if ($this->_var['total']['bonus'] > 0): ?>
<div class="list">
<span><?php echo $this->_var['lang']['use_bonus']; ?>:</span>
<em class="price" id="cachBackId"> -<?php echo $this->_var['total']['bonus_formated']; ?></em>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="trade-foot">
<div class="checkout-buttons">
<div class="sticky-wrap">
<div class="inner">
<input name="rec_number_str" value="" type="hidden">
<div class="btn-area">
<input type="submit" class="submit-btn" value="提交订单"/>
</div>
<!-- 表单元素 -->
<input type="submit" class="submit-btn" value="大连支付" onclick="showConfirmation()">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.1.5/dist/sweetalert2.all.min.js"></script>
<script>
function showConfirmation() {
Swal.fire({
title: '支付确认',
text: '您确认已经支付成功了吗?',
icon: 'question',
showCancelButton: true,
confirmButtonText: '确认',
cancelButtonText: '取消',
customClass: {
confirmButton: 'btn btn-success',
cancelButton: 'btn btn-danger'
}
}).then((result) => {
if (result.isConfirmed) {
// 用户点击了确认按钮
// 在这里执行任何必要的操作
var param1 = 'some value'; // 将参数存储在变量中
var param2 = 'another value';
fetch('process_payment.php', {
method: 'POST',
body: JSON.stringify({param1: param1, param2: param2})
})
.then(response => response.json())
.then(data => {
// 在这里处理服务器返回的数据
Swal.fire(data.message, '', data.status);
})
.catch(error => {
console.error('Error:', error);
});
} else {
// 用户点击了取消按钮
// 在这里执行任何必要的操作
Swal.fire('支付取消!', '', 'error');
}
});
}
</script>
<span class="total">
<?php if ($this->_var['total']['exchange_integral']): ?>
<span class="txt flow_exchange_goods"><?php echo $this->_var['lang']['notice_eg_integral']; ?></span>
<strong id="payPriceId" class="flow_exchange_goods"><?php echo $this->_var['total']['exchange_integral']; ?></strong>
<span class="txt" style="padding-left:15px; display:none">
使用支付类型:
<select name="pay_type" id="sel_pay_type">
<option value="0">RMB支付</option>
<option value="1" <?php if ($this->_var['is_exchange_goods'] == 1): ?>selected<?php endif; ?>>积分支付</option>
</select>
</span>
&nbsp;&nbsp;
<?php endif; ?>
<span class="txt flow_general_goods"><?php echo $this->_var['lang']['total_fee']; ?>:</span>
<strong id="payPriceId" class="flow_general_goods"><?php echo $this->_var['total']['amount_formated']; ?></strong>
</span>
<div class="amount-sum">已选择<em><?php echo $this->_var['cart_goods_number']; ?></em>件商品</div>
<?php if ($this->_var['is_group_buy']): ?><div class="amount-sum"><strong><?php echo $this->_var['lang']['notice_gb_order_amount']; ?></strong></div><?php endif; ?>
</div>
</div>
</div>
<div class="consignee-foot">
<p>寄送至:<?php echo $this->_var['consignee']['consignee_address']; ?></p>
<p>收货人:<?php echo $this->_var['consignee']['consignee']; ?> <?php echo $this->_var['consignee']['mobile']; ?></p>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
$("input[name='rec_number']").each(function(index, element) {
if($(element).val() == 1){
$(".inner .btn-area").addClass('no_goods');
$(".inner .btn-area").attr('data-url', 'ajax_dialog.php?act=goods_stock_exhausted&warehouse_id=' + <?php echo $this->_var['warehouse_id']; ?> + '&area_id=' + <?php echo $this->_var['area_id']; ?>);
$(".inner .btn-area").html('<input type="button" class="submit-btn" value="提交订单"/>');
return false;
}
});
var rec_number = new Array();
$("input[name='rec_number']").each(function(index, element) {
if($(element).val() == 1){
rec_number.push($(element).attr('id'));
}
});
$("input[name='rec_number_str']").val(rec_number);
<?php if ($this->_var['is_exchange_goods'] == 1 || $this->_var['total']['real_goods_count'] == 0): ?>
$('.flow_exchange_goods').show();
$('#sel_pay_type').change(function(){
var T = $(this);
var val = T.val();
if(val == 1){
$('.payment-list').parent().parent('.step-complete').hide();
$('.flow_general_goods').hide();
$('.flow_exchange_goods').show();
}else{
$('.payment-list').parent().parent('.step-complete').show();
$('.flow_general_goods').show();
$('.flow_exchange_goods').hide();
}
});
<?php endif; ?>
});
</script>