Merge remote-tracking branch 'origin/master'

This commit is contained in:
ly19960718 2022-04-11 16:54:47 +08:00
commit c3e8eb1eb7
10 changed files with 284 additions and 162 deletions

View File

@ -19,9 +19,11 @@
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row" style="padding: 10px;">
<div class="layui-col-md6">
<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="submitSend">
<button type="button" class="layui-btn layui-btn-xs" lay-submit lay-filter="submitSend">
<i class="fa fa-lg fa-paper-plane-o"></i> 转发
</button>
<a href="javascript:void(0)" id="copy-for-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">抄送</a>
<a href="javascript:void(0)" id="secret-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">密送</a>
</div>
</div>
<div class="layui-card-body" style="padding: 10px;">
@ -32,12 +34,22 @@
<div class="layui-input-block">
<input type="hidden" id="recipientIds" name="recipientIds" class="layui-input" value="">
<input type="text" id="recipientNames" name="recipientNames" class="layui-input" value=""
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly">
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -49,7 +61,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -61,16 +73,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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 + ']' + ',';

View File

@ -40,6 +40,16 @@
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -51,7 +61,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -63,16 +73,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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);
});

View File

@ -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;

View File

@ -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,

View File

@ -20,8 +20,8 @@
<div class="layui-row" style="padding: 10px;">
<div class="layui-col-md6">
<div>
<span>发件人: <span id="creatorNames"></span></span>
<button type="button" id="reply-btn" class="layui-btn layui-btn-normal layui-btn-xs">
<span>发件人: <span id="creatorNames" style="margin-left: 5px;"></span></span>
<button type="button" id="reply-btn" class="layui-btn layui-btn-normal layui-btn-xs" style="margin-left: 25px;">
<i class="fa fa-lg fa-paper-plane-o"></i> 回复
</button>
<button type="button" id="forward-btn" class="layui-btn layui-btn-info layui-btn-xs">
@ -44,6 +44,16 @@
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -55,7 +65,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -67,16 +77,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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);
});

View File

@ -19,12 +19,14 @@
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row" style="padding: 10px;">
<div class="layui-col-md6">
<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="submitSendDraft">
<button type="button" class="layui-btn layui-btn-xs" lay-submit lay-filter="submitSendDraft">
<i class="fa fa-lg fa-paper-plane-o"></i> 发送
</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="submitEditDraft">
<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-submit lay-filter="submitEditDraft">
<i class="fa fa-lg fa-edit"></i> 保存修改
</button>
<a href="javascript:void(0)" id="copy-for-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">抄送</a>
<a href="javascript:void(0)" id="secret-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">密送</a>
</div>
</div>
<div class="layui-card-body" style="padding: 10px;">
@ -35,12 +37,22 @@
<div class="layui-input-block">
<input type="hidden" id="recipientIds" name="recipientIds" class="layui-input" value="">
<input type="text" id="recipientNames" name="recipientNames" class="layui-input" value=""
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly">
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -52,7 +64,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -64,16 +76,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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() {

View File

@ -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;

View File

@ -38,6 +38,16 @@
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -49,7 +59,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -61,16 +71,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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);
});

View File

@ -19,9 +19,11 @@
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row" style="padding: 10px;">
<div class="layui-col-md6">
<button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="submitSend">
<button type="button" class="layui-btn layui-btn-xs" lay-submit lay-filter="submitSend">
<i class="fa fa-lg fa-paper-plane-o"></i> 回复
</button>
<a href="javascript:void(0)" id="copy-for-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">抄送</a>
<a href="javascript:void(0)" id="secret-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">密送</a>
</div>
</div>
<div class="layui-card-body" style="padding: 10px;">
@ -32,12 +34,22 @@
<div class="layui-input-block">
<input type="hidden" id="recipientIds" name="recipientIds" class="layui-input" value="">
<input type="text" id="recipientNames" name="recipientNames" class="layui-input" value=""
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly">
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -49,7 +61,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -61,16 +73,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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 + ']' + ',';

View File

@ -25,6 +25,8 @@
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit lay-filter="submitDraft">
<i class="fa fa-lg fa-edit"></i> 存草稿
</button>
<a href="javascript:void(0)" id="copy-for-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 50px;">抄送</a>
<a href="javascript:void(0)" id="secret-btn" style="color: #1e88e5;text-decoration: underline;margin-left: 25px;">密送</a>
</div>
</div>
<div class="layui-card-body" style="padding: 10px;">
@ -35,12 +37,22 @@
<div class="layui-input-block">
<input type="hidden" id="recipientIds" name="recipientIds" class="layui-input" value="">
<input type="text" id="recipientNames" name="recipientNames" class="layui-input" value=""
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly">
style="cursor: pointer" placeholder="点击选择收件人" readonly="readonly" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row" id="copy-for-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">抄送人</label>
@ -52,7 +64,7 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-row" id="secret-div" style="display: none;">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">密送人</label>
@ -64,16 +76,6 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label"><span style="color: #cc0000;">* </span>主题</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" class="layui-input" value="" placeholder="" maxlength="255">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-text">
<label class="layui-form-label">附件</label>
@ -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 + ']' + ',';