@@ -84,6 +84,11 @@ var bootstrap = function ($, learun) {
learun.alert.warning("当前项已审核!");
return false;
}
var DeptStatus = $('#gridtable').jfGridValue('DeptStatus');
if (DeptStatus == "1" || DeptStatus == "2") {
learun.alert.warning("当前项已审核!");
return false;
}
learun.layerForm({
id: 'formInTeacherCertificate',
title: '编辑',
@@ -105,6 +110,11 @@ var bootstrap = function ($, learun) {
learun.alert.warning("当前项已审核!");
return false;
}
var DeptStatus = $('#gridtable').jfGridValue('DeptStatus');
if (DeptStatus == "1" || DeptStatus == "2") {
learun.alert.warning("当前项已审核!");
return false;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/DeleteForm', { keyValue: keyValue }, function () {
@@ -150,6 +160,42 @@ var bootstrap = function ($, learun) {
});
}
});
// 审核通过
$('#lr_deptyes').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TCID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('DeptStatus');
if (Status == "1" || Status == "2") {
learun.alert.warning("当前项已审核!");
return false;
}
learun.layerConfirm('是否确认审核通过该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/DeptForm', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
// 审核不通过
$('#lr_deptno').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TCID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('DeptStatus');
if (Status == "1" || Status == "2") {
learun.alert.warning("当前项已审核!");
return false;
}
learun.layerConfirm('是否确认审核不通过该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/DeptForm', { keyValue: keyValue, status: "2" }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
@@ -213,7 +259,12 @@ var bootstrap = function ($, learun) {
{ label: "任教学科", name: "TCClass", width: 100, align: "left" },
{ label: "取得时间", name: "TCTime", width: 100, align: "left" },
{
label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) {
label: "部门审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>";
}
},
{
label: "审核状态", name: "DeptStatus", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>";
}
},