<%@ Page Title="" Language="C#" MasterPageFile="~/bps/bps.Master" AutoEventWireup="true" CodeBehind="quote_detail.aspx.cs" Inherits="bps.bps.quote_detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">




     <div style="margin-left:10px">

  

     <h1  class="border-active subnav" > 报价单   </h1>
 
   

        <div style=" margin-right:20px; margin-bottom:10px; padding-bottom:10px; ">

               <b class="_status">  当前状态： <asp:Label runat="server" ID="lbl_status"></asp:Label> </b>

            <a href="quote_edit.aspx?id=<%=id %>" style="float:right"  class="btn btn-success btn-sm" >编辑</a>
        </div>

    <asp:FormView runat="server" ID="fv_detail"  RenderOuterTable="false"  EnableViewState="false">
        <ItemTemplate>

           


            
                   <table class="table    table-bordered "  >

                       <tr>

                           
                           <td width="100px" class="active">报价单号</td>
                           <td width="200px">
                               <%#Eval("quotecode") %>
                            </td>


                                <td width="100px" class="active">成品名称</td>
                           <td width="200px">
                               <%#Eval("productname") %>
                            </td>


                                <td width="100px" class="active">成品编号</td>
                           <td width="200px">
                               <%#Eval("productcode") %>
                            </td>

                          

                           </tr>


                        <tr>

                           
                               <td  class="active" >报价单版本 </td>
                           <td  >
                                   <%#Eval("revision") %>
                            </td>


                           <td   class="active">销售人</td>
                           <td >
                               <%#Eval("sellname") %>
                            </td>

                                <td  class="active">报价日期</td>
                           <td  >
                               <%# DtHelper.FormatDt(Eval("quotedate")) %>
                            </td>


                           </tr>





                       
                        <tr>

                           
                           <td   class="active">建立人</td>
                           <td >
                               <%#Eval("opname") %>
                            </td>

                                <td  class="active">建立时间</td>
                           <td  >
                               <%# DtHelper.FormatDtShort(Eval("opdate")) %>
                            </td>

                               <td  > </td>
                           <td  >
                                
                            </td>

                           </tr>

                       <tr>
                           <td colspan="6">

                           </td>
                       </tr>


                         <tr>

                             
                                <td  class="active">客户名称</td>
                           <td  >
                               <%#Eval("customername") %>
                            </td>

                           
                           <td   class="active">客户代号</td>
                           <td >
                               <%#Eval("customercode") %>
                            </td>


                               <td class="active" > 原料价格 </td>
                           <td  >
                                 <%#Eval("materialfee") %> RMB
                            </td>

                           </tr>






                         <tr>

                             
                                <td  class="active">订购量</td>
                           <td  >

                              <%#Eval("quantity") %>

                            </td>

                           
                           <td   class="active">单位</td>
                           <td >
                                  <%#Eval("piece") %> 

                            </td>


                               <td  class="active" > 成品价格 </td>
                           <td  >
                                 <%#Eval("price") %> RMB
                            </td>

                           </tr>

                        
                       
                       
                         <tr>  
                           <td  class="active">成品说明</td>
                           <td  colspan="5" >
                               <%#Eval("note") %>
                            </td>  
                           </tr>




                       </table>


        </ItemTemplate>

    </asp:FormView>



        




        
               <br />
               <br />



           <asp:GridView runat="server" ID="gv_items" style=" border-collapse:collapse"  
          GridLines="None" CssClass="table table-bordered table-hover detail" 
          ShowFooter="true"
              onrowdatabound="gv_applist_RowDataBound"  
         AutoGenerateColumns="False" DataSourceID="sds" DataKeyNames="id" >

         <Columns>
            
          
            <asp:BoundField DataField="ItemCode" HeaderText="子件编号" ReadOnly="true"  HeaderStyle-Width="90px"/>
            <asp:BoundField DataField="ItemName" HeaderText="子件名称"  ReadOnly="true"  HeaderStyle-Width="160px"/>
 
            <asp:BoundField DataField="spec" HeaderText="规格" ReadOnly="true"  HeaderStyle-Width="180px"/>
 
               <asp:BoundField DataField="MPN" HeaderText="厂商号" ReadOnly="true"  HeaderStyle-Width="150px"/>

             <asp:BoundField DataField="Manufacturer" HeaderText="制造商" ReadOnly="true"  HeaderStyle-Width="100px"/>
           
         
                <asp:BoundField DataField="EnvProject" HeaderText="是否环保"  ReadOnly="true"  HeaderStyle-Width="150px"/>

                     
             <asp:BoundField DataField="uom" HeaderText="单位" ReadOnly="true"  HeaderStyle-Width="80px"/>


             
              <asp:BoundField DataField="supplycode" HeaderText="供应商号" HeaderStyle-Width="80px"/> 

             <asp:BoundField DataField="supplyname" HeaderText="供应商名" HeaderStyle-Width="80px"/> 

              
          
             <asp:BoundField DataField="LeadTime" HeaderText="LeadTime" HeaderStyle-Width="100px"/>

          


              <asp:BoundField DataField="quantity" HeaderText="数量" DataFormatString="{0:N2}" HeaderStyle-Width="130px"/> 

            
             <asp:BoundField DataField="currency" HeaderText="货币" HeaderStyle-Width="80px"/>

                 <asp:BoundField DataField="price" HeaderText="报价价格" DataFormatString="{0:N2}" HeaderStyle-Width="80px"/>

             
                 <asp:BoundField DataField="subtotal" HeaderText="合计" DataFormatString="{0:N2}" HeaderStyle-Width="120px"/>

                 
              
           
         </Columns>





     </asp:GridView>

    
     
     
     



       








           <asp:SqlDataSource runat="server" ID="sds"
               
                ConnectionString="<%$ConnectionStrings:ConnectionString %>"
              
                SelectCommand=" select *, quantity*price as subtotal from purchase_quote_items where quoteid=@quoteid"
               >
               <SelectParameters>
                   <asp:QueryStringParameter Name="quoteid" QueryStringField="id" />

               </SelectParameters>


           </asp:SqlDataSource>

       
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
    

          <br /><br />
  <h4 class="border-active subnav" >审批流程    <a href="###"  onclick="showFlow()">查看流程</a>


      
    <div id="flow" style="display:none">
      &nbsp;&nbsp;&nbsp;&nbsp;  <asp:Label runat="server" ID="lbl_flow"></asp:Label>
    </div>










      
        <script>
            function showFlow() {
                layer.open({
                    type: 1,
                    skin: 'layui-layer-rim', //加上边框
                    area: ['700px', '250px'], //宽高
                    content: "<br><br> " + $("#flow").html()
                });

            }

        </script>
  </h4>




      

    <table  class="table table-bordered" >
        <tbody>
       
      
      <tr  >     
           <th  width="100px">销售人员 </th>

           <th  width="100px">申请人</th>

          
          <th  width="100px">审核人</th>
          <th width="100px">确认人</th> 
        </tr>
             
  


              <tr>
                   <td style="height:100px;">
                        <asp:Label runat="server" ID="lbl_notedesign"></asp:Label>
                  </td>
              <td >
                   <asp:Label runat="server" ID="lbl_noteapp"></asp:Label>
                </td>

                 <td>
                         <asp:Label runat="server" ID="lbl_noteaudit1"></asp:Label>
                </td>


                 <td>
                      <asp:Label runat="server" ID="lbl_noteaudit2"></asp:Label>
                </td>

              
 
            </tr>

  </tbody>
  </table>
 













         
         
         
         
         
         
         
         
         
         
         
         
         
                

</div>
    























</asp:Content>
