<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CouponPmtAdd_Step2.aspx.cs" Inherits="XpShop.Manage.CouponPmtAdd_Step2" %>
<!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 src="../../inc/jquery.query.js" type="text/javascript"></script>
    <script type="text/javascript" src="inc/pmt_coupon_issue.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="2" id="promotion_type" name="promotion_type">
    <input type="hidden" value="<%=selectedPids%>" id="check_product_ids" name="check_product_ids">
    <input type="hidden" value="<%=selectedCids%>" id="check_coupon_ids" name="check_coupon_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 id="MemberGroup" class="hide">
	                            <th class="tl">允许参加会员等级：</th>
	                            <td class="tr"><asp:CheckBoxList ID="chkListMemberGroup" runat="server" RepeatDirection="Horizontal" nane="chkListMemberGroup"></asp:CheckBoxList> </td>
	                        </tr>
	                        <tr id="OrderMoney" class="hide">
                                <th class="tl">订单条件：</th>
                                <td class="tr">
                                    <asp:TextBox ID="txtOrderMoneyFrom" runat="server" Height="18px" Style="line-height: 18px;" Width="80px" onkeyup="value=value.replace(/[^(\d|\.)]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^(\d|\.)]/g,''))"></asp:TextBox> ≤ 订单金额 < <asp:TextBox ID="txtOrderMoneyTo" runat="server" Height="18px" Style="line-height: 18px;" Width="80px" onkeyup="value=value.replace(/[^(\d|\.)]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^(\d|\.)]/g,''))"></asp:TextBox><em>*</em>
                                </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">
	                                <asp:TextBox ID="txtRemark" Width="500px" 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 id="frame2" class="frame hide">
				    <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>
                        <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="5%"><input type="checkbox" name="coupon_all" id="coupon_all"></th>
		                        <th width="16%">优惠券名称</th>
		                        <th width="10%">面额</th>
		                        <th width="10%">有效期(天数)</th>
		                        <th width="10%">每次赠送数量</th>
	                        </tr>
	                        <%if (dtPmtCoupon != null && dtPmtCoupon.Rows.Count > 0){%>
	                        <%for (int i = 0; i < dtPmtCoupon.Rows.Count; i++){%>
	                        <tr id="newrow_<%=dtPmtCoupon.Rows[i]["CouponID"]%>">
	                            <%if (dtPmtCoupon.Rows[i]["IsSelected"].ToString() == "1"){%>
	                            <td><input type="checkbox" checked="checked" name="check_coupon" id="check_coupon_<%=dtPmtCoupon.Rows[i]["CouponID"]%>" value="<%=dtPmtCoupon.Rows[i]["CouponID"]%>"></td>
		                        <%}else{ %>
		                        <td><input type="checkbox" name="check_coupon" id="check_coupon_<%=dtPmtCoupon.Rows[i]["CouponID"]%>" value="<%=dtPmtCoupon.Rows[i]["CouponID"]%>"></td>
		                        <%} %>
		                        <td><%=dtPmtCoupon.Rows[i]["CouponName"]%></td>
		                        <td><%=dtPmtCoupon.Rows[i]["CouponValue"]%></td>
		                        <td>
		                            <%if (dtPmtCoupon.Rows[i]["IsSelected"].ToString() == "1"){%>
		                            <input type="text" size="12" name="validity" value="<%=dtPmtCoupon.Rows[i]["Validity"]%>">
		                            <%}else{ %>
		                            <input type="text" size="12" disabled="true" name="validity" value="<%=dtPmtCoupon.Rows[i]["Validity"]%>">
		                            <%} %>
		                        </td>
		                        <td>
		                            <%if (dtPmtCoupon.Rows[i]["IsSelected"].ToString() == "1"){%>
		                            <input type="text" size="12" name="pmtnum" value="<%=dtPmtCoupon.Rows[i]["PmtNumber"]%>">
		                            <%}else{ %>
		                            <input type="text" size="12" disabled="true" name="pmtnum" value="<%=dtPmtCoupon.Rows[i]["PmtNumber"]%>">
		                            <%} %>
		                        </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">
	                2、每个商品同一时间只能参加一种单品促销。
	                </div>
                </div>
			</div>
		</div>
	</div>
</form>
</body>
</html>
