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.

102 lines
3.8 KiB

  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. var itemId = $.request("itemId");
  8. $(function () {
  9. if (!!keyValue) {
  10. $.ajax({
  11. url: "/SystemManage/ItemsData/GetFormJson",
  12. data: { keyValue: keyValue },
  13. dataType: "json",
  14. async: false,
  15. success: function (data) {
  16. $("#form1").formSerialize(data);
  17. }
  18. });
  19. }
  20. });
  21. function submitForm() {
  22. if (!$('#form1').formValid()) {
  23. return false;
  24. }
  25. var postData = $("#form1").formSerialize();
  26. postData["F_ItemId"] = itemId;
  27. $.submitForm({
  28. url: "/SystemManage/ItemsData/SubmitForm?keyValue=" + keyValue,
  29. param: postData,
  30. success: function () {
  31. $.currentWindow().$("#gridList").trigger("reloadGrid");
  32. }
  33. })
  34. }
  35. </script>
  36. <form id="form1">
  37. <div style="padding-top: 20px; margin-right: 20px;">
  38. <table class="form">
  39. <tr>
  40. <th class="formTitle">名称</th>
  41. <td class="formValue">
  42. <input id="F_ItemName" name="F_ItemName" type="text" class="form-control required" placeholder="请输入名称" />
  43. </td>
  44. </tr>
  45. <tr>
  46. <th class="formTitle">编号</th>
  47. <td class="formValue">
  48. <input id="F_ItemCode" name="F_ItemCode" type="text" class="form-control required" placeholder="请输入编号" />
  49. </td>
  50. </tr>
  51. <tr>
  52. <th class="formTitle">排序</th>
  53. <td class="formValue">
  54. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" />
  55. </td>
  56. </tr>
  57. <tr>
  58. <th class="formTitle">字段1</th>
  59. <td class="formValue">
  60. <input id="F_Define1" name="F_Define1" type="text" class="form-control" />
  61. </td>
  62. </tr>
  63. <tr>
  64. <th class="formTitle">字段2</th>
  65. <td class="formValue">
  66. <input id="F_Define2" name="F_Define2" type="text" class="form-control" />
  67. </td>
  68. </tr>
  69. <tr>
  70. <th class="formTitle">字段3</th>
  71. <td class="formValue">
  72. <input id="F_Define3" name="F_Define3" type="text" class="form-control" />
  73. </td>
  74. </tr>
  75. <tr>
  76. <th class="formTitle">字段4</th>
  77. <td class="formValue">
  78. <input id="F_Define4" name="F_Define4" type="text" class="form-control" />
  79. </td>
  80. </tr>
  81. <tr>
  82. <th class="formTitle" style="height: 35px;">选项</th>
  83. <td class="formValue" style="padding-top: 1px;">
  84. <div class="ckbox">
  85. <input id="F_IsDefault" name="F_IsDefault" type="checkbox"><label for="F_IsDefault">默认</label>
  86. </div>
  87. <div class="ckbox">
  88. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  89. </div>
  90. </td>
  91. </tr>
  92. <tr>
  93. <th class="formTitle" valign="top" style="padding-top: 5px;">备注
  94. </th>
  95. <td class="formValue">
  96. <textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
  97. </td>
  98. </tr>
  99. </table>
  100. </div>
  101. </form>