You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

209 lines
6.3 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="org.wdk.WDKConstant"%>
<%@ page import="org.wdk.WDKCore"%>
<%@ page import="org.wdk.WDK"%>
<%@ page
import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
String WDK_ROOT = WDKCore.WDK_ROOT;
SessionUser su = (SessionUser) WDK.getSessionUser(request, response);
WDK.writeSessionUser(out, su);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<title>私信发送</title>
<base href="<%=basePath%>" target="_self">
<script type="text/javascript"
src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
<script type="text/javascript">
var param = $.getURLParam('param');
var _wid = $.getURLParam('wid');
var jparam = $.str2json($.urlparam_decode(param));
/* var _actionflag = jparam.queryParams.actionflag; //操作类型 add-新增 update-修改,读取原信息
var _account_uuid = jparam.queryParams.account_uuid; */
$(function() {
//不可输入空格键:
$(".nospaceinside").on("keypress", removeAllBlank);
function removeAllBlank(e) {
if (e.keyCode == 32) {
e.preventDefault();
}
}
init_user_uuid();
});
function init_user_uuid() {
$.inputpop({
id:'user_uuid',
height:450,
width:750,
required:false,
editable:false,
url:'products/imp/pub/mds/persontree.jsp',
initvalue:'', //code
inittext:'', //name
initid:'', //uuid
transfer:'1',
queryParams:{
manage_unit_uuid:$.getSessionUser().manageunituuid, //管理单元标识
person_uuid:$.getSessionUser().account_id, //操作人员标识
persontype:'', //人员类型,全部
orgattr:'00', //组织属性,行政组织
orguuids:'', //人员所属组织标识串
isctrlperm:'1', //是否控制权限
ismulselect:'0', //是否多选
asyn:'1' //是否异步加载,1异步,0同步
},
onBeforeOpen:'',
missingMessage:'',
tipPosition:'bottom',
callback:'select_callback'
});
}
/**选择人员后的操作*/
function select_callback(jdata){
//控件选择返回
//alert($.json2str(jdata));
}
//发送私信
function opt_send() {
//验证
var user_uuid = $.inputpop_getValue({id:'user_uuid'});
var content = $.trim($('#content').val());
if (user_uuid == '') {
alert('请选择收信人!');
return false;
}
if (content.trim() == '') {
alert('请填写内容!');
return false;
}
$.wait_open();
$.cuajax({
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='
+ new Date().getTime(),
method : "post",
timeout : WDK_Timeout,
data : {
_SRVNAME : 'service.pf.sysmsg',
_SRVMETHOD : 'createPrivateMsg',
_DATA : $.json2str({
user_info : {
account_id : $.getSessionUser().account_id,
manageunituuid : $.getSessionUser().manageunituuid,
personuuid : $.getSessionUser().personuuid,
personname : $.getSessionUser().personname,
},
msg_info : {
msg_title : $('#msg_title').val(),
content : content,
receiver_uuid : user_uuid,
receiver_name : $.inputpop_getValues({id:'user_uuid'}).value_text,
manage_unit_uuid:$.getSessionUser().manageunituuid,
sender_uuid:$.getSessionUser().personuuid,
sender_name:$.getSessionUser().personname,
}
})
},
success : function(result) {
$.wait_close();
//返回值字符串转json
var jres = $.str2json(result);
if (jres.code == "1") { //操作成功
alert(jres.desc);
opt_close({receiver_uuid:$.inputpop_getValue({id:'user_uuid'})});
//$.closeWin();
} else {
alert(jres.desc);
}
},
error : function(result) {
$.wait_close();
alert('网络错误!result=' + result);
}
});
}
//关闭窗口
function opt_close(v) {
var wid = $.getURLParam("wid");
$.setWinReturn(wid,v);
$.closeWin(wid);
}
</script>
</head>
<body class="easyui-layout win" data-options="fit:true">
<div data-options="region:'north',border:false,collapsed:false"
class="page-title" style="height: 50px; line-height: 35px;">
<div class="page-toolbar">
<a href="javascript:void(0);" class="easyui-linkbutton"
data-options="iconCls:'fa fa-save'" onclick="opt_send()">发送</a> <a
href="javascript:void(0);" class="easyui-linkbutton"
data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
</div>
</div>
<div data-options="region:'center',border:false,collapsed:false">
<div class="edit-container-win1">
<form id="add_form">
<input type="hidden" id="account_uuid"> <input type="hidden"
id="depart_uuid">
<div class="row">
<div class="formgroup col-12">
<label class="required">收信人</label>
<div>
<input type="text"
class="easyui-validatebox nospaceinside nospaceinside"
id="user_uuid" name="user_uuid" value=""
data-options="required:true,tipPosition:'bottom'" />
</div>
</div>
</div>
<input type="hidden" id="msg_title" name="msg_title" value="" />
<!-- div class="row">
<div class="formgroup col-12">
<label >标题</label>
<div>
<input type="text" class="easyui-validatebox nospaceinside"
id="msg_title" name="msg_title" value="" />
</div>
</div>
</div> -->
<div class="row">
<div class="formgroup col-12">
<label class="required">内容</label>
<div>
<textarea class="form-control" rows="15" id="content" name="content" style="height:300px;"></textarea>
<!-- <input type="textarea" class="easyui-validatebox nospaceinside"
id="content" name="content" value=""
data-options="required:true,tipPosition:'bottom'" /> -->
</div>
</div>
</div>
</form>
</div>
</div>
</body>
</html>