| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="userWagestrategyList" checkbox="false" autoLoadData="true" pagination="true" pageSize="50" fitColumns="false" sortName="username" sortOrder="desc" title="员工工资策略设定" actionUrl="userWagestrategyController.do?datagrid&orgIds=${orgIds }&departname=${departname}&realname=${realname}" idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" align="center" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="员工ID" field="userid" align="center" hidden="true" query="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="员工工号" field="userNum" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="员工姓名" field="realname" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="员工id" field="userids" sortable="false" align="center" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="是否配置策略" field="isset" frozenColumn="true" sortable="false" query="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="所属单位" field="departname" frozenColumn="true" sortable="false" queryMode="single" width="220"></t:dgCol>
- <t:dgCol title="所属单位id" field="departid" sortable="false" hidden="true" query="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="职务ID" field="dutid" hidden="true" align="center" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="职务" field="dutiesname" sortable="false" queryMode="single" width="180"></t:dgCol>
- <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>
- <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>
- <t:dgCol title="证书补贴" field="certificateSubsidyid" sortable="false" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="证书补贴" field="certificateName" sortable="false" queryMode="single" width="120"></t:dgCol>
- <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>
- <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>
- <t:dgCol title="餐补策略" field="strategyType" sortable="false" queryMode="single" extendParams="editor:'combobox'" dictionary="strategy_type" width="120"></t:dgCol>
- <%-- <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> --%>
- <%-- <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> --%>
- <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'" width="120"></t:dgCol>
- <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'" width="120"></t:dgCol>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
-
- <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>
- <t:dgCol title="状态" field="status" hidden="true" sortable="false" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="逻辑删除标识" field="deleteFlag" align="center" sortable="false" hidden="true" queryMode="single" dictionary="del_flag" width="120"></t:dgCol>
- <%-- <t:dgCol title="操作" field="opt"></t:dgCol> --%>
- <%-- <t:dgDelOpt title="删除" url="userWagestrategyController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/> --%>
- <t:dgToolBar operationCode="edit" title="修改" icon="icon-edit" operationCode="edit" funname="editRow"></t:dgToolBar>
- <t:dgToolBar operationCode="save" title="保存" icon="icon-save" url="userWagestrategyController.do?saveRows" funname="saveData"></t:dgToolBar>
- <t:dgToolBar operationCode="undo" title="取消编辑" icon="icon-cancel1" funname="reject"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- </t:datagrid>
- </div>
- <script>
- $(function() {
- var datagrid = $("#userWagestrategyListtb");
- datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
- $("#pinjie1").html('');
-
-
- datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
- $("#pinjiechaxun1").html('');
- });
- // $('#userWagestrategyList').datagrid({
- // rowStyler:function(index,row){
- // if (row.isset == "未配置"){
- // return 'background-color:#CDCDC1';
- // }
- // }
- // });
-
- </script>
- <div id="pinjie1">
- <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
- <div name="searchColums" style="margin:23px 0 18px 0;">
- <input type="hidden" id="orgCode" name="orgCode" value="${orgCode}">
- <table style="padding:0px" cellpadding="0" cellspacing="1" >
- <tbody>
- <tr>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 项目名称:
- </label>
- </td>
- <td class="value" colspan="3">
- <input readonly="true" type="text" id="departname" name="departname" style="width: 157px" datatype="*" value='${departname}' placeholder="请选择项目名称" onclick="openDepartmentSelect()">
- <input id="orgIds" name="orgIds" type="hidden" value='${orgIds}'>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
- <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a> -->
- </td>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 员工姓名:
- </label>
- </td>
- <td class="value">
- <input id="realname" name="realname" value='${realname}' type="text" style="width: 157px; " class="inputxt" placeholder="请输入员工姓名">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
-
- <div id="pinjiechaxun1">
- <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
- <span style="float:right;margin-bottom:4px;">
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="userWagestrategyListsearch1()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('userWagestrategyList')">重置</a>
- </span>
- </div>
- </div>
- </div>
- </div>
- <script src = "webpage/cn/com/lzt/userwagestrategy/userWagestrategyList.js"></script>
- <style>
- .validatebox-text::-ms-clear {
- display: none;
- width : 0;
- height: 0;
- }
- </style>
- <script type="text/javascript">
-
- function userWagestrategyListsearch1(){
- var orgIds = $("#orgIds").val();
- // if(orgIds == null || orgIds.length == 0){
- // layer.alert("请选择项目");
- // return;
- // }
- window.location.href="userWagestrategyController.do?list&orgIds=" + orgIds+"&departname="+$("#departname").val()+"&realname="+$("#realname").val();
- }
-
- //保存数据
- function saveData(title,addurl,gname){
- if(!endEdit(gname))
- return false;
- var rows=$('#'+gname).datagrid("getChanges","inserted");
- var uprows=$('#'+gname).datagrid("getChanges","updated");
- rows=rows.concat(uprows);
- if(rows.length<=0){
- layer.alert("没有需要保存的数据!");
- //tip("没有需要保存的数据!");
- return false;
- }
- var result={};
- var mycars = new Array();
- for(var i=0;i<rows.length;i++){
- mycars[i] = new Array();
- for(var d in rows[i]){
- mycars[i][d] = rows[i][d];
- result["userWagestrategyDaoList["+i+"]."+d]=rows[i][d];
- }
- }
-
- var temp = false;
- for(var j=0;j<mycars.length;j++){
- var username = mycars[j].username;
- var strategyType = mycars[j].strategyType;
- /* var nofixedmealsSubsidyid = mycars[j].nofixedmealsSubsidyid; */
- var fixedmealsSubsidyid = mycars[j].fixedmealsSubsidyid;
- if(strategyType == '0'){//
- if(fixedmealsSubsidyid == ''){
- layer.alert("<固定餐补补贴>不能为空!");
- //tip("员工编号为【"+username+"】的<固定餐补补贴>不能为空!");
- temp = true;
- }
- }else{
- /* if(nofixedmealsSubsidyid != '' || fixedmealsSubsidyid != ''){
- tip("员工编号为【"+username+"】的<固定餐补补贴>或<按次餐费补贴>没有为空!");
- temp = true;
- } */
- if(fixedmealsSubsidyid != '' && fixedmealsSubsidyid != '00000000614b4dbc016163e293c60022'){
- layer.alert("请设置<固定餐补补贴>为<无>!");
- //tip("员工编号为【"+username+"】的<固定餐补补贴>没有为空!");
- temp = true;
- }
- }
- if(temp){
- break;
- }
- }
-
- if(temp){
- setTimeout(function () {
- location.reload();
- }, 1500);
- return;
- }
-
- $.ajax({
- url:"<%=basePath%>/"+addurl,
- type:"post",
- data:result,
- dataType:"json",
- success:function(data){
- tip(data.msg);
- reloadTable();
- }
- })
- }
- //结束编辑
- function endEdit(gname){
- var editIndex = $('#'+gname).datagrid('getRows').length-1;
- for(var i=0;i<=editIndex;i++){
- if($('#'+gname).datagrid('validateRow', i)){
- $('#'+gname).datagrid('endEdit', i);
- }
- else{
- layer.alert("请选择餐补策略");
- return false;
- }
- }
- return true;
- }
- //编辑行
- function editRow(title,addurl,gname){
- var rows=$('#'+gname).datagrid("getChecked");
- if(rows.length==0){
- layer.alert("请选择条目");
- //tip("请选择条目");
- return false;
- }
- for(var i=0;i<rows.length;i++){
- var index= $('#'+gname).datagrid('getRowIndex', rows[i]);
- $('#'+gname).datagrid('beginEdit', index);
- }
- }
- //update-begin--Author:张忠亮 Date:20150709 for:修正 取消编辑后再次点击录入不进入编辑状态
- //取消编辑
- function reject(title,addurl,gname){
- $('#'+gname).datagrid('clearChecked');
- $('#'+gname).datagrid('rejectChanges');
- }
-
- // //导出
- // function ExportXls() {
- // JeecgExcelExport("userWagestrategyController.do?exportXls","userWagestrategyList");
- // }
- //导出
- function ExportXls() {
- excelExport("userWagestrategyController.do?exportXls","userWagestrategyList",40000);
- }
- function excelExport(url,datagridId,time){
- var queryParams = $('#'+datagridId).datagrid('options').queryParams;
- $('#'+datagridId+'tb').find('*').each(function() {
- queryParams[$(this).attr('name')] = $(this).val();
- });
- var params = '&';
- $.each(queryParams, function(key, val){
- params+='&'+key+'='+val;
- });
- var fields = '&field=';
- $.each($('#'+ datagridId).datagrid('options').columns[0], function(i, val){
- if(val.field != 'opt'){
- fields+=val.field+',';
- }
- });
- //update-begin--Author:dangzhenghui Date:20170429 for:TASK #1869 【demo】jeecg excel导出 可以导出 指定行的数据
- var id='&id=';
- //update-by yulong.zhao 17-10-15 注释该代码具体业务不需要导出指定行
- /*$.each($('#'+ datagridId).datagrid('getSelections'), function(i, val){
- id+=val.id+",";
- });*/
- // alert(fields+params+id);
- layer.msg('数据导出中,请稍候···', {
- time : time,
- shade: 0.1});
- window.location.href = url+ encodeURI(fields+params+id);
- }
- //选择项目名称,列表================
- function openDepartmentSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#orgIds").val();
- var orgCode = $("#orgCode").val();
- if("A_HR" == orgCode) {
- $.dialog({
- content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strPId"){
- $("#orgIds").val(strData[0][key]);
- }else if(key=="strDepartName"){
- $("#departname").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- } else {
- $.dialog({
- content: 'url:dialogDealController.do?projectDepartTablePart&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strPId"){
- $("#orgIds").val(strData[0][key]);
- }else if(key=="strDepartName"){
- $("#departname").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- }
- function callbackClean(){
- $('#departname').val('');
- $('#orgIds').val('');
- }
- </script>
|