/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2020-08-28 18:09 * 描 述:授课考勤明细统计 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var startTime; var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); // 时间搜索框 $('#datesearch').lrdate({ dfdata: [ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } ], // 月 mShow: false, premShow: false, // 季度 jShow: false, prejShow: false, // 年 ysShow: false, yxShow: false, preyShow: false, yShow: false, // 默认 dfvalue: '0', selectfn: function (begin, end) { startTime = begin; endTime = end; } }); //当前年 //var now = learun.formatDate(new Date(), 'yyyy-MM-dd'); //$('#Date').val(now); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 部门选择 $('#F_DepartmentId').lrselect({ type: 'tree', // 是否允许搜索 allowSearch: true, // 访问数据接口地址 url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', // 访问数据接口参数 param: { parentId: '0' } }); //考勤状态 $('#ClockStatus').lrDataItemSelect({ code: 'ADStatus' }); }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/TeachAttendance/GetStatisticDetailList', headData: [ { label: "姓名", name: "EmpNameInArrange", width: 100, align: "left" }, { label: "职工编号", name: "EmpNoInArrange", width: 100, align: "left" }, { label: "部门", name: "F_DepartmentId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, keyId: 'id', callback: function (_data) { callback(_data['name']); } }); } }, { label: "日期", name: "LessonDate", width: 100, align: "left", sort: true, formatter: function (cellvalue) { return cellvalue; } }, { label: "学年", name: "AcademicYearNo", width: 60, align: "left", sort: true }, { label: "学期", name: "Semester", width: 60, align: "left", sort: true }, { label: "课程编号", name: "LessonNo", width: 100, align: "left", sort: true }, { label: "课程名称", name: "LessonName", width: 100, align: "left", sort: true }, { label: "教室编号", name: "ClassroomNo", width: 100, align: "left", sort: true }, { label: "节次", name: "LessonTime", width: 60, align: "left", sort: true }, { label: "时间段", name: "TimePeriod", width: 150, align: "left", sort: true }, { label: "上课状态", name: "ADStatusWork", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'ADStatus', callback: function (_data) { if (_data.text) { if (_data.text == "正常") { callback('' + _data.text + ''); } else if (_data.text == "缺勤") { callback('' + _data.text + ''); } else { callback('' + _data.text + ''); } } } }); }, sort: true }, { label: "下课状态", name: "ADStatusClose", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'ADStatus', callback: function (_data) { if (_data.text) { if (_data.text == "正常") { callback('' + _data.text + ''); } else if (_data.text == "缺勤") { callback('' + _data.text + ''); } else { callback('' + _data.text + ''); } } } }); }, sort: true }, { label: "签到时间", name: "ClockTimeWork", width: 80, align: "left", sort: true }, { label: "签退时间", name: "ClockTimeClose", width: 80, align: "left", sort: true}, { label: "人脸检测", name: "IsFitstr", width: 80, align: "left", sort: true, formatterAsync: function (callback, value, row, op, $cell) { if (value!='True,True') { callback('异常'); } else { callback('通过'); } } }, { label: "人脸详情", name: "Img", width: 80, align: "left", sort: true, formatterAsync: function (callback, value, row, op, $cell) { callback("查看"); } }, { label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left", sort: true }, { label: "早退(分钟)", name: "ZaoTuiMinutes", width: 80, align: "left", sort: true}, { label: "出勤(分钟)", name: "ChuQinMinutes", width: 80, align: "left", sort: true }, //{ label: "缺勤(分钟)", name: "QueQinMinutes", width: 80, align: "left",sort: true }, { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left",sort: true }, { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left", sort: true }, ], mainId: '', isPage: true, sidx: 'EmpNo,EmpName,LessonTime' }); page.search(); }, search: function (param) { param = param || {}; param.startTime = startTime; param.endTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { $('#gridtable').jfGridSet('reload'); }; page.init(); } function detail(ADPhoto,photos,isfits,username,teachno) { //op.learun.layerForm({ // id: 'PreviewForm', // title: '文件预览', // url: top.$.rootUrl + '/LR_Desktop/EnrollData/PreviewFile?folderid=' + ADPhoto, // width: 1080, // height: 850, // btn: null, // callBack: function (id) { // return top[id].acceptClick(refreshGirdData); // } //); var strs = photos.split(',') var strs1 = isfits.split(',') var html = '
检测人员:' + username+'
'; html += '对比照片
'; html += '上班打卡 未通过
'; } else { html += '上班打卡 通过
'; } html += '下班打卡 未通过
'; } else { html += '下班打卡 通过
'; } html += '