<%@ page language="C#" autoeventwireup="true" inherits="general_finance_FinIn_List, CrmCommand" %>

<%@ Register TagPrefix="C1WebGrid" Namespace="C1.Web.C1WebGrid" Assembly="C1.Web.C1WebGrid.2" %>
<!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 id="Head1" runat="server">
    <title>无标题页</title>
     <script  src="../../Javascript/Trim.js" type="text/javascript">
    </script>
    <script src="../../Javascript/CheckALL.js" type="text/javascript"></script>
       <script src="../../Javascript/canlendar.js" type="text/javascript"></script>
       <script src="../../Javascript/formCheck.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
    function Rtrim()
    {
    
      var  TxtContract_Num=document.getElementById("TxtContract_Num").value;
      var  TxtFinance_Money=document.getElementById("TxtFinance_Money").value;
   
      var TxtContact_Name=document.getElementById("TxtContact_Name").value;
      if(!Trim(TxtContract_Num))
      {
        alert('合同编号不能为空!');
        return false;
        
      }
     
      else if(!Trim(TxtContact_Name))
      {
        alert('付款联系人不能为空!');
        return false;
      }
      else if(!Trim(TxtFinance_Money))
      {
        alert('收入金额不能为空!');
        return false;
      }
      else if(!isMath(TxtFinance_Money))
      {
        alert("收入金额必须为数字!");
        return false;
      }
      else
      {
         return true;
      }
    }
   
    </script>
       <script language="javascript" type="text/javascript">
var menu_id=0;

function setPointer(theRow, thePointerColor,menu_id_over)
{
  if(menu_id!=menu_id_over)
  {
	if(thePointerColor == "#B3D1FF")
		theRow.className="menu_active";
	else
		theRow.className="menu_comon";
   }
}

function view_menu1()
{
 
   
 
   location.href="FinIn_List.aspx?type=unchecked"
   menu_id=1;
   menu_1.className="menu_active";
   menu_2.className="menu_comon";
  
}

function view_menu2()
{

   location.href ="FinIn_List.aspx?type=checked"
   menu_id=2;
   menu_1.className="menu_comon";
   menu_2.className="menu_active";
  
}
function setUp()
{
    if(document.form1.HidCode.value =="checked")
    {
          menu_1.className="menu_comon";
          menu_2.className="menu_active";
    }
    else
    {
           menu_1.className="menu_active";
           menu_2.className="menu_comon";
    }
}

function OpenOther(url)
{
  var R=window.showModalDialog(url,"水平","dialogWidth=430px;dialogHeight=450px");
    if(R == "ok")
           {
            
                location.href="FinIn_List.aspx?type=checked";
           }
}

</script>

</head>
<body class="bodycolor" topmargin="5" onload="setUp();">
    <form id="form1" runat="server">
   <div id="pnlMain">
    	<TABLE class="small" cellSpacing="1" cellPadding="1"   align="center" bgcolor="black">
    	<tr>
    	<td class="TableData"   colspan=4 noWrap>
    <TABLE class="big" cellspacing="0" height="100%" width=800 bgcolor="#DDDDDD" border="1" cellpadding="1" bordercolorlight="#000000" bordercolordark="#FFFFFF">
 <TR>

   <td class="TableData"  width="50%" title="新增入款" id="menu_1" onclick="view_menu1()" onmouseover="setPointer(this, '#B3D1FF',1)" onmouseout="setPointer(this, '#DDDDDD',1)" style="cursor:hand">
       <img src="../images/menu/sms.gif" WIDTH="20" HEIGHT="20" align="absmiddle"><b><font color="#000000"> 新增入款</font></b>
   </TD>

   <td class="TableData"  width="50%" title="入款处理记录" id="menu_2" onclick="view_menu2()" onmouseover="setPointer(this, '#B3D1FF',2)" onmouseout="setPointer(this, '#DDDDDD',2)" style="cursor:hand">
       <img src="../images/menu/sms.gif" WIDTH="20" HEIGHT="20" align="absMiddle"><b><font color="#000000"> 入款处理记录</font></b>
   </TD>
   
 

   </TR>
