first commit
This commit is contained in:
169
WebRoot/jsp/achievement/acceptanceModel_OutputAdd.jsp
Normal file
169
WebRoot/jsp/achievement/acceptanceModel_OutputAdd.jsp
Normal file
@ -0,0 +1,169 @@
|
||||
<%@ 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() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/showlistForSelect.do', {formId:'subForm1',hiddenId:'mpointId',textId:'mpointName'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
var selectBase = function() {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/showTree4Select.do', {formId:'subForm1',hiddenId:'baseId',textId:'name'} , function(data) {
|
||||
$("#mpSubDiv1").html(data);
|
||||
openModal('modelLibrary4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function dosave() {
|
||||
// $('#subForm1').data('bootstrapValidator')
|
||||
// .updateStatus('mpointId', 'NOT_VALIDATED',null)
|
||||
// .validateField('mpointId');
|
||||
// $("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/check.do", $("#subForm1").serialize()+"&unitId="+unitId, function(data) {
|
||||
if (data.code == 1) {
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/dosave.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table_output").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','指标重复');
|
||||
|
||||
}
|
||||
},'json');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// $("#subForm1").bootstrapValidator({
|
||||
// live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
// fields: {
|
||||
// mpointId: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '测量点不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// $.post(ext.contextPath + "/achievement/acceptanceModelMPoint/getValueTypeJson.do", {}, function(data) {
|
||||
// var selelct =$("#valueType").select2({
|
||||
// data: data,
|
||||
// placeholder:'请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
// formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
// });
|
||||
|
||||
// if(data.length>=1){
|
||||
// selelct.val(data[0].id).trigger("change");
|
||||
|
||||
// }else{
|
||||
// selelct.val(data[0].id).trigger("change");
|
||||
// }
|
||||
// },'json');
|
||||
</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="subForm1">
|
||||
<input type="hidden" class="form-control" id="acceptanceModelId" name="acceptanceModelId" value="${param.id}">
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" onclick="selectBase()" value="${acceptanceModelOutput.name}" placeholder="单击选择" readonly>
|
||||
</div>
|
||||
<input type="hidden" id="baseId" name="baseId" value="${acceptanceModelOutput.baseId}">
|
||||
</div>
|
||||
|
||||
|
||||
<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="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${acceptanceModelOutput.mpointId}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointName" name="mpointName" value="${acceptanceModelOutput.mpointName}" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelOutput.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelOutput.posY}">
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelOutput.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelOutput.morder}">
|
||||
</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="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user