userSelectSameAndSubDepart.jsp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
  2. <%@include file="/context/mytags.jsp" %>
  3. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  4. <script type="text/javascript">
  5. //首次进入加载level为1的
  6. $(function () {
  7. });
  8. //编写自定义JS代码获得输入框中的值等父级页面调用取值
  9. function getSelectedRow() {
  10. var selectRows = $("#userList1").datagrid('getSelections');
  11. return selectRows;
  12. }
  13. function getReason() {
  14. var strId = "";
  15. var strName = "";
  16. var orgIds = "";
  17. var employmentDate = "";
  18. var selectRows = $("#userList1").datagrid('getSelections');
  19. for (var i = 0; i < selectRows.length; i++) {
  20. for (var key in selectRows[i]) {
  21. //console.log(key+"======="+selectRows[i][key]);
  22. if (key == "id") {
  23. if (strId.length > 0) {
  24. strId += "," + selectRows[i][key];
  25. } else {
  26. strId = selectRows[i][key];
  27. }
  28. }
  29. if (key == "realName") {
  30. if (strName.length > 0) {
  31. strName += "," + selectRows[i][key];
  32. } else {
  33. strName = selectRows[i][key];
  34. }
  35. }
  36. if (key == "orgIds") {
  37. if (strName.length > 0) {
  38. orgIds += "," + selectRows[i][key];
  39. } else {
  40. orgIds = selectRows[i][key];
  41. }
  42. }
  43. if (key == "employmentDate") {
  44. if (strName.length > 0) {
  45. employmentDate += "," + selectRows[i][key];
  46. } else {
  47. employmentDate = selectRows[i][key];
  48. }
  49. }
  50. }
  51. }
  52. //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
  53. var strData = '[{"strId":"' + strId + '","strName":"' + strName + '","orgIds":"' + orgIds + '","employmentDate":"' + employmentDate + '"}]';
  54. return strData;
  55. }
  56. </script>
  57. <body>
  58. <t:datagrid name="userList1" title="common.user.select"
  59. actionUrl="publicpageController.do?datagridUser&departid=${param.departid}&includeLeave=${param.includeLeave}"
  60. fit="true" fitColumns="true" idField="id" queryMode="group" pagination="true" sortName="createDate"
  61. sortOrder="desc">
  62. <t:dgCol title="common.id" field="id" hidden="true" width="120"></t:dgCol>
  63. <t:dgCol title="工号" field="userNum" width="120"></t:dgCol>
  64. <t:dgCol title="common.real.name" field="realName" query="true" width="120"></t:dgCol>
  65. <t:dgCol title="员工岗位" field="postId" dictionary="t_bus_post,id,post_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  66. <t:dgCol title="入职日期" field="employmentDate" formatter="yyyy-MM-dd" width="120"></t:dgCol>
  67. <t:dgCol title="科室" field="orgIds" dictionary="t_s_depart,id,departname, and org_type != '1' " width="120"></t:dgCol>
  68. <%--<t:dgCol title="common.username" sortable="false" field="userName" query="true"></t:dgCol>--%>
  69. <%--<t:dgCol title="common.department" sortable="false" field="userOrgList.tsDepart.departname" query="false"></t:dgCol>--%>
  70. <%--<t:dgCol title="common.role" field="userKey" ></t:dgCol>--%>
  71. <t:dgCol title="common.createby" field="createBy" hidden="true"></t:dgCol>
  72. <t:dgCol title="common.createtime" field="createDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  73. <t:dgCol title="common.updateby" field="updateBy" hidden="true"></t:dgCol>
  74. <t:dgCol title="common.updatetime" field="updateDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  75. <%-- delete-刘梦祥-2021年11月19日17:56:50(由于没有在职状态的业务逻辑,暂时删除)--%>
  76. <%-- <t:dgCol title="common.status" sortable="true" field="positionStatus" dictionary="jobStatus" width="120"></t:dgCol>--%>
  77. </t:datagrid>
  78. </body>