纽威
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.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <style>
  7. #ISO {
  8. width: 10px;
  9. }
  10. </style>
  11. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  12. <script src="~/Content/js/select2/select2.min.js"></script>
  13. <script>
  14. debugger;
  15. var ID = $.request("ID");
  16. var Code = $.request("Code");
  17. var Name = decodeURI($.request("Name"));
  18. var Figure = $.request("Figure");
  19. var Enable = decodeURI($.request("Enable"));
  20. $(function () {
  21. debugger;
  22. if (ID != "") {
  23. $("#Code").val(Code);
  24. $("#Name").val(Name);
  25. $("#Figure").val(Figure);
  26. if (Enable =='是') {
  27. $("#StatusYes").prop("checked", true);
  28. } else {
  29. $("#StatusNo").prop("checked", true);
  30. }
  31. $("#Name").attr("disabled", "disabled");
  32. $("#Code").attr("disabled", "disabled");
  33. }
  34. });
  35. function submitForm() {
  36. var Code = $("#Code").val();
  37. var Name = $("#Name").val();
  38. var Figure = $("#Figure").val();
  39. var Enable = $('input[name="State"]:checked').val();
  40. if (Code == "" || Code == undefined) {
  41. $.modalAlertNew("WMS00017");
  42. return;
  43. }
  44. if (Name == "" || Name == undefined) {
  45. $.modalAlertNew("WMS00018");
  46. return;
  47. }
  48. if (Figure == "" || Figure == undefined) {
  49. $.modalAlertNew("WMS00019");
  50. return;
  51. }
  52. if (Enable == "" || Enable == undefined) {
  53. $.modalAlertNew("WMS00020");
  54. return;
  55. }
  56. var objArr = {
  57. ID:ID,
  58. Code: Code,
  59. Name: Name,
  60. Figure: Figure,
  61. Enable: Enable
  62. }
  63. debugger;
  64. if (ID!="") {
  65. $.submitForm({
  66. url: "/WMS/BasicSettings/UpdateICSConfiguration" + "?" + Math.random(),
  67. param: { keyValue: JSON.stringify(objArr) },
  68. success: function () {
  69. $.currentWindow().$("#gridList").trigger("reloadGrid");
  70. }
  71. })
  72. } else {
  73. $.submitForm({
  74. url: "/WMS/BasicSettings/InsertICSConfiguration" + "?" + Math.random(),
  75. param: { keyValue: JSON.stringify(objArr) },
  76. success: function () {
  77. $.currentWindow().$("#gridList").trigger("reloadGrid");
  78. }
  79. })
  80. }
  81. }
  82. </script>
  83. <form id="form1">
  84. <div style="padding-top: 20px; margin-right: 20px;">
  85. <table class="form">
  86. <tr>
  87. <th class="formTitle">参数编码:</th>
  88. <td class="formValue">
  89. <input id="Code" name="Code" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数编码" />
  90. </td>
  91. </tr>
  92. <tr>
  93. <th class="formTitle">参数名称:</th>
  94. <td class="formValue">
  95. <input id="Name" name="Name" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数名称" />
  96. </td>
  97. </tr>
  98. <tr>
  99. <th class="formTitle">精度:</th>
  100. <td class="formValue">
  101. <input id="Figure" name="Figure" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="精度" />
  102. </td>
  103. </tr>
  104. <tr>
  105. <td>
  106. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否启用:</label>
  107. </td>
  108. <td>
  109. <div class="input-group" id="changechaeckbox">
  110. <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
  111. <label style="width:85px"></label>
  112. <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
  113. </div>
  114. </td>
  115. </tr>
  116. </table>
  117. </div>
  118. </form>