📄 coupon.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
ValidateRequest="false" Codebehind="Coupon.aspx.cs" Inherits="PowerEasy.WebSite.Admin.Shop.Coupon"
Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="server">
<pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
<tr align="center">
<td colspan="2" class="spacingtitle">
<b>
<asp:Label ID="LblTitle" runat="server" Text="添加优惠券"></asp:Label></b>
</td>
</tr>
<tr class="tdbg">
<td style="width: 35%" class="tdbgleft">
<b>优惠券名称:</b></td>
<td>
<asp:TextBox ID="TxtCouponName" runat="server" MaxLength="50"></asp:TextBox>
<pe:RequiredFieldValidator ID="ValrCouponName" runat="server" ErrorMessage="优惠券名称不能为空"
ControlToValidate="TxtCouponName" Display="Dynamic"></pe:RequiredFieldValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>优惠券号码生成格式:</b>
<br />
说明:每个?代表一个英文字母,#代表一个数字, *代表一个英文字母或数字(自定义符号必须是半角)
</td>
<td>
<asp:TextBox ID="TxtCouponNumPattern" runat="server" Text="PE???###?#*" MaxLength="50"></asp:TextBox>
<pe:RequiredFieldValidator ID="ValrCouponNumPattern" runat="server" ErrorMessage="优惠券号码生成格式不能为空"
ControlToValidate="TxtCouponNumPattern" Display="Dynamic"></pe:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="Vale" runat="server" ControlToValidate="TxtCouponNumPattern"
Display="dynamic" SetFocusOnError="true" ValidationExpression="\S*(\?+\#*\**|\#+\?*\**|\*+\#*\?*)\S*"
ErrorMessage="优惠券号码生成格式中至少需要有“?、#、*”中的一种"></asp:RegularExpressionValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>面值:</b></td>
<td>
<asp:TextBox ID="TxtMoney" runat="server" MaxLength="50"></asp:TextBox>
<pe:RequiredFieldValidator ID="ValrMoney" runat="server" ErrorMessage="优惠券面值不能为空"
ControlToValidate="TxtMoney" Display="Dynamic"></pe:RequiredFieldValidator>
<pe:MoneyValidator ID="VmoneyMoney" ControlToValidate="TxtMoney" Display="dynamic"
runat="server"></pe:MoneyValidator>优惠券面值添加后不允许修改
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>优惠券状态:</b></td>
<td>
<asp:RadioButtonList ID="RadlState" RepeatDirection="Horizontal" runat="server">
<asp:ListItem Selected="true" Value="1">启用</asp:ListItem>
<asp:ListItem Value="0">禁用</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>适用会员组:</b></td>
<td>
<asp:CheckBoxList ID="ChklUserGroup" DataTextField="value" RepeatColumns="4" DataValueField="key"
RepeatDirection="horizontal" runat="server">
</asp:CheckBoxList>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>赠送开始时间:</b></td>
<td>
<pe:DatePicker ID="DpkBeginDate" runat="server"></pe:DatePicker>
<pe:DateValidator ID="VdateBeginDate" ControlToValidate="DpkBeginDate" runat="server"
Display="Dynamic" SetFocusOnError="True"></pe:DateValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>赠送截止时间:</b></td>
<td>
<pe:DatePicker ID="DpkEndDate" runat="server"></pe:DatePicker>
<pe:DateValidator ID="VdateEndDate" ControlToValidate="DpkEndDate" runat="server"
Display="Dynamic" SetFocusOnError="True"></pe:DateValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>获得优惠券方式:</b></td>
<td>
<asp:RadioButtonList AutoPostBack="true" ID="RadlCouponCreateType" RepeatColumns="2"
runat="server" RepeatDirection="horizontal" OnSelectedIndexChanged="RadlCouponCreateType_SelectedIndexChanged">
<asp:ListItem Selected="true" Value="0">购买任意商品可得到此优惠券</asp:ListItem>
<asp:ListItem Value="1">购买指定模型下的商品可得到此优惠券</asp:ListItem>
<asp:ListItem Value="2">购买指定商品可得到此优惠券</asp:ListItem>
<asp:ListItem Value="3">订单满足一定金额可得到此优惠券</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<asp:PlaceHolder runat="server" ID="PlhSelectProduct" Visible="false">
<tr class="tdbg">
<td class="tdbgleft">
<b>
<asp:Label runat="server" ID="LblSelectProductTitle"></asp:Label></b></td>
<td>
<asp:PlaceHolder runat="server" ID="PlhList" Visible="false">
<table>
<tr>
<td rowspan="2" style="width: 100px">
<asp:ListBox Width="200" Height="70" DataTextField="Value" DataValueField="Key" ID="LstSelectedProduct"
runat="server"></asp:ListBox>
<asp:CustomValidator ID="ValxSelectedProduct" ClientValidationFunction="ValxSelectedProduct_ClientValidate" Display="dynamic" ValidateEmptyText="true" SetFocusOnError="true" runat="server" ErrorMessage="指定商品不能为空" ControlToValidate="LstSelectedProduct"></asp:CustomValidator>
<asp:CustomValidator ID="ValxSelectedModel" ClientValidationFunction="ValxSelectedModel_ClientValidate" Display="dynamic" ValidateEmptyText="true" SetFocusOnError="true" runat="server" ErrorMessage="指定模型不能为空" ControlToValidate="LstSelectedProduct"></asp:CustomValidator>
<asp:HiddenField ID="HdnSelecedtProduct" runat="server" />
<asp:HiddenField ID="HdnAllValue" runat="server" />
</td>
<td style="width: 100px">
<asp:Button ID="BtnSelectProduct" runat="server" Text="添加" />
</td>
</tr>
<tr>
<td style="width: 100px">
<input type="button" class="inputbutton" onclick="DelProduct('<%=LstSelectedProduct.ClientID%>','<%=HdnSelecedtProduct.ClientID %>','<%=HdnAllValue.ClientID %>')"
value="删除" />
</td>
</tr>
</table>
</asp:PlaceHolder>
<asp:TextBox ID="TxtOrderMoney" runat="server" Visible="false"></asp:TextBox>
</td>
</tr>
</asp:PlaceHolder>
<tr class="tdbg">
<td class="tdbgleft">
<b>限用次数:</b></td>
<td>
<asp:TextBox ID="TxtLimitNum" runat="server" MaxLength="50"></asp:TextBox>
<pe:RequiredFieldValidator ID="ValrLimitNum" runat="server" ErrorMessage="优惠券限用次数不能为空"
ControlToValidate="TxtLimitNum" Display="Dynamic"></pe:RequiredFieldValidator>
<pe:NumberValidator ID="VnumLimitNum" ControlToValidate="TxtLimitNum" Display="dynamic"
runat="server"></pe:NumberValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>使用截止时间:</b></td>
<td>
<pe:DatePicker ID="DpkUseEndDate" runat="server"></pe:DatePicker>
<pe:DateValidator ID="VdateUseEndDate" ControlToValidate="DpkUseEndDate" runat="server"
Display="Dynamic" SetFocusOnError="True"></pe:DateValidator>
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft">
<b>限用商品:</b></td>
<td>
<asp:RadioButtonList ID="RadlProductLimit" runat="server" RepeatDirection="horizontal"
AutoPostBack="true" OnSelectedIndexChanged="RadlProductLimit_SelectedIndexChanged">
<asp:ListItem Selected="true" Value="0">所有商品</asp:ListItem>
<asp:ListItem Value="1">指定模型下的商品</asp:ListItem>
<asp:ListItem Value="2">指定商品</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<asp:PlaceHolder runat="server" ID="PlhProductLimit" Visible="false">
<tr class="tdbg">
<td class="tdbgleft">
<b>
<asp:Label runat="server" ID="LblProductLimitTitle"></asp:Label></b></td>
<td>
<table>
<tr>
<td rowspan="2" style="width: 100px">
<asp:ListBox Width="200" Height="70" DataTextField="Value" DataValueField="Key" ID="LstLimit"
runat="server"></asp:ListBox>
<asp:CustomValidator ID="ValcLimitProduct" ClientValidationFunction="ValcLimitProduct_ClientValidate" Display="dynamic" ValidateEmptyText="true" SetFocusOnError="true" runat="server" ErrorMessage="指定商品不能为空" ControlToValidate="LstLimit"></asp:CustomValidator>
<asp:CustomValidator ID="ValcLimitModel" ClientValidationFunction="ValcLimitdModel_ClientValidate" Display="dynamic" ValidateEmptyText="true" SetFocusOnError="true" runat="server" ErrorMessage="指定模型不能为空" ControlToValidate="LstLimit"></asp:CustomValidator>
<asp:HiddenField ID="HdnLimit" runat="server" />
<asp:HiddenField ID="HdnLimitAllValue" runat="server" />
</td>
<td style="width: 100px">
<asp:Button ID="BtnLimit" runat="server" Text="添加" />
</td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -