<%@ Page language="c#" Codebehind="AdvNotify.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.AdvNotify" %>
<%@ Register TagPrefix="uc1" TagName="MemberMenu" Src="Modules/MemberMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="MemberHelper" Src="Modules/MemberHelper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="memberfooter" Src="Modules/memberfooter.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<!--#include file="../../inc/encoding.inc"-->
		<title>付款通知,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/ui.datepicker.css" type="text/css" rel="stylesheet" />
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/ui.datepicker.cn.js" type="text/javascript"></script>
		<script type="text/javascript">
		    $(document).ready(function(){
		        $("#txtPayTime").datepicker().click(function(){$(this).blur()});
		        
		        $('#btnSubmit').click(function(){
		            if($.trim($('#txtAmount').val()) == ''){
		                alert('请填写付款金额!');return false;
		            }else{
		                if(!isMoney($('#txtAmount'))){
		                    alert('金额填写有误');return false;
		                };
		            };
		            
		            if($('#txtPayTime').val() == ''){
		                alert('请填写汇款时间');$('#txtPayTime').focus();return false;
		            };
		            if($('#txtPayerBank').val() == ''){
		                alert('请填写汇款方银行名称');$('#txtPayerBank').focus();return false;
		            };
		            if($('#txtPayerAccount').val() == ''){
		                alert('请填写汇款方账号');$('#txtPayerAccount').focus();return false;
		            };
		            if($('#txtPayerName').val() == ''){
		                alert('请填写汇款人姓名');$('#txtPayerName').focus();return false;
		            };
		            if($('#txtRBank').val() == ''){
		                alert('请填写收款银行名称');$('#txtRBank').focus();return false;
		            };
		            if($('#txtRAccount').val() == ''){
		                alert('请填写收款方账号');$('#txtRAccount').focus();return false;
		            };
		            if($('#txtRName').val() == ''){
		                alert('请填写收款人姓名');$('#txtRName').focus();return false;
		            };
		            var attach = $.trim($('#uploadAttach').val());
		            if(attach != ''){
		                var format = attach.substring(attach.lastIndexOf('.')).toLowerCase();
		                if(format == '.jpg' || format == '.gif' || format == '.bmp' || format == '.png' || format == '.jpeg'){
		                    return true;
		                }else{
		                    alert('上传的附件只能为图片格式');
		                    return false;
		                }
		            };
		        });//end click
		        
		    });//end ready
		    
		    function isMoney(obj){
	            var dot = 0;//小数点个数
	            var tmp = obj.val();
	            while(tmp.indexOf('.') != -1){
	                dot += 1;
	                tmp = tmp.replace('.','_');
	            };
	            var reg = new RegExp(/[^\d\.]/g);
	            if(reg.test(obj.val()) || $.trim(obj.val()) == '' || dot > 1){
	                obj.focus();
	                return false;
	            };
	            return true;
            }
		</script>
	</HEAD>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-qgw clear">
		    <!--位置导航开始-->
		    <div class="path"><a href="<%=webSite %>Index.<%=config.html%>"><%=GetResourceString("Home")%></a> &nbsp;&gt;&nbsp;<a href="<%=webSite %>Center.<%=config.html %>"><%=GetResourceString("MemberCenter")%></a>&nbsp;&gt;&nbsp;<a href="<%=webSite %>MyAdvancePayment.<%=config.html %>">预付款</a>&nbsp;&gt;&nbsp;汇款通知</div>
		    <!--位置导航结束-->
			<div class="member_left">
				<!--会员中心导航开始-->
				<uc1:MemberMenu id="MemberMenu1" runat="server"></uc1:MemberMenu>
				<!--会员中心导航结束-->
			</div>
			<div class="member_middle_right">
			    <!--内容开始-->
			    <div class="mframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">填写预付款汇款信息</div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
	                    <form id="form1" runat="server">
				        <table cellpadding="0" cellspacing="0" class="tableinfo">
							<tr>
							    <th class="th_title" colspan="2">汇款人信息</th>
							</tr>
							<tr>
								<th>汇款金额： </th>
								<td><asp:TextBox ID="txtAmount" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>汇款时间： </th>
								<td><asp:TextBox ID="txtPayTime" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>银行名称： </th>
								<td><asp:TextBox ID="txtPayerBank" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>银行账号： </th>
								<td><asp:TextBox ID="txtPayerAccount" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>汇款人姓名： </th>
								<td><asp:TextBox ID="txtPayerName" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
							    <th class="th_title" colspan="2">收款方信息</th>
							</tr>
							<tr>
								<th>收款银行名称：</th>
								<td><asp:TextBox ID="txtRBank" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>收款账号：</th>
								<td><asp:TextBox ID="txtRAccount" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
								<th>收款人姓名：</th>
								<td><asp:TextBox ID="txtRName" runat="server"></asp:TextBox></td>
							</tr>
							<tr>
							    <th class="th_title" colspan="2">其它信息</th>
							</tr>
							<tr>
								<th>附件：</th>
								<td><asp:FileUpload ID="uploadAttach" runat="server" /><span style="color:Red;">(只能为图片)</span></td>
							</tr>
							<tr>
								<th>备注：</th>
								<td><asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Columns="50" Rows="4"></asp:TextBox></td>
							</tr>
							<tr>
								<th colspan="2"><asp:Button id="btnSubmit" OnClick="btnSubmit_Click" runat="server" Text="提交"></asp:Button></th>
							</tr>
						</table>
	                    </form>
	                </div>
	                <div class="bl"></div>
	                <div class="br"></div>
	                <div class="bm"></div>
	            </div>
				<!--内容结束-->
			</div>
		</div>
		<uc1:MemberHelper id="Helper1" runat="server"></uc1:MemberHelper>
		<uc1:memberfooter id="Footer1" runat="server"></uc1:memberfooter>
	</body>
</HTML>