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

152 lines
6.8 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. $.ajax({
  10. url: "/SystemManage/Role/GetFormJson",
  11. data: { keyValue: keyValue },
  12. dataType: "json",
  13. async: false,
  14. success: function (data) {
  15. $("#form1").formSerialize(data);
  16. $("#form1").find('.form-control,select,input').attr('readonly', 'readonly');
  17. $("#form1").find('div.ckbox label').attr('for', '');
  18. }
  19. });
  20. })
  21. function initControl() {
  22. $("#F_OrganizeId").bindSelect({
  23. url: "/SystemManage/Organize/GetTreeSelectJson",
  24. });
  25. $("#F_Type").bindSelect({
  26. url: "/SystemManage/ItemsData/GetSelectJson",
  27. param: { enCode: "RoleType" }
  28. });
  29. $('#wizard').wizard().on('change', function (e, data) {
  30. var $next = $("#btn_next");
  31. if (data.direction == "next") {
  32. switch (data.step) {
  33. case 1:
  34. $next.attr('disabled', 'disabled');
  35. break;
  36. default:
  37. break;
  38. }
  39. } else {
  40. $next.removeAttr('disabled');
  41. }
  42. });
  43. $("#permissionTree").treeview({
  44. height: 493,
  45. showcheck: true,
  46. url: "/SystemManage/RoleAuthorize/GetPermissionTree",
  47. param: { roleId: keyValue }
  48. });
  49. }
  50. </script>
  51. <form id="form1">
  52. <div class="widget-body">
  53. <div id="wizard" class="wizard" data-target="#wizard-steps" style="border-left: none; border-top: none; border-right: none;">
  54. <ul class="steps">
  55. <li data-target="#step-1" class="active"><span class="step">1</span>角色信息<span class="chevron"></span></li>
  56. <li data-target="#step-2"><span class="step">2</span>功能权限<span class="chevron"></span></li>
  57. </ul>
  58. </div>
  59. <div class="step-content" id="wizard-steps" style="border-left: none; border-bottom: none; border-right: none;">
  60. <div class="step-pane active" id="step-1" style="padding-left: 5px; padding-top: 20px; margin-right: 20px;">
  61. <table class="form">
  62. <tr>
  63. <th class="formTitle">归属组织</th>
  64. <td class="formValue">
  65. <select id="F_OrganizeId" name="F_OrganizeId" class="form-control required">
  66. </select>
  67. </td>
  68. </tr>
  69. <tr>
  70. <th class="formTitle">角色名称</th>
  71. <td class="formValue">
  72. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" />
  73. </td>
  74. </tr>
  75. <tr>
  76. <th class="formTitle">角色编号</th>
  77. <td class="formValue">
  78. <input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" />
  79. </td>
  80. </tr>
  81. <tr>
  82. <th class="formTitle">角色类型</th>
  83. <td class="formValue">
  84. <select id="F_Type" name="F_Type" class="form-control required">
  85. </select>
  86. </td>
  87. </tr>
  88. <tr>
  89. <th class="formTitle">显示顺序</th>
  90. <td class="formValue">
  91. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" />
  92. </td>
  93. </tr>
  94. <tr>
  95. <th class="formTitle" style="height: 35px;">选项</th>
  96. <td class="formValue" style="padding-top: 1px;">
  97. <div class="ckbox">
  98. <input id="F_AllowEdit" name="F_AllowEdit" type="checkbox"><label for="F_AllowEdit">允许编辑</label>
  99. </div>
  100. <div class="ckbox">
  101. <input id="F_AllowDelete" name="F_AllowDelete" type="checkbox"><label for="F_AllowDelete">允许删除</label>
  102. </div>
  103. <div class="ckbox">
  104. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  105. </div>
  106. </td>
  107. </tr>
  108. <tr>
  109. <th class="formTitle" valign="top" style="padding-top: 5px;">备注
  110. </th>
  111. <td class="formValue">
  112. <textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
  113. </td>
  114. </tr>
  115. <tr>
  116. <th class="formTitle">创建人员</th>
  117. <td class="formValue">
  118. <input id="F_CreatorUserId" name="F_CreatorUserId" type="text" class="form-control" />
  119. </td>
  120. </tr>
  121. <tr>
  122. <th class="formTitle">创建时间</th>
  123. <td class="formValue">
  124. <input id="F_CreatorTime" name="F_CreatorTime" type="text" class="form-control" />
  125. </td>
  126. </tr>
  127. <tr>
  128. <th class="formTitle">修改人员</th>
  129. <td class="formValue">
  130. <input id="F_LastModifyUserId" name="F_LastModifyUserId" type="text" class="form-control" />
  131. </td>
  132. </tr>
  133. <tr>
  134. <th class="formTitle">修改时间</th>
  135. <td class="formValue">
  136. <input id="F_LastModifyTime" name="F_LastModifyTime" type="text" class="form-control" />
  137. </td>
  138. </tr>
  139. </table>
  140. </div>
  141. <div class="step-pane" id="step-2">
  142. <div id="permissionTree"></div>
  143. </div>
  144. </div>
  145. <div class="form-button" id="wizard-actions">
  146. <a id="btn_last" disabled class="btn btn-default btn-prev">上一步</a>
  147. <a id="btn_next" class="btn btn-default btn-next">下一步</a>
  148. </div>
  149. </div>
  150. </form>