@@ -30,8 +30,8 @@ | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 申请</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a> | |||
<a id="lr_look" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -51,7 +51,7 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
<div class="lr-layout-body" id="gridtableInPM_Qualification"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -58,7 +58,7 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning('已提交,不能再修改!'); | |||
return; | |||
} | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var keyValue = $('#gridtableInPM_Qualification').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formInPM_Certificate', | |||
@@ -78,7 +78,7 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning('已提交,不能再修改!'); | |||
return; | |||
} | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var keyValue = $('#gridtableInPM_Qualification').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
@@ -116,7 +116,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
$('#gridtableInPM_Qualification').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/PM_Certificate/GetPageList', | |||
headData: [ | |||
{ label: "证书编号", name: "TeacherQualificationsNo", width: 100, align: "left" }, | |||
@@ -150,7 +150,8 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "提交状态", name: "SubmitStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == true ? "<span class=\"label label-success\">已提交</span>" : "<span class=\"label label-danger\">未提交</span>"; | |||
} | |||
}, | |||
], | |||
@@ -163,7 +164,7 @@ var bootstrap = function ($, learun) { | |||
search: function (param) { | |||
param = param || {}; | |||
param.EmpId = empId; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
$('#gridtableInPM_Qualification').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -35,7 +35,7 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
<div class="lr-layout-body" id="gridtableInPM_Jsprbg"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -58,7 +58,7 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning('已提交,不能再修改!'); | |||
return; | |||
} | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var keyValue = $('#gridtableInPM_Jsprbg').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formInPM_PositionChange', | |||
@@ -78,7 +78,7 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning('已提交,不能再修改!'); | |||
return; | |||
} | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var keyValue = $('#gridtableInPM_Jsprbg').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
@@ -116,7 +116,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
$('#gridtableInPM_Jsprbg').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/PM_PositionChange/GetPageList', | |||
headData: [ | |||
{ | |||
@@ -149,7 +149,8 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "提交状态", name: "SubmitStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == true ? "<span class=\"label label-success\">已提交</span>" : "<span class=\"label label-danger\">未提交</span>"; | |||
} | |||
}, | |||
], | |||
@@ -162,7 +163,7 @@ var bootstrap = function ($, learun) { | |||
search: function (param) { | |||
param = param || {}; | |||
param.EmpId = empId; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
$('#gridtableInPM_Jsprbg').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -95,7 +95,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
learun.layerConfirm('是否确认提交!', function (res) { | |||
if (res) { | |||
learun.postForm( top.$.rootUrl + '/EducationalAdministration/PM_YearAssess/Submit', { empId: empId, status: true }, function (info) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/PM_YearAssess/Submit', { empId: empId, status: true }, function (info) { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -125,13 +125,14 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "提交状态", name: "SubmitStatus", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
return cellvalue == true ? "<span class=\"label label-success\">已提交</span>" : "<span class=\"label label-danger\">未提交</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
sidx:'UpdateTime desc' | |||
sidx: 'UpdateTime desc' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -55,8 +55,9 @@ | |||
learun.layerForm({ | |||
id: "ExcelExportForm", | |||
title: '导出Excel数据', | |||
url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=' + item.F_GridId + '&iframeIndex=' + parent.layer.getFrameIndex(window.name)+'&filename=' + encodeURI(encodeURI(item.F_Name)), | |||
width: 500, | |||
//2022/12/6 苏燕燕更改不弹出报错 | |||
//url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=' + item.F_GridId + '&iframeIndex=' + parent.layer.getFrameIndex(window.name)+'&filename=' + encodeURI(encodeURI(item.F_Name)), | |||
url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=' + item.F_GridId + '&iframeIndex=' + (parent.layer ? parent.layer.getFrameIndex(window.name) : '') + '&filename=' + encodeURI(encodeURI(item.F_Name)),width: 500, | |||
height: 380, | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
@@ -9,6 +9,17 @@ var gridId = request('gridId'); | |||
var filename = decodeURI(request('filename')); | |||
var iframeIndex = request('iframeIndex'); | |||
var acceptClick; | |||
//2022/12/6 苏燕燕更改对人事表单页导出添加判断 共计9行 | |||
var currentDoc = ''; | |||
// 年度考核结果管理:gridtableInPM_YearAssess gridtableInPM_Jsprbg:教师聘任变更记录 gridtableInPM_Qualification:资格证获取情况 | |||
if (['gridtableInPM_YearAssess', 'gridtableInPM_Jsprbg', 'gridtableInPM_Qualification'].includes(gridId)) { | |||
let doc = parent.document.getElementsByClassName('layui-layer-iframe')[0]; | |||
let getiframe = $(doc)[0].childNodes[1] | |||
let iframe = $(getiframe)[0].getElementsByTagName('iframe') | |||
let tabActive = $(iframe[0].contentDocument)[0].getElementsByClassName('active') | |||
currentDoc = tabActive[1].getElementsByTagName('iframe')[0].contentWindow.document.getElementById(gridId); | |||
} | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
@@ -26,16 +37,26 @@ var bootstrap = function ($, learun) { | |||
currentWin.$('#' + gridId).jfGridSet('reloadall'); | |||
columnModel = currentWin.$('#' + gridId).jfGridGet('settingInfo').headData; | |||
} else { | |||
if (learun.frameTab.currentIframe().$('#' + gridId).jfGrid()[0].dfop.rowdatas.length == 0) { | |||
learun.alert.warning("暂无数据!"); | |||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 | |||
parent.layer.close(index); //再执行关闭 | |||
return; | |||
if (currentDoc) { | |||
if ($(currentDoc).jfGrid()[0].dfop.rowdatas.length == 0) { | |||
learun.alert.warning("暂无数据!"); | |||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 | |||
parent.layer.close(index); //再执行关闭 | |||
return; | |||
} | |||
$(currentDoc).jfGridSet('reloadall'); | |||
columnModel = $(currentDoc).jfGridGet('settingInfo').headData; | |||
} else { | |||
if (learun.frameTab.currentIframe().$('#' + gridId).jfGrid()[0].dfop.rowdatas.length == 0) { | |||
learun.alert.warning("暂无数据!"); | |||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 | |||
parent.layer.close(index); //再执行关闭 | |||
return; | |||
} | |||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); | |||
columnModel = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData; | |||
} | |||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); | |||
columnModel = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData; | |||
} | |||
var $ul = $('.sys_spec_text'); | |||
$.each(columnModel, | |||
function (i, item) { | |||
@@ -90,11 +111,19 @@ var bootstrap = function ($, learun) { | |||
currentWin.$('#' + gridId).jfGridSet('reload'); | |||
} else { | |||
columnJson = JSON.stringify(learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData); | |||
rowJson = JSON.stringify(learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('showData')); | |||
if (currentDoc) { | |||
columnJson = JSON.stringify($(currentDoc).jfGridGet('settingInfo').headData); | |||
rowJson = JSON.stringify($(currentDoc).jfGridGet('showData')); | |||
learun.frameTab.currentIframe().$('#' + gridId)[0].dfop.rows = 30; | |||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reload'); | |||
$(currentDoc)[0].dfop.rows = 30; | |||
$(currentDoc).jfGridSet('reload'); | |||
} else { | |||
columnJson = JSON.stringify(learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData); | |||
rowJson = JSON.stringify(learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('showData')); | |||
learun.frameTab.currentIframe().$('#' + gridId)[0].dfop.rows = 30; | |||
learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reload'); | |||
} | |||
} | |||
learun.download({ | |||
method: "POST", | |||