| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- /**
- * 员工预离职列表
- */
- shr.defineClass("shr.batchAffair.EmpBatchPlatformPreResignList", shr.batchAffair.EmpBatchMaintainBaseList, {
- tempfilter: '',
- initalizeDOM: function() {
- shr.batchAffair.EmpBatchPlatformPreResignList.superClass.initalizeDOM.call(this);
- this.loadMaintainPropFiles();
-
- this.remoteCall({
- method: "getReasonByDefineType",
- param: {
- bizDefineType : '4'
- },
- success: function(data) {
- tempfilter = data.filter;
- }
- });
- },
- loadMaintainPropFiles:function(){
- shr.loadScript(shr.getContextPath() + '/addon/employee/web/js/shr/emp/empBatchParamUtils.js');
- shr.loadScript(shr.getContextPath() + '/addon/employee/web/js/shr/emp/empBatchDialogUtils.js');
- shr.loadScript(shr.getContextPath() + '/addon/employee/web/js/shr/emp/employeeBatchMaintainProp.js');
- shr.loadCss(shr.getContextPath() + '/addon/employee/web/css/shr/emp/employeeBatchMaintainProp.css');
- },
- //加载list
- billListAction:function(){
- var self = this;
- self.reloadPage({
- uipk: "com.kingdee.eas.custom.app.PlatPreRes.list"
- });
- },
-
- /**
- * 描述:删除操作
- */
- deleteRecord:function(selectedIds) {
- var _self = this;
- var url = shr.getContextPath() + "/dynamic.do?method=delete&uipk="+jsBinder.uipk;
- shr.showConfirm('您确认要删除吗?', function(){
- top.Messenger().hideAll();
-
- shr.remoteCall({
- url:url,
- type:'POST',
- param: {
- billId: selectedIds,
- logModel:shr.toJSON($("#grid").jqGrid("getSelectedRowsData"))
- },
- success : function(response) {
- shr.showInfo({
- message: "成功清除预离职信息",
- hideAfter: 5
- });
- _self.getGrid().jqGrid("reloadGrid");
- }
- });
- });
- },
- getNewDataAction: function () {
- var _self = this;
- // openLoader(1,"正在更新,请稍等...");
- var url = shr.getContextPath() + "/dynamic.do?method=getNewData&uipk="+jsBinder.uipk;
- shr.remoteCall({
- url:url,
- type:'POST',
- success : function(response) {
- shr.showInfo({
- message: "最新名单获取成功",
- hideAfter: 5
- });
- _self.getGrid().jqGrid("reloadGrid");
- }
- });
- // closeLoader();
- },
- /**
- * 生成单人离职单
- */
- effectSingleEmpResignBillAction: function () {
- var _self = this;
- if($("#grid").jqGrid("getSelectedRows").length == 0){
- shr.showWarning({
- message: "请先选中表格中的数据!"
- });
- return;
- }
- if($("#grid").jqGrid("getSelectedRows").length > 1){
- shr.showWarning({
- message: "仅支持单人生成单人离职单,请重新选择!",
- hideAfter: null
- });
- return;
- }
- var billId = _self.getSelectedIds();
- console.log(billId)
- // shr.remoteCall({//数据校验
- // url : shr.getContextPath() + "/dynamic.do?method=effectSingleEmpEnrollBill&uipk="+jsBinder.uipk,
- // type : "POST",
- // param:{"billId":billId},
- // success : function(res){
- // if(res.errorInfo != ""){
- // shr.showWarning({
- // message: res.errorInfo,
- // hideAfter: null
- // });
- // return;
- // }
- _self.reloadPage({
- uipk: 'com.kingdee.eas.hr.affair.app.ResignBizBill.formAll',
- method : 'addNew',
- personId: billId,
- ignoreHROrgF7Cache: false
- });
- // }
- // });
- },
-
- //批量维护
- batchMaintainAction:function(){
- //当前列表没有数据时,弹出提示语,不出现弹出框
- var gridData=$("#grid").jqGrid("getRowData");
- if( !gridData.length ){
- shr.showInfo({message:'当前列表没有数据!'});
- return;
- }
- var selectedIds = this.getSelectedIds();
- if(!selectedIds || selectedIds.length == 0){
- shr.showError({
- message: "请先选中表格中的数据!"
- });
- return;
- }
- var self = this,
- _propfield_data = [{value: 'applyDate', alias:'提出离职日期',type:'Date'},
- {value: 'preResignDate', alias:'预离职日期',type:'Date'},
- {value: 'preResignType', alias:'预离职状态',type:'F7',f7uipk:'com.kingdee.eas.hr.emp.app.PreResignType.FastFilter.F7',f7value:'',f7valText:'',f7title:'预离职状态'},
- {value: 'variationReason', alias:'预离职原因',type:'F7',f7uipk:'com.kingdee.eas.hr.base.app.VariationReason.FastFilter.F7',f7value:'',f7valText:'',f7title:'预离职原因',
- f7filter: tempfilter}
- ];
- //维护字段
- var data ={};
- data.propfield_data = _propfield_data;
- data.maintainEntityName = "com.kingdee.eas.hr.customextend.PlatformPreResign";
- data.objectName_FieldName = "person.name";
- data.executeHandler = "com.kingdee.shr.batchAffair.web.handler.EmpBatchPlatformPreResignListHandler";
- employeeBatchMaintainProp.initBatchMaintainOperate(self,data);
- },
- bathPreResignByExcelAction:function(){
- var curIOModelString = "com.kingdee.eas.hr.customextend.PlatformPreResign";
- var customData = tempfilter;
- this.doImportData("bathPreResignByExcel",{tempfilter:tempfilter});
- },
-
- exportToExcelAction:function(){
-
- shr.batchAffair.EmpBatchPreResignList.superClass.exportToExcelAction.call(this);
- },
- //单个维护
- onCellSelect: function(rowid, colIndex, cellcontent, e) {
- var _self = this;
- _self.selectedRowId = rowid;
- return;
-
- // // 选择的是选择框
- // if (colIndex == 0) {
- // return;
- // }
-
- // var billId = $(_self.gridId).jqGrid("getCell", rowid, "plaPre.id");
- // if( billId !="" && billId != undefined ){
- // shr.batchAffair.EmpBatchPlatformPreResignList.superClass.viewAction.call(this,billId);
- // }else{
- // // addNew
- // var empPosOrgRelaID = $(_self.gridId).jqGrid("getCell", rowid, "empOrgRelation.id");
- // var data = {
- // uipk: this.getEditUIPK(),
- // method: 'addNew',
- // empPosOrgRelaID: empPosOrgRelaID
- // };
- // shr.batchAffair.EmpBatchPlatformPreResignList.superClass.reloadPage.call(this,data);
- // }
- }
- });
|