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

129 lines
4.7 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.WarnManage.WarnInformerModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
报警通知人员编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div region="north" border="true" title="" style="height: 120px;">
<%=Html.QPEdit("报警通知人员编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="2" cellspacing="0">
<tr>
<th align="right">
<%=Html.QV(p=>p.INFORMNAME) %>
</th>
<td>
<%=Html.QC(p => p.INFORMNAME)%>
</td>
<th align="right">
<%=Html.QV(p=>p.INFORMCODE) %>
</th>
<td>
<%=Html.QC(p => p.INFORMCODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MAIL)%>
</th>
<td>
<%=Html.QC(p => p.MAIL)%>
</td>
<th align="right">
<%=Html.QV(p => p.MOBILEPHONENUMBER)%>
</th>
<td>
<%=Html.QC(p => p.MOBILEPHONENUMBER)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.INFOTYPE)%>
</th>
<td>
<%=Html.QC(p => p.INFOTYPE)%>
</td>
<th align="right">
<%=Html.QV(p => p.MEMO)%>
</th>
<td>
<%=Html.QC(p => p.MEMO)%>
</td>
</tr>
</table>
<%=Html.QPEnd() %>
</div>
<div region="center" border="true">
<table id="tt" title="报警类别" class="easyui-datagrid" style="width: 550px; height: 210px">
</table>
</div>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p => p.CREATEUSER)%>
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
<%=Html.HiddenFor(p => p.UPDATEUSER)%>
<%=Html.Hidden("selectKey")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("WarnInfo", "WarnInformerSave", "return Save();")%>
<%=Html.QTButtonBack("close", "WarnInformerList", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var WarnInformerId = $("#PID").val();
$('#tt').datagrid({
url: '/WarnManage/GetWarnTypeList?WarnInformerId=' + WarnInformerId,
columns: [[
{ checkbox: "true" },
{ field: 'PID', title: 'PID', width: 100, hidden: true },
{ field: 'WARNTYPE', title: '报警类别', width: 100 },
{ field: 'WARNCODE', title: '报警代码', width: 100, align: 'right' },
{ field: 'WARNDESCRIBE', title: '报警描述', width: 100, align: 'right'}]],
onLoadSuccess: function (data) {
for (var i = 0; i < data.rows.length; i++) {
if (data.rows[i].IsTypeWithInformer == "True") {
$('#tt').datagrid('checkRow', i);
}
}
}
});
})
function Save() {
if (isValidate() == false) {
return false;
}
//手机号码有效性校验
var mobile = $("#MOBILEPHONENUMBER").val();
var re = /^1\d{10}$/;
if (!re.test(mobile)) {
MSI("提示", "请填写11位有效手机号码。");
return;
}
//获取选中记录主键
var ids = "";
var selected = $('#tt').datagrid('getSelections');
for (var i = 0; i < selected.length; i++) {
ids += selected[i].PID + ":";
}
if (ids == "") {
MSI("提示", "请选择报警类别信息。");
return;
}
document.getElementById("selectKey").value = ids;
submitByButton("WarnInformerSave?WarnTypeIds=" + ids);
}
</script>
</asp:Content>