diff --git a/module-activiti/src/main/java/ink/wgink/module/activiti/service/oa/impl/OaFormReportServiceImpl.java b/module-activiti/src/main/java/ink/wgink/module/activiti/service/oa/impl/OaFormReportServiceImpl.java index 40477aea..0d7c7bc9 100644 --- a/module-activiti/src/main/java/ink/wgink/module/activiti/service/oa/impl/OaFormReportServiceImpl.java +++ b/module-activiti/src/main/java/ink/wgink/module/activiti/service/oa/impl/OaFormReportServiceImpl.java @@ -501,7 +501,7 @@ public class OaFormReportServiceImpl extends DefaultBaseService implements IOaFo List signComments = taskService.getProcessInstanceComments(processInstanceId, TaskCommentTypeEnum.SIGN.getValue()); for (Comment comment : signComments) { TaskCommentBO taskCommentBO = JSONObject.parseObject(comment.getFullMessage(), TaskCommentBO.class); - detail.put(taskCommentBO.getFieldName(), String.format("姓名:%s。 内容:%s。 时间:%s。", taskCommentBO.getUserName(), taskCommentBO.getContent(), taskCommentBO.getTime())); + detail.put(taskCommentBO.getFieldName(), String.format("%s。 %s。 %s。", taskCommentBO.getContent(), taskCommentBO.getUserName(), taskCommentBO.getTime())); } LOG.debug("会签的内容"); 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 f867254d..b2bec1a6 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 @@ -74,8 +74,8 @@ function OaFormUtil(layui) { for (var i = 0, item; item = jointlySigns[i++];) { signListDom += [ '
', - ' 姓名:' + item.userName + '。 ', - ' 内容:' + item.content + '。', + ' ' + item.content + '。', + ' ' + item.userName + '。 ', ' ' + item.time + '', '
' ].join(''); @@ -102,7 +102,7 @@ function OaFormUtil(layui) { } var jointlySignListText = ''; for (var i = 0, item; item = jointlySigns[i++];) { - jointlySignListText += '姓名:' + item.userName + '。 内容:' + item.content + '。 时间:' + item.time + '。\n'; + jointlySignListText += item.content + '。 ' + item.userName + '。 ' + item.time + '。\n'; } formData[key] = jointlySignListText; } @@ -411,6 +411,28 @@ function OaFormUtil(layui) { doms.attr('lay-verify', ''); } + /** + * 禁用字段转div + */ + this.disabledField2Div = function() { + var doms = $('#reportForm').find('input,textarea,select'); + $.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 +'
') + + } + }); + } + /** * @description 隐藏字段操作 * @param fields {Array} [{fieldName:'', isVisible: 0|1}] 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 33cdc626..0dd5ed21 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 @@ -127,6 +127,8 @@ form.render(null, 'dataForm'); + + oaFormUtil.disabledField2Div(); }, function(code, data) { layer.msg(data.msg); }, function() { diff --git a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-update.ftl b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-update.ftl index 7bf965c8..36972e5d 100644 --- a/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-update.ftl +++ b/module-form/src/main/resources/templates/ftl/page/app/oa/app-form-update.ftl @@ -144,6 +144,8 @@ oaFormUtil.backFillFields(fields, currentUser); oaFormUtil.hideFields(fields); oaFormUtil.disableFields(fields); + + oaFormUtil.disabledField2Div(); }, function(code, data) { layer.msg(data.msg); }, function() {