<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pmtrule_limit_time.aspx.cs" Inherits="XpShop.Manage.pmtrule_limit_time" %>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <!--#include file="../inc/head2.inc"-->
    <title>限时抢购规则</title>
    <script type="text/javascript" src="../inc/commond.js"></script>
    <script type="text/javascript" src="../inc/jquery.livequery.js"></script>
    <script type="text/javascript" src="inc/pmt_basic.js"></script>
    <script type="text/javascript" src="inc/pmt_limit_time.js"></script>
    <script src="inc/ui.datepicker.cn.js" type="text/javascript"></script>
	<link type="text/css" rel="stylesheet" href="inc/ui.datepicker.css" />
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" value="<%=pmtID %>" id="pmtid" name="pmtid">
    <input type="hidden" value="0" id="promotion_id" name="promotion_id">
    <input type="hidden" value="102" id="promotion_type" name="promotion_type">
    <input type="hidden" value="60" id="promo_product_max_num" name="promo_product_max_num">
    <input type="hidden" value="<%=selectedPids%>" id="check_product_ids" name="check_product_ids">
    <input type="hidden" value="1" id="PageNo" name="PageNo">
    <div class="container">
	    <div class="sub_container">
            <div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img alt="" src="../images/admin_title.jpg" height="9px" width="8px" align="absmiddle" /><a href='pmtrule_list.aspx'>促销活动管理</a><img alt="" src="../images/admin_title.jpg" height="9px" width="8px" align="absmiddle" /><label id="">限时抢购</label></div>
            <div class="sub_container_content" id="sub_container">
                <div class="frame">
				    <div id="step1" class="frame_title pmt_rule_title hand">第一步：设置促销名称、时间等信息</div>
				    <div class="frame_content pmt_rule_content">
				        <table cellspacing="0" cellpadding="0" class="ptable">
							<tr>
								<th class="tl">促销名称：</th>
								<td class="tr">
									<asp:textbox id="txtRuleName" Width="500px" runat="server" Text=""></asp:textbox><em class="xp-need">*</em>
								</td>
							</tr>
							<tr>
	                            <th class="tl">允许参加会员等级：</th>
	                            <td class="tr"><asp:CheckBoxList ID="chkListMemberGroup" runat="server" RepeatDirection="Horizontal" nane="chkListMemberGroup"></asp:CheckBoxList> </td>
	                        </tr>
	                        <tr>
	                            <th class="tl">是否允许使用优惠券：</th>
	                            <td class="tr">
	                                <asp:RadioButton ID="rbtnCanUseCouponOn" runat="server" Text="是" Checked="true" GroupName="UseCoupon" />
                                    <asp:RadioButton ID="rbtnCanUseCouponOff" runat="server" Text="否" GroupName="UseCoupon" />
	                            </td>
	                        </tr>
	                        <tr>
	                            <th class="tl">商品是否首页显示：</th>
	                            <td class="tr">
	                                <asp:RadioButton ID="rbtHomeShowOn" runat="server" Text="是" Checked="true" GroupName="HomeShow" />
                                    <asp:RadioButton ID="rbtHomeShowOff" runat="server" Text="否" GroupName="HomeShow" />
	                            </td>
	                        </tr>
	                        <tr>
	                            <th class="tl">所属银行：</th>
	                            <td class="tr">
                                    <asp:DropDownList ID="ddlBank" runat="server">   
                                        <asp:ListItem Value="-1">选择银行</asp:ListItem>                                     
                                        <asp:ListItem Value="2">工商银行</asp:ListItem>
                                        <asp:ListItem Value="5">招商银行</asp:ListItem>
                                        <asp:ListItem Value="1">中国银行</asp:ListItem>
                                        <asp:ListItem Value="3">建设银行</asp:ListItem>
                                        <asp:ListItem Value="4">农业银行</asp:ListItem>
                                        <asp:ListItem Value="6">交通银行</asp:ListItem>
                                        <asp:ListItem Value="7">光大银行</asp:ListItem>
                                    </asp:DropDownList>
	                            </td>
	                        </tr>
							<tr>
	                            <th class="tl">活动开始时间：</th>
	                            <td class="tr">
	                                <asp:TextBox ID="txtTimeBegin" runat="server" Width="120px" Height="18px" style="line-height:18px;background-image:url(../images/calendar.gif);background-repeat:no-repeat;padding-left:20px;" ReadOnly="true"></asp:TextBox>
	                                <select id="startHour" name="startHour" runat="server">
						                <option value="0" selected="">00</option><option value="1">01</option><option value="2">02</option><option value="3">03</option><option value="4">04</option><option value="5">05</option><option value="6">06</option><option value="7">07</option><option value="8">08</option><option value="9">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option>
						            </select> 时
	                                <em class="xp-need">*</em>
	                            </td>
	                        </tr>
	                        <tr>
	                            <th class="tl">结束时间：</th>
	                            <td class="tr">
	                                <asp:TextBox ID="txtTimeEnd" runat="server" Width="120px" Height="18px" style="line-height:18px;background-image:url(../images/calendar.gif);background-repeat:no-repeat;padding-left:20px;" ReadOnly="true"></asp:TextBox>
	                                <select id="endHour" name="endHour" runat="server">
						                <option value="0" selected="">00</option><option value="1">01</option><option value="2">02</option><option value="3">03</option><option value="4">04</option><option value="5">05</option><option value="6">06</option><option value="7">07</option><option value="8">08</option><option value="9">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option>
						            </select> 时
	                                <em class="xp-need">*</em>
	                            </td>
	                        </tr>
	                        <tr>
	                            <th class="tl">促销广告：</th>
	                            <td class="tr">
	                                <FTB:FREETEXTBOX id="ftbRuleAD" runat="Server" Width="99%" ButtonOverImage="True" ButtonDownImage="True" ButtonPath="../images/ftb/officeXP/" ToolbarType="OfficeXP" HelperFilesPath="../" ImageGalleryPath="Upload/RuleAD/"></FTB:FREETEXTBOX>
	                          </td>
	                        </tr>  
	                        <tr>
	                            <th class="tl">规则描述：</th>
	                            <td class="tr">
	                                <asp:TextBox ID="txtRemark" Width="99%" Height="120px" TextMode="MultiLine" runat="server"></asp:TextBox>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td colspan="2" class="center"><input type="button" value=" 确  定 " id="btnStep1" name="btnStep1"></td>
	                        </tr>
						</table>
				    </div>
				</div>
				<div class="frame">
				    <div id="step2" class="frame_title pmt_rule_title hand">第二步：选择促销商品</div>
				    <div id="step_2" class="frame_content pmt_rule_content hide">
				        <table>
	                        <tbody>
	                        <tr align="left">
		                        <td width="70px">商品名称：</td>
		                        <td width="180px"><input type="text" value="" id="search_name" name="search_name"></td>
		                        <td style="text-align:right">商品ID：</td>
		                        <td width="600px"><input type="text" value="" id="productids" name="productids" size="50"> 可输入多个商品id，用半角逗号隔开。</td>
	                            <td></td>
	                        </tr>
	                        <tr style="text-algin:left;height: 35px">
		                        <td width="70px">店内分类：</td>
		                        <td width="180px">
		                            <select name="subcat" id="subcat">
		                            <%=BindCategories() %>
                                    </select>
                              </td>
                              <td style="text-align:right">品    牌：</td>
		                      <td width="600px">
		                            <select id="brand" name="brand">
                                        <%=BindBrand("0")%>
                                    </select>
		                      </td>
                              <td style=text-align: right;">
		                            <input type="button" id="search_product" name="search_product" value=" 查询 ">
		                            <input type="hidden" value="0" id="is_search_product" name="is_search_product">
	                          </td>
                        </tr>
                        </tbody>
                       </table>
                       <div id="productlist"></div>
                       <%--
                       <table class="pptable">
                            <tbody>
                            <tr class="form_blue">
	                            <th width="6%"><input type="checkbox" id="product_all" name="product_all"></th>
	                            <th width="8%">缩略图</th>
	                            <th width="64%">商品名称</th>
	                            <th width="8%">商品价格</th>
	                            <th width="14%">操作</th>
                            </tr>
	                        <tr id="row_1109624402">
	                            <td><input type="checkbox" value="1109624402" name="check_product"></td>
	                            <td class="pimg"><a href="http://product.dangdang.com/Product.aspx?product_id=1109624402" target="_blank"><img style="width:50px;height: 50px" src="http://img32.ddimg.cn/29/26/1109624402-1_x.jpg"></a></td>
	                            <td class="pname"><a href="http://product.dangdang.com/Product.aspx?product_id=1109624402" class="blue" target="_blank">TCL移动空调时尚风系列 KYD-32/DY 1.5P冷暧型</a></td>
	                            <td class="pprice">3688</td>
	                            <td>已参与<br><span value="1109624402" id="cancel_product_1109624402" class="cancel_product hand">取消</span></td>
                            </tr>
		                    <tr id="row_1109617702">
	                            <td><input type="checkbox" value="1109617702" name="check_product"></td>
	                            <td class="pimg"><a href="http://product.dangdang.com/Product.aspx?product_id=1109617702" target="_blank"><img style="width:50px;height: 50px" src="http://img32.ddimg.cn/61/23/1109617702-1_x.jpg"></a></td>
	                            <td class="pname"><a href="http://product.dangdang.com/Product.aspx?product_id=1109617702" class="blue" target="_blank">TCL移动空调KY-25/VY 超值1P单冷型</a></td>
	                            <td class="pprice">2399</td>
	                            <td><span value="1109617702" id="add_product_1109617702" class="add_product hand">参加促销</span></td>
                            </tr>
	                        </tbody>
	                     </table>
	                     <div style="margin-top:5px;text-align:center;" class="form_table_page">
	                        <span style="margin-left:10px">共选择了<em id="select_product_num">1</em>个商品</span>
                            共159条记录 每页显示10条 分16页显示 当前第 1 页 
                            [<b>1</b>] 
                            <a href="2" class="page">[2]</a> 
                            <a href="3" class="page">[3]</a> 
                            <a href="4" class="page">[4]</a> 
                            <a href="5" class="page">[5]</a> 
                            <a href="6" class="page">[6]</a> 
                            <a href="7" class="page">[7]</a> 
                            <a href="2" class="page">下一页</a> 
                            <a href="16" class="page">末页</a> 
                            跳转到第<input type="text" name="PageNo_2" class="PageNo_2" size="2">页
                            <input type="submit" value="确定" name="submitp" class="submitp">
                        </div>
                         --%>
                        <div style="text-align: center"><input type="button" value=" 完成设置 " id="btnStep2" name="btnStep2"></div>
				    </div>
				</div>
				<div class="frame">
				    <div id="step3" class="frame_title pmt_rule_title hand">第三步：设置促销价格</div>
				    <div id="step_3" class="frame_content pmt_rule_content hide">
				        <table class="pptable">
	                        <tbody id="step3_body">
	                        <tr>
		                        <th width="6%">缩略图</th>
		                        <th width="16%">商品名称</th>
		                        <th width="10%">商品价格（元）</th>
		                        <th width="12%">抢购价（元）</th>
		                        <th width="12%">抢购数量</th>
		                        <th width="12%">每账户限购数量</th>
		                        <th width="8%">排序</th>
		                        <th width="6%">操作</th>
	                        </tr>
	                        <%if (dtPmtGoods != null && dtPmtGoods.Rows.Count > 0)
                           {%>
	                        <%for(int i=0;i<dtPmtGoods.Rows.Count;i++){%>
	                        <tr id="newrow_<%=dtPmtGoods.Rows[i]["ProductID"]%>">
		                        <td><img height="50px" width="50px" src="<%=webSite%>upload/productimg/<%=dtPmtGoods.Rows[i]["ImgFolder"]%><%=dtPmtGoods.Rows[i]["ProductImg"]%>"></td>
		                        <td><a href="<%=webSite %>products/product-<%=dtPmtGoods.Rows[i]["ProductID"]%>.<%=config.html %>" target="_blank"><%=dtPmtGoods.Rows[i]["ProductName"]%></a></td>
		                        <td><%=dtPmtGoods.Rows[i]["MemberPrice"]%></td>
		                        <td><input type="text" size="12" name="pmtprice" value="<%=string.Format("{0:f2}",dtPmtGoods.Rows[i]["PmtPrice"])%>"/></td>
		                        <td><input type="text" size="12" name="pmtnum" value="<%=dtPmtGoods.Rows[i]["PmtNumber"]%>"/></td>
		                        <td><input type="text" size="12" name="limitnum" value="<%=dtPmtGoods.Rows[i]["LimitedNumber"]%>"/></td>
		                        <td>
		                            <input type="text" size="5" name="sort" value="<%=dtPmtGoods.Rows[i]["Sort"]%>"/>
		                            <input type="hidden" value="<%=dtPmtGoods.Rows[i]["ID"]%>" name="ids"/>
			                        <input type="hidden" value="<%=dtPmtGoods.Rows[i]["ProductID"]%>" name="pids"/>
                                    <input type="hidden" value="<%=dtPmtGoods.Rows[i]["GoodsID"]%>" name="gids"/>
                                </td>
		                        <td><span value="<%=dtPmtGoods.Rows[i]["ProductID"]%>" class="step3_cancle_product hand">取消</span></td>
	                        </tr>
	                        <%}}%>
	                        <%--
		                    <tr id="newrow_1109624402" class="hide">
		                        <td><img height="50px" width="50px" src="http://img32.ddimg.cn/29/26/1109624402-1_x.jpg"></td>
		                        <td>TCL移动空调时尚风系列 KYD-32/DY 1.5P冷暧型</td>
		                        <td>3688</td>
		                        <td><input type="text" size="12" name="pmtprice" value=""></td>
		                        <td><input type="text" size="12" name="limitnum" value=""></td>
		                        <td>
		                            <input type="text" size="5" name="sort" value="">
			                        <input type="hidden" value="1109624402" name="pids">
		                        </td>
		                        <td><span value="1109624402" class="step3_Cancle_product hand">取消</span></td>
	                        </tr>
	                         --%>
	                        </tbody>
	                     </table>
	                     <div style="text-align: center;margin: 30px auto 30px auto">
	                        <asp:Button ID="btnSave" runat="server" Text=" 保存设置 " onclick="btnSave_Click" />
	                     </div>
				    </div>
				</div>
				<div class="frame">
				    <div class="frame_title">提示：</div>
				    <div class="frame_content">
	                1、支持VIP价格的商品，参加单品促销后，不再享受VIP价格且不再赠送积分。<br>
	                2、每个商品同一时间只能参加一种单品促销。
	                </div>
                </div>
			</div>
		</div>
	</div>
    </form>
</body>
</html>
