101 lines
4.1 KiB
Plaintext
101 lines
4.1 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@page import="com.sipai.tools.CommString" %>
|
||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||
<style type="text/css">
|
||
|
||
</style>
|
||
<script type="text/javascript">
|
||
|
||
function dosaveContent() {
|
||
$("#subFormContent").bootstrapValidator('validate');//提交验证
|
||
if ($("#subFormContent").data('bootstrapValidator').isValid()) {
|
||
//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/process/processAdjustmentContent/dosave.do", $("#subFormContent").serialize(), function (data) {
|
||
if (data.res == 1) {
|
||
$("#table_content").bootstrapTable('refresh');
|
||
closeModal("detailModal");
|
||
} else if (data.res == 0) {
|
||
showAlert('d', '保存失败');
|
||
} else {
|
||
showAlert('d', data.res);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}
|
||
|
||
$("#subFormContent").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
proName: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '调整名称不能为空'
|
||
}
|
||
}
|
||
},
|
||
receiveRatedTime: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '定额工时不能为空'
|
||
}
|
||
}
|
||
},
|
||
proMeasures: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '调整措施不能为空'
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
</script>
|
||
<div class="modal fade" id="detailModal">
|
||
<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强制为subFormContent -->
|
||
<form class="form-horizontal" id="subFormContent" autocomplete="off">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
<input type="hidden" name="pid" id="pid" value="${param.entityId}"/>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*调整名称</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="proName" name="proName" value=""
|
||
>
|
||
</div>
|
||
<label class="col-sm-2 control-label">*定额工时</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="receiveRatedTime" name="receiveRatedTime" value=""
|
||
>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*调整措施</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" id="proMeasures" name="proMeasures"
|
||
placeholder="调整措施"></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="dosaveContent()" id="btn_save">保存</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |