ReSetAddrForm.cshtml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @{
  2. ViewBag.Title = "小区管理";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var addr = request('addr');
  7. var id = request('id');
  8. var IOT_Code = request('IOT_Code');
  9. $(function () {
  10. //水表状态
  11. $("#MeterStata").ComboBox({
  12. description: "==请选择==",
  13. }).bind("change", function () {
  14. value = $(this).attr('data-value');
  15. if (value == "01") {
  16. var geth1 = document.getElementById("trTime");
  17. geth1.style.display = "none";
  18. }
  19. else {
  20. var geth1 = document.getElementById("trTime");
  21. geth1.style.display = "";
  22. }
  23. });
  24. })
  25. //保存表单
  26. function AcceptClick() {
  27. if (!$('#form1').Validform()) {
  28. return false;
  29. }
  30. var metesta = $("#MeterStata").attr('data-value');
  31. var timeStart = $("#PointStartTime").val();
  32. var timeEnd = $("#PointEndTime").val();
  33. //postData 格式化 将&nbsp; 替换为 ""
  34. $.SaveForm({
  35. url: "/NBManage/ReSetMeterAddress/SendCommand",
  36. param: { "id": id, "addr": addr, "metesta": metesta, "IOT_Code": IOT_Code, "timeStart": timeStart, "timeEnd": timeEnd },
  37. loading: "正在保存数据...",
  38. success: function () {
  39. $.currentIframe().$("#gridTable").resetSelection();
  40. $.currentIframe().$("#gridTable").trigger("reloadGrid");
  41. }
  42. })
  43. }
  44. </script>
  45. <style type="text/css">
  46. .form .formTitle {
  47. width: 100px;
  48. }
  49. </style>
  50. <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
  51. <table id="form1" class="form">
  52. <tr>
  53. <th class="formTitle">水表状态<font face="宋体">*</font></th>
  54. <td class="formValue" colspan="3">
  55. @*<input id="oldAddr" type="text" class="form-control" isvalid="yes" checkexpession="Num" errormsg="请输入旧表地址" placeholder="请输入旧表地址" readonly/>*@
  56. <div id="MeterStata" type="select" class="ui-select">
  57. <ul>
  58. <li data-value="01">正常</li>
  59. <li data-value="02">限制</li>
  60. <li data-value="03">管阀</li>
  61. </ul>
  62. </div>
  63. </td>
  64. @* <th class="formTitle">ICCID<font face="宋体">*</font></th>
  65. <td class="formValue">
  66. <input id="ICCID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" errormsg="IMEI号" placeholder="请输入ICCID" />
  67. </td>*@
  68. </tr>
  69. <tr id="trTime" style="">
  70. <th class="formTitle">开始时间<font face="宋体">*</font></th>
  71. <td class="formValue">
  72. <input id="PointStartTime" readonly type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
  73. </td>
  74. <th class="formTitle">开始时间<font face="宋体">*</font></th>
  75. <td class="formValue">
  76. <input id="PointEndTime" readonly type="text" value="@LeaRun.Util.Time.ShortTime" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%HH%mm',dateFmt:'HH:mm'})" >
  77. </td>
  78. </tr>
  79. </table>
  80. </div>