{layout:default} {class:Shop.Supplier.Config.BillType}
<lbhead>
    <title><%=Tag("发票管理")%>-<%=site.title%></title>
</lbhead>
<lbpath>
<style type="text/css">.mainbody_top{display:none;height:0;overflow:hidden}</style>
    <div class="tools">
    <ul>
    <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="DeleteObj();"><b></b><span><%=Tag("删除")%></span></a></li>
    <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_supplier.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Tag("发票管理")%></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="list" class="datalist">
        <tr class="title">
            <th style="width: 40px" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'Fid\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
            </th>
            <th style="width: 150px">
                <%=Tag("类型")%>
            </th>
            <th style="width: 80px">
                <%=Tag("税率")%>
            </th>
            <th>
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (Shop.Model.Lebi_Supplier_BillType model in models)
          {%>
        <tr class="list" ondblclick="EditObj(<%=model.id %>);" >
            <td align="center">
                <input type="checkbox" name="Fid" del="true" value="<%=model.id %>" />
                <input type="hidden" name="IDS" shop="true" value="<%=model.id %>" />
            </td>
            <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_BillType) %>
            </td>
            <td><%=model.TaxRate %></td>
            <td>
                <a href="javascript:void(0)" onclick="EditObj(<%=model.id %>);"><%=Tag("编辑")%></a>
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function EditObj(id) {
            var title_ = "<%=Tag("编辑发票类型")%>";
            if(id == 0)
                var title_ = "<%=Tag("添加发票类型")%>";
            var url_ = "BillType_Edit_window.aspx?id=" + id;
            var width_ = 500;
            var height_ = 200;
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function DeleteObj() {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_config.aspx?__Action=BillType_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>
