<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pay.aspx.cs" Inherits="Web.cg.show.pay.Pay" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>OA标题页</title>
    <link href="/css/css.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="/css/popcalendar.js"></script>
    </head>
<body>
    <form id="fom" runat="server">
        <div id ="main-c-03-right" >
            <table cellpadding="0"; cellspacing ="0"; style =" width :100%;background-image: url('/css/images/right_top.png'); background-repeat :repeat-x" >
                <tr>
        <td class  ="main-c-03-right02-top">
                	   <!--这里添加页面标题 -->
                      	    付款管理
                      	</td>

                </tr>
            </table>
            <div id="main-c-03-right02-main">
  <asp:Panel ID="plZong" runat="server" Visible="true">   
<!--栏目开始 -->
      <asp:Panel ID="plList" runat="server">
          
    <div class="row_title" id="divTitle" runat ="server" visible ="false" >
待付款清单：
</div> 
      <div  class ="td10">     <asp:DropDownList ID="ddlFunds"  runat="server" AutoPostBack="True" OnSelectedIndexChanged="btCha_Click">
                <asp:ListItem Selected="True">所有支付类别</asp:ListItem>
                <asp:ListItem>常规支付</asp:ListItem>
                <asp:ListItem>专项支付</asp:ListItem>
            </asp:DropDownList>
               &nbsp;
               <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btCha_Click">
               </asp:DropDownList>
            &nbsp;&nbsp;<asp:DropDownList ID="ddlDate" runat="server" AutoPostBack="True" onselectedindexchanged="btCha_Click">
                   <asp:ListItem>一个月内</asp:ListItem>
                   <asp:ListItem Selected="True">三个月内</asp:ListItem>
                   <asp:ListItem>半年内</asp:ListItem>
                   <asp:ListItem>一年内</asp:ListItem>
                   <asp:ListItem>所有</asp:ListItem>
               </asp:DropDownList>
               &nbsp;计划在
                   <asp:TextBox ID="tbDate" runat="server" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期"
                            Width="100px"></asp:TextBox>
               之前付款 
               <asp:Button ID="btCha" runat="server" Text="查询" OnClick="btCha_Click" />
          </div>
          <asp:Label ID="lbMessage" runat="server" ForeColor="Red" ></asp:Label>
		<asp:GridView ID="gvPayList" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" Width="100%" OnSelectedIndexChanging="gvPayList_SelectedIndexChanging" >
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>                        
                                     <asp:BoundField DataField="conid" HeaderText="采购单号" ReadOnly="True" />
                                     <asp:BoundField DataField="conname" HeaderText="项目名称" ReadOnly="True" />
                                     <asp:BoundField DataField="payorder" HeaderText="付款次序" ReadOnly="True" />
                                     <asp:BoundField DataField="planmoney" HeaderText="计划支付金额" ReadOnly="True" />
                                     <asp:BoundField DataField="plancumulativescale" HeaderText="累计比例(%)" ReadOnly="True" />
                                     <asp:BoundField DataField="planpaydate" HeaderText="计划支付日期" ReadOnly="True" />
                                     <asp:BoundField DataField="funds" HeaderText="支付类别" ReadOnly="True" />
                                     <asp:BoundField DataField="quotamoney" HeaderText="审批额度" ReadOnly="True" />                              
                                     <asp:CommandField HeaderText="查看" SelectText="查看" ShowSelectButton="True" />
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
        
          </asp:Panel>

         
            <!--这里添加内容 -->
      <asp:Panel ID="plPay" runat="server" Visible ="false" >
        <div style =" margin-top :20px;" >
             <div class =" lanmubiaoti ">    
                 <asp:Label ID="lbConId" runat="server" ></asp:Label>&nbsp;<asp:Label ID="lbTiTle" runat="server" ></asp:Label>&nbsp;</div> 
           <div class="row_title" runat ="server" id="divPlan" >付款计划：</div> 
                <asp:GridView ID="gvPayPlan" runat="server" AutoGenerateColumns="False"  Width ="500px"
                            BorderWidth="1px" CssClass="gv">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns> 
                                     <asp:BoundField DataField="payorder" HeaderText="付款次序" ReadOnly="True" />
                                     <asp:BoundField DataField="price" HeaderText="计划支付金额" ReadOnly="True" />
                                     <asp:BoundField DataField="cumulativescale" HeaderText="累计比例(%)" ReadOnly="True" />
                                     <asp:BoundField DataField="paydate" HeaderText="计划支付日期" ReadOnly="True" />
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
                 <div class="row_title" >支付明细：</div> 
		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" Width="100%" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" OnRowCreated="GridView1_RowCreated">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                  <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" />
                                <asp:BoundField DataField="conid" HeaderText="采购单号" ReadOnly="True" />
                                 <asp:BoundField DataField="conname" HeaderText="项目名称" ReadOnly="True" />
                                  <asp:BoundField DataField="funds" HeaderText="支付类别" ReadOnly="True" />
                                     <asp:BoundField DataField="payorder" HeaderText="付款次序" ReadOnly="True" />
                                     <asp:BoundField DataField="planmoney" HeaderText="计划支付金额" ReadOnly="True" />
                                     <asp:BoundField DataField="plancumulativescale" HeaderText="累计比例(%)" ReadOnly="True" />
                                     <asp:BoundField DataField="planpaydate" HeaderText="计划支付日期" ReadOnly="True"   />
                                     <asp:BoundField DataField="money" HeaderText="实际支付金额" ReadOnly="True"   />
                                     <asp:BoundField DataField="cumulativescale" HeaderText="累计比例(%)" ReadOnly="True" />
                                     <asp:BoundField DataField="docid" HeaderText="财务凭证号" ReadOnly="True" />
                                     <asp:BoundField DataField="payeddate" HeaderText="实际支付日期" ReadOnly="True" />                                    
                                     <asp:BoundField DataField="paynote" HeaderText="备注" ReadOnly="True" />
                                     <asp:BoundField DataField="state" HeaderText="状态" ReadOnly="True" />
                                     <asp:BoundField DataField="managername" HeaderText="管理人" ReadOnly="True" />
                                  <asp:TemplateField HeaderText="更新数据" ShowHeader="False">
                                      <ItemTemplate>
                                          <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select" Text="更新"></asp:LinkButton>
                                      </ItemTemplate>
                                  </asp:TemplateField>
                              
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>     </div>
      
    <asp:Panel ID="plUp" runat="server" Visible ="false" >
        <div>
