<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CgList.aspx.cs" Inherits="Web.cg.admin.CgList.CgList" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>OA标题页</title>
<link href="/css/admincss/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/css/popcalendar.js"></script>
</head>
<body>
    <form id="form1" runat="server" >
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
        <td   class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31px"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">系统设置</div></td>
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  <tr>
    <td style ="background :url(/css/admincss/images/mail_leftbg.gif); vertical-align :middle " >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >

   <!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                采购代理设置</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        
<div>
    <asp:Panel ID="pnApp" runat="server" Visible="true">   
          <div>
     <asp:DropDownList ID="ddlYears" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click"></asp:DropDownList>
    &nbsp;<asp:DropDownList ID="ddlMonth" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
                  <asp:ListItem Value="0">1-12月</asp:ListItem>
                  <asp:ListItem Value="01">1月</asp:ListItem>
                  <asp:ListItem Value="02">2月</asp:ListItem>
                  <asp:ListItem Value="03">3月</asp:ListItem>
                  <asp:ListItem Value="04">4月</asp:ListItem>
                  <asp:ListItem Value="05">5月</asp:ListItem>
                  <asp:ListItem Value="06">6月</asp:ListItem>
                  <asp:ListItem Value="07">7月</asp:ListItem>
                  <asp:ListItem Value="08">8月</asp:ListItem>
                  <asp:ListItem Value="09">9月</asp:ListItem>
                  <asp:ListItem Value="10">10月</asp:ListItem>
                  <asp:ListItem Value="11">11月</asp:ListItem>
                  <asp:ListItem Value="12">12月</asp:ListItem>
              </asp:DropDownList>
              &nbsp;采购方式：<asp:DropDownList ID="ddlBid" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
                        <asp:ListItem Selected="True">所有</asp:ListItem>
                        <asp:ListItem>直采</asp:ListItem>
                        <asp:ListItem>竞争性采购</asp:ListItem>
                        <asp:ListItem>申请人自行采购</asp:ListItem>
                    </asp:DropDownList>
                &nbsp;是否签订合同：<asp:DropDownList ID="ddlContract" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
                        <asp:ListItem Selected="True">所有</asp:ListItem>
                        <asp:ListItem>是</asp:ListItem>
                        <asp:ListItem>否</asp:ListItem>
                    </asp:DropDownList>
                &nbsp;是否维保：<asp:DropDownList ID="ddlMintenance" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
                        <asp:ListItem Selected="True">所有</asp:ListItem>
                        <asp:ListItem>是</asp:ListItem>
                        <asp:ListItem>否</asp:ListItem>
                    </asp:DropDownList>
                &nbsp;付款状况：<asp:DropDownList ID="ddlPay" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
                        <asp:ListItem Selected="True">所有</asp:ListItem>
                        <asp:ListItem>付清</asp:ListItem>
                        <asp:ListItem>未付</asp:ListItem>
                        <asp:ListItem>部分支付</asp:ListItem>
                    </asp:DropDownList>
              &nbsp;</div>
          <div>
           机构：<asp:DropDownList ID="DdlDepartment" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DdlDepartment_SelectedIndexChanged">
              </asp:DropDownList>
              &nbsp;
              采购人：<asp:DropDownList ID="ddlManager" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btnQuery2_Click">
              </asp:DropDownList>
              &nbsp; 申请人编号：<asp:TextBox ID="tbStaffid" runat="server"></asp:TextBox>
申请事由： <asp:TextBox ID="tbName" runat="server"></asp:TextBox>
           <asp:Button ID="btQuery2" runat="server" onclick="btnQuery2_Click" 
                  Text="提交查询" ValidationGroup="cha" />                                                          

          </div>

		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" onrowdatabound="GridView1_RowDataBound" 
                            
          onselectedindexchanging="GridView1_SelectedIndexChanging" Width="100%">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                 <asp:BoundField DataField="appiouid" HeaderText="申请编号" ReadOnly="True" />
                                  <asp:TemplateField HeaderText="采购事由(点击查看)" ShowHeader="False">
                                      <ItemTemplate>
                                          <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                                CommandName="Select" Text='<%# Bind("title") %>'></asp:LinkButton>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                <asp:BoundField DataField="budget" HeaderText="预估金额" ReadOnly="True" />
                                <asp:BoundField DataField="staffid" HeaderText="申请人编号" ReadOnly="True" />
                                <asp:BoundField DataField="staff" HeaderText="申请人姓名" ReadOnly="True" />
                                <asp:BoundField DataField="applicationdate" HeaderText="申请时间" ReadOnly="True" />
                                <asp:BoundField DataField="contract" HeaderText="是否签订合同" ReadOnly="True" />
                                <asp:BoundField DataField="bid" HeaderText="采购方式" ReadOnly="True" />
                                
                                <asp:BoundField DataField="maintenance" HeaderText="是否维保" ReadOnly="True" />
                                <asp:BoundField DataField="pay" HeaderText="付款比例(%)" ReadOnly="True" />
                                <asp:BoundField DataField="state" HeaderText="处理状态" ReadOnly="True" />
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
      </asp:Panel>
    <table border="0"  class ="tablezong"  cellpadding="0" cellspacing="0" id="tbList" runat ="server"  visible ="false" style="width :100%" >
      <tr>
        <td   style ="text-align :left ; padding :10px 10px 10px 10px" class ="tabletd_center ">
