first commit
This commit is contained in:
97
WebRoot/jsp/sparepart/subscribeSendMessage.jsp
Normal file
97
WebRoot/jsp/sparepart/subscribeSendMessage.jsp
Normal file
@ -0,0 +1,97 @@
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%request.setAttribute("DEPARTMENT", SparePartCommString.PURCHASE_DEPARTMENT); %>
|
||||
<%request.setAttribute("START", SparePartCommString.STATUS_START); %>
|
||||
<%request.setAttribute("DEPT_AUDIT", SparePartCommString.STATUS_DEPT_AUDIT); %>
|
||||
<%request.setAttribute("PERSONAL_AUDIT", SparePartCommString.STATUS_PERSONAL_AUDIT); %>
|
||||
|
||||
<%request.setAttribute("department", SparePartCommString.department); %>
|
||||
<%request.setAttribute("personal", SparePartCommString.personal); %>
|
||||
<%request.setAttribute("temporary", SparePartCommString.temporary); %>
|
||||
<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">
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${subscribe.id}';//业务Id
|
||||
var status = 'delete';//有删除权限
|
||||
var type = "";
|
||||
//提交时先验证审核人不能为空,保存时审核人可以为空
|
||||
function sendFun(){
|
||||
$("#sendMessageSubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#sendMessageSubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/sparepart/subscribe/sendMessageO.do", $("#sendMessageSubForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('sendMessageSubModal');
|
||||
} else {
|
||||
showAlert('d', '通知失败!请通知管理员!');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('sendMessageSubModal');
|
||||
}
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#sendManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"sendMessageSubForm",hiddenId:"sendManId",textId:"sendMan",userIds:userIds} , function(data) {
|
||||
$("#sendUser4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
$("#sendMessageSubForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
sendMan: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '通知人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="sendMessageSubModal">
|
||||
<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="sendMessageSubForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></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="sendMan" name ="sendMan" placeholder="点击选择" onclick="showUser4SelectsFun();">
|
||||
<input id="sendManId" name="sendManId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="closeModel()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="sendFun()" id="btn_submit">通知</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user