<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<title>{%$lngpack.sitename%}</title>
		<meta name="keywords" content="{%$lngpack.keyword%}" />
		<meta name="description" content="{%$lngpack.description%}" />
		<script type="text/javascript" src="{%$rootdir%}js/jquery.js"></script>
		<script type="text/javascript" src="{%$rootdir%}js/basicrun.js"></script>
		<script type="text/javascript" src="{%$rootdir%}js/jquery.Slide.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_dialog.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/citydb.js"></script>
		<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/cityselect.js"></script>
		<link href="{%$rootpath%}css/espcms_public.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_v5div.css" rel="stylesheet" type="text/css" />
		<link href="{%$rootpath%}css/espcms_page.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			$(window).load(function () {
				$("#clickmenubotton li span").hover(function () {
					$(this).addClass("menuhover");
					$(this).parent().find("ul.subnav").slideDown('fast').show();
					$(this).parent().hover(function () {
					}, function () {
						$(this).parent().find("ul.subnav").fadeOut('fast');
						$(this).parent().find("span").removeClass("menuhover");
					});
				});
				$("#order_list").espcms_formvalidation();
			});
		</script>
	</head>

	<body>
		{%link file="public/head.html"%}
		<div class="espcms_page_bannpic"><img src="{%$rootpath%}images/bann/type_pic.jpg"/></div>
		<div class="espcms_page">
			{%if $out=='order_list'%}
			<script type="text/javascript">
				$(window).load(function () {
					order_amount();
					order_del();
				});
			</script>
			<div class="pb10 pt20 tc"><img src="{%$rootpath%}images/a1.jpg"/></div>
			<div class="espcms_member_login_center espcms_formwidth_c">
				{% if count($array) > 0 %}
				<div class="title mb20"><div class="messageicon3"></div><div class="messtitle">我的购物车</div></div>
				<form name="order_list" method="post" id="order_list" action="{%$order_link.settlement%}">
					<input type="hidden" name="product_total" id="product_total" value="{%$product_total%}"/>
					<input type="hidden" name="order_del_url" id="order_del_url" value="{%$order_link.del%}"/>
					<table class="tablelist" width="99%" style="margin:0 auto;">
						<tr>
							<td class="td01">商品名</td>
							<td class="td01">图片</td>
							<td class="td01">商品编号</td>
							<td class="td01">订购价格</td>
							<td class="td01" width="10%">数量</td>
							<td class="td01" width="10%">小计</td>
							<td class="td01" width="10%">操作</td>
						</tr>
						{%forlist from=$array key=i%}
						<tr>
							<td class="td02"><a target="_blank" class="infolink01" href="{%$array[i].link%}">{%$array[i].title%}</a></td>
							<td class="td02"><img src="{%$array[i].pic|zoom(90,90)%}"></td>
							<td class="td02">{%$array[i].tsn%}</td>
							<td class="td03">
								{%$array[i].bprice|espcms_format_money(3)%}
								<input type="hidden" name="bprice[]" value="{%$array[i].bprice%}"/>
								<input type="hidden" name="did[]" value="{%$array[i].did%}"/>
							</td>
							<td class="td02">
								<input type="text" name="amount[]" id="amount{%$array[i].did%}" value="{%$array[i].amount%}" data-id="{%$array[i].did%}" data-p="{%$array[i].bprice%}" size="2" maxlength="5" class="infoInput amount"/>
							</td>
							<td class="td03">
								<span id="countprice_str_{%$array[i].did%}">{%$array[i].countprice|espcms_format_money(3)%}</span>
								<input type="hidden" class="countprice" name="countprice[]" id="countprice{%$array[i].did%}" value="{%$array[i].countprice%}">
							</td>
							<td class="td02"><button type="button" class="button red delete_item" data-id="{%$array[i].did%}">删除</button></td>
						</tr>
						{%/forlist%}
						<tr>
							<td colspan="16" class="td03"><span class="f14 colorgreg strong">商品总金额：<span id="product_total_str">{%$product_total|espcms_format_money(3)%}</span></span></td>
						</tr>
						<tr>
							<td colspan="10" class="td03">
								<table class="tablelist" width="100%" style="margin:0 auto;">
									<tr>
										<td class="left"><button class="button blue delete_all_item" type="button"/>清空购物车</button></td>
										<td class="right"><button class="button orange" type="submit" formmethod="POST"/>去结算</button></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</form>
				{%else%}
				<div class="title mb10"><div class="messageicon2"></div><div class="messtitle">购物车提示</div></div>
				<div class="espcms_form_group tc f14 pt15">您还没有选择订购商品</div>
				{%/if%}
			</div>
			{%elseif $out=='order_edit'%}
			<script type="text/javascript">
				$(function () {
					$("#city_select").citySelect({
						prov: "{%if $member.province%}{%$member.province%}{%else%}北京{%/if%}",
						city: "{%$member.city%}",
						dist: "{%$member.district%}",
						nodata: "none"
					});

					load_tabclick('.tab_click');
					conpon_check();
				});
			</script>

			<div class="pb10 pt20 tc"><img src="{%$rootpath%}images/a2.jpg"/></div>
			<div class="espcms_member_login_center espcms_formwidth_c">
				<div class="title mb10"><div class="messageicon3"></div><div class="messtitle">订购商品列表</div></div>
				<form name="order_list" method="post" id="order_list" action="{%$order_link.save%}">
					<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
					<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
					<input type="hidden" name="userid" id="userid" value="{%$member.userid%}"/>
					<input type="hidden" name="productmoney" id="productmoney" value="{%$product_total%}"/>
					<table class="tablelist" width="99%" style="margin:0 auto;">
						<tr>
							<td class="td01">商品名</td>
							<td class="td01">图片</td>
							<td class="td01">商品编号</td>
							<td class="td01">订购价格</td>
							<td class="td01">数量</td>
							<td class="td01">小计</td>
						</tr>
						{%forlist from=$array key=i%}
						<tr>
							<td class="td02">
								<input type="hidden" name="product_item_price[]" value="{%$array[i].bprice%}"/>
								<input type="hidden" name="products_oprice[]" value="{%$array[i].oprice%}"/>
								<input type="hidden" name="products_id[]" class="products_id" data-tid="{%$array[i].tid%}" value="{%$array[i].did%}"/>
								<input type="hidden" name="products_tid[]" class="products_tid" value="{%$array[i].tid%}"/>
								<input type="hidden" name="products_name[]" value="{%$array[i].title%}"/>
								<input type="hidden" name="products_tsn[]" value="{%$array[i].tsn%}"/>
								<a target="_blank" class="infolink01" href="{%$array[i].link%}">{%$array[i].title%}</a>
							</td>
							<td class="td02"><img src="{%$array[i].pic|zoom(90,90)%}"></td>
							<td class="td02">{%$array[i].tsn%}</td>
							<td class="td02">
								{%$array[i].bprice|espcms_format_money(3)%}
							</td>
							<td class="td02">{%$array[i].amount%}<input type="hidden" name="product_item_qty[]" id="amount_{%$array[i].did%}" value="{%$array[i].amount%}"></td>
							<td class="td03">{%$array[i].countprice|espcms_format_money(3)%}<input type="hidden" name="product_item_total[]" id="countprice_{%$array[i].did%}" value="{%$array[i].countprice%}"></td>
						</tr>
						{%/forlist%}
						<tr>
							<td colspan="6" class="pt10 pb10 tr"><span class="f14 colorgreg strong">商品总金额：{%$product_total|espcms_format_money(3)%}<span class="discount_div displaynone"></span></span></td>
						</tr>
					</table>
					{%if $order_con.ORDER_ISOPID==0%}
					<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">配送方式</div></div>
					<table class="tablelist" width="99%" style="margin:0 auto;">
						{% if count($shipplug) > 0 %}
						{%forlist from=$shipplug key=i%}
						<tr>
							<td class="td03" width="20%">{%$shipplug[i].shippingname%}</td>
							<td class="td04">
								<input type="radio" name="osid" value="{%$shipplug[i].osid%}"{%if key=>i==1%} checked{%/if%} />
									{%if $shipplug[i].price>0%}运费：{%$shipplug[i].price%} {%/if%}{%$shipplug[i].content%}
							</td>
						</tr>
						{%/forlist%}
						{%else%}
						<tr>
							<td class="center">暂无配送方式</td>
						</tr>
						{%/if%}
					</table>
					{%else%}
					<input type="hidden" name="osid" value="{%$order_con.ORDER_OPID%}"/>
					{%/if%}
					{%if $order_con.ORDER_ISPAYDELI==1 ||  $order_con.ORDER_ISONLINEPAY==1 || $order_con.ORDER_ISTRANSFEL==1 %}
					<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">支付方式</div></div>
					<table class="tablelist" width="99%" style="margin:0 auto;">
						<tr>
							<td class="td03" width="20%">付款方式</td>
							<td class="td04">
								{%if $order_con.ORDER_ISPAYDELI==1%}
								<input type="radio" name="paytype" value="1" checked/> 货到付款
								{%/if%}
								{%if $order_con.ORDER_ISONLINEPAY==1%}
								<input type="radio" name="paytype" value="2" checked/> 在线支付
								{%/if%}
								{%if $order_con.ORDER_ISTRANSFEL==1%}
								<input type="radio" name="paytype" value="3" checked/> 转帐支付
								{%/if%}
							</td>
						</tr>
					</table>
					{%else%}
					<input type="hidden" name="paytype" value="1"/>
					{%/if%}
					{%if $coupon_app.isetup && $coupon_app.isopen%}
					<input type="hidden" name="check_coupon_link" id="check_coupon_link" value="{%$check_coupon_link%}"/>
					<input type="hidden" name="discount" id="discount" value="0"/>
					<div class="title mb20 mt20"><div class="messageicon4"></div><div class="messtitle">优惠卷</div></div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">优惠卷编号</label>
						<div class="control_required20">
							<input type="text" name="ocdsn" id="ocdsn" class="col6 infoInput" data-isvalidation="true" data-validation="^[\w-]+$" placeholder="请填写优惠卷编号" title="请填写优惠卷编号" data-validation-msg="抱歉：优惠卷编号输入错误，请返回重新输入！"/>
							<a target="_blank" href="{%$uncoupon_link%}">查看优惠卷</a>
						</div>
					</div>
					{%/if%}
					<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">填写收货信息</div></div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">收货人姓名</label>
						<div class="control_required20"><input type="text" name="consignee" value="{%$member.alias%}" class="col4 infoInput" data-validation-minlength="4" data-validation-maxlength="50" placeholder="请填写订单收货人真实姓名" title="请填写订单收货人真实姓名" data-validation-msg="抱歉：收货人真实姓名输入错误，请返回重新输入！"/></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">E-mail</label>
						<div class="control_required20 f14"><input type="text" name="email" value="{%$member.email%}" class="col5 infoInput" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"  placeholder="请输入E-mail" title="请输入E-mail" data-validation-msg="抱歉：E-mail输入错误，请重新输入！"/></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">联系电话</label>
						<div class="control_required20 f14"><input type="text" name="tel" value="{%$member.tel%}" class="col4 infoInput" placeholder="请输入固定电话，格式为：区号-电话号码-分机，例如：0716-2209455-001" title="请输入固定电话，格式为：区号-电话号码-分机，例如：0716-2209455-001" data-isvalidation="true" data-validation="^[\d-]{6,}$" data-validation-msg="抱歉，固定电话输入错误，请输入格式为：区号-电话号码-分机的号码，分机可以不用填写" /></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">手机</label>
						<div class="control_required20 f14"><input type="text" name="mobile" value="{%$member.mobile%}" class="col4 infoInput" data-validation="^1[\d]{10}$" placeholder="请输入11位手机号" title="请输入11位手机号" data-validation-msg="抱歉：手机号输入错误，请重新输入！"/> </div>
					</div>
					<div class="espcms_form_group">
						<label for="cityone" class="control_label16">地区</label>
						<div class="control_required20 f14">
							<div id="city_select">
								<select class="infoInput prov" data-size="8" name="province"></select>
								<select class="infoInput city" data-size="8" name="city"></select>
								<select class="infoInput dist" data-size="8" name="district"></select>
							</div>
						</div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">详细地址</label>
						<div class="control_required20 f14"><input type="text" name="address" value="{%$member.address%}" class="col6 infoInput" data-validation-minlength="4" data-validation-maxlength="200" placeholder="请填写订单详细地址" title="请填写订单详细地址" data-validation-msg="抱歉：订单详细地址输入错误，请返回重新输入！"/></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">邮编</label>
						<div class="control_required20 f14"><input type="text" name="zipcode" value="{%$member.zipcode%}" class="col3 infoInput" data-validation="^[\d]*$" placeholder="请输入邮编" title="请输入邮编" data-validation-msg="抱歉：邮编输入错误，请重新输入！"/></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">索取发票</label>
						<div class="control_required20 f14">
							<input type="radio" name="isinvoice" class="tab_click" open_list=".isinvoice_div" value="1"/> 需要&nbsp;
							<input type="radio" name="isinvoice" class="tab_click" close_list=".isinvoice_div" value="0" checked/> 不需要
						</div>
					</div>
					<div class="espcms_form_group isinvoice_div displaynone">
						<label for="title" class="control_label16">发票全称</label>
						<div class="control_required20 f14">
							<input type="text" name="invpayee" class="col6 infoInput" link-validation="isinvoice" link-gettype="radio" link-getvalue="1" data-validation-minlength="4" data-validation-maxlength="200" placeholder="请输入发票全称，长度为2至150个以内任意字符" title="请输入发票全称，长度为2至150个以内任意字符" data-validation-msg="抱歉，发票全称填写错误，请填写长度2至150位的任意字符！"/>
						</div>
					</div>
					<div class="espcms_form_group isinvoice_div displaynone">
						<label for="title" class="control_label16">企业证号</label>
						<div class="control_required20 f14"><input type="text" name="companysn" id="companysn" class="col6 infoInput" link-validation="isinvoice" link-gettype="radio" link-getvalue="1" data-validation-minlength="5" data-validation-maxlength="50" placeholder="请输入企业证号（建议填写五证合一或者公司营业执照号），字符长度由2至50位以内的字母和数字字符组成" title="请输入企业证号（建议填写五证合一或者公司营业执照号），字符长度由2至50位以内的字母和数字字符组成" data-validation-msg="抱歉，证件号码填写错误，请填写长度2至50位以内的字母和数字字符！" /></div>
					</div>
					<div class="espcms_form_group isinvoice_div displaynone">
						<label for="title" class="control_label16">发票内容</label>
						<div class="control_required20 f14"><input type="text" name="invcontent" id="invcontent" class="col6 infoInput" link-validation="isinvoice" link-gettype="radio" link-getvalue="1" data-isvalidation="true" data-validation-minlength="5" data-validation-maxlength="200" placeholder="请输入开票内容" title="请输入开票内容" data-validation-msg="抱歉，当前开票内容输入错误！"/></div>
					</div>
					<div class="espcms_form_group">
						<label for="title" class="control_label16">备注</label>
						<div class="control_required20 f14">
							<textarea class="form-control" style="width:100%;height:120px" name="content" id="content" maxlength="800" data-isvalidation="true" data-validation-minlength="4" data-validation-maxlength="200"  placeholder="请输入订单备注，长度不超过500个以内任意字符" title="请输入订单备注，长度不超过500个以内任意字符" data-validation-msg="抱歉，订单备注输入错误，请输入长度不超过500个以内的任意字符！"></textarea>
						</div>
					</div>
					<div class="espcms_form_group">
						<label class="control_label16"> </label>
						<div class="control_required20">
							<button class="button orange" type="submit" formmethod="POST"/>提交订单</button>
						</div>
					</div>
				</form>
			</div>
			{%elseif $out=='edit_buyok'%}
			<div class="pb10 pt20 tc"><img src="{%$rootpath%}images/a3.jpg"/></div>
			<div class="espcms_member_login_center espcms_formwidth_c">
				<div class="title mb30"><div class="messageicon3"></div><div class="messtitle">成功提交订单</div></div>
				<div class="espcms_form_group tc f14">恭喜，您的订单已提交成功，请记住您的订单号<span class="oninage b">{%$read.ordersn%}</span></div>
				<div class="espcms_form_group tc f14 pt15">
					订单总额：<span class="oninage">{%$read.orderamount|espcms_format_money(3)%}</span>（产品总额{%$read.productmoney|espcms_format_money(3)%}{%if $read.shippingmoney>0%} + 快递费{%$read.shippingmoney|espcms_format_money(3)%}{%/if%}{%if $read.invoicefeemoney>0%} + 发票手续费：{%$read.invoicefeemoney|espcms_format_money(3)%}{%/if%}{%if $read.discount>0%} - 优惠{%$read.discount|espcms_format_money(3)%}{%/if%}）
				</div>
				{%if $read.paytype==2 && count($pay_plug_list)>0%}
				<div class="espcms_form_group tc pt5">
					<div class="pay_title">选择以下支付方式付款</div>
					<div class="paylist">
						{%forlist from=$pay_plug_list key=i%}
						<a href="{%$pay_plug_list[i].pay_link%}"><img src="{%$rootdir%}{%$pay_plug_list[i].paypic%}"/></a>
						{%/forlist%}
					</div>
				</div>
				{%/if%}
				{%if $member_app.isetup && $member_app.isopen && $member.userid%}
				<div class="espcms_form_group tc pt15">
					<a class="button blue2" href="{%$mlink.center%}">会员中心</a>  <a class="button blue2" href="{%$member_order_link%}">查看订单</a>
				</div>
				{%/if%}
			</div>
			{%elseif $out=='pay_no'%}
			<div class="espcms_member_login_center espcms_formwidth_c">
				<div class="title mb30"><div class="messageicon3"></div><div class="messtitle">支付还未支付，请进行该订单支付操作！</div></div>
				<div class="espcms_form_group tc f14">所属订单为：<span class="oninage b">{%$read.ordersn%}</span></div>
				<div class="espcms_form_group tc f14 pt15">
					订单总额：<span class="oninage">{%$read.orderamount|espcms_format_money(3)%}</span>（产品总额{%$read.productmoney|espcms_format_money(3)%}{%if $read.shippingmoney>0%} + 快递费{%$read.shippingmoney|espcms_format_money(3)%}{%/if%}{%if $read.invoicefeemoney>0%} + 发票手续费：{%$read.invoicefeemoney|espcms_format_money(3)%}{%/if%}{%if $read.discount>0%} - 优惠{%$read.discount|espcms_format_money(3)%}{%/if%}）
				</div>
				{%if $read.paytype==2 && count($pay_plug_list)>0%}
				<div class="espcms_form_group tc pt5">
					<div class="pay_title">选择以下支付方式付款</div>
					<div class="paylist">
						{%forlist from=$pay_plug_list key=i%}
						<a href="{%$pay_plug_list[i].pay_link%}"><img src="{%$rootdir%}{%$pay_plug_list[i].paypic%}"/></a>
						{%/forlist%}
					</div>
				</div>
				{%/if%}
				{%if $member_app.isetup && $member_app.isopen && $member.userid%}
				<div class="espcms_form_group tc pt15">
					<a class="button blue2" href="{%$mlink.center%}">会员中心</a>  <a class="button blue2" href="{%$member_order_link%}">查看订单</a>
				</div>
				{%/if%}
			</div>
			{%elseif $out=='pay_ok'%}
			<div class="espcms_member_login_center espcms_formwidth_c">
				<div class="title mb30"><div class="messageicon3"></div><div class="messtitle">支付成功</div></div>
				<div class="espcms_form_group tc f14">您的支付已成功，所属订单为：<span class="oninage b">{%$read.ordersn%}</span></div>
				<div class="espcms_form_group tc f14 pt10">支付总金额为：<span class="oninage">{%$read.orderamount|espcms_format_money(3)%}</span></div>
				{%if $member_app.isetup && $member_app.isopen && $member.userid%}
				<div class="espcms_form_group tc pt15">
					<a class="button blue2" href="{%$mlink.center%}">会员中心</a>  <a class="button blue2" href="{%$member_order_link%}">查看订单</a>
				</div>
				{%/if%}
			</div>
			{%/if%}
		</div>
		{%link file="public/footer.html"%}
	</body>
</html>
