| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title>消息管理</title>
- <style>
- .ui-button {
- display: inline-block;
- padding: 2px 2px;
- margin-bottom: 0;
- font-size: 8px;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
- }
- div.ueshow{
- width:800px;
- margin:0 auto;
- word-break:break-all;
- border:1px solid #cccccc;
- }
- .select_div{
- display:none;
- }
- </style>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script src = "webpage/cn/com/lzt/message/mMessage.js?v=1"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('#tt').tabs({
- onSelect:function(title){
- $('#tt .panel-body').css('width','auto');
- }
- });
- $(".tabs-wrap").css('width','100%');
- if(location.href.indexOf("returnBack=1")!=-1){
- $("#tdbtn").show();
- }
- $('input[name="noticeType"]').on('change',function(){
- $('#templateAutoIncrement').html('');
- });
- //发送方式默认
- $('input[name="sendWay"][value="site"]').attr('checked','checked');
- //通知类型默认
- //$('input[name="noticeType"][value="meeting"]').attr('checked','checked');
- <%--$('#select_div_${mMessagePage.sendScope}').show();--%>
- $('#select_div_${mMessagePage.sendScope}').find('input').val('${mMessagePage.sendScopeNames}');
- $('#sendScope').on('change',function(){
- var $this = $(this);
- var option = $this.find(':selected');
- var val = option.val();
- $('.select_div').hide();
- $('.select_div input').removeAttr('datatype');
- $('#select_div_'+val).show();
- $('#select_div_'+val).find('input').attr('datatype','*')
- });
- $('#sendScope').change();
- $('input:radio[name="sendTimeType"]').on('click',function(){
- var t = $(this);
- if(t.val()=='1'){
- $('#planSendTime').attr('datatype','*');
- $('#planSendTime').show();
- }else {
- $('#planSendTime').removeAttr('datatype');
- $('#planSendTime').hide();
- }
- });
- var sendTimeType = $('input:radio[name="sendTimeType"]:checked');
- if(sendTimeType.val()=='1'){
- $('#planSendTime').show();
- }
- });
- function btn_ok(){
- $("#btnsub").click();
- tip("已保存,请重新提交审批");
- }
- var edialog = $.dialog;
- top._loadPreviewmsg=function(iframe){
- $(iframe).contents().find('body').html(top._previewhtml);
- top.$('#previewIframe').parent().width('460');
- top.$('#previewIframe').parent().height(window.top.document.body.offsetHeight-100);
- }
- function preview(){
- var text = text_editor.getContent();
- var data={}
- data.text = text;
- $('#templateVariableInfo input').each(function(){
- var t = $(this);
- data[t.attr('name')]=t.val()
- })
- data.title=$('#title').val();
- data.noticeType = $('input[name="noticeType"]:checked').val();
- data.id=$('#id').val();
- $.ajax({
- type:"POST",
- url:"mMessageController.do?preview&previewIframe=1",
- data: data ,
- async: false,
- cache: false,
- success: function (msg) {
- top._previewhtml=msg;
- var content = $('<iframe id="previewIframe" name="previewIframe" width="100%" height="100%" frameborder="0" scrolling="yes" onload="_loadPreviewmsg(this)"></iframe>');
- $.dialog({
- content: content,
- lock : true,
- zIndex: 999999,
- width:'460',
- height:'100%',
- title:'预览',
- opacity : 0.3,
- cache:false,
- cancelVal: '关闭',
- cancel: true /*为true等价于function(){}*/
- ,top:0
- });
- },
- error:function(XMLHttpRequest, textStatus, errorThrown){
- $.messager.alert('错误','预览失败');
- }
- });
- }
- </script>
- </head>
- <body style="overflow-x: hidden;">
- <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="mMessageController.do?doAdd" >
- <input id="id" name="id" type="hidden" value="${mMessagePage.id }"/>
- <input id="isSend" name="isSend" type="hidden" value="${empty mMessagePage.isSend?0: mMessagePage.isSend}"/>
- <c:set var="_messageType" value="${empty mMessagePage.messageType?param.messageType:mMessagePage.messageType}"/>
- <input id="messageType" name="messageType" type="hidden" value="${_messageType}"/>
- <input id="send_scope_ids" name="sendScopeIds" type="hidden" value="${mMessagePage.sendScopeIds}"/>
- <input id="send_scope_names" name="sendScopeNames" type="hidden" value="${mMessagePage.sendScopeNames}"/>
- <input id="fileIndex" name="fileIndex" type="hidden" value="${mMessagePage.fileIndex}"/>
- <table cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right">
- <label class="Validform_label">标题:</label>
- </td>
- <td class="value">
- <input id="title" name="title" type="text" style="width: 150px" class="inputxt" datatype="*" value="${mMessagePage.title }"/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">标题</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">发送范围:</label>
- </td>
- <td class="value">
- <t:dictSelect field="sendScope" id="sendScope" type="list" typeGroupCode="message_send_scope" datatype="*" defaultVal="${mMessagePage.sendScope}" hasLabel="false" title="发送范围"></t:dictSelect>
- <label class="Validform_label" style="display: none;">发送范围</label>
- <span id="send_scope_select_div">
- <span id="select_div_role" class="select_div">
- <input readonly="readonly" type="text" id="rolename" value="" style="width: 150px" placeholder="请选择接收角色" nullmsg="请选择接收角色" >
- <c:if test="${empty param.load}">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="roleSearch" onclick="openRoleSelect()">选择</a>
- <%--<a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="roleRedo" onclick="cleanRoleSelect()">清空</a>--%>
- </c:if>
- </span>
- <span id="select_div_dep" class="select_div">
- <input type="text" id="departname" readonly="readonly" class="inputxt" style="width: 150px" placeholder="请选择接收部门" nullmsg="请选择接收部门" >
- <span class="Validform_checktip"></span>
- <c:if test="${empty param.load}">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
- </c:if>
- </span>
- <span id="select_div_user_group" class="select_div">
- <input type="text" id="regularGroupName" readonly="readonly" class="inputxt" style="width: 150px" placeholder="请选择接收用户组" nullmsg="请选择接收用户组" >
- <c:if test="${empty param.load}">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="roleSearch" onclick="openRegularSelect()">选择</a>
- </c:if>
- <label class="Validform_label" style="display: none;">用户组</label>
- </span>
- <span id="select_div_user" class="select_div">
- <input readonly="readonly" type="text" id="realname" value="" style="width: 150px" placeholder="请选择接收用户" nullmsg="请选择接收用户" >
- <span class="Validform_checktip"></span>
- <c:if test="${empty param.load}">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openPersonnelSelect()">选择</a>
- </c:if>
- <label class="Validform_label" style="display: none;">用户</label>
- </span>
- </span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">发送方式:</label>
- </td>
- <td class="value">
- <t:dictSelect field="sendWay" type="checkbox" typeGroupCode="message_send_way" defaultVal="${mMessagePage.sendWay}" hasLabel="false" title="发送方式" datatype="*"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">发送方式</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">发送时间类型:</label>
- </td>
- <td class="value">
- <t:dictSelect field="sendTimeType" type="radio" datatype="n" typeGroupCode="message_send_time_type" defaultVal="${empty mMessagePage.sendTimeType?0:mMessagePage.sendTimeType}" hasLabel="false" title="发送时间类型" ></t:dictSelect>
- <input id="planSendTime" name="planSendTime" type="text" style="width: 150px;display:none" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
- value="${mMessagePage.planSendTime}" nullmsg="请选择发送时间" readonly />
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">发送时间类型</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">通知类型:</label>
- </td>
- <td class="value">
- <t:dictSelect field="noticeType" type="radio" datatype="*" typeGroupCode="message_notice_type" defaultVal="${empty mMessagePage.noticeType?'meeting':mMessagePage.noticeType}" hasLabel="false" title="通知类型" ></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">通知类型</label>
- </td>
- </tr>
- <%--<c:if test="${param.audit==1}"><%–审批中–%>
- <tr>
- <td class="value" align="right">
- <label class="Validform_label">附件:</label>
- </td>
- <td class="value" align="left">
- <a href="javascript:void(0)" class="easyui-linkbutton l-btn" iconcls="icon-detail" onclick="showfile()"> 查看消息附件 </a>
- </td>
- </tr>
- </c:if>--%>
- <tr>
- <td align="right">
- <label class="Validform_label">附件:</label>
- </td>
- <td class="value">
- <t:webUploader auto="true" busiId="${mMessagePage.id}" readOnly="${param.load=='detail' || in_process}"
- busiTable="m_message"
- bizType="mmessage"
- name="attachment" duplicate="true" fileNumLimit="10"
- nullMsg="附件不可为空"></t:webUploader>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">附件</label>
- </td>
- </tr>
- <c:if test="${_messageType =='template' && param.load!='detail'}">
- <input id="templateId" name="templateId" type="hidden" value="${mMessagePage.templateId}"/>
- <input id="templateName" name="templateName" type="hidden" value="${mMessagePage.templateName}"/>
- <tr>
- <td align="right">
- <label class="Validform_label">选择模板:</label>
- </td>
- <td class="value" colspan="3">
- <span id="templateShowName">${mMessagePage.templateName}</span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" onclick="openTemplateSelect()">选择模板</a>
- </td>
- </tr>
- </c:if>
- <tr>
- <td align="right">
- <label class="Validform_label">内容:</label>
- </td>
- <td class="value" colspan="3">
- <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
- <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.1.4.js"></script>
- <script src = "webpage/cn/com/lzt/message/ue.js?v=3"></script>
- <textarea name="text" id="text" datatype="*" style="width: 800px;height:300px">${param.load=='detail'?mMessagePage.sendText:mMessagePage.text}</textarea>
- <script type="text/javascript">
- var ueParams={autosave: false};
- <c:choose>
- <c:when test="${param.load=='detail'}">
- // ueParams.toolbars=empty_toolbars;
- ueParams.readonly=true;
- </c:when>
- <c:otherwise>
- ueParams.toolbars=_min_toolbars;
- </c:otherwise>
- </c:choose>
- var text_editor = UE.getEditor('text',ueParams);
- </script>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">内容</label>
- </td>
- </tr>
- <c:if test="${_messageType =='template' && param.load!='detail'}">
- <tr>
- <td align="right">
- <label class="Validform_label">变量:</label>
- </td>
- <td class="value" colspan="3">
- <div id="templateAutoIncrement"></div>
- <div id="templateVariableInfo">
- <script>
- <c:if test="${not empty mMessagePage.templateKVMap}">
- <c:forEach var="obj" items="${mMessagePage.templateKVMap}" varStatus="i">
- <c:forEach var="k" items="${obj}" >
- createTemplateVariableInput('${k.key}','${k.value}',${i.index});
- </c:forEach>
- </c:forEach>
- </c:if>
- </script>
- </div>
- <label class="Validform_label" style="display: none;">变量</label>
- </td>
- </tr>
- </c:if>
- <tr>
- <td align="right">
- </td>
- <td class="value" colspan="3">
- <a href="javascript:void(0)" class="easyui-linkbutton l-btn l-btn-plain" icon="icon-search" onclick="preview()">预览</a>
- </td>
- </tr>
- <tr id="tdbtn" style="display: none" >
- <td height="38px" align="right" > <!-- style="display: none" -->
- <!-- <a href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="history.go(-1)">返回</a> -->
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
- <a href="javascript:void(0)" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()"> 保 存 消 息 </a>
- </td>
- </tr>
- </table>
- <%--<div style="width: auto;height: 200px;">
- <%– 增加一个div,用于调节页面大小,否则默认太小 –%>
- <div style="width:800px;height:1px;"></div>
- <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
- <t:tab href="mMessageController.do?mMessageSendScopeList&id=${mMessagePage.id}" icon="icon-search" title="范围详情" id="mMessageSendScope"></t:tab>
- </t:tabs>
- </div>--%>
- </t:formvalid>
- <!-- 添加 附表明细 模版 -->
- <table style="display:none">
- <tbody id="add_mMessageSendScope_table_template">
- <tr>
- <td align="center"><div style="width: 25px;" name="xh"></div></td>
- <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
- </tr>
- </tbody>
- </table>
- </body>
- <script>
- $(function(){
- $('input[name="sendScope"]').each(function(index){
- var t = $(this);
- if(t.val()=='${mMessagePage.sendScope}'){
- t.attr('checked','checked');
- var send_scope_names = $('#send_scope_names').val();
- switch (t.val()) {
- case 'role':$('#rolename').val(send_scope_names);break;
- case 'dep':$('#departname').val(send_scope_names);break;
- case 'user':$('#realname').val(send_scope_names);break;
- case 'user_group':$('#regularGroupName').val(send_scope_names);break;
- }
- }
- });
- })
- function showfile(){
- var id = $("#id").val();
- $.dialog({
- content: 'url:publicpageController.do?tSysFileList&busiId='+id+'&busiTable=m_message&bizType=mmessage&&readOnly=true', zIndex: getzIndex(), title: '附件列表', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
- ]}).zindex();
- }
- var _confirm_button ='<t:mutiLang langKey="common.confirm"/>';
- var _cancel_button ='<t:mutiLang langKey="common.cancel"/>';
- </script>
|