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

116 lines
4.4 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.EnergyManage.MeterReadingsModel>" %>
<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.START_DATE)%>
</th>
<td>
<%=Html.QC(p => p.START_DATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.END_DATE)%>
</th>
<td>
<%=Html.QC(p => p.END_DATE)%>
</td>
</tr>
</table>
<div style="left: 1px; position: relative;"></div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.EnergyManage.MeterReadingsModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("STATE")%>
<%=Html.Hidden("METER_PID")%>
<script language="javascript" type="text/javascript">
//$(function () { List(1); });
//List(1);
//添加
function Add() {
//alert($("#STATE").val());
var STATE = $("#STATE").val();
var METER_PID = $("#METER_PID").val();
if (STATE != "2") {
MSI("提示", "只有手动方式才允许添加。");
return;
}
openAppWindow1('添加', 'MeterReadingsEdit?METER_PID=' + METER_PID + '&STATE=' + STATE, '350', '360');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
//alert($("#STATE").val());
var STATE = $("#STATE").val();
var METER_PID = $("#METER_PID").val();
if (STATE != "2") {
MSI("提示", "只有手动方式才允许修改。");
return;
}
document.getElementById("selectKey").value = ids;
openAppWindow1('电量修改', 'MeterReadingsEdit?PID=' + ids + '&METER_PID=' + METER_PID + '&STATE=' + STATE, '350', '360');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能删除一条记录。");
return;
}
else {
var STATE = $("#STATE").val();
var METER_PID = $("#METER_PID").val();
if (STATE != "2") {
MSI("提示", "只有手动方式才允许删除。");
return;
}
document.getElementById("selectKey").value = ids;
MSQ("提示",
"确定要删除选中的记录吗?",
function () {
submitByButton("MeterReadingsDelete");
});
}
}
//返回
function Return() {
var returnUrl = "/Meter/List";
window.location.href = returnUrl;
}
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("MeterReadings", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("MeterReadings", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButtonUpdate("MeterReadings", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
--%> <%=Html.QTButtonDelete("MeterReadings", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("return", "MeterList", QMFrameWork.WebUI.IconCls.back, "Return();", (s, f) => { return true; })%>
</td>
</tr>
</table>
</asp:Content>