处理签批格式
This commit is contained in:
parent
fef1dfc259
commit
2a4f16aa52
@ -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 {
|
||||
|
||||
/**
|
||||
* 新增文号
|
||||
|
@ -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 {
|
||||
|
||||
/**
|
||||
* 新增文号日志
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,26 @@
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
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='文号日志';
|
||||
</update>
|
||||
|
||||
<!-- 新增文号日志 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO form_doc_no_log(
|
||||
|
@ -33,6 +33,28 @@
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
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='文号';
|
||||
</update>
|
||||
|
||||
<!-- 新增文号 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO form_doc_no(
|
||||
|
@ -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
|
||||
|
@ -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 = '<div style="text-align: left;"><span>记录</span>';
|
||||
var signListDom = '<div style="text-align: left;">';
|
||||
for (var i = 0, item; item = jointlySigns[i++];) {
|
||||
signListDom += [
|
||||
'<div>',
|
||||
' <span>' + item.content + '。</span>',
|
||||
' <span>' + item.userName + '。 </span>',
|
||||
' <span>' + item.time + '</span>',
|
||||
' <span>' + item.content + '</span>',
|
||||
' <span>->' + item.userName + '</span>',
|
||||
' <span>->' + item.time + '</span>',
|
||||
'</div>'
|
||||
].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 = '<ul class="layui-timeline">';
|
||||
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 = '<ul class="layui-timeline">';
|
||||
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 = [
|
||||
'<li class="layui-timeline-item">',
|
||||
' <i class="layui-icon layui-timeline-axis"></i>',
|
||||
' <div class="layui-timeline-content layui-text">',
|
||||
' <h3 class="layui-timeline-title">' + item.startTime + '</h3>',
|
||||
' <table class="layui-table">',
|
||||
' <colgroup>',
|
||||
' <col width="100">',
|
||||
' <col>',
|
||||
' </colgroup>',
|
||||
' <tbody>',
|
||||
' <tr>',
|
||||
' <td class="row-title">任务名称</td>',
|
||||
' <td>' + item.taskName + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">节点状态</td>',
|
||||
' <td>' + (item.taskStatus == 'alreadyDone' ? '已办' : '待办') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">结束时间</td>',
|
||||
' <td>' + (item.endTime ? item.endTime : '-') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">耗时</td>',
|
||||
' <td>' + (item.usedTime ? item.usedTime : '0秒') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">处理人</td>',
|
||||
' <td>' + (item.userNames == '1' ? '管理员' : item.userNames) + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">备注</td>',
|
||||
' <td>' + (commentText ? commentText : '无') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">转交记录</td>',
|
||||
' <td>' + (transferCommentText ? '<pre>' + transferCommentText + '</pre>' : '无') + '</td>',
|
||||
' </tr>',
|
||||
' </tbody>',
|
||||
' </table>',
|
||||
' </div>',
|
||||
'</li>'
|
||||
].join('');
|
||||
ul += li;
|
||||
}
|
||||
var li = [
|
||||
'<li class="layui-timeline-item">',
|
||||
' <i class="layui-icon layui-timeline-axis"></i>',
|
||||
' <div class="layui-timeline-content layui-text">',
|
||||
' <h3 class="layui-timeline-title">' + item.startTime + '</h3>',
|
||||
' <table class="layui-table">',
|
||||
' <colgroup>',
|
||||
' <col width="100">',
|
||||
' <col>',
|
||||
' </colgroup>',
|
||||
' <tbody>',
|
||||
' <tr>',
|
||||
' <td class="row-title">任务名称</td>',
|
||||
' <td>' + item.taskName + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">节点状态</td>',
|
||||
' <td>' + (item.taskStatus == 'alreadyDone' ? '已办' : '待办') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">结束时间</td>',
|
||||
' <td>' + (item.endTime ? item.endTime : '-') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">耗时</td>',
|
||||
' <td>' + (item.usedTime ? item.usedTime : '0秒') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">处理人</td>',
|
||||
' <td>' + (item.userNames == '1' ? '管理员' : item.userNames) + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">备注</td>',
|
||||
' <td>' + (commentText ? commentText : '无') + '</td>',
|
||||
' </tr>',
|
||||
' <tr>',
|
||||
' <td class="row-title">转交记录</td>',
|
||||
' <td>' + (transferCommentText ? '<pre>'+ transferCommentText +'</pre>' : '无') + '</td>',
|
||||
' </tr>',
|
||||
' </tbody>',
|
||||
' </table>',
|
||||
' </div>',
|
||||
'</li>'
|
||||
].join('');
|
||||
ul += li;
|
||||
}
|
||||
ul += '</ul>';
|
||||
$('#processLog').append(ul);
|
||||
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 = [
|
||||
'<div id="runtimeProcessImageBox">',
|
||||
' <img id="runtimeProcessImage" src="'+ src +'" alt="流转图" style="width: 100%;"/>',
|
||||
' <img id="runtimeProcessImage" src="' + src + '" alt="流转图" style="width: 100%;"/>',
|
||||
'</div>',
|
||||
'<div id="operationBtnBox" class="layui-btn-group">',
|
||||
' <button id="searchPlus" type="button" class="layui-btn layui-btn-xs" title="放大">',
|
||||
@ -282,7 +285,7 @@ function OaFormUtil(layui) {
|
||||
this.initSubmitBtns = function (confirmAssignees, opt) {
|
||||
var btnColor = ['', 'layui-btn-normal', 'layui-btn-warm'];
|
||||
var isApp = opt && opt.isApp ? opt.isApp : false;
|
||||
if(isApp) {
|
||||
if (isApp) {
|
||||
var appButtonCount = 0;
|
||||
|
||||
$('#submitBtnGroup').append('<button type="button" id="appShowSubmitFormBtns" class="layui-btn layui-btn-primary"><i class="fa fa-list-ul" aria-hidden="true"></i> 提交</button>');
|
||||
@ -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 += '<button type="button" id="submitFormBtn' + i + '" class="layui-btn layui-btn-sm ' + btnColor[(i - 1) % 3] + ' confirm-btn" lay-submit lay-filter="submit' + i + '" data-select-type="' + item.nodeType + '" data-index="' + (i - 1) + '" data-next-end-event="' + item.nextEndEvent + '" data-btn-exc="' + item.btnExc + '">' + item.btnText + '</button>'
|
||||
@ -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 += '<option value="'+ jItem.departmentName +'">'+ jItem.departmentName +'</option>'
|
||||
for (var j = 0, jItem; jItem = currentUser.departments[j++];) {
|
||||
options += '<option value="' + jItem.departmentName + '">' + jItem.departmentName + '</option>'
|
||||
}
|
||||
var parent = $('#'+ item.fieldName +'Block');
|
||||
var parent = $('#' + item.fieldName + 'Block');
|
||||
parent.empty();
|
||||
parent.append('<select name="'+ item.fieldName +'">'+ options +'</select>');
|
||||
parent.append('<select name="' + item.fieldName + '">' + options + '</select>');
|
||||
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('<div style="line-height: 36px;">'+ value +'</div>')
|
||||
} else if(item.nodeName === 'TEXTAREA') {
|
||||
parent.append('<div style="line-height: 36px; text-align: left;">'+ value +'</div>')
|
||||
if (item.nodeName === 'INPUT' || item.nodeName === 'SELECT') {
|
||||
parent.append('<div style="line-height: 36px;">' + value + '</div>')
|
||||
} else if (item.nodeName === 'TEXTAREA') {
|
||||
parent.append('<div style="line-height: 36px; text-align: left;">' + value + '</div>')
|
||||
|
||||
}
|
||||
});
|
||||
@ -487,7 +490,7 @@ function OaFormUtil(layui) {
|
||||
function initButton() {
|
||||
var buttons = '';
|
||||
|
||||
if(isApp && !isAppShow) {
|
||||
if (isApp && !isAppShow) {
|
||||
buttons += '<button type="button" id="appShowFormBtns" class="layui-btn layui-btn-primary"><i class="fa fa-list-ul" aria-hidden="true"></i> 操作</button>'
|
||||
buttons += '<div id="appFormBtns">';
|
||||
buttons += '<div id="appFormBtnsContainer">';
|
||||
@ -498,15 +501,15 @@ function OaFormUtil(layui) {
|
||||
buttons += '<button id="goBackBtn" type="button" class="layui-col-xs12 layui-btn layui-btn-warm confirm-btn">回退</button>';
|
||||
appButtonCount++;
|
||||
}
|
||||
if(formButton.btnForcedEnd) {
|
||||
if (formButton.btnForcedEnd) {
|
||||
buttons += '<button id="forcedEndBtn" type="button" class="layui-col-xs12 layui-btn layui-btn-danger confirm-btn">强制结束</button>';
|
||||
appButtonCount++;
|
||||
}
|
||||
if(formButton.btnCc) {
|
||||
if (formButton.btnCc) {
|
||||
buttons += '<button id="ccBtn" type="button" class="layui-col-xs12 layui-btn layui-btn-normal confirm-btn">抄送</button>';
|
||||
appButtonCount++;
|
||||
}
|
||||
if(formButton.btnTransfer) {
|
||||
if (formButton.btnTransfer) {
|
||||
buttons += '<button id="transferBtn" type="button" class="layui-col-xs12 layui-btn layui-btn-primary confirm-btn">转交</button>';
|
||||
appButtonCount++;
|
||||
}
|
||||
@ -520,19 +523,19 @@ function OaFormUtil(layui) {
|
||||
buttons += '</div>';
|
||||
} else {
|
||||
buttons += '<div class="layui-btn-group">'
|
||||
if(formButton.btnPrint) {
|
||||
if (formButton.btnPrint) {
|
||||
buttons += '<button id="printBtn" type="button" class="layui-btn layui-btn-xs layui-btn-primary confirm-btn">打印</button>';
|
||||
}
|
||||
if (formButton.btnGoBack) {
|
||||
buttons += '<button id="goBackBtn" type="button" class="layui-btn layui-btn-xs layui-btn-warm confirm-btn">回退</button>';
|
||||
}
|
||||
if(formButton.btnForcedEnd) {
|
||||
if (formButton.btnForcedEnd) {
|
||||
buttons += '<button id="forcedEndBtn" type="button" class="layui-btn layui-btn-xs layui-btn-danger confirm-btn">强制结束</button>';
|
||||
}
|
||||
if(formButton.btnCc) {
|
||||
if (formButton.btnCc) {
|
||||
buttons += '<button id="ccBtn" type="button" class="layui-btn layui-btn-xs layui-btn-normal confirm-btn">抄送</button>';
|
||||
}
|
||||
if(formButton.btnTransfer) {
|
||||
if (formButton.btnTransfer) {
|
||||
buttons += '<button id="transferBtn" type="button" class="layui-btn layui-btn-xs layui-btn-primary confirm-btn">转交</button>';
|
||||
}
|
||||
if (formButton.btnAttachment) {
|
||||
@ -541,7 +544,7 @@ function OaFormUtil(layui) {
|
||||
buttons += '</div>';
|
||||
}
|
||||
buttons += '<div class="layui-btn-group">';
|
||||
buttons += '<button id="showAttachmentBtn" type="button" class="layui-btn '+ (isApp ? '' : 'layui-btn-xs') +' layui-btn-primary" title="附件列表"><i class="fa fa-list-ul" aria-hidden="true"></i></button>';
|
||||
buttons += '<button id="showAttachmentBtn" type="button" class="layui-btn ' + (isApp ? '' : 'layui-btn-xs') + ' layui-btn-primary" title="附件列表"><i class="fa fa-list-ul" aria-hidden="true"></i></button>';
|
||||
buttons += '<input type="hidden" name="attachments" id="attachments"/>';
|
||||
buttons += '<input type="hidden" name="ccs" id="ccs"/>';
|
||||
buttons += '</div>';
|
||||
@ -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}';
|
||||
|
@ -51,9 +51,10 @@
|
||||
<input type="hidden" id="formCode" value="${r'${formCode}'}">
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="static/form/js/app-oa-form-util.js?v=1"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
@ -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}',
|
||||
|
@ -48,10 +48,11 @@
|
||||
<input type="hidden" id="formCode" value="${r'${formCode}'}">
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/app-oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="static/form/js/app-oa-form-util.js?v=2"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
@ -72,6 +73,7 @@
|
||||
var processInstanceId = queryParams.processInstanceId;
|
||||
var formUtil = new FormUtil(layui, Viewer);
|
||||
var oaFormUtil = new OaFormUtil(layui);
|
||||
var oaDocNo = new OaDocNo(layui);
|
||||
|
||||
// 初始化
|
||||
function initData() {
|
||||
@ -117,6 +119,8 @@
|
||||
formUtil.initShowUploadVideo('${field.data.id}', ${field.data.count});
|
||||
<#elseif field.data.tag == 'uploadAudio'>
|
||||
formUtil.initShowUploadAudio('${field.data.id}', ${field.data.count});
|
||||
<#elseif field.data.tag == 'docno'>
|
||||
oaDocNo.init();
|
||||
<#elseif field.data.tag == 'date'>
|
||||
formUtil.initDate({
|
||||
id: '${field.data.id}',
|
||||
|
@ -54,10 +54,11 @@
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
<input type="hidden" id="isNeedClaim" value="${r'${isNeedClaim}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/app-oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="static/form/js/app-oa-form-util.js?v=2"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
@ -77,6 +78,7 @@
|
||||
var uid = queryParams.uid;
|
||||
var formUtil = new FormUtil(layui, Viewer);
|
||||
var oaFormUtil = new OaFormUtil(layui);
|
||||
var oaDocNo = new OaDocNo(layui);
|
||||
// 调试可先设置为空对象
|
||||
var confirmAssignees = ${r"${confirmAssignees}"};
|
||||
var fields = ${r"${fields}"};
|
||||
@ -139,6 +141,8 @@
|
||||
formUtil.initAppUploadVideo('${field.data.id}', ${field.data.count}, {token: token});
|
||||
<#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}',
|
||||
|
@ -51,10 +51,10 @@
|
||||
<input type="hidden" id="formCode" value="${r'${formCode}'}">
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
|
@ -60,8 +60,9 @@
|
||||
<input type="hidden" id="formCode" value="${r'${formCode}'}">
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
@ -81,6 +82,7 @@
|
||||
var processInstanceId = queryParams.processInstanceId;
|
||||
var formUtil = new FormUtil(layui, Viewer);
|
||||
var oaFormUtil = new OaFormUtil(layui);
|
||||
var oaDocNo = new OaDocNo(layui);
|
||||
|
||||
// 初始化
|
||||
function initData() {
|
||||
@ -120,6 +122,8 @@
|
||||
formUtil.initShowUploadVideo('${field.data.id}', ${field.data.count});
|
||||
<#elseif field.data.tag == 'uploadAudio'>
|
||||
formUtil.initShowUploadAudio('${field.data.id}', ${field.data.count});
|
||||
<#elseif field.data.tag == 'docno'>
|
||||
oaDocNo.init();
|
||||
<#elseif field.data.tag == 'date'>
|
||||
formUtil.initDate({
|
||||
id: '${field.data.id}',
|
||||
|
@ -66,10 +66,10 @@
|
||||
<input type="hidden" id="formVersion" value="${r'${formVersion}'}">
|
||||
<input type="hidden" id="isNeedClaim" value="${r'${isNeedClaim}'}">
|
||||
</div>
|
||||
<script src="static/form/js/form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=1"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=1"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=1"></script>
|
||||
<script src="static/form/js/form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-user-select.js?v=2"></script>
|
||||
<script src="static/form/js/oa-form-util.js?v=2"></script>
|
||||
<script src="static/form/js/oa-docno.js?v=2"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
@ -120,7 +120,6 @@
|
||||
uid
|
||||
]), {}, null, function(code, data) {
|
||||
oaFormUtil.initSignList(data);
|
||||
oaDocNo.initDocNo(data)
|
||||
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
|
Loading…
Reference in New Issue
Block a user