first commit
This commit is contained in:
96
WebRoot/jsp/report/customReportMPointEdit.jsp
Normal file
96
WebRoot/jsp/report/customReportMPointEdit.jsp
Normal file
@ -0,0 +1,96 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
var selectMPint = function(pid) {
|
||||
$.post(ext.contextPath + '/work/mpoint/showlistForSelect.do', {formId:'subForm',hiddenId:'mpid',codeId:'mpcode',unitId:'unitId',textId:'txt',valueId :'value',mpid:$("#mpid").val()} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/report/customReportMPoint/update.do", $("#subForm").serialize(), function(result) {
|
||||
// var data= $.parseJSON(result);
|
||||
if (result.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#box").show();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else{
|
||||
showAlert('d',result.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
mpid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '测量点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<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强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${customReportMPoint.id}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${customReportMPoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" >
|
||||
<input type="text" class="form-control" id="mpid" name ="mpointId" onclick="selectMPint('${param.pid}')" placeholder="单击选择" value="${customReportMPoint.mpointId}" readonly>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" value="${customReportMPoint.morder}">
|
||||
</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" id="eName" name ="eName" placeholder="别名" value="${customReportMPoint.eName}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unitText" name ="unitText" placeholder="单位" value="${customReportMPoint.unitText}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user