first commit
This commit is contained in:
113
src/main/webapp/jsp/process/decisionExpertBaseAdd.jsp
Normal file
113
src/main/webapp/jsp/process/decisionExpertBaseAdd.jsp
Normal file
@ -0,0 +1,113 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DecisionExpertBase" %>
|
||||
<%request.setAttribute("Type_structure", DecisionExpertBase.Type_structure); %>
|
||||
<%request.setAttribute("Type_content", DecisionExpertBase.Type_content); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#type').select2({minimumResultsForSearch: 10}).val('${decisionExpertBase.type}').trigger('change');
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/decisionExpertBase/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#subForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">新增</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="unitid" id="unitid" value="${param.unitId}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${param.pid}"/>
|
||||
|
||||
<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" placeholder="名称"
|
||||
value="${decisionExpertBase.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2">
|
||||
<option value="${Type_structure}">结构</option>
|
||||
<option value="${Type_content}">内容</option>
|
||||
</select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${decisionExpertBase.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
||||
value="${decisionExpertBase.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">主要作用</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" style="height: 80px;" class="form-control" id="mainrole"
|
||||
name="mainrole" placeholder="主要作用">${decisionExpertBase.mainrole}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user