<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EnAdminProManager.aspx.cs" MasterPageFile="../../MasterPage/Default.Master" Inherits="LJCMS.Admin.en.Products.EnAdminProManager" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Page.ResolveUrl("~/") %>Admin/inc/FineMessBox/css/subModal.css" />

    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>Admin/inc/FineMessBox/js/common.js"></script>

    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>Admin/inc/FineMessBox/js/subModal.js"></script>

    <table style="width:100%">
        <tr>
            <td>
                <DataLayerWebControls:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server"
                    HeadTitleTxt="">
                    <DataLayerWebControls:HeadMenuButtonItem ButtonPopedom="List" ButtonUrl="EnPro.aspx"
                        ButtonUrlType="Href" ButtonVisible="True" ButtonName="产品" />
                </DataLayerWebControls:HeadMenuWebControls>
                <DataLayerWebControls:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
                    <DataLayerWebControls:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="基本信息">
                        <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                            <tr>
                                <td class="table_body">
                                    产品类别</td>
                                <td class="table_none">
                                    <asp:HiddenField ID="HFProClassId" runat="server" />
                                    <asp:TextBox ID="ProClassId_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                    <input type="button" value="选择分类" id="button3" name="buttonselect" onclick="javascript:ShowDepartID()"
                                        class="cbutton"/>
                                    <input type="button" value="清除" onclick="javascript:ClearSelect();" class="cbutton" />
                                </td>
                            </tr>

                            <tr>
                                <td class="table_body">
                                    产品短名称</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProShortName_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    产品的编号</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProNum_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    产品现有库存</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProGuChun_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    选项</td>
                                <td class="table_none">
                                    <asp:CheckBox ID="ProIsUp_Input" runat="server" Text="上架" />
                                    <asp:CheckBox ID="ProIsRec_Input" runat="server" Text="推荐" />
                                 
                                   
                                    <asp:CheckBox ID="ProIsNew_Input" runat="server" Text="新品" />
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    浏览量</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProLookCount_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    排序</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProSortOrder_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    角色查看（用","分开）</td>
                                <td class="table_none">
                                    <asp:Literal ID="LiProRole" runat="server"></asp:Literal>
                                </td>
                            </tr>
   
                            <tr>
                                <td class="table_body">
                                    自定义属性
                                </td>
                                <td class="table_none">
                                    <asp:TextBox ID="Num" Text="0" size="5" CssClass="text_input" runat="server" /><input
                                        name="SetTB" class="cbutton" id="SetTB" value="设置" onclick="num_1()" type="button"
                                         />
                                    <input name="addTB" id="addTB" class="cbutton" type="Button" onclick="num_1_1()"
                                        value="增加一个" /> <br />
                                    <span id="Num_Str" name="NumStr">
                                        <asp:Literal ID="aspLit" runat="server"></asp:Literal>
                                    </span>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    产品更新日期</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProAddDate_Input" runat="server" CssClass="text_input" onfocus="javascript:HS_setDate(this);"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    产品详细介绍</td>
                                <td class="table_none">
                                    <FCKeditorV2:FCKeditor ID="ProContent_Input" runat="server" Height="500px">
                                    </FCKeditorV2:FCKeditor>
                                </td>
                            </tr>
                        </table>
                    </DataLayerWebControls:TabOptionItem>
                    <DataLayerWebControls:TabOptionItem ID="TabOptionItem6" runat="server" Tab_Name="产品价格">
                        <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                            <tr>
                                <td class="table_body">
                                    市场价格</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProPrice_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    商城价格</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProPPice_Input" runat="server" CssClass="text_input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    会员价格</td>
                                <td class="table_none">
                                    <asp:Literal ID="LiUR" runat="Server"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                    </DataLayerWebControls:TabOptionItem>
                    <DataLayerWebControls:TabOptionItem ID="TabOptionItem2" runat="server" Tab_Name="产品图片">
                        <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                            <tr>
                                <td class="table_body">
                                    产品大图</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProBigPic_Value" runat="server" CssClass="text_input" Width="300px"></asp:TextBox>
                                    <input id="Button1" type="button" runat="server" class="button_bak" value="上传大图" style="cursor: pointer"
                                        onclick="javascript:showPopWin('上传产品图片','../../UploadPic.aspx?'+rand(10000000), 300, 150, AlertMessageBox,true);" />
                                </td>
                            </tr>
                        </table>
                    </DataLayerWebControls:TabOptionItem>
                 
                    <DataLayerWebControls:TabOptionItem ID="TabOptionItem5" runat="server" Tab_Name="搜索优化">
                        <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                            <tr>
                                <td class="table_body">
                                    产品关键字</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProKey_Input" runat="server" CssClass="text_input" Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    产品说明</td>
                                <td class="table_none">
                                    <asp:TextBox ID="ProDescp_Input" runat="server" CssClass="text_input" TextMode="MultiLine"
                                        Width="300px" Height="100px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </DataLayerWebControls:TabOptionItem>
                </DataLayerWebControls:TabOptionWebControls>
                <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" id="PostButton"
                    runat="server">
                    <tr>
                        <td align="right">
                            <asp:Button ID="Button2" runat="server" CssClass="button_bak" Text="确定" OnClick="Button1_Click" />
                            <input id="Reset1" class="button_bak" type="reset" value="重填" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <script type="text/javascript">