</TABLE>
</td>
    	</tr>
 	<span runat=server id="spanAdd"> 	
<tr>
<td class="TableData"  align="center" >
	<table style="width:500px" cellspacing="1" cellpadding="1" bgcolor="black">
		<tr>
			<td class="TableData" style="width: 85px">    	
            合同编号:</td>
			<td class="TableData" align="left">	
			<asp:TextBox ID="TxtContract_Num" CssClass="BigInput" runat="server"></asp:TextBox>
</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px">收入金额:</td>
			<td class="TableData" align="left">	
			<asp:TextBox ID="TxtFinance_Money" CssClass="BigInput" runat="server"></asp:TextBox>
			 	
			元</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px">	
			付款日期:</td>
			<td class="TableData">
			<table style="width: 100%" cellspacing="0" cellpadding="0">
				<tr>
					<td class="TableData" style="width: 129px">
					  <input id="TxtPayData" runat="server" 
                        readonly="readonly" type="text" class="BigInput" />
					
</td>
					<td class="TableData" align="left">
					<img
            onclick='popUpCalendar(document.getElementById("TxtPayData"), document.getElementById("TxtPayData"), "yyyy-mm-dd")'
            src="../../App_Themes/Green/images/Calendar.gif" />
					</td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px" >			付款方式 :
</td>
			<td class="TableData" align="left">            
                <asp:DropDownList ID="DropPayMethod" runat="server" CssClass="BigInput">
                    <asp:ListItem>现金</asp:ListItem>
                    <asp:ListItem>支票</asp:ListItem>
                    <asp:ListItem>贷记凭证</asp:ListItem>
                    <asp:ListItem>电汇</asp:ListItem>
                    <asp:ListItem>汇票</asp:ListItem>
                    <asp:ListItem>信用卡</asp:ListItem>
                    <asp:ListItem>网上支付</asp:ListItem>
                </asp:DropDownList></td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px"> 	
			付款联系人:
</td>
			<td class="TableData" align="left">			<asp:TextBox ID="TxtContact_Name" CssClass="BigInput" runat="server"></asp:TextBox>
</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px">流水帐号:</td>
			<td class="TableData" align="left"> 	
			<asp:TextBox ID="TxtFinance_Proof" CssClass="BigInput" runat="server"></asp:TextBox>
						</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px"> 	
			记帐日期:</td>
			<td class="TableData" align="left">			<asp:Label ID="TxtFinance_Date" runat="server" Text=""></asp:Label>
</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px">			操作人 :</td>
			<td class="TableData" align="left">	
			<asp:Label ID="LblUser" runat="server" Text="Label"></asp:Label>
</td>
		</tr>
		<tr>
			<td class="TableData" style="width: 85px">			说明:</td>
			<td class="TableData" align="left">			
			<asp:TextBox ID="TxtFinance_Remark" CssClass="BigInput" runat="server" Height="60px" TextMode="MultiLine" Width="265px" BorderWidth="1px" BorderStyle="Solid" BorderColor="Silver"></asp:TextBox>
</td>
		</tr>
		<tr>
			<td class="TableData" colspan="2" align="center">	
            <asp:Button ID="BtnAdd" runat="server" Text="增加收款" CssClass="BigButton" OnClientClick="return Rtrim()" OnClick="BtnAdd_Click" Width="70px" />&nbsp;&nbsp;
            <input id="Reset1" class="BigButton" type="reset" value="重  置" style="width: 70px" /></td>
		</tr>
	</table><br></td> 
</tr>
</span>
 
   <span runat=server id="spanCheck" visible=false > 	
    	<tr>
  <td class="TableData"  noWrap colspan=4>审核类型:
      <asp:DropDownList ID="SelType" runat="server" OnSelectedIndexChanged="SelType_SelectedIndexChanged" AutoPostBack="True">
          <asp:ListItem Value="0">待处理</asp:ListItem>
          <asp:ListItem Value="1">已通过</asp:ListItem>
          <asp:ListItem Value="2">未通过</asp:ListItem>
      </asp:DropDownList>	
  </td>
    	</tr>

 <TR>
					<td  colspan=4 align=center class="TableData" noWrap>
                      
<TABLE class="small" cellSpacing="1" cellPadding="1" align="center" border="0" style="width: 768px">
    	<tr>
    	<td class="TableData"  style="width: 726px; height: 42px;" >  <C1WebGrid:C1WebGrid ID="C1WebGrid1" runat="server"  AllowSorting="True"
            AutoGenerateColumns="False" CallbackOptions="Sorting,Selection" 
            DataKeyField="Finance_Id" HScrollBarStyle="Automatic" AllowColSizing=true  VScrollBarStyle=Always
            OnSortingCommand="C1WebGrid1_SortingCommand"
             SkinID="gridviewSkin"  width="764px" height=250px >
            <Columns>
            <C1WebGrid:C1BoundColumn DataField="Contract_Num"  HeaderText="合同编号"  Fixed=true SortExpression="Contract_Num">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1TemplateColumn Fixed=true SortExpression="Contract_Num" HeaderText="合同编号"><ItemTemplate><A href="#" onclick="OpenOther('Finance_Edit.aspx?id=<%#Eval("Finance_Id") %>')"><%#Eval("Contract_Num")%></A></ItemTemplate></C1WebGrid:C1TemplateColumn>
             
                 <C1WebGrid:C1TemplateColumn HeaderText="客户名称">
                 <ItemTemplate>
                <%#Eval("Client_Name") %>
                 </ItemTemplate>
                 <ItemStyle Width=150px HorizontalAlign="Center" Wrap="True" />
                    <HeaderStyle HorizontalAlign="Center" />
                 </C1WebGrid:C1TemplateColumn>
                 
               
                <C1WebGrid:C1BoundColumn DataField="Finance_Date" HeaderText="记帐日期" DataFormatString="{0:d}"  SortExpression="Finance_Date">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Finance_Money" HeaderText="入帐金额" DataFormatString="{0:C}" SortExpression="Finance_Money">
                </C1WebGrid:C1BoundColumn>
             
                 <C1WebGrid:C1TemplateColumn SortExpression="Exp7" HeaderText="审核状态"><ItemTemplate><%# State(Eval("Exp7").ToString())%></ItemTemplate></C1WebGrid:C1TemplateColumn>
                <C1WebGrid:C1TemplateColumn SortExpression="Exp1" HeaderText="审批人"><ItemTemplate><%#Eval("Exp1")%></ItemTemplate></C1WebGrid:C1TemplateColumn>
                <C1WebGrid:C1TemplateColumn HeaderText="审批日期"  SortExpression="Exp3" ><ItemTemplate><%#Eval("Exp3").ToString() == "2001-1-1"?"":string.Format("{0:d}", Eval("Exp3"))%></ItemTemplate><ItemStyle Width=150px HorizontalAlign="Center" Wrap="True" />
                    <HeaderStyle HorizontalAlign="Center" /></C1WebGrid:C1TemplateColumn>
                    <C1WebGrid:C1TemplateColumn HeaderText="审批意见"  SortExpression="Exp2" ><ItemTemplate><%#Eval("Exp2")%></ItemTemplate><ItemStyle Width=250px HorizontalAlign="Center" Wrap="True" />
                    <HeaderStyle HorizontalAlign="Center" /></C1WebGrid:C1TemplateColumn>   
            </Columns>
        </C1WebGrid:C1WebGrid>
           
            </td>
    	</tr>
    	</TABLE>
</td>
  </TR>
             </span>

       </TABLE>
       </div>
      
        <input id="HidCode" type="hidden"  runat="server" />
    </form>
   
</body>
</html>

