diff --git a/src/main/resources/static/route/mail/forward-mail.html b/src/main/resources/static/route/mail/forward-mail.html index 83ca1ed..a9bf375 100644 --- a/src/main/resources/static/route/mail/forward-mail.html +++ b/src/main/resources/static/route/mail/forward-mail.html @@ -19,9 +19,11 @@
- + 抄送 + 密送
@@ -32,12 +34,22 @@
+ style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -138,7 +140,7 @@ var id = top.restAjax.params(window.location.href).id; var dto = {}; - $('.layui-card').height($(window).height() - 30) + $('.layui-card').height($(window).height()) function init(){ top.restAjax.get(top.restAjax.path('api/mail/get-inbox-mail', []), { @@ -159,6 +161,18 @@ } init(); + $(document).on('click', '#copy-for-btn', function(){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + $('#copy-for-div').toggle(); + }); + + $(document).on('click', '#secret-btn', function(){ + $('#secretIds').val(''); + $('#secretNames').val(''); + $('#secret-div').toggle(); + }); + // 初始化文件列表 function initFileList(fileName, ids, callback) { var dataForm = {}; @@ -291,19 +305,23 @@ selectSend(); }); function selectSend(){ - top.dialog.dialogData.selectedUserIds = $('#recipientIds').val(); + top.dialog.dialogData.selectedUserIds = $('#recipientIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择收件人', - width: '500px', + width: '600px', height: '500px', closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var recipientIds = $('#recipientIds').val() == '' ? $('#recipientIds').val() : $('#recipientIds').val() + ','; - var recipientNames = $('#recipientNames').val() == '' ? $('#recipientNames').val() : $('#recipientNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#recipientIds').val(''); + $('#recipientNames').val(''); + return; + } + if(insertUsers.length > 0) { + var recipientIds = ''; + var recipientNames = ''; for (var i = 0, item; item = insertUsers[i++];) { recipientIds += item.userId + ','; recipientNames += item.userName + '[' + item.username + ']' + ','; @@ -324,19 +342,23 @@ selectCopyFor(); }); function selectCopyFor(){ - top.dialog.dialogData.selectedUserIds = $('#copyForIds').val(); + top.dialog.dialogData.selectedUserIds = $('#copyForIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择抄送人', - width: '500px', + width: '600px', height: '500px', closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var copyForIds = $('#copyForIds').val() == '' ? $('#copyForIds').val() : $('#copyForIds').val() + ','; - var copyForNames = $('#copyForNames').val() == '' ? $('#copyForNames').val() : $('#copyForNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + return; + } + if(insertUsers.length > 0) { + var copyForIds = ''; + var copyForNames = ''; for (var i = 0, item; item = insertUsers[i++];) { copyForIds += item.userId + ','; copyForNames += item.userName + '[' + item.username + ']' + ','; @@ -357,19 +379,23 @@ selectSecret(); }); function selectSecret(){ - top.dialog.dialogData.selectedUserIds = $('#secretIds').val(); + top.dialog.dialogData.selectedUserIds = $('#secretIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择密送人', - width: '500px', + width: '600px', height: '500px', closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var secretIds = $('#secretIds').val() == '' ? $('#secretIds').val() : $('#secretIds').val() + ','; - var secretNames = $('#secretNames').val() == '' ? $('#secretNames').val() : $('#secretNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length > 0) { + var secretIds = ''; + var secretNames = ''; + if(insertUsers.length == 0){ + $('#secretIds').val(''); + $('#secretNames').val(''); + return; + } for (var i = 0, item; item = insertUsers[i++];) { secretIds += item.userId + ','; secretNames += item.userName + '[' + item.username + ']' + ','; diff --git a/src/main/resources/static/route/mail/mail-del-show.html b/src/main/resources/static/route/mail/mail-del-show.html index 94bc23e..f45d22d 100644 --- a/src/main/resources/static/route/mail/mail-del-show.html +++ b/src/main/resources/static/route/mail/mail-del-show.html @@ -40,6 +40,16 @@
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -145,6 +145,12 @@ initRichContentContentRichText(dataFormData['contentRich']); initMailFilesUploadFile(); form.render(null, 'dataForm'); + if(dataFormData['copyForIds'] != ''){ + $('#copy-for-div').toggle(); + } + if(dataFormData['secretIds'] != ''){ + $('#secret-div').toggle(); + } }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/mail/mail-draft-list.html b/src/main/resources/static/route/mail/mail-draft-list.html index 5419e17..5eb3bcd 100644 --- a/src/main/resources/static/route/mail/mail-draft-list.html +++ b/src/main/resources/static/route/mail/mail-draft-list.html @@ -167,6 +167,7 @@ anim: 2, content: top.restAjax.path('route/mail/mail-send-draft-edit.html?mailId={arg}', [checkDatas[0].mailId]), end: function() { + reloadTable(); } }); return; diff --git a/src/main/resources/static/route/mail/mail-inbox-list.html b/src/main/resources/static/route/mail/mail-inbox-list.html index d0beae0..f832726 100644 --- a/src/main/resources/static/route/mail/mail-inbox-list.html +++ b/src/main/resources/static/route/mail/mail-inbox-list.html @@ -163,9 +163,13 @@ var checkStatus = table.checkStatus('dataTable'); var checkDatas = checkStatus.data; if(layEvent === 'showEvent') { + if(checkDatas.length === 0 || checkDatas.length > 1){ + layer.msg("请选择一条记录"); + return; + } layer.open({ type: 2, - title: '查看邮件', + title: '收件箱', closeBtn: 1, area: ['95%', '95%'], shadeClose: false, diff --git a/src/main/resources/static/route/mail/mail-inbox-show.html b/src/main/resources/static/route/mail/mail-inbox-show.html index 01b5963..d4b6dd9 100644 --- a/src/main/resources/static/route/mail/mail-inbox-show.html +++ b/src/main/resources/static/route/mail/mail-inbox-show.html @@ -20,8 +20,8 @@
- 发件人: -
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -150,6 +150,12 @@ initMailFilesUploadFile(); $('#creatorNames').html(dataFormData['creatorNames']); form.render(null, 'dataForm'); + if(dataFormData['copyForIds'] != ''){ + $('#copy-for-div').toggle(); + } + if(dataFormData['secretIds'] != ''){ + $('#secret-div').toggle(); + } }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/mail/mail-send-draft-edit.html b/src/main/resources/static/route/mail/mail-send-draft-edit.html index 1a9bf53..e0a2814 100644 --- a/src/main/resources/static/route/mail/mail-send-draft-edit.html +++ b/src/main/resources/static/route/mail/mail-send-draft-edit.html @@ -19,12 +19,14 @@
- - + 抄送 + 密送
@@ -35,12 +37,22 @@
+ style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -140,7 +142,7 @@ var wangEditorObj = {}; var mailId = top.restAjax.params(window.location.href).mailId; - $('.layui-card').height($(window).height() - 30) + $('.layui-card').height($(window).height()); function init(){ top.restAjax.get(top.restAjax.path('api/mail/get-draft-mail', []), { @@ -155,6 +157,12 @@ initRichContentContentRichText(dataFormData['contentRich']); initMailFilesUploadFile(); form.render(null, 'dataForm'); + if(dataFormData['copyForIds'] != ''){ + $('#copy-for-div').toggle(); + } + if(dataFormData['secretIds'] != ''){ + $('#secret-div').toggle(); + } }, function(code, data) { top.dialog.msg(data.msg); }); @@ -163,6 +171,18 @@ } init(); + $(document).on('click', '#copy-for-btn', function(){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + $('#copy-for-div').toggle(); + }); + + $(document).on('click', '#secret-btn', function(){ + $('#secretIds').val(''); + $('#secretNames').val(''); + $('#secret-div').toggle(); + }); + // 初始化文件列表 function initFileList(fileName, ids, callback) { var dataForm = {}; @@ -301,7 +321,7 @@ top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择收件人', - width: '500px', + width: '600px', height: '500px', closeBtn: 1, onClose: function() { @@ -334,7 +354,7 @@ top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择抄送人', - width: '500px', + width: '600px', height: '500px', closeBtn: 1, onClose: function() { @@ -367,7 +387,7 @@ top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择密送人', - width: '500px', + width: '600px', height: '500px', closeBtn: 1, onClose: function() { diff --git a/src/main/resources/static/route/mail/mail-send-list.html b/src/main/resources/static/route/mail/mail-send-list.html index 0fae8d1..840bec3 100644 --- a/src/main/resources/static/route/mail/mail-send-list.html +++ b/src/main/resources/static/route/mail/mail-send-list.html @@ -167,6 +167,7 @@ anim: 2, content: top.restAjax.path('route/mail/mail-send-show.html?mailId={arg}', [checkDatas[0].mailId]), end: function() { + reloadTable(); } }); return; diff --git a/src/main/resources/static/route/mail/mail-send-show.html b/src/main/resources/static/route/mail/mail-send-show.html index 56c4095..70b5639 100644 --- a/src/main/resources/static/route/mail/mail-send-show.html +++ b/src/main/resources/static/route/mail/mail-send-show.html @@ -38,6 +38,16 @@
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -141,6 +141,12 @@ initRichContentContentRichText(dataFormData['contentRich']); initMailFilesUploadFile(); form.render(null, 'dataForm'); + if(dataFormData['copyForIds'] != ''){ + $('#copy-for-div').toggle(); + } + if(dataFormData['secretIds'] != ''){ + $('#secret-div').toggle(); + } }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/mail/replay-mail.html b/src/main/resources/static/route/mail/replay-mail.html index d413ffe..41a3dc3 100644 --- a/src/main/resources/static/route/mail/replay-mail.html +++ b/src/main/resources/static/route/mail/replay-mail.html @@ -19,9 +19,11 @@
- + 抄送 + 密送
@@ -32,12 +34,22 @@
+ style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -138,7 +140,7 @@ var id = top.restAjax.params(window.location.href).id; var dto = {}; - $('.layui-card').height($(window).height() - 30) + $('.layui-card').height($(window).height()) function init(){ top.restAjax.get(top.restAjax.path('api/mail/get-inbox-mail', []), { @@ -161,6 +163,18 @@ } init(); + $(document).on('click', '#copy-for-btn', function(){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + $('#copy-for-div').toggle(); + }); + + $(document).on('click', '#secret-btn', function(){ + $('#secretIds').val(''); + $('#secretNames').val(''); + $('#secret-div').toggle(); + }); + // 初始化文件列表 function initFileList(fileName, ids, callback) { var dataForm = {}; @@ -293,19 +307,23 @@ selectSend(); }); function selectSend(){ - top.dialog.dialogData.selectedUserIds = $('#recipientIds').val(); + top.dialog.dialogData.selectedUserIds = $('#recipientIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择收件人', - width: '500px', + width: '600px', height: '500px', - closeBtn: 1, + closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var recipientIds = $('#recipientIds').val() == '' ? $('#recipientIds').val() : $('#recipientIds').val() + ','; - var recipientNames = $('#recipientNames').val() == '' ? $('#recipientNames').val() : $('#recipientNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#recipientIds').val(''); + $('#recipientNames').val(''); + return; + } + if(insertUsers.length > 0) { + var recipientIds = ''; + var recipientNames = ''; for (var i = 0, item; item = insertUsers[i++];) { recipientIds += item.userId + ','; recipientNames += item.userName + '[' + item.username + ']' + ','; @@ -326,19 +344,23 @@ selectCopyFor(); }); function selectCopyFor(){ - top.dialog.dialogData.selectedUserIds = $('#copyForIds').val(); + top.dialog.dialogData.selectedUserIds = $('#copyForIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择抄送人', - width: '500px', + width: '600px', height: '500px', - closeBtn: 1, + closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var copyForIds = $('#copyForIds').val() == '' ? $('#copyForIds').val() : $('#copyForIds').val() + ','; - var copyForNames = $('#copyForNames').val() == '' ? $('#copyForNames').val() : $('#copyForNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + return; + } + if(insertUsers.length > 0) { + var copyForIds = ''; + var copyForNames = ''; for (var i = 0, item; item = insertUsers[i++];) { copyForIds += item.userId + ','; copyForNames += item.userName + '[' + item.username + ']' + ','; @@ -359,19 +381,23 @@ selectSecret(); }); function selectSecret(){ - top.dialog.dialogData.selectedUserIds = $('#secretIds').val(); + top.dialog.dialogData.selectedUserIds = $('#secretIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择密送人', - width: '500px', + width: '600px', height: '500px', closeBtn: 1, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var secretIds = $('#secretIds').val() == '' ? $('#secretIds').val() : $('#secretIds').val() + ','; - var secretNames = $('#secretNames').val() == '' ? $('#secretNames').val() : $('#secretNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#secretIds').val(''); + $('#secretNames').val(''); + return; + } + if(insertUsers.length > 0) { + var secretIds = ''; + var secretNames = ''; for (var i = 0, item; item = insertUsers[i++];) { secretIds += item.userId + ','; secretNames += item.userName + '[' + item.username + ']' + ','; diff --git a/src/main/resources/static/route/mail/send-mail.html b/src/main/resources/static/route/mail/send-mail.html index 9d33381..1fbd16a 100644 --- a/src/main/resources/static/route/mail/send-mail.html +++ b/src/main/resources/static/route/mail/send-mail.html @@ -25,6 +25,8 @@ + 抄送 + 密送
@@ -35,12 +37,22 @@
+ style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
+
+
+ +
+ +
+
+
+
+ -
+ -
-
-
- -
- -
-
-
-
@@ -147,6 +149,18 @@ } init(); + $(document).on('click', '#copy-for-btn', function(){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + $('#copy-for-div').toggle(); + }); + + $(document).on('click', '#secret-btn', function(){ + $('#secretIds').val(''); + $('#secretNames').val(''); + $('#secret-div').toggle(); + }); + // 初始化文件列表 function initFileList(fileName, ids, callback) { var dataForm = {}; @@ -280,19 +294,23 @@ selectSend(); }); function selectSend(){ - top.dialog.dialogData.selectedUserIds = $('#recipientIds').val(); + top.dialog.dialogData.selectedUserIds = $('#recipientIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择收件人', - width: '500px', + width: '600px', height: '500px', - closeBtn: 1, + closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var recipientIds = $('#recipientIds').val() == '' ? $('#recipientIds').val() : $('#recipientIds').val() + ','; - var recipientNames = $('#recipientNames').val() == '' ? $('#recipientNames').val() : $('#recipientNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#recipientIds').val(''); + $('#recipientNames').val(''); + return; + } + if(insertUsers.length > 0) { + var recipientIds = ''; + var recipientNames = ''; for (var i = 0, item; item = insertUsers[i++];) { recipientIds += item.userId + ','; recipientNames += item.userName + '[' + item.username + ']' + ','; @@ -313,19 +331,23 @@ selectCopyFor(); }); function selectCopyFor(){ - top.dialog.dialogData.selectedUserIds = $('#copyForIds').val(); + top.dialog.dialogData.selectedUserIds = $('#copyForIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择抄送人', - width: '500px', + width: '600px', height: '500px', - closeBtn: 1, + closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var copyForIds = $('#copyForIds').val() == '' ? $('#copyForIds').val() : $('#copyForIds').val() + ','; - var copyForNames = $('#copyForNames').val() == '' ? $('#copyForNames').val() : $('#copyForNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#copyForIds').val(''); + $('#copyForNames').val(''); + return; + } + if(insertUsers.length > 0) { + var copyForIds = ''; + var copyForNames = ''; for (var i = 0, item; item = insertUsers[i++];) { copyForIds += item.userId + ','; copyForNames += item.userName + '[' + item.username + ']' + ','; @@ -346,19 +368,23 @@ selectSecret(); }); function selectSecret(){ - top.dialog.dialogData.selectedUserIds = $('#secretIds').val(); + top.dialog.dialogData.selectedUserIds = $('#secretIds').val().replaceAll(",","_"); top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择密送人', - width: '500px', + width: '600px', height: '500px', - closeBtn: 1, + closeBtn: 0, onClose: function() { - top.dialog.dialogData.selectedDepartmentUsers = null; - var insertUsers = top.dialog.dialogData.saveDepartmentUsers; - if(insertUsers && insertUsers.length > 0) { - var secretIds = $('#secretIds').val() == '' ? $('#secretIds').val() : $('#secretIds').val() + ','; - var secretNames = $('#secretNames').val() == '' ? $('#secretNames').val() : $('#secretNames').val() + ','; + var insertUsers = top.dialog.dialogData.selectedDepartmentUsers; + if(insertUsers.length == 0){ + $('#secretIds').val(''); + $('#secretNames').val(''); + return; + } + if(insertUsers.length > 0) { + var secretIds = ''; + var secretNames = ''; for (var i = 0, item; item = insertUsers[i++];) { secretIds += item.userId + ','; secretNames += item.userName + '[' + item.username + ']' + ',';