<%@ Page Title="" Language="C#" MasterPageFile="~/bps/basic.Master" ClientIDMode="Static" AutoEventWireup="true" CodeBehind="mat_sup_relation_add.aspx.cs" Inherits="bps.bps.mat_sup_relation_add" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../javascript/layer/layer.js"></script>
               
    <script>


        function Pop(_src, _width, _height, _title) {
            if (!_width) {
                _width = 500;
            }

            if (!_height) {
                _height = 380;
            }

            if (!_title) {
                _title = "信息说明";
            }


            layer.open({
                type: 2,
                title: null,
                shadeClose: true,
                shade:1,
                area: [_width + 'px', _height + 'px'],
                content: _src
            });

        }

    </script>
     <style>
        table.add th {
         font-weight:normal; text-align:right
        }
    </style> 


        <asp:Panel runat="server" ID="pnl_rotate">
 
   <asp:TextBox ID="sname" ClientIDMode="Static"   Visible="false"  runat="server"></asp:TextBox>  
    
    
          <table class="table add table-condensed" style=""  >
        
           
         
         
           <tr>      
     
             <th width="150px"><%=isen?"Item Code":"原料号" %> <font color=red>*</font> </th>
             <td  >

                 <div class="input-group">
                

             <asp:TextBox ID="mcode" ClientIDMode="Static"    class="form-control"  runat="server"></asp:TextBox>  
                 
 <span class="input-group-addon">
    <a href="###"  onclick="Pop('pop_simple_material.aspx',700,500,'选择原料'); return false;"><i class="glyphicon glyphicon-leaf"></i>

    </a>

</span>
                     </div>
                 
                 
                  <asp:RequiredFieldValidator ControlToValidate="mcode" ForeColor="Red" ID="RequiredFieldValidator2" runat="server" ErrorMessage="商户名不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>

            </td>
            
            <th width="120px"><%=isen?"Vendor Number":"供应商号V.Nr" %> <font color=red>*</font> </th>

               <td>



                           
<div class="input-group">
        
        
               <asp:TextBox ID="scode" ClientIDMode="Static"    class="form-control"  runat="server"></asp:TextBox>  
               

  
<span class="input-group-addon">
    <a href="###"  onclick="Pop('pop_supply.aspx',700,500,'选择供应商'); return false;"><i class="glyphicon glyphicon-user"></i>

    </a>

</span>
	 
   </div>



 <asp:RequiredFieldValidator ControlToValidate="scode" ForeColor="Red" ID="RequiredFieldValidator1" runat="server" ErrorMessage="商户号不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>


               </td>

            </tr>








                
         
           <tr>      
     
             <th width="150px"><%=isen?"Price":"价格" %> <font color=red>*</font> </th>
             <td  >
             <asp:TextBox ID="price" ClientIDMode="Static"   class="form-control"  runat="server"></asp:TextBox>  
                <asp:RequiredFieldValidator ControlToValidate="price" ForeColor="Red" ID="RequiredFieldValidator3" runat="server" ErrorMessage="商户名不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>

            </td>
            
            <th width="120px"><%=isen?"Currency":"货币" %> <font color=red>*</font> </th>

               <td>

            <asp:DropDownList runat="server" ID="ddl_currency" CssClass="form-control"></asp:DropDownList>   

               </td>

            </tr>




              <tr>
                  <th>备注</th>
                  <td colspan="3">
                      <asp:TextBox runat="server" ID="note" CssClass="form-control" ></asp:TextBox>

                  </td>
              </tr>


               <tr>

                                <td colspan="4" style="text-align:center">
                                    <asp:Button ID="btn_add" runat="server" Text="添加"  ValidationGroup="Add" 
                                        class="btn btn-primary btn-flat btn-sm " onclick="btn_add_Click" /> 
                                     

                                 </td>
                            </tr> 
              </table>
           
            
            
            
            
            
            
             </asp:Panel>




    <script>
        function setSupply(_k)
        {
            $("#scode").val(_k.split('$')[0]);
        }

        function setMaterial(_k) {
            $("#mcode").val(_k.split('$')[0]);
        }

        

    </script>
</asp:Content>
