<!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 http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>支付_{wc:fun:_cfg("web_name")}</title>
<meta name="keywords" content="{wc:if isset($keywords)}{wc:$keywords}{wc:else}{wc:fun:_cfg("web_key")}{wc:if:end}" />
<meta name="description" content="{wc:if isset($description)}{wc:$description}{wc:else}{wc:fun:_cfg("web_des")}{wc:if:end}" />
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/Comm1.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/MyCart.css"/>
<script type="text/javascript" src="{G_GLOBAL_STYLE}/global/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{G_TEMPLATES_STYLE}/js/jquery.cookie.js"></script>
<style>
.yeepay_bank img{ border:1px solid #eee; padding:2px; width:130px; height:35px; }
</style>

</head>
<body>
<div class="logo">
	<div class="float">
		<span class="logo_pic"><a href="{WEB_PATH}" class="a" title="{wc:fun:_cfg("web_name")}">
			<img src="{G_UPLOAD_PATH}/{wc:fun:Getlogo()}"/>
		</a></span>
		<span class="tel"><a href="{WEB_PATH}" style="color: #999;">返回首页</a></span>
	</div>
</div>
<form id="form_paysubmit" action="{WEB_PATH}/{ROUTE_M}/{ROUTE_C}/jf_paysubmit" method="post">
<div class="shop_payment">
	<ul class="payment">
		<li class="first_step">第一步：提交订单</li>
		<li class="arrow_1"></li>
		<li class="secend_step orange_Tech">第二步：支付订单</li>
		<li class="arrow_3"></li>
		<li class="third_step">第三步：购买成功</li>
	</ul>
	<div class="payment_Con">
		<ul class="order_list">
			<li class="top">
				<span class="name">商品名称</span>
				<span class="moneys">库存</span>
				<span class="money">价值</span>
				<span class="num">购买数量</span>
				<span class="all">小计</span>
			</li>
			{wc:loop $shoplist $shops}
			<li class="end">
				<span class="name">
               		<a class="blue" href="{WEB_PATH}/jf_goods/{wc:$shops['id']}">{wc:$shops['title']}</a>
                </span>
				<span class="moneys">{wc:$shops['cart_shenyu']}</span>
				<span class="money"><span class="color"><b>{wc:$shops['yunjiage']}</b></span></span>
				<span class="num orange Fb">{wc:$shops['cart_gorenci']}</span>
				<span class="all">{wc:$shops['cart_xiaoji']}</span>
			</li>
			{wc:loop:end}
			<li class="payment_Total">
				<div class="payment_List_Lc"><a href="{WEB_PATH}/member/cart/jf_cartlist" class="form_ReturnBut">返回购物车修改订单</a></div>
				<p class="payment_List_Rc">合计：<span class="orange F20">{wc:$MoenyCount}</span></p>
			</li>

            <!-- 余额支付 start-->
            <script type= "text/javascript "> 
function CheckNumber(obj) 
{ 
if (Number(obj.value) % 100 == 0) 
return true; 
alert( "使用的福分抵扣数量不正确，请输入正确的抵扣数量 "); 
obj.select(); 
obj.focus(); 
return false; 
} 
</script> 
			<li id="liPayByPoints" class="point_out">
					<div class="payment_List_Lc">
					<input type="checkbox" class="input_choice" id="shop_score" name="shop_score" value="1"/>使用福分抵扣现金：您的福分<span class="green F18">{wc:$member['score']}</span>
	                我要使用
                    <input type="text" class="pay_input_text_gray" id="jf_use_num"  onchange= "javascript:return CheckNumber(this); " value="0" name="jf_use_num"/> 福分, (1元 = {wc:$fufen['fufen_yuan']} 福分)</div>
	                <p id="pPointsTip" class="pay_Value" style="display:none;"></p>
	                <p class="payment_List_Rc"></p>
	         </li>
	         <!-- 福分 -->
            <!-- 余额支付 start-->
			<li class="point_in" id="liPayByBalance">
				<div class="payment_List_Lc">
					<input type="checkbox" name="moneycheckbox" value="1" class="input_choice"/>使用账户余额支付，账户余额：
					<span class="green F18">{wc:$Money}</span>元
				</div>
				<p style="" class="pay_Value" id="pBalanceTip">
				<span>◆</span><em>◆</em>账户余额支付更快捷，
				<a class="blue" target="_blank" href="{WEB_PATH}/member/home/userrecharge">立即充值</a></p>
			</li>
            <!-- 余额支付 end-->

		</ul>
	</div>

    <div class="payment_but" style="margin:15px 0 0 0;">
			<input type="hidden" name="submitcode" value="{wc:$submitcode}">
			<input id="submit_ok" class="shop_pay_but" type="submit" name="submit" value="">
	</div>
    </form>

</div><!--payment_Con end-->
<script>
$(function(){
	var info={'money':{wc:$Money},'MoenyCount':{wc:$MoenyCount},"shoplen":{wc:$shoplen}};
	if(info['money'] >= info['MoenyCount']){
		$("#divBankList").hide();
		$("#liPayByOther").hide();
		$("#MoneyCheckbox").attr("checked",true);
		$("#MoneyCheckbox").attr("disabled",true);
		$("#pay_money").text(info['MoenyCount']+'.00');
	}

	if(info['money']==0){
			$("#liPayByBalance").addClass("point_gray");
			$("#MoneyCheckbox").attr("disabled",true);
	}
	if(info['money'] < info['MoenyCount']){
		$("#MoneyCheckbox").attr("checked",true);
		$("#pay_money").text(info['money']+'.00');
		$("#pay_bankmoney").text(info['MoenyCount']-info['money']+'.00');
		$("#MoneyCheckbox").click(function(){
			if(this.checked){
				$("#pay_money").text(info['money']+'.00');
				$("#pay_bankmoney").text(info['MoenyCount']-info['money']+'.00');
			}else{
				$("#pay_money").text('0.00');
				$("#pay_bankmoney").text(info['MoenyCount']+'.00');
			}
		});
	}


	$("#submit_ok").click(function(){
		if(!this.cc){
			this.cc = 1;
			return true;
		}else{
			return false;
		}
		return false;
	});

	$("#shop_score_num").blur(function(){
			var fufen = parseInt($(this).val());
			var money = parseInt($(this).attr("money"));
			$(this).val(Math.floor(fufen/money)*money);
	});


	//$("input[@type=radio][@checked]").val();
	$(".click_img li>img").click(function(){
			$(this).prev().attr("checked",'checked');
	});

});
</script>