function num_1_1()
{
	var num_1=document.all.<%= this.Num.ClientID %>.value;
	var num_str=document.getElementById("Num_Str");
	var str="";
	str+="<span>属性：<input id='ProAtt"+(parseInt(num_1)+1)+"' type='text' name='ProAtt"+(parseInt(num_1)+1)+"' />";
	str+="值：<input id='ProAttValue"+(parseInt(num_1)+1)+"' type='text' name='ProAttValue"+(parseInt(num_1)+1)+"'/></span><br/>";
	num_str.innerHTML=num_str.innerHTML+str;
	document.all.<%= this.Num.ClientID %>.value=(parseInt(num_1)+1);
}
function num_1()
{
    var num_1=document.all.<%= this.Num.ClientID %>.value;
	var num_str=document.getElementById("Num_Str");
	var str="";
	for(var i=0;i<num_1;i++)
	{
	str+="属性：<input id='ProAtt"+(parseInt(i)+1)+"' type='text' name='ProAtt"+(parseInt(i)+1)+"' />";
	str+="值：<input id='ProAttValue"+(parseInt(i)+1)+"' type='text' name='ProAttValue"+(parseInt(i)+1)+"'/><br/>";
	}
	num_str.innerHTML=str;
	
}   

      
    rnd.today=new Date(); 

    rnd.seed=rnd.today.getTime(); 

    function rnd() { 

　　　　rnd.seed = (rnd.seed*9301+49297) % 233280; 

　　　　return rnd.seed/(233280.0); 

    }; 

    function rand(number) { 

　　　　return Math.ceil(rnd()*number); 

    }; 

    // end central randomizer. --> 
    function AlertMessageBox(file_name)
    {
       
          if (file_name!=undefined){
	            var ShValues = file_name.split('||');
	            if (ShValues[1]!=0)
	            {
	                document.all.<%=this.ProBigPic_Value.ClientID %>.value=ShValues[0];
	            }            
	        }
    }
    function ShowDepartID()
        {
            showPopWin('选择产品分类','EnProTree.aspx?'+rand(10000000), 215, 255, AlertClassBox,true,true)
        }
    function AlertClassBox(file_name)
    {
       
             if (file_name!=undefined){
	            var ShValues = file_name.split('||');
	            if (ShValues[1]!=0)
	            {
	                document.all.<%=this.ProClassId_Input.ClientID %>.value=ShValues[0];
	                document.all.<%=this.HFProClassId.ClientID %>.value=ShValues[1];
	            }            
	        }
    }
            function ClearSelect()
        {
   	        document.all.<%=this.ProClassId_Input.ClientID %>.value="";
            document.all.<%=this.HFProClassId.ClientID %>.value="";
        }
       
    </script>

</asp:Content>
