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.

122 lines
3.5 KiB

4 days ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <script>
  7. $(function () {
  8. InitControl();
  9. });
  10. function submitForm() {
  11. debugger;
  12. if (!$('#form1').formValid()) {
  13. return false;
  14. }
  15. var RoleID = $("#sel_Role").val();//需要克隆的角色ID
  16. var F_FullName = $("#F_FullName").val();
  17. var F_EnCode = $("#F_EnCode").val();
  18. var F_SortCode = $("#F_SortCode").val();
  19. var F_Description = $("#F_Description").val();
  20. var obj = {
  21. RoleID:RoleID,
  22. F_FullName: F_FullName,
  23. F_EnCode: F_EnCode,
  24. F_SortCode: F_SortCode,
  25. F_Description: F_Description,
  26. }
  27. $.submitForm({
  28. url: "/SystemManage/Role/SubmitFormCloneRole" + "?" + Math.random(),
  29. param: {
  30. keyValue: JSON.stringify(obj)
  31. },
  32. success: function () {
  33. $.currentWindow().$("#gridList").trigger("reloadGrid");
  34. }
  35. })
  36. }
  37. function InitControl() {
  38. debugger;
  39. var $Role = $("#sel_Role");
  40. $Role.select2({
  41. allowClear: true,
  42. escapeMarkup: function (m) {
  43. return m;
  44. }
  45. });
  46. $.ajax({
  47. url: "/SystemManage/Role/GetRole" + "?" + Math.random(),
  48. dataType: "json",
  49. async: false,
  50. success: function (data) {
  51. $.each(data, function (index, item) {
  52. $Role.append("<option value='" + item.ID + "'>" + item.F_FullName + "</option>");
  53. });
  54. }
  55. });
  56. }
  57. //function SelChangeA() {
  58. // var InvCode = $("#sel_InvCode").val();
  59. // SeachAmountEnablebyInvCode(InvCode);
  60. //}
  61. </script>
  62. <form id="form1">
  63. <div style="padding-top: 20px; margin-right: 20px;">
  64. <table class="form">
  65. <tr>
  66. <th class="formTitle">需克隆角色</th>
  67. <td class="formValue">
  68. <select id="sel_Role" name="sel_Role" class="form-control select2" style="width: 500px" placeholder="角色"></select>
  69. </td>
  70. </tr>
  71. <tr>
  72. <th class="formTitle"><span style="color: red;">*</span>角色名称</th>
  73. <td class="formValue">
  74. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入角色名称" />
  75. </td>
  76. </tr>
  77. <tr>
  78. <th class="formTitle"><span style="color: red;">*</span>角色编号</th>
  79. <td class="formValue">
  80. <input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" placeholder="请输入角色编号" />
  81. </td>
  82. </tr>
  83. <tr>
  84. <th class="formTitle"><span style="color: red;">*</span>显示顺序</th>
  85. <td class="formValue">
  86. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" placeholder="请输入显示顺序" />
  87. </td>
  88. </tr>
  89. <tr>
  90. <th class="formTitle"><span style="color: red;"></span>备注</th>
  91. <td class="formValue">
  92. <textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
  93. </td>
  94. </tr>
  95. </table>
  96. </div>
  97. </form>