<table  style =" width :100%"    border = "0"  cellpadding ="0" cellspacing ="0">
                <tr>
                    <td style =" background-color :White " >
                                  <div class  ="divLinkButtonRight "> 
                <asp:HyperLink ID="hlPrint" runat="server" ImageUrl="/css/images/print.png" Target="_blank" >HyperLink</asp:HyperLink>
            </div>
                    <div style = " font-size :large ; font-weight :bold ; text-align :center;width :100%;  padding :20px 5px 20px 5px  " >
                        <asp:Label ID="lbTitle" runat="server" ></asp:Label></div>
                               <div style =" text-align :left; margin-bottom :10px ">申请单号：<asp:Label ID="lbAppiouid" runat="server"></asp:Label>
                        &nbsp;<asp:Button ID="btDel" runat="server" Text="删除"  onClientClick="return confirm('删除后不可恢复，请谨慎操作！')" OnClick="btDel_Click" />
                        </div>
                              <div style =" text-align :left; margin-bottom :10px  ">预估金额：<asp:Label ID="lbBudget" runat="server">0</asp:Label></div> 
                               <div style =" text-align :left; margin-bottom :10px  "> 申请人:<asp:Label ID="lbStaffid" runat="server"></asp:Label> &nbsp;<asp:Label ID="lbStaff" runat="server"></asp:Label></div> 
                               <div style =" text-align :left; margin-bottom :10px  ">申请时间：<asp:Label ID="lbApplicationdate" runat="server"></asp:Label></div> 
                               <div style =" text-align :left ; margin-bottom :10px ">
                                   采购方式：<asp:Label ID="lbBid" runat="server"></asp:Label>&nbsp;
                                   签订合同：<asp:Label ID="lbContract" runat="server"></asp:Label>&nbsp;
                                   维保：<asp:Label ID="lbMaintenance" runat="server"></asp:Label>&nbsp;
                                   付款比例：<asp:Label ID="lbPay" runat="server"></asp:Label>%&nbsp;
                                   处理状态：<asp:Label ID="lbState" runat="server"></asp:Label></div> 
