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

<!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">
               <div  class ="td10">
                       额度剩余：<asp:Label ID="LbBalance" runat="server">0</asp:Label>元</div>

  <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="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" OnRowCreated="gvPayList_RowCreated" >
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                           <asp:BoundField DataField="department" HeaderText="申请机构" ReadOnly="True" />
                                <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:CommandField HeaderText="操作" SelectText="额度分配" ShowSelectButton="True" />
                                     <asp:BoundField DataField="id" HeaderText="id" ReadOnly="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="lbDepartment" runat="server"></asp:Label>
                 &nbsp;<asp:Label ID="lbConId" runat="server"></asp:Label>
                 &nbsp;<asp:Label ID="lbTiTle" runat="server" ></asp:Label><asp:Label ID="LbId" runat="server" Visible ="false" ></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%">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                  <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" />
                                <asp:BoundField DataField="conid" HeaderText="采购单号" ReadOnly="True" />
                                <asp:TemplateField HeaderText="项目名称" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbtConname" runat="server" CausesValidation="False" 
                                            CommandName="Select" Text='<%# Bind("conname") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                     <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="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" />
                      
                              
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>     </div>
        <div style="width:100%; text-align :left;">

项目总金额：<asp:Label ID="lbPrice" runat="server">0</asp:Label>
                        ，未支付金额：<asp:Label ID="lbOtherPrice" runat="server">0</asp:Label>
                        ，本次计划支付<asp:Label ID="LbMoney" runat="server"></asp:Label>元，允许支付<asp:TextBox ID="TbMoney" runat="server" Width="150px"></asp:TextBox>
                        元&nbsp;<asp:Button ID="btUp" runat="server" onclick="btUp_Click" Text="提交" ValidationGroup="up" />
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TbMoney" Display="Dynamic" ErrorMessage="金额不能为空。" ForeColor="Red" ValidationGroup="up"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator20" runat="server" 
                                                ControlToValidate="TbMoney" 
                        Display="Dynamic" ErrorMessage="请输入数字。" 
                                                
                        ValidationExpression="^[+-]?\d+(\.\d+)?$" 
                                                ValidationGroup="up" ForeColor="Red"></asp:RegularExpressionValidator>

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