{layout:default} {class:Shop.Admin.storeConfig.Pay}
<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>
    <%if (PageReturnMsg == ""){%>
    <li class="add"><a href="javascript:void(0);" onclick="EditObj(0);"><b></b><span><%=Tag("添加")%></span></a></li>
    <li class="submit"><a href="javascript:void(0);" onclick="Update();"><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_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Tag("付款方式")%></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <table 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: 200px">
                <%=Tag("名称")%>
            </th>
            <th>
                <%=Tag("描述")%>
            </th>
            <th style="width: 100px">
                <%=Tag("启用")%>
            </th>
            <th style="width: 100px">
                <%=Tag("系统代码")%>
            </th>
            <th style="width: 80px">
                <%=Tag("手续费")%>
            </th>
            <th style="width: 80px">
                <%=Tag("排序")%>
            </th>
            <th style="width: 100px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_Pay model in models)
          {%>
        <tr class="list" ondblclick="EditObj(<%=model.id %>);" >
            <td style="text-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.Language.Content(model.Name, CurrentLanguage.Code)%>
            </td>
            <td>
                <%=Shop.Bussiness.Language.Content(model.Description, CurrentLanguage.Code)%>
            </td>
            <td>
                <%=model.IsUsed == 1 ? "" + Tag("是") + "" : "" + Tag("否") + ""%>
            </td>
            <td><%=model.Code %>&nbsp;</td>
            <td>
                <%=model.FeeRate %> %
            </td>
            <td><input type="text" id="Sort<%=model.id %>" name="Sort<%=model.id %>" shop="true" class="input" style="width: 60px" value="<%=model.Sort %>" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" /></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) title_ ="<%=Tag("添加付款方式")%>"
            var url_ = "Pay_Edit_window.aspx?id=" + id;
            var width_ = 500;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Update() {
            var postData = GetFormJsonData("shop");
            var url = "<%=site.AdminPath %>/ajax/ajax_site.aspx?__Action=Pay_Update";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function DeleteObj() {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_site.aspx?__Action=Pay_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>