statis.jsp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. <div class="easyui-layout" fit="true">
  5. <div region="center" style="padding:0px;border:0px">
  6. <t:datagrid name="list" checkbox="false" fitColumns="true" title="对外付款统计"
  7. actionUrl="tBActivitiCostPayTmpCompanyController.do?datagrid4statis" idField="id" fit="true" queryMode="group"
  8. sortName="createDate" sortOrder="desc">
  9. <t:dgCol title="所属部门" field="depName" queryMode="single" width="120"></t:dgCol>
  10. <t:dgCol title="预计支付金额" field="totalExpectMoney" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="申请支付金额" field="totalPayMoney" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="已支付金额" field="totalActualPayMoney" queryMode="single" width="120"></t:dgCol>
  13. </t:datagrid>
  14. </div>
  15. </div>
  16. <div name="searchColums" style="margin:23px 0 18px 0;">
  17. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  18. <tr>
  19. <td align="right" style="width: 75px;">
  20. 分组方式:
  21. </td>
  22. <td class="value">
  23. <label><input type="radio" name="group" value="depart" reset="false">按部门</label>
  24. <label><input type="radio" name="group" value="user" reset="false">按用户</label>
  25. </td>
  26. <td align="right" style="width: 75px;">
  27. 申请时间:
  28. </td>
  29. <td class="value">
  30. <input id="startTime" name="startCreateTime" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endTime\')}'})"/>
  31. -<input id="endTime" name="endCreateTime" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startTime\')}'})"/>
  32. </td>
  33. <td align="right" style="width: 50px;"></td>
  34. <td>
  35. <span id="departSearch">
  36. 部门:
  37. <input id="departId" name="departId" type="hidden" style="width: 150px" class="inputxt" value="${param.departId}"/>
  38. <input id="depName" type="text" readonly="readonly" value="${param.depName}"/>
  39. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="selectAllDep()">选择</a>
  40. </span>
  41. <span id="userSearch" style="display:none">
  42. 员工姓名:
  43. <input id="realName" name="realName" type="text"/>
  44. </span>
  45. </td>
  46. </tr>
  47. </table>
  48. </div>
  49. <%@include file="/webpage/cn/com/lzt/useractiviti/search.jsp"%>
  50. <script src="webpage/cn/com/lzt/useractiviti/select_user_tools.js"></script>
  51. <script type="text/javascript">
  52. var _gridId='list';
  53. var curGroup='${empty param.group?"depart":param.group}';
  54. $('input[name="group"][value="'+curGroup+'"]').attr('checked','checked');
  55. $('input[name="group"]').bind('click',function(){
  56. var val = $(this).val();
  57. if(val=='user'){
  58. $('#userSearch').show();
  59. $('#departSearch').hide();
  60. }else{
  61. $('#userSearch').hide();
  62. $('#departSearch').show();
  63. }
  64. })
  65. function pageSearch() {
  66. var selecteGroup=$('input[name="group"]:checked').val();
  67. if(selecteGroup != curGroup){
  68. curGroup = selecteGroup;
  69. changeGrid(selecteGroup);
  70. return false;
  71. }
  72. return true;
  73. }
  74. function changeGrid(group) {
  75. var opt =$("#list").datagrid('options');
  76. var width =120;
  77. var field ='';
  78. if(group=='depart') {
  79. opt.columns = [[
  80. {title: '所属部门', field: 'depName',width:width},
  81. {title: '预计支付金额', field: 'totalExpectMoney',width:width},
  82. {title: '申请支付金额', field: 'totalPayMoney',width:width},
  83. {title: '已支付金额', field: 'totalActualPayMoney',width:width}
  84. ]];
  85. }else {
  86. opt.columns = [[
  87. {title: '员工姓名', field: 'realName',width:width},
  88. {title: '预计支付金额', field: 'totalExpectMoney',width:width},
  89. {title: '申请支付金额', field: 'totalPayMoney',width:width},
  90. {title: '已支付金额', field: 'totalActualPayMoney',width:width}
  91. ]];
  92. }
  93. for(var i =0;i<opt.columns.length;i++){
  94. for(var j =0;j<opt.columns[i].length;j++) {
  95. field += ','+opt.columns[i][j].field;
  96. }
  97. }
  98. opt.url='tBActivitiCostPayTmpCompanyController.do?datagrid4statis&field='+field;
  99. var queryParams =_getParamObj();
  100. opt.queryParams = queryParams;
  101. opt.footer='';
  102. $("#list").datagrid(opt);
  103. }
  104. </script>