452 lines
20 KiB
Plaintext
452 lines
20 KiB
Plaintext
|
|
<!DOCTYPE html
|
|||
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|||
|
|
<%@ page language="java" pageEncoding="utf-8" %>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
|||
|
|
<style type="text/css">
|
|||
|
|
.select2-container .select2-selection--single {
|
|||
|
|
height: 34px;
|
|||
|
|
line-height: 34px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-selection__arrow {
|
|||
|
|
margin-top: 3px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/.layout{/
|
|||
|
|
/ display: flex;/
|
|||
|
|
/ padding-left: 15px;/
|
|||
|
|
/}/
|
|||
|
|
.form-horizontal {
|
|||
|
|
padding-top: 20px;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.right {
|
|||
|
|
margin-left: 50px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bor {
|
|||
|
|
border: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default .select2-selection--multiple {
|
|||
|
|
border: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
|||
|
|
background-color: white;
|
|||
|
|
}
|
|||
|
|
.select2-container--default.select2-container--disabled .select2-selection--multiple{
|
|||
|
|
background-color: white;
|
|||
|
|
}
|
|||
|
|
.select2-container--default.select2-container--focus .select2-selection--multiple{
|
|||
|
|
border: none;
|
|||
|
|
}
|
|||
|
|
.AAA {
|
|||
|
|
display: inline-block;
|
|||
|
|
vertical-align: top;
|
|||
|
|
padding: 8px;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
$(function () {
|
|||
|
|
jobTypeDropDownInit();
|
|||
|
|
agreeListDropDownInit();
|
|||
|
|
initFileList();
|
|||
|
|
initFlowList()
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
function initFileList() {
|
|||
|
|
$.post(ext.contextPath + '/safety/SafetyFiles/fileListShow.do',
|
|||
|
|
{
|
|||
|
|
bizId: '${bean.id}',
|
|||
|
|
functionCode: 5,
|
|||
|
|
statusCode: 1,
|
|||
|
|
doNotUpload: true
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#fileList").html(data);
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function initFlowList() {
|
|||
|
|
|
|||
|
|
$.post(ext.contextPath + '/safety/SafetyFlowTask/showList.do', {
|
|||
|
|
bizId: '${bean.id}',
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#flowDiv").html(data);
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function jobTypeDropDownInit() {
|
|||
|
|
var select_Data = jQuery.parseJSON('${jobTypeList}');
|
|||
|
|
var select_3 = $("#jobType").select2({
|
|||
|
|
data: select_Data,
|
|||
|
|
cache: false,
|
|||
|
|
placeholder: '请选择',//默认文字提示
|
|||
|
|
// allowClear: true,//允许清空
|
|||
|
|
escapeMarkup: function (markup) {
|
|||
|
|
return markup;
|
|||
|
|
}, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
|||
|
|
multiple: true,
|
|||
|
|
formatResult: function formatRepo(repo) {
|
|||
|
|
return repo.text;
|
|||
|
|
}, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) {
|
|||
|
|
return repo.text;
|
|||
|
|
} // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
|||
|
|
select_3.val('${bean.jobType}'.split(",")).trigger("change");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function agreeListDropDownInit() {
|
|||
|
|
var select_Data = jQuery.parseJSON('${agreeList}');
|
|||
|
|
var select_3 = $("#pass").select2({
|
|||
|
|
data: select_Data,
|
|||
|
|
cache: false,
|
|||
|
|
placeholder: '请选择',//默认文字提示
|
|||
|
|
// allowClear: true,//允许清空
|
|||
|
|
escapeMarkup: function (markup) {
|
|||
|
|
return markup;
|
|||
|
|
}, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
|||
|
|
// multiple: true,
|
|||
|
|
formatResult: function formatRepo(repo) {
|
|||
|
|
return repo.text;
|
|||
|
|
}, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) {
|
|||
|
|
return repo.text;
|
|||
|
|
} // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
|||
|
|
// select_3.val(1).trigger("change");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function selectdutyUser() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
|||
|
|
{formId: "editForm", hiddenId: "dutyUserId", textId: "dutyUserName"},
|
|||
|
|
function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal('user4SelectModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
//选择部门
|
|||
|
|
var showUnit4SelectFun = function () {
|
|||
|
|
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {
|
|||
|
|
formId: "editForm",
|
|||
|
|
hiddenId: "competentDeptId",
|
|||
|
|
textId: "competentDeptName"
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#unit4SelectDiv").html(data);
|
|||
|
|
openModal("unit4SelectModal_Limited");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function selectCheckUser() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
|||
|
|
{formId: "editForm", hiddenId: "checkerId", textId: "checkerName"},
|
|||
|
|
function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal('user4SelectModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
$(function () {
|
|||
|
|
|
|||
|
|
$('#deTail').html(initdeTail(JSON.parse('${bean.countersignDetail}')))
|
|||
|
|
//检查日期
|
|||
|
|
$("#checkDate").datepicker({
|
|||
|
|
language: 'zh-CN',
|
|||
|
|
autoclose: true,
|
|||
|
|
todayHighlight: true,
|
|||
|
|
format: 'yyyy-mm-dd',
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
function submitFun() {
|
|||
|
|
$("#editForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
var formData = new FormData($("#editForm")[0]);
|
|||
|
|
$.ajax({
|
|||
|
|
url: ext.contextPath + "/safety/SafetyJobInside/audit.do",
|
|||
|
|
type: 'POST',
|
|||
|
|
data: formData,
|
|||
|
|
async: false,
|
|||
|
|
cache: false,
|
|||
|
|
contentType: false,
|
|||
|
|
processData: false,
|
|||
|
|
dataType: 'json',
|
|||
|
|
success: function (data) {
|
|||
|
|
// console.log(data)
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', '保存失败!' + data.msg);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (data) {
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
$("#editForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
pass: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '会签意见不能为空。'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
function selectDutyUser() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForOneSelectByStructure.do', {
|
|||
|
|
formId: "editForm",
|
|||
|
|
hiddenId: "dutyUserId",
|
|||
|
|
textId: "dutyUserName",
|
|||
|
|
bean: "dutyUserBean"
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal('user4SelectModal');
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function copyUserSelectsFun() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForSelectByCompany.do',
|
|||
|
|
{
|
|||
|
|
formId: "editForm",
|
|||
|
|
hiddenId: "copyUserId",
|
|||
|
|
textId: "copyUserName"
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal("user4SelectModal");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function countersignUserSelectsFun() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForSelectByCompany.do',
|
|||
|
|
{
|
|||
|
|
formId: "editForm",
|
|||
|
|
hiddenId: "userId",
|
|||
|
|
textId: "userName"
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal("user4SelectModal");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function initdeTail(list) {
|
|||
|
|
let temp = `<div >`
|
|||
|
|
list.forEach((item, index) => {
|
|||
|
|
temp += `<div><div class="AAA">` + item.deptName + `</div>`
|
|||
|
|
temp += `<div class="AAA">` + item.userName + `</div>`
|
|||
|
|
temp += `<div class="AAA">` + item.pass + `</div>`
|
|||
|
|
temp += `<div class="AAA">` + item.time + `</div></div>`
|
|||
|
|
})
|
|||
|
|
temp += `</div>`
|
|||
|
|
temp += ``
|
|||
|
|
return temp
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog" style="width: 78%">
|
|||
|
|
<div class="modal-content">
|
|||
|
|
<div class="modal-header">
|
|||
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|||
|
|
<span aria-hidden="true">×</span></button>
|
|||
|
|
<h4 class="modal-title">项目进行中</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-7 col-xs-13">
|
|||
|
|
<!-- 新增界面formid强制为editForm -->
|
|||
|
|
<form class="form-horizontal" id="editForm" enctype="multipart/form-data">
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
|||
|
|
<!-- 界面提醒div强制id为alertdiv -->
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label "> 发起人222</label>
|
|||
|
|
<div class="col-sm-4 ">
|
|||
|
|
<input type="text" class="form-control bor" id="createUserName"
|
|||
|
|
name="createUserName" placeholder="请选择.."
|
|||
|
|
value="${bean.createUserName}" readonly style="background-color: white">
|
|||
|
|
<input type="hidden" class="form-control" id="createUserId" name="createUserId"
|
|||
|
|
placeholder="请选择.."
|
|||
|
|
value="${bean.createUserId}" readonly>
|
|||
|
|
<input type="hidden" class="form-control" id="taskId" name="taskId"
|
|||
|
|
placeholder="请选择.."
|
|||
|
|
value="${taskId}" readonly>
|
|||
|
|
<input type="hidden" class="form-control" id="bizId" name="bizId"
|
|||
|
|
placeholder="请选择.."
|
|||
|
|
value="${bean.id}" readonly>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">作业编号</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="jobCode" name="jobCode" class="form-control bor"
|
|||
|
|
placeholder="请选择.." value="${bean.jobCode}" readonly
|
|||
|
|
style="background-color: white">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">作业类型</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<select class="form-control bor" name="jobType" id="jobType"
|
|||
|
|
style="width: 100%" disabled="true" >
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label "> 作业地点</label>
|
|||
|
|
<div class="col-sm-4 ">
|
|||
|
|
<input type="text" class="form-control bor" id="jobLocation" name="jobLocation"
|
|||
|
|
placeholder="请选择.." style="background-color: white"
|
|||
|
|
value="${bean.jobLocation}" readonly>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">作业单位</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="jobCompany" name="jobCompany" class="form-control bor"
|
|||
|
|
placeholder="请选择.." style="background-color: white"
|
|||
|
|
value="${bean.jobCompany}" readonly>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">主管部门</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="competentDeptName" name="competentDeptName"
|
|||
|
|
class="form-control bor" readonly style="background-color: white"
|
|||
|
|
placeholder="请选择.." onclick="showUnit4SelectFun();"
|
|||
|
|
value="${bean.competentDeptName}" readonly style="background-color: white">
|
|||
|
|
<input type="hidden" id="competentDeptId" name="competentDeptId"
|
|||
|
|
class="form-control"
|
|||
|
|
placeholder="请选择.."
|
|||
|
|
value="${bean.competentDeptId}" readonly>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">开始时间</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="projectBeginDate" name="projectBeginDate"
|
|||
|
|
class="form-control bor"
|
|||
|
|
placeholder="请选择.." style="background-color: white"
|
|||
|
|
value="${bean.projectBeginDate.substring(0, 10)}" readonly>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label ">结束时间</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
|
|||
|
|
<input type="text" id="projectEndDate" name="projectEndDate"
|
|||
|
|
class="form-control bor"
|
|||
|
|
placeholder="请选择.." style="background-color: white"
|
|||
|
|
value="${bean.projectEndDate.substring(0, 10)}" readonly>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">作业负责人</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="dutyUserName" name="dutyUserName" class="form-control bor"
|
|||
|
|
readonly style="background-color: white" placeholder="请选择.." onclick="selectdutyUser()" value="${bean.dutyUserName}">
|
|||
|
|
<input type="hidden" id="dutyUserId" name="dutyUserId" class="form-control"
|
|||
|
|
placeholder="请选择.." value="${bean.dutyUserId}" readonly>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">联系方式</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="contact" name="contact" class="form-control bor"
|
|||
|
|
placeholder="请选择.." readonly style="background-color: white"
|
|||
|
|
value="${bean.contact}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">作业内容</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control bor" id="jobContent" name="jobContent"
|
|||
|
|
readonly style="background-color: white" value="${bean.jobContent}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">主管部门意见</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control bor" id="competentAdvice"
|
|||
|
|
name="competentAdvice" readonly style="background-color: white"
|
|||
|
|
placeholder="请选择.."
|
|||
|
|
value="${bean.competentAdvice}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">相关部门</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control bor" id="userName" name="countersignUserName"
|
|||
|
|
placeholder="点击选择.." onclick="countersignUserSelectsFun()" readonly style="background-color: white"
|
|||
|
|
value="${bean.countersignUserName}">
|
|||
|
|
|
|||
|
|
<input id="userId" name="countersignUserId" type="hidden"
|
|||
|
|
value="${bean.countersignUserId}">
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">*会签意见</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select type="text" class="form-control" id="pass" name="pass"
|
|||
|
|
placeholder="点击选择.."></select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">备注</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="remark" name="remark"
|
|||
|
|
placeholder="点击选择..">
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label ">查看其它会签意见</label>
|
|||
|
|
<div id="deTail"></div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group" style="margin-left: 39px">
|
|||
|
|
<div id="fileList"></div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-5 col-xs-12" id="flowDiv"></div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
|||
|
|
|
|||
|
|
<button type="button" class="btn btn-primary " style="margin-left: 10px" onclick="submitFun()">
|
|||
|
|
提交
|
|||
|
|
</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|