<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/admin/admin_page.master"
    AutoEventWireup="true" CodeBehind="product_info_edit.aspx.cs" Inherits="YXShop.Web.admin.product.product_info_edit" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="../style/validator.css" type="text/css" />

    <script type="text/javascript" src="../../scripts/validate.js"></script>

    <script type="text/javascript" src="../../scripts/prototype.js"></script>

    <script type="text/javascript" src="../scripts/public.js"></script>

    <script type="text/javascript" src="../scripts/product.js"></script>

    <script type="text/javascript" src="../../scripts/calendar.js"></script>

    <link rel="stylesheet" href="../style/dtree.css" type="text/css" />

    <script type="text/javascript" src="../scripts/dtree.js"></script>

    <style>
        #fileLists
        {
            height: 200px;
            width: 247px;
            overflow: auto;
        }
    </style>

    <script type="text/javascript">
        var filelist=new Array();
        var objectC;
        function GetFile(control)
        {
            var y=control.offsetTop; 
            var x=control.offsetLeft; 
             
            objectC=control;
            while(control=control.offsetParent)
            {
                y+=control.offsetTop; 
                x+=control.offsetLeft;
            } 
            obj=$("fileLists");
            obj.style.visibility="visible";
            obj.style.left=x;
            obj.style.top=y+22;
        }
        function GetFileUrl(value)
        {
            var va="";
            if(typeof(value)!="undefined")
            {
                va=value;
            }
            objectC.value=va;
            $("fileLists").style.visibility="hidden";
            
        }
    
    function ProductShowTabs(id,num)
    {
        var tab;
        for(var i=0;i<num;i++)
        {
            tab=$("ctl00_workspace_tab"+i);
            if(id==9)
            {
                if(i==id)
                {
                    $("ctl00_workspace_TabTitle"+i).className="titlemouseover";
                }
                else
                {
                    $("ctl00_workspace_TabTitle"+i).className="tabtitle";
                }
                tab.style.display='block';
            }
            else
            {
                if(i==id)
                {
                    $("ctl00_workspace_TabTitle"+i).className="titlemouseover";
                    tab.style.display='block';
                }
                else
                {
                    $("ctl00_workspace_TabTitle"+i).className="tabtitle";
                    tab.style.display='none';
                }
            }
        }
    } 
    
    //加载配件
   function LoadSparepart()
   {
        var sparepartCount=document.getElementById("<%=hfSparepartGroup.ClientID %>").value;
        var param = "Option=Sparepart&Count="+sparepartCount+"&ID=1";
        var options = 
        { method: 'post',parameters: param,onComplete:
             function(transport)
             {
                 var retv = transport.responseText;
                 if(retv!="")
                 {
                   var content=document.getElementById("<%=SparepartContent.ClientID %>").innerHTML;
                   document.getElementById("<%=hfSparepartGroup.ClientID %>").value=parseInt(sparepartCount)+1;
                   if(content!="")
                   {
                      document.getElementById("<%=SparepartContent.ClientID %>").innerHTML+=retv; 
                   }
                   else
                   {
                       document.getElementById("<%=SparepartContent.ClientID %>").innerHTML=retv;
                   }
                 }
             }
        }
        new Ajax.Request('product_info_edit.aspx', options);
   }
   
   function DelSparepartGroup(id)
   {
        document.getElementById("SparepartGroupCount"+id).innerHTML="";
   }
   function getValue(value,sparepartId)
   {
        if(value!="") 
        {
            document.getElementById("SparepartProduct"+sparepartId).innerHTML=value;
        }
   }
   //删除配件商品
   function delSparepartProductId(delProductId,sparepartId)
   {
        var newProductId="";
        var productId=document.getElementById("hfProductSparepartID"+sparepartId).value;
        var proIdArray=productId.split(',');
        for(var i=0;i<proIdArray.length;i++)
        {
            if(proIdArray[i]!=delProductId)
            {
               if(newProductId!="")
               {
                   newProductId+=","+proIdArray[i]
               }
               else
               {
                   newProductId=proIdArray[i];
               }
            }
        }
        if(newProductId!="")
        {
            var param = "Option=SpareartProduct&SparepartId="+sparepartId+"&id=" + newProductId;
            var options = 
            { method: 'post',parameters: param,onComplete:
                 function(transport)
                 {
                     document.getElementById("hfProductSparepartID"+sparepartId).value=newProductId;
                     var retv = transport.responseText;
                     getValue(retv,sparepartId);
                 }
            }
            new Ajax.Request('../include/sparepartproduct.aspx', options);
        }
        else
        {
            document.getElementById("SparepartProduct"+sparepartId).innerHTML="";
        }
   }
   //删除规格
   function CloseSpecifications()
   {
        var param = "Option=Specifications&ID=1";
        var options = 
        { method: 'post',parameters: param,onComplete:
             function(transport)
             {
                 var retv = transport.responseText;
                 if(retv!="")
                 {
                      document.getElementById("Specifications").innerHTML=retv;
                      document.getElementById("<%=isStartspecification.ClientID %>").value="0";
                 }
             }
        }
        new Ajax.Request('product_info_edit.aspx', options);
   }
   function StartSP()
   {
       document.getElementById("<%=isStartspecification.ClientID %>").value="1";
   }
   //删除规格值
   function DelSpecificationRow(id)
   {
        //获得表格对象
        var tb=document.getElementById('SpecificationTable');
        //根据id获得将要删除行的对象
        var tr=document.getElementById('trSpeRows'+id);
        //取出行的索引，设置删除行的索引
        tb.deleteRow(tr.rowIndex);
        if(tb.rows.length==1)
        {
            CloseSpecifications();
        }
   }
    /*自动生成缩略图*/
    function chengeBreviary()
    {
        document.getElementById("<%=fuSmallImages.ClientID%>").disabled=(document.getElementById("<%=cbBreviary.ClientID%>").checked)?"disabled":"";
    }
    /*添加相片*/
    function addFile()
    {   
        var str = ' <table  class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td>本地图片：<input type="file" name="File" runat="server" /></td><td>描述：<input name="description" type="text" value="" maxlength="200" /></td></tr></table>'
        document.getElementById("MyFile").insertAdjacentHTML("beforeEnd",str);   
    }   
    function DelProAlbum(id)
    {
        var param = "Option=delAlbum&ID="+ id;
        var options={
            method:'post',
            parameters:param,
            onComplete:
            function(transport)
	        {
                 var retv=transport.responseText;
                 document.getElementById("spanJSAlbum").innerHTML=retv;
		    }     
	      }
	    new  Ajax.Request('product_info_edit.aspx',options);
    }
    /*相关商品搜索*/
    function CheckProduct(Name)
    {
        if(Name=="")
        {
            return false;
        }
        var param = "Option=SearchProduct&Name="+ Name;
        var options={
            method:'post',
            parameters:param,
            onComplete:
            function(transport)
	        {
                 var retv=transport.responseText;
                 document.getElementById("divRelatingProID").innerHTML=retv;
		    }     
	      }
	    new  Ajax.Request('product_info_edit.aspx',options);
    }
    //添加选中的项目
    function AddItem(sel,seled)
    {   
       var selectItemID=document.getElementById(sel).options.selectedIndex;
       var selectItemValue=document.getElementById(sel).options;
       var Selected=document.getElementById(seled);
       
       if  (selectItemID!=0&&selectItemID!=-1)
       {        
            for(var i = 0,j=0; i < selectItemValue.length,j<selectItemValue.length; i++) 
            {
              if(selectItemValue[i].selected)
               {
                    var exist=false;
                    for(var k = 0; k < Selected.options.length; k++) 
                    {
                        if(Selected.options[k].value == selectItemValue[i].value) 
                        {
                            exist=true;
                            break;
                        }
                    }
                    if  (exist==false)
                    {  
                        Selected.options.add(new Option(selectItemValue[i].text, selectItemValue[i].value, true,true)); 
                        j++;
                    }
                }
            }
       }
    }
    //全部添加
    function AddAllItem(sel,seled)
    {
        //备选项列表
        var selectItemValue=document.getElementById(sel).options;
        //已列表
        var Selected=document.getElementById(seled);
        for(var i = 1,j = 0; i < selectItemValue.length,j < selectItemValue.length; i++) 
        {           
            var exist=false;
            for(var k = 0; k < Selected.options.length; k++) 
            {
                if(Selected.options[k].value == selectItemValue[i].value) 
                {
                    exist=true;
                    break;
                }
            }
            if  (exist==false)
            {  
                Selected.options.add(new Option(selectItemValue[i].text, selectItemValue[i].value, true,true)); 
                j++;
            }
        }
    }
    //移除所选项
    function DelItem(selName)
    {
        var Selected=document.getElementById(selName).options;
        for(var i = 0; i < Selected.length; i++) 
        {        
            if(Selected[i].selected==true)
            {
                Selected.remove(i);
            }
        }
    }

    //移除所有已经选择好的项目
    function DelAllItem(selName)
    {
        var colls = [];       //对select标记options的引用
        var selectTag = document.getElementById(selName); //获取select标记        
        colls = selectTag.options; //获取引用
        if(colls.length > 0)
        {
             clearOptions(colls);
        }   
    }

    //清空options集合
    function clearOptions(colls)
    {
        var length = colls.length;
        for(var i=length-1;i>=0;i--)
        {
               colls.remove(i);
        }
    }
    /*相关文章*/
    function CheckArticle(Name)
    {
        if(Name=="")
        {
            return false;
        }
        var param = "Option=SearchAtricle&Name="+ Name;
        var options={
            method:'post',
            parameters:param,
            onComplete:
            function(transport)
	        {
                 var retv=transport.responseText;
                 document.getElementById("divRelatingArticldeID").innerHTML=retv;
		    }     
	      }
	    new  Ajax.Request('product_info_edit.aspx',options);
    }
        
        function ColseFileList()
        {
            $("fileLists").style.visibility="hidden";
        }
        function OpenFileList()
        {
            $("fileLists").style.visibility="visible";
        }
        function Detect()
        {
           var type=document.getElementById("<%=isStartspecification.ClientID %>").value;
           var stock=document.getElementById("txtStock").value;
           var upCount=document.getElementById("<%=txtUpCount.ClientID %>").value;
           
           if(stock=="")
           {
               stock=0;
           }
           if(upCount=="")
           {
               upCount=0;
           }
           if(type=="0")
           {
               if(parseInt(stock)<parseInt(upCount))
               {
                   alert("温馨提示：输入的库存小于上架数量！");
                   return false;
               }
           }
           var stateTime=document.getElementById("<%=txtFilingTime.ClientID %>").value;
           var endTime=document.getElementById("<%=txtDownTime.ClientID %>").value;
           if((new Date(Date.parse(stateTime.replace(/-/g,"/"))))>=(new Date(Date.parse(endTime.replace(/-/g,"/")))))
           {
               alert("温馨提示：下架时间小于上架时间，请重新输入！");
               return false;
           }
        }
    </script>

    <style type="text/css">
        .inputCSS
        {
            border-bottom-width: 1px;
            border-top-style: none;
            border-right-style: none;
            border-bottom-style: dashed;
            border-left-style: none;
            border-bottom-color: #000000;
            background-color: #EBEDE8;
            text-align: left;
            cursor: hand;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pagetitle" runat="server">
    商品管理
    <asp:Button ID="button1" runat="server" CssClass="inputbutton" Text="保  存" OnClientClick="return Detect()"  OnClick="butSave_Click"
       onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'" />
    <asp:HyperLink ID="HyperLink1" runat="server" CssClass="inputbutton" Width="65px"
        Height="24px" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'">返回列表</asp:HyperLink>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="pageinfo" runat="server">
    添加或编辑商品
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="workspace" runat="server">
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td id="TabTitle9" class="titlemouseover" onclick="ProductShowTabs(9,10)" runat="server">
                商品总览
            </td>
            <td id="TabTitle0" class="tabtitle" onclick="ProductShowTabs(0,10)" runat="server">
                基本信息
            </td>
            <td id="TabTitle1" class="tabtitle" onclick="ProductShowTabs(1,10)" runat="server">
                配件
            </td>
            <td id="TabTitle2" class="tabtitle" onclick="ProductShowTabs(2,10)" runat="server">
                介绍及图片
            </td>
            <td id="TabTitle3" class="tabtitle" onclick="ProductShowTabs(3,10)" runat="server">
                商品相册
            </td>
            <td id="TabTitle4" class="tabtitle" onclick="ProductShowTabs(4,10)" runat="server"
                style="display: none">
                扩展属性
            </td>
            <td id="TabTitle5" class="tabtitle" onclick="ProductShowTabs(5,10)" runat="server"
                style="display: none">
                商品参数
            </td>
            <td id="TabTitle6" class="tabtitle" onclick="ProductShowTabs(6,10)" runat="server">
                相关商品
            </td>
            <td id="TabTitle7" class="tabtitle" onclick="ProductShowTabs(7,10)" runat="server">
                相关文章
            </td>
            <td id="TabTitle8" class="tabtitle" onclick="ProductShowTabs(8,10)" runat="server">
                搜索优化
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlMsg" runat="server" Visible="false" CssClass="pnlReturnMessageErr">
        <asp:Literal ID="ltlMsg" runat="server"></asp:Literal>
    </asp:Panel>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td colspan="9" style="border: 1px solid #bac9c6;">
                <table width="100%" style="background-color: #EBEDE8; height: 28px;">
                    <tr>
                        <td>
                            <span style="font-weight: bold; font-size: 12px">商品分类</span>
                            <asp:TextBox ID="txtProductClass" runat="server" Text="请选择商品分类" CssClass="inputCSS"></asp:TextBox>
                            <asp:HiddenField runat="server" ID="hfcid" />
                            &nbsp;&nbsp; <span style="font-weight: bold; font-size: 12px">商品类型</span>
                            <asp:Literal ID="litProductType" runat="server"></asp:Literal>
                            &nbsp;&nbsp;<span id="spanArea" runat="server" style="display:none"><span style="font-weight: bold; font-size: 12px">所属地区</span>
                            <asp:TextBox ID="txtArea" runat="server" ReadOnly Text="请选择商品所属地区" CssClass="inputCSS"></asp:TextBox>
                            <asp:HiddenField runat="server" ID="hfid" /></span>
                        </td>
                    </tr>
                </table>
                <!--基本信息-->
                <div id="tab0" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td class="form_table_input_info">
                                商品名称：
                            </td>
                            <td>
                                <asp:TextBox ID="txtProductName" runat="server"></asp:TextBox><span style="color: Red">*</span>
                            </td>
                            <td>
                                <asp:Panel ID="txtProductNameTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                货号：
                            </td>
                            <td>
                                <asp:TextBox ID="txtItemNo" runat="server"></asp:TextBox>
                                <asp:HiddenField ID="hfItemNo" runat="server" />
                            </td>
                            <td>
                                <div class="msgNormal">
                                    如果您不输入商品货号，系统将自动生成一个唯一的货号。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                品牌：
                            </td>
                            <td>
                                <div id="divBrand">
                                    <asp:Literal ID="litProductBrand" runat="server"></asp:Literal>
                                </div>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    选择商品所属品牌。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                计量单位：
                            </td>
                            <td>
                                <asp:Literal ID="litUnit" runat="server"></asp:Literal>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    选择商品计量单位。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                重量：
                            </td>
                            <td>
                                <asp:TextBox ID="txtWeiht" CssClass="short_input" runat="server"></asp:TextBox>克(g)
                            </td>
                            <td>
                                <asp:Panel ID="txtWeihtTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                是否上架销售：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="rblIsShelves" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" Text="否" onclick="IsFilingSell(0)"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="是" Selected="True" onclick="IsFilingSell(1)"></asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    选择是表示在前台页面显示该商品；否表示暂存数据库。</div>
                            </td>
                        </tr>
                        <tr id="trFilingTime" runat="server">
                            <td class="form_table_input_info">
                                上架时间：
                            </td>
                            <td>
                                <asp:TextBox ID="txtFilingTime" CssClass="date_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtFilingTimeTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr id="trDownTime" runat="server">
                            <td class="form_table_input_info">
                                下架时间：
                            </td>
                            <td>
                                <asp:TextBox ID="txtDownTime" CssClass="date_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtDownTimeTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr id="trFilingCount" runat="server">
                            <td class="form_table_input_info">
                                上架数量：
                            </td>
                            <td>
                                <asp:TextBox ID="txtUpCount" CssClass="short_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtUpCountTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                赠送积分：
                            </td>
                            <td>
                                <asp:TextBox ID="txtDonateInteg" CssClass="short_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtDonateIntegTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                市场价格：
                            </td>
                            <td>
                                <asp:TextBox ID="txtMarketPrice" CssClass="short_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtMarketPriceTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                商品成本价：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCostPrice" CssClass="short_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtCostPriceTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                报警数量：
                            </td>
                            <td>
                                <asp:TextBox ID="txtAlarm" CssClass="short_input" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    当库存数据等于报警数量，系统会提示您。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                内容模板：
                            </td>
                            <td>
                                <asp:TextBox ID="txtContentPageTemplate" runat="server"></asp:TextBox>
                                <div id="fileLists" class="dtree" >
                                    <asp:Literal ID="ltlFileList" runat="server"></asp:Literal>
                                </div>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    为空默认调用模型中设置的商品内容页模板，不为空时调现在所设的商品内容页模板。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                商品标签：
                            </td>
                            <td>
                                <asp:CheckBoxList ID="chklstState" runat="server" RepeatDirection="Horizontal" RepeatColumns="4">
                                    <asp:ListItem>推荐</asp:ListItem>
                                    <asp:ListItem>热卖</asp:ListItem>
                                    <asp:ListItem>特价</asp:ListItem>
                                    <asp:ListItem>活动</asp:ListItem>
                                    <asp:ListItem>最新</asp:ListItem>
                                    <asp:ListItem>首页</asp:ListItem>
                                    <asp:ListItem>精品</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    控制商品在前台模块显示的标示，要在首页显示必须勾选首页。</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                商品标识：
                            </td>
                            <td>
                                <asp:CheckBoxList ID="chklstMarking" runat="server" RepeatDirection="Horizontal"
                                    RepeatColumns="4">
                                    <asp:ListItem Value="0" Selected="True">普通</asp:ListItem>
                                    <asp:ListItem Value="1">团购</asp:ListItem>
                                    <asp:ListItem Value="2">拍卖</asp:ListItem>
                                    <asp:ListItem Value="3">点卡</asp:ListItem>
                                    <asp:ListItem Value="4">批发</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    控制商品在前台模块显示的标示.</div>
                            </td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tr>
                            <td colspan="3" style='font-weight: bold; height: 10px; background-color: #EBEDE8'>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                    <!--规格-->
                    <div id="SpecificationsAddress">
                    </div>
                    <!--特殊规格-->
                    <div id="SpecAlbum">
                        <input type="hidden" id="IsSpecAlbum" value="0" runat="server" />
                        <input type="hidden" id="SpecialSpecName" runat="server" />
                        <input type="hidden" id="SpecialSpecValue" runat="server" />
                    </div>
                    <div id="Specifications">
                        <asp:Literal ID="litSpecifications" runat="server"></asp:Literal>
                    </div>
                    <input type="hidden" id="isStartspecification" runat="server" name="isStartspecification"
                        value="0" />
                </div>
                <!--配件-->
                <div id="tab1" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td colspan="3" class="page_button">
                                <asp:HyperLink ID="HyperLink4" runat="server" CssClass="inputbutton" NavigateUrl="javascript:LoadSparepart()"
                                    Width="65px" Height="24px" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
                                    onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'">添加配件</asp:HyperLink>
                                <input type="hidden" name="hfSparepartGroup" id="hfSparepartGroup" runat="server"
                                    value="0" />
                            </td>
                        </tr>
                    </table>
                    <div id="SparepartContent" runat="server">
                        <asp:Literal ID="litSparepartContents" runat="server"></asp:Literal>
                    </div>
                    <div id="address">
                    </div>
                </div>
                <!--介绍及图片-->
                <div id="tab2" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="form_table_input_info">
                                商品原图：
                            </td>
                            <td>
                                <asp:FileUpload ID="fuPic" runat="server" />
                                <asp:CheckBox ID="cbBreviary" runat="server" onclick="chengeBreviary();" />自动生成缩略图
                            </td>
                            <td>
                                <div class="msgNormal">
                                    上传商品原图将在前台商品详细页显示</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                商品缩略图：
                            </td>
                            <td>
                                <asp:FileUpload ID="fuSmallImages" runat="server" />
                            </td>
                            <td>
                                <div class="msgNormal">
                                    上传100px*100px大小的图,前台显示为最佳效果,如自动生成缩略图请在系统设置下的缩略图参数配置下进行配置缩略图的大小</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                商品简介：
                            </td>
                            <td>
                                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" onblur="changeDescription()"
                                    MaxLength="1500" Height="100px" Width="323px"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Panel ID="txtDescriptionTip" runat="server">
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                详细介绍：
                            </td>
                            <td colspan="2">
                                <div class="msgNormal">
                                    输入信息对商品进行详细介绍</div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <FCKeditorV2:FCKeditor ID="txtContent" runat="server" Height="450px">
                                </FCKeditorV2:FCKeditor>
                            </td>
                        </tr>
                    </table>
                </div>
                <!--商品相册-->
                <div id="tab3" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td colspan="2" class="page_button">
                                <asp:HyperLink ID="HyperLink3" runat="server" CssClass="inputbutton" NavigateUrl="javascript:addFile()"
                                    Width="65px" Height="24px" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
                                    onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'">增加相片</asp:HyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                本地图片：<input id="File2" type="file" name="File" runat="server" />
                            </td>
                            <td>
                                描述：<input type="text" name="description" maxlength="200" />
                            </td>
                        </tr>
                    </table>
                    <div id="MyFile">
                    </div>
                    <div id="divAlbum">
                        <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <span id="spanJSAlbum">
                                    <asp:Literal ID="litaAlbum" runat="server"></asp:Literal></span>
                            </tr>
                        </table>
                    </div>
                </div>
                <!--扩展展性-->
                <div id="tab4" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <asp:Literal ID="litPropery" runat="server"></asp:Literal>
                </div>
                <!--商品参数-->
                <div id="tab5" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <asp:Literal ID="litParameter" runat="server"></asp:Literal>
                </div>
                <!--相关商品-->
                <div id="tab6" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="fullTd" colspan="3">
                                搜索商品的关联商品：
                                <input type="text" id="txtRelatingProName" />
                                &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="搜索商品" onclick="CheckProduct(document.all.txtRelatingProName.value);" />
                                <div class="Description">
                                    在前台商品的详细页上将显示您当前所添加的关联商品，建议不多于10个</div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 40%; text-align: right">
                                <div id="divRelatingProID">
                                    <select size="14" id="selPro_RelatingProID" style="width: 98%">
                                    </select>
                                </div>
                            </td>
                            <td style="width: 20%; text-align: center; vertical-align: super">
                                <input type="button" style="width: 60%" value=">>>" onclick="AddAllItem('selPro_RelatingProID','selPro_RelatingProIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value=">" onclick="AddItem('selPro_RelatingProID','selPro_RelatingProIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value="<<<" onclick="DelAllItem('selPro_RelatingProIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value="<" onclick="DelItem('selPro_RelatingProIDSelect');" />
                            </td>
                            <td style="width: 40%; text-align: left">
                                <div class="Description" id="divPro_RelatingProIDSelected">
                                    <asp:Literal ID="ltRelatingProductSelected" runat="server"></asp:Literal>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <!--相关文章-->
                <div id="tab7" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="fullTd" colspan="3">
                                搜索文章的关联文章：
                                <input type="text" id="txtArticleTitle" />
                                &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="搜索文章" onclick="CheckArticle(document.all.txtArticleTitle.value);" />
                                <div class="Description">
                                    在前台商品的详细页上将显示您当前所添加的关联文章，建议不多于10个</div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 40%; text-align: right">
                                <div id="divRelatingArticldeID">
                                    <select size="14" style="width: 98%">
                                    </select>
                                </div>
                            </td>
                            <td style="width: 20%; text-align: center; vertical-align: super">
                                <input type="button" style="width: 60%" value=">>>" onclick="AddAllItem('selPro_RelatingArtID','selPro_RelatingArtIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value=">" onclick="AddItem('selPro_RelatingArtID','selPro_RelatingArtIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value="<<<" onclick="DelAllItem('selPro_RelatingArtIDSelect');" />
                                <br />
                                <br />
                                <br />
                                <input type="button" style="width: 60%" value="<" onclick="DelItem('selPro_RelatingArtIDSelect');" />
                            </td>
                            <td style="width: 40%; text-align: left">
                                <div id="divPro_RelatingArtIDSelect">
                                    <asp:Literal ID="ltRelatingArticle" runat="server"></asp:Literal>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <!--搜索优化-->
                <div id="tab8" runat="server" style="border-top: #EBEDE8 solid 10px;">
                    <table class="form_table_input" border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="form_table_input_info">
                                优化标题：
                            </td>
                            <td>
                                <asp:TextBox ID="txtOptimizationtitle" runat="server" MaxLength="150"></asp:TextBox>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    用于在商品详细页详细页的页头上进行显示的标题信息（有助于SEO优化），不多于150字</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                优化关键字：
                            </td>
                            <td>
                                <asp:TextBox ID="txtOptimizationKey" runat="server" MaxLength="100"></asp:TextBox>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    用于在商品详细页详细页的页头上进行显示的关键字（有助于SEO优化），不多于100字</div>
                            </td>
                        </tr>
                        <tr>
                            <td class="form_table_input_info">
                                优化描述：
                            </td>
                            <td>
                                <asp:TextBox ID="txtOptimizationDescription" TextMode="MultiLine" runat="server"
                                    MaxLength="250"></asp:TextBox>
                            </td>
                            <td>
                                <div class="msgNormal">
                                    用于在商品详细页详细页的页头上进行显示的描述信息（有助于SEO优化），不多于250字</div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ContentPlaceHolderID="pagebottom" runat="server" ID="ContentBottom">
    <asp:Button ID="butSave" runat="server" CssClass="inputbutton" Text="保  存" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'"
        OnClick="butSave_Click" OnClientClick="return Detect();" />
    <asp:HyperLink ID="HyperLink2" runat="server" CssClass="inputbutton" Width="65px"
        Height="24px" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'"
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'">返回列表</asp:HyperLink>
</asp:Content>
