136 lines
4.7 KiB
Plaintext
136 lines
4.7 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
|
|
<style type="text/css">
|
||
|
|
.select2-container .select2-selection--single {
|
||
|
|
height: 34px;
|
||
|
|
line-height: 34px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.select2-selection__arrow {
|
||
|
|
margin-top: 3px;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script type="text/javascript">
|
||
|
|
function dosave(status) {
|
||
|
|
var jsonStr = '${rptDayLog}';
|
||
|
|
var jsonObject= jQuery.parseJSON(jsonStr);
|
||
|
|
|
||
|
|
delete jsonObject.user.sql;
|
||
|
|
delete jsonObject.user.where;
|
||
|
|
delete jsonObject.user.roles;
|
||
|
|
|
||
|
|
jsonObject.rptdt=$("#rptdt").val();
|
||
|
|
jsonObject.id=$("#id").val();
|
||
|
|
jsonObject.memo=$("#memo").val();
|
||
|
|
jsonObject.status=status;
|
||
|
|
console.log(status);
|
||
|
|
for(var i in jsonObject.mPointList){//mPointHistoryList
|
||
|
|
jsonObject.mPointHistoryList[i].parmvalue=$("#id"+i).val();
|
||
|
|
}
|
||
|
|
var jsonstr =JSON.stringify(jsonObject);
|
||
|
|
|
||
|
|
console.log(jsonstr);
|
||
|
|
|
||
|
|
$.post(ext.contextPath + "/report/RptDayLog/dosave.do",{json:jsonstr}, function(data) {
|
||
|
|
if (data.code == 1){
|
||
|
|
$("#table").bootstrapTable('refresh');
|
||
|
|
closeModal("subModal");
|
||
|
|
}else if(data.code == 0){
|
||
|
|
showAlert('d','保存失败');
|
||
|
|
}else{
|
||
|
|
showAlert('d',data.msg);
|
||
|
|
}
|
||
|
|
},'json');
|
||
|
|
closeModal('subModal');
|
||
|
|
}
|
||
|
|
|
||
|
|
$(function () {
|
||
|
|
//填报日期选择
|
||
|
|
$("#rptdt").datetimepicker({
|
||
|
|
language:'zh-CN',
|
||
|
|
format: 'yyyy-mm-dd hh:ii:ss',
|
||
|
|
dateFormat: 'yyyy-mm-dd',//日期显示格式
|
||
|
|
timeFormat: 'HH:mm',//时间显示格式
|
||
|
|
startView: "day", //初始化视图是‘年’
|
||
|
|
minView: 0,
|
||
|
|
maxView: "year",
|
||
|
|
minuteStep: 30,//分钟间隔1分钟
|
||
|
|
autoclose: true
|
||
|
|
}).on('changeDate', function () {
|
||
|
|
$('#subForm')
|
||
|
|
.data('bootstrapValidator')
|
||
|
|
.updateStatus('rptdt', 'NOT_VALIDATED', null)
|
||
|
|
.validateField('rptdt');
|
||
|
|
});
|
||
|
|
})
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<div class="modal fade" id="subModal">
|
||
|
|
<div class="modal-dialog">
|
||
|
|
<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">
|
||
|
|
<!-- 新增界面formid强制为subForm -->
|
||
|
|
<form class="form-horizontal" id="subForm">
|
||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
|
||
|
|
<!-- <input type="hidden" id="bizId" name="bizId" value="${patrolContents.bizId}">
|
||
|
|
<input type="hidden" id="unitId" name="unitId" value="${patrolContents.unitId}">
|
||
|
|
<input type="hidden" id="pid" name="pid" value="${patrolContents.pid}">
|
||
|
|
<input type="hidden" id="patrolContentsType" name="patrolContentsType" value="${patrolContents.patrolContentsType}"> -->
|
||
|
|
|
||
|
|
<input type="hidden" id="id" name="id" value="${rptDayLog.id}">
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-3 control-label">填报时间</label>
|
||
|
|
<div class="col-sm-6">
|
||
|
|
<input type="text" readonly class="form-control" id="rptdt" name ="rptdt" value="${rptDayLog.rptdt.substring(0,19)}">
|
||
|
|
</div>
|
||
|
|
<i class="fa fa-question-circle" aria-hidden="true" title="按Tab键切换光标"></i>
|
||
|
|
</div>
|
||
|
|
<c:forEach items="${rptDayLog.mPointList}" var="item" varStatus="i">
|
||
|
|
|
||
|
|
<c:if test="${(i.index % 2) == 0}"><!-- 单数 -->
|
||
|
|
<div class="form-group">
|
||
|
|
</c:if>
|
||
|
|
<label class="col-sm-3 control-label">${item.parmname}</label>
|
||
|
|
<div class="col-sm-3">
|
||
|
|
<input type="number" readonly class="form-control" id="id${i.index}" name ="name${i.index}" value="${item.parmvalue}">
|
||
|
|
</div>
|
||
|
|
<c:if test="${(i.index % 2) == 1}"><!-- 双数 -->
|
||
|
|
</div>
|
||
|
|
</c:if>
|
||
|
|
<c:if test="${(i.index % 2) == 0&&i.last}"><!-- 单数最后一个 -->
|
||
|
|
</div>
|
||
|
|
</c:if>
|
||
|
|
</c:forEach>
|
||
|
|
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-3 control-label">审批意见</label>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<textarea class="form-control" rows="3" id="memo" name ="memo" placeholder="" <c:if test="${rptDayLog.status!='未提交'}">readonly</c:if>>${rptDayLog.memo}</textarea>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</form>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="modal-footer">
|
||
|
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||
|
|
<c:if test="${rptDayLog.status=='未提交'}">
|
||
|
|
<button type="button" class="btn btn-primary" onclick="dosave('通过')" id="btn_save">通过</button>
|
||
|
|
<button type="button" class="btn btn-primary" onclick="dosave('不通过')" id="btn_save">不通过</button>
|
||
|
|
</c:if>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-content -->
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-dialog -->
|
||
|
|
</div>
|