项目总金额：<asp:Label ID="lbPrice" runat="server">0</asp:Label>
                        ，未支付金额：<asp:Label ID="lbOtherPrice" runat="server">0</asp:Label>
                        ，第<asp:Label ID="lbPayorderFinish" runat="server"></asp:Label>
                        次付款，支付状态：<asp:Label ID="lbPayState" runat="server" ></asp:Label>
&nbsp;<asp:Button ID="btDel" runat="server"  Text="删除" OnClick="btDel_Click"  onClientClick="return confirm('确认删除吗？')" />
                        <asp:Label ID="lbId" runat="server" Visible ="false" ></asp:Label>
                        <asp:Label ID="lbRowIndex" runat="server" Visible ="false" ></asp:Label>
                        <asp:Label ID="lbFunds" runat="server"></asp:Label>
        </div>
<table  style =" width :600px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
              
             
                <tr>
                    <td class="tabletd_center " style="width:60px" rowspan="3">
                        计划支付</td>
                    <td class="tabletd_center " style="width:80px">金额</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbplanMoney" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                     <td class="tabletd_center " style="width:80px">累计比例</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbplanCumulativescale" runat="server"></asp:Label>
                        %</td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">计划支付日期</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbplanPlanpayDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                     <td class="tabletd_center " style="width:60px" rowspan="4">实际支付</td>
                     <td class="tabletd_center " style="width:80px">金额</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbMoney" runat="server" MaxLength="25" Width="64px">0</asp:TextBox>
                  元 
                        <asp:Label ID="LbQuota" runat="server"></asp:Label>
                        &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbMoney" Display="Dynamic" 
                            ErrorMessage="金额不能为空。" ForeColor="Red" ValidationGroup="up"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">支付日期</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbPayDate" runat="server" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期"
                            Width="100px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="tbPayDate" Display="Dynamic" ErrorMessage="日期不能为空。" 
                            ForeColor="Red" ValidationGroup="up"></asp:RequiredFieldValidator>
                    </td>
                </tr>

                <tr>
                    <td class="tabletd_center " style="width:80px">财务凭证号</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbDocId" runat="server" MaxLength="48" Width="220px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbDocId" Display="Dynamic" ErrorMessage="财务凭证号不能为空。" ForeColor="Red" ValidationGroup="up"></asp:RequiredFieldValidator>
                    </td>
                </tr>

                <tr>
                  <td class="tabletd_center " style="width:80px">备注</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbPayNote" runat="server" MaxLength="48" Width="400px"></asp:TextBox>
                    </td>
                </tr>

                <tr>
                   <td  colspan="3" style ="text-align :center ;">
                       <asp:Button ID="btUp" runat="server" onclick="btUp_Click" Text="提交" ValidationGroup="up" />
                    </td> 
                </tr>

                </table>
      <div style ="text-align :right ;">
          <asp:Button ID="btBack" runat="server" Text="返回" OnClick="btBack_Click" /></div></asp:Panel>
<!--栏目结束 -->
</asp:Panel> 
          </asp:Panel> 
            </div>
            </div> 
        </form>
    </body>
</html>
