You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
3.8 KiB
105 lines
3.8 KiB
4 years ago
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
||
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.FileTypeModel>" %>
|
||
|
|
||
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||
|
文件分类管理
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||
|
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.TYPENO) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
|
||
|
<table id="editTable">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<%=Html.QTreeView("systemLimitMeun", "/FileManage/GetTreeData", false)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<div id="win"></div>
|
||
|
|
||
|
<%=Html.QPEnd() %>
|
||
|
<%=Html.Hidden("selectKey") %>
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
||
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<%=Html.QTButtonAdd("FileType", "FileTypeEdit", "Add()")%>
|
||
|
<%=Html.QTButtonUpdate("FileType", "FileTypeEdit", "Update()")%>
|
||
|
<%=Html.QTButtonDelete("FileType", "Delete", "Delete()")%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<script type="text/javascript">
|
||
|
function Search() {
|
||
|
submitByButton("/FileManage/List");
|
||
|
}
|
||
|
$(function () {
|
||
|
//绑定树状click事件
|
||
|
$('#systemLimitMeun').tree({
|
||
|
onClick: function () {
|
||
|
var node = $('#systemLimitMeun').tree('getSelected');
|
||
|
var id = node.id;
|
||
|
|
||
|
if ($('#systemLimitMeun').tree('isLeaf', node.target)) {
|
||
|
LoadFileType(node.id);
|
||
|
}
|
||
|
else {
|
||
|
LoadFileType("");
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
//根据选择的文件类型查询文件信息
|
||
|
function LoadFileType(id) {
|
||
|
window.parent.document.getElementById("FileInfoList").src = "/FileInfo/List?TYPENO=" + id;
|
||
|
}
|
||
|
//添加
|
||
|
function Add() {
|
||
|
openAppWindow1('添加分类', 'FileTypeEdit', '200', '140');
|
||
|
}
|
||
|
//修改
|
||
|
function Update() {
|
||
|
var node = $('#systemLimitMeun').tree('getSelected');
|
||
|
if (node == null || node == "") {
|
||
|
MSI("提示", "每次只能修改一种类型。");
|
||
|
$.messager.alert('提示', '每次只能修改一种类型', 'window.close()');
|
||
|
return;
|
||
|
}
|
||
|
var id = node.id;
|
||
|
var ids = node.id.split(";");
|
||
|
|
||
|
if (ids.length == 0) {
|
||
|
MSI("错误", "请选择修改类型。");
|
||
|
return;
|
||
|
}
|
||
|
openAppWindow1('修改分类', 'FileTypeEdit?TYPENO=' + ids, '200', '140');
|
||
|
}
|
||
|
//删除
|
||
|
function Delete() {
|
||
|
var node = $('#systemLimitMeun').tree('getSelected');
|
||
|
if (node == null || node == "") {
|
||
|
|
||
|
// $('#win').window({
|
||
|
// width: 200,
|
||
|
// height: 100,
|
||
|
// modal: true,
|
||
|
// collapsible:false,
|
||
|
// title:'错误',
|
||
|
// msg: '至少选择一条记录'
|
||
|
// });
|
||
|
// $('#win').window('open');
|
||
|
// $.messager.alert('错误', '至少选择一条记录', "$('#win').window('close'); ");
|
||
|
|
||
|
|
||
|
MSI("错误", "至少选择一条记录。");
|
||
|
return;
|
||
|
}
|
||
|
var id = node.id;
|
||
|
var ids = node.id.split(";");
|
||
|
|
||
|
MSQ("提示", "是否删除该分类以及对应的文件信息?", function () {
|
||
|
submitByButton("Delete?ids=" + ids);
|
||
|
})
|
||
|
}
|
||
|
</script>
|
||
|
</asp:Content>
|