天津投入产出系统后端
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.

124 lines
4.6 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.NoticeBrowseModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
查看公告
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("查看公告", string.IsNullOrEmpty(Model.NOTICEID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable">
<tr>
<th align="right">
<%=Html.QV(p => p.USETIME)%>
</th>
<td>
<%=Html.QReadOnlyTextboxFor(p => p.USETIME)%>
</td>
</tr>
<tr>
<th align="right" valign=top>
<%=Html.QV(p => p.NOTICECONTEXT)%>
</th>
<td>
<div class="validatebox-readonly" style="width: 600px; height: 200px; overflow: auto;">
<%=Model.NOTICECONTEXT%>
</div>
</td>
</tr>
<tr id="reply1">
<td>
<%=Html.QV(p => p.REPLYCONTENT)%>
</td>
<td>
<div id="isreply">
<%=Html.QC(p => p.REPLYCONTENT)%>
</div>
</td>
</tr>
<tr id="file">
<th align="right" valign=top>
<%=Html.QV(p => p.ATTACHFILE)%>
</th>
<td>
<a href="#" onclick="downAttach('<%=Model.ATTACHFILE%>','<%=Model.ATTACHFILE%>')"><%=Model.ATTACHFILE%></a>
</td>
</tr>
<tr id="reply2">
<td></td>
<td>
<a IconCls="icon-save" class="easyui-linkbutton" href="#" onclick="reply()" plain="false">回复</a>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.CANREPLY)%>
<%=Html.HiddenFor(p => p.ATTACHFILE)%>
<%=Html.HiddenFor(p => p.NOTICEID)%>
<%=Html.HiddenFor(p => p.USERID)%>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.LogInUserName)%>
<%=Html.HiddenFor(p => p.check)%>
<%-- <%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.Web.Models.Sys.NoticeBrowseModel>(Model)%>--%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table ><tr><td><%=Model.NOTICETITLE%></td></tr></table>
<script type="text/javascript">
$(function () {
//如果没有附件,隐藏附件标题
if (document.getElementById("ATTACHFILE").value == null || document.getElementById("ATTACHFILE").value == "") {
var file = document.getElementById("file");
file.style.display = "none";
}
var reply1 = document.getElementById("reply1");
var reply2 = document.getElementById("reply2");
//火锅该浏览用户不必回复或如果是管理员登录,隐藏回复按钮和回复文本框
if (document.getElementById("CANREPLY").value == "0") {
reply1.style.display = "none";
reply2.style.display = "none";
}
var check = document.getElementById("check").value;
var REPLYCONTENT = document.getElementById("REPLYCONTENT");
if (check == "true") {
REPLYCONTENT.readOnly = "true";
REPLYCONTENT.style.background = "#CCCCCC";
reply2.style.display = "none";
}
});
//回复
function reply() {
if (document.getElementById("CANREPLY").value == "1") {
//校验基本信息合法性
if (isValidate() == false) {
return false;
}
}
submitByButton("ViewNoticeReply");
}
//下载附件
function downAttach(fileName, oldFileName) {
$.ajax({
type: "POST",
url: "/Notice/ExistFile",
dataType: "json",
data: {
fileName: fileName,
oldFileName: oldFileName
},
success: function (data) {
if (data == "false") {
MSI("提示", "文件不存在!");
return false;
}
else {
submitByButton("/Notice/DownAttach?fileName=" + fileName + "&oldFileName=" + oldFileName);
}
}
});
}
</script>
</asp:Content>