IntelligentRecognition/ah-jjsp-web/.svn/pristine/60/6036bfb6d75874acfc3bc538ebe...

189 lines
4.9 KiB
Plaintext

// 当日站班会、作业许可及销号 切换
function openNewDetail() {
if (checkIndex == 0) {
parent.openNewTab('../dutyTask/todayTask.html', '16', '当日站班会')
} else if (checkIndex == 1) {
parent.openNewTab('../dutyTask/workPermit.html', '71', '作业许可及销号')
} else if (checkIndex == 2) {
parent.openNewTab('../dutyTask/workPermit.html', '71', '作业许可及销号')
}
}
// 违章信息
function openNewDetail2() {
parent.openNewTab('../dutyTask/violationStatistics.html', '19', '违章统计')
}
// 报岗
function openNewDetail3() {
parent.openNewTab('../problem/job/application.html', '79', '报岗管理')
}
/*通知单*/
function noticeSheet(id, classId) {
let layerIndex = parent.layer.open({
type: 2,
title: false,
offset: ["16%", "31%"],
closeBtn: 0,
content: "../../html/dutyTask/violation/noticeSheet.html",
shadeClose: false,
area: ['740px', '780px'],
move: false,
success: function () {
let iframeWin = parent.window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id, classId);
}
});
}
// 值长审核页 / 查看页
function noticeSheet2(id, classId, type,that) {
checkObj = $(that).parents('tr');
let layerIndex = layer.open({
type: 2,
title: false,
closeBtn: 0,
content: "../../html/dutyTask/violation/noticeSheetCheck.html",
shadeClose: false,
area: ['740px', '780px'],
move: false,
success: function () {
let iframeWin = window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id, classId, type);
}, end: function () {
checkObj = null;
}
});
}
/*修改违章单*/
function editData(id, that) {
checkObj = $(that).parents('tr');
let layerIndex = layer.open({
id: "editVio",
title: false,
type: 2,
maxmin: false,
content: '../dutyTask/violation/editViolationForm.html',
area: ['700px', '780px'],
move: false,
closeBtn: 0,
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id);
}, end: function () {
checkObj = null;
}
});
}
// 违章单驳回修改
function editData2(id,that) {
checkObj = $(that).parents('tr');
let layerIndex = layer.open({
id: "editVio",
title: false,
type: 2,
maxmin: false,
content: '../dutyTask/violation/editViolationForm2.html',
area: ['700px', '780px'],
move: false,
closeBtn: 0,
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id);
}, end: function () {
checkObj = null;
}
});
}
/*违章整改页面*/
function openRectification(id, classId, type, that) {
checkObj = $(that).parents('tr');
let html = '../dutyTask/violation/rectifyForm.html';
if (type === '2') {
html = '../dutyTask/violation/rectifyCheckForm.html';
} else if (type === '3') {
// 地市自查
html = '../dutyTask/violation/rectifyFormByCity.html';
}
let layerIndex = layer.open({
id: "rectify",
title: false,
type: 2,
maxmin: false,
content: html,
area: ['700px', '780px'],
move: false,
closeBtn: 0,
success: function (layero, index) {
let iframeWin = window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id, classId);
}, end: function () {
checkObj = null;
}
});
}
/*删除违章单*/
function delData(id, typeParam,type) {
let title = type === '1' ? '确定删除吗?' : '确定撤销吗?'
layer.confirm('<p style="color:#000;text-align:center;font-size:20px;">' + title + '</p>', { title: '操作提示', move: false, area: ['300px', '200px'] }, function () {
let loadingMsg = layer.msg('数据删除中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
params: id,
type: typeParam
}))
},
url: dataUrl + 'proteam/pot/superStatistics/delNoticeVoiById?token=' + token,
data: {
params: id,
type: typeParam
},
type: 'post',
async: true,
success: function (result) {
layer.close(loadingMsg); // 关闭提示层
if (result.code === 200) {
layer.msg('删除成功', { icon: 1 })
loadVoiNumAjax();
loadVoiAjax();
} else if (result.code === 500) {
layer.alert(result.msg, { icon: 2 })
} else if (result.code === 401) {
logout(1)
}
}, error: function () {
layer.close(loadingMsg); // 关闭提示层
layer.msg('服务异常,请稍后重试', { icon: 16, scrollbar: false, time: 2000 });
}
});
})
}
/* 详情 */
function viewData(id) {
let layerIndex = parent.layer.open({
type: 2,
title: false,
offset: ["16%", "31%"],
closeBtn: 0,
content: "../../html/dutyTask/violation/violationDetail.html",
shadeClose: false,
area: ['700px', '780px'],
move: false,
success: function () {
let iframeWin = parent.window["layui-layer-iframe" + layerIndex];
iframeWin.setParams(id);
}
});
}
// 局部刷新table 数据
function reloadData() {
let voiId = checkObj.attr('voiId');
loadVoiDataByIdAjax(voiId);
}