diff --git a/module-form/src/main/java/ink/wgink/module/form/dao/docno/IDocNoDao.java b/module-form/src/main/java/ink/wgink/module/form/dao/docno/IDocNoDao.java index c2259202..ef46fe71 100644 --- a/module-form/src/main/java/ink/wgink/module/form/dao/docno/IDocNoDao.java +++ b/module-form/src/main/java/ink/wgink/module/form/dao/docno/IDocNoDao.java @@ -4,6 +4,7 @@ import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.UpdateException; +import ink.wgink.interfaces.init.IInitBaseTable; import ink.wgink.module.form.pojo.dtos.docno.DocNoDTO; import ink.wgink.module.form.pojo.pos.docno.DocNoPO; import org.springframework.stereotype.Repository; @@ -19,7 +20,7 @@ import java.util.Map; * @Version: 3.0 **/ @Repository -public interface IDocNoDao { +public interface IDocNoDao extends IInitBaseTable { /** * 新增文号 diff --git a/module-form/src/main/java/ink/wgink/module/form/dao/docnolog/IDocNoLogDao.java b/module-form/src/main/java/ink/wgink/module/form/dao/docnolog/IDocNoLogDao.java index 24698f1c..b92db6af 100644 --- a/module-form/src/main/java/ink/wgink/module/form/dao/docnolog/IDocNoLogDao.java +++ b/module-form/src/main/java/ink/wgink/module/form/dao/docnolog/IDocNoLogDao.java @@ -4,6 +4,7 @@ import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.UpdateException; +import ink.wgink.interfaces.init.IInitBaseTable; import ink.wgink.module.form.pojo.dtos.docnolog.DocNoLogDTO; import ink.wgink.module.form.pojo.pos.docnolog.DocNoLogPO; import org.springframework.stereotype.Repository; @@ -19,7 +20,7 @@ import java.util.Map; * @Version: 3.0 **/ @Repository -public interface IDocNoLogDao { +public interface IDocNoLogDao extends IInitBaseTable { /** * 新增文号日志 diff --git a/module-form/src/main/java/ink/wgink/module/form/pojo/dtos/docno/DocNoDTO.java b/module-form/src/main/java/ink/wgink/module/form/pojo/dtos/docno/DocNoDTO.java index 9feee6d1..b5655a25 100644 --- a/module-form/src/main/java/ink/wgink/module/form/pojo/dtos/docno/DocNoDTO.java +++ b/module-form/src/main/java/ink/wgink/module/form/pojo/dtos/docno/DocNoDTO.java @@ -36,6 +36,8 @@ public class DocNoDTO { private String creator; @ApiModelProperty(name = "gmtModified", value = "修改时间") private String gmtModified; + @ApiModelProperty(name = "latestDocNo", value = "最新文号") + private String latestDocNo; public String getDocNoId() { return docNoId == null ? "" : docNoId.trim(); @@ -125,5 +127,11 @@ public class DocNoDTO { this.gmtModified = gmtModified; } + public String getLatestDocNo() { + return latestDocNo == null ? "" : latestDocNo.trim(); + } + public void setLatestDocNo(String latestDocNo) { + this.latestDocNo = latestDocNo; + } } diff --git a/module-form/src/main/resources/mybatis/mapper/doc-no-log/doc-no-log-mapper.xml b/module-form/src/main/resources/mybatis/mapper/doc-no-log/doc-no-log-mapper.xml index 426d3c12..a4532e37 100644 --- a/module-form/src/main/resources/mybatis/mapper/doc-no-log/doc-no-log-mapper.xml +++ b/module-form/src/main/resources/mybatis/mapper/doc-no-log/doc-no-log-mapper.xml @@ -27,6 +27,26 @@ + + + CREATE TABLE IF NOT EXISTS `form_doc_no_log` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `doc_no_log_id` char(36) DEFAULT NULL COMMENT '主键', + `doc_no_id` char(36) DEFAULT NULL COMMENT '文号ID', + `doc_no_used_id` varchar(255) DEFAULT NULL COMMENT '使用ID,同一类的文号相同', + `doc_no_year` int(4) DEFAULT NULL COMMENT '文号年', + `doc_no_month` int(2) DEFAULT NULL COMMENT '文号月', + `doc_no_day` int(2) DEFAULT NULL COMMENT '文号日', + `doc_no_nu` int(11) DEFAULT NULL COMMENT '文号', + `doc_no_full` varchar(255) DEFAULT NULL COMMENT '完整文号', + `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', + `creator` char(36) DEFAULT NULL COMMENT '创建人', + PRIMARY KEY (`id`), + KEY `doc_no_id` (`doc_no_id`), + KEY `doc_no_id_2` (`doc_no_id`,`doc_no_used_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文号日志'; + + INSERT INTO form_doc_no_log( diff --git a/module-form/src/main/resources/mybatis/mapper/doc-no/doc-no-mapper.xml b/module-form/src/main/resources/mybatis/mapper/doc-no/doc-no-mapper.xml index 572535c3..646c7198 100644 --- a/module-form/src/main/resources/mybatis/mapper/doc-no/doc-no-mapper.xml +++ b/module-form/src/main/resources/mybatis/mapper/doc-no/doc-no-mapper.xml @@ -33,6 +33,28 @@ + + + CREATE TABLE IF NOT EXISTS `form_doc_no` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `doc_no_id` char(36) DEFAULT NULL COMMENT '主键', + `title` varchar(255) DEFAULT NULL COMMENT '标题', + `summary` varchar(500) DEFAULT NULL COMMENT '描述', + `type` varchar(255) DEFAULT 'auto' COMMENT '类型:always:一直累加,year:按年累加,month:按月累加,day:按日累加,manual:手动', + `template` varchar(255) DEFAULT NULL COMMENT '模板', + `start_nu` int(11) DEFAULT NULL COMMENT '开始编号', + `nu_length` int(11) DEFAULT NULL COMMENT '编号长度', + `latest_doc_no` varchar(255) DEFAULT NULL COMMENT '最新文号', + `is_active` int(1) DEFAULT '1' COMMENT '是否激活', + `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', + `creator` char(36) DEFAULT NULL COMMENT '创建人', + `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', + `modifier` char(36) DEFAULT NULL COMMENT '修改人', + `is_delete` int(1) DEFAULT '0' COMMENT '是否删除', + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文号'; + + INSERT INTO form_doc_no( diff --git a/module-form/src/main/resources/static/form/js/oa-docno.js b/module-form/src/main/resources/static/form/js/oa-docno.js index da550271..0b9cbf33 100644 --- a/module-form/src/main/resources/static/form/js/oa-docno.js +++ b/module-form/src/main/resources/static/form/js/oa-docno.js @@ -78,29 +78,6 @@ function OaDocNo(layui) { }); } - /** - * 设置文号字段 - * @param data - */ - this.initDocNo = function (data) { - var docnos = $('.docno'); - if (docnos.length == 0) { - return; - } - $.each(docnos, function (index, item) { - var selects = $(item).find('select'); - var select = selects[0]; - var docNoField = select.id; - for(var key in data) { - if(key == docNoField) { - docNoField[key +'Text'] = docNoField[key]; - delete docNoField[key]; - break; - } - } - }) - } - /** * 设置文号 * @param formData diff --git a/module-form/src/main/resources/static/form/js/oa-form-util.js b/module-form/src/main/resources/static/form/js/oa-form-util.js index d6edaeb7..913f2fdc 100644 --- a/module-form/src/main/resources/static/form/js/oa-form-util.js +++ b/module-form/src/main/resources/static/form/js/oa-form-util.js @@ -6,10 +6,12 @@ function OaFormUtil(layui) { var form = layui.form; var restAjax = layui.restajax; var processImageEnlargeScale = 0; + // 全屏 function fullPage() { - $('.layui-card-body').css('height', (win.height() - 75) +'px'); + $('.layui-card-body').css('height', (win.height() - 75) + 'px'); } + fullPage(); // 消息位置 @@ -48,14 +50,14 @@ function OaFormUtil(layui) { * 设置抄送列表 * @param formData */ - this.setCcs = function(formData) { - if(!formData.field.ccs) { + this.setCcs = function (formData) { + if (!formData.field.ccs) { formData.field.ccs = []; return; } var ccs = formData.field.ccs.split(','); var ccArray = []; - for(var i = 0, item; item = ccs[i++];) { + for (var i = 0, item; item = ccs[i++];) { ccArray.push(item); } formData.field.ccs = ccArray; @@ -75,13 +77,13 @@ function OaFormUtil(layui) { if (!jointlySigns) { continue; } - var signListDom = '
记录'; + var signListDom = '
'; for (var i = 0, item; item = jointlySigns[i++];) { signListDom += [ '
', - ' ' + item.content + '。', - ' ' + item.userName + '。 ', - ' ' + item.time + '', + ' ' + item.content + '', + ' ->' + item.userName + '', + ' ->' + item.time + '', '
' ].join(''); } @@ -107,7 +109,7 @@ function OaFormUtil(layui) { } var jointlySignListText = ''; for (var i = 0, item; item = jointlySigns[i++];) { - jointlySignListText += item.content + '。 ' + item.userName + '。 ' + item.time + '。\n'; + jointlySignListText += item.content + ' ->' + item.userName + ' ->' + item.time + '\n'; } formData[key] = jointlySignListText; } @@ -118,7 +120,7 @@ function OaFormUtil(layui) { */ function initProcessLog(processInstanceId, isApp, headers) { var url; - if(isApp) { + if (isApp) { url = 'app/oa/list-process-log/process-instance-id/{processInstanceId}'; } else { url = 'api/oa/list-process-log/process-instance-id/{processInstanceId}'; @@ -126,77 +128,77 @@ function OaFormUtil(layui) { restAjax.get(restAjax.path(url, [processInstanceId]), {}, { headers: headers }, function (code, data) { - var ul = '
    '; - for (var i = 0, item; item = data[i++];) { - // 批注 - var commentText = ''; - var comment = item.comment; - if (comment) { - if (comment.type === 'JOINTLY_SIGN') { - commentText = '动作:会签。批注:' + comment.content + '。时间:' + comment.time; - } else if (comment.type === 'GO_BACK') { - commentText = '动作:回退。批注:' + comment.content + '。时间:' + comment.time; - } else if (comment.type === 'FORCED_END') { - commentText = '动作:强制结束。批注:' + comment.content + '。时间:' + comment.time; + var ul = '
      '; + for (var i = 0, item; item = data[i++];) { + // 批注 + var commentText = ''; + var comment = item.comment; + if (comment) { + if (comment.type === 'JOINTLY_SIGN') { + commentText = '动作:会签。批注:' + comment.content + '。时间:' + comment.time; + } else if (comment.type === 'GO_BACK') { + commentText = '动作:回退。批注:' + comment.content + '。时间:' + comment.time; + } else if (comment.type === 'FORCED_END') { + commentText = '动作:强制结束。批注:' + comment.content + '。时间:' + comment.time; + } } - } - // 转交记录 - var transferCommentText = ''; - var transferComments = item.transferComments; - for(var j = transferComments.length, transferComment; transferComment = transferComments[--j];) { - if(transferCommentText) { - transferCommentText += '\n' + // 转交记录 + var transferCommentText = ''; + var transferComments = item.transferComments; + for (var j = transferComments.length, transferComment; transferComment = transferComments[--j];) { + if (transferCommentText) { + transferCommentText += '\n' + } + transferCommentText += (transferComments.length - j) + '. 转交人:' + transferComment.userName + '。原因:' + transferComment.content + '。时间:' + transferComment.time; } - transferCommentText += (transferComments.length - j) +'. 转交人:'+ transferComment.userName +'。原因:'+ transferComment.content +'。时间:'+ transferComment.time; + var li = [ + '
    • ', + ' ', + '
      ', + '

      ' + item.startTime + '

      ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + ' ', + '
      任务名称' + item.taskName + '
      节点状态' + (item.taskStatus == 'alreadyDone' ? '已办' : '待办') + '
      结束时间' + (item.endTime ? item.endTime : '-') + '
      耗时' + (item.usedTime ? item.usedTime : '0秒') + '
      处理人' + (item.userNames == '1' ? '管理员' : item.userNames) + '
      备注' + (commentText ? commentText : '无') + '
      转交记录' + (transferCommentText ? '
      ' + transferCommentText + '
      ' : '无') + '
      ', + '
      ', + '
    • ' + ].join(''); + ul += li; } - var li = [ - '
    • ', - ' ', - '
      ', - '

      ' + item.startTime + '

      ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '
      任务名称' + item.taskName + '
      节点状态' + (item.taskStatus == 'alreadyDone' ? '已办' : '待办') + '
      结束时间' + (item.endTime ? item.endTime : '-') + '
      耗时' + (item.usedTime ? item.usedTime : '0秒') + '
      处理人' + (item.userNames == '1' ? '管理员' : item.userNames) + '
      备注' + (commentText ? commentText : '无') + '
      转交记录' + (transferCommentText ? '
      '+ transferCommentText +'
      ' : '无') + '
      ', - '
      ', - '
    • ' - ].join(''); - ul += li; - } - ul += '
    '; - $('#processLog').append(ul); + ul += '
'; + $('#processLog').append(ul); }, function (code, data) { layer.msg(data.msg, {offset: getMsgOffset(isApp)}); }); @@ -208,15 +210,16 @@ function OaFormUtil(layui) { */ function initProcessImage(processInstanceId, isApp, headers) { var src; - if(isApp) { - src = 'approute/oa/get-runtime-process-image/' + processInstanceId +'?token='+ headers.token; + if (isApp) { + src = 'approute/oa/get-runtime-process-image/' + processInstanceId + '?token=' + headers.token; } else { src = 'route/activiti/model/get-runtime-process-image/' + processInstanceId; } + function initRuntimeProcessImage() { var html = [ '
', - ' 流转图', + ' 流转图', '
', '
', ' '); @@ -305,21 +308,21 @@ function OaFormUtil(layui) { var maxHeight = appButtonCount * 30 + (appButtonCount + 1) * 10; maxHeight = maxHeight > 160 ? 160 : maxHeight; - $(document).on('click', '#appSubmitFormBtns', function() { + $(document).on('click', '#appSubmitFormBtns', function () { $(this).hide(); - $('#appSubmitFormBtnsContainer').css('bottom', (-1 * maxHeight +'px')); + $('#appSubmitFormBtnsContainer').css('bottom', (-1 * maxHeight + 'px')); }) - $(document).on('click', '#appSubmitFormBtnsContainer', function(e) { + $(document).on('click', '#appSubmitFormBtnsContainer', function (e) { e.stopPropagation() }) - $(document).on('click', '#appShowSubmitFormBtns', function() { + $(document).on('click', '#appShowSubmitFormBtns', function () { $('#appSubmitFormBtns').show(); $('#appSubmitFormBtnsContainer').animate({bottom: 0}, 200); }) } else { - if(confirmAssignees.length < 4) { + if (confirmAssignees.length < 4) { var btns = ''; for (var i = 0, item; item = confirmAssignees[i++];) { btns += '' @@ -340,15 +343,15 @@ function OaFormUtil(layui) { $('#submitBtnGroup').append(html) - $(document).on('click', '#submitFormBtns', function() { + $(document).on('click', '#submitFormBtns', function () { $(this).hide(); }) - $(document).on('click', '#submitFormBtnsContainer', function(e) { + $(document).on('click', '#submitFormBtnsContainer', function (e) { e.stopPropagation() }) - $(document).on('click', '#showSubmitFormBtns', function() { + $(document).on('click', '#showSubmitFormBtns', function () { $('#submitFormBtns').show(); }) } @@ -360,27 +363,27 @@ function OaFormUtil(layui) { * @param fields * @param currentUser */ - this.backFillFields = function(fields, currentUser) { + this.backFillFields = function (fields, currentUser) { var obj = {}; for (var i = 0, item; item = fields[i++];) { - if(item.autoBackFill === 'currentUserName') { + if (item.autoBackFill === 'currentUserName') { obj[item.fieldName] = currentUser.userName; continue; } - if(item.autoBackFill === 'currentUserDepartment') { - if(currentUser.departments.length == 1) { + if (item.autoBackFill === 'currentUserDepartment') { + if (currentUser.departments.length == 1) { obj[item.fieldName] = currentUser.departments[0].departmentName; continue; } - if(currentUser.departments.length > 1) { + if (currentUser.departments.length > 1) { obj[item.fieldName] = currentUser.departments[0].departmentName; var options = ''; - for(var j = 0, jItem; jItem = currentUser.departments[j++];) { - options += '' + for (var j = 0, jItem; jItem = currentUser.departments[j++];) { + options += '' } - var parent = $('#'+ item.fieldName +'Block'); + var parent = $('#' + item.fieldName + 'Block'); parent.empty(); - parent.append(''); + parent.append(''); continue; } } @@ -398,13 +401,13 @@ function OaFormUtil(layui) { if (parseInt(item.isEditable) === 0) { // 普通控件 var boxId = '#' + item.fieldName + 'Box'; - var blockId = '#'+ item.fieldName + 'Block'; + var blockId = '#' + item.fieldName + 'Block'; // 文号控件 - if($(boxId).hasClass('docno')) { + if ($(boxId).hasClass('docno')) { // 移除文号标识 $(boxId).removeClass('docno'); // 获取文本输入框 - var docNoTextInput = $('#'+ item.fieldName +'Text'); + var docNoTextInput = $('#' + item.fieldName + 'Text'); docNoTextInput.removeAttr('name'); docNoTextInput.attr('disabled', 'disabled'); docNoTextInput.attr('lay-verify', ''); @@ -435,20 +438,20 @@ function OaFormUtil(layui) { /** * 禁用字段转div */ - this.disabledField2Div = function() { + this.disabledField2Div = function () { var doms = $('#reportForm').find('input,textarea,select'); - $.each(doms, function(index, item) { - if(!item.disabled) { + $.each(doms, function (index, item) { + if (!item.disabled) { return; } var value = item.value; var parent = $(item).parent(); parent.empty(); - if(item.nodeName === 'INPUT' || item.nodeName === 'SELECT') { - parent.append('
'+ value +'
') - } else if(item.nodeName === 'TEXTAREA') { - parent.append('
'+ value +'
') + if (item.nodeName === 'INPUT' || item.nodeName === 'SELECT') { + parent.append('
' + value + '
') + } else if (item.nodeName === 'TEXTAREA') { + parent.append('
' + value + '
') } }); @@ -487,7 +490,7 @@ function OaFormUtil(layui) { function initButton() { var buttons = ''; - if(isApp && !isAppShow) { + if (isApp && !isAppShow) { buttons += '' buttons += '
'; buttons += '
'; @@ -498,15 +501,15 @@ function OaFormUtil(layui) { buttons += ''; appButtonCount++; } - if(formButton.btnForcedEnd) { + if (formButton.btnForcedEnd) { buttons += ''; appButtonCount++; } - if(formButton.btnCc) { + if (formButton.btnCc) { buttons += ''; appButtonCount++; } - if(formButton.btnTransfer) { + if (formButton.btnTransfer) { buttons += ''; appButtonCount++; } @@ -520,19 +523,19 @@ function OaFormUtil(layui) { buttons += '
'; } else { buttons += '
' - if(formButton.btnPrint) { + if (formButton.btnPrint) { buttons += ''; } if (formButton.btnGoBack) { buttons += ''; } - if(formButton.btnForcedEnd) { + if (formButton.btnForcedEnd) { buttons += ''; } - if(formButton.btnCc) { + if (formButton.btnCc) { buttons += ''; } - if(formButton.btnTransfer) { + if (formButton.btnTransfer) { buttons += ''; } if (formButton.btnAttachment) { @@ -541,7 +544,7 @@ function OaFormUtil(layui) { buttons += '
'; } buttons += '
'; - buttons += ''; + buttons += ''; buttons += ''; buttons += ''; buttons += '
'; @@ -549,19 +552,19 @@ function OaFormUtil(layui) { } function addClick() { - if(isApp) { + if (isApp) { var maxHeight = appButtonCount * 30 + (appButtonCount + 1) * 10; maxHeight = maxHeight > 160 ? 160 : maxHeight; - $(document).on('click', '#appFormBtns', function() { + $(document).on('click', '#appFormBtns', function () { $(this).hide(); - $('#appFormBtnsContainer').css('bottom', (-1 * maxHeight +'px')); + $('#appFormBtnsContainer').css('bottom', (-1 * maxHeight + 'px')); }) - $(document).on('click', '#appFormBtnsContainer', function(e) { + $(document).on('click', '#appFormBtnsContainer', function (e) { e.stopPropagation() }) - $(document).on('click', '#appShowFormBtns', function() { + $(document).on('click', '#appShowFormBtns', function () { $('#appFormBtns').show(); $('#appFormBtnsContainer').animate({bottom: 0}, 200); }) @@ -668,7 +671,7 @@ function OaFormUtil(layui) { var area; var offset; - if(isApp) { + if (isApp) { area = ['100%', '400px']; offset = 'b'; } else { @@ -720,9 +723,9 @@ function OaFormUtil(layui) { }); // 打印 - $(document.body).on('click', '#printBtn', function() { + $(document.body).on('click', '#printBtn', function () { closeBtns(); - if(!formCode || !formVersion || !uid) { + if (!formCode || !formVersion || !uid) { return; } window.open(restAjax.path('route/oa-form-report/print/code/{formCode}/version/{formVersion}/uid/{uid}', [formCode, formVersion, uid]), '_blank'); @@ -799,7 +802,7 @@ function OaFormUtil(layui) { var loadLayerIndex; var url; - if(isApp) { + if (isApp) { url = 'app/oa-form-report/update-go-back/process-instance-id/{processInstanceId}/task-id/{taskId}/node-id/{nodeId}'; } else { url = 'api/oa-form-report/update-go-back/process-instance-id/{processInstanceId}/task-id/{taskId}/node-id/{nodeId}'; @@ -823,19 +826,23 @@ function OaFormUtil(layui) { }) // 强制结束 - $(document.body).on('click', '#forcedEndBtn', function() { + $(document.body).on('click', '#forcedEndBtn', function () { closeBtns(); $('#appFormBtns').click(); $('#formBtns').click(); layer.confirm('确定结束吗?', {title: false}, function (confirmLayerIndex) { layer.close(confirmLayerIndex); - layer.prompt({title: '请输入结束原因', formType: 2, offset: getMsgOffset(isApp)}, function (reason, promptIndex) { + layer.prompt({ + title: '请输入结束原因', + formType: 2, + offset: getMsgOffset(isApp) + }, function (reason, promptIndex) { layer.close(promptIndex); var loadLayerIndex; var url; - if(isApp) { + if (isApp) { url = 'app/oa-form-report/update-forced-end/process-instance-id/{processInstanceId}/task-id/{taskId}'; } else { url = 'api/oa-form-report/update-forced-end/process-instance-id/{processInstanceId}/task-id/{taskId}'; @@ -862,30 +869,32 @@ function OaFormUtil(layui) { }) // 抄送 - $(document.body).on('click', '#ccBtn', function() { + $(document.body).on('click', '#ccBtn', function () { closeBtns(); + function getCcArray() { var selectedUserIdArray = []; - if(!$('#ccs').val()) { + if (!$('#ccs').val()) { return selectedUserIdArray; } var ccsArray = $('#ccs').val().split(','); - for(var i = 0, item; item = ccsArray[i++];) { - if(!item) { + for (var i = 0, item; item = ccsArray[i++];) { + if (!item) { continue; } selectedUserIdArray.push(item); } return selectedUserIdArray; } + var oaUserSelect = new OaUserSelect(layui, { isApp: isApp, headers: headers, departmentRootId: 0, selectedUserIdArray: getCcArray(), - onConfirm: function(selectedUserArray) { + onConfirm: function (selectedUserArray) { var ccs = ''; - for(var i = 0, item; item = selectedUserArray[i++];) { + for (var i = 0, item; item = selectedUserArray[i++];) { if (ccs.length > 0) { ccs += ','; } @@ -898,25 +907,29 @@ function OaFormUtil(layui) { }) // 转交 - $(document.body).on('click', '#transferBtn', function() { + $(document.body).on('click', '#transferBtn', function () { closeBtns(); var osUserSelect = new OaUserSelect(layui, { isApp: isApp, headers: headers, departmentRootId: 0, selectType: 'radio', - onConfirm: function(selectedUserArray) { - if(selectedUserArray.length == 0) { + onConfirm: function (selectedUserArray) { + if (selectedUserArray.length == 0) { return; } layer.confirm('确定转交吗?', {title: false}, function (confirmLayerIndex) { layer.close(confirmLayerIndex); - layer.prompt({title: '请输入转交原因', formType: 2, offset: getMsgOffset(isApp)}, function (reason, promptIndex) { + layer.prompt({ + title: '请输入转交原因', + formType: 2, + offset: getMsgOffset(isApp) + }, function (reason, promptIndex) { layer.close(promptIndex); var loadLayerIndex; var url; - if(isApp) { + if (isApp) { url = 'app/oa-form-report/update-assignee/process-instance-id/{processInstanceId}/task-id/{taskId}'; } else { url = 'api/oa-form-report/update-assignee/process-instance-id/{processInstanceId}/task-id/{taskId}'; diff --git a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-save.ftl b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-save.ftl index d51d93c2..802356fd 100644 --- a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-save.ftl +++ b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-save.ftl @@ -51,9 +51,10 @@
- - - + + + + @@ -73,6 +74,7 @@ var token = queryParams.token; var formUtil = new FormUtil(layui, Viewer); var oaFormUtil = new OaFormUtil(layui); + var oaDocNo = new OaDocNo(layui); // 调试可先设置为空对象 var confirmAssignees = ${r"${confirmAssignees}"}; var fields = ${r"${fields}"}; @@ -101,8 +103,10 @@ formUtil.initAppUploadFile('${field.data.id}', ${field.data.count}, {token: token}); <#elseif field.data.tag == 'uploadVideo'> formUtil.initAppUploadVideo('${field.data.id}', ${field.data.count}, {token: token}); - <#elseif field.data.tag == 'uploadAudio'> + <#elseif field.data.tag == 'uploadAudio'> formUtil.initAppUploadAudio('${field.data.id}', ${field.data.count}, {token: token}); + <#elseif field.data.tag == 'docno'> + oaDocNo.init(); <#elseif field.data.tag == 'date'> formUtil.initDate({ id: '${field.data.id}', diff --git a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-show.ftl b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-show.ftl index 97ccf47c..e3337d3b 100644 --- a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-show.ftl +++ b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-show.ftl @@ -48,10 +48,11 @@
- - - - + + + + + - - - + + + + + - - - + + + + - + + + - - - + + + +