<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true"
    ValidateRequest="false" Codebehind="ProductEdit.aspx.cs" Inherits="PPFOR.Admin.ContentArea.Product.ProductEdit"
    Title="修改产品" %>
<%@ Register Src="~/Admin/Ascx/ImageList.ascx" TagName="ImageList" TagPrefix="image" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="/ckfinder/ckfinder.js"></script>    
    <script type="text/javascript" src="../../js/ajax.js"></script>
    <script src="../../JS/popup.js" type="text/javascript"></script>  
    <script src="../../JS/proSpecValue.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var finder = new CKFinder();
finder.BasePath = '/ckfinder/';
finder.ResourceType="Images";
finder.RememberLastFolder=true;
finder.PrintWaterImage=true;
function BrowseImage()
{		
    finder.SelectFunction = SetImageField;
	finder.DisableThumbnailSelection=true;
	finder.Popup();
}
function BrowseThumbnail()
{
    finder.SelectFunction = SetThumbnailField;
	finder.DisableThumbnailSelection=false;
	finder.Popup();
}
function BrowseSlideImage()
{
    finder.SelectFunction = SetSlideImage;
	finder.DisableThumbnailSelection=true;
	finder.Popup();
}
function SetImageField(fileUrl)
{
    var obj=document.getElementById("<%=PPFOR_productBigImage.ClientID %>");
	if(obj!=null && fileUrl.indexOf(finder.RootUrl)==0)
	{
	    obj.value = fileUrl;
        if(document.all)
        {
            obj.fireEvent("onchange");
        }
        else
        {
            var evt = document.createEvent('HTMLEvents');   
             evt.initEvent('change',true,true);   
             obj.dispatchEvent(evt);   
        }       
    }
}
function SetThumbnailField( fileUrl)
{
    var obj=document.getElementById("<%=PPFOR_productSmallImage.ClientID %>");
	if(obj!=null)
	{
	    obj.value = fileUrl;
        if(document.all)
        {
            obj.fireEvent("onchange");
        }
        else
        {
            var evt = document.createEvent('HTMLEvents');   
             evt.initEvent('change',true,true);   
             obj.dispatchEvent(evt);   
        }       
    }
}
function SetSlideImage( fileUrl)
{
    var obj=document.getElementById("<%=PPFOR_productSlideImage.ClientID %>");
	if(obj!=null)
	{
	    obj.value = fileUrl;
        if(document.all)
        {
            obj.fireEvent("onchange");
        }
        else
        {
            var evt = document.createEvent('HTMLEvents');   
             evt.initEvent('change',true,true);   
             obj.dispatchEvent(evt);   
        }       
    }
}
function checkThumbnailAuto(obj)
{
    var target=document.getElementById('<%=PPFOR_autoThumbnail.ClientID %>');
    if(obj.value!='' && target.checked==true)
    {
        var targetImage=document.getElementById('<%=PPFOR_productSmallImage.ClientID %>');
        if(obj.value.indexOf(finder.RootUrl)==0)
        {
            if(obj.value.indexOf(finder.RootUrl + '_thumbs/')==0){
                targetImage.value=obj.value;        
            }
            else{                
                targetImage.value=obj.value.replace(finder.RootUrl,finder.RootUrl + '_thumbs/'); 
            }
        }
    }
}

var editor; 
function changeEditor(id)
{
	if ( editor )
	{
		editor.destroy();
    }
	editor = CKEDITOR.replace(id);
} 
function show(obj){
    if(obj!=null && obj.type=='checkbox')
    {
        var target1=document.getElementById('divSeo1');
        var target2=document.getElementById('divSeo2');
        target1.style.display=(obj.checked==true)?'':'none';  
        target2.style.display=(obj.checked==true)?'':'none'; 
    }
}
function readable(obj,targetid){
    var target=document.getElementById(targetid);    
    if(obj!=null && obj.type=='checkbox' && target!=null)
    {
        target.readOnly=obj.checked;
        if(!obj.checked)
        {
            target.select();
        }
    }
}
function disable(obj,targetid){
    var target=document.getElementById(targetid);
    var targetImage=document.getElementById('<%=PPFOR_productSmallImage.ClientID %>');
    if(obj!=null && obj.type=='checkbox' && target!=null)
    {
        target.disabled=obj.checked;
        targetImage.readOnly=obj.checked;
    }
}
function showSection(checked){
    var obj=document.getElementById("<%=PPFOR_memberDegrees.ClientID %>");
    if(obj && obj.style) obj.style.display=checked ? '' : 'none';
}

