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.
135 lines
5.3 KiB
135 lines
5.3 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.FileInfoModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
文件信息管理
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<script language="javascript" type="text/javascript">
|
|
//添加
|
|
function Add() {
|
|
openAppWindow1('添加文件', 'Edit', '500', '360');
|
|
}
|
|
//修改
|
|
function Update() {
|
|
var ids = getSelectKey();
|
|
if (ids == "") {
|
|
MSI("提示", "请选择修改记录。");
|
|
return;
|
|
}
|
|
if (ids.indexOf(":") > 0) {
|
|
MSI("提示", "每次只能修改一条记录。");
|
|
return;
|
|
}
|
|
document.getElementById("selectKey").value = ids;
|
|
openAppWindow1('修改文件', 'Edit?PID=' + ids, '500', '360');
|
|
}
|
|
//删除
|
|
function Delete() {
|
|
var ids = getSelectKey();
|
|
if (ids == "") {
|
|
MSI("错误", "至少选择一条记录");
|
|
}
|
|
else {
|
|
document.getElementById("selectKey").value = ids;
|
|
MSQ("提示", "确定要删除选中的记录吗?", function () {
|
|
submitByButton("Delete");
|
|
})
|
|
}
|
|
}
|
|
//组织机构树
|
|
function Tree() {
|
|
//展示组织机构树
|
|
if (isValidate() == false) {
|
|
return false;
|
|
}
|
|
|
|
submitByButton("/Orgaization/OrgaizationTree");
|
|
}
|
|
</script>
|
|
<%=Html.QPSeach(80,true) %>
|
|
<table id="condiTable">
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p=>p.FILENAME) %>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.FILENAMETXT)%>
|
|
</td>
|
|
</tr>
|
|
<input id="TYPENO" type="hidden" value='<%=ViewData["TYPENO"]%>' />
|
|
<%System.Web.HttpContext.Current.Request.Url.ToString(); %>
|
|
</table>
|
|
<%=Html.QPEnd()%>
|
|
<%=Html.QPList() %>
|
|
<%=Html.QDateGrid<QMAPP.Web.Models.Sys.FileInfoModel>(Model)%>
|
|
<%=Html.QPEnd() %>
|
|
<%=Html.Hidden("selectKey")%>
|
|
<%=Html.Hidden("fileName") %>
|
|
<%=Html.HiddenFor(p=>p.OrgaID) %>
|
|
<%=Html.HiddenFor(p=>p.isEdit) %>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td align="center">
|
|
<%=Html.QTButtonSearch("FileInfo", "List", "Search()")%>
|
|
<%=Html.QTButtonAdd("FileInfo", "Edit", "Add()")%>
|
|
<%=Html.QTButtonUpdate("FileInfo", "Edit", "Update()")%>
|
|
<%=Html.QTButtonDelete("FileInfo", "Delete", "Delete()")%>
|
|
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
|
<%--<%=Html.QTButton("help", "", "help", "SysHelp('01200000','SingleTableList')", (s, f) => { return true; })%> --%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
function Search() {
|
|
List(1);
|
|
}
|
|
function ClickGridCell(rowIndex, field, value) {
|
|
$('#QDateGrid').datagrid('clearSelections');
|
|
if (field == "FILENAME") {
|
|
rows = $('#QDateGrid').datagrid('getRows');
|
|
var FILESTORAGENAME = rows[rowIndex].FILESTORAGENAME;
|
|
}
|
|
}
|
|
//导出
|
|
function Export() {
|
|
var ids = getSelectKey();
|
|
//查询条件文件名
|
|
var FILENAMETXT = document.getElementById("FILENAMETXT").value;
|
|
//类别列表选择的分类
|
|
var TYPENO = document.getElementById("TYPENO").value;
|
|
submitByButton("ExportExcel?ids=" + ids + "&TYPENO=" + TYPENO);
|
|
}
|
|
//行单击事件,用于下载附件
|
|
function ClickGridCell(rowIndex, field, value) {
|
|
$('#QDateGrid').datagrid('clearSelections');
|
|
if (field == "FILENAME") {
|
|
rows = $('#QDateGrid').datagrid('getRows');
|
|
var fileName = rows[rowIndex].FileStorageNameTxt;
|
|
var oldFileName = rows[rowIndex].FileStorageNameTxt;
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/FileInfo/ExistFile",
|
|
dataType: "json",
|
|
data: {
|
|
fileName: fileName,
|
|
oldFileName: oldFileName
|
|
},
|
|
success: function (data) {
|
|
if (data == "false") {
|
|
MSI("提示", "文件不存在!");
|
|
return false;
|
|
}
|
|
else {
|
|
submitByButton("/FileInfo/DownAttach?fileName=" + fileName + "&oldFileName=" + oldFileName);
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
|