</td>
                </tr>

                <tr>
                    <td  style =" padding :20px 5px 5px 5px" >
                        <asp:Label ID="lbFujian" runat="server" Text="附件："></asp:Label>
                        <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="LinkButton"  onclick="BulletedList1_Click"></asp:BulletedList>
                    </td>
                </tr>
    <tr>
                    <td >
       <div class="td_block">
                      <div class="row_title">
                        <asp:Label ID="lbCheckTitle" runat="server" Text="审核进度："></asp:Label>
           <asp:Label ID="lbCheckerCount" runat="server"  Visible ="false" >0</asp:Label>           
                        </div> 

                <asp:DataList ID="dlCheck" runat="server" Width="100%" OnItemDataBound="dlCheck_ItemDataBound" >
              <ItemTemplate>
         <div class=" row_pic ">
                    <asp:Image ID="Image1" runat="server" />
                   </div>

                <div>
                    <asp:Label ID="lbShow" runat="server" ></asp:Label>
                    <asp:Label ID="lbcheckername" runat="server" Visible ="false" Text='<%# Bind("checkername") %>'></asp:Label>
                    <asp:Label ID="lbcheckdecided" runat="server" Visible ="false" Text='<%# Bind("checkdecided") %>'></asp:Label> 
                    <asp:Label ID="lbchecknote"  runat="server" Visible ="false" Text='<%# Bind("checknote") %>'></asp:Label>
                    <asp:Label ID="lbchecktime" runat="server" Visible ="false"    Text='<%# Bind("checktime") %>'></asp:Label></div> 
                
                  <asp:Panel ID="plCheckOver" runat="server" Visible ="false" >
                     <div class="row_pic">
                    <asp:Image ID="Image2" runat="server" />
                   </div>
                      <div>审核结束</div>
                  </asp:Panel>
                  </ItemTemplate>
          </asp:DataList>
                            </div>
                    </td>
                </tr>
   <tr>
                    <td style=" text-align :center;  ">

                        <asp:Panel ID="plAppList" runat="server">
                     <div class="row_title">申请明细：</div> 
                        <asp:GridView ID="gvAppList" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" Width="100%">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                <asp:BoundField DataField="project" HeaderText="项目名称" ReadOnly="True" />
                                <asp:TemplateField HeaderText="数量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("number") %>'></asp:Label>
                                           <asp:Label ID="Label2" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="price" HeaderText="单价" ReadOnly="True" />
                                <asp:BoundField DataField="total" HeaderText="总价" ReadOnly="True" />
                                <asp:BoundField DataField="user" HeaderText="用途" ReadOnly="True" />
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
                        </asp:Panel>

                        <asp:Panel ID="plDirectprocurement" runat="server" Visible="false" >
                                                <div style =" text-align :left ; padding-top :30px; "> 采购清单：</div> 
                        <asp:GridView ID="gvDirectprocurement" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" Width="100%">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                <asp:BoundField DataField="project" HeaderText="需求项目" ReadOnly="True" />
                                <asp:TemplateField HeaderText="需求数量">
                                    <ItemTemplate>
                                        <asp:Label ID="lbnumber" runat="server" Text='<%# Bind("number") %>'></asp:Label>
                                           <asp:Label ID="lbunit" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="price" HeaderText="预估单价" ReadOnly="True" />
                                <asp:BoundField DataField="total" HeaderText="预估总价" ReadOnly="True" />
                                <asp:BoundField DataField="user" HeaderText="用途" ReadOnly="True" />
                                 <asp:BoundField DataField="factproject" HeaderText="实购项目" ReadOnly="True" />
                                 <asp:TemplateField HeaderText="实购数量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("factnumber") %>'></asp:Label>
                                        <asp:Label ID="lbfactunit_v" runat="server" Text='<%# Eval("factunit") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:BoundField DataField="factprice" HeaderText="实购单价" ReadOnly="True" />
                                
                                <asp:BoundField DataField="facttotal" HeaderText="实购总价" ReadOnly="True" />    
                                 <asp:BoundField DataField="state" HeaderText="完成状态" ReadOnly="True" />   
                
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
                        </asp:Panel>

                        <asp:Panel ID="plPay" runat="server" Visible="false" >
                                                <div style =" text-align :left ; padding-top :30px; "> 付款详情：</div> 
                        <asp:GridView ID="gvPay" 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: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="money" HeaderText="实际支付金额" ReadOnly="True" />
                                     <asp:BoundField DataField="cumulativescale" HeaderText="累计比例(%)" ReadOnly="True" />
                                     <asp:BoundField DataField="payeddate" 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>
                        </asp:Panel>
                    </td>
                </tr>
                
                <tr>
                    <td style=" text-align :center; height :30px">
                        <asp:HyperLink ID="hlbid" runat="server" Target="_blank"  CssClass="button" >竞争性采购资料查看</asp:HyperLink>
                        <asp:HyperLink ID="hlcontacts" runat="server" Target="_blank"  CssClass="button" >合同查看</asp:HyperLink>
                        <asp:HyperLink ID="hlpm" runat="server" Target="_blank"  CssClass="button" >实施记录</asp:HyperLink>
                        <asp:HyperLink ID="hlpmcheck" runat="server" Target="_blank"  CssClass="button" >验收查看</asp:HyperLink>
                        <asp:HyperLink ID="hlmaintenance" runat="server" Target="_blank"  CssClass="button" >维保查看</asp:HyperLink>
        
                    </td>
                </tr>
                <tr>
                    <td style=" text-align :center; height :30px">
                        <asp:Button ID="btBack" runat="server" onclick="btBack_Click" Text="返回" />
         
                    </td>
                </tr>
            </table>
        
</td>
      </tr>
    </table>
    </div> </td></tr>

             </table>
<!-- 一组内容模块结束 -->
  
    </td>
    <td  style =" background-image:url(/css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
<td  class ="buttom_bg_left "></td>
  <td   class ="buttom_bg_center " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>