提交 acb30103 编写于 作者: S st

【考勤管理】修复申诉打开bug

上级 de82bf0b
...@@ -19,10 +19,10 @@ MWF.xApplication.Attendance.MyDetail = new Class({ ...@@ -19,10 +19,10 @@ MWF.xApplication.Attendance.MyDetail = new Class({
}, },
load: function(){ load: function(){
//options = { //options = {
// "name": "直接主管", // "name": "直接主管",
// "personName": this.workContext.getWork().creatorPerson // "personName": this.workContext.getWork().creatorPerson
//} //}
//return this.org.getPersonAttribute(options); //return this.org.getPersonAttribute(options);
this.loadTab(); this.loadTab();
}, },
loadTab : function(){ loadTab : function(){
...@@ -190,25 +190,25 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({ ...@@ -190,25 +190,25 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({
isLate : { text: "迟到", "type" : "select", "selectValue" : ["","true","false"], "selectText" : ["","迟到","未迟到"] }, isLate : { text: "迟到", "type" : "select", "selectValue" : ["","true","false"], "selectText" : ["","迟到","未迟到"] },
isLackOfTime : { text: "工时不足", "type" : "select", "selectValue" : ["","true","false"], "selectText" : ["","",""] }, isLackOfTime : { text: "工时不足", "type" : "select", "selectValue" : ["","true","false"], "selectText" : ["","",""] },
action : { "value" : "查询", type : "button", className : "filterButton", event : { action : { "value" : "查询", type : "button", className : "filterButton", event : {
click : function(){ click : function(){
var result = this.form.getResult(false,null,false,true,false); var result = this.form.getResult(false,null,false,true,false);
var year = this.preMonthDate.getFullYear().toString(); var year = this.preMonthDate.getFullYear().toString();
var month = (this.preMonthDate.getMonth()+1).toString(); var month = (this.preMonthDate.getMonth()+1).toString();
if( month.length == 1 )month = "0"+month; if( month.length == 1 )month = "0"+month;
result.cycleYear = year; result.cycleYear = year;
result.cycleMonth = month; result.cycleMonth = month;
if( typeOf( result.isAbsent ) == "string" )result.isAbsent = this.getBoolean( result.isAbsent ); if( typeOf( result.isAbsent ) == "string" )result.isAbsent = this.getBoolean( result.isAbsent );
if( typeOf( result.isLate ) == "string" )result.isLate = this.getBoolean( result.isLate ); if( typeOf( result.isLate ) == "string" )result.isLate = this.getBoolean( result.isLate );
if( typeOf( result.isLackOfTime ) == "string" )result.isLackOfTime = this.getBoolean( result.isLackOfTime ); if( typeOf( result.isLackOfTime ) == "string" )result.isLackOfTime = this.getBoolean( result.isLackOfTime );
if( result.date && result.date !="" ){ if( result.date && result.date !="" ){
result.q_date = year + "-" + month + "-" + result.date; result.q_date = year + "-" + month + "-" + result.date;
} }
this.loadView( result ); this.loadView( result );
}.bind(this) }.bind(this)
}} }}
} }
}, this.app, this.css); }, this.app, this.css);
this.form.load(); this.form.load();
...@@ -636,7 +636,7 @@ MWF.xApplication.Attendance.MyDetail.DetailStaticView = new Class({ ...@@ -636,7 +636,7 @@ MWF.xApplication.Attendance.MyDetail.DetailStaticView = new Class({
if( month.length == 1 )month = "0"+month; if( month.length == 1 )month = "0"+month;
filter.cycleMonth = month; filter.cycleMonth = month;
this.actions.listStaticMonthPerson( filter.q_empName, filter.cycleYear,filter.cycleMonth, function(json){ this.actions.listStaticMonthPerson( filter.q_empName, filter.cycleYear,filter.cycleMonth, function(json){
if( callback )callback(json); if( callback )callback(json);
}.bind(this)) }.bind(this))
}, },
...@@ -776,14 +776,17 @@ MWF.xApplication.Attendance.MyDetail.Document = new Class({ ...@@ -776,14 +776,17 @@ MWF.xApplication.Attendance.MyDetail.Document = new Class({
}.bind(this)}); }.bind(this)});
}, },
seeAppeal : function(){ seeAppeal : function(){
if(!this.data.appealInfos){
var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data ); if(this.data.appealInfos[0].appealAuditInfo){
form.open(); if(this.data.appealInfos[0].appealAuditInfo.workId){
}else{ var workid = this.data.appealInfos[0].appealAuditInfo.workId;
var workid = this.data.appealInfos[0].appealAuditInfo.workId; var options = {"workId":workid, "appId": "process.Work"+workid};
var options = {"workId":workid, "appId": "process.Work"+workid}; this.app.desktop.openApplication(null, "process.Work", options);
this.app.desktop.openApplication(null, "process.Work", options); return;
}
} }
var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data );
form.open();
} }
}); });
...@@ -916,8 +919,8 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({ ...@@ -916,8 +919,8 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
} }
if( d.isGetSelfHolidays && d.selfHolidayDayTime == "下午" ){ if( d.isGetSelfHolidays && d.selfHolidayDayTime == "下午" ){
status.push("请假或外出报备"); status.push("请假或外出报备");
//}else if(d.isLeaveEarlier){ //}else if(d.isLeaveEarlier){
// status.push( '早退') // status.push( '早退')
}else if(d.isAbsent && d.absentDayTime == "下午" ){ }else if(d.isAbsent && d.absentDayTime == "下午" ){
status.push( '缺勤') status.push( '缺勤')
}else if(d.isAbnormalDuty && d.abnormalDutyDayTime == "下午" ){ }else if(d.isAbnormalDuty && d.abnormalDutyDayTime == "下午" ){
...@@ -934,13 +937,13 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({ ...@@ -934,13 +937,13 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
} else if (d.status == -1) { } else if (d.status == -1) {
appealStatus = "审批未通过" appealStatus = "审批未通过"
} }
//if (d.appealStatus == 1) { //if (d.appealStatus == 1) {
// appealStatus = "申诉中" // appealStatus = "申诉中"
//} else if (d.appealStatus == -1) { //} else if (d.appealStatus == -1) {
// appealStatus = "申诉未通过" // appealStatus = "申诉未通过"
//} else if (d.appealStatus == 9) { //} else if (d.appealStatus == 9) {
// appealStatus = "申诉通过" // appealStatus = "申诉通过"
//} //}
this.data.appealStatusShow = appealStatus; this.data.appealStatusShow = appealStatus;
//var auditors = this.getAuditor(); //var auditors = this.getAuditor();
...@@ -955,25 +958,25 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({ ...@@ -955,25 +958,25 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
+"<tr><td styles='formTableTitle' lable='onDutyTime'></td>"+ +"<tr><td styles='formTableTitle' lable='onDutyTime'></td>"+
" <td styles='formTableValue' item='onDutyTime'></td>" + " <td styles='formTableValue' item='onDutyTime'></td>" +
((this.data.signProxy=="2"||this.data.signProxy=="3")? ((this.data.signProxy=="2"||this.data.signProxy=="3")?
" <td styles='formTableTitle' lable='morningOffDutyTime'></td>"+ " <td styles='formTableTitle' lable='morningOffDutyTime'></td>"+
" <td styles='formTableValue' item='morningOffDutyTime'></td></tr>" + " <td styles='formTableValue' item='morningOffDutyTime'></td></tr>" +
"<tr><td styles='formTableTitle' lable='afternoonOnDutyTime'></td>"+ "<tr><td styles='formTableTitle' lable='afternoonOnDutyTime'></td>"+
" <td styles='formTableValue' item='afternoonOnDutyTime'></td>" : "" " <td styles='formTableValue' item='afternoonOnDutyTime'></td>" : ""
) + ) +
" <td styles='formTableTitle' lable='offDutyTime'></td>"+ " <td styles='formTableTitle' lable='offDutyTime'></td>"+
" <td styles='formTableValue' item='offDutyTime'></td></tr>" + " <td styles='formTableValue' item='offDutyTime'></td></tr>" +
( ( this.isNew && identityList.identities.length > 1 ) ? ( ( this.isNew && identityList.identities.length > 1 ) ?
"<tr><td styles='formTableTitle' lable='identity'></td>"+ "<tr><td styles='formTableTitle' lable='identity'></td>"+
" <td styles='formTableValue' item='identity' colspan='3'></td></tr>" : "" " <td styles='formTableValue' item='identity' colspan='3'></td></tr>" : ""
) + ) +
( this.isNew ? ( this.isNew ?
"<tr><td styles='formTableTitle' lable='statusShow'></td>"+ "<tr><td styles='formTableTitle' lable='statusShow'></td>"+
" <td styles='formTableValue' item='statusShow'></td>" + " <td styles='formTableValue' item='statusShow'></td>" +
" <td styles='formTableTitle' lable='appealStatusShow'></td>"+ " <td styles='formTableTitle' lable='appealStatusShow'></td>"+
" <td styles='formTableValue' item='appealStatusShow'></td></tr>" " <td styles='formTableValue' item='appealStatusShow'></td></tr>"
: :
"<tr><td styles='formTableTitle' lable='appealStatusShow'></td>"+ "<tr><td styles='formTableTitle' lable='appealStatusShow'></td>"+
" <td styles='formTableValue' item='appealStatusShow' colspan='3'></td></tr>" " <td styles='formTableValue' item='appealStatusShow' colspan='3'></td></tr>"
) )
+ +
"<tr><td styles='formTableTitle' lable='appealReason'></td>"+ "<tr><td styles='formTableTitle' lable='appealReason'></td>"+
...@@ -1016,8 +1019,8 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({ ...@@ -1016,8 +1019,8 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
type : "select", type : "select",
selectValue : ["","临时请假","出差","因公外出","其他"], selectValue : ["","临时请假","出差","因公外出","其他"],
event : { change : function(mdi){ event : { change : function(mdi){
_self.switchFieldByAppealReason(mdi.getValue()); _self.switchFieldByAppealReason(mdi.getValue());
}} }}
}, },
identity : { identity : {
notEmpty : true, notEmpty : true,
...@@ -1138,7 +1141,7 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({ ...@@ -1138,7 +1141,7 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
}.bind(this), null, false ); }.bind(this), null, false );
}else if( setting.APPEAL_AUDITOR_TYPE.configValue == "人员属性" ){ }else if( setting.APPEAL_AUDITOR_TYPE.configValue == "人员属性" ){
this.app.personActions.getPerson( function( json ){ this.app.personActions.getPerson( function( json ){
var attribute = setting.APPEAL_AUDITOR_VALUE.configValue; var attribute = setting.APPEAL_AUDITOR_VALUE.configValue;
json.data.woPersonAttributeList.each( function( attr ){ json.data.woPersonAttributeList.each( function( attr ){
if( attr.name == attribute ){ if( attr.name == attribute ){
var p = attr.attributeList[0]; var p = attr.attributeList[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册