Dutys.cshtml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesBasicInfoDutys; //The menu item will be active for this page.
  7. ViewBag.Title = "职务信息管理";
  8. // List<SelectListItem> classification = ViewBag.Classification;
  9. }
  10. @section css
  11. {
  12. <link href="~/Content/Plugins/kindeditor/themes/default/default.css" rel="stylesheet" />
  13. }
  14. <div class="table-box mr-4 iwb-bootstrap-table">
  15. <input type="hidden" id="IsLock" value="N" />
  16. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
  17. <table id="table"
  18. data-url="/api/services/app/Dutys/GetAll"
  19. data-striped="true" data-id-field="id" data-unique-id="id"
  20. data-method="post"
  21. data-side-pagination="server"
  22. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  23. data-cache="false"
  24. data-pagination="true" data-page-size="30" data-page-number="1" data-page-list="[30,50,100,200]" data-pagination-detail-h-align="right" data-pagination-h-align="left"
  25. data-query-params="QueryParams"
  26. data-response-handler="ResponseHandler"
  27. data-click-to-select="true"
  28. data-single-select="true">
  29. <thead>
  30. <tr class="row" id="header">
  31. <th data-field="state" data-checkbox="true"></th>
  32. <th data-align="center" data-field="dutyName">职务名称</th>
  33. <th data-align="center" data-field="remark">说明</th>
  34. </tr>
  35. </thead>
  36. </table>
  37. </div>
  38. @section modal{
  39. <section>
  40. <!--Main Modal-->
  41. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  42. <div class="modal-dialog modal-dialog-centered" role="document">
  43. <div class="modal-content">
  44. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("职务"))
  45. @{
  46. var inputs = new List<InputViewModel>
  47. {
  48. new InputViewModel("id", hide: true),
  49. new InputViewModel("dutyName", displayName: "职务名称"),
  50. new InputViewModel("remark",InputTypes.Textarea, "说明").SetNotRequired(),
  51. };
  52. //var specials = new List<SpecialInputModel>();
  53. }
  54. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  55. @Html.Partial("Modals/_ModalFooter", "0")
  56. </div>
  57. </div>
  58. </div>
  59. </section>
  60. }
  61. @section scripts
  62. {
  63. <script src="~/Content/Plugins/kindeditor/kindeditor-all.js"></script>
  64. <script src="~/Content/Plugins/kindeditor/lang/zh-CN.js"></script>
  65. <script type="text/javascript">
  66. $(function () {
  67. //show完毕前执行
  68. LoadTable();
  69. var funs = window.funs || { none: function () { console.log("No type"); } };
  70. funs["btnUpdate"] = function () { BtnUpdate({ readonly: "name" }); };
  71. });
  72. function GetSearchList() {
  73. var count = $("#SearchForm").find(".KeyWords").length;
  74. window._searchList = [];
  75. for (var i = 1; i <= count; i++) {
  76. var keyWords = $("#KeyWords-" + i).val();
  77. if (keyWords && keyWords !== "") {
  78. var keyField = $("#KeyField-" + i).val();
  79. var fieldType = $("#FieldType-" + i).val();
  80. var expType = $("#ExpType-" + i).val();
  81. window._searchList.push({ KeyWords: keyWords, KeyField: keyField, FieldType: fieldType, ExpType: expType });
  82. }
  83. }
  84. var isLock = $("#IsLock").val();
  85. window._searchList.push({ KeyWords: isLock, KeyField: "IsLock", FieldType: "0", ExpType: "6" });
  86. }
  87. </script>
  88. }