{layout:default} {class:Shop.Admin.Config.CardType}
<lbhead>
    <title><%=Tag("优惠券")%>-<%=site.title%></title>
</lbhead>
<lbfile>
    <style type="text/css">.mainbody_top{display:none;height:0;overflow:hidden}</style>
</lbfile>
<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="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Shop.Bussiness.EX_Type.TypeName(type) %></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <table id="list" class="datalist">
        <tr class="title">
            <th style="width: 100px">
                <%=Tag("类型")%>
            </th>
            <th style="width: 100px">
                <%=Tag("名称")%>
            </th>
            <th style="width: 100px">
                <%=Tag("面值")%>
            </th>
            <th style="width: 100px">
                <%=Tag("头字符")%>
            </th>
            <th style="width: 100px">
                <%=Tag("找零")%>
            </th>
            <th style="width: 100px">
                <%=Tag("最低消费")%>
            </th>
            <th style="width: 110px">
                <%=Tag("号码段")%>
            </th>
            <th >
                <%=Tag("限制分类")%>
            </th>
            <th style="width: 60px">
                <%=Tag("生成")%>
            </th>
            <th >
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_CardOrder model in models)
          {%>
        <tr class="list" ondblclick="EditObj(<%=model.id %>);" >
            <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_CardType) %>
            </td>
            <td>
                <%=Shop.Bussiness.Language.Content(model.Name, CurrentLanguage.Code)%>
            </td>
            <td>
                <%=model.Money%>
            </td>
            <td>
                <%=model.IndexCode%>
            </td>
            <td>
                <%=model.IsPayOnce==0?Tag("是"):Tag("否") %>
            </td>
             <td>
                <%=model.Money_Buy%>
            </td>
            <td>
                <%=model.NO_Start+" - "+model.NO_End%>
            </td>
            <td><%=Shop.Bussiness.EX_Product.TypeNames(model.Pro_Type_ids,CurrentLanguage.Code) %></td>
            <td>
                <%=model.NO_End==model.NO_Now?Tag("完毕"):"-" %>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="EditObj(<%=model.id %>);"><%=Tag("编辑")%></a>
                <%if (model.NO_End > model.NO_Now)
                  { %>
                | <a href="javascript:void(0)" onclick="CreateObj(<%=model.id %>);"><%=Tag("生成")%></a>
                <%} %>
                <%if (model.Type_id_CardType == 312){ %><a href="<%=Shop.Bussiness.ThemeUrl.GetURL("P_UserCardGet",model.id.ToString(),"",CurrentLanguage.Code)%>" target="_blank"><%=Tag("申请链接")%></a><%} %>
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function EditObj(id) {
            var title_ = "<%=Tag("编辑优惠券")%>";
            if (id == 0) title_ = "<%=Tag("添加优惠券")%>"
            var url_ = "cardtype_edit_window.aspx?id=" + id;
            var width_ = 750;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function CreateObj(id) {
            var title_ = "<%=Tag("生成优惠券")%>";
            var url_ = "card_create_window.aspx?id=" + id;
            var width_ = 450;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>