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

<!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="plList" runat="server">

      <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="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" CssClass ="textbox20" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期"
                            Width="100px"></asp:TextBox>
               之前付款 
               <asp:Button ID="btCha" runat="server" Text="查询" OnClick="btCha_Click" />
          </div>
      
              <div class =" lanmubiaoti ">已提交的付款计划</div>
                      
                             <asp:GridView ID="gvPayList" runat="server" AutoGenerateColumns="False" BorderWidth="1px" CssClass="gv"  OnSelectedIndexChanging="gv1_SelectedIndexChanging" Width="100%">
                                 <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" />
                                 </Columns>
                                 <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                             </asp:GridView>
         <div class =" lanmubiaoti ">待付款项目清单</div> 
        <div style =" margin-top :20px;">
                <asp:GridView ID="gv1" runat="server" AutoGenerateColumns="False" BorderWidth="1px" CssClass="gv" onselectedindexchanging="gv1_SelectedIndexChanging" Width="100%">
                    <RowStyle BorderWidth="1px" CssClass="gvrow" />
                    <Columns>
                        <asp:BoundField DataField="department" HeaderText="机构名称" ReadOnly="True" />
                        <asp:BoundField DataField="appiouid" HeaderText="采购编号" ReadOnly="True" />
                        <asp:BoundField DataField="title" HeaderText="项目名称" ReadOnly="True" />
                        <asp:BoundField DataField="contractprice" HeaderText="合同金额" ReadOnly="True" />
                        <asp:BoundField DataField="checkdate" HeaderText="验收日期" ReadOnly="True" />
                        <asp:BoundField DataField="finalprice" HeaderText="结算金额" ReadOnly="True" />
                        <asp:BoundField DataField="funds" HeaderText="支付类别" ReadOnly="True" />
                        <asp:BoundField DataField="payedprice" HeaderText="已付金额" ReadOnly="True" />
                        <asp:BoundField DataField="pay" HeaderText="已付比例（%）" ReadOnly="True" />
                        <asp:BoundField DataField="planprice" HeaderText="应付金额" ReadOnly="True" />
                        <asp:BoundField DataField="planCumulativescale" HeaderText="应付比例（%）" ReadOnly="True" />
                        <asp:BoundField DataField="planDate" HeaderText="应付日期" ReadOnly="True" />
                        <asp:CommandField HeaderText="操作" SelectText="添加付款计划" ShowSelectButton="True" />
                    </Columns>
                    <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                </asp:GridView>
        
            </div>
        
          </asp:Panel>
     
         
            <!--这里添加内容 -->
           <asp:Panel ID="Panel1" runat="server" Visible ="false" >
                   <div class="row_title" runat ="server">
        <asp:Label ID="lbIouid" runat="server" ></asp:Label>  <asp:Label ID="lbTitle" runat="server"></asp:Label>付款详情&nbsp; <asp:Button ID="btBack" runat="server" Text="返回" OnClick="btBack_Click"/></div> 
		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  
                            BorderWidth="1px" CssClass="gv" Width="100%" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                     <asp:BoundField DataField="id" HeaderText="id" 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="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="Delete" Text="删除"  onClientClick="return confirm('确认删除吗？')" ></asp:LinkButton>
                                      </ItemTemplate>
                                  </asp:TemplateField>
                              
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
          <div style ="text-align :right ;"> <asp:Button ID="btPayPrint" runat="server" Text="打印付款进度表" OnClick="btPayPrint_Click" Visible ="false"  /></div>


       <div class="row_title" runat ="server" id="divPlan" >付款计划：</div> 
      <asp:GridView ID="gvPayPlan" runat="server" AutoGenerateColumns="False"  Width ="480px"
                            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">付款申请提交：       <asp:Label ID="lbApp" runat="server" ForeColor="Red"></asp:Label></div> 
      <table  style =" width :480px" border = "1" class ="table " cellpadding ="0" cellspacing ="0" id="table_AddPay" runat ="server" >
                <tr>
                    <td class="tabletd_left " colspan="2">总付款额：<asp:Label ID="lbPrice" runat="server">0</asp:Label>&nbsp;剩余付款额：<asp:Label ID="lbOtherPrice" runat="server">0</asp:Label>
                        &nbsp;第<asp:Label ID="lbPayorder" runat="server"></asp:Label>次付款</td>
                </tr>
              

                <tr>
                    <td class="tabletd_right " style="width:80px">
                        计划支付日期</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbplanPlanpay" runat="server" CssClass ="textbox20" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期"
                            Width="100px" AutoPostBack="True" OnTextChanged="tbplanPlanpay_TextChanged"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                            ControlToValidate="tbplanPlanpay" Display="Dynamic" ErrorMessage="日期不能为空。" 
                            ForeColor="Red" ValidationGroup="AddNotice"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                             
                <tr>
                    <td class="tabletd_right " style="width:80px">
                        计划支付金额</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbplanMoney" runat="server" MaxLength="25" Width="120px" CssClass ="textbox20" >0</asp:TextBox>
                        元<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                            ControlToValidate="tbplanMoney" Display="Dynamic" ErrorMessage="金额不能为空。" 
                            ForeColor="Red" ValidationGroup="AddNotice"></asp:RequiredFieldValidator>
                      <div><asp:Label ID="lbPayNote" runat="server"></asp:Label></div> 
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">&nbsp;</td>
                    <td class="tabletd_left ">
                     <asp:Button ID="btAddNotice" runat="server" onclick="btAddNotice_Click" Text="提交" ValidationGroup="AddNotice" />
                    </td>
                </tr>

                </table>
 
      
      
      
      
      
      

      
<!--栏目结束 -->
</asp:Panel> 
            </div>
            </div> 
        </form>
    </body>
</html>




