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

210 lines
7.6 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.WarnManage.WarnInfoModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
报警信息列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(100,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.WARNTYPE)%>
</th>
<td>
<%=Html.QC(p => p.WARNTYPE)%>
</td>
<th align="right">
<%=Html.QV(p => p.WARNCODE)%>
</th>
<td>
<%=Html.QC(p => p.WARNCODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.ISDEAL)%>
</th>
<td>
<%=Html.QC(p => p.ISDEAL)%>
</td>
<th align="right">
<%=Html.QV(p => p.ISDONE)%>
</th>
<td>
<%=Html.QC(p => p.ISDONE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.STARTCREATEDATE)%>
</th>
<td>
<%=Html.QC(p => p.STARTCREATEDATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.ENDCREATEDATE)%>
</th>
<td>
<%=Html.QC(p => p.ENDCREATEDATE)%>
</td>
</tr>
</table>
<div style="left: 1px; position: relative;">
</div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.WarnManage.WarnInfoModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<script language="javascript" type="text/javascript">
//添加
function Add() {
openAppWindow1('报警添加', 'WarnInfoEdit', '350', '360');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('报警信息修改', 'WarnInfoEdit?PID=' + ids, '350', '360');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
//校验选中的报警信息是否有已经关闭的报警信息
var isDone = getSelectISDONE();
if (isDone) {
MSI("提示 ", "选中的记录中具有已经关闭的报警信息,不能删除!");
return;
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("WarnInfoDelete");
})
}
}
//导出
function Export() {
document.getElementById("selectKey").value = getSelectKey();
submitByButton("ExportExcel");
}
//报警详情
function WarnDetail() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能查看一条报警信息。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('报警详细查看', 'WarnDetailList?WarnInfoId=' + ids, '1000', '500');
}
//发送报警
function WarnIsDeal() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能发送一条报警信息。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('报警信息发送', 'WarnIsSendList?WarnInfoId=' + ids, '1000', '500');
}
//关闭报警
function WarnIsDone() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能关闭一条报警信息。");
return;
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要关闭选中的报警吗?", function () {
submitByButton("WarnIsDone");
})
}
}
//查询
function Search() {
if (
$("#STARTCREATEDATE").val() != "" && $("#ENDCREATEDATE").val() != "" &&
parseDate($("#STARTCREATEDATE").val()) > parseDate($("#ENDCREATEDATE").val())) {
alert("开始时间不能大于结束时间!");
return;
}
List(1)
}
$(function () { List(1); });
//报警类别维护
function WarnTypeList() {
openAppWindow1('报警类别维护', 'WarnTypeList', '1000', '500');
}
//报警通知人员维护
function WarnInformerList() {
openAppWindow1('报警通知人员维护', 'WarnInformerList', '1000', '500');
}
//校验选中的报警信息是否有已经关闭的报警信息
function getSelectISDONE() {
var ids = [];
var rows = $('#QDateGrid').datagrid('getSelections');
if (rows.length == 0) {
return "";
}
for (var i = 0; i < rows.length; i++) {
if (rows[i].ISDONE == '已关闭') {
return true;
}
}
return false;
}
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("WarnInfo", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("warnType", "WarnType", QMFrameWork.WebUI.IconCls.add, "WarnTypeList()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("warnInformer", "WarnInformer", QMFrameWork.WebUI.IconCls.add, "WarnInformerList()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("WarnInfo", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("WarnInfo", "Update", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("WarnInfo", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("warnDetail", "WarnDetail", QMFrameWork.WebUI.IconCls.redo, "WarnDetail()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("warnIsDeal", "WarnIsDeal", QMFrameWork.WebUI.IconCls.redo, "WarnIsDeal()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("warnIsDone", "WarnIsDone", QMFrameWork.WebUI.IconCls.redo, "WarnIsDone()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>