<%@ page language="C#" autoeventwireup="true" inherits="general_finance_FinanceMy_OutCheck, 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/canlendar.js" type="text/javascript"></script>
                   <script src="../../Javascript/Trim.js" type="text/javascript"></script>
                   <script src="../../Javascript/CheckALL.js" type="text/javascript"></script>
                   <script language=javascript type="text/javascript">
                   function check()
                   {
                      var TxtControlPeople=document.getElementById("TxtControlPeople").value;
                      var TxtCheckData=document.getElementById("TxtCheckData").value;
                      if(!ChkOk('form1','item'))
                      {
                         return false;
                      }
                      if(!Trim(TxtControlPeople))
                      {
                         alert("审批人不能为空!");
                         return false;
                      }
                      else if(!Trim(TxtCheckData))
                      {
                         alert("审核日期不能为空");
                         return false;
                      }
                      else
                      {
                        return true;
                      }
                   }
 　function RLtrim()
    {
       var t1=document.getElementById("Text1").value;
       var t2=document.getElementById("Text2").value;
       if(Trim(t1) && Trim(t2))
       {
         
         return true;
       }
       else
       {
       alert('日期不能为空');
        return false;
       }
    }
                   </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" ><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: 15px">
            员工姓名<asp:TextBox ID="TxtName" runat="server" CssClass="BigInput" Height="17px" Width="150px"></asp:TextBox>支出日期:
            <input id="Text1" runat="server" style="width: 95px" type="text" />
            <img border="0" onclick='popUpCalendar(document.getElementById("Text1"), document.getElementById("Text1"), "yyyy-mm-dd")'
                src="../../App_Themes/Green/images/Calendar.gif" style="width: 20px; height: 23px" />
            ..<input id="Text2" runat="server" style="width: 86px" type="text" />
            <img border="0" onclick='popUpCalendar(document.getElementById("Text2"), document.getElementById("Text2"), "yyyy-mm-dd")'
                src="../../App_Themes/Green/images/Calendar.gif" style="width: 20px; height: 23px" />&nbsp;
            <asp:Button ID="Button7" runat="server" CssClass="BigButton" Height="26px" OnClick="Button7_Click"
                OnClientClick="return RLtrim()" Text="员工查找" Width="81px" /></td>
    </tr>
    	<tr>
    	<td class="TableData" style="width: 726px; height: 42px;" >  <C1WebGrid:C1WebGrid ID="C1WebGrid1" runat="server"  AllowSorting="True"
            AutoGenerateColumns="False" CallbackOptions="Paging,Sorting,Selection" 
            DataKeyField="Expend_Id" HScrollBarStyle="Automatic"  VScrollBarStyle=always AllowColSizing=true
             OnSortingCommand="C1WebGrid1_SortingCommand"
            PageSize="5" SkinID="gridviewSkin"  width="821px" height=250px >
            <Columns>
                <C1WebGrid:C1TemplateColumn  HeaderText="选择">
                                                    <ItemTemplate>
                                                        <input id="item" runat="server" type="checkbox" value='<%#Eval("Expend_Id") %>'/></ItemTemplate>
                                                        <ItemStyle Width=22px />
                                                </C1WebGrid:C1TemplateColumn>
                 <C1WebGrid:C1BoundColumn DataField="Client_Name" Fixed=True  HeaderText="客户名称"  SortExpression="Client_Name">
                 <ItemStyle Width=150px HorizontalAlign="Center" Wrap="True" />
                    <HeaderStyle HorizontalAlign="Center" />
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Exp1"   HeaderText="申请人"  SortExpression="Exp1"></C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Expend_Type"   HeaderText="费用类型"  SortExpression="Expend_Type"></C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Apply_time" HeaderText="支出日期" DataFormatString="{0:d}" SortExpression="Apply_time">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Exp2" HeaderText="财务凭证"  SortExpression="Exp2">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Exp3" HeaderText="申请日期" DataFormatString="{0:d}" SortExpression="Exp3">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Expend_Money" HeaderText="支出金额" DataFormatString="{0:C}" SortExpression="Expend_Money">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Exp6" HeaderText="公司代付金额" DataFormatString="{0:C}" SortExpression="Exp6">
                </C1WebGrid:C1BoundColumn>
                <C1WebGrid:C1BoundColumn DataField="Exp7" HeaderText="应归还公司金额" DataFormatString="{0:C}" SortExpression="Exp7">
                </C1WebGrid:C1BoundColumn>
                 <C1WebGrid:C1TemplateColumn SortExpression="Is_Check" HeaderText="是否审核"><ItemTemplate><%#Eval("Is_Check").ToString() == "0" ? "待审核" : "已审核"%></ItemTemplate></C1WebGrid:C1TemplateColumn>
                 <C1WebGrid:C1TemplateColumn SortExpression="Check_State" HeaderText="审核状态"><ItemTemplate><%# State(Eval("Check_State").ToString())%></ItemTemplate></C1WebGrid:C1TemplateColumn>
                 <C1WebGrid:C1BoundColumn DataField="Expend_Remark" HeaderText="费用备注" SortExpression="Expend_Remark">
                 <ItemStyle Width=250px />
                </C1WebGrid:C1BoundColumn>
                    
            </Columns>
        </C1WebGrid:C1WebGrid></td>
    	</tr>
    	</TABLE>
</fieldset></td></tr>  <tr>
                <td class="TableData" style="width: 775px" ><fieldset style="width:824px" align="left"> <legend> 
审批专栏</legend><TABLE class="small" cellSpacing="1" cellPadding="1" align="center" border="0" bgcolor=#000000 style="width: 824px"><tr><td class="TableData" colspan="2" >审批人: &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
    <asp:TextBox ID="TxtControlPeople" CssClass="BigInput" runat="server" Enabled="False"></asp:TextBox></td></tr><tr><td class="TableData" style="height: 20px" colspan="2" >审批日期: &nbsp; &nbsp; &nbsp;&nbsp;
        <asp:TextBox ID="TxtCheckData" CssClass="BigInput" runat="server"></asp:TextBox><img
            onclick='popUpCalendar(document.getElementById("TxtCheckData"), document.getElementById("TxtCheckData"), "yyyy-mm-dd")'
            src="../../App_Themes/Green/images/Calendar.gif" /></td></tr>
    <tr>
        
        <td class="TableData" colspan="2" style="height: 21px">
        审批原因 :&nbsp; &nbsp; &nbsp;&nbsp;
            <asp:TextBox ID="TxtRemark" CssClass="BigInput" runat="server" Height="70px" TextMode="MultiLine" Width="418px"></asp:TextBox></td>
    </tr>
    <tr>
        <td align="center" class="TableData" colspan="2">
            <asp:Button ID="Button1" runat="server" CssClass="BigButton" Text="通过" OnClientClick="return check()" OnClick="Button1_Click" />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <asp:Button ID="Button2" runat="server" CssClass="BigButton" Text="未通过" OnClientClick="return check()" OnClick="Button2_Click" /></td>
    </tr>
</table></fieldset></td></tr></table>
    </form>
</body>
</html>
