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

181 lines
7.3 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.NoticeInfoModel>" %>
<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" width="100%" border="0">
<tr>
<th>
<%=Html.QV(p => p.SENDAIMNAME)%>
</th>
<td colspan="3">
<%=Html.QC(p => p.SENDAIMNAME)%>
<a IconCls="icon-add" class="easyui-linkbutton" href="#" onclick="AddUser()" plain="true"></a>
</td>
</tr>
<tr>
<th>
<%=Html.QV(p => p.NOTICETITLE)%>
</th>
<td colspan="3">
<%=Html.QC(p => p.NOTICETITLE)%>
</td>
</tr>
<tr>
<th valign="top">
<%=Html.QV(p => p.NOTICECONTEXT)%>
</th>
<td colspan="3">
<%=Html.QC(p => p.NOTICECONTEXT)%>
</td>
</tr>
<tr>
<th>
<%=Html.QV(p => p.NOTICETYPE)%>
</th>
<td>
<%=Html.QC(p => p.NOTICETYPE)%>
</td>
<th>
<%=Html.QV(p => p.CANREPLY)%>
</th>
<td>
<%=Html.QC(p => p.CANREPLY)%>
<input id="CANREPLYCheckBox" type="checkbox" />
</td>
</tr>
<tr>
<th style="width:10%">
<%=Html.QV(p => p.USETIME)%>
</th>
<td style="width:20%">
<%=Html.QC(p => p.USETIME)%>
</td>
<th style="width:10%">
<%=Html.QV(p => p.OUTTIME)%>
</th>
<td>
<%=Html.QC(p => p.OUTTIME)%>
</td>
</tr>
<tr>
<th>
<%=Html.QV(p => p.ATTACHFILE)%>
</th>
<td colspan="3" >
<input id="ATTACHFILENAME" type="text" style="width:320px;" value="<%=Model.ATTACHFILE %>" />
<input id="file" type="file" name="file" onchange="uploadfile()" style="width:70px;" />
<label style=" color:Red">(最大上传5M文件)</label>
</td>
</tr>
<tr><td colspan="4">
<label style=" color:Red" >&nbsp;&nbsp;※允许上传文件格式:xls、xlsx、ppt、pptx、doc、docx、txt、bmp、jpg、jpeg、gif、png、rar、zip</label></td></tr>
</table>
<%=Html.HiddenFor(p => p.UserID)%>
<%=Html.HiddenFor(p => p.SENDAIM)%>
<%=Html.HiddenFor(p => p.NOTICEID)%>
<%=Html.HiddenFor(p => p.SENDTIME)%>
<%=Html.HiddenFor(p=>p.CREATEUSER) %>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p=>p.UPDATEUSER) %>
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
<%=Html.HiddenFor(p => p.ATTACHFILE)%>
<%=Html.HiddenFor(p => p.ATTACHFILETXT)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("Notice", "NoticeSave", "Save()")%>
<%=Html.QTButton("close", "NoticeList", "close", "parent.closeAppWindow1();return false;", (s, f) => { return true; })%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
document.getElementById("NOTICETITLE").style.width = "400px";
document.getElementById("SENDAIMNAME").readOnly = "true";
document.getElementById("ATTACHFILENAME").readOnly = "true";
var CANREPLY = document.getElementById("CANREPLY").value;
var filename = document.getElementById("ATTACHFILETXT").value;
//显示附件名称
document.getElementById("ATTACHFILENAME").value = filename;
//显示checkbox选项
if (CANREPLY == "1") {
$("#CANREPLYCheckBox")[0].checked = true;
}
else {
$("#CANREPLYCheckBox")[0].checked = false;
}
});
//添加组织机构下的人员
function AddUser() {
var SENDAIM = document.getElementById("SENDAIM").value;
var SENDAIMNAME = document.getElementById("SENDAIMNAME").value;
SENDAIMNAME = escape(SENDAIMNAME);
url = "/Notice/NoticeUser2?SENDAIM=" + SENDAIM + "&SENDAIMNAME=" + SENDAIMNAME;
openAppWindow1('人员', url, '660', '400');
}
//保存选择的用户
function saveUser(strUserID, strUserName) {
//联系人姓名
document.getElementById("SENDAIMNAME").value = strUserName;
//联系人ID
document.getElementById("SENDAIM").value = strUserID;
}
//保存
function Save() {
//校验基本信息合法性
if (isValidate() == false) {
return false;
}
if (document.getElementById("USETIME").value == "" || document.getElementById("OUTTIME").value == null) {
MSI("提示", "通知日期不能为空");
return false;
}
if (document.getElementById("OUTTIME").value == "" || document.getElementById("OUTTIME").value == null) {
MSI("提示", "有效日期不能为空");
return false;
}
if (document.getElementById("OUTTIME").value < document.getElementById("USETIME").value) {
MSI("提示", "有效日期不能小于通知日期");
return false;
}
if ($("#CANREPLYCheckBox")[0].checked == true) {
document.getElementById("CANREPLY").value = "1";
}
else {
document.getElementById("CANREPLY").value = "0";
}
var filePath = document.getElementById("file").value;
if (filePath != "") {
document.getElementById("ATTACHFILE").value = filePath;
//判断文件格式
var fileText = filePath.substring(filePath.lastIndexOf(".", filePath.length)); //获取文件扩展名
fileText = fileText.toLowerCase();
if (fileText != ".xls" && fileText != ".ppt" && fileText != ".doc"
&& fileText != ".xlsx" && fileText != ".txt" && fileText != ".docx"
&& fileText != ".bmp" && fileText != ".jpg" && fileText != ".jpeg"
&& fileText != ".gif" && fileText != ".png" && fileText != ".rar"
&& fileText != ".zip" && fileText != ".pptx") {
MSI("错误", "上传文件格式错误");
return false;
}
}
submitByButton("NoticeSave");
}
//触发上传文件事件
function uploadfile() {
var filepath = document.getElementById("file").value;
document.getElementById("ATTACHFILE").value = filepath;
document.getElementById("ATTACHFILENAME").value = filepath;
}
</script>
</asp:Content>