📄 proproperty.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../Masterpage/Page.Master" CodeBehind="ProProperty.aspx.cs" Inherits="YXShop.Web.Admin.Product.ProProperty" %>
<%@ Register Src="../Control/ProductCategoriesList.ascx" TagName="ProductCategoriesList" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script type="text/javascript">
window.onload = function()
{
ChangeBackColor("ProProperty",0);
}
</script>
<script type="text/javascript">
//切换商品的分类列表的显示与隐藏
function checkProClass()
{
var proClass= document.getElementById("proClassDiv");
if (document.getElementById("cbProClass").checked==true)
{
proClass.style.display="none";
}
else
{
proClass.style.display="";
}
}
//根据所选的扩展属性类型来显示与隐藏属性的可选值输入框
function checkProType(value)
{
var ProP_Value=document.getElementById("divProP_Value");
var noProPertyValue=document.getElementById("noValue");
if (value!=4&&value!=5)
{
ProP_Value.style.display="";
noProPertyValue.style.display="none";
}
else
{
ProP_Value.style.display="none";
noProPertyValue.style.display="";
}
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server">
<table id="ProProperty" class="hy" cellspacing="1" bgcolor="#CCCCCC" cellpadding="1" width="100%" border="0">
<tr>
<td class="titles" colspan="2">
<asp:Label ID="Label1" runat="server" Text="添加商品扩展属性"></asp:Label>
</td>
</tr>
<tr>
<td class="leftColumn">
属性名称 :
</td>
<td class="middleColumn">
<asp:TextBox ID="txtProP_Filed" runat="server" Width="200px" MaxLength="1000"></asp:TextBox>
</td>
</tr>
<tr>
<td class="leftColumn">
属性所属的商品分类 :
</td>
<td class="middleColumn">
<div id="proClassDiv">
<uc1:ProductCategoriesList ID="ProductCategoriesList1" runat="server" />
<div class="Description">
请选择该属性所属的商品分类,支持多选(按住Ctrl键不放,再点击鼠标即可进行多选操作)</div>
</div>
<input type="checkbox" name="cbProClass" value="1" id="cbProClass" onclick="checkProClass();" />该属性属于所有商品分类
</td>
</tr>
<tr>
<td class="leftColumn">
属性类型:
</td>
<td class="middleColumn">
<select id="ddlProType" name="ddlProType" onchange="checkProType(this.value);">
<option value="1">从下拉列表中选择</option>
<option value="2">单选</option>
<option value="3">多选</option>
<option value="4">单行文本</option>
<option value="5">多行文本</option>
</select>
</td>
</tr>
<tr>
<td class="leftColumn">
是否必填 :
</td>
<td class="middleColumn">
<asp:RadioButtonList ID="rblProP_Term" RepeatDirection="Horizontal" runat="server">
<asp:ListItem Value="1" Selected="True">是</asp:ListItem>
<asp:ListItem Value="0">不是</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td class="leftColumn">
显示顺序 :
</td>
<td class="middleColumn">
<asp:TextBox ID="txtProP_Order" runat="server" Width="200px" MaxLength="4" Text="0"></asp:TextBox>
<div class="Description">
请输入0——1000之间的整数,值越小,显示顺序越靠前</div>
</td>
</tr>
<tr>
<td class="leftColumn">
可选值列表 :
</td>
<td class="middleColumn">
<div id="divProP_Value">
<asp:TextBox ID="txtProP_Value" runat="server" Width="200px" Height="60px" TextMode="MultiLine"
MaxLength="2500"></asp:TextBox><div class="Description">
当您选择了属性类别为从下拉列表中选择、单选或多选的时候,请在此输入属性的可选值,每行表示一个可选值</div>
</div>
<div id="noValue" class="Description" style="display: none">
您当前所选的属性类型不需要填写属性可选值</div>
</td>
</tr>
<tr style="display:none">
<td class="leftColumn">
显示控制 :
</td>
<td class="middleColumn">
<asp:CheckBoxList ID="cbControl" runat="server">
<asp:ListItem Value="1" Text="内容页"></asp:ListItem>
<asp:ListItem Value="2" Text="列表页"></asp:ListItem>
<asp:ListItem Value="3" Text="列表页"></asp:ListItem>
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td height="25" class="bottomRow" colspan="3">
<div align="center">
<asp:Button ID="btnAdd" runat="server" Text="提 交" OnClick="btnAdd_Click"></asp:Button>
<input type="reset" value="重 填" />
</div>
</td>
</tr>
</table>
<script type="text/javascript">
//商品扩展类型与可选值输入框的联动
var len=document.getElementById("ddlProType").options.length;
var ProP_Value=document.getElementById("divProP_Value");
var noProPertyValue=document.getElementById("noValue");
for (var i=0;i<len;i++)
{
if(document.getElementById("ddlProType").options[i].value=="<%= ProP_Type%>")
{
document.getElementById("ddlProType").options[i].selected=true;
if (document.getElementById("ddlProType").options[i].value!=4&&document.getElementById("ddlProType").options[i].value!=5)
{
ProP_Value.style.display="";
noProPertyValue.style.display="none";
}
else
{
ProP_Value.style.display="none";
noProPertyValue.style.display="";
}
}
}
//扩展属性是否属于商品分类的层显示与隐藏
var proClass= document.getElementById("proClassDiv");
if ("<%= Pro_ID%>"=="0")
{
document.getElementById("cbProClass").checked=true;
proClass.style.display="none";
}
</script>
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="ContentPlaceTitle">
<a href="ProProperty_List.aspx">商品扩展属性管理</a> >> <asp:Label ID="lblTitle" runat="server" Text="添加商品扩展属性"></asp:Label>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -