123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- @{
- ViewBag.Title = "小区管理";
- Layout = "~/Views/Shared/_Form.cshtml";
- }
- <script>
- var addr = request('addr');
- var id = request('id');
- var IOT_Code = request('IOT_Code');
- $(function () {
- //状态
- $("#MeterStata").ComboBox({
- description: "==请选择==",
- }).bind("change", function () {
- value = $(this).attr('data-value');
- if (value == "SET_REPORT_FREQ_VAL|WaterMeter") {
- var geth2 = document.getElementById("trTime2");
- geth2.style.display = "none";
- var geth3 = document.getElementById("trTime3");
- geth3.style.display = "none";
- //var geth4 = document.getElementById("trTime1");
- //geth4.style.display = "none";
- var geth5 = document.getElementById("trTime5");
- geth5.style.display = "none";
- var geth1 = document.getElementById("trTime4");
- geth1.style.display = "";
- }
- if (value == "SET_HIGHFLOW_ALARM|WaterMeterAlarm") {
- //var geth1 = document.getElementById("trTime1");
- //geth1.style.display = "none";
- var geth3 = document.getElementById("trTime3");
- geth3.style.display = "none";
- var geth4 = document.getElementById("trTime4");
- geth4.style.display = "none";
- var geth4 = document.getElementById("trTime5");
- geth4.style.display = "none";
- var geth2 = document.getElementById("trTime2");
- geth2.style.display = "";
- }
- if (value == "SET_SERVER_IP_PORT|WaterMeter") {
- //var geth1 = document.getElementById("trTime1");
- //geth1.style.display = "none";
- var geth2 = document.getElementById("trTime2");
- geth2.style.display = "none";
- var geth4 = document.getElementById("trTime4");
- geth4.style.display = "none";
- var geth3 = document.getElementById("trTime3");
- geth3.style.display = "none";
- var geth5 = document.getElementById("trTime5");
- geth5.style.display = "";
- }
- if (value == "SET_REPORT_RETRY_TIMES|WaterMeter") {
- //var geth1 = document.getElementById("trTime1");
- //geth1.style.display = "none";
- var geth2 = document.getElementById("trTime2");
- geth2.style.display = "none";
- var geth3 = document.getElementById("trTime4");
- geth3.style.display = "none";
- var geth4 = document.getElementById("trTime3");
- geth4.style.display = "";
- var geth5 = document.getElementById("trTime5");
- geth5.style.display = "none";
- }
- //获取数据
- if (value == "GET_CONFIG_RSP") {
- }
- });
- })
- //保存表单
- function AcceptClick() {
- if (!$('#form1').Validform()) {
- return false;
- }
- var value1, value2;
- var upTime = $("#upTime").val();
- var upTimeInterval = $("#upTimeInterval").val();
- //判断指令类型获取数据
- var value = $("#MeterStata").attr('data-value');//选择的类型
- //id, addr, metesta, IOT_Code, value1, value2
- if (value == "SET_REPORT_FREQ_VAL|WaterMeter") {
- value1 = $("#upTimeInterval").val();
- value2 = "";
- }
- if (value == "SET_HIGHFLOW_ALARM|WaterMeterAlarm") {
- value1 = $("#max_flow").val();
- }
- if (value == "SET_SERVER_IP_PORT|WaterMeter") {
- value1 = $("#APN").val();
- value2 = $("#IP").val();
- }
- if (value == "SET_REPORT_RETRY_TIMES|WaterMeter") {
- value1 = $("#REPORT_RETRY_TIMES").val();
- value2 = "";
- }
- if (value == "GET_CONFIG_RSP") {
- value1 = "";
- value2 = "";
- }
- $.SaveForm({
- url: "/NBManage/ReSetUpInterval/SendCommand",
- param: { "addr": addr, "id": id, "metesta": value, "IOT_Code": IOT_Code, "value1": value1, "value2": value2 },
- loading: "正在保存数据...",
- success: function () {
- $.currentIframe().$("#gridTable").resetSelection();
- $.currentIframe().$("#gridTable").trigger("reloadGrid");
- }
- })
- }
- </script>
- <style type="text/css">
- .form .formTitle {
- width: 120px;
- }
- </style>
- <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
- <table id="form1" class="form">
- <tr>
- <th class="formTitle">参数类别<font face="宋体">*</font></th>
- <td class="formValue">
- @*<input id="oldAddr" type="text" class="form-control" isvalid="yes" checkexpession="Num" errormsg="请输入旧表地址" placeholder="请输入旧表地址" readonly/>*@
- <div id="MeterStata" type="select" class="ui-select">
- <ul>
- <li data-value="SET_REPORT_FREQ_VAL|WaterMeter">设置上报频率</li>
- <li data-value="SET_SERVER_IP_PORT|WaterMeter">设置IP和APN</li>
- <li data-value="SET_REPORT_RETRY_TIMES|WaterMeter">设置重试次数</li>
- <li data-value="SET_HIGHFLOW_ALARM|WaterMeterAlarm">设置大流量报警门限</li>
- <li data-value="GET_CONFIG_RSP">获取数据</li>
- </ul>
- </div>
- </td>
- @* <th class="formTitle">ICCID<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="ICCID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" errormsg="IMEI号" placeholder="请输入ICCID" />
- </td>*@
- </tr>
- <tr id="trTime2" style="">
- <th class="formTitle">设置大流量报警门限<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="max_flow" type="text" class="form-control" checkexpession="Num" placeholder="请输入大流量报警门限" />
- </td>
- @* <th class="formTitle">开始时间<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="PointStartTime" type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
- </td>
- <th class="formTitle">结束时间<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="PointEndTime" type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
- </td>*@
- </tr>
- @* <tr id="trTime1" style="">
- <th class="formTitle">设置时间<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="PointTime" type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
- </td>
- <th class="formTitle">开始时间<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="PointEndTime" readonly type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
- </td>
- </tr>*@
- <tr id="trTime3">
- <th class="formTitle">设置重试次数(0-9)<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="REPORT_RETRY_TIMES" type="text" class="form-control" checkexpession="Num" placeholder="请输入0-9的数字" />
- </td>
- </tr>
- <tr id="trTime4" style="">
- <th class="formTitle">上报频率(分钟)<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="upTimeInterval" type="text" class="form-control" checkexpession="Num" placeholder="请输入上报频率" />
- </td>
- @*<th class="formTitle">开始时间<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="PointEndTime" readonly type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
- </td>*@
- </tr>
- <tr id="trTime5">
- <th class="formTitle">设置APN<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="APN" type="text" class="form-control" checkexpession="Num" placeholder="请输入APN" />
- </td>
- <th class="formTitle">设置IP<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="IP" type="text" class="form-control" checkexpession="Num" placeholder="请输入IP" />
- </td>
- </tr>
- </table>
- </div>
|