userWageViewList.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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="userWageList" pagination="false" checkbox="false" fitColumns="false" title="月度工资一览" actionUrl="userWageController.do?datagrid1" idField="id" fit="true" queryMode="group">
  7. <t:dgCol title="主键" field="id" hidden="true" sortable="false" queryMode="single" width="120"></t:dgCol>
  8. <t:dgCol title="员工id" hidden="true" field="userid" sortable="false" queryMode="single" width="120"></t:dgCol>
  9. <t:dgCol title="所属单位" sortable="false" frozenColumn="true" field="belongUnitname" queryMode="single" width="120"></t:dgCol>
  10. <t:dgCol title="所属单位id" align="center" sortable="false" hidden="true" field="belongUnitid" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="人数" style="text-align:right," sortable="false" frozenColumn="true" field="sumcount" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="工资月度" align="center" sortable="false" frozenColumn="true" query="false" field="monthly" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="基本工资(元)" style="text-align:right," sortable="false" field="basicWage" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="职务津贴(元)" style="text-align:right," sortable="false" field="dutiesAllowance" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="补贴项(元)" style="text-align:right," sortable="false" field="certificateSubsidy" queryMode="single" width="120"></t:dgCol>
  16. <t:dgCol title="餐补(元)" style="text-align:right," sortable="false" field="mealsSubsidy" queryMode="single" width="120"></t:dgCol>
  17. <t:dgCol title="加班费(元)" style="text-align:right," sortable="false" field="specialOvertime" queryMode="single" width="120"></t:dgCol>
  18. <t:dgCol title="项目绩效(元)" style="text-align:right," sortable="false" field="projectPerformance" queryMode="single" width="120"></t:dgCol>
  19. <t:dgCol title="考勤扣(元)" style="text-align:right," sortable="false" field="absenceDebit" queryMode="single" width="120"></t:dgCol>
  20. <t:dgCol title="代扣款(元)" style="text-align:right," sortable="false" field="daikouDebit" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="其他扣除(元)" style="text-align:right," sortable="false" field="otherDebit" queryMode="single" width="120"></t:dgCol>
  22. <t:dgCol title="缴金补贴(元)" style="text-align:right," sortable="false" field="paymentSubsidy" queryMode="single" width="120"></t:dgCol>
  23. <t:dgCol title="补发调整(元)" style="text-align:right," sortable="false" field="reissue" queryMode="single" width="120"></t:dgCol>
  24. <t:dgCol title="应发工资(元)" style="text-align:right," sortable="false" field="preTaxMone" queryMode="single" width="120"></t:dgCol>
  25. <t:dgCol title="扣税金额(元)" style="text-align:right," sortable="false" field="taxMoney" queryMode="single" width="120"></t:dgCol>
  26. <t:dgCol title="实发金额(元)" style="text-align:right," sortable="false" field="actualMoney" queryMode="single" width="120"></t:dgCol>
  27. <t:dgCol title="缴金扣除(元)" style="text-align:right," sortable="false" field="deductions" queryMode="single" width="120"></t:dgCol>
  28. <t:dgCol title="企业缴金(元)" style="text-align:right," sortable="false" field="comDeductions" queryMode="single" width="120"></t:dgCol>
  29. <t:dgCol title="企业成本(元)" style="text-align:right," sortable="false" field="comCost" queryMode="single" width="120"></t:dgCol>
  30. <t:dgToolBar title="明细" icon="icon-detail" url="userWageController.do?goview" funname="goview"></t:dgToolBar>
  31. <t:dgToolBar title="导出一览表" icon="icon-putout" operationCode="putout" funname="ExportXls"></t:dgToolBar>
  32. <t:dgToolBar title="导出全部明细" icon="icon-putout" operationCode="putout" funname="ExportXlsAllDetail"></t:dgToolBar>
  33. <t:dgToolBar title="导出项目明细" icon="icon-putout" operationCode="putout" funname="ExportXlsDetailByProject"></t:dgToolBar>
  34. </t:datagrid>
  35. </div>
  36. <script>
  37. $(function() {
  38. var datagrid = $("#userWageListtb");
  39. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  40. $("#pinjie1").html('');
  41. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  42. $("#pinjiechaxun1").html('');
  43. });
  44. </script>
  45. <div id="pinjie1">
  46. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  47. <div name="searchColums" style="margin:23px 0 18px 0;">
  48. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  49. <tbody>
  50. <tr>
  51. <td align="right" style="width: 74px;">
  52. <label class="Validform_label">
  53. 项目名称:
  54. </label>
  55. </td>
  56. <td class="value" colspan="3">
  57. <input readonly="true" type="text" id="departname" name="departname" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
  58. <input id="orgIds" name="orgIds" type="hidden" value="">
  59. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  60. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  61. </td>
  62. <td align="right" style="width: 74px;">
  63. <label class="Validform_label">
  64. <span color="red" class="requiredIcon">*</span>
  65. 工资月度:
  66. </label>
  67. </td>
  68. <td class="value">
  69. <input class="Wdate" id="monthlys" name="monthlys" style="width: 157px; height: 28px;border-radius: 3px;" onClick="WdatePicker({readOnly:true,enableKeyboard:false,enableInputMask:false,dateFmt: 'yyyy-MM'})"/>
  70. </td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. <div id="pinjiechaxun1">
  78. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  79. <span style="float:right;margin-bottom:4px;">
  80. <span>
  81. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="userWageListsearch()">查询</a>
  82. </span>
  83. <span>
  84. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('userWageList')">重置</a>
  85. </span>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <script src = "webpage/cn/com/lzt/userwage/userWageList.js"></script>
  91. <script type="text/javascript">
  92. $(function(){
  93. isCss();
  94. });
  95. function isCss(){
  96. $("td[field='preTaxMone']").css({"background":"#d65653"});
  97. $("td[field='preTaxMone']").css({"color":"#ffffff"});
  98. $("td[field='actualMoney']").css({"background":"#d65653"});
  99. $("td[field='actualMoney']").css({"color":"#ffffff"});
  100. $("td[field='comCost']").css({"background":"#d65653"});
  101. $("td[field='comCost']").css({"color":"#ffffff"});
  102. }
  103. //导入
  104. function ImportXls() {
  105. openuploadwin('Excel导入', 'userWageController.do?upload', "userWageList");
  106. }
  107. //导出
  108. function ExportXls() {
  109. var monthlys = $("#monthlys").val();
  110. if(monthlys ==null||monthlys ==''){
  111. layer.alert('请选择工资月度');
  112. return false;
  113. }
  114. JeecgExcelExport("userWageController.do?exportXls1","userWageList");
  115. }
  116. //导出
  117. function ExportXlsAllDetail(title,url,id) {
  118. var monthlys = $("#monthlys").val();
  119. if(monthlys ==null||monthlys ==''){
  120. layer.alert('请选择工资月度');
  121. return false;
  122. }
  123. //JeecgExcelExport("userWageController.do?exportXlsDetailByProject"+"&monthly="+monthlys,"userWageList");
  124. var datagridId = "userWageList";
  125. var queryParams = $('#'+datagridId).datagrid('options').queryParams;
  126. $('#'+datagridId+'tb').find('*').each(function() {
  127. queryParams[$(this).attr('name')] = $(this).val();
  128. });
  129. var params = '&';
  130. $.each(queryParams, function(key, val){
  131. params+='&'+key+'='+val;
  132. });
  133. var fields = '&field=';
  134. $.each($('#'+ datagridId).datagrid('options').columns[0], function(i, val){
  135. if(val.field != 'opt'){
  136. fields+=val.field+',';
  137. }
  138. });
  139. var id='&id=';
  140. layer.msg('数据导出中,请稍候···', {
  141. time : 16000,
  142. shade: 0.1});
  143. window.location.href = "userWageController.do?exportXlsDetailByProject"+"&monthly="+monthlys+ encodeURI(fields+params+id);
  144. }
  145. //导出
  146. function ExportXlsDetailByProject(title,url,id) {
  147. /* var monthlys = $("#monthlys").val();
  148. if(monthlys ==null||monthlys ==''){
  149. layer.alert('请选择工资月度');
  150. return false;
  151. } */
  152. var rowsData = $('#'+id).datagrid('getSelections');
  153. if (!rowsData || rowsData.length==0) {
  154. layer.alert('请选择一条数据');
  155. return;
  156. }
  157. JeecgExcelExport("userWageController.do?exportXlsDetailByProject&orgId="+rowsData[0].belongUnitid+'&monthly='+rowsData[0].monthly,"userWageList");
  158. }
  159. //模板下载
  160. function ExportXlsByT() {
  161. JeecgExcelExport("userWageController.do?exportXlsByT","userWageList");
  162. }
  163. //新增
  164. function add(title,url,id){
  165. window.location.href=url
  166. }
  167. //修改
  168. function update(title,url, id){
  169. updateNotCreateWin("修改",url, "userWageList",false);
  170. }
  171. //查看
  172. function view(title,url, id){
  173. viewNotCreateWin("查看",url, "userWageList",false)
  174. }
  175. //新增
  176. function goview(title,url,id){
  177. var rowsData = $('#'+id).datagrid('getSelections');
  178. if (!rowsData || rowsData.length==0) {
  179. layer.alert('请选择一条数据');
  180. return;
  181. }
  182. var type = '';
  183. if(rowsData[0].belongUnitname == '其他管理层'){
  184. type = 1;
  185. }else{
  186. type = 2;
  187. }
  188. window.location.href=url+'&id='+rowsData[0].belongUnitid+'&monthly='+rowsData[0].monthly+'&type='+type;
  189. //addOneTab('项目月度工资明细', url+'&belongUnitname='+rowsData[0].belongUnitname+'&id='+rowsData[0].belongUnitid+'&monthly='+rowsData[0].monthly+'&type='+type);
  190. }
  191. //选择项目名称,列表================
  192. function openDepartmentSelect() {
  193. //$.dialog.setting.zIndex = getzIndex();
  194. var orgIds = $("#belongUnitid").val();
  195. $.dialog({
  196. content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
  197. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  198. var iframe = this.iframe.contentWindow;
  199. if(iframe.getReason().length>0){
  200. var strData=eval(iframe.getReason());
  201. for(var key in strData[0]){
  202. if(key=="strPId"){
  203. $("#orgIds").val(strData[0][key]);
  204. }else if(key=="strDepartName"){
  205. $("#departname").val(strData[0][key]);
  206. }
  207. }
  208. }
  209. }, focus: true},
  210. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  211. ]}).zindex();
  212. }
  213. function callbackClean(){
  214. $('#departname').val('');
  215. $('#orgIds').val('');
  216. }
  217. function userWageListsearch() {
  218. try {
  219. if (!$("#userWageListForm").Validform({
  220. tiptype : 3
  221. }).check()) {
  222. return false;
  223. }
  224. } catch (e) {
  225. }
  226. if (true) {
  227. var queryParams = $('#userWageList').datagrid('options').queryParams;
  228. $('#userWageListtb').find('*').each(function() {
  229. queryParams[$(this).attr('name')] = $(this).val();
  230. });
  231. if(queryParams.monthlys ==null||queryParams.monthlys ==''){
  232. layer.alert('请选择工资月度!');
  233. return false;
  234. }
  235. $('#userWageList')
  236. .datagrid(
  237. {
  238. url : 'userWageController.do?datagrid1&field=id,userid,belongUnitname,belongUnitid,sumcount,monthly,basicWage,dutiesAllowance,certificateSubsidy,mealsSubsidy,specialOvertime,projectPerformance,absenceDebit,paymentSubsidy,daikouDebit,otherDebit,reissue,preTaxMone,deductions,comDeductions,comCost,taxMoney,actualMoney,',
  239. pageNumber : 1
  240. });
  241. isCss();
  242. }
  243. }
  244. </script>