function quanyueUserGridClick(e) {
$.post("Ajax.ashx?method=GetStaffCurMonthMachineRecord",{
Pl_StaffId: e.record.Pl_StaffId, Pl_OrganizationId:e.record.Pl_OrganizationId,
StartDay: mini.formatDate(e.record.StartDay, 'yyyy-MM-dd'),EndDay: mini.formatDate(e.record.EndDay, 'yyyy-MM-dd'),curYearMonth:mini.formatDate(curYearMonth, 'yyyy-MM-dd'),nextYearMonth: mini.formatDate(nextYearMonth, 'yyyy-MM-dd')
},
function (data) {
var o = mini.decode(data);
var calendar = '<divid="' + e.record.Pl_StaffId + '"class="mini-calendar" width="100%" height="100%"ondrawdate="onDrawDate"></div>';
$("#calendardiv").html("");
setTimeout(function () {
$("#calendardiv").append(calendar);
mini.parse(calendar);
mini.get(e.record.Pl_StaffId).setViewDate(curYearMonth);
}, 1000);
//得到考勤记录表
if (o.length > 0) {
selectDateGridList =o;
}
});
}
functiononDrawDate(e) {
vardate = e.date;
if(date.getTime() < curYearMonth.getTime() || date.getTime() >=nextYearMonth.getTime()) {
e.allowSelect = false;
}
else{
e.allowSelect = true;
}
if(selectDateGridList != null&& selectDateGridList.length > 0) {
for (vari = 0; i < selectDateGridList.length; i++) {
if (date.getTime() ==selectDateGridList.Date.getTime()) {
//如果考勤状态有数据,[size=12.6667px]日历[size=12.6667px]显示考勤状态(如缺勤、请假)
if(selectDateGridList.DateState != ""){e.dateHtml =selectDateGridList.DateState;}
else{//正常显示
//e.dateHtml = date;
}
}
else {
//正常显示
// e.dateHtml = date;
}
}
}
else{
//正常显示
// e.dateHtml = date;
}
}
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) | Powered by Discuz! X2 |