let idParam, layer, serNo, org, status,classIdParam;
function setParams(id,classId) {
idParam = id;
classIdParam = classId;
layui.use(['layer'], function () {
layer = layui.layer;
getNoticeVoiDetailById()
})
}
function getNoticeVoiDetailById() {
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
id: idParam,
classId: classIdParam
}))
},
url: dataUrl + 'proteam/pot/superStatistics/getNoticeSheet?token=' + token,
data: {
id: idParam,
classId: classIdParam
},
type: 'POST',
async: true,
success: function (result) {
layer.close(loadingMsg);
if (result.code === 200) {
setVoiRectNoticeData(result);
status = result.data.noticeVioEntity.status;
if (result.data.noticeVioEntity.status === '5') {
$('.voi-rect-feedback').removeAttr('style');
setVoiRectFeedbackData(result);
}
} else if (result.code === 500) {
layer.alert(result.msg, {icon: 2})
} else if (result.code === 401) {
logout(1)
}
}, error: function () {
layer.close(loadingMsg);
}
});
}
/*违章整改通知单(远程督查)赋值*/
function setVoiRectNoticeData(result) {
let html = '';
if (result.data.noticeVioEntity) {
let obj = result.data.noticeVioEntity;
$('#voiRectNoticeNo').html(obj.serNo);
serNo = obj.serNo, org = obj.org;
html += '
'
html += '
检查项目
' + obj.proName + '
'
html += '
检查时间
' + obj.createTime + '
'
html += '
施工内容及施工部位
' + (obj.workContent ? obj.workContent : '') + '
'
html += '
主送单位
' + obj.org + '
'
html += '
施工单位
' + (obj.sgUnit ? obj.sgUnit : '') + '
'
html += '
监理单位
' + (obj.jlUnit ? obj.jlUnit : '') + '
'
html += '
序号
发现问题
违反条款
'
let imgPath = obj.imgPath, imgPathArr = imgPath.split(','), cent = ''
$.each(imgPathArr, function (index, item) {
let path = photoUrl + item + '?token=' + token
cent += '
'
})
html += '
1
' + obj.content + '
' + obj.voiYj + '
'
html += cent
html += '
整改要求
' + obj.recRequirement + '
'
html += '
签发单位
' + obj.issuingUnit + '
'
}
$('#table1').empty().append(html);
let viewer = new Viewer(document.getElementById('table1'), {
url: 'data-original',
show: function () {
viewer.update();
}
});
}
/*违章整改反馈单赋值*/
function setVoiRectFeedbackData(result) {
let html = '', cent = '';
if (result.data.noticeVoiRectEntity) {
let obj = result.data.noticeVioEntity;
let obj2 = result.data.noticeVoiRectEntity;
$('#voiRectFeedbackNo').html(obj.serNo);
html += '