<%@ page language="C#" autoeventwireup="true" inherits="general_finance_Finance_include, 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  TxtClientName=document.getElementById("TxtClientName").value;
      var TxtContact_Name=document.getElementById("TxtContact_Name").value;
      if(!Trim(TxtContract_Num))
      {
        alert('合同编号不能为空!');
        return false;
        
      }
      else if(!Trim(TxtClientName))
      {
         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>
</head>
<body class ="bodycolor" leftmargin="0" topmargin="0">
    <form id="form1" runat="server">
   <table class="small" cellSpacing="1" cellPadding="1"  border="0" bgcolor=#000000 style="width: 760px">
            <tr>
                <td class="TableData" style="width: 775px" ><fieldset style="width:768px" align="left"> <legend> 
财务审批记录
</legend><TABLE class="small" cellSpacing="1" cellPadding="1" align="center" border="0" bgcolor=#000000 style="width: 768px">
    	<tr>
    	<td class="TableData" style="width: 726px; height: 42px;" >  <C1WebGrid:C1WebGrid ID="C1WebGrid1" runat="server"  AllowSorting="True"
            AutoGenerateColumns="False" CallbackOptions="Paging,Sorting,Selection" 
            DataKeyField="Finance_Id" HScrollBarStyle="Automatic" AllowColSizing=true  VScrollBarStyle=Always
            OnSortingCommand="C1WebGrid1_SortingCommand"
            PageSize="5" SkinID="gridviewSkin"  width="764px" height=250px >
            <Columns>
             
                <C1WebGrid:C1BoundColumn DataField="Contract_Num"  HeaderText="合同编号"  Fixed=true SortExpression="Contract_Num">
                </C1WebGrid:C1BoundColumn>
                 <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="Exp6" HeaderText="是否审核"><ItemTemplate><%#Eval("Exp6").ToString()=="0"?"待审核":"已审核"%></ItemTemplate></C1WebGrid:C1TemplateColumn>
                 <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><%#string.Format("{0:d}", Eval("Exp3").ToString())%></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>
</fieldset></td></tr> <tr>
                <td class="TableData" style="width: 775px"><fieldset style="width:768px" align="left"> <legend> 
增加收入
</legend><TABLE class="small" cellSpacing="1" cellPadding="1" align="center" border="0" bgcolor=#000000 style="width: 768px">
    	<tr>
    	<td class="TableData" style="height: 26px">
            合同编号:<asp:TextBox ID="TxtContract_Num" CssClass="BigInput" runat="server"></asp:TextBox></td><td class="TableData" style="height: 26px"  >客户名称: &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="TxtClientName" CssClass="BigInput" runat="server"></asp:TextBox></td>
     
    	</tr>
    	<tr>
    	<td class="TableData"  >收入金额:<asp:TextBox ID="TxtFinance_Money" CssClass="BigInput" runat="server"></asp:TextBox>元</td><td class="TableData"  >
            付款方式 : &nbsp; &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="TxtPayMethod" CssClass="BigInput" runat="server"></asp:TextBox></td>
     
    	</tr>
    	<tr>
    	<td class="TableData" style="height: 26px" >流水帐号:<asp:TextBox ID="TxtFinance_Proof" CssClass="BigInput" runat="server"></asp:TextBox><font color=red>相当于财务凭证</font></td><td class="TableData" style="height: 26px"  >
            付款联系人 &nbsp;&nbsp; &nbsp;<asp:TextBox ID="TxtContact_Name" CssClass="BigInput" runat="server"></asp:TextBox></td>
     
    	</tr>
    	<tr>
    	<td class="TableData"  >记帐日期:<asp:TextBox ID="TxtFinance_Date" CssClass="BigInput" runat="server"></asp:TextBox><img
            onclick='popUpCalendar(document.getElementById("TxtFinance_Date"), document.getElementById("TxtFinance_Date"), "yyyy-mm-dd")'
            src="../../App_Themes/Green/images/Calendar.gif" /></td><td class="TableData"  >
                付款日期: &nbsp; &nbsp; &nbsp; &nbsp; <asp:TextBox ID="TxtPayData" CssClass="BigInput" runat="server"></asp:TextBox><img
            onclick='popUpCalendar(document.getElementById("TxtPayData"), document.getElementById("TxtPayData"), "yyyy-mm-dd")'
            src="../../App_Themes/Green/images/Calendar.gif" /></td>
     
    	</tr>
    	<tr>
    	<td class="TableData" colspan="2"  >
            说明:&nbsp; &nbsp; &nbsp;&nbsp; <asp:TextBox ID="TxtFinance_Remark" CssClass="BigInput" runat="server" Height="60px" TextMode="MultiLine" Width="265px"></asp:TextBox></td>
     
    	</tr>
    <tr>
        <td align="center" class="TableData" colspan="2">
            <asp:Button ID="Button1" runat="server" Text="增加收款" CssClass="BigButton" OnClientClick="return Rtrim()" OnClick="Button1_Click" />
            <input id="Reset1" class="BigButton" type="reset" value="重置" /></td>
    </tr>
   
    	</TABLE>
</fieldset></td></tr></table>
 <div id="ShowJs" runat="Server"> </div>
    </form>
</body>
</html>