提交 83ca6628 编写于 作者: L luojing

考勤,前端添加出勤率(个人,部门,公司)导出按钮,并添加对应的服务地址

上级 76f200e3
......@@ -53,6 +53,40 @@ MWF.xAction.RestActions.Action["x_attendance_assemble_control"] = new Class({
window.open(this.action.address+url , "_blank");
}.bind(this));
},
//个人出勤率导出
exportPersonStatisticAttachment: function(name,year, month, stream){
this.action.getActions(function(){
var url = this.action.actions.exportPersonStatisticAttachment.uri;
url = url.replace("{name}", name);
url = url.replace("{year}", year);
url = url.replace("{month}", month);
url = url.replace("{stream}", stream);
window.open(this.action.address+url , "_blank");
}.bind(this));
},
//部门出勤率导出
exportUnitStatisticAttachment: function(name,year, month, stream){
this.action.getActions(function(){
var url = this.action.actions.exportUnitStatisticAttachment.uri;
url = url.replace("{name}", name);
url = url.replace("{year}", year);
url = url.replace("{month}", month);
url = url.replace("{stream}", stream);
window.open(this.action.address+url , "_blank");
}.bind(this));
},
//公司出勤率导出
exportTopUnitStatisticAttachment: function(name,year, month, stream){
this.action.getActions(function(){
var url = this.action.actions.exportTopUnitStatisticAttachment.uri;
url = url.replace("{name}", name);
url = url.replace("{year}", year);
url = url.replace("{month}", month);
url = url.replace("{stream}", stream);
window.open(this.action.address+url , "_blank");
}.bind(this));
},
listHolidayByYearAndName: function(year,name,success, failure, async){
this.action.invoke({"name": "listHolidayFilter","data": {"q_Year": year, "q_Name" : name },"async": async, "success": success, "failure": failure});
},
......
......@@ -178,6 +178,12 @@ URL:x_attendance_assemble_control/jaxrs/attendancedetail/filter/list/{id}/prev
//统计导出
"detailsExportStream" : {"uri" : "/jaxrs/file/export/filter/{q_topUnitName}/{q_unitName}/{q_empName}/{cycleYear}/{cycleMonth}/{q_date}/{isAbsent}/{isLackOfTime}/{isLate}/stream/{stream}", "method": "GET"},
//个人出勤率导出
"exportPersonStatisticAttachment" : {"uri":"/jaxrs/file/export/person/{name}/{year}/{month}/stream/{stream}", "method": "GET"},
//部门出勤率导出
"exportUnitStatisticAttachment" : {"uri":"/jaxrs/file/export/unit/{name}/{year}/{month}/stream/{stream}", "method": "GET"},
//公司出勤率导出
"exportTopUnitStatisticAttachment" : {"uri":"/jaxrs/file/export/topunit/{name}/{year}/{month}/stream/{stream}", "method": "GET"},
"clazz": "x_attendance_assemble_control"
}
\ No newline at end of file
......@@ -490,6 +490,7 @@ MWF.xApplication.Attendance.PeopleDetail.DetailStaticExplorer = new Class({
" <td styles='filterTableTitle' lable='cycleMonth'></td>"+
" <td styles='filterTableValue' item='cycleMonth'></td>" +
" <td styles='filterTableValue' item='action'></td>" +
" <td styles='filterTableValue' item='export'></td>" +
"</tr>" +
"</table>";
this.fileterNode.set("html",html);
......@@ -526,7 +527,15 @@ MWF.xApplication.Attendance.PeopleDetail.DetailStaticExplorer = new Class({
if( !result )return;
this.loadView( result );
}.bind(this)
}}
}},
export : { "value" : "导出", type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
debugger;
this.actions.exportPersonStatisticAttachment(result.q_empName,result.cycleYear,result.cycleMonth,true);
}.bind(this)
}}
}
}, this.app, this.css);
this.form.load();
......
......@@ -484,6 +484,7 @@ MWF.xApplication.Attendance.TopUnitDetail.DetailStaticExplorer = new Class({
" <td styles='filterTableTitle' lable='cycleMonth'></td>"+
" <td styles='filterTableValue' item='cycleMonth'></td>" +
" <td styles='filterTableValue' item='action'></td>" +
" <td styles='filterTableValue' item='export'></td>" +
"</tr>" +
"</table>";
this.fileterNode.set("html",html);
......@@ -520,7 +521,14 @@ MWF.xApplication.Attendance.TopUnitDetail.DetailStaticExplorer = new Class({
if( !result )return;
this.loadView( result );
}.bind(this)
}}
}},
export : { "value" : "导出", type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
this.actions.exportTopUnitStatisticAttachment(result.q_topUnitName,result.cycleYear,result.cycleMonth,true);
}.bind(this)
}}
}
}, this.app, this.css);
this.form.load();
......
......@@ -483,6 +483,7 @@ MWF.xApplication.Attendance.UnitDetail.DetailStaticExplorer = new Class({
" <td styles='filterTableTitle' lable='cycleMonth'></td>"+
" <td styles='filterTableValue' item='cycleMonth'></td>" +
" <td styles='filterTableValue' item='action'></td>" +
" <td styles='filterTableValue' item='export'></td>" +
"</tr>" +
"</table>";
this.fileterNode.set("html",html);
......@@ -519,7 +520,14 @@ MWF.xApplication.Attendance.UnitDetail.DetailStaticExplorer = new Class({
if( !result )return;
this.loadView( result );
}.bind(this)
}}
}},
export : { "value" : "导出", type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
this.actions.exportUnitStatisticAttachment(result.q_unitName,result.cycleYear,result.cycleMonth,true);
}.bind(this)
}}
}
}, this.app, this.css);
this.form.load();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册