200 lines
7.6 KiB
Plaintext
200 lines
7.6 KiB
Plaintext
<%@ 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/fmt" prefix="fmt" %>
|
|
<style type="text/css">
|
|
.select2-container .select2-selection--single {
|
|
height: 34px;
|
|
line-height: 34px;
|
|
}
|
|
|
|
.select2-selection__arrow {
|
|
margin-top: 3px;
|
|
}
|
|
.control-label-overflow{
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
function dosave() {
|
|
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="未提交";
|
|
|
|
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 show(event,lastvalue,Unit,NumTail){
|
|
var data_text="当前值:"+lastvalue+"<br/>单位:"+Unit+"<br/>小数位:"+NumTail;
|
|
var showbox=$('<div>'+data_text+'</div>').css({
|
|
width:'135px',
|
|
padding:'2px 5px',
|
|
position:'absolute',
|
|
top:-12,
|
|
left:140,
|
|
color:'#000000',
|
|
border:'1px solid #000000',
|
|
borderRadius:'5px',
|
|
background: '#ffffe0',
|
|
'z-index':9999
|
|
}).addClass("showbox");
|
|
|
|
showbox.insertAfter(event);
|
|
}
|
|
//隐藏悬浮层
|
|
function hide(event){
|
|
$(".showbox").remove();
|
|
}
|
|
|
|
//初始化选择框
|
|
var refreshActiveSelect = function() {
|
|
var jsonStr = '${rptDayLog}';
|
|
var jsonObject= jQuery.parseJSON(jsonStr);
|
|
|
|
for(var i in jsonObject.mPointList){
|
|
|
|
if (jsonObject.mPointList[i].valuemeaningFlag) {
|
|
var select = $("#id"+i).select2({
|
|
theme: "classic",
|
|
data: null,
|
|
placeholder:'请选择',//默认文字提示
|
|
allowClear: false,//允许清空
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|
language: "zh-CN",
|
|
minimumInputLength: 0,
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
|
});
|
|
select.val(jsonObject.mPointList[i].parmvalue).trigger("change");
|
|
}
|
|
|
|
}
|
|
};
|
|
|
|
</script>
|
|
<div class="modal fade" id="subModal">
|
|
<div class="modal-dialog modal-lg">
|
|
<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-3">
|
|
<p class="form-control-static">${rptDayLog.rptdt}</p>
|
|
</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>
|
|
<c:if test="${!item.valuemeaningFlag}"><!-- 填值 -->
|
|
<label class="col-sm-3 control-label control-label-overflow" title="${item.parmname}">
|
|
${item.parmname}
|
|
<c:if test="${item.explain!=''}">
|
|
<i class="fa fa-question-circle" aria-hidden="true" title="${item.explain}"></i>
|
|
</c:if>
|
|
</label>
|
|
<div class="col-sm-2">
|
|
<fmt:formatNumber type="number" var="parmvalue" value="${item.parmvalue}" groupingUsed="false" maxFractionDigits="${item.NumTail}"/>
|
|
<p class="form-control-static">${parmvalue}</p>
|
|
</div>
|
|
<label class="col-sm-1 control-label"
|
|
style="text-align:left;padding-left: 0px;">${item.Unit}</label>
|
|
</c:if>
|
|
<c:if test="${item.valuemeaningFlag}"><!-- 选择 -->
|
|
<label class="col-sm-3 control-label control-label-overflow" title="${item.parmname}">
|
|
${item.parmname}
|
|
<c:if test="${item.explain!=''}">
|
|
<i class="fa fa-question-circle" aria-hidden="true" title="${item.explain}"></i>
|
|
</c:if>
|
|
</label>
|
|
<div class="col-sm-3">
|
|
<c:if test="${item.parmvalue!=null}">
|
|
<fmt:formatNumber value="${item.parmvalue}" pattern="#" var="parmvalue"></fmt:formatNumber>
|
|
<c:forEach items="${item.valuemeaningArray}" var="valuemeaningItem" varStatus="i1">
|
|
<c:if test="${parmvalue==valuemeaningItem.zhi}">
|
|
<p class="form-control-static">${valuemeaningItem.mingcheng}</p></c:if>
|
|
</c:forEach>
|
|
</c:if>
|
|
</div>
|
|
</c:if>
|
|
<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">
|
|
<p class="form-control-static">${rptDayLog.others}</p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">备注</label>
|
|
<div class="col-sm-9">
|
|
<p class="form-control-static">${rptDayLog.memo}</p>
|
|
</div>
|
|
</div>
|
|
<c:if test="${rptDayLog.reviewComments!=null && rptDayLog.reviewComments!=''}">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">审批意见</label>
|
|
<div class="col-sm-9">
|
|
<p class="form-control-static">${rptDayLog.reviewComments}</p>
|
|
</div>
|
|
</div>
|
|
</c:if>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|
</div>
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div> |