{layout:default} {class:Shop.Admin.storeConfig.Transport}
<lbhead>
    <title><%=Tag("配送方式")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
    <ul>
    <%if (PageReturnMsg == ""){%>
    <li class="add"><a href="javascript:void(0);" onclick="Edit(0);"><b></b><span><%=Tag("添加")%></span></a></li>
    <li class="del"><a href="javascript:void(0);" onclick="Del();"><b></b><span><%=Tag("删除")%></span></a></li>
    <li class="config"><a href="javascript:void(0);" onclick="Config();"><b></b><span><%=Tag("快递100")%></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>
    <div class="searchbox">
        <input type="text" id="key" name="key" class="input-query" value="<%=key %>" onkeydown="if(event.keyCode==13){search_();}" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" />
    </div>
    <table 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 style="width: 100px">
                <%=Tag("配送方式代码")%>
            </th>
            <th style="width: 100px">
                <%=Tag("配送类型")%>
            </th>
            <th >
                <%=Tag("配送描述")%>
            </th>         
            <th style="width: 100px">
                <%=Tag("货到付款")%>
            </th>
            <th style="width: 80px">
                <%=Tag("排序")%>
            </th>
            <th style="width: 150px">
                <%=Tag("编辑")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_Transport model in models)
          {%>
        <tr class="list" ondblclick="Edit(<%=model.id %>);" >
            <td style="text-align:center">
                <input type="checkbox" name="Fid" del="true" value="<%=model.id %>" />
            </td>
            <td>
                <%=model.Name %>
            </td>
            <td>
                <%=model.Code %>&nbsp;
            </td>
            <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_TransportType)%>&nbsp;
            </td>
            <td>
                <%=model.Description %>&nbsp;
            </td>
            <td>
                <%=model.IsCanofflinePay == 1 ? Tag("支持") : Tag("不支持")%>
            </td>
            <td>
                <%=model.Sort%>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="Edit(<%=model.id %>);"><%=Tag("编辑")%></a> | <a href="Transport_Price.aspx?tid=<%=model.id %>"><%=Tag("配送区域")%></a>
            </td>
        </tr>
        <%} %>
       
    </table>
    <script type="text/javascript">
        function search_() {
            var key = $("#key").val();
            window.location = "?key=" + escape(key);
        }
        function Edit(id) {
            if (id == 0) { var title_ = "<%=Tag("添加配送方式")%>"; } else { var title_ = "<%=Tag("编辑配送方式")%>"; }
            var url_ = "transport_edit_window.aspx?id=" + id;
            var width_ = 500;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Config() {
            var title_ = "<%=Tag("快递100配置")%>";
            var url_ = "transport_kuaidi100_window.aspx";
            var width_ = 400;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Del() {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_site.aspx?__Action=Transport_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>