提交 0f1d48bf 编写于 作者: U unknown

考勤语言包

上级 a1b667c6
......@@ -140,16 +140,16 @@ MWF.xApplication.Attendance.AppSetting = new Class({
var d = this.decodeData( this.data );
var lp = this.app.lp;
var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>"+
"<tr><td colspan='4' styles='formTableHead'>系统设置</td></tr>" +
"<tr><td colspan='4' styles='formTableHead'>"+lp.systemSetting+"</td></tr>" +
"<tr><td styles='formTableTitle' lable='APPEALABLE'></td>"+
" <td styles='formTableValue' item='APPEALABLE'></td>"+
"<tr><td styles='formTableTitle' lable='APPEAL_AUDIFLOWTYPE'></td>"+
" <td styles='formTableValue' item='APPEAL_AUDIFLOWTYPE'></td>"+
"<tr item='AUDITOR_TYPE' style='display:"+ (d.APPEAL_AUDIFLOWTYPE == "WORKFLOW" ? "none" : "") +"'><td styles='formTableTitle' lable='APPEAL_AUDITOR_TYPE'></td>"+
" <td styles='formTableValue' item='APPEAL_AUDITOR_TYPE'></td>"+
"<tr item='valueArea' style='display:"+ (d.APPEAL_AUDITOR_TYPE == "汇报对象" || d.APPEAL_AUDIFLOWTYPE == "WORKFLOW" ? "none" : "") +"' ><td styles='formTableTitle' lable='APPEAL_AUDITOR_VALUE'></td>"+
"<tr item='valueArea' style='display:"+ (d.APPEAL_AUDITOR_TYPE == lp.reportTo || d.APPEAL_AUDITOR_TYPE == "汇报对象" || d.APPEAL_AUDIFLOWTYPE == "WORKFLOW" ? "none" : "") +"' ><td styles='formTableTitle' lable='APPEAL_AUDITOR_VALUE'></td>"+
" <td styles='formTableValue' style='width: 60%' item='APPEAL_AUDITOR_VALUE'></td>" +
"<tr item='AUDIFLOW' style='display:"+ (d.APPEAL_AUDIFLOWTYPE == "BUILTIN" ? "none" : "") +"'><td styles='formTableTitle' lable='APPEAL_AUDIFLOW_ID'></td>" +
" <td styles='formTableValue' style='width: 60%' item='APPEAL_AUDIFLOW_ID'></td>" +
......@@ -162,17 +162,17 @@ MWF.xApplication.Attendance.AppSetting = new Class({
this.itemTemplate = {
APPEALABLE : { text:"申诉及审批功能启用状态",
APPEALABLE : { text: lp.appealEnable,
type : "select",
value : d.APPEALABLE || "true",
selectText : ["开启","关闭"],
selectText : lp.appealSelectText,
selectValue : ["true","false"]
},
APPEAL_AUDIFLOWTYPE : { text : "考勤结果申诉流程类型",
APPEAL_AUDIFLOWTYPE : { text : lp.appealAuditFlowType,
type : "select",
value : d.APPEAL_AUDIFLOWTYPE ,
selectValue : this.dataJson.APPEAL_AUDIFLOWTYPE.selectContent.split("|"), //["人员属性","所属部门职位","指定人","汇报对象"],
selectText : ["自定义流程","内置流程"],
selectText : lp.appealAuditFlowTypeSelectText,
event : {
change : function( item, ev ){
this.createTableArea.getElement("[item='AUDITOR_TYPE']").setStyle( "display" , (item.getValue() == "WORKFLOW") ? "none" : "" );
......@@ -181,27 +181,27 @@ MWF.xApplication.Attendance.AppSetting = new Class({
}.bind(this)
}
},
APPEAL_AUDITOR_TYPE : { text : "申诉审核人确定方式",
APPEAL_AUDITOR_TYPE : { text : lp.appealAuditorType,
type : "select",
value : d.APPEAL_AUDITOR_TYPE ,
selectValue : this.dataJson.APPEAL_AUDITOR_TYPE.selectContent.split("|"), //["人员属性","所属部门职位","指定人","汇报对象"],
event : {
change : function( item, ev ){
this.createTableArea.getElement("[item='valueArea']").setStyle( "display" , (item.getValue() == "汇报对象") ? "none" : "" );
this.createTableArea.getElement("[item='valueArea']").setStyle( "display" , (item.getValue() == "汇报对象" || item.getValue() == lp.reportTo) ? "none" : "" );
}.bind(this)
}
},
APPEAL_AUDITOR_VALUE : { text : "申诉审核人确定内容",
APPEAL_AUDITOR_VALUE : { text : lp.appealAuditorValue,
type : "text",
value : d.APPEAL_AUDITOR_VALUE ,
defaultValue : "直属领导"
defaultValue : lp.directSupervisor
},
APPEAL_AUDIFLOW_ID : { text : "自定义申请流程",
APPEAL_AUDIFLOW_ID : { text : lp.appealAuditFlow,
type : "org",
orgType: ["process"],
count : 1,
isEdited : this.isEdited || this.isNew,
value : !d.APPEAL_AUDIFLOW_ID||d.APPEAL_AUDIFLOW_ID=="" ?"":d.APPEAL_AUDIFLOW_ID,
value : (!d.APPEAL_AUDIFLOW_ID||d.APPEAL_AUDIFLOW_ID== lp.none || d.APPEAL_AUDIFLOW_ID=="") ?"":d.APPEAL_AUDIFLOW_ID,
defaultValue : "",
orgWidgetOptions : {
"onLoadedInfor": function(item){
......@@ -233,7 +233,7 @@ MWF.xApplication.Attendance.AppSetting = new Class({
this.cancelActionNode = new Element("div", {
"styles": this.css.createCancelActionNode,
"text": "取消"
"text": lp.cancel
}).inject(this.createFormNode);
......@@ -244,7 +244,7 @@ MWF.xApplication.Attendance.AppSetting = new Class({
if( this.isNew || this.isEdited ){
this.createOkActionNode = new Element("div", {
"styles": this.css.createOkActionNode,
"text": "确定"
"text": lp.ok
}).inject(this.createFormNode);
this.createOkActionNode.addEvent("click", function(e){
......@@ -291,8 +291,8 @@ MWF.xApplication.Attendance.AppSetting = new Class({
okCreate: function(e){
var data = this.document.getResult(true,",",true,false,false);
if(data){
var APPEAL_AUDIFLOW_ID = data.APPEAL_AUDIFLOW_ID
if(!!APPEAL_AUDIFLOW_ID&&APPEAL_AUDIFLOW_ID!=""&&APPEAL_AUDIFLOW_ID!=""&&!!this.document.items.APPEAL_AUDIFLOW_ID.orgObject){
var APPEAL_AUDIFLOW_ID = data.APPEAL_AUDIFLOW_ID;
if(!!APPEAL_AUDIFLOW_ID &&APPEAL_AUDIFLOW_ID!=this.app.lp.none &&APPEAL_AUDIFLOW_ID!=""&&APPEAL_AUDIFLOW_ID!=""&&!!this.document.items.APPEAL_AUDIFLOW_ID.orgObject){
data.APPEAL_AUDIFLOW_ID = this.document.items.APPEAL_AUDIFLOW_ID.orgObject[0].data.id;
}
var arr = this.encodeData( this.data, data );
......@@ -312,7 +312,7 @@ MWF.xApplication.Attendance.AppSetting = new Class({
if( flag ){
this.createMarkNode.destroy();
this.createAreaNode.destroy();
this.app.notice( "保存成功" , "success");
this.app.notice( this.app.lp.saveSuccess , "success");
}
}
});
......@@ -107,31 +107,31 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
},
createStatusSelectTd : function( tr ){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "审批状态" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.auditStatus }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.status = new MDomItem( td, {
"name" : "status",
"type" : "select",
"value" : "0",
"selectText" :["所有状态","待处理","审批通过","审批未通过"],
"selectText" : this.app.lp.auditStatusSelectText,
"selectValue" :["999","0","1","-1"]
}, true, this.app );
this.status.load();
},
createAppealReasonTd : function( tr ){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "申诉原因" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.appealReason }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.appealReason = new MDomItem( td, {
"name" : "appealReason",
"type" : "select",
"selectText" :["","临时请假","出差","因公外出","其他"]
"selectText" : this.app.lp.appealReasonSelectText
}, true, this.app );
this.appealReason.load();
},
createUnitTd : function(tr){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "部门" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.department }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.unitName = new MDomItem( td, {
"name" : "unitName",
......@@ -145,7 +145,7 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
},
createPersonTd : function(tr){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "人员" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.person }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.empName = new MDomItem( td, {
"name" : "empName",
......@@ -158,7 +158,7 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
},
createYearSelectTd : function( tr ){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "年度" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.annuaal }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.yearString = new MDomItem( td, {
"name" : "yearString",
......@@ -176,7 +176,7 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
},
createMonthSelectTd : function( tr ){
var _self = this;
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "月份" }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : this.app.lp.months }).inject(tr);
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
this.monthString = new MDomItem( td, {
"name" : "monthString",
......@@ -188,7 +188,7 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
createActionTd : function( tr ){
var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
var input = new Element("button",{
"text" : "查询",
"text" : this.app.lp.search,
"styles" : this.css.filterButton
}).inject(td);
input.addEvent("click", function(){
......@@ -207,11 +207,11 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
}.bind(this))
},
selecePerson: function( el, type ){
var text = "选择人员"
var text = this.app.lp.selecePerson;
if( type=="topUnit") {
text = "选择公司"
text = this.app.lp.selectCompany;
}else if( type=="unit"){
text = "选择部门"
text = this.app.lp.selectDepartment;
}
var options = {
"type": type, //topUnit unit person,
......@@ -264,17 +264,17 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
if( it.checkboxElement && it.checkboxElement.get("checked" ) )count++;
}.bind(this))
if( count == 0 ){
this.app.notice("请先选择申诉","error");
this.app.notice(this.app.lp.selectAppealNotice,"error");
return;
}
this.app.confirm("warn", e, "同意申诉", "确定处理您选择的"+count+"份申诉?", 350, 120, function(){
this.app.confirm("warn", e, this.app.lp.agreeAppealConfirmTitle, this.app.lp.agreeAppealConfirmContent.replace("{count}", count), 350, 120, function(){
_self.batchAppeals = true;
_self.view.items.each( function( it ){
if( it.checkboxElement && it.checkboxElement.get("checked" ) )it.agree( true );
}.bind(this));
if(_self.view)_self.view.reload();
_self.batchAppeals = false;
_self.app.notice( "处理成功" , "success");
_self.app.notice( this.app.lp.actionSuccess, "success");
this.close();
}, function(){
this.close();
......@@ -287,17 +287,17 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
if( it.checkboxElement && it.checkboxElement.get("checked" ) )count++;
}.bind(this));
if( count == 0 ){
this.app.notice("请先选择申诉","error");
this.app.notice(this.app.lp.selectAppealNotice,"error");
return;
}
this.app.confirm("warn", e, "不同意申诉", "确定处理您选择的"+count+"份申诉?", 350, 120, function(){
this.app.confirm("warn", e, this.app.lp.disagreeAppealConfirmTitle, this.app.lp.disagreeAppealConfirmContent.replace("{count}", count), 350, 120, function(){
_self.batchAppeals = true;
_self.view.items.each( function( it ){
if( it.checkboxElement && it.checkboxElement.get("checked" ) )it.deny( true );
}.bind(this));
if(_self.view)_self.view.reload();
_self.batchAppeals = false;
_self.app.notice( "处理成功" , "success");
_self.app.notice( this.app.lp.actionSuccess , "success");
this.close();
}, function(){
this.close();
......@@ -381,7 +381,7 @@ MWF.xApplication.Attendance.AppealExplorer.Document = new Class({
}else{
if( !this.explorer.batchAppeals ){
if(this.explorer.view)this.explorer.view.reload();
this.app.notice( "处理成功" , "success");
this.app.notice( this.app.lp.actionSuccess.replace("{count}", count) , "success");
}
}
}.bind(this), null, false );
......@@ -485,18 +485,18 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
var d = this.data;
var appealStatus = "发起";
var appealStatus = this.app.lp.draft;
if (d.status == 0 ) {
appealStatus = "待处理"
appealStatus = this.app.lp.todo;
} else if (d.status == 1) {
appealStatus = "审批通过"
appealStatus = this.app.lp.approve;
} else if (d.status == -1) {
appealStatus = "审批不通过"
appealStatus = this.app.lp.deny;
}
this.data.appealStatusShow = appealStatus;
var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>"+
"<tr><td colspan='4' styles='formTableHead'>申诉处理单</td></tr>" +
"<tr><td colspan='4' styles='formTableHead'>"+this.app.lp.apealForm+"</td></tr>" +
"<tr><td styles='formTableTitle' lable='empNameShow'></td>"+
" <td styles='formTableValue' item='empNameShow'></td>" +
" <td styles='formTableTitle' lable='recordDateString'></td>"+
......@@ -524,28 +524,28 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
"</table>"
this.createTableArea.set("html",html);
var lp = this.app.lp;
this.document = new MForm( this.createTableArea, this.data, {
style : "popup",
isEdited : this.isEdited || this.isNew,
itemTemplate : {
empNameShow : { text:"员工姓名", type : "innertext", value : this.data.empName.split("@")[0] },
recordDateString : { text:"考勤日期", type : "innertext"},
onDutyTime : { text:"上班打卡时间", type : "innertext"},
offDutyTime : { text:"下班打卡时间", type : "innertext"},
statusShow : { text:"考勤状态", type : "innertext" },
appealStatusShow : { text:"审批状态",type : "innertext"},
empNameShow : { text: lp.employeeName, type : "innertext", value : this.data.empName.split("@")[0] },
recordDateString : { text:lp.recordDate, type : "innertext"},
onDutyTime : { text: lp.onDutyTime , type : "innertext"},
offDutyTime : { text: lp.offDutyTime, type : "innertext"},
statusShow : { text:lp.attendanceStatus , type : "innertext" },
appealStatusShow : { text:lp.appealStatus, type : "innertext"},
appealReason : {
text:"申述原因", type : "innertext"
text:lp.appealReason, type : "innertext"
},
address : { text:"地点", type : "innertext" },
address : { text: lp.address, type : "innertext" },
selfHolidayType : {
text:"请假类型",
text: lp.leaveType,
type : "innertext"
},
startTime : { text:"开始日期", type : "innertext" },
endTime : { text:"结束日期", type : "innertext" },
appealDescription : { text:"事由", type : "innertext" }
startTime : { text:lp.startTime, type : "innertext" },
endTime : { text:lp.endTime, type : "innertext" },
appealDescription : { text: lp.appealDescriptoin , type : "innertext" }
//opinion1 : { text :"审批意见",type : "textarea" }
}
}, this.app,this.css);
......@@ -560,7 +560,7 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
this.cancelActionNode = new Element("div", {
"styles": this.css.createCancelActionNode,
"text": "关闭"
"text": lp.close
}).inject(this.createFormNode);
......@@ -571,11 +571,11 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
if( this.isNew || this.isEdited ){
this.denyActionNode = new Element("div", {
"styles": this.css.createDenyActionNode,
"text": "不同意"
"text": lp.disagree
}).inject(this.createFormNode);
this.createOkActionNode = new Element("div", {
"styles": this.css.createOkActionNode,
"text": "同意"
"text": lp.agree
}).inject(this.createFormNode);
this.denyActionNode.addEvent("click", function(e){
......@@ -588,15 +588,16 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
},
switchFieldByAppealReason : function( ar ){
var lp = this.app.lp;
var tempField = ["selfHolidayType","startTime","endTime","address","appealDescription"];
var showField = [];
if( ar == "临时请假" ){
if( ar == lp.temporaryLeave ){
showField = ["selfHolidayType","startTime","endTime"];
}else if( ar == "出差" ){
}else if( ar == lp.out ){
showField = ["address","startTime","endTime"];
}else if( ar == "因公外出" ){
}else if( ar == lp.businessTrip ){
showField = ["address","startTime","endTime","appealDescription"];
}else if( ar == "其他" ){
}else if( ar == lp.other ){
showField = ["appealDescription"];
}
tempField.each( function( f ){
......@@ -659,7 +660,7 @@ MWF.xApplication.Attendance.AppealExplorer.Appeal = new Class({
this.createMarkNode.destroy();
this.createAreaNode.destroy();
if(this.explorer.view)this.explorer.view.reload();
this.app.notice( "处理成功" , "success");
this.app.notice( this.app.lp.actionSuccess, "success");
}
// this.app.processConfig();
}.bind(this));
......
......@@ -51,7 +51,7 @@ MWF.xApplication.Attendance.Calendar = new Class({
"../x_component_Attendance/$Common/fullcalendar/lib/jquery.js"
];
var fullcalendarUrl = "../x_component_Attendance/$Common/fullcalendar/fullcalendar.js";
var langUrl = "../x_component_Attendance/$Common/fullcalendar/lang/zh-cn.js";
var langUrl = "../x_component_Attendance/$Common/fullcalendar/lang/"+MWF.language+".js";
COMMON.AjaxModule.loadCss("../x_component_Attendance/$Common/fullcalendar/fullcalendar.css",function(){
COMMON.AjaxModule.load(baseUrls, function(){
jQuery.noConflict();
......@@ -78,10 +78,10 @@ MWF.xApplication.Attendance.Calendar = new Class({
eventTextColor : "#fff",
rendingNumberCellFun : function( date, formatedDate, dateStr ){
if( this.holiday && this.holiday.holidays && this.holiday.holidays.contains( formatedDate )){
return "<span style='float:right;padding-right:5px;color:red'></span>"
return "<span style='float:right;padding-right:5px;color:red'>"+this.app.lp.offDutyAbbrev+"</span>"
}
if( this.holiday && this.holiday.workdays && this.holiday.workdays.contains( formatedDate ) ){
return "<span style='float:right;padding-right:5px;'></span>"
return "<span style='float:right;padding-right:5px;'>"+this.app.lp.onDutyAbbrev+"</span>"
}
}.bind(this),
eventMouseover : function(event, jsEvent, view){
......@@ -137,7 +137,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
this.chart.setOption({
title: {
text: '考勤汇总'
text: this.lp.attendanceSummary
//subtext: '纯属虚构'
},
tooltip: {
......@@ -151,7 +151,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
//},
series: [
{
name:'考勤状态',
name: this.lp.attendanceStatus,
type:'pie',
radius: ['55%', '70%'],
avoidLabelOverlap: false,
......@@ -185,7 +185,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
var data = this.analyseLineData();
var option = {
title: {
text: '上下班走势图'
text: this.lp.attendanceTrendChart
},
grid : {
left : 50,
......@@ -227,7 +227,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
}
},
legend: {
data: ['上班时间', '下班时间']
data: this.lp.trendChartLegend
}
//toolbox: {
// show: true,
......@@ -269,14 +269,14 @@ MWF.xApplication.Attendance.Echarts = new Class({
];
option.series= [
{
name:'上班时间',
name: this.lp.trendChartLegend[0],
type:'line',
data : data.yOnTime.map(function (str) {
return (!str || isNaN(parseFloat(str.replace(':', '.')))) ? "-" : parseFloat(str.replace(':', '.'))
})
},
{
name:'下班时间',
name: this.lp.trendChartLegend[1],
type:'line',
data:data.yOffTime.map(function (str) {
return (!str || isNaN(parseFloat(str.replace(':', '.')))) ? "-" : parseFloat(str.replace(':', '.'))
......@@ -386,7 +386,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
this.chart = echarts.init(this.node, 'shine');
this.chart.setOption({
title: {
text: '考勤汇总'
text: this.lp.attendanceSummary
//subtext: '纯属虚构'
},
tooltip: {
......@@ -400,7 +400,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
//},
series: [
{
name:'考勤状态',
name: this.lp.attendanceStatus,
type:'pie',
radius: ['55%', '70%'],
avoidLabelOverlap: false,
......@@ -463,7 +463,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
var data = this.getUnitBarData();
var option = {
title: {
text: '考勤趋势'
text: this.lp.attendanceTrend
//subtext: '纯属虚构'
},
tooltip : {
......@@ -512,7 +512,7 @@ MWF.xApplication.Attendance.Echarts = new Class({
}
}
obj[n].data.push( d.data[n] );
obj[n].month.push( d.year+""+ d.month+"" );
obj[n].month.push( d.year + this.lp.year + d.month + this.lp.month );
}
}.bind(this));
......
......@@ -178,7 +178,7 @@ MWF.xApplication.Attendance.HolidayExplorer.Holiday = new Class({
makeupClassArea += "<input type='text' class='makeUpClassDay' " +
"style='" + inputTimeStyle +"'" +
" value='" + ( d || "" ) + "'/>";
if( idx > 0 )makeupClassArea += "<div class='removeMakeUpClassDay' style='color: #354f67;padding-bottom: 5px;cursor: pointer;'>删除</div>";
if( idx > 0 )makeupClassArea += "<div class='removeMakeUpClassDay' style='color: #354f67;padding-bottom: 5px;cursor: pointer;'>"+this.app.lp.delete+"</div>";
}.bind(this))
}else{
makeupClassArea += "<input type='text' class='makeUpClassDay' " +
......@@ -222,7 +222,7 @@ MWF.xApplication.Attendance.HolidayExplorer.Holiday = new Class({
"<td valign='top' style='height: 30px; line-height: 30px; text-align: left'>"+lp.makeUpClassDay+":</td>" +
"<td style='; text-align: right;' id='makeUpClassDayTd'>" +
(!this.isNew && !this.isEdited ? "" :makeupClassArea )+
(!this.isNew && !this.isEdited ? "" : "<div id='addMakeupClass' style='color: #354f67;cursor: pointer;'>增加补班日期</div>" )+
(!this.isNew && !this.isEdited ? "" : "<div id='addMakeupClass' style='color: #354f67;cursor: pointer;'>"+lp.addMakeUpClassDay+"</div>" )+
"</td>" +
"</tr>" +
"</table>";
......@@ -283,7 +283,7 @@ MWF.xApplication.Attendance.HolidayExplorer.Holiday = new Class({
var div = new Element("div",{
"class" : "removeMakeUpClassDay",
style : "color: #354f67;padding-bottom: 5px;cursor: pointer;",
text : "删除",
text : this.app.lp.delete,
events : {
click : function () {
var input = this.getPrevious();
......@@ -407,7 +407,7 @@ MWF.xApplication.Attendance.HolidayExplorer.Holiday = new Class({
var endDate = new Date( data.endDate );
var startDate = new Date( data.startDate );
if( startDate > endDate ){
this.app.notice("开始日期不能大于结束日期","error");
this.app.notice( this.app.lp.holiday.beginGreateThanEndNotice ,"error");
return;
}
......
......@@ -48,7 +48,7 @@ MWF.xApplication.Attendance.ImportExplorer = new Class({
var tmp = file.name.split(".");
this.uploadFileName = file.name;
if( tmp[tmp.length-1].toLowerCase() != "xls" && tmp[tmp.length-1].toLowerCase() != "xlsx" ){
this.app.notice("请导入excel文件!","error");
this.app.notice( this.app.lp.importExcelNotice ,"error");
return;
}
var formData = new FormData();
......@@ -81,12 +81,12 @@ MWF.xApplication.Attendance.ImportExplorer = new Class({
},
analyseData : function(){
this.actions.analyseDetail("0","0",function(){
this.app.notice("分析考勤数据成功","success")
this.app.notice( this.app.lp.analyseDataSuccess,"success")
}.bind(this))
},
staticData : function(){
this.actions.staticAllDetail(function(){
this.app.notice("统计考勤数据成功","success")
this.app.notice( this.app.lp.statDataSuccess,"success")
}.bind(this))
},
downloadTemplate : function(){
......@@ -120,18 +120,25 @@ MWF.xApplication.Attendance.ImportExplorer = new Class({
var table = new Element("table", {
"width" : "100%", "border" : "0", "cellpadding" : "5", "cellspacing" : "0", "styles" : this.css.filterTable, "class" : "filterTable"
}).inject( this.descriptionNode );
var tr = new Element("tr").inject(table);
new Element("td",{ "text" : "数据导入步骤" , "styles" : this.css.descriptionTdHead }).inject(tr);
var tr = new Element("tr").inject(table);
new Element("td",{ "text" :"1、下载Excel模板,根据模板格式填写考勤数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
var tr = new Element("tr").inject(table);
new Element("td",{ "text" : "2、点击导入考勤数据按钮,选择考勤数据并确定,系统将校验考勤数据是否正确并导入数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
var tr = new Element("tr").inject(table);
new Element("td",{ "text" : "3、点击核对考勤数据按钮,选择需要核对的年度和月份,系统将核对需要考勤的人员的数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
var tr = new Element("tr").inject(table);
new Element("td",{ "text" : "4、点击分析考勤数据按钮,系统将生成出勤明细数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
var tr = new Element("tr").inject(table);
new Element("td",{ "text" : "5、点击统计考勤数据按钮,系统将生成个人、部门、公司的出勤率统计。" , "styles" : this.css.descriptionTdValue }).inject(tr);
new Element("td",{ "text" : this.app.lp.importDataStep , "styles" : this.css.descriptionTdHead }).inject(tr);
Array.each( this.app.lp.importStepDescription, function( description ) {
var tr = new Element("tr").inject(table);
new Element("td",{ "text" :description , "styles" : this.css.descriptionTdValue }).inject(tr);
}.bind(this));
// var tr = new Element("tr").inject(table);
// new Element("td",{ "text" :"1、下载Excel模板,根据模板格式填写考勤数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
// var tr = new Element("tr").inject(table);
// new Element("td",{ "text" : "2、点击导入考勤数据按钮,选择考勤数据并确定,系统将校验考勤数据是否正确并导入数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
// var tr = new Element("tr").inject(table);
// new Element("td",{ "text" : "3、点击核对考勤数据按钮,选择需要核对的年度和月份,系统将核对需要考勤的人员的数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
// var tr = new Element("tr").inject(table);
// new Element("td",{ "text" : "4、点击分析考勤数据按钮,系统将生成出勤明细数据;" , "styles" : this.css.descriptionTdValue }).inject(tr);
// var tr = new Element("tr").inject(table);
// new Element("td",{ "text" : "5、点击统计考勤数据按钮,系统将生成个人、部门、公司的出勤率统计。" , "styles" : this.css.descriptionTdValue }).inject(tr);
}
}
});
......@@ -182,7 +189,7 @@ MWF.xApplication.Attendance.ImportExplorer.YearMonthSelctor = new Class({
"height": 300,
"hasTop" : true,
"hasBottom" : true,
"title" : "选择核对月份",
"title" : MWF.xApplication.Attendance.LP.selectCheckMonth,
"draggable" : true,
"closeAction" : true,
"false" : true
......@@ -205,7 +212,7 @@ MWF.xApplication.Attendance.ImportExplorer.YearMonthSelctor = new Class({
isEdited : this.isEdited || this.isNew,
itemTemplate : {
cycleYear : {
text:"年度",
text: MWF.xApplication.Attendance.LP.annuaal,
type : "select",
selectValue : function(){
var years = []; d = new Date();
......@@ -217,7 +224,7 @@ MWF.xApplication.Attendance.ImportExplorer.YearMonthSelctor = new Class({
}
},
cycleMonth : {
text:"月份",
text: MWF.xApplication.Attendance.LP.months,
type : "select",
defaultValue : function(){ return new Date().getMonth(); },
selectValue : ["1","2","3","4","5","6","7","8","9","10","11","12"]
......@@ -229,7 +236,7 @@ MWF.xApplication.Attendance.ImportExplorer.YearMonthSelctor = new Class({
},
_ok: function( data, callback ){
this.app.restActions.checkDetail( data.cycleYear, data.cycleMonth, function(json){
this.app.notice("考勤数据核对成功");
this.app.notice( MWF.xApplication.Attendance.LP.checkDetailSuccess );
this.close();
}.bind(this));
}
......@@ -243,7 +250,7 @@ MWF.xApplication.Attendance.ImportExplorer.Result = new Class({
"height": 600,
"hasTop" : true,
"hasBottom" : false,
"title" : "考勤数据导入结果",
"title" : MWF.xApplication.Attendance.LP.importDataResult,
"draggable" : true,
"closeAction" : true,
"hasScroll" : true,
......@@ -258,10 +265,15 @@ MWF.xApplication.Attendance.ImportExplorer.Result = new Class({
}.bind(this));
},
createImportContent : function(){
var lp = MWF.xApplication.Attendance.LP;
if( this.checkData.errorCount == 0 ){
var text ="您上传的文件:“" + this.data.fileName + "”已经成功导入。下面显示其中的"+this.checkData.detailList.length+"条:" ;
var text = lp.importDataResultSuccess.replace("{fileName}", this.data.fileName ).
replace("{count}", this.checkData.detailList.length);
} else{
var text ="您上传的文件:“" + this.data.fileName + "”未通过校验,有"+ this.checkData.errorCount +"条错误数据。请修改后重新导入。下面显示其中的"+this.checkData.detailList.length+"条:" ;
var text = lp.importDataResultFail.replace("{fileName}",this.data.fileName ).
replace("{errorCount}", this.checkData.errorCount).
replace("{count}", this.checkData.detailList.length);
// var text ="您上传的文件:“" + this.data.fileName + "”未通过校验,有"+ this.checkData.errorCount +"条错误数据。请修改后重新导入。下面显示其中的"+this.checkData.detailList.length+"条:" ;
}
this.formDescriptionNode = new Element("div", {
"styles": this.css.formDescriptionNode,
......@@ -273,16 +285,20 @@ MWF.xApplication.Attendance.ImportExplorer.Result = new Class({
}).inject( this.formTableArea );
var tr = new Element("tr").inject(table);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "行号" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "员工号" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "员工名字" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "日期" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "上午上班打卡时间" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "上午下班打卡时间" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "下午上班打卡时间" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "下午下班打卡时间" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "检查结果" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "描述" }).inject(tr);
var td;
Array.each( lp.importDataResultThList, function(text){
td = new Element("td", { "styles" : this.css.editTableTitle, "text" : text }).inject(tr);
}.bind(this));
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "行号" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "员工号" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "员工名字" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "日期" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "上午上班打卡时间" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "上午下班打卡时间" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "下午上班打卡时间" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "下午下班打卡时间" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "检查结果" }).inject(tr);
// var td = new Element("td", { "styles" : this.css.editTableTitle, "text" : "描述" }).inject(tr);
td.setStyle( "width" , "300px" );
this.checkData.detailList.each(function( d ){
......@@ -295,7 +311,7 @@ MWF.xApplication.Attendance.ImportExplorer.Result = new Class({
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.morningOffDutyTime }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.afternoonOnDutyTime }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.offDutyTime }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.checkStatus == "error" ? "错误" : "正确" }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.checkStatus == "error" ? lp.false : lp.true }).inject(tr);
var td = new Element("td", { "styles" : this.css.editTableValue , "text": d.description }).inject(tr);
}.bind(this))
}
......@@ -308,6 +324,7 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
this.actions = actions;
},
load : function( callback ){
var lp = MWF.xApplication.Attendance.LP;
this.currentDate = new Date();
this.addFormDataMessage();
this.status = "ready";
......@@ -317,15 +334,15 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
if( data.processing && data.currentProcessName != "COMPLETE"){
if( data.currentProcessName == "VALIDATE" ){
if( this.status != data.currentProcessName ){
this.setMessageTitle( "正在检查数据" );
this.setMessageText( "开始检查数据,共"+data.process_validate_total+"" );
this.setMessageTitle( lp.checkDataTitle );
this.setMessageText( lp.checkDataContent.replace( "{count}", data.process_validate_total));
this.status = data.currentProcessName;
}
this.updateProgress( data.currentProcessName, data.process_validate_count, data.process_validate_total, data.errorCount );
}else if( data.currentProcessName == "SAVEDATA" ){
if( this.status != data.currentProcessName ){
this.setMessageTitle( "正在导入数据" );
this.setMessageText( "开始导入数据,共"+data.process_save_total+"" );
this.setMessageTitle( lp.importDataTitle );
this.setMessageText( lp.importDataContent.replace( "{count}", data.process_save_total));
this.status = data.currentProcessName;
}
this.updateProgress( data.currentProcessName, data.process_save_count, data.process_save_total, data.errorCount );
......@@ -340,16 +357,17 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
}.bind(this), 500 );
},
addFormDataMessage: function( noProgress ){
var lp = MWF.xApplication.Attendance.LP;
var contentHTML = "";
if (noProgress){
contentHTML = "<div style=\"height: 20px; line-height: 20px\">"+"正在准备导入数据..."+"</div></div>" ;
contentHTML = "<div style=\"height: 20px; line-height: 20px\">"+lp.readyToImportData1+"</div></div>" ;
}else{
contentHTML = "<div style=\"overflow: hidden\"><div style=\"height: 3px; border:1px solid #999; margin: 3px 0px\">" +
"<div style=\"height: 3px; background-color: #acdab9; width: 0px;\"></div></div>" +
"<div style=\"height: 20px; line-height: 20px\">"+"正在准备导入数据..."+"</div></div>" ;
"<div style=\"height: 20px; line-height: 20px\">"+lp.readyToImportData1+"</div></div>" ;
}
var msg = {
"subject": "准备导入数据",
"subject": lp.readyToImportData,
"content": contentHTML
};
this.messageItem = layout.desktop.message.addMessage(msg);
......@@ -360,6 +378,7 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
}.bind(this), 100);
},
updateProgress: function(type, loaded, total, errorCount){
var lp = MWF.xApplication.Attendance.LP;
var messageItem = this.messageItem;
var processed = errorCount ? ( loaded + errorCount ) : loaded;
var percent = 100*(processed/total);
......@@ -368,7 +387,7 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
var lastDate = this.lastTime || this.currentDate;
var ms = sendDate.getTime() - lastDate.getTime();
var speed = ( (processed - ( this.lastProcessed || 0 )) * 1000)/ms ;
var u = "条/秒";
var u = lp.importSpeed;
speed = speed.round(2);
if (messageItem.contentNode){
......@@ -377,11 +396,15 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
var progressInforNode = messageItem.contentNode.getFirst("div").getLast("div");
progressPercentNode.setStyle("width", ""+percent+"%");
if( type == "VALIDATE" ){
var text = "正检查数据"+": "+speed+u + ",共"+total+"条,剩余"+( total - loaded )+"";
text += errorCount ? ",出错"+errorCount+"" : ""
var text = lp.checkingDataContent.replace("{speed}",speed).replace("{total}",total).replace("{remaining}",( total - loaded ));
text += errorCount ? lp.checkingDataErrorContent.replace("{errorCount}",errorCount) : "";
// var text = "正检查数据"+": "+speed+u + ",共"+total+"条,剩余"+( total - loaded )+"条";
// text += errorCount ? ",出错"+errorCount+"条" : ""
}else{
var text = "正导入数据"+": "+speed+u + ",共"+total+"条,剩余"+( total - loaded )+"";
text += errorCount ? ",出错"+errorCount+"" : ""
var text = lp.importingDataContent.replace("{speed}",speed).replace("{total}",total).replace("{remaining}",( total - loaded ));
text += errorCount ? lp.importingDataErrorContent.replace("{errorCount}",errorCount) : "";
// var text = "正导入数据"+": "+speed+u + ",共"+total+"条,剩余"+( total - loaded )+"条";
// text += errorCount ? ",出错"+errorCount+"条" : ""
}
progressInforNode.set("text", text);
}
......@@ -389,6 +412,7 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
this.lastTime = new Date();
},
transferComplete: function( data ){
var lp = MWF.xApplication.Attendance.LP;
var errorCount = data.errorCount;
var messageItem = this.messageItem;
......@@ -402,29 +426,34 @@ MWF.xApplication.Attendance.ImportExplorer.Progress = new Class({
var m = m_s / 60000;
var s_s = m_s % 60000;
var s = s_s/1000;
timeStr = ""+h.toInt()+"小时"+m.toInt()+""+s.toInt()+"";
timeStr = ""+h.toInt()+lp.hour+m.toInt()+lp.mintue+s.toInt()+lp.second;
}else if (ms>60000){
var m = ms / 60000;
var s_s = ms % 60000;
var s = s_s/1000;
timeStr = ""+m.toInt()+""+s.toInt()+"";
timeStr = ""+m.toInt()+lp.mintue+s.toInt()+lp.second;
}else{
var s = ms/1000;
timeStr = ""+s.toInt()+"";
timeStr = ""+s.toInt()+lp.second;
}
if( errorCount == 0 ){
var size = data.process_save_total;
var speed = (size * 1000)/ms ;
var u = "条/秒";
var u = lp.importSpeed;
speed = speed.round(2);
this.setMessageTitle( "导入成功");
this.setMessageText( "共导入数据"+size+"条 速度"+": "+speed+u+" "+"耗时"+": "+timeStr);
this.setMessageTitle( lp.importSuccessTitle );
var text = lp.importSuccessContent.replace("{total}",size).replace("{speed}",speed).replace("{timeStr}",timeStr);
this.setMessageText( text );
// this.setMessageText( "共导入数据"+size+"条 速度"+": "+speed+u+" "+"耗时"+": "+timeStr);
}else{
var size = data.process_validate_total;
this.setMessageTitle( "导入失败");
this.setMessageText( "共有数据"+size+"条 出错"+ errorCount +"条 耗时"+": "+timeStr +" 请修改后重新导入");
this.setMessageTitle( lp.importFailTitle );
var text = lp.importFailContent.replace("{total}",size).replace("{errorCount}",errorCount).replace("{timeStr}",timeStr);
this.setMessageText( text );
// this.setMessageText( "共有数据"+size+"条 出错"+ errorCount +"条 耗时"+": "+timeStr +" 请修改后重新导入");
}
this.clearMessageProgress();
},
......
......@@ -35,6 +35,7 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
},
loadFilter: function(){
var lp = MWF.xApplication.Attendance.LP;
this.fileterNode = new Element("div.fileterNode", {
"styles" : this.css.fileterNode
}).inject(this.node);
......@@ -59,7 +60,7 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
isEdited : true,
itemTemplate : {
yearString : {
text : "年度",
text : lp.annuaal,
"type" : "select",
"selectValue" : function(){
var years = [];
......@@ -77,7 +78,7 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
}
},
monthString : {
text : "月份",
text : lp.months,
"type" : "select",
"defaultValue" : function(){
var month = (new Date().getMonth() + 1 ).toString();
......@@ -92,18 +93,18 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
}
},
status : {
"text" : "申述状态",
"text" : lp.auditStatus,
"type" : "select",
"value" : "999",
"selectText" :["所有状态","待处理","审批通过","审批未通过"],
"selectText" : lp.auditStatusSelectText,
"selectValue" :["999","0","1","-1"]
},
appealReason : {
"text" : "申述原因",
"text" : lp.appealReason,
"type" : "select",
"selectText" :["","临时请假","出差","因公外出","其他"]
"selectText" : lp.appealReasonSelectText
},
action : { "value" : "查询", type : "button", className : "filterButton", event : {
action : { "value" : lp.search, type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
......@@ -406,6 +407,7 @@ MWF.xApplication.Attendance.MyAppeal.Appeal = new Class({
},
createNode: function(){
var _self = this;
var lp = MWF.xApplication.Attendance.LP;
this.createNode = new Element("div", {
"styles": this.css.createNode
......@@ -438,19 +440,19 @@ MWF.xApplication.Attendance.MyAppeal.Appeal = new Class({
var d = this.data;
var appealStatus = "发起";
var appealStatus = lp.draft;
if (d.status == 0 ) {
appealStatus = "待处理"
appealStatus = lp.todo;
} else if (d.status == 1) {
appealStatus = "审批通过"
appealStatus = lp.approve
} else if (d.status == -1) {
appealStatus = "申诉不通过"
appealStatus = lp.deny
}
this.data.appealStatusShow = appealStatus;
debugger
var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>"+
"<tr><td colspan='4' styles='formTableHead'>申诉申请单</td></tr>" +
"<tr><td styles='formTableTitle'>员工姓名</td>"+
"<tr><td colspan='4' styles='formTableHead'>"+lp.apealApplyForm+"</td></tr>" +
"<tr><td styles='formTableTitle'>"+lp.employeeName+"</td>"+
" <td styles='formTableValue'>"+this.data.empName.split("@")[0]+"</td>" +
" <td styles='formTableTitle' lable='recordDateString'></td>"+
" <td styles='formTableValue' item='recordDateString'></td></tr>" +
......@@ -483,30 +485,30 @@ debugger
style : "popup",
isEdited : this.isEdited || this.isNew,
itemTemplate : {
recordDateString : { text:"考勤日期", type : "innertext"},
onDutyTime : { text:"上班打卡时间", type : "innertext"},
offDutyTime : { text:"下班打卡时间", type : "innertext"},
statusShow : { text:"考勤状态", type : "innertext" },
appealStatusShow : { text:"审批状态",type : "innertext"},
processPerson1Show : {text:"审核人",type:"innertext", value : this.data.appealAuditInfo?this.data.appealAuditInfo.currentProcessor.split("@")[0] :""},
recordDateString : { text:lp.recordDate, type : "innertext"},
onDutyTime : { text:lp.onDutyTime, type : "innertext"},
offDutyTime : { text:lp.offDutyTime, type : "innertext"},
statusShow : { text:lp.attendanceStatus, type : "innertext" },
appealStatusShow : { text:lp.appealStatus, type : "innertext"},
processPerson1Show : {text:lp.auditor, type:"innertext", value : this.data.appealAuditInfo?this.data.appealAuditInfo.currentProcessor.split("@")[0] :""},
appealReason : {
notEmpty : true,
text:"申述原因",
text: lp.appealReason,
type : "select",
selectValue : ["","临时请假","出差","因公外出","其他"],
selectValue : lp.appealReasonSelectText,
event : { change : function(mdi){
_self.switchFieldByAppealReason(mdi.getValue());
}}
},
address : { text:"地点" },
address : { text: lp.address },
selfHolidayType : {
text:"请假类型",
text: lp.leaveType,
type : "select",
selectValue : ["","带薪年休假","带薪病假","带薪福利假","扣薪事假","其他"]
selectValue : lp.leaveTypeSelectText
},
startTime : { text:"开始日期", tType : "datetime" },
endTime : { text:"结束日期", tType : "datetime" },
appealDescription : { text:"事由" }
startTime : { text: lp.startTime, tType : "datetime" },
endTime : { text:lp.endTime, tType : "datetime" },
appealDescription : { text: lp.appealDescriptoin }
//opinion1 : { text :"审批意见" }
}
}, this.app,this.css);
......@@ -521,7 +523,7 @@ debugger
this.cancelActionNode = new Element("div", {
"styles": this.css.createCancelActionNode,
"text": "关闭"
"text": lp.close
}).inject(this.createFormNode);
......@@ -532,11 +534,11 @@ debugger
if( this.isNew || this.isEdited){
this.denyActionNode = new Element("div", {
"styles": this.css.createDenyActionNode,
"text": "不同意"
"text": lp.disagree
}).inject(this.createFormNode);
this.createOkActionNode = new Element("div", {
"styles": this.css.createOkActionNode,
"text": "同意"
"text": lp.agree
}).inject(this.createFormNode);
this.denyActionNode.addEvent("click", function(e){
......@@ -549,15 +551,16 @@ debugger
},
switchFieldByAppealReason : function( ar ){
var lp = MWF.xApplication.Attendance.LP;
var tempField = ["selfHolidayType","startTime","endTime","address","appealDescription"];
var showField = [];
if( ar == "临时请假" ){
if( ar == lp.temporaryLeave ){
showField = ["selfHolidayType","startTime","endTime"];
}else if( ar == "出差" ){
}else if( ar == lp.out ){
showField = ["address","startTime","endTime"];
}else if( ar == "因公外出" ){
}else if( ar == lp.businessTrip ){
showField = ["address","startTime","endTime","appealDescription"];
}else if( ar == "其他" ){
}else if( ar == lp.other ){
showField = ["appealDescription"];
}
tempField.each( function( f ){
......@@ -605,7 +608,7 @@ debugger
if (data.opinion1 ){
this.process( data );
}else{
this.app.notice( "请填写意见", "error");
this.app.notice( MWF.xApplication.Attendance.LP.inputIdeaNotice, "error");
}
},
okCreate: function(e){
......@@ -620,7 +623,7 @@ debugger
this.createMarkNode.destroy();
this.createAreaNode.destroy();
if(this.explorer.view)this.explorer.view.reload();
this.app.notice( "处理成功" , "success");
this.app.notice( MWF.xApplication.Attendance.LP.processSuccess, "success");
}
// this.app.processConfig();
}.bind(this));
......
......@@ -27,14 +27,21 @@ MWF.xApplication.Attendance.LP = {
"normal" : "出勤", //绿色,正常
"levelAsked":"请假或外出报备", //蓝色,请假
"late":"迟到", //橙色,迟到
"lateSelectText": ["","迟到","未迟到"],
"leaveEarly":"早退", //橙色,早退
"noSign":"缺勤", //粉红色,未签到
"appealSuccess" : "申诉通过",
"lackOfTime" : "工时不足",
"abNormalDuty" : "异常打卡",
"truefalseSelectText": ["","",""],
"query": "查询",
"wholeDay": "全天",
"am": "上午",
"pm": "下午",
"absent" : "缺勤",
"notAbsent" : "未缺勤",
"absendSelectText": ["","缺勤","未缺勤"],
"attendanceStatisic" : "考勤统计",
"name" : "姓名",
......@@ -141,7 +148,9 @@ MWF.xApplication.Attendance.LP = {
"startDate" : "开始日期",
"endDate" : "结束日期",
"makeUpClassDay" : "补班日期",
"holidaySchedule" : "假期安排"
"holidaySchedule" : "假期安排",
"addMakeUpClassDay": "增加补班日期",
"beginGreateThanEndNotice": "开始日期不能大于结束日期"
},
"permission" : {
"setAttendancer" : "考勤员设置",
......@@ -157,7 +166,125 @@ MWF.xApplication.Attendance.LP = {
"deal": "处理",
"processStarted": "文件已启动",
"processStartedMessage": "您启动了一个新的工作:",
"AppealExplore" : {
"auditStatus" : "审批状态"
}
"auditStatus" : "审批状态",
"auditStatusSelectText" : ["所有状态","待处理","审批通过","审批未通过"],
"appealReason": "申诉原因",
"appealReasonSelectText" : ["","临时请假","出差","因公外出","其他"],
"department": "部门",
"person" : "人员",
"auditor": "审核人",
"search": "搜索",
"selectPerson": "选择人员",
"selectCompany": "选择公司",
"selectDepartment": "选择部门",
"selectAppealNotice": "请先选择申诉",
"agreeAppealConfirmTitle": "同意申诉",
"agreeAppealConfirmContent": "确定处理您选择的{count}份申诉?",
"actionSuccess": "处理成功",
"disagreeAppealConfirmTitle": "不同意申诉",
"disagreeAppealConfirmContent": "确定处理您选择的{count}份申诉?",
"draft": "发起",
"todo": "待处理",
"approve": "审批通过",
"deny": "审批不通过",
"apealApplyForm": "申诉申请单",
"apealForm": "申诉处理单",
"employeeName": "员工姓名",
"recordDate": "考勤日期",
"onDutyTime": "上班打卡时间",
"offDutyTime": "下班打卡时间",
"attendanceStatus": "考勤状态",
"appealStatus": "审批状态",
"address": "地点",
"leaveType": "请假类型",
"leaveTypeSelectText": ["","带薪年休假","带薪病假","带薪福利假","扣薪事假","其他"],
"startTime": "开始日期",
"endTime": "结束日期",
"appealDescriptoin": "事由",
"close": "关闭",
"disagree": "不同意",
"agree": "同意",
"temporaryLeave": "临时请假",
"out": "出差",
"businessTrip": "因公外出",
"other": "其他",
"inputIdeaNotice": "请填写意见",
"processSuccess": "处理成功",
"noDepartment": "未找到您所在的部门,请联系管理员!",
"systemSetting" : "系统设置",
"reportTo": "汇报对象",
"appealEnable": "申诉及审批功能启用状态",
"appealSelectText": ["开启","关闭"],
"appealAuditFlowType": "考勤结果申诉流程类型",
"appealAuditFlowTypeSelectText": ["自定义流程","内置流程"],
"appealAuditorType": "申诉审核人确定方式",
"appealAuditorValue": "申诉审核人确定内容",
"directSupervisor": "直属领导",
"appealAuditFlow" : "自定义申请流程",
"none": "",
"saveSuccess": "保存成功",
"noReportToNotice": "组织管理中没有配置您的汇报对象,请联系管理员",
"unitDuty": "所属部门职位",
"noUnitDutyNotice": "系统中没有配置{unit}的{duty}职位,请联系管理员",
"personAttribute": "人员属性",
"noPersonAttribute": "系统中没有配置您的人员属性“{att}”,请联系管理员",
"assignedPerson": "指定人",
"directLeader": "直接主管",
"noDirectLeader": "系统中没有配置您的人员属性“直接主管”,请联系管理员",
"createAppealNotice": "申诉已提交",
"offDutyAbbrev": "",
"onDutyAbbrev": "",
"attendanceSummary": "考勤汇总",
"attendanceTrendChart": "上下班走势图",
"trendChartLegend" : ['上班时间', '下班时间'],
"attendanceTrend": "考勤趋势",
"year": "",
"importExcelNotice": "请导入excel文件!",
"analyseDataSuccess": "分析考勤数据成功",
"statDataSuccess": "统计考勤数据成功",
"importDataStep": "数据导入步骤",
"importStepDescription": [
"1、下载Excel模板,根据模板格式填写考勤数据;",
"2、点击导入考勤数据按钮,选择考勤数据并确定,系统将校验考勤数据是否正确并导入数据;",
"3、点击核对考勤数据按钮,选择需要核对的年度和月份,系统将核对需要考勤的人员的数据;" ,
"4、点击分析考勤数据按钮,系统将生成出勤明细数据;" ,
"5、点击统计考勤数据按钮,系统将生成个人、部门、公司的出勤率统计。"
],
"selectCheckMonth":"选择核对月份",
"checkDetailSuccess": "考勤数据核对成功",
"importDataResult":"考勤数据导入结果",
"importDataResultSuccess": "您上传的文件:“{fileName}”已经成功导入。下面显示其中的{count}条:",
"importDataResultFail": "您上传的文件:“{fileName}”未通过校验,有{errorCount}条错误数据。请修改后重新导入。下面显示其中的{count}条:",
"importDataResultThList" : [
"行号", "员工号", "员工名字", "日期","上午上班打卡时间","上午下班打卡时间","下午上班打卡时间","下午下班打卡时间","检查结果","描述"
],
"true": "正确",
"false": "错误",
"checkDataTitle": "正在检查数据",
"checkDataContent": "开始检查数据,共{count}条",
"importDataTitle": "正在导入数据",
"importDataContent": "开始导入数据,共{count}条",
"readyToImportData": "正在准备导入数据",
"readyToImportData1": "正在准备导入数据...",
"importSpeed": "条/秒",
"checkingDataContent": "正检查数据: {speed}条/秒,共{total}条,剩余{remaining}条",
"checkingDataErrorContent": ",出错{errorCount}条",
"importingDataContent": "正导入数据: {speed}条/秒,共{total}条,剩余{remaining}条",
"importingDataErrorContent": ",出错{errorCount}条",
"hour":"小时",
"mintue": "",
"second": "",
"importSuccessTitle": "导入成功",
"importSuccessContent": "共导入数据{total}条 速度: {speed}条/秒 耗时: {timeStr}",
"importFailTitle": "导入失败",
"importFailContent": "共有数据{total}条 出错: {errorCount}条 耗时: {timeStr} 请修改后重新导入",
"myDetail": "我的出勤明细",
"myDetailStatic": "我的出勤率统计"
};
\ No newline at end of file
......@@ -4,6 +4,22 @@
"type": "Attachment",
"description": "",
"events": {
"queryLoad" : {
"code": "",
"html": ""
},
"queryLoadController" : {
"code": "",
"html": ""
},
"loadController" : {
"code": "",
"html": ""
},
"postLoadController" : {
"code": "",
"html": ""
},
"load" : {
"code": "",
"html": ""
......
......@@ -1055,12 +1055,29 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
Extends: MWF.APP$Module,
options: {
/**
* @event MWF.xApplication.process.Xform.Attachment#queryLoad
* @event MWF.xApplication.process.Xform.Attachment#postLoad
* @ignore
*/
/**附件组件(this.target)加载前触发。
* @event MWF.xApplication.process.Xform.Attachment#queryLoad
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**附件容器(this.target.attachmentController)初始化之前触发,可以通过this.event获取附件容器的选项。
* @event MWF.xApplication.process.Xform.Attachment#queryLoadController
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**附件容器(this.target.attachmentController)初始化之后,加载之前触发。
* @event MWF.xApplication.process.Xform.Attachment#loadController
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**附件容器(this.target.attachmentController)加载之后触发,但这时还未加载具体的附件。
* @event MWF.xApplication.process.Xform.Attachment#postLoadController
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* @event MWF.xApplication.process.Xform.Attachment#postLoad
* @ignore
* 附件组件(this.target)加载完成后触发。这时候附件容器和每个附件都已加载完成。
* @event MWF.xApplication.process.Xform.Attachment#load
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 附件上传后触发。本事件中可以通过this.event获取上传附件的数据
......@@ -1077,11 +1094,6 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
* @event MWF.xApplication.process.Xform.Attachment#afterDelete
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 附件容器加载时触发。
* @event MWF.xApplication.process.Xform.Attachment#load
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 附件有变化的时候会被触发,包括上传、删除、排序
* @event MWF.xApplication.process.Xform.Attachment#change
......@@ -1097,7 +1109,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
* @event MWF.xApplication.process.Xform.Attachment#open
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"moduleEvents": ["upload", "delete", "afterDelete", "load", "change","download","open", "queryLoad "]
"moduleEvents": ["upload", "delete", "afterDelete", "load", "change","download","open", "queryLoad", "queryLoadController", "loadController", "postLoadController"]
},
initialize: function (node, json, form, options) {
......@@ -1111,6 +1123,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
_loadUserInterface: function () {
this.node.empty();
if (this.form.businessData.work.startTime){
this.fireEvent("queryLoad");
this.loadAttachmentController();
this.fireEvent("load");
}
......@@ -1150,17 +1163,25 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
}
//this.attachmentController = new MWF.widget.ATTER(this.node, this, options);
this.fireEvent("queryLoadController", [options]);
/**
* @summary 附件容器.
* @member {MWF.xApplication.process.Xform.AttachmentController}
* @example
* var attachmentController = this.form.get("fieldId").AttachmentController; //获取附件容器
* var attachmentController = this.form.get("fieldId").attachmentController; //获取附件容器
* var attachmentList = attachmentController.attachments; //获取所有的附件
* var attachmentData = attachmentList[0].data; //获取第一个附件的数据
*/
this.attachmentController = new MWF.xApplication.process.Xform.AttachmentController(this.node, this, options);
this.fireEvent("loadController");
this.attachmentController.load();
this.fireEvent("postLoadController");
this.form.businessData.attachmentList.each(function (att) {
//if (att.site===this.json.id || (this.json.isOpenInOffice && this.json.officeControlName===att.site)) this.attachmentController.addAttachment(att);
if (att.site === (this.json.site || this.json.id)) this.attachmentController.addAttachment(att);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册