95 lines
3.5 KiB
Plaintext
95 lines
3.5 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
|
|
<!-- <html lang="zh-CN"> -->
|
||
|
|
<!-- BEGIN HEAD -->
|
||
|
|
<script type="text/javascript">
|
||
|
|
function dosave() {
|
||
|
|
$.post(ext.contextPath + '/msg/saveMsgYM.do', $("#subForm").serialize(), function (data) {
|
||
|
|
if (data.res == "发送成功" || data.res == "消息发送成功") {
|
||
|
|
console.log(data.res);
|
||
|
|
$("#table").bootstrapTable('refresh');
|
||
|
|
closeModal('msgAddModal');
|
||
|
|
|
||
|
|
} else {
|
||
|
|
showAlert('d', data.res);
|
||
|
|
}
|
||
|
|
}, 'json');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
var showUser4SelectsFun = function () {
|
||
|
|
var userIds = $("#recvid").val();
|
||
|
|
$.post(ext.contextPath + '/user/userForSelect.do', { formId: "subForm", hiddenId: "recvid", textId: "recvname", userIds: userIds }, function (data) {
|
||
|
|
$("#user4SelectDiv").html(data);
|
||
|
|
openModal("user4SelectModal");
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var showMsgType4SelectsFun = function () {
|
||
|
|
//var userIds = $("#recvid").val();
|
||
|
|
$.post(ext.contextPath + '/msg/msgTypeForSelect.do', { formId: "subForm", hiddenId: "mtype", textId: "mtypename" }, function (data) {
|
||
|
|
$("#msgType4SelectDiv").html(data);
|
||
|
|
openModal("msgType4SelectModal");
|
||
|
|
});
|
||
|
|
};
|
||
|
|
$(function () {
|
||
|
|
/*$("#sendway").select2({ minimumResultsForSe arch: -1 });
|
||
|
|
fixSelect2ToTool('sendway');*/
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<div class="modal fade" id="msgAddModal">
|
||
|
|
<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">
|
||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">消息类型</label>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<input type="text" class="form-control" id="mtypename" name="mtypename" placeholder="消息类型"
|
||
|
|
value="" onclick="showMsgType4SelectsFun();">
|
||
|
|
<input id="mtype" name="mtype" type="hidden" value="P" />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">接收人</label>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<input type="text" class="form-control" id="recvname" name="recvname" placeholder="接收人"
|
||
|
|
value="" onclick="showUser4SelectsFun();">
|
||
|
|
<input id="recvid" name="recvid" type="hidden" />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">内容</label>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<textarea type="text" class="form-control" id="content" name="content" placeholder="内容"
|
||
|
|
row="15" style="height:300px;"></textarea>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<!--<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">发送方式</label>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<select class="form-control select2 " id="sendway" name="sendway" style="width: 220px;">
|
||
|
|
<option value="msg">仅消息发送</option>
|
||
|
|
<option value="sms">仅短信发送</option>
|
||
|
|
<option value="both" selected>消息+短信发送</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()">发送</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-content -->
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-dialog -->
|
||
|
|
</div>
|