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

163 lines
5.6 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.QPEdit("电表编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p => p.STATE)%>
</th>
<td>
<%=Html.QC(p => p.STATE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.METER_TYPE)%>
</th>
<td>
<%=Html.QC(p => p.METER_TYPE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.METER_NAME)%>
</th>
<td>
<%=Html.QC(p => p.METER_NAME)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.METER_CODE)%>
</th>
<td>
<%=Html.QC(p => p.METER_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.EQPT_CODE)%>
</th>
<td>
<%=Html.QC(p => p.EQPT_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.NET_ID)%>
</th>
<td>
<%=Html.QC(p => p.NET_ID)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.NET_ADDR)%>
</th>
<td>
<%=Html.QC(p => p.NET_ADDR)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.RATIO)%>
</th>
<td>
<%=Html.QC(p => p.RATIO)%>
<script type="text/javascript" language="javascript">
$(function () {
$("#RATIO").numberbox({ min: 1, precision: 2 });
});
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.METER_NAME)%>
<%=Html.QPEnd() %>
<script language="javascript" type="text/javascript">
$(function () {
$('#EQPT_CODE').combobox({
onSelect: function () {
var METER_NAME = $("#EQPT_CODE").combobox("getText");
$("#METER_NAME").val(METER_NAME);
var METER_CODE = $("#EQPT_CODE").combobox("getValue");
$("#METER_CODE").val(METER_CODE);
}
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
function Save() {
if (isValidate() == false) {
return false;
}
//把设备ID赋值给MACHNEID保存到数据库
// var METER_NAME = $("#EQPT_CODE").combobox("getText");
// $("#METER_NAME").val(METER_NAME);
//$("#NET_ID").val('12345');
//js控制只能输入数字和逗号的正则表达式
var reg = /^[0-9,]+$/;
var netId = $("#NET_ID").val();
if (netId !== "") {
if (!reg.test(netId)) {
MSI("提示", "网络标识只能输入数字,并用逗号间隔。");
return;
}
}
var pattern = /^[\d:.]+$/;
var netAdd = $("#NET_ADDR").val();
if (netAdd !== "") {
if (!pattern.test(netAdd)) {
MSI("提示", "网络地址只能输入数字、小数点和冒号。");
return;
}
}
// var ree = /^\d+:\d$/;
// var re = /^\d+(?=\.{0,1}\d+$|$)/;
submitByButton("Save");
}
$(function () {
$('#EQPT_CODE').combobox({
panelWidth: '200'
});
});
</script>
</asp:Content>