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

132 lines
4.4 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.EnergyManage.MeterModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
能源表维护
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(80,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.STATE)%>
</th>
<td>
<%=Html.QC(p => p.STATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.METER_CODE)%>
</th>
<td>
<%=Html.QC(p => p.METER_CODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.EQPT_CODE)%>
</th>
<td>
<%=Html.QC(p => p.EQPT_CODE)%>
</td>
</tr>
</table>
<div style="left: 1px; position: relative;"></div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.EnergyManage.MeterModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<script language="javascript" type="text/javascript">
//$(function () { List(1); });
//List(1);
//添加
function Add() {
openAppWindow1('添加', 'Edit', '400', '420');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('修改', 'Edit?PID=' + ids, '400', '320');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示",
"确定要删除选中的记录吗?",
function() {
submitByButton("Delete");
});
}
}
//明细
function MeterReadingsConfig() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择能源记录。");
return;
};
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能选择一条记录。");
return;
}
var row = $('#QDateGrid').datagrid('getSelected');
// if (row.MATERIAL_LAYER == 0) {
// MSI("提示", "该Bom层级为0,不允许添加Bom明细。");
// return;
// }
document.getElementById("selectKey").value = ids;
window.location.href = "/Meter/MeterReadingsConfig?PID=" + ids + "&STATE=" + row.STATE;
}
$(function () {
List(1);
});
$(document).click(function (e) { // 在页面任意位置点击而触发此事件
//debugger;
$(e.target).attr("id"); // e.target表示被点击的目标
})
$(function () {
$('#EQPT_CODE').combobox({
panelWidth: '200'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("Meter", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("Meter", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("Meter", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("Meter", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("MeterReadingsConfig", "MeterReadingsConfig", QMFrameWork.WebUI.IconCls.detail, "MeterReadingsConfig()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>