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

129 lines
5.4 KiB

3 years ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. var moduleId = $.request("moduleId");
  8. $(function () {
  9. initControl();
  10. if (!!keyValue) {
  11. $.ajax({
  12. url: "/SystemManage/ModuleButton/GetFormJson",
  13. data: { keyValue: keyValue },
  14. dataType: "json",
  15. async: false,
  16. success: function (data) {
  17. $("#form1").formSerialize(data);
  18. }
  19. });
  20. }
  21. });
  22. function initControl() {
  23. $("#F_Location").select2({ minimumResultsForSearch: -1 })
  24. $("#F_ParentId").bindSelect({
  25. url: "/SystemManage/ModuleButton/GetTreeSelectJson",
  26. param: { moduleId: moduleId },
  27. });
  28. }
  29. function submitForm() {
  30. if (!$('#form1').formValid()) {
  31. return false;
  32. }
  33. var postData = $("#form1").formSerialize();
  34. postData["F_ModuleId"] = moduleId;
  35. $.submitForm({
  36. url: "/SystemManage/ModuleButton/SubmitForm?keyValue=" + keyValue,
  37. param: postData,
  38. success: function () {
  39. top.modulebutton.$("#gridList").resetSelection();
  40. top.modulebutton.$("#gridList").trigger("reloadGrid");
  41. }
  42. })
  43. }
  44. </script>
  45. <form id="form1">
  46. <div style="padding-top: 30px; margin-right: 30px;">
  47. <table class="form">
  48. <tr>
  49. <th class="formTitle">名称</th>
  50. <td class="formValue">
  51. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入名称" />
  52. </td>
  53. <th class="formTitle">编号</th>
  54. <td class="formValue">
  55. <input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" placeholder="请输入编号" />
  56. </td>
  57. </tr>
  58. <tr>
  59. <th class="formTitle">上级</th>
  60. <td class="formValue">
  61. <select id="F_ParentId" name="F_ParentId" class="form-control required">
  62. <option value="0">父节点</option>
  63. </select>
  64. </td>
  65. <th class="formTitle">位置</th>
  66. <td class="formValue">
  67. <select id="F_Location" name="F_Location" class="form-control required">
  68. <option value="">==请选择==</option>
  69. <option value="1">初始</option>
  70. <option value="2">选中</option>
  71. </select>
  72. </td>
  73. </tr>
  74. <tr>
  75. <th class="formTitle">事件</th>
  76. <td class="formValue">
  77. <input id="F_JsEvent" name="F_JsEvent" type="text" class="form-control" />
  78. </td>
  79. <th class="formTitle">连接</th>
  80. <td class="formValue">
  81. <input id="F_UrlAddress" name="F_UrlAddress" type="text" class="form-control" />
  82. </td>
  83. </tr>
  84. <tr>
  85. <th class="formTitle">图标</th>
  86. <td class="formValue">
  87. <div class="input-group">
  88. <input id="F_Icon" name="F_Icon" type="text" class="form-control">
  89. <span class="input-group-btn">
  90. <a class="btn btn-primary"><i class="fa fa-ellipsis-h"></i></a>
  91. </span>
  92. </div>
  93. </td>
  94. <th class="formTitle">排序</th>
  95. <td class="formValue">
  96. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" />
  97. </td>
  98. </tr>
  99. <tr>
  100. <th class="formTitle" style="height: 35px;">选项</th>
  101. <td class="formValue" colspan="3" style="padding-top: 1px;">
  102. <div class="ckbox">
  103. <input id="F_Split" name="F_Split" type="checkbox"><label for="F_Split">分开线</label>
  104. </div>
  105. <div class="ckbox">
  106. <input id="F_IsPublic" name="F_IsPublic" type="checkbox"><label for="F_IsPublic">公共</label>
  107. </div>
  108. <div class="ckbox">
  109. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  110. </div>
  111. <div class="ckbox">
  112. <input id="F_AllowEdit" name="F_AllowEdit" type="checkbox"><label for="F_AllowEdit">允许编辑</label>
  113. </div>
  114. <div class="ckbox">
  115. <input id="F_AllowDelete" name="F_AllowDelete" type="checkbox"><label for="F_AllowDelete">允许删除</label>
  116. </div>
  117. </td>
  118. </tr>
  119. <tr>
  120. <th class="formTitle" valign="top" style="padding-top: 5px;">描述
  121. </th>
  122. <td class="formValue" colspan="3">
  123. <textarea id="F_Description" name="F_Description" class="form-control" style="height: 100px;"></textarea>
  124. </td>
  125. </tr>
  126. </table>
  127. </div>
  128. </form>