userSelectSameDepart.jsp 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 selectRows = $("#userList1").datagrid('getSelections');
  17. for(var i=0;i<selectRows.length;i++){
  18. for(var key in selectRows[i]){
  19. //console.log(key+"======="+selectRows[i][key]);
  20. if(key=="id"){
  21. if(strId.length>0){
  22. strId+=","+selectRows[i][key];
  23. }else{
  24. strId=selectRows[i][key];
  25. }
  26. }
  27. if(key=="realName"){
  28. if(strName.length>0){
  29. strName+=","+selectRows[i][key];
  30. }else{
  31. strName=selectRows[i][key];
  32. }
  33. }
  34. }
  35. }
  36. //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
  37. var strData='[{"strId":"'+strId+'","strName":"'+strName+'"}]';
  38. return strData;
  39. }
  40. </script>
  41. <body>
  42. <t:datagrid name="userList1" title="common.user.select" actionUrl="userController.do?datagridUser&departid=${param.departid}"
  43. fit="true" fitColumns="true" idField="id" queryMode="group" sortName="createDate" sortOrder="desc">
  44. <t:dgCol title="common.id" field="id" hidden="true"></t:dgCol>
  45. <t:dgCol title="工号" field="userNum"></t:dgCol>
  46. <t:dgCol title="common.real.name" field="realName" query="true"></t:dgCol>
  47. <t:dgCol title="员工岗位" field="postId" dictionary="t_bus_post,id,post_name, and delete_flag = '0' and status = '0'"></t:dgCol>
  48. <%--<t:dgCol title="common.username" sortable="false" field="userName" query="true"></t:dgCol>--%>
  49. <%--<t:dgCol title="common.department" sortable="false" field="userOrgList.tsDepart.departname" query="false"></t:dgCol>--%>
  50. <%--<t:dgCol title="common.role" field="userKey" ></t:dgCol>--%>
  51. <t:dgCol title="common.createby" field="createBy" hidden="true"></t:dgCol>
  52. <t:dgCol title="common.createtime" field="createDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  53. <t:dgCol title="common.updateby" field="updateBy" hidden="true"></t:dgCol>
  54. <t:dgCol title="common.updatetime" field="updateDate" formatter="yyyy-MM-dd" hidden="true"></t:dgCol>
  55. <t:dgCol title="common.status" sortable="true" field="positionStatus" dictionary="jobStatus"></t:dgCol>
  56. </t:datagrid>
  57. </body>