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.

147 lines
5.1 KiB

  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. var ID = $.request("ID");
  15. var TableCode = $.request("TableCode");
  16. var ColumnCode = $.request("ColumnCode");
  17. var Code = $.request("Code");
  18. var Name = decodeURI($.request("Name"));
  19. var Enable = decodeURI($.request("Enable"));
  20. $(function () {
  21. if (ID != "") {
  22. $("#TableCode").val(TableCode);
  23. $("#ColumnCode").val(ColumnCode);
  24. $("#Code").val(Code);
  25. $("#Name").val(Name);
  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 TableCode = $("#TableCode").val();
  37. var ColumnCode = $("#ColumnCode").val();
  38. var Enable = $('input[name="State"]:checked').val();
  39. if (Code == "" || Code == undefined) {
  40. $.modalAlertNew("WMS00019");
  41. return;
  42. }
  43. if (TableCode == "" || TableCode == undefined) {
  44. $.modalAlertNew("WMS00019");
  45. return;
  46. }
  47. if (ColumnCode == "" || ColumnCode == undefined) {
  48. $.modalAlertNew("WMS00019");
  49. return;
  50. }
  51. if (Name == "" || Name == undefined) {
  52. $.modalAlertNew("WMS00026");
  53. return;
  54. }
  55. if (Enable == "" || Enable == undefined) {
  56. $.modalAlertNew("WMS00020");
  57. return;
  58. }
  59. var objArr = {
  60. ID:ID,
  61. Code: Code,
  62. Name: Name,
  63. TableCode: TableCode,
  64. ColumnCode: ColumnCode,
  65. Enable: Enable
  66. }
  67. debugger;
  68. if (ID!="") {
  69. $.submitForm({
  70. url: "/WMS/BasicSettings/UpdateICSColumnEnable" + "?" + Math.random(),
  71. param: { keyValue: JSON.stringify(objArr) },
  72. success: function () {
  73. $.currentWindow().$("#gridList").trigger("reloadGrid");
  74. }
  75. })
  76. } else {
  77. $.submitForm({
  78. url: "/WMS/BasicSettings/InsertICSColumnEnable" + "?" + Math.random(),
  79. param: { keyValue: JSON.stringify(objArr) },
  80. success: function () {
  81. $.currentWindow().$("#gridList").trigger("reloadGrid");
  82. }
  83. })
  84. }
  85. }
  86. //function ChcekboxChange() {
  87. // debugger;
  88. // $("#changechaeckbox").find("input[type='checkbox']").each(function (i, n) {
  89. // if ($(this).prop('checked') == false) {
  90. // $(this).val("");
  91. // }
  92. // });
  93. </script>
  94. <form id="form1">
  95. <div style="padding-top: 20px; margin-right: 20px;">
  96. <table class="form">
  97. <tr>
  98. <th class="formTitle">表编码:</th>
  99. <td class="formValue">
  100. <input id="TableCode" name="TableCode" type="text" class="form-control required" style="width: 300px;" maxlength="50" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="表编码" />
  101. </td>
  102. </tr>
  103. <tr>
  104. <th class="formTitle">列编号:</th>
  105. <td class="formValue">
  106. <input id="ColumnCode" name="ColumnCode" type="text" class="form-control required" style="width: 300px;" maxlength="50" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="表编码" />
  107. </td>
  108. </tr>
  109. <tr>
  110. <th class="formTitle">列编码:</th>
  111. <td class="formValue">
  112. <input id="Code" name="Code" type="text" class="form-control required" style="width: 300px;" maxlength="20" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="列编码" />
  113. </td>
  114. </tr>
  115. <tr>
  116. <th class="formTitle">列名称:</th>
  117. <td class="formValue">
  118. <input id="Name" name="Name" type="text" class="form-control required" style="width: 300px;" maxlength="20" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="列名称" />
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;显示:</label>
  124. </td>
  125. <td>
  126. <div class="input-group" id="changechaeckbox">
  127. <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
  128. <label style="width:85px"></label>
  129. <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
  130. </div>
  131. </td>
  132. </tr>
  133. </table>
  134. </div>
  135. </form>