first commit
This commit is contained in:
155
WebRoot/jsp/msg/msgMobileAdd.jsp
Normal file
155
WebRoot/jsp/msg/msgMobileAdd.jsp
Normal file
@ -0,0 +1,155 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$.post(ext.contextPath + '/msg/saveMsgYMMobile.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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入常用联系人
|
||||
*/
|
||||
function doImportUser() {
|
||||
$.post(ext.contextPath + '/msg/frequentContacts/getListJson.do', $("#subForm").serialize(), function (data) {
|
||||
var obj_1 = data;
|
||||
var userId = '';
|
||||
var userName = '';
|
||||
var mobile = '';
|
||||
|
||||
for (var i in data) {
|
||||
userId += obj_1[i].userId + ",";
|
||||
userName += obj_1[i].userName + ",";
|
||||
if (obj_1[i].mobile != null && obj_1[i].mobile != '') {
|
||||
mobile += obj_1[i].mobile + ",";
|
||||
} else {
|
||||
mobile += "未配置" + ",";
|
||||
}
|
||||
}
|
||||
|
||||
$('#recvid').val(userId);
|
||||
$('#recvname').val(userName);
|
||||
$('#recvmobile').val(mobile);
|
||||
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
//根据人员id刷新页面手机号码
|
||||
var upuserFun = function () {
|
||||
var userIds = $('#recvid').val();
|
||||
$.get(ext.contextPath + '/user/getMobile4UserIds.do', {
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$('#recvmobile').val(data);
|
||||
});
|
||||
}
|
||||
|
||||
//选择人员通用页面
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#recvid").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "recvid",
|
||||
textId: "recvname",
|
||||
userIds: userIds,
|
||||
fucname: 'upuserFun'
|
||||
}, 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');*/
|
||||
$('#unitId').val(unitId);
|
||||
})
|
||||
</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>
|
||||
<input id="unitId" name="unitId" type="hidden" value="">
|
||||
<%--<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">
|
||||
<input type="text" class="form-control" id="recvmobile" name="recvmobile"
|
||||
placeholder="选择接收人员后自动填充"
|
||||
value="" readonly>
|
||||
</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" selected>仅短信发送</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-default pull-left" onclick="doImportUser()">导入常用联系人</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">发送</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user