var idArray=new Array();
var valueArray=new Array();
function getParamList(obj,lanId)
{
    var isError=false;
    var defaultValue=obj.getAttribute("defaultValue");
    var typeId=obj.options[obj.selectedIndex].value;
    
    if(confirm("更改产品所属类型将重新加载扩展属性，确认更改吗？")==true)
    {        
        obj.setAttribute("defaultValue",typeId);        
        var xmlHttp=GetXmlHttpObject();
        if (xmlHttp==null)
        {
            alert ("您的浏览器不支持AJAX！");            
            isError=true;
        }
        else
        {
            var url="ProductParamList.aspx?tid=" + typeId + "&lanId=" + lanId;

            var idReg=/paramValue_[\d]*/i;
            var selObjs=document.getElementsByTagName("input");
            if(selObjs!=null)
            {
                for(var index=0;index<selObjs.length;index++)
                {
                    if(selObjs[index].type=='text' && idReg.test(selObjs[index].id))
                    {
                        var j=0;
                        for(;j<idArray.length;j++)
                        {
                            if(idArray[j]==selObjs[index].id)
                            {
                                valueArray[j]=selObjs[index].value;
                                break;
                            }
                        }
                        if(j==idArray.length)
                        {
                            idArray[j]=selObjs[index].id;
                            valueArray[j]=selObjs[index].value;
                        }
                    }
                }
            }
            var areaObjs=document.getElementsByTagName("textarea");
            if(areaObjs!=null)
            {
                for(var index=0;index<areaObjs.length;index++)
                {
                    if(idReg.test(areaObjs[index].id))
                    {
                        var j=0;
                        for(;j<idArray.length;j++)
                        {
                            if(idArray[j]==areaObjs[index].id)
                            {
                                valueArray[j]=areaObjs[index].value;
                                break;
                            }
                        }
                        if(j==idArray.length)
                        {
                            idArray[j]=areaObjs[index].id;
                            valueArray[j]=areaObjs[index].value;
                        }
                    }
                }
            }
            xmlHttp.onreadystatechange=function(){
                if (xmlHttp.readyState==4)
                {                  
                    var tbody=document.getElementById('showParamList');
                    for(var i=tbody.rows.length -1; i >=0; i--){ 
                        tbody.deleteRow(i); 
                    }
                            
                    var xmlDoc=xmlHttp.responseXML || xmlHttp.responseXML.documentElement;
                    if(xmlDoc!=null)
                    {          
                        var rows=xmlDoc.getElementsByTagName("Rows");  
                        if(rows!=null && rows.length==1)
                        {                
                          objTRs = rows[0].getElementsByTagName("Row");
                          if(objTRs!=null && objTRs.length>0)
                          {                             
                            for(var j=0;j<objTRs.length;j++)
                            {                                
                                var iRow=tbody.insertRow(j);
                                objTDs=objTRs[j].getElementsByTagName("Column");
                                var objTD1=iRow.insertCell(-1);
                                objTD1.align='right';
                                objTD1.innerHTML=objTDs[0].firstChild.nodeValue;
                                var objTD2=iRow.insertCell(-1);
                                objTD2.innerHTML=objTDs[1].firstChild.nodeValue;
                            }
                            for(var index=0;index<idArray.length;index++)
                            {
                                var obj=document.getElementById(idArray[index]);
                                if(obj!=null && valueArray[index]!=null && valueArray[index]!='' && valueArray[index]!='<br />')
                                {
                                    obj.value=valueArray[index];
                                }
                            } 
                          }
                        }                     
                    }                  
                }
            };
            xmlHttp.open("GET",url,true);
            xmlHttp.send(null);
        }
    }
    else if(defaultValue!=null)
    {
        for(var i=0;i<obj.options.length;i++)
        {
            if(obj.options[i].value==defaultValue)
            {
                obj.selectedIndex=i;
                break;
            }
        }
    }
    else
    {
        isError=true;
    }
    if(isError==true)
    {
        location.href="ProductAdd.aspx?id=" + typeId;
    }
}
function showShopRows(specIndex,isShowSpec)
{   
    var objTr=null;   
    var i=1;
    while(i>0)  {
        objTr=document.getElementById('divShopRow_' + i);
        if(objTr!=null){  
            if(i<specIndex){
                objTr.style.display='';
            }else{
                objTr.style.display=isShowSpec ? 'none' : '';
            }
            i++;
        }else{
            i=-1;
        }     
    }    
    document.getElementById('divShopRow_spec').style.display='';
}
function showSpecValueList(specValueArray)
{    
    var specIds='';
    for(var spec in specValueArray){
        specIds+=spec;
        if(specValueArray[spec].specValueCount>0){
            var specValueIds='';
            for(var v in specValueArray[spec].specValues){
                specValueIds+=',' + v;      
            }
            if(specValueIds!=''){
                specIds+=':' + specValueIds.substr(1);
            }
        }
        specIds+=';';
    } 
    if(specIds!='')
    {
        showShopRows(5,true);        
        goodsSourceValue['code']=document.getElementById('<%= PPFOR_productCode.ClientID %>').value;
        goodsSourceValue['store']=document.getElementById('<%= PPFOR_productStore.ClientID %>').value;
        goodsSourceValue['price']=document.getElementById('<%= PPFOR_productPrice.ClientID %>').value;
        goodsSourceValue['cost']=document.getElementById('<%= PPFOR_productCost.ClientID %>').value;
        goodsSourceValue['weight']=document.getElementById('<%= PPFOR_productWeight.ClientID %>').value;
        goodsSourceValue['degreePrice']=document.getElementById('<%= PPFOR_degreePrice.ClientID %>').value;
        document.getElementById('<%= PPFOR_productCode.ClientID %>').value='';
        document.getElementById('<%= PPFOR_productStore.ClientID %>').value='';
        document.getElementById('<%= PPFOR_productPrice.ClientID %>').value='';
        document.getElementById('<%= PPFOR_productCost.ClientID %>').value='';
        document.getElementById('<%= PPFOR_productWeight.ClientID %>').value='';
        document.getElementById('<%= PPFOR_degreePrice.ClientID %>').value='';
           
        changeAutoSpecValueData(specValueArray);
        document.getElementById('productSpecIds').value=specIds;
        document.getElementById('div_noSpec').style.display='none';
        document.getElementById('div_useSpec').style.display='';    
        addGoods();
    }
}
function initSpecValueList(specIds,specValueArray)
{    
    showShopRows(5,true);
    
    goodsSourceValue['code']=document.getElementById('<%= PPFOR_productCode.ClientID %>').value;
    goodsSourceValue['store']=document.getElementById('<%= PPFOR_productStore.ClientID %>').value;
    goodsSourceValue['price']=document.getElementById('<%= PPFOR_productPrice.ClientID %>').value;
    goodsSourceValue['cost']=document.getElementById('<%= PPFOR_productCost.ClientID %>').value;
    goodsSourceValue['weight']=document.getElementById('<%= PPFOR_productWeight.ClientID %>').value;
    goodsSourceValue['degreePrice']=document.getElementById('<%= PPFOR_degreePrice.ClientID %>').value;
    document.getElementById('<%= PPFOR_productCode.ClientID %>').value='';
    document.getElementById('<%= PPFOR_productStore.ClientID %>').value='';
    document.getElementById('<%= PPFOR_productPrice.ClientID %>').value='';
    document.getElementById('<%= PPFOR_productCost.ClientID %>').value='';
    document.getElementById('<%= PPFOR_productWeight.ClientID %>').value='';    
    document.getElementById('<%= PPFOR_degreePrice.ClientID %>').value='';
    changeAutoSpecValueData(specValueArray);
    document.getElementById('productSpecIds').value=specIds;
    document.getElementById('div_noSpec').style.display='none';
    document.getElementById('div_useSpec').style.display='';    
}
function setDegreePrice(degreePriceArray,arg)
{ 
    if(arg==null || arg==''){
        return;
    }    
    var priceStr='';
    for(var p in degreePriceArray){
        priceStr+='&'+p+'='+degreePriceArray[p];
    }    
    if(priceStr!=''){
        priceStr=priceStr.substr(1);
    }
    document.getElementById(arg).value=priceStr+';';
}
function getDegreePrice(priceId,degreePriceId)
{ 
    if(degreePriceId==null || degreePriceId==''){
        return;
    }
    var price=document.getElementById(priceId).value;
    var dprices=document.getElementById(degreePriceId).value.replace(/\s*/g,'').replace(/;/,'').split('&');
    var priceStr='';
    if(dprices!=null && dprices.length>0){
        for(var i=0;i<dprices.length;i++){
            if(dprices[i]!='' && dprices[i].indexOf('=')>0){
                priceStr+='&price'+dprices[i];
            }
        }
    }  
    popup_show("会员价格","<iframe id='priceFrame' src='/Admin/CustomView/degreePrice.aspx?arg=" + degreePriceId + "&price=" + price + (priceStr!=''?priceStr:'') + "' scrolling='yes' width='100%' height='100%' frameborder='0' ></iframe>",400,200);
}
function addGoods()
{   
    appendGoods(0,goodsSourceValue['code'],goodsSourceValue['store'],goodsSourceValue['price'],goodsSourceValue['cost'],goodsSourceValue['weight'],goodsSourceValue['degreePrice']);
}
function closeSpecList(msg)
{
    if(msg==null || msg=='' || confirm(msg))
    {
        document.getElementById('productSpecIds').value='';
        document.getElementById('div_noSpec').style.display='';
        document.getElementById('div_useSpec').style.display='none';
        var objTable=document.getElementById("proSpecValueTable");
        if(objTable!=null && objTable.rows.length>0){
            while(objTable.rows.length>0){
                objTable.deleteRow(0);
            }
        }
        showShopRows(5,false);   
        document.getElementById('<%= PPFOR_productCode.ClientID %>').value=goodsSourceValue['code'];
        document.getElementById('<%= PPFOR_productStore.ClientID %>').value=goodsSourceValue['store'];
        document.getElementById('<%= PPFOR_productPrice.ClientID %>').value=goodsSourceValue['price'];
        document.getElementById('<%= PPFOR_productCost.ClientID %>').value=goodsSourceValue['cost'];
        document.getElementById('<%= PPFOR_productWeight.ClientID %>').value=goodsSourceValue['weight'];
        document.getElementById('<%= PPFOR_degreePrice.ClientID %>').value=goodsSourceValue['degreePrice'];
    }
}
function openSpecListForSelect(specIds)
{
    popup_show("选择规格","<iframe id='specFrame' src='/Admin/CustomView/specification.aspx?specids=" + specIds + "' scrolling='yes' width='100%' height='100%' frameborder='0' ></iframe>",520,250);
}
function openModelFilesForSelect(id)
{
    popup_show("选择模板文件","<iframe id='fileFrame' src='/Admin/CustomView/filemanager.aspx?rid=" + document.getElementById(id).getAttribute("rid") + "' scrolling='yes' width='100%' height='100%' frameborder='0' ></iframe>",520,360);
}
function openTimeForSelect(id)
{
   popup_show("选择发布时间","<iframe id='dtFrame' src='/Admin/CustomView/datetime.aspx?rid=" + document.getElementById(id).getAttribute("rid") + "' scrolling='yes' width='100%' height='100%' frameborder='0' ></iframe>",400,285);
} 
</script>
    <form id="form1" runat="server" onsubmit="return checkGoodsSpecValues();">
        <table width="100%" id="productInfoTable" border="0" cellpadding="0" cellspacing="0" class="fortable">
        <thead>
            <tr>
                <td colspan="2">修改产品</td>
            </tr>
        </thead>  
        <tr>
            <td style="width:15%" align="right">产品名称：</td>
            <td>
                <asp:TextBox ID="PPFOR_productName" runat="server" Width="300px" MaxLength="200"></asp:TextBox> *                  
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" SetFocusOnError="true" ValidationExpression="^.{2,200}$" Display="Dynamic" ControlToValidate="PPFOR_productName"><br />产品名称长度必须在2至200个字符之间</asp:RegularExpressionValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_productName"><br />产品名称不能为空</asp:RequiredFieldValidator>
            </td>
        </tr>       
         <tr>
            <td align="right">静态文件名：</td>
            <td style="white-space:normal;">
                <asp:Label ID="PPFOR_htmlName" runat="server"></asp:Label>&nbsp;
            </td>
        </tr>                  
        <tr>
            <td align="right">所属类型：</td>
            <td>
                <asp:DropDownList ID="PPFOR_productTypeList" runat="server" Width="300px">
                </asp:DropDownList>
                <asp:Label ID="PPFOR_productId" runat="server" Enabled="false" Visible="false"></asp:Label>
                <asp:Label ID="PPFOR_productBelongMenu" runat="server" Enabled="false" Visible="false"></asp:Label>
                <asp:Label ID="PPFOR_returnURL" runat="server" Enabled="false" Visible="false"></asp:Label> 
            </td>
        </tr>
        <tr>
            <td align="right">产品简介：</td>
            <td>
                <asp:TextBox ID="PPFOR_productIntroduction" TextMode="MultiLine" runat="server" Height="80px" Width="98%"></asp:TextBox><br />
                <asp:CheckBox ID="PPFOR_productIntroductionAuto" runat="server" Text="自动获取" Checked="true"/>
            </td>
        </tr> 
        <tr>
            <td align="right">产品介绍：</td>
            <td>
                <asp:TextBox ID="PPFOR_productDescription" runat="server" TextMode="MultiLine" Height="80px" Width="99%"></asp:TextBox>
                    <script type="text/javascript">
                       editor = CKEDITOR.replace("<%=PPFOR_productDescription.ClientID%>");       
                    </script>
            </td>
        </tr> 
        <tbody id="showParamList">
        <%=PPFOR_productParamList %>
        </tbody>
        <tr>
            <td align="right">产品详细页模板：</td>
            <td>
                <asp:TextBox ID="PPFOR_productTemplate" runat="server" Width="300px" MaxLength="255"></asp:TextBox>
                <input type="button" value="选择模板" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" onclick="openModelFilesForSelect('<%=PPFOR_productTemplate.ClientID %>');" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" SetFocusOnError="true" ValidationExpression='^[/][^\\<>*?:|\"]{3,254}$' Display="Dynamic" ControlToValidate="PPFOR_productTemplate"><br />模板文件路径必须以“/”开头，且长度必须在4至255个字符之间，且不能包含以下字符之一： \ < > | " ? : *</asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_productTemplate"><br />产品详细页模板文件路径不能为空</asp:RequiredFieldValidator>
            </td>
        </tr> 
        <tr>
            <td align="right">产品图片：</td>
            <td>
                <asp:TextBox ID="PPFOR_productBigImage" runat="server" Width="300px" MaxLength="255"></asp:TextBox>      
                <input type="button" value="选择图片" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" onclick="BrowseImage();" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" SetFocusOnError="true" ValidationExpression='^[/][^\\<>*?:|\"]{3,254}$' Display="Dynamic" ControlToValidate="PPFOR_productBigImage"><br />图片文件路径必须以“/”开头，且长度必须在4至255个字符之间，且不能包含以下字符之一： \ < > | " ? : *</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right">产品缩略图：</td>
            <td>
                <asp:CheckBox ID="PPFOR_autoThumbnail" runat="server" Text="自动生成产品缩略图" /><br />
                <asp:TextBox ID="PPFOR_productSmallImage" runat="server" Width="300px" MaxLength="255"></asp:TextBox>      
                <input id="selectThumbnailImage" type="button" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="选择图片" onclick="BrowseThumbnail();" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" SetFocusOnError="true" ValidationExpression='^[/][^\\<>*?:|\"]{3,254}$' Display="Dynamic" ControlToValidate="PPFOR_productSmallImage"><br />图片文件路径必须以“/”开头，且长度必须在4至255个字符之间，且不能包含以下字符之一： \ < > | " ? : *</asp:RegularExpressionValidator>
            </td>
        </tr> 
        <tr>
            <td align="right">幻灯图片：</td>
            <td>
                <asp:TextBox ID="PPFOR_productSlideImage" runat="server" Width="300px" MaxLength="255"></asp:TextBox>      
                <input type="button" value="选择图片" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" onclick="BrowseSlideImage();" />&nbsp;为空值则使用产品缩略图
                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" SetFocusOnError="true" ValidationExpression='^[/][^\\<>*?:|\"]{3,254}$' Display="Dynamic" ControlToValidate="PPFOR_productSlideImage"><br />图片文件路径必须以“/”开头，且长度必须在4至255个字符之间，且不能包含以下字符之一： \ < > | " ? : *</asp:RegularExpressionValidator>
            </td>
        </tr>            
        <tr style="display:<%=PPFOR_isUseMoreImages %>">
            <td align="right">更多图片：</td>
            <td>                
                <image:ImageList ID="PPFOR_imageList" runat="server"/>
            </td>
        </tr>
        <tr>
            <td align="right">产品属性：</td>
            <td>
                <asp:CheckBox ID="PPFOR_isNew" runat="server" Text="最新" />
                <asp:CheckBox ID="PPFOR_recommended" runat="server" Text="推荐" />               
                <asp:CheckBox ID="PPFOR_hot" runat="server" Text="热点" />
                <asp:CheckBox ID="PPFOR_slide" runat="server" Text="幻灯片" />
            </td>
        </tr>     
         <tr>
            <td align="right">发布时间：</td>
            <td>
                <asp:TextBox ID="PPFOR_publishDate" runat="server" Width="150px"></asp:TextBox><img src="../../Images/s.gif" alt="选择发布时间" border="0" style="cursor:pointer;" onclick="openTimeForSelect('<%=PPFOR_publishDate.ClientID%>');" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="PPFOR_publishDate" Display="Dynamic" SetFocusOnError="true" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]((((0?[13578])|(1[02]))[\-\/\s]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]((((0?[13578])|(1[02]))[\-\/\s]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[0-9])|(2[0-3])|(1[0-9]))\:([0-5]?[0-9])((\s)|(\:([0-5]?[0-9])))?))?$"><br />日期时间格式不正确</asp:RegularExpressionValidator>
            </td>
        </tr>      
        <tr>
            <td align="right">产品排序：</td>
            <td>
                <asp:TextBox ID="PPFOR_sort" runat="server" Text="0" MaxLength="4"></asp:TextBox>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="PPFOR_sort" Display="Dynamic" SetFocusOnError="true" Type="Integer" MinimumValue="-999" MaximumValue="9999">排序顺序只能填写-999至9999之间的整数</asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td align="right">是否显示：</td>
            <td>
                <asp:CheckBox ID="PPFOR_show" runat="server" Checked="true"/>
            </td>
        </tr>
        <tr>
            <td align="right">开放权限：</td>
            <td>
                <asp:RadioButton ID="PPFOR_publicSection" runat="server" GroupName="fileSection" Text="无限制" Checked="true" />&nbsp;&nbsp;&nbsp;
                <asp:RadioButton ID="PPFOR_memberSection" runat="server" GroupName="fileSection" Text="限制会员等级" />&nbsp;&nbsp;&nbsp;
                <asp:CheckBoxList ID="PPFOR_memberDegrees" CssClass="innertable" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"></asp:CheckBoxList>               
            </td>
        </tr>  
        <tr>
            <td colspan="2" style="background-color: #f2f2f2" align="left"><asp:Label ID="PPFOR_shoppingState" runat="server"></asp:Label></td>
        </tr>
         <tr id="divShopRow_1" style="display:none">
            <td align="right">所属品牌：</td>
            <td>
                <asp:DropDownList ID="PPFOR_productBrandList" runat="server" Width="300px">
                </asp:DropDownList>               
            </td>
        </tr>
         <tr id="divShopRow_2" style="display:none">
            <td align="right">产品编号：</td>
            <td>
                <asp:TextBox ID="PPFOR_productNo" runat="server" MaxLength="18"></asp:TextBox> 
            </td>
        </tr>   
       <tr id="divShopRow_3" style="display:none">
            <td align="right">积分：</td>
            <td>
                <asp:TextBox ID="PPFOR_productScore" runat="server" Text="0" MaxLength="10"></asp:TextBox>                
            </td>
        </tr> 
        <tr id="divShopRow_4" style="display:none">
            <td align="right">市场价：</td>
            <td>
                <asp:TextBox ID="PPFOR_productMarketPrice" runat="server" Text="0.000" MaxLength="19"></asp:TextBox>                
            </td>
        </tr>        
         <tr id="divShopRow_5" style="display:none">
            <td align="right">货号：</td>
            <td>
                <asp:TextBox ID="PPFOR_productCode" runat="server" MaxLength="18"></asp:TextBox>                     
            </td>
        </tr>   
        <tr id="divShopRow_6" style="display:none">
            <td align="right">库存：</td>
            <td>
                <asp:TextBox ID="PPFOR_productStore" runat="server" Text="99" MaxLength="10"></asp:TextBox>               
            </td>
        </tr>   
        <tr id="divShopRow_7" style="display:none">
            <td align="right">销售价：</td>
            <td>
                <asp:TextBox ID="PPFOR_productPrice" runat="server" Text="0.000" MaxLength="19"></asp:TextBox>               
                <span style="cursor:pointer;" class="spec_pic" onclick="getDegreePrice('<%=PPFOR_productPrice.ClientID %>','<%=PPFOR_degreePrice.ClientID %>');">会员价</span>
                <asp:HiddenField ID="PPFOR_degreePrice" runat="server" />            
            </td>
        </tr>   
        <tr id="divShopRow_8" style="display:none">
            <td align="right">成本价：</td>
            <td>
                <asp:TextBox ID="PPFOR_productCost" runat="server" Text="0.000" MaxLength="19"></asp:TextBox>                
            </td>
        </tr> 
         <tr id="divShopRow_9" style="display:none">
            <td align="right">重量：</td>
            <td>
                <asp:TextBox ID="PPFOR_productWeight" runat="server" Text="0.000" MaxLength="13"></asp:TextBox>              
            </td>
        </tr>    
          <tr id="divShopRow_spec" style="display:none">
            <td colspan="2" style="width:100%" id="goodsArea">
                <div id="div_noSpec">
                    <input type="button" value="开启规格" class="blueinput" id="btn_useSpec" onclick="openSpecListForSelect('<%=PPFOR_specIds %>');" />&nbsp; 开启规格前先填写以上价格等信息，可自动复制信息到货品
                </div>
                <div id="div_useSpec" style="display:none;"></div>
                <input type="hidden" value="" id="productSpecIds" name="productSpecIds" />
            </td>
        </tr>        
       <tr>
            <td colspan="2" style="background-color: #f2f2f2" align="left">                
                <input type="checkbox" id="PPFOR_ckeSeo" runat="server" checked="checked" onclick="show(this)" />Seo 优化设置 & 其它
            </td>
        </tr>     
        <tr id="divSeo1">
            <td align="right">Meta关键字：</td>
            <td>
                <asp:TextBox ID="PPFOR_pageKeyWord" runat="server" Width="98%" MaxLength="255"></asp:TextBox><br />
                <input type="checkbox" id="PPFOR_pageKeyWordAuto" runat="server" checked="checked" />自动获取
            </td>
        </tr>
        <tr id="divSeo2">
            <td align="right">Meta描述：</td>
            <td>
                <asp:TextBox ID="PPFOR_pageDescription" runat="server" Width="98%" MaxLength="255"></asp:TextBox><br />                         
                <input type="checkbox" id="PPFOR_pageDescriptionAuto" runat="server" checked="checked" />自动获取
            </td>                  
        </tr>              
        <tr>
            <td colspan="2" style="width:100%; height:50px; display:none" align="center" valign="middle">
                <asp:Button ID="PPFOR_updateProduct" CssClass="inputbutton" runat="server" Text="提交" OnClick="PPFOR_updateProductClick"/>
                <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" onclick="location.reload();" />
                    <script type="text/javascript">
                        addButtonArray("<%= PPFOR_updateProduct.ClientID %>","reset1");
                    </script> 
            </td>
        </tr> 
        </table>
    </form>
    <div id="div_specValueList" style="position: absolute; z-index: 65535; display: none; border:1px solid #36c;vertical-align:middle; padding-right:5px; padding-top:5px; padding-bottom:5px; background-color:White;"></div>
</asp:Content>
