134 lines
6.4 KiB
Plaintext
134 lines
6.4 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<% request.setAttribute("Maintain_Week", com.sipai.entity.maintenance.MaintainCommStr.Maintain_Week); %>
|
|||
|
|
<% request.setAttribute("Maintain_TenDays", com.sipai.entity.maintenance.MaintainCommStr.Maintain_TenDays); %>
|
|||
|
|
<% request.setAttribute("Maintain_Month", com.sipai.entity.maintenance.MaintainCommStr.Maintain_Month); %>
|
|||
|
|
<% request.setAttribute("Maintain_Quarter", com.sipai.entity.maintenance.MaintainCommStr.Maintain_Quarter); %>
|
|||
|
|
<% request.setAttribute("Maintain_HalfYear", com.sipai.entity.maintenance.MaintainCommStr.Maintain_HalfYear); %>
|
|||
|
|
<% request.setAttribute("Maintain_Year", com.sipai.entity.maintenance.MaintainCommStr.Maintain_Year); %>
|
|||
|
|
|
|||
|
|
<% request.setAttribute("Maintain_IN", com.sipai.entity.maintenance.MaintainCommStr.Maintain_IN); %>
|
|||
|
|
<% request.setAttribute("Maintain_OUT", com.sipai.entity.maintenance.MaintainCommStr.Maintain_OUT); %>
|
|||
|
|
|
|||
|
|
<!-- bootstrap switch -->
|
|||
|
|
<link rel="stylesheet"
|
|||
|
|
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
|
|||
|
|
<script type="text/javascript"
|
|||
|
|
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
|||
|
|
charset="utf-8"></script>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
function dosave() {
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/user/processSection/save.do", $("#subForm").serialize(), function(data) {
|
|||
|
|
if (data.res == 1) {
|
|||
|
|
closeModal('subDivLibrary');
|
|||
|
|
$("#table_Library").bootstrapTable('refresh');
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
name: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sname: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '简称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
code: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '编号不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$(function () {
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subDivLibrary">
|
|||
|
|
<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强制为subForm -->
|
|||
|
|
<form class="form-horizontal" id="subForm" autocomplete="off">
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input id ="id" name="id" type="hidden" value="${processSection.id}"/>
|
|||
|
|
<input id ="unitId" name="unitId" type="hidden" value="sys"/>
|
|||
|
|
<!-- 界面提醒div强制id为alertdiv -->
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*名称</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${processSection.name}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*简称</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="sname" name ="sname" placeholder="名称" value="${processSection.sname}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*编号</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="code" name ="code" placeholder="编号" value="${processSection.code}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<%--<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">所属工艺类型</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<select class="form-control select2" id="processSectionTypeId" name ="processSectionTypeId" style="width: 220px;">
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>--%>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">顺序</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" style="width: 220px;" value="${processSection.morder}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">启用状态</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<select class="form-control select2 " id="active" name ="active" style="width: 220px;">
|
|||
|
|
<option value="true" >启用</option>
|
|||
|
|
<option value="false" >停用</option>
|
|||
|
|
</select>
|
|||
|
|
</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>
|