@@ -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 @@
+
抄送
+
密送