/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-11-07 11:54
* 描 述:工作绩效
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
//年份
$('#IssueYear').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear',
value: 'value',
text: 'text'
});
$('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/Form',
width: 800,
height: 800,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/Form?keyValue=' + keyValue,
width: 800,
height: 800,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
if (learun.checkrow(keyValue)) {
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: keyValue, Status: '1' }, function () {
refreshGirdData();
});
}
});
}
});
//去审
$('#lr_uncheck').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
var CheckMarkArr = CheckMark.split(',');
if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) {
learun.alert.warning("选中记录中包含未审核项目!");
return;
}
learun.layerConfirm('是否确认取消审核该项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: keyValue, Status: '2' }, function () {
refreshGirdData();
});
}
});
}
});
//审核全部
$('#lr_checkall').on('click', function () {
learun.layerConfirm('是否确认全部审核?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: null, Status: '0' }, function () {
refreshGirdData();
});
}
});
});
///上传
$('#lr_import').on('click',
function () {
learun.layerForm({
id: 'form',
title: '导入',
url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/ImportForm',
width: 600,
height: 400,
btn: null,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
},
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/GetPageList',
headData: [
{
label: "审核状态", name: "F_EnabledMark", width: 70, align: "center", frozen: true,
formatter: function (cellvalue) {
return cellvalue == "1" ? "已审核" : "未审核";
}
},
{ label: '发放年份', name: 'IssueYear', width: 70, align: "left", frozen: true},
{ label: '发放月份', name: 'IssueMonth', width: 70, align: "left", frozen: true},
{
label: '处室', name: 'Department', width: 70, align: "left", frozen: true
},
{ label: '姓名', name: 'EmpName', width: 70, align: "left", frozen: true},
{ label: '岗位名称', name: 'Post', width: 130, align: "left", frozen: true},
{
label: '基础岗位分', name: '基础岗位分', align: "center", width: 70,
children: [
{ label: '行政管理岗位', name: 'AdminPosition', width: 100, align: "left", statistics: true },
{ label: '团总支书记', name: 'LeagueSecretary', width: 100, align: "left", statistics: true },
{ label: '中心负责人', name: 'CenterPeople', width: 100, align: "left", statistics: true },
{ label: '教辅、工勤岗位', name: 'TeachingPosition', width: 100, align: "left", statistics: true },
{ label: '班主任', name: 'Director', width: 90, align: "left", statistics: true },
{ label: '名师工作室', name: 'TeacherWorkRoom', width: 100, align: "left", statistics: true },
{ label: '专业负责人、教研/备课组长', name: 'MajorPeople', width: 160, align: "left", statistics: true },
{ label: '办公组长', name: 'WorkLeader', width: 90, align: "left", statistics: true },
{ label: '实训室类管理员', name: 'TrainAdmin', width: 100, align: "left", statistics: true },
{ label: '纪委/支部/工会委员、兼职督学', name: 'CommitteeMember', width: 180, align: "left", statistics: true },
]
},
{
label: '教学岗位分', name: '教学岗位分', align: "center", statistics: true,
children: [
{ label: '正课节数', name: 'LessonNum', width: 70, align: "left", statistics: true },
{ label: '正课课时分', name: 'LessonHour', width: 70, align: "left", statistics: true },
{ label: '早自习节数', name: 'MorningStudyNum', width: 70, align: "left", statistics: true },
{ label: '早自习课时分', name: 'MorningStudyHour', width: 80, align: "left", statistics: true },
{ label: '晚自习节数', name: 'NightStudyNum', width: 70, align: "left", statistics: true },
{ label: '晚自习课时分', name: 'NightStudyHour', width: 80, align: "left", statistics: true },
{ label: '两操节数', name: 'TwoExerciseNum', width: 70, align: "left", statistics: true },
{ label: '两操课时分', name: 'TwoExerciseHour', width: 70, align: "left", statistics: true },
{ label: '临时代班天数', name: 'TempWorkDay', width: 80, align: "left", statistics: true },
{ label: '临时代班岗位分', name: 'TempWorkScore', width: 100, align: "left", statistics: true },
{ label: '缺班天数', name: 'OffWorkDay', width: 70, align: "left", statistics: true },
{ label: '临时缺班扣减岗位分', name: 'OffWorkMinusScore', width: 140, align: "left", statistics: true },
]
},
{
label: '值日岗位分', name: '值日岗位分', align: "center",
children: [
{ label: '值日天数', name: 'OnDutyDay', width: 70, align: "left", statistics: true },
{ label: '值日岗位分', name: 'OnDutyScore', width: 70, align: "left", statistics: true },
]
},
{
label: '出勤考核', name: '出勤考核', width: 130, align: "center", statistics: true,
children: [
{ label: '应出勤天数 ', name: 'ShouldWorkDay', width: 70, align: "left", statistics: true },
{ label: '出勤基础分 ', name: 'WorkBasicScore', width: 70, align: "left", statistics: true },
{ label: '出勤缺卡次数', name: 'WorkOffCount', width: 80, align: "left", statistics: true },
{ label: '出勤考核扣减分', name: 'WorkMinusScore', width: 100, align: "left", statistics: true },
{ label: '大型活动考核扣减分', name: 'BigActivityMinusScore', width: 120, align: "left", statistics: true },
{ label: '旷工天数', name: 'AbsenteeismDay', width: 90, align: "left", statistics: true },
{ label: '旷工扣减分', name: 'AbsenteeismMinusScore', width: 90, align: "left", statistics: true },
{ label: '出勤(病事公产活动等)考核情况说明', name: 'WorkRemark', width: 200, align: "left" },
]
},
{
label: '常规工作考核', name: '常规工作考核', width: 100, align: "center", statistics: true,
children: [
{ label: '常规工作考核基础分', name: 'RoutineBasicScore', width: 120, align: "left", statistics: true },
{ label: '常规工作考核扣减分', name: 'RoutineMinusScore', width: 120, align: "left", statistics: true },
{ label: '常规工作考核情况详细说明', name: 'RoutineRemark', width: 160, align: "left"},
]
},
{ label: '月绩效考核分合计', name: 'PerformanceTotalScore', width: 110, align: "left", statistics: true },
{ label: '假期工作绩效', name: 'HolidayJobPerformance', width: 90, align: "center", statistics: true },
],
mainId: 'Id',
isPage: true,
rows: 300,
sidx: 'IssueYear desc, IssueMonth desc, CreateTime desc ',
isMultiselect: true
});
page.search();
},
search: function (param) {
param = param || {};
param.Sqlparam = "";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}