qc.ifish7.com/Application/Shop/View/ShopCart/confirmation_order.html

340 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>{$pagetitle}-{$Think.config.setting.sitename}</title>
<link href="__PUBLIC__/skin/css/animate.min.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/font-awesome.min.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/nav.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/nav2.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/slick-min.css" type="text/css" rel="stylesheet"/>
<link href="__PUBLIC__/skin/css/global.css" rel="stylesheet">
</head>
<body>
<include file="./Application/Data/templateFile/header.html"/>
<div class="indexProduct UserCenter_nav">
<div class="indexProduct_content clear all">
<a href="#">首页</a>
<span class="fa fa-angle-right"></span>
<a href="#" class="on">购物车</a>
</div>
</div>
<div id="app">
<div class="indexProduct UserCenter shopping Order">
<div class="indexProduct_content clear all">
<div class="shopping_title clear">
<div class="shopping_title_list fl on">
<dd>1</dd>
<dt>我的购物车</dt>
</div>
<div class="shopping_title_list fl on">
<dd>2</dd>
<dt>确认订单信息</dt>
</div>
<div class="shopping_title_list fl">
<dd>3</dd>
<dt>支付订单</dt>
</div>
</div>
<form action="{:U('confirmation_order')}" method="post" onsubmit="return save_form(this,isOk)">
<input type="hidden" name="order_invoice_id" v-model="order_invoice_id"/>
<div class="Order_top">
<div class="Order_top_list clear">
<dd class="fl">收件地址</dd>
<dt class="fl">
<input type="hidden" name="order_sh_address_id" value="{$sh_address.id}">
<if condition="$sh_address">
<span id="sh_address_str">{$sh_address.province}{$sh_address.city}{$sh_address.district}{$sh_address.detail}-{$sh_address.username}{$sh_address.mobile}</span>
<else/>
<span id="sh_address_str">请设置收货地址</span>
</if>
<a href="javascript:addressList('sh')">设置</a>
</dt>
</div>
<div class="Order_top_list clear">
<dd class="fl">发票信息</dd>
<dt class="fl">
<if condition="$invoice">
<span id="invoice_str">{$invoice[type]?'增值税专用发票':'增值税普通发票'} 发票抬头:{$invoice.company_name}</span>
<else/>
<span id="invoice_str">请设置发票信息</span>
</if>
<a @click="openFpList" class="InvoiceSetting">设置</a>
</dt>
</div>
<div class="Order_top_list clear" :style="order_invoice_id>0?'display:block':'display:none'">
<dd class="fl">收票地址</dd>
<dt class="fl">
<input type="hidden" name="order_sp_address_id" value="{$sp_address.id}">
<if condition="$sp_address">
<span id="sp_address_str">{$sp_address.province}{$sp_address.city}{$sp_address.district}{$sp_address.detail}-{$sp_address.username}{$sp_address.mobile}</span>
<else/>
<span id="sp_address_str">请设置收票地址</span>
</if>
<a href="javascript:addressList('sp')">设置</a>
</dt>
</div>
</div>
<div class="mygwc cartBox">
<div class="mygwc_title clear">
<div class="mygwc_title_xun fl">商品清单</div>
<div class="mygwc_title_xun fl">商品信息</div>
<div class="mygwc_title_xun fl">单价</div>
<div class="mygwc_title_xun fl">数量</div>
<div class="mygwc_title_xun fl">金额</div>
</div>
<div class="mygwc_wen">
<foreach name="data" item="v">
<?php
$total1=($v[cms_product]['price2']?$v[cms_product]['price2']:$v[cms_product]['price'])*$v[quantity];
$total=$total+$total1;
?>
<div class="mygwc_wen_xun clear order_lists">
<div class="wen_xun_img fl clear">
<div class="xun_img_left fl"><img src="{$v.cms_product.thumb}"></div>
<div class="xun_img_right fl">
<dd>{$v.cms_product.title}</dd>
<dt>
<p>商品型号:{$v.cms_product.type_no}</p>
<p>订货号:{$v.cms_product.type_no}</p>
</dt>
</div>
</div>
<div class="wen_xun_dj fl list_price">
<dd class="price">¥{$v[cms_product]['price2']?$v[cms_product]['price2']:$v[cms_product]['price']} / 个</dd>
<if condition="$v[cms_product]['price2']"><dt><s>¥{$v.cms_product.price} / 个</s></dt></if>
</div>
<div class="wen_xun_sl fl amount_box">{$v[quantity]}</div>
<div class="wen_xun_xj fl list_sum"><span class="sum_price">¥{$total1}</span></div>
</div>
</foreach>
</div>
<div class="Order_bottom clear">
<div class="Order_bottom_left fl">
<dd class="fl">备注:</dd>
<dt class="fl">
<textarea name="remark" placeholder="若您对订单有特殊要求,请在此留言告知我们,我们的客服会在第一时间跟您沟通,尽量满足您的需求!"></textarea>
</dt>
</div>
<div class="Order_bottom_right fr">
<div class="bottom_right_list">
<span>商品总金额:</span>
<i>{:number_format($total,2)}元</i>
</div>
</div>
</div>
<div class="Order_Amounts clear">
<div class="Order_Amounts_content fr clear">
<dd class="fl">应付金额:</dd>
<dt class="fl">{:number_format($total,2)} 元</dt>
</div>
</div>
<div class="Order_submit clear">
<div class="fr">
<div class="Order_submit_content clear">
<a href="{:U('index')}">返回继续购物</a>
<input type="submit" value="提交订单" />
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="fwtk_tan" id="fwtk">
<div class="fwtk_tan_bg"></div>
<div class="sfwtk_tan_wen">
<div class="tan_wen_title">销售合同条款<i class="fa fa-close"></i></div>
<div class="tan_wen_nei"><img src="skin/images/bg116.jpg" /></div>
</div>
</div>
<div class="bg"></div>
<div class="Address SelectInvoice">
<div class="SelectAddress_title clear">
<dd class="fl">选择发票</dd>
<a @click="closeFplist" class="fr SelectInvoice_close"><img src="/Public/skin/images/close.png" /></a>
</div>
<div class="SelectAddress_content">
<div class="SelectAddress_content_title" style="display: none;">您还没有设置收货地址</div>
<div class="SelectAddress_content_txt">
<div class="radio_SelectAddress clear">
<!--<label class="fl">
<template v-if="0==order_invoice_id"><input name="fp_id" type="radio" value="0" checked/></template>
<template v-else><input name="fp_id" type="radio" value="0"/></template>
<div class="button">不需要发票</div>
</label>-->
<div class="radio_SelectAddress_operating fl"></div>
</div>
<template v-for="(item,index) in fpList">
<div class="radio_SelectAddress clear">
<label class="fl">
<template v-if="item.id==order_invoice_id"><input name="fp_id" type="radio" :value="item.id" checked/></template>
<template v-else><input name="fp_id" type="radio" :value="item.id"/></template>
<div class="button">{{item.type==1?'增值税专用发票':'增值税普通发票'}} 发票抬头:{{item.company_name}}</div>
</label>
<div class="radio_SelectAddress_operating fl">
<a @click="openEditorInvoice(item)" class="fl Invoice_edit">编辑</a>
</div>
</div>
</template>
</div>
<a @click="openEditorInvoice({type:0})" class="new new_Invoice" >新增发票</a>
</div>
<div class="SelectAddress_bottom clear">
<a @click="checkFp" class="save">保存</a>
<a @click="closeFplist">取消</a>
</div>
</div>
<div class="Address Invoice NewInvoice">
<div class="SelectAddress_title clear">
<dd class="fl">新增发票</dd>
<a @click="closeEditorInvoice" class="fr"><img src="/Public/skin/images/close.png" /></a>
</div>
<form action="{:U('Member/index/invoice')}" method="post" onsubmit="return save_form(this,function(){app.closeEditorInvoice();app.openFpList();})">
<input type="hidden" name="type" v-model="fpContent.type">
<input type="hidden" name="id" v-model="fpContent.id">
<div class="SelectInvoice_content">
<div class="SelectInvoice_content_title">
<a href="javascript:;" :class="fpContent.type==1?'on':''" onclick="app.fpContent.type=1">增值税专用发票</a>
<a href="javascript:;" :class="fpContent.type!=1?'on':''" onclick="app.fpContent.type=0">增值税普通发票</a>
</div>
<div class="NewAddress_content SelectInvoice_content_txt">
<div class="NewAddress_content_list">
<div class="NewAddress_content_list clear">
<dd class="fl">发票抬头</dd>
<dt class="fl"><input type="text" name="company_name" v-model="fpContent.company_name" placeholder="输入公司名称" /></dt>
</div>
<div class="NewAddress_content_list clear">
<dd class="fl">纳税人识别号</dd>
<dt class="fl"><input type="text" name="taxpayer_number" v-model="fpContent.taxpayer_number" placeholder="输入纳税人识别号" /></dt>
</div>
<div :style="fpContent.type==1?'display:block':'display:none'"><!--根据发票类型判断是否要显示专票的相关字段-->
<div class="NewAddress_content_list clear">
<dd class="fl">注册地址</dd>
<dt class="fl"><input type="text" name="registration_address" v-model="fpContent.registration_address" placeholder="输入单位注册地址" /></dt>
</div>
<div class="NewAddress_content_list clear">
<dd class="fl">注册电话</dd>
<dt class="fl"><input type="text" name="registration_mobile" v-model="fpContent.registration_mobile" placeholder="输入单位注册电话" /></dt>
</div>
<div class="NewAddress_content_list clear">
<dd class="fl">开户银行</dd>
<dt class="fl"><input type="text" name="opening_bank" v-model="fpContent.opening_bank" placeholder="输入开户银行" /></dt>
</div>
<div class="NewAddress_content_list clear">
<dd class="fl">银行账户</dd>
<dt class="fl"><input type="text" name="bank_account" v-model="fpContent.bank_account" placeholder="输入银行账户" /></dt>
</div>
</div>
<div class="NewAddress_bottom">
<label class="NewAddress_bottom_checkbox">
<template v-if="fpContent.status==1"><input name="status" type="checkbox" value="1" checked="true"/></template>
<template v-else><input name="status" value="1" type="checkbox"/></template>
<div class="button">设为默认发票</div>
</label>
</div>
</div>
</div>
<div class="NewAddress_submit">
<input type="submit" value="保存" />
<a @click="closeEditorInvoice">取消</a>
</div>
</div>
</form>
</div>
</div>
<include file="./Application/Data/templateFile/footer.html"/>
<script type="text/javascript" src="/Public/skin/js/jquery-1.8.3.min.js"></script>
<script src="/Public/skin/js/global.js"></script>
<script src="/Public/skin/js/nav.js"></script>
<script src="/Public/Admin/layer/layer.js"></script>
<script src="/Public/Admin/js/globals.js"></script>
<script src="/Public/skin/js/plugin.js"></script>
<script src="/Public/Home/js/shop.js"></script>
<script src="/Public/skin/js/distpicker.data.js"></script>
<script src="/Public/skin/js/distpicker.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script type="text/javascript">
//提交表单成功回调函数
function isOk(result){
window.location.href=result;
}
//
var app = new Vue({
el: '#app',
data: {
fpList:[],//发票列表
fpContent:[],//发票详情
order_invoice_id:"{$invoice.id}",//表单里的发票ID
},
methods:{
//发票列表
openFpList:function(){
$.get("/index.php?m=Shop&c=ShopCart&a=fpList",function(result){
if(result.status==1){
app.fpList=result.info;
$(".SelectInvoice").fadeIn();
$(".bg").show();
}
},"json");
},
//关闭发票列表
closeFplist:function(){
$(".SelectInvoice").fadeOut();
$(".bg").hide();
},
//修改发票
openEditorInvoice:function(data){
app.fpContent=data;
$(".NewInvoice").fadeIn();
$(".NewAddress_bg").show();
},
//关闭修改发票
closeEditorInvoice:function(){
$(".NewInvoice").fadeOut();
$(".NewAddress_bg").hide();
},
//最终选择的发票
checkFp:function(){
var fpid=$("input[name='fp_id']:checked").val();
if(fpid){
app.order_invoice_id=fpid;
var fpname=$("input[name='fp_id']:checked").next().html();
$("#invoice_str").html(fpname);
//如果不需要发票,删除收票地址
if(fpid==0){
$("input[name='order_sp_address_id']").val("");
$("#sp_address_str").html("未选择收票地址");
}
}else{
layer.alert("未选择发票");
}
app.closeFplist();
}
}
});
</script>
</body>
</html>