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

119 lines
3.9 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. var ID = $.request("ID");
  15. var ColCode = $.request("ColCode");
  16. var ColName = decodeURI($.request("ColName"));
  17. var Enable = decodeURI($.request("Enable"));
  18. $(function () {
  19. if (ID != "") {
  20. $("#ColCode").val(ColCode);
  21. $("#ColName").val(ColName);
  22. if (Enable=='是') {
  23. $("#StatusYes").prop("checked", true);
  24. } else {
  25. $("#StatusNo").prop("checked", true);
  26. }
  27. }
  28. });
  29. function submitForm() {
  30. var ColCode = $("#ColCode").val();
  31. var ColName = $("#ColName").val();
  32. var Enable = $('input[name="State"]:checked').val();
  33. if (ColCode == "" || ColCode == undefined) {
  34. $.modalAlert("请先输入编码!");
  35. return;
  36. }
  37. if (ColName == "" || ColName == undefined) {
  38. $.modalAlert("请先输入列名称!");
  39. return;
  40. }
  41. if (Enable == "" || Enable == undefined) {
  42. $.modalAlert("请选择是否启用!");
  43. return;
  44. }
  45. var objArr = {
  46. ID:ID,
  47. ColCode: ColCode,
  48. ColName: ColName,
  49. Enable: Enable
  50. }
  51. debugger;
  52. if (ID!="") {
  53. $.submitForm({
  54. url: "/WMS/BasicSettings/UpdateICSExtensionEnable" + "?" + Math.random(),
  55. param: { keyValue: JSON.stringify(objArr) },
  56. success: function () {
  57. $.currentWindow().$("#gridList").trigger("reloadGrid");
  58. }
  59. })
  60. } else {
  61. $.submitForm({
  62. url: "/WMS/BasicSettings/InsertICSExtensionEnable" + "?" + Math.random(),
  63. param: { keyValue: JSON.stringify(objArr) },
  64. success: function () {
  65. $.currentWindow().$("#gridList").trigger("reloadGrid");
  66. }
  67. })
  68. }
  69. }
  70. //function ChcekboxChange() {
  71. // debugger;
  72. // $("#changechaeckbox").find("input[type='checkbox']").each(function (i, n) {
  73. // if ($(this).prop('checked') == false) {
  74. // $(this).val("");
  75. // }
  76. // });
  77. </script>
  78. <form id="form1">
  79. <div style="padding-top: 20px; margin-right: 20px;">
  80. <table class="form">
  81. <tr>
  82. <th class="formTitle">列编码:</th>
  83. <td class="formValue">
  84. <input id="ColCode" name="ColCode" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="列编码" />
  85. </td>
  86. </tr>
  87. <tr>
  88. <th class="formTitle">列名称:</th>
  89. <td class="formValue">
  90. <input id="ColName" name="ColName" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="列名称" />
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>
  95. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否隐藏:</label>
  96. </td>
  97. <td>
  98. <div class="input-group" id="changechaeckbox">
  99. <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
  100. <label style="width:85px"></label>
  101. <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
  102. </div>
  103. </td>
  104. </tr>
  105. </table>
  106. </div>
  107. </form>