userWageViewBudgetList.jsp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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,autocomplete"></t:base>
  4. <div class="easyui-layout" fit="true">
  5. <div region="center" style="padding:0px;border:0px">
  6. <t:datagrid name="userWageList" pagination="false" autoLoadData="false" checkbox="false" fitColumns="false" title="加班预算执行表" actionUrl="userWageController.do?datagridbudget" idField="id" fit="true" queryMode="group">
  7. <t:dgCol title="主键" field="departid" hidden="true" sortable="false" queryMode="single" width="120"></t:dgCol>
  8. <t:dgCol title="项目管理处" field="departname" sortable="false" queryMode="single" width="220"></t:dgCol>
  9. <t:dgCol title="工资月度" align="center" sortable="false" query="false" field="yearmonth" queryMode="single" width="120"></t:dgCol>
  10. <t:dgCol title="项目加班费预算" align="right" sortable="false" field="projovertimebudget" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="项目加班费发生额" align="right" sortable="false" field="projovertime" queryMode="single" formatterjs="projovertimecolor" width="120"></t:dgCol>
  12. <t:dgCol title="国定加班费预算" align="right" sortable="false" field="govovertimebudget" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="国定加班费发生额" align="right" sortable="false" field="govovertime" formatterjs="govovertimecolor" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="值班费预算" align="right" sortable="false" field="ondutybudget" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="值班费发生额" align="right" sortable="false" field="onduty" formatterjs="ondutycolor" queryMode="single" width="120"></t:dgCol>
  16. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  17. </t:datagrid>
  18. </div>
  19. <script>
  20. $(function() {
  21. var datagrid = $("#userWageListtb");
  22. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  23. $("#pinjie1").html('');
  24. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  25. $("#pinjiechaxun1").html('');
  26. });
  27. function ondutycolor(value,row,index){
  28. if(row['ondutybudget'] && row['onduty'] > row['ondutybudget']){
  29. return "<span style='color:#FF0033 ;'>"+value+"</span>"
  30. }
  31. else
  32. return value;
  33. }
  34. function govovertimecolor(value,row,index){
  35. if(row['govovertimebudget'] && row['govovertime'] > row['govovertimebudget']){
  36. return "<span style='color:#FF0033 ;'>"+value+"</span>"
  37. }
  38. else
  39. return value;
  40. }
  41. function projovertimecolor(value,row,index){
  42. if(row['projovertimebudget'] && row['projovertime'] > row['projovertimebudget']){
  43. return "<span style='color:#FF0033 ; '>"+value+"</span>"
  44. }
  45. else
  46. return value;
  47. }
  48. </script>
  49. <div id="pinjie1">
  50. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  51. <div name="searchColums" style="margin:23px 0 18px 0;">
  52. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  53. <tbody>
  54. <tr>
  55. <td align="right" style="width: 74px;">
  56. <label class="Validform_label">
  57. 项目名称:
  58. </label>
  59. </td>
  60. <td class="value" colspan="3">
  61. <t:autocomplete entityName="TSDepart" searchField="departname" labelField="departname" name="departname" valueField="id" hiddenInputId="pjtId" width="250"
  62. scrollWidth="400" scrollHeight="400" ></t:autocomplete>
  63. <input id="pjtId" name="pjtId" type="hidden" value="">
  64. </td>
  65. <td align="right" style="width: 74px;">
  66. <label class="Validform_label">
  67. <span color="red" class="requiredIcon">*</span>
  68. 工资月度:
  69. </label>
  70. </td>
  71. <td class="value">
  72. <input class="Wdate" id="monthly" name="monthly" style="width: 157px; height: 28px;border-radius: 3px;" onClick="WdatePicker({readOnly:true,enableKeyboard:false,enableInputMask:false,dateFmt: 'yyyy-MM'})"/>
  73. </td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. <div id="pinjiechaxun1">
  81. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  82. <span style="float:right;margin-bottom:4px;">
  83. <span>
  84. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="doSearch()">查询</a>
  85. </span>
  86. <span>
  87. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('userWageList')">重置</a>
  88. </span>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script src = "webpage/cn/com/lzt/userwage/userWageList.js"></script>
  94. <script type="text/javascript">
  95. $(function(){
  96. });
  97. //导入
  98. function ImportXls() {
  99. openuploadwin('Excel导入', 'userWageController.do?upload', "userWageList");
  100. }
  101. //导出
  102. function ExportXls() {
  103. var monthly = $("#monthly").val();
  104. if(monthly ==null||monthly ==''){
  105. layer.alert('请选择工资月度');
  106. return false;
  107. }
  108. JeecgExcelExport("userWageController.do?exportXlsBudget","userWageList");
  109. }
  110. function doSearch() {
  111. try {
  112. if (!$("#userWageListForm").Validform({
  113. tiptype : 3
  114. }).check()) {
  115. return false;
  116. }
  117. } catch (e) {
  118. }
  119. var monthly = $("#monthly").val();
  120. if(monthly ==null||monthly ==''){
  121. layer.alert('请选择工资月度');
  122. return false;
  123. }
  124. userWageListsearch();
  125. }
  126. </script>