userWagestrategyNoList.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
  4. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  5. <div class="easyui-layout" fit="true">
  6. <div region="center" style="padding:0px;border:0px">
  7. <t:datagrid name="userWagestrategyList" checkbox="false" autoLoadData="true" pagination="false" fitColumns="false" sortName="username"
  8. sortOrder="desc" title="待配置工资策略清单" actionUrl="userWagestrategyController.do?nowagedatagrid"
  9. idField="id" fit="true" queryMode="group">
  10. <t:dgCol title="主键" field="id" align="center" hidden="true" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="员工ID" field="userid" align="center" hidden="true" query="false" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="员工工号" field="userNum" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="员工姓名" field="realname" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="员工id" field="userids" sortable="false" align="center" hidden="true" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="是否配置策略" field="isset" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
  16. <t:dgCol title="所属单位" field="departname" frozenColumn="true" sortable="false" queryMode="single" width="220"></t:dgCol>
  17. <t:dgCol title="所属单位id" field="departid" sortable="false" hidden="true" query="false" queryMode="single" width="120"></t:dgCol>
  18. <t:dgCol title="职务ID" field="dutid" hidden="true" align="center" queryMode="single" width="120"></t:dgCol>
  19. <t:dgCol title="职务" field="dutiesname" sortable="false" queryMode="single" width="180"></t:dgCol>
  20. <t:dgCol title="加班费策略" field="overtimepayStrategyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_overtimepay_strategy,id,strategy_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  21. <t:dgCol title="值班费策略" field="dutyStrategyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_dutyfee_strategy,id,strategy_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  22. <t:dgCol title="证书补贴" field="certificateSubsidyid" sortable="false" hidden="true" queryMode="single" width="120"></t:dgCol>
  23. <t:dgCol title="证书补贴" field="certificateName" sortable="false" queryMode="single" width="120"></t:dgCol>
  24. <t:dgCol title="交通补贴" field="trafficSubsidyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_traffic_subsidy,id,subsidy_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  25. <t:dgCol title="高温补贴" field="megathermalSubsidyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_megathermal_subsidy,id,subsidy_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  26. <t:dgCol title="餐补策略" field="strategyType" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="strategy_type" width="120"></t:dgCol>
  27. <t:dgCol title="按次餐费补贴" field="nofixedmealsSubsidyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_meals_subsidy,id,subsidy_name, and delete_flag = '0' and status = '0' and subsidy_type = 'anciguding' and (project is null or project = '${orgIds}')" width="120"></t:dgCol>
  28. <t:dgCol title="固定餐费补贴" field="fixedmealsSubsidyid" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_meals_subsidy,id,subsidy_name, and delete_flag = '0' and status = '0' and subsidy_type = 'anyueguding' and (project is null or project = '${orgIds}')" width="120"></t:dgCol>
  29. <t:dgCol title="缴金补贴" style="text-align:right," field="jiaojinSubsidyid" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  30. <t:dgCol title="项目绩效" style="text-align:right," field="projectPerformance" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  31. <t:dgCol title="其他补贴" field="otherSubsidyid" sortable="false" align="center" queryMode="single" extendParams="editor:'combobox'" dictionary="t_bus_other_subsidy,id,subsidy_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  32. <t:dgCol title="社保策略" field="socialSecurityStrategyid" sortable="false" extendParams="editor:'combobox'" queryMode="single" dictionary="t_bus_social_security_strategy,id,social_security_unit, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  33. <t:dgCol title="公积金策略" field="providentFundStrategyid" sortable="false" extendParams="editor:'combobox'" queryMode="single" dictionary="t_bus_provident_fund_strategy,id,provident_fund_name, and delete_flag = '0' and status = '0'" width="120"></t:dgCol>
  34. <t:dgCol title="其他补贴-追加调整" style="text-align:right," field="appendPay" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  35. <t:dgCol title="代扣款" style="text-align:right," field="daikouFee" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  36. <t:dgCol title="扣除调整" style="text-align:right," field="deductPay" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  37. <t:dgCol title="独生子女费" style="text-align:right," field="onlychildPay" align="center" sortable="false" queryMode="single" extendParams="editor:{type:'numberbox',options:{ min:0,max:99999.99,precision:2}}" width="120"></t:dgCol>
  38. <t:dgCol title="状态" field="status" hidden="true" sortable="false" queryMode="single" width="120"></t:dgCol>
  39. <t:dgCol title="逻辑删除标识" field="deleteFlag" align="center" sortable="false" hidden="true" queryMode="single" dictionary="del_flag" width="120"></t:dgCol>
  40. <t:dgToolBar operationCode="edit" title="修改" icon="icon-edit" operationCode="edit" funname="editRow"></t:dgToolBar>
  41. <t:dgToolBar operationCode="save" title="保存" icon="icon-save" url="userWagestrategyController.do?saveRows" funname="saveData"></t:dgToolBar>
  42. <t:dgToolBar operationCode="undo" title="取消编辑" icon="icon-cancel1" funname="reject"></t:dgToolBar>
  43. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  44. </t:datagrid>
  45. </div>
  46. <script>
  47. $(function() {
  48. var datagrid = $("#userWagestrategyListtb");
  49. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  50. $("#pinjie1").html('');
  51. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  52. $("#pinjiechaxun1").html('');
  53. });
  54. <%-- $('#userWagestrategyList').datagrid({
  55. rowStyler:function(index,row){
  56. if (row.isset == "未配置"){
  57. return 'background-color:orange';
  58. }
  59. }
  60. });--%>
  61. </script>
  62. <div id="pinjie1">
  63. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  64. <div name="searchColums" style="margin:23px 0 18px 0;">
  65. <input type="hidden" id="orgCode" name="orgCode" value="${orgCode}">
  66. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  67. <tbody>
  68. <tr>
  69. <td align="right" style="width: 74px;">
  70. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>
  71. 项目名称:
  72. </label>
  73. </td>
  74. <td class="value" colspan="3">
  75. <input readonly="true" type="text" id="departname" name="departname" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
  76. <input id="orgIds" name="orgIds" type="hidden" value='${orgIds}'>
  77. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  78. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  79. </td>
  80. <td align="right" style="width: 74px;">
  81. <label class="Validform_label">
  82. 员工姓名:
  83. </label>
  84. </td>
  85. <td class="value">
  86. <input id="realname" name="realname" value='${realname}' type="text" style="width: 157px; " class="inputxt" placeholder="请输入员工姓名">
  87. </td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. </div>
  92. </div>
  93. </div>
  94. <div id="pinjiechaxun1">
  95. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  96. <span style="float:right;margin-bottom:4px;">
  97. <span>
  98. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="userWagestrategyListsearch()">查询</a>
  99. </span>
  100. <span>
  101. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('userWagestrategyList')">重置</a>
  102. </span>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <script src = "webpage/cn/com/lzt/userwagestrategy/userWagestrategyList.js"></script>
  108. <style>
  109. .validatebox-text::-ms-clear {
  110. display: none;
  111. width : 0;
  112. height: 0;
  113. }
  114. </style>
  115. <script type="text/javascript">
  116. //保存数据
  117. function saveData(title,addurl,gname){
  118. if(!endEdit(gname))
  119. return false;
  120. var rows=$('#'+gname).datagrid("getChanges","inserted");
  121. var uprows=$('#'+gname).datagrid("getChanges","updated");
  122. rows=rows.concat(uprows);
  123. if(rows.length<=0){
  124. layer.alert("没有需要保存的数据!");
  125. //tip("没有需要保存的数据!");
  126. return false;
  127. }
  128. var result={};
  129. var mycars = new Array();
  130. for(var i=0;i<rows.length;i++){
  131. mycars[i] = new Array();
  132. for(var d in rows[i]){
  133. mycars[i][d] = rows[i][d];
  134. result["userWagestrategyDaoList["+i+"]."+d]=rows[i][d];
  135. }
  136. }
  137. var temp = false;
  138. for(var j=0;j<mycars.length;j++){
  139. var username = mycars[j].username;
  140. var strategyType = mycars[j].strategyType;
  141. /* var nofixedmealsSubsidyid = mycars[j].nofixedmealsSubsidyid; */
  142. var fixedmealsSubsidyid = mycars[j].fixedmealsSubsidyid;
  143. if(strategyType == '0'){//
  144. if(fixedmealsSubsidyid == ''){
  145. layer.alert("<固定餐补补贴>不能为空!");
  146. //tip("员工编号为【"+username+"】的<固定餐补补贴>不能为空!");
  147. temp = true;
  148. }
  149. }else{
  150. /* if(nofixedmealsSubsidyid != '' || fixedmealsSubsidyid != ''){
  151. tip("员工编号为【"+username+"】的<固定餐补补贴>或<按次餐费补贴>没有为空!");
  152. temp = true;
  153. } */
  154. if(fixedmealsSubsidyid != '' && fixedmealsSubsidyid != '00000000614b4dbc016163e293c60022'){
  155. layer.alert("请设置<固定餐补补贴>为<无>!");
  156. //tip("员工编号为【"+username+"】的<固定餐补补贴>没有为空!");
  157. temp = true;
  158. }
  159. }
  160. if(temp){
  161. break;
  162. }
  163. }
  164. if(temp){
  165. setTimeout(function () {
  166. location.reload();
  167. }, 1500);
  168. return;
  169. }
  170. $.ajax({
  171. url:"<%=basePath%>/"+addurl,
  172. type:"post",
  173. data:result,
  174. dataType:"json",
  175. success:function(data){
  176. tip(data.msg);
  177. reloadTable();
  178. }
  179. })
  180. }
  181. //结束编辑
  182. function endEdit(gname){
  183. var editIndex = $('#'+gname).datagrid('getRows').length-1;
  184. for(var i=0;i<=editIndex;i++){
  185. if($('#'+gname).datagrid('validateRow', i)){
  186. $('#'+gname).datagrid('endEdit', i);
  187. }
  188. else{
  189. layer.alert("请选择餐补策略");
  190. return false;
  191. }
  192. }
  193. return true;
  194. }
  195. //编辑行
  196. function editRow(title,addurl,gname){
  197. var rows=$('#'+gname).datagrid("getChecked");
  198. if(rows.length==0){
  199. layer.alert("请选择条目");
  200. //tip("请选择条目");
  201. return false;
  202. }
  203. for(var i=0;i<rows.length;i++){
  204. var index= $('#'+gname).datagrid('getRowIndex', rows[i]);
  205. $('#'+gname).datagrid('beginEdit', index);
  206. }
  207. }
  208. //update-begin--Author:张忠亮 Date:20150709 for:修正 取消编辑后再次点击录入不进入编辑状态
  209. //取消编辑
  210. function reject(title,addurl,gname){
  211. $('#'+gname).datagrid('clearChecked');
  212. $('#'+gname).datagrid('rejectChanges');
  213. }
  214. //导出
  215. function ExportXls() {
  216. JeecgExcelExport("userWagestrategyController.do?exportXls","userWagestrategyList");
  217. }
  218. //选择项目名称,列表================
  219. function openDepartmentSelect() {
  220. //$.dialog.setting.zIndex = getzIndex();
  221. var orgIds = $("#orgIds").val();
  222. var orgCode = $("#orgCode").val();
  223. if("A_HR" == orgCode) {
  224. $.dialog({
  225. content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
  226. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  227. var iframe = this.iframe.contentWindow;
  228. if(iframe.getReason().length>0){
  229. var strData=eval(iframe.getReason());
  230. for(var key in strData[0]){
  231. if(key=="strPId"){
  232. $("#orgIds").val(strData[0][key]);
  233. }else if(key=="strDepartName"){
  234. $("#departname").val(strData[0][key]);
  235. }
  236. }
  237. }
  238. }, focus: true},
  239. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  240. ]}).zindex();
  241. } else {
  242. $.dialog({
  243. content: 'url:dialogDealController.do?projectDepartTablePart&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
  244. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  245. var iframe = this.iframe.contentWindow;
  246. if(iframe.getReason().length>0){
  247. var strData=eval(iframe.getReason());
  248. for(var key in strData[0]){
  249. if(key=="strPId"){
  250. $("#orgIds").val(strData[0][key]);
  251. }else if(key=="strDepartName"){
  252. $("#departname").val(strData[0][key]);
  253. }
  254. }
  255. }
  256. }, focus: true},
  257. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  258. ]}).zindex();
  259. }
  260. }
  261. function callbackClean(){
  262. $('#departname').val('');
  263. $('#orgIds').val('');
  264. }
  265. </script>