120 lines
4.9 KiB
Plaintext
120 lines
4.9 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
var showUser4SelectsFun = function () {
|
|||
|
|
var userIds = $("#solver").val();
|
|||
|
|
$.post(ext.contextPath + '/user/userForSelect.do', { formId: "subFormDetail", hiddenId: "userId", textId: "userName", userIds: userIds }, function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal("user4SelectModal");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function dosaveDetail() {
|
|||
|
|
$("#subFormDetail").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subFormDetail").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/process/libraryProcessManageDetail/doupdate.do", $("#subFormDetail").serialize(), function (data) {
|
|||
|
|
// $.post(ext.contextPath + "/process/libraryProcessManageDetail/dosave.do", {projectRole:'角色1'}, function(data) {
|
|||
|
|
if (data.res == 1) {
|
|||
|
|
closeModal('subModalDetail')
|
|||
|
|
$("#table_detail").bootstrapTable('refresh');
|
|||
|
|
} else if (data.res == 0) {
|
|||
|
|
showAlert('d', '保存失败');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', data.res);
|
|||
|
|
}
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subFormDetail").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
mpointcode: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '请选择测量点'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
var selectMPint = function () {
|
|||
|
|
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', { formId: 'subFormDetail', hiddenId: 'measurePointId', textId: 'mpointname', codeId: 'mpointcode' }, function (data) {
|
|||
|
|
$("#mpSubDiv").html(data);
|
|||
|
|
openModal('mpSubModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
$('#selectionMethod').select2({ minimumResultsForSearch: 10 }).val('${libraryProcessManageDetail.selectionMethod}').trigger('change');
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModalDetail">
|
|||
|
|
<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强制为subFormDetail -->
|
|||
|
|
<form class="form-horizontal" id="subFormDetail" autocomplete="off">
|
|||
|
|
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input type="hidden" class="form-control" name="id" value="${libraryProcessManageDetail.id}">
|
|||
|
|
<input type="hidden" class="form-control" name="pid" value="${libraryProcessManageDetail.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="code" name="code" placeholder="指标名称"
|
|||
|
|
value="${libraryProcessManageDetail.code}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*取值方式</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select class="form-control select2" id="selectionMethod" name="selectionMethod" style="width: 170px;">
|
|||
|
|
<option value="" selected="selected">请选择</option>
|
|||
|
|
<option value="first">first</option>
|
|||
|
|
<option value="avg">avg</option>
|
|||
|
|
<option value="sum">sum</option>
|
|||
|
|
<option value="max">max</option>
|
|||
|
|
<option value="top">top</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*测量点编号</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="hidden" class="form-control" id="measurePointId" name="measurePointId"
|
|||
|
|
value="${libraryProcessManageDetail.measurePointId}">
|
|||
|
|
<input type="text" class="form-control" id="mpointcode" name="mpointcode" placeholder="测量点编号"
|
|||
|
|
value="${libraryProcessManageDetail.mPoint.mpointcode}" onclick="selectMPint()">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*测量点名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="mpointname" name="mpointname" placeholder="测量点名称"
|
|||
|
|
value="${libraryProcessManageDetail.mPoint.parmname}" onclick="selectMPint()">
|
|||
|
|
</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="dosaveDetail()">保存</button>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|