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

130 lines
4.3 KiB

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. }
  32. });
  33. function submitForm() {
  34. var Code = $("#Code").val();
  35. var Name = $("#Name").val();
  36. var Figure = $("#Figure").val();
  37. var Enable = $('input[name="State"]:checked').val();
  38. if (Code == "" || Code == undefined) {
  39. $.modalAlert("请先输入表名!");
  40. return;
  41. }
  42. if (Name == "" || Name == undefined) {
  43. $.modalAlert("请先输入列名!");
  44. return;
  45. }
  46. if (Figure == "" || Figure == undefined) {
  47. $.modalAlert("请先输入编码!");
  48. return;
  49. }
  50. if (Enable == "" || Enable == undefined) {
  51. $.modalAlert("请选择是否启用!");
  52. return;
  53. }
  54. var objArr = {
  55. ID:ID,
  56. Code: Code,
  57. Name: Name,
  58. Figure: Figure,
  59. Enable: Enable
  60. }
  61. debugger;
  62. if (ID!="") {
  63. $.submitForm({
  64. url: "/WMS/BasicSettings/UpdateICSConfiguration" + "?" + Math.random(),
  65. param: { keyValue: JSON.stringify(objArr) },
  66. success: function () {
  67. $.currentWindow().$("#gridList").trigger("reloadGrid");
  68. }
  69. })
  70. } else {
  71. $.submitForm({
  72. url: "/WMS/BasicSettings/InsertICSConfiguration" + "?" + Math.random(),
  73. param: { keyValue: JSON.stringify(objArr) },
  74. success: function () {
  75. $.currentWindow().$("#gridList").trigger("reloadGrid");
  76. }
  77. })
  78. }
  79. }
  80. </script>
  81. <form id="form1">
  82. <div style="padding-top: 20px; margin-right: 20px;">
  83. <table class="form">
  84. <tr>
  85. <th class="formTitle">参数编码:</th>
  86. <td class="formValue">
  87. <input id="Code" name="Code" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数编码" />
  88. </td>
  89. </tr>
  90. <tr>
  91. <th class="formTitle">参数名称:</th>
  92. <td class="formValue">
  93. <input id="Name" name="Name" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数名称" />
  94. </td>
  95. </tr>
  96. <tr>
  97. <th class="formTitle">精度:</th>
  98. <td class="formValue">
  99. <input id="Figure" name="Figure" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="精度" />
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>
  104. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否启用:</label>
  105. </td>
  106. <td>
  107. <div class="input-group" id="changechaeckbox">
  108. <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
  109. <label style="width:85px"></label>
  110. <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
  111. </div>
  112. </td>
  113. </tr>
  114. </table>
  115. </div>
  116. </form>