{layout:default} {class:Shop.Admin.promotion.Promotion}
<lbhead>
    <title><%=Tag("规则")%>-<%=Tag("优惠促销")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
        <ul>
            <%if (PageReturnMsg == ""){%>
            <li class="add"><a href="javascript:void(0);" onclick="Editobj(0);"><b></b><span><%=Tag("添加")%></span></a></li>
            <li class="del"><a href="javascript:void(0);" onclick="Delobj();"><b></b><span><%=Tag("删除")%></span></a></li>
            <%}%>
            <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a>
                > <a href="Default.aspx"><%=Tag("优惠促销")%></a>
                > <a href="PromotionType_Edit.aspx?id=<%=pt.id %>"><%=Lang(pt.Name)%></a> 
                > <%=Tag("规则")%> 
              </span>
            </li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <table class="datalist">
        <tr class="title">
           <th style="width: 40px" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'id\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
            </th>
            <th >
                <%=Tag("描述")%>
            </th>
            <th width="130px">
                <%=Tag("添加时间")%>
            </th>
            <th width="120px">
                <%=Tag("管理员")%>
            </th>
            <th width="80px">
                <%=Tag("排序")%>
            </th>
            <th width="100px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_Promotion model in models)
          {%>
        <tr class="list" ondblclick="Editobj(<%=model.id %>);">
            <td style="text-align:center">
                <input type="checkbox" name="id" value="<%=model.id %>" del="true" />
            </td>
            <td>
                <%=model.Remark %>
            </td>
            <td>
                <%=FormatTime(model.Time_Add) %>
            </td>
            <td>
                <%=model.Admin_UserName%>
            </td>
            <td>
                <%=model.Sort %>
            </td>
            <td>
                <a href="javascript:Editobj(<%=model.id %>);"><%=Tag("编辑")%></a>
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function Editobj(id) {
            window.location = "promotion_edit.aspx?tid=<%=pt.id %>&id=" + id;
        }
        function Delobj() {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_sale.aspx?__Action=Promotion_Del";
            RequestAjax(url,postData,function(res){MsgBox(1, "<%=Tag("操作成功")%>", '?')});
        }
    </script>
</lbbody>
<lbbottom>
    <div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>