StaffList.cshtml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "StaffList";
  5. Guid? departmentID = new Guid(Request["departmentID"]);
  6. //院系所
  7. ComboGridOptions cgopCollege = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "CollegeID",
  11. ID = "CollegeDropdown",
  12. Name = "CollegeDropdown",
  13. OnSelect = "reload",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  20. },
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/College/List"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false,
  26. }
  27. };
  28. }
  29. @section scripts{
  30. <script type="text/javascript">
  31. var nonSelect = "@DropdownList.SELECT_ALL";
  32. //刷新
  33. function reload() {
  34. $("#dgStaffList").cmsXDataTable("load", $.getDataGridParams("dgStaffList"));
  35. }
  36. //设置列颜色为红色
  37. function SetRedColumn(index, row, value) {
  38. return " <span style=\"color: red;\">" + value + "</span>";
  39. }
  40. //Excel导出
  41. function DepartmentStaff_DetailExport() {
  42. $("#formQuery").submit();
  43. }
  44. </script>
  45. }
  46. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  47. <form id="formQuery" method="post" action="@Url.Content("~/Department/StaffListExcel?departmentID=" + departmentID)">
  48. @Html.PositionCondition("DepartmentStaff")
  49. <div class="search_keyword">
  50. <div class="search_input">
  51. <ul>
  52. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  53. <li class="sv">
  54. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  55. </li>
  56. <li class="sn" style="padding-left: 5px;">教师类型:</li>
  57. <li class="sv">
  58. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_TeacherType, DropdownListBindType.SelectAll,
  59. new ComboGridOptions
  60. {
  61. ID = "DictionaryTeacherType",
  62. Name = "DictionaryTeacherType",
  63. OnSelect = "reload"
  64. }, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  65. </li>
  66. <li class="sn" style="padding-left: 5px;">职称:</li>
  67. <li class="sv">
  68. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Title, DropdownListBindType.SelectAll,
  69. new ComboGridOptions
  70. {
  71. ID = "DictionaryTitle",
  72. Name = "DictionaryTitle",
  73. OnSelect = "reload"
  74. }, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  75. </li>
  76. </ul>
  77. <ul>
  78. <li class="sn" style="padding-left: 5px;">是否双师型:</li>
  79. <li class="sv">
  80. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, DropdownListBindType.SelectAll,
  81. new ComboGridOptions
  82. {
  83. ID = "IsDualTeacherDropdown",
  84. Name = "IsDualTeacherDropdown",
  85. OnSelect = "reload"
  86. }, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  87. </li>
  88. <li class="sn" style="padding-left: 5px;color: red;">照片有无:</li>
  89. <li class="sv">
  90. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_GeneralExist, DropdownListBindType.SelectAll,
  91. new ComboGridOptions
  92. {
  93. ID = "IsPhotoUrlDropdown",
  94. Name = "IsPhotoUrlDropdown",
  95. OnSelect = "reload"
  96. }, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  97. </li>
  98. <li class="sn" style="padding-left: 5px;color: red;">在职状态:</li>
  99. <li class="sv">
  100. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, new DropdownListOptions
  101. {
  102. ID = "DictionaryIncumbencyState",
  103. Name = "DictionaryIncumbencyState",
  104. BindType = DropdownListBindType.SelectAll,
  105. //SelectedValue = (int)EMIS.ViewModel.CF_IncumbencyState.Incumbency,
  106. OnSelect = "reload"
  107. },
  108. new Dictionary<string, string> { { "data-condition", "dgStaffList" } })
  109. @*@Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, DropdownListBindType.SelectAll,
  110. new ComboGridOptions
  111. {
  112. ID = "DictionaryIncumbencyState",
  113. Name = "DictionaryIncumbencyState",
  114. SelectedValue = (int)EMIS.ViewModel.CF_IncumbencyState.Incumbency,
  115. OnSelect = "reload"
  116. }, new Dictionary<string, string> { { "data-condition", "dgStaffList" } })*@
  117. </li>
  118. </ul>
  119. </div>
  120. </div>
  121. <div class="p_title">
  122. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  123. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("SfDetail")</div>
  124. </div>
  125. </form>
  126. <div class="search_list">
  127. @Html.DataGrid(new DataGridOptions
  128. {
  129. Columns = new List<DataGridColumn>()
  130. {
  131. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  132. new BoundFieldColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.04 },
  133. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  134. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="SexID", Width=0.02 },
  135. //new BoundFieldColumn { FieldName="BirthDate", HeaderText="出生日期", Align=AlignStyle.Center, Width=0.05, Formatter = Formatter.OnlyYearMonthDay },
  136. //new BoundFieldColumn { FieldName="NationName", HeaderText="民族", Align=AlignStyle.Center, OrderFieldName="NationID", Width=0.03 },
  137. new BoundFieldColumn { FieldName="TeacherTypeName", HeaderText="教师类型", Align=AlignStyle.Center, OrderFieldName="TeacherTypeID", Width=0.04 },
  138. new BoundFieldColumn { FieldName="IncumbencyStateName", HeaderText="在职状态", Align=AlignStyle.Center, OrderFieldName="IncumbencyState", Width=0.04 },
  139. new BoundFieldColumn { FieldName="TitleName", HeaderText="职称", Align=AlignStyle.Center, OrderFieldName="TitleID", Width=0.04 },
  140. new BoundFieldColumn { FieldName="OfficeTelephone", HeaderText="办公电话", Align=AlignStyle.Center, Width=0.065 },
  141. new BoundFieldColumn { FieldName="Mobile", HeaderText="移动电话", Align=AlignStyle.Center, Width=0.06 },
  142. new BoundFieldColumn { FieldName="PhotoHasValueName", HeaderText="照片", Align=AlignStyle.Center, OrderFieldName="PhotoHasValue", Width=0.02 },
  143. //new BoundFieldColumn { FieldName="CampusCode", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.05 },
  144. //new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  145. //new BoundFieldColumn { FieldName="CollegeNo", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  146. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.08, OverflowLength=10 },
  147. //new BoundFieldColumn { FieldName="DepartmentCode", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.05 },
  148. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="所属教研室", Align=AlignStyle.Center, Width=0.08, OverflowLength=10 }
  149. //new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=5 }
  150. },
  151. IsPostBack = true,
  152. IsCheckOnSelect = true,
  153. DataSourceUrl = Url.Content("~/Department/StaffList?departmentID=" + departmentID),
  154. ID = "dgStaffList",
  155. IsPagination = true,
  156. IsShowRowNumbers = true,
  157. IsSingleSelect = false
  158. })
  159. </div>
  160. </div>