first commit
This commit is contained in:
391
WebRoot/jsp/safety/SafetyCheckDaylyEditResponse.jsp
Normal file
391
WebRoot/jsp/safety/SafetyCheckDaylyEditResponse.jsp
Normal file
@ -0,0 +1,391 @@
|
||||
<!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;
|
||||
}
|
||||
|
||||
#tab1 {
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
#tab1 th {
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
#tab1 td {
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
.row form .bor {
|
||||
border: none;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple{
|
||||
border: none;
|
||||
}
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice{
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
initFileList();
|
||||
// checkResultDropDownInit();
|
||||
checkItemDropDownInit();
|
||||
initFlowList();
|
||||
});
|
||||
|
||||
// 检查项目
|
||||
function checkItemDropDownInit() {
|
||||
var select_Data = jQuery.parseJSON('${checkItemList}');
|
||||
var select_3 = $("#checkResultDetail").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'});
|
||||
var itemsArr = [];
|
||||
var items = '${bean.checkResultDetail}';
|
||||
itemsArr = items.split(',');
|
||||
select_3.val(itemsArr).trigger("change");
|
||||
}
|
||||
|
||||
|
||||
var fileinput = function () {
|
||||
$('#file').click();
|
||||
};
|
||||
var filedel = function () {
|
||||
$('#fileName').val('');
|
||||
};
|
||||
var fileSelected = function () {
|
||||
var filename = $('#file').val();
|
||||
$('#fileName').val(filename);
|
||||
};
|
||||
|
||||
function selectCheckUser() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "editForm", hiddenId: "checkerId", textId: "checkerName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
};
|
||||
$(function () {
|
||||
//检查日期
|
||||
$("#checkDate").datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
});
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#editForm").serialize());
|
||||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
var formData = new FormData($("#editForm")[0]);
|
||||
$.ajax({
|
||||
url: ext.contextPath + "/safety/SafetyCheckDayly/update.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) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function submitFun() {
|
||||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
var formData = new FormData($("#editForm")[0]);
|
||||
$.ajax({
|
||||
url: ext.contextPath + "/safety/SafetyCheckDayly/response.do?processInstanceId=${processInstanceId}",
|
||||
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: {
|
||||
educationCode: {
|
||||
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 userInfoChage() {
|
||||
var userInfo = JSON.parse($('#dutyUserBean').val());
|
||||
var userInfo2;
|
||||
$('#dutyDeptId').val(userInfo.pid);
|
||||
if (userInfo.sex == '1') {
|
||||
$('#gender').val('男');
|
||||
} else {
|
||||
$('#gender').val('女');
|
||||
}
|
||||
$.post(ext.contextPath + '/user/findUserByIds.do?userIdsStr=' + userInfo.id + ',', function (res) {
|
||||
// console.log(res[0])
|
||||
userInfo2 = res[0];
|
||||
$('#dutyDeptName').val(userInfo2.deptName);
|
||||
}, 'json')
|
||||
|
||||
}
|
||||
|
||||
|
||||
var confirmUserSelectsFun = function () {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "editForm", hiddenId: "confirmUserId", textId: "confirmUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function initFileList() {
|
||||
$.post(ext.contextPath + '/safety/SafetyFiles/fileListShow.do',
|
||||
{
|
||||
bizId: '${bean.id}',
|
||||
functionCode: 8,
|
||||
statusCode: 2
|
||||
}, function (data) {
|
||||
$("#fileList").html(data);
|
||||
});
|
||||
};
|
||||
function initFlowList() {
|
||||
|
||||
$.post(ext.contextPath + '/safety/SafetyFlowTask/showList.do', {
|
||||
bizId: '${bean.id}',
|
||||
}, function (data) {
|
||||
$("#flowDiv").html(data);
|
||||
});
|
||||
};
|
||||
</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 "> 发起人</label>
|
||||
<div class="col-sm-4 ">
|
||||
<input type="text" class="form-control bor" id="createUserName"
|
||||
name="createUserName"
|
||||
placeholder="请选择.." value="${bean.createUserName}" readonly
|
||||
style="border: none"/>
|
||||
<input type="hidden" class="form-control" id="createUserId" name="createUserId"
|
||||
placeholder="请选择.." value="${bean.createUserId}" readonly/>
|
||||
<input type="hidden" class="form-control" id="id" name="id"
|
||||
placeholder="请选择.." value="${bean.id}" readonly/>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">安全检查编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="checkCode" name="checkCode" class="form-control bor"
|
||||
placeholder="请选择.." value="${bean.checkCode}" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"> 检查日期</label>
|
||||
<div class="col-sm-4 ">
|
||||
<div class="input-group date">
|
||||
<input type="text" class="form-control bor" id="checkDate" name="checkDate"
|
||||
placeholder="请选择.." value="${bean.checkDate.substring(0,10)}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">检查人员</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="checkerName" name="checkerName" class="form-control bor"
|
||||
placeholder="请选择.." onclick="selectCheckUser()" value="${bean.checkerName}"/>
|
||||
<input type="hidden" id="checkerId" name="checkerId" class="form-control"
|
||||
placeholder="请选择.." value="${bean.checkerId}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">不相符内容</label>
|
||||
<div class="col-sm-8 ">
|
||||
<select class="form-control" name="checkResultDetail" id="checkResultDetail"
|
||||
style="width: 100%" disabled="true"/>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">附加说明</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control bor" id="checkRemark" name="checkRemark"
|
||||
placeholder="请选择">${bean.checkRemark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">整改负责部门</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="dutyDeptId" name="dutyDeptId"
|
||||
placeholder="请选择" readonly value="${bean.dutyDeptId}"/>
|
||||
<input type="text" class="form-control bor" id="dutyDeptName" name="dutyDeptName"
|
||||
placeholder="请选择" readonly value="${bean.dutyDeptName}"/>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label ">整改负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control bor" id="dutyUserName" name="dutyUserName"
|
||||
placeholder="请选择"
|
||||
onclick="selectDutyUser();" value="${bean.dutyUserName}"/>
|
||||
<input type="hidden" class="form-control" id="dutyUserId" name="dutyUserId"
|
||||
placeholder="请选择" value="${bean.dutyUserId}"/>
|
||||
<input type="hidden" class="form-control" id="dutyUserBean" name="dutyUserBean"
|
||||
placeholder="请选择" onchange="userInfoChage();"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" id="copyUserName" name="copyUserName"
|
||||
placeholder="请选择"
|
||||
value="${bean.copyUserName}"/>
|
||||
<input id="copyUserId" name="copyUserId" type="hidden"
|
||||
value="${bean.copyUserId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">整改措施</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="4" id="correctiveAction"
|
||||
name="correctiveAction"
|
||||
placeholder="措施..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="accord">
|
||||
<label class="col-sm-2 control-label ">验证人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="confirmUserName" name="confirmUserName"
|
||||
placeholder="请选择"
|
||||
onclick="confirmUserSelectsFun();"/>
|
||||
<input id="confirmUserId" name="confirmUserId" type="hidden">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin-left: 16px">
|
||||
<div class="col-sm-4" 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>
|
||||
Reference in New Issue
Block a user