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

127 lines
5.7 KiB

3 years ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. $(function () {
  8. initControl();
  9. if (!!keyValue) {
  10. $.ajax({
  11. url: "/SystemManage/Module/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 initControl() {
  22. $("#F_Target").select2({
  23. minimumResultsForSearch: -1
  24. });
  25. $("#F_ParentId").bindSelect({
  26. url: "/SystemManage/Module/GetTreeSelectJson",
  27. });
  28. }
  29. function submitForm() {
  30. if (!$('#form1').formValid()) {
  31. return false;
  32. }
  33. $.submitForm({
  34. url: "/SystemManage/Module/SubmitForm?keyValue=" + keyValue,
  35. param: $("#form1").formSerialize(),
  36. success: function () {
  37. $.currentWindow().$("#gridList").resetSelection();
  38. $.currentWindow().$("#gridList").trigger("reloadGrid");
  39. }
  40. })
  41. }
  42. </script>
  43. <form id="form1">
  44. <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
  45. <ul class="nav nav-tabs">
  46. <li role="presentation" class="active"><a href="#">基本信息</a></li>
  47. <li role="presentation"><a href="#">扩展信息</a></li>
  48. </ul>
  49. <div style="padding-top: 20px; margin-right: 30px;">
  50. <table class="form">
  51. <tr>
  52. <th class="formTitle">上级</th>
  53. <td class="formValue">
  54. <select id="F_ParentId" name="F_ParentId" class="form-control required">
  55. <option value="0">父节点</option>
  56. </select>
  57. </td>
  58. <th class="formTitle">名称</th>
  59. <td class="formValue">
  60. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入名称" />
  61. </td>
  62. </tr>
  63. <tr>
  64. <th class="formTitle">连接</th>
  65. <td class="formValue">
  66. <input id="F_UrlAddress" name="F_UrlAddress" type="text" class="form-control" />
  67. </td>
  68. <th class="formTitle">目标</th>
  69. <td class="formValue">
  70. <select id="F_Target" name="F_Target" class="form-control required">
  71. <option value="">==请选择==</option>
  72. <option value="expand" title="expand">无页面</option>
  73. <option value="iframe" title="iframe">框架页</option>
  74. <option value="open" title="open">弹出页</option>
  75. <option value="blank" title="blank">新窗口</option>
  76. </select>
  77. </td>
  78. </tr>
  79. <tr>
  80. <th class="formTitle">图标</th>
  81. <td class="formValue">
  82. <div class="input-group">
  83. <input id="F_Icon" name="F_Icon" type="text" class="form-control">
  84. <span class="input-group-btn">
  85. <a class="btn btn-primary"><i class="fa fa-ellipsis-h"></i></a>
  86. </span>
  87. </div>
  88. </td>
  89. <th class="formTitle">排序</th>
  90. <td class="formValue">
  91. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" placeholder="请输入排序"/>
  92. </td>
  93. </tr>
  94. <tr>
  95. <th class="formTitle" style="height: 35px;">选项</th>
  96. <td class="formValue" colspan="3" style="padding-top: 1px;">
  97. <div class="ckbox">
  98. <input id="F_IsMenu" name="F_IsMenu" type="checkbox"><label for="F_IsMenu">菜单</label>
  99. </div>
  100. <div class="ckbox">
  101. <input id="F_IsPublic" name="F_IsPublic" type="checkbox"><label for="F_IsPublic">公共</label>
  102. </div>
  103. <div class="ckbox">
  104. <input id="F_IsExpand" name="F_IsExpand" type="checkbox"><label for="F_IsExpand">展开</label>
  105. </div>
  106. <div class="ckbox">
  107. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  108. </div>
  109. <div class="ckbox">
  110. <input id="F_AllowEdit" name="F_AllowEdit" type="checkbox"><label for="F_AllowEdit">允许编辑</label>
  111. </div>
  112. <div class="ckbox">
  113. <input id="F_AllowDelete" name="F_AllowDelete" type="checkbox"><label for="F_AllowDelete">允许删除</label>
  114. </div>
  115. </td>
  116. </tr>
  117. <tr>
  118. <th class="formTitle" valign="top" style="padding-top: 5px;">介绍
  119. </th>
  120. <td class="formValue" colspan="3">
  121. <textarea id="F_Description" name="F_Descriptions" class="form-control" style="height: 100px;"></textarea>
  122. </td>
  123. </tr>
  124. </table>
  125. </div>
  126. </div>
  127. </form>