160 lines
6.4 KiB
Plaintext
160 lines
6.4 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<style type="text/css">
|
|
.select2-container .select2-selection--single{
|
|
height:34px;
|
|
line-height: 34px;
|
|
}
|
|
.select2-selection__arrow{
|
|
margin-top:3px;
|
|
}
|
|
</style>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
//提交问题
|
|
function dolaunch() {
|
|
$('#status').val('${Status_Launch}');
|
|
dosave();
|
|
}
|
|
//保存问题
|
|
function dosaveProblem() {
|
|
$('#status').val('${Status_Edit}');
|
|
dosave();
|
|
}
|
|
function dosave() {
|
|
|
|
$.post(ext.contextPath + "/command/importantRecords/saveLaunch.do", $("#subForm").serialize(), function(data) {
|
|
if (data.res == 1) {
|
|
|
|
closeModal('subModal')
|
|
|
|
$("#table").bootstrapTable('refresh');
|
|
}else if(data.res == 0){
|
|
showAlert('d','保存失败');
|
|
}else{
|
|
showAlert('d',data.res);
|
|
}
|
|
},'json');
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
|
console.log(data);
|
|
var selelct =$("#bizid").select2({
|
|
data: data,
|
|
placeholder:'请选择',//默认文字提示
|
|
allowClear: false,//允许清空
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|
language: "zh-CN",
|
|
minimumInputLength: 0,
|
|
minimumResultsForSearch: -1,//禁用搜索框
|
|
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");
|
|
$("#bizid").next().css("display", "none");
|
|
selelct.attr("disabled","disabled");
|
|
var companyText = $("#bizid").text();
|
|
console.info(companyText);
|
|
$("#company").text(companyText);
|
|
$("#companylabel").html("厂区:");
|
|
|
|
}else{
|
|
selelct.val("").trigger("change");
|
|
//$("#company").css("display", "none");
|
|
|
|
};
|
|
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
|
},'json');
|
|
|
|
|
|
})
|
|
</script>
|
|
<div class="modal fade" id="subModal">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
|
|
|
|
<h4 class="modal-title">新增问题</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<!-- 新增界面formid强制为subForm -->
|
|
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|
<div id="alertDiv"></div>
|
|
<input type="hidden" class="form-control" name ="id" value="${id}">
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-2">*所在厂区</label>
|
|
<div class="col-sm-4">
|
|
<!-- <select class="form-control select2" id="companyid" name ="companyid" ></select>
|
|
<span class="form-control" id="company" ></span>
|
|
<input class="form-control" type="hidden" id="companyname" name ="companyid" > -->
|
|
|
|
<select class="form-control select2 " id="bizid" name ="bizid"></select>
|
|
<span class="select2-selection select2-selection--single" id="company"></span>
|
|
|
|
</div>
|
|
|
|
|
|
<label class="col-sm-2 control-label">启动预案人</label>
|
|
<div class="col-sm-4">
|
|
<input type="text" class="form-control" id="reportperson" name ="reportperson" placeholder="启动预案人" value="${importantRecords.reportperson}">
|
|
</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="firstmenu" name ="firstmenu" placeholder="异常大类" value="${importantRecords.firstmenu}">
|
|
</div>
|
|
|
|
<label class="col-sm-2 control-label">异常类型</label>
|
|
<div class="col-sm-4">
|
|
<input type="text" class="form-control" id="secondmenu" name ="secondmenu" placeholder="异常类型" value="${importantRecords.secondmenu}">
|
|
</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="thirdmenu" name ="thirdmenu" placeholder="触发条件" value="${importantRecords.thirdmenu}">
|
|
</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="operationstandard" name ="operationstandard" placeholder="操作标准" value="${importantRecords.operationstandard}">
|
|
</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="remarks" name ="remarks" placeholder="备注" value="${importantRecords.remarks}">
|
|
</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="dosaveProblem()" >保存</button>
|
|
<button type="button" class="btn btn-primary" onclick="dolaunch()" >提交</button>
|
|
</div>
|
|
</div>
|
|
<!-- /.modal-content -->
|
|
</div>
|
|
<!-- /.modal-dialog -->
|
|
</div>
|