Parcourir la source

自定义审核模板

[user3] il y a 4 ans
Parent
commit
96f724c890
26 fichiers modifiés avec 1475 ajouts et 770 suppressions
  1. 20 0
      src/main/java/com/jeeplus/modules/identification/dao/AuditTemplateDao.java
  2. 26 0
      src/main/java/com/jeeplus/modules/identification/entity/AuditTemplate.java
  3. 31 0
      src/main/java/com/jeeplus/modules/identification/service/AuditTemplateService.java
  4. 79 0
      src/main/java/com/jeeplus/modules/identification/web/AuditTemplateController.java
  5. 2 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  6. 11 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  7. 117 0
      src/main/resources/mappings/modules/identification/AuditTemplateDao.xml
  8. 90 0
      src/main/webapp/webpage/modules/identification/AuditTemplateForm.jsp
  9. 95 0
      src/main/webapp/webpage/modules/iframeView/opinion.jsp
  10. 75 61
      src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp
  11. 69 51
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp
  12. 79 56
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp
  13. 73 52
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp
  14. 71 51
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp
  15. 2 2
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp
  16. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportModify.jsp
  17. 79 52
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAudit.jsp
  18. 69 81
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp
  19. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageModify.jsp
  20. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp
  21. 128 80
      src/main/webapp/webpage/modules/sys/gridselectConsultantOpinion.jsp
  22. 66 59
      src/main/webapp/webpage/modules/workcontractinfo/workContractAudit.jsp
  23. 58 59
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp
  24. 80 57
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAuditEnd.jsp
  25. 77 55
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp
  26. 75 51
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp

+ 20 - 0
src/main/java/com/jeeplus/modules/identification/dao/AuditTemplateDao.java

@@ -0,0 +1,20 @@
+package com.jeeplus.modules.identification.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.identification.entity.AuditTemplate;
+
+import java.util.List;
+
+/**
+ * 自定义审核模板
+ */
+@MyBatisDao
+public interface AuditTemplateDao extends CrudDao<AuditTemplate> {
+    /**
+     * 根据标识和当前登录人查找模板信息
+     * @param auditTemplate
+     * @return
+     */
+    List<AuditTemplate> findByIdentification(AuditTemplate auditTemplate);
+}

+ 26 - 0
src/main/java/com/jeeplus/modules/identification/entity/AuditTemplate.java

@@ -0,0 +1,26 @@
+package com.jeeplus.modules.identification.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+/**
+ * 自定义审核模板
+ */
+public class AuditTemplate extends DataEntity<AuditTemplate> {
+    private String identification;  //模板标识
+    private String content; //模板内容
+
+    public String getIdentification() {
+        return identification;
+    }
+
+    public void setIdentification(String identification) {
+        this.identification = identification;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 31 - 0
src/main/java/com/jeeplus/modules/identification/service/AuditTemplateService.java

@@ -0,0 +1,31 @@
+package com.jeeplus.modules.identification.service;
+
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.modules.identification.dao.AuditTemplateDao;
+import com.jeeplus.modules.identification.entity.AuditTemplate;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+/**
+ * 自定义审核模板
+ */
+@Service
+@Transactional(readOnly = true)
+public class AuditTemplateService  extends CrudService<AuditTemplateDao, AuditTemplate> {
+    @Autowired
+    private AuditTemplateDao auditTemplateDao;
+    /**
+     * 根据标识和当前登录人查找模板信息
+     * @param auditTemplate
+     * @return
+     */
+    public List<AuditTemplate> findByIdentification(AuditTemplate auditTemplate){
+        auditTemplate.setCreateBy(UserUtils.getUser());
+        List<AuditTemplate> auditTemplates=auditTemplateDao.findByIdentification(auditTemplate);
+        return auditTemplates;
+    }
+
+}

+ 79 - 0
src/main/java/com/jeeplus/modules/identification/web/AuditTemplateController.java

@@ -0,0 +1,79 @@
+package com.jeeplus.modules.identification.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.identification.entity.AuditTemplate;
+import com.jeeplus.modules.identification.service.AuditTemplateService;
+import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
+import com.jeeplus.modules.ruralprojectrecords.entity.SubProjectInfo;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+/**
+ * 自定义审核模板
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/auditTemplate/auditTemplate")
+public class AuditTemplateController extends BaseController {
+    @Autowired
+    private AuditTemplateService auditTemplateService;
+    @ModelAttribute
+    public AuditTemplate get(@RequestParam(required=false) String id) {
+        AuditTemplate entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = auditTemplateService.get(id);
+        }
+        if (entity == null){
+            entity = new AuditTemplate();
+        }
+        return entity;
+    }
+    /**
+     * 增加模板页面
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = {"toSave"})
+    public String list(AuditTemplate auditTemplate, HttpServletRequest request, HttpServletResponse response, Model model) {
+        auditTemplate.setCreateBy(UserUtils.getUser());
+        model.addAttribute("auditTemplate",auditTemplate);
+        return "modules/identification/AuditTemplateForm";
+    }
+    /**
+     * 增加模板信息
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "save")
+    public String save(AuditTemplate auditTemplate, Model model) {
+        auditTemplateService.save(auditTemplate);
+        return "redirect:" + adminPath + "/oa/oaNotify/?repage";
+
+    }
+    /**
+     * 审核-展示
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "iframeView")
+    public String iframeView(AuditTemplate auditTemplate, Model model) {
+        List<AuditTemplate> auditTemplates=auditTemplateService.findByIdentification(auditTemplate);
+        model.addAttribute("auditTemplates",auditTemplates);
+        return "modules/iframeView/opinion";
+    }
+
+}

+ 2 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -762,6 +762,8 @@ public class RuralCostProjectMessageNewController extends BaseController {
      */
     @RequestMapping(value = "selectReproject")
     public String selectReproject(String auditOpinion, Model model) {
+        //审核意见模板标识
+        model.addAttribute("identification", "projectReportDataLeader");
         ProjectReportData projectReportData = new ProjectReportData();
         model.addAttribute("auditOpinion",auditOpinion);
         model.addAttribute("projectReportData",projectReportData);

+ 11 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -1066,6 +1066,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/workreimbursement/workReimbursementFormDetail";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification","workreimbursement");
 						if (workReimbursement.getAct() != null && StringUtils.isNotBlank(workReimbursement.getAct().getTaskDefKey()) && "cw".equals(workReimbursement.getAct().getTaskDefKey())) {
 							return "modules/workreimbursement/workReimbursementCWAudit";
 						}
@@ -1093,6 +1094,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/workcontractinfo/workContractInfoLookForm";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "workContractInfo");
 						if (workContractInfo.getAct() != null) {
 							if ("gzr".equals(workContractInfo.getAct().getTaskDefKey())) {
 								return "modules/workcontractinfo/workContractgzAudit";
@@ -1160,6 +1162,7 @@ public class WorkProjectNotifyController extends BaseController {
 								break;
 							}
 						}
+						model.addAttribute("identification","workinvoice");
 						if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey) ||
 								"scbzr".equals(taskDefKey))) {
 							return "modules/workinvoice/workInvoiceAudit";
@@ -1425,6 +1428,8 @@ public class WorkProjectNotifyController extends BaseController {
 									break;
 								}
 							}
+							//审核模板标识
+							model.addAttribute("identification", "ruralprojectrecords");
 							return "modules/ruralprojectrecords/ruralProjectRecordsAudit";
 						} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 							//查询工程类型信息
@@ -1490,6 +1495,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/ruralprojectrecords/ruralProjectRecordsView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "ruralprojectrecordsCheck");
 						switch (type){
 							case "1":
 								return "modules/ruralprojectrecords/check/ruralProjectRecordsAudit";
@@ -1692,6 +1698,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/workcontractrecord/workContractView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "workContractRecord");
 						return "modules/workcontractrecord/workContractRecordAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/workcontractrecord/workContractRecordModifyApply";
@@ -2615,6 +2622,7 @@ public class WorkProjectNotifyController extends BaseController {
 						projectcontentinfo.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
 						projectcontentinfo.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
 						projectcontentinfo.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
+						model.addAttribute("identification", "projectReportData");
 						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						Iterator<RuralReportConsultant> itView = consultants.iterator();
@@ -2897,6 +2905,7 @@ public class WorkProjectNotifyController extends BaseController {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
 						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						model.addAttribute("identification","projectcontentinfoFile");
 						return "modules/projectcontentinfo/projectReportRecordAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/projectcontentinfo/projectReportRecordModifyApply";
@@ -3098,6 +3107,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/oa/oaNotifyView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification","oaNotify");
 						return "modules/oa/oaNotifyAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/oa/oaNotifyModifyApply";
@@ -3595,6 +3605,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/projectFilingBatch/projectFilingBatchView";
 					} else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "projectFilingBatch");
 						return "modules/projectFilingBatch/projectFilingBatchAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/projectFilingBatch/projectFilingBatchApply";

+ 117 - 0
src/main/resources/mappings/modules/identification/AuditTemplateDao.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.identification.dao.AuditTemplateDao">
+
+	<sql id="auditColumns">
+		distinct a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.identification as "identification",
+		a.content as "content"
+	</sql>
+	<select id="get" resultType="com.jeeplus.modules.identification.entity.AuditTemplate" >
+		SELECT
+			<include refid="auditColumns"/>
+		FROM audit_template a
+		WHERE a.id = #{id}
+	</select>
+	<select id="findList" resultType="com.jeeplus.modules.identification.entity.AuditTemplate" >
+		SELECT
+			<include refid="auditColumns"/>
+		FROM audit_template a
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+    <select id="queryCount" resultType="int" >
+        SELECT
+        count(distinct a.id)
+        FROM audit_template a
+    </select>
+
+	<select id="findAllList" resultType="com.jeeplus.modules.identification.entity.AuditTemplate" >
+		SELECT
+			<include refid="auditColumns"/>
+		FROM audit_template a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findByIdentification" resultType="com.jeeplus.modules.identification.entity.AuditTemplate">
+		SELECT
+		<include refid="auditColumns"/>
+		FROM audit_template a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="identification!=null and identification!=''">
+				And a.identification = #{identification}
+			</if>
+			<if test="createBy.id!=null and createBy.id!=''">
+				And a.create_by = #{createBy.id}
+			</if>
+		</where>
+		ORDER BY a.create_date DESC
+	</select>
+
+	<insert id="insert">
+		INSERT INTO audit_template(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			identification,
+			content
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{identification},
+			#{content}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE audit_template SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			identification=#{identification},
+			content=#{content}
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM audit_template
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE audit_template SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+</mapper>

+ 90 - 0
src/main/webapp/webpage/modules/identification/AuditTemplateForm.jsp

@@ -0,0 +1,90 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>复核标准管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+    <style>
+        label.error{
+            top:40px;
+            left:0;
+        }
+        #standardDetail-error{
+            top:82px;
+            left:0;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            var edit = "${workReviewStandard.id}";
+            if(edit!=null && edit!=''){
+                $("#reviewParentButton").attr("disabled","disabled");
+            }
+        });
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <form:form id="inputForm" modelAttribute="auditTemplate" action="${ctx}/auditTemplate/auditTemplate/save" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>审核模板信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" readonly="true"  htmlEscape="false" class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">标识:</label>
+                    <div class="layui-input-block">
+                        <form:input path="identification" readonly="true" htmlEscape="false"  class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm12 with-textarea">
+                    <label class="layui-form-label ">模板信息:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="content" placeholder="请输入模板信息" id="content" htmlEscape="false" rows="4"  maxlength="255"  class="form-control required"/>
+                    </div>
+                </div>
+            </div>
+        </form:form>
+    </div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+
+</script>
+</body>
+</html>

+ 95 - 0
src/main/webapp/webpage/modules/iframeView/opinion.jsp

@@ -0,0 +1,95 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>Title</title>
+    <script src="${ctxStatic}/iSignature/js/jquery-1.4.2.min.js"></script>
+    <script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <form class="layui-form">
+            <div class="form-group layui-row">
+                <div class="layui-item layui-col-sm8 lw6 with-textarea">
+                    <div class="layui-input-block" style="margin-left:10px;position: relative">
+                        <textarea placeholder="请输入意见:" path="" id="opinion" class="form-control" rows="4" style="width: 100%;height: 80%;border: 1px solid #f1f1f1;padding: 5px;" maxlength="250"></textarea>
+                        <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
+                        <input type="file" name="upload_files" style="display: none;">
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm4 lw6 with-textarea">
+                    <div class="layui-input-block" style="margin-left:10px;">
+                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
+                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
+                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
+                        <div style="padding: 5px 0px;" class="layui-col-sm8">
+                            <select id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
+                                <option value=""></option>
+                                <c:forEach items="${auditTemplates}" var="var">
+                                    <option value="${var.content}">${var.content}</option>
+                                </c:forEach>
+                            </select>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+</div>
+<script>
+    function opinion(){
+        var op=$("opinion").val();
+        return op;
+    }
+    $(document).ready(function() {
+        var val = parent.document.getElementById("iframe").innerHTML;
+        if (val!=''){
+            $("#opinion").val(val)
+        }
+
+        $("#clearOpinon").click(function(){
+            var s=$("input[name='sh']").length;
+            for(var i=0;i<s;i++){
+                $("input[name='sh']").attr("checked",false)
+                layui.form.render();
+            }
+            $("#opinion").val("");
+            window.parent.f1("");
+        })
+        layui.use(['form', 'layer'], function () {
+            var form = layui.form;
+            //下拉框监听器
+            layui.form.on('select(opinion)', function(data){
+                var span=data.value;
+                if(span!=""){
+                    var opinion=$("#opinion").val()+span
+                    if (opinion.length<250){
+                        $("#opinion").val(opinion);
+                        window.parent.f1(opinion);
+                    }else if (opinion.length>=250){
+                        top.layer.msg('意见长度不能大于250字符!', {icon: 0});
+                    }
+                }
+            });
+            layui.form.on('checkbox(raopinion)', function(data){
+                var span=data.value;
+                if(span!=""){
+                    $(this).attr("checked",false)
+                    var opinion=$("#opinion").val()+span
+                    if (opinion.length<250){
+                        $("#opinion").val(opinion);
+                        window.parent.f1(opinion);
+                    }else if (opinion.length>=250){
+                        top.layer.msg('意见长度不能大于250字符!', {icon: 0});
+                    }
+                }
+            });
+        });
+    });
+</script>
+</body>
+</html>

+ 75 - 61
src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp

@@ -18,6 +18,8 @@
             if(validateForm.form()){
 
                 if(obj == 1){
+                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                    $("#opinion").val(ss);
                     $('#flag').val('yes');
                 }else{
                     $('#flag').val('no');
@@ -82,7 +84,10 @@
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
             }
         }
-
+        layui.use('form', function () {
+            var form = layui.form;
+            form.render();
+        });
         function changeUser(ids,names,parents) {
             var split = ids.split(',');
             var split2 = names.split(',');
@@ -142,6 +147,7 @@
             <form:hidden path="act.procInsId"/>
             <form:hidden path="act.procDefId"/>
             <form:hidden id="flag" path="act.flag"/>
+            <input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
             <div class="form-group layui-row first">
                 <div class="form-group layui-row">
                     <div class="form-group-label"><h2>公告状态</h2></div>
@@ -415,81 +421,89 @@
                         </table>
                     </div>
                 </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>审批意见</h2></div>
-                <div class="layui-item layui-col-sm8 lw6 with-textarea">
-                    <div class="layui-input-block" style="margin-left:10px;position: relative">
-                        <form:textarea placeholder="请输入审批意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-                        <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-                        <input type="file" name="upload_files" style="display: none;">
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm4 lw6 with-textarea">
-                    <div class="layui-input-block" style="margin-left:10px;">
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;">
-                            <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-                                <form:option value=""/>
-                                <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-                            </form:select>
-                        </div>
-                    </div>
-                </div>
-            </div>
 <%--            <div class="form-group layui-row">--%>
 <%--                <div class="form-group-label"><h2>审批意见</h2></div>--%>
-<%--                <div class="layui-item layui-col-xs12 with-textarea" >--%>
-<%--                    <label class="layui-form-label">审批意见:</label>--%>
-<%--                    <div class="layui-input-block">--%>
-<%--                        <form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />--%>
+<%--                <div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--                    <div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--                        <form:textarea placeholder="请输入审批意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--                        <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
 <%--                        <input type="file" name="upload_files" style="display: none;">--%>
 <%--                    </div>--%>
 <%--                </div>--%>
+<%--                <div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--                    <div class="layui-input-block" style="margin-left:10px;">--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;">--%>
+<%--                            <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--                                <form:option value=""/>--%>
+<%--                                <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--                            </form:select>--%>
+<%--                        </div>--%>
+<%--                    </div>--%>
+<%--                </div>--%>
 <%--            </div>--%>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>审批流程</h2></div>
-                <div class="layui-item layui-col-xs12 form-table-container" >
-                    <act:flowChart procInsId="${oaNotify.act.procInsId}"/>
-                    <act:histoicFlow procInsId="${oaNotify.act.procInsId}"/>
-                </div>
-            </div>
+
 
             <div class="form-group layui-row page-end"></div>
         </form:form>
+        <div class="form-group-label">
+            <div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+            <h2>审批意见</h2>
+        </div>
+        <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+        <div class="form-group layui-row">
+            <div class="form-group-label"><h2>审批流程</h2></div>
+            <div class="layui-item layui-col-xs12 form-table-container" >
+                <act:flowChart procInsId="${oaNotify.act.procInsId}"/>
+                <act:histoicFlow procInsId="${oaNotify.act.procInsId}"/>
+            </div>
+        </div>
     </div>
 </div>
 <script>
-    $(document).ready(function() {
-        $("#clearOpinon").click(function(){
-            var s=$("input[name='sh']").length;
-            for(var i=0;i<s;i++){
-                $("input[name='sh']").attr("checked",false)
-                layui.form.render();
-            }
-            $("#opinion").val("");
-        })
-        layui.use(['form', 'layer'], function () {
-            var form = layui.form;
-            //下拉框监听器
-            layui.form.on('select(opinion)', function(data){
-                var span=data.value;
-                if(span!=""){
-                    var opinion=$("#opinion").val()+span+";"
-                    $("#opinion").val(opinion);
+
+    function f1(row) {
+        // window.parent.document.getElementById('opinion').value = row;
+        $("#opinion").val(row)
+    }
+    function openDialogre(title,url,width,height,target,buttons) {
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+            width = 'auto';
+            height = 'auto';
+        } else {//如果是PC端,根据用户设置的width和height显示。
+        }
+        var split = buttons.split(",");
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            maxmin: true, //开启最大化最小化按钮
+            skin: 'three-btns',
+            content: url,
+            btn: split,
+            btn1: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                 }
-            });
-            layui.form.on('checkbox(raopinion)', function(data){
-                var span=data.value;
-                if(span!=""){
-                    $(this).attr("checked",false)
-                    var opinion=$("#opinion").val()+span+";"
-                    $("#opinion").val(opinion);
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(1) ){
+                    // top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
                 }
-            });
+            },
+            btn2:function(index){
+            }
         });
-    })
+    }
 </script>
 </body>
 </html>

+ 69 - 51
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp

@@ -15,6 +15,8 @@
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1) {
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
                     $("#flag").val("yes");
                 }else {
                     if(obj == 2){
@@ -158,6 +160,7 @@
 		<form:hidden path="act.procInsId"/>
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 		<c:set var="status" value="${projectFilingBatch.filingStatus}" />
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>归档批次信息</h2></div>
@@ -364,33 +367,36 @@
 						</tbody>
 					</table>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
-
-
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 
 	</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >
@@ -401,35 +407,47 @@
 	</div>
 </div>
 <script type="text/javascript">
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-			}
-			$("#opinion").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(opinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
+	}
+
 	layui.use(['form', 'layer'], function () {
 		var form = layui.form;
 		//下拉框监听器

+ 79 - 56
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp

@@ -15,6 +15,8 @@
 			var fileNumTow =  $("#fileNumTow").val();
             if(validateForm.form()){
                 if(obj == 1){
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
 					/*if(fileNum == ''|| fileNum == undefined){
 						top.layer.msg('填写案卷号!', {icon: 0});
 						return;
@@ -85,6 +87,7 @@
 		<form:hidden path="act.procInsId"/>
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 		<sys:message content="${message}"/>
 			<div class="form-group layui-row first lw9">
 				<div class="form-group-label"><h2>基本信息</h2></div>
@@ -637,29 +640,29 @@
 					</table>
 				</div>
 			</div>--%>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 <%--			<div class="form-group layui-row">--%>
 <%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
 <%--				<div class="layui-item layui-col-xs12 with-textarea" >--%>
@@ -670,50 +673,67 @@
 <%--					</div>--%>
 <%--				</div>--%>
 <%--			</div>--%>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批流程</h2></div>
-				<div class="layui-item layui-col-xs12 form-table-container" >
-					<act:flowChart procInsId="${projectReportRecord.act.procInsId}"/>
-					<act:histoicFlow procInsId="${projectReportRecord.act.procInsId}"/>
-				</div>
-			</div>
+
 
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${projectReportRecord.act.procInsId}"/>
+				<act:histoicFlow procInsId="${projectReportRecord.act.procInsId}"/>
+			</div>
+		</div>
 	</div>
 </div>
 <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 <script>
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-			}
-			$("#opinion").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(opinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
+	}
 	function openBill3(title,url,width,height,target,formId,tableId){
 		var rows = $(this).parent().prevAll().length + 1;
 		var frameIndex = parent.layer.getFrameIndex(window.name);
@@ -839,6 +859,9 @@
 	}
 </script>
 <script>
+	layui.use(['form', 'layer'], function () {
+		var form = layui.form;
+	});
 	/*使用模块加载的方式 加载文件*/
 	layui.config({
 		base: '${ctx}/resoueces/css/layui/module/'

+ 73 - 52
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp

@@ -12,6 +12,8 @@
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1) {
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
                     $("#flag").val("yes");
                     var bzshbUserId = $("#bzshbUserId").val();
                     if(undefined == bzshbUserId || null == bzshbUserId || '' == bzshbUserId){
@@ -129,7 +131,7 @@
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
 		<c:set var="status" value="${projectRecords.act.status}" />
-
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>项目合同信息</h2></div>
 				<div id="div1">
@@ -473,29 +475,29 @@
 					</table>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>提交说明</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入说明:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="form-group-label"><h2>提交说明</h2></div>--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入说明:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 <%--			<div class="form-group layui-row">--%>
 <%--				<div class="form-group-label"><h2>提交说明</h2></div>--%>
 <%--				<div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
@@ -508,36 +510,51 @@
 <%--			</div>--%>
 
 			<script>
-				$(document).ready(function() {
-					$("#clearOpinon").click(function(){
-						var s=$("input[name='sh']").length;
-						for(var i=0;i<s;i++){
-							$("input[name='sh']").attr("checked",false)
-							layui.form.render();
-						}
-						$("#opinion").val("");
-					})
-					layui.use(['form', 'layer'], function () {
-						var form = layui.form;
-						//下拉框监听器
-						layui.form.on('select(opinion)', function(data){
-							var span=data.value;
-							if(span!=""){
-								var opinion=$("#opinion").val()+span+";"
-								$("#opinion").val(opinion);
+				layui.use(['form', 'layer'], function () {
+					var form = layui.form;
+				});
+				function f1(row) {
+					// window.parent.document.getElementById('opinion').value = row;
+					$("#opinion").val(row)
+				}
+				function openDialogre(title,url,width,height,target,buttons) {
+					if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+						width = 'auto';
+						height = 'auto';
+					} else {//如果是PC端,根据用户设置的width和height显示。
+					}
+					var split = buttons.split(",");
+					top.layer.open({
+						type: 2,
+						area: [width, height],
+						title: title,
+						maxmin: true, //开启最大化最小化按钮
+						skin: 'three-btns',
+						content: url,
+						btn: split,
+						btn1: function(index, layero){
+							var body = top.layer.getChildFrame('body', index);
+							var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+							var inputForm = body.find('#inputForm');
+							var top_iframe;
+							if(target){
+								top_iframe = target;//如果指定了iframe,则在改frame中跳转
+							}else{
+								top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 							}
-						});
-						layui.form.on('checkbox(raopinion)', function(data){
-							var span=data.value;
-							if(span!=""){
-								$(this).attr("checked",false)
-								var opinion=$("#opinion").val()+span+";"
-								$("#opinion").val(opinion);
+							inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+							if(iframeWin.contentWindow.doSubmit(1) ){
+								// top.layer.close(index);//关闭对话框。
+								setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+								setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 							}
-						});
+						},
+						btn2:function(index){
+						}
 					});
-				})
-                var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+				}
+
+				var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 $(document).ready(function() {
                     var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
@@ -556,7 +573,11 @@
 			</script>
 
 	</form:form>
-
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>提交说明</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 71 - 51
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp

@@ -14,6 +14,8 @@
 				var fileNum =  $("#fileNum").val();
 				var fileNumTow =  $("#fileNumTow").val();
                 if(obj == 1) {
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
                     $("#flag").val("yes");
                     var bzshbUserId = $("#bzshbUserId").val();
                     if(undefined == bzshbUserId || null == bzshbUserId || '' == bzshbUserId){
@@ -142,8 +144,8 @@
 		<form:hidden path="act.procInsId"/>
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 		<c:set var="status" value="${projectRecords.act.status}" />
-
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>项目合同信息</h2></div>
 				<div id="div1">
@@ -502,29 +504,29 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>提交说明</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入提交说明:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="form-group-label"><h2>提交说明</h2></div>--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入提交说明:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 <%--			<div class="form-group layui-row">--%>
 <%--				<div class="form-group-label"><h2>提交说明</h2></div>--%>
 <%--				<div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
@@ -537,35 +539,49 @@
 <%--			</div>--%>
 
 			<script>
-				$(document).ready(function() {
-					$("#clearOpinon").click(function(){
-						var s=$("input[name='sh']").length;
-						for(var i=0;i<s;i++){
-							$("input[name='sh']").attr("checked",false)
-							layui.form.render();
-						}
-						$("#opinion").val("");
-					})
-					layui.use(['form', 'layer'], function () {
-						var form = layui.form;
-						//下拉框监听器
-						layui.form.on('select(opinion)', function(data){
-							var span=data.value;
-							if(span!=""){
-								var opinion=$("#opinion").val()+span+";"
-								$("#opinion").val(opinion);
+				layui.use(['form', 'layer'], function () {
+					var form = layui.form;
+				});
+				function f1(row) {
+					// window.parent.document.getElementById('opinion').value = row;
+					$("#opinion").val(row)
+				}
+				function openDialogre(title,url,width,height,target,buttons) {
+					if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+						width = 'auto';
+						height = 'auto';
+					} else {//如果是PC端,根据用户设置的width和height显示。
+					}
+					var split = buttons.split(",");
+					top.layer.open({
+						type: 2,
+						area: [width, height],
+						title: title,
+						maxmin: true, //开启最大化最小化按钮
+						skin: 'three-btns',
+						content: url,
+						btn: split,
+						btn1: function(index, layero){
+							var body = top.layer.getChildFrame('body', index);
+							var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+							var inputForm = body.find('#inputForm');
+							var top_iframe;
+							if(target){
+								top_iframe = target;//如果指定了iframe,则在改frame中跳转
+							}else{
+								top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 							}
-						});
-						layui.form.on('checkbox(raopinion)', function(data){
-							var span=data.value;
-							if(span!=""){
-								$(this).attr("checked",false)
-								var opinion=$("#opinion").val()+span+";"
-								$("#opinion").val(opinion);
+							inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+							if(iframeWin.contentWindow.doSubmit(1) ){
+								// top.layer.close(index);//关闭对话框。
+								setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+								setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 							}
-						});
+						},
+						btn2:function(index){
+						}
 					});
-				})
+				}
                 var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 $(document).ready(function() {
@@ -584,7 +600,11 @@
 			</script>
 
 	</form:form>
-
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 2 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -307,7 +307,7 @@
         function selectNum() {
 			top.layer.open({
 				type: 2,
-				area: ['50%','95%'],
+				area: ['80%','95%'],
 				title:'选择报告号',
 				content: '${ctx}/projectreportnum/projectReportNum/select',
 				btn: ['确定','关闭'],
@@ -585,7 +585,7 @@
         	console.log(id);
 			top.layer.open({
 				type: 2,
-				area: ['50%','50%'],
+				area: ['80%','65%'],
 				title:"意见",
 				name:'friend',
 				skin:"two-btns",

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportModify.jsp

@@ -1896,7 +1896,7 @@
 		console.log(id);
 		top.layer.open({
 			type: 2,
-			area: ['50%','50%'],
+			area: ['80%','65%'],
 			title:"意见",
 			name:'friend',
 			skin:"two-btns",

+ 79 - 52
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAudit.jsp

@@ -14,6 +14,12 @@
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1) {
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
+					$("#iframe").load(function(){
+						var ss= $("#iframe")[0].contentWindow.opinion();
+						alert(ss)
+					});
                     $("#flag").val("yes");
                     /*if($("#taskDefKey").val()== "projectplan" && $(".trIdAdds").length==0){
                         top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
@@ -138,6 +144,7 @@
 		<form:hidden path="act.procInsId"/>
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
 		<c:set var="status" value="${projectRecords.act.status}" />
 
 			<div class="form-group layui-row first">
@@ -710,30 +717,28 @@
 <%--					</table>--%>
 <%--				</div>--%>
 <%--			</div>--%>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
-
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 
 			<script>
                 var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
@@ -749,34 +754,52 @@
                         addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
                         workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
                     }
-						$("#clearOpinon").click(function(){
-							var s=$("input[name='sh']").length;
-							for(var i=0;i<s;i++){
-								$("input[name='sh']").attr("checked",false)
-								layui.form.render();
-							}
-							$("#opinion").val("");
-						})
-						layui.use(['form', 'layer'], function () {
-							var form = layui.form;
-							//下拉框监听器
-							layui.form.on('select(opinion)', function(data){
-								var span=data.value;
-								if(span!=""){
-									var opinion=$("#opinion").val()+span+";"
-									$("#opinion").val(opinion);
-								}
-							});
-							layui.form.on('checkbox(raopinion)', function(data){
-								var span=data.value;
-								if(span!=""){
-									$(this).attr("checked",false)
-									var opinion=$("#opinion").val()+span+";"
-									$("#opinion").val(opinion);
-								}
-							});
-						});
+
                 });
+				layui.use('form', function () {
+					var form = layui.form;
+					form.render();
+				});
+                function f1(row) {
+					// window.parent.document.getElementById('opinion').value = row;
+					$("#opinion").val(row)
+                }
+				function openDialogre(title,url,width,height,target,buttons) {
+					if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+						width = 'auto';
+						height = 'auto';
+					} else {//如果是PC端,根据用户设置的width和height显示。
+					}
+					var split = buttons.split(",");
+					top.layer.open({
+						type: 2,
+						area: [width, height],
+						title: title,
+						maxmin: true, //开启最大化最小化按钮
+						skin: 'three-btns',
+						content: url,
+						btn: split,
+						btn1: function(index, layero){
+							var body = top.layer.getChildFrame('body', index);
+							var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+							var inputForm = body.find('#inputForm');
+							var top_iframe;
+							if(target){
+								top_iframe = target;//如果指定了iframe,则在改frame中跳转
+							}else{
+								top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+							}
+							inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+							if(iframeWin.contentWindow.doSubmit(1) ){
+								// top.layer.close(index);//关闭对话框。
+								setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+								setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
+							}
+						},
+						btn2:function(index){
+						}
+					});
+				}
 			</script>
 
 			<div class="form-group layui-row">
@@ -823,7 +846,11 @@
 			</div>
 
 	</form:form>
-
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 69 - 81
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp

@@ -15,6 +15,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1) {
+					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+					$("#opinion").val(ss);
 					var flags=judgment();
 					if (flags){
 						$("#flag").val("yes");
@@ -159,7 +161,7 @@
 			<form:hidden id="flag" path="projectReportData.act.flag"/>
 			<c:set var="status" value="${projectReportData.act.status}" />
 			<input type="hidden" id="type" value="${type}">
-
+			<input type="hidden" id="opinion" name="projectReportData.act.comment" value="" maxlength="250">
 			<sys:message content="${message}"/>
 			<%--<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>基本信息</h2></div>
@@ -1361,100 +1363,86 @@
 			</div>--%>
 
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="projectReportData.act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="projectReportData.act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
 <%--			<div class="form-group layui-row">--%>
 <%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
-<%--				<div class="layui-item layui-col-sm12 lw6 with-textarea">--%>
-<%--					<label class="layui-form-label">审批意见:</label>--%>
-<%--					<div class="layui-input-block">--%>
-<%--						<form:textarea path="projectReportData.act.comment" class="form-control" rows="4" maxlength="127" />--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入意见:" path="projectReportData.act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
 <%--						<input type="file" name="upload_files" style="display: none;">--%>
 <%--					</div>--%>
 <%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="projectReportData.act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
 <%--			</div>--%>
 
 		</form:form>
 
-
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre1('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 	</div>
 </div>
 <script>
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-
-			}
-			$("#opinion").val("");
-		})
-		$("#clearOpinons").click(function(){
-			var s=$("input[name='shs']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='shs']").attr("checked",false)
-				layui.form.render();
-
-			}
-			$("#technicistRemarks").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(opinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span
-					$("#opinion").val(opinion);
-				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span
-					$("#opinion").val(opinion);
-				}
-			});
-			layui.form.on('select(zixunOpinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#technicistRemarks").val()+span
-					$("#technicistRemarks").val(opinion);
+	layui.use('form', function () {
+		var form = layui.form;
+		form.render();
+	});
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre1(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinions)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#technicistRemarks").val()+span
-					$("#technicistRemarks").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
-		function openBill2(title,url,width,height,target,formId,tableId){
+	}
+
+	function openBill2(title,url,width,height,target,formId,tableId){
 		var rows = $(this).parent().prevAll().length + 1;
 		var frameIndex = parent.layer.getFrameIndex(window.name);
 		var urls = url+"&index="+frameIndex;
@@ -1581,7 +1569,7 @@
 		console.log(id);
 		top.layer.open({
 			type: 2,
-			area: ['50%','50%'],
+			area: ['80%','65%'],
 			title:"意见",
 			name:'friend',
 			skin:"two-btns",

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageModify.jsp

@@ -1238,7 +1238,7 @@
         console.log(id);
         top.layer.open({
             type: 2,
-            area: ['50%','50%'],
+            area: ['80%','65%'],
             title:"意见",
             name:'friend',
             skin:"two-btns",

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp

@@ -508,7 +508,7 @@
 			console.log(id);
 			top.layer.open({
 				type: 2,
-				area: ['50%','50%'],
+				area: ['80%','65%'],
 				title:"意见",
 				name:'friend',
 				skin:"two-btns",

+ 128 - 80
src/main/webapp/webpage/modules/sys/gridselectConsultantOpinion.jsp

@@ -19,47 +19,55 @@
 			});
 
 		function getSelectedItem() {
+			var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+			$("#reimburseRemarks").val(ss);
 			//获取意见栏信息
-				var reimburseRemarks = $("#reimburseRemarks").val();
-				if(reimburseRemarks == undefined || reimburseRemarks == null || reimburseRemarks == ''){
-					top.layer.msg("请输入审核意见")
-				}
-				return "0" + "_item_" + reimburseRemarks;
+			var reimburseRemarks = $("#reimburseRemarks").val();
+			if(reimburseRemarks == undefined || reimburseRemarks == null || reimburseRemarks == ''){
+				top.layer.msg("请输入审核意见")
+			}
+			return "0" + "_item_" + reimburseRemarks;
 		}
 	</script>
 </head>
 <body>
-<div class="wrapper wrapper-content">
+<div class="single-form">
 	<div class="layui-row">
 		<div class="full-width fl">
 			<div class="layui-row">
+				<div class="form-group-label">
+					<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+					<h2>审核意见</h2>
+				</div>
+				<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value">${auditOpinion}</iframe>
 				<form:form id="searchForm" modelAttribute="projectReportData" action="" method="post" class="layui-form">
 					<div class="commonQuery">
-					<div class="layui-item layui-col-sm12 lw7 with-textarea">
-						<label class="layui-form-label double-line"><span class="require-item">*</span>审核意见:</label>
-						<div class="layui-input-block">
-							<div class="layui-item layui-col-sm6 lw7 with-textarea">
-								<div class="layui-input-block" style="margin-left:0px;position: relative">
-									<textarea placeholder="请输入审核意见:" id="reimburseRemarks" name="reimburseRemarks" style="width: 100%" rows="10" class="form-control required" maxlength="500">${auditOpinion}</textarea>
-									<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-									<input type="file" name="upload_files" style="display: none;">
-								</div>
-							</div>
-							<div class="layui-item layui-col-sm4 lw6 with-textarea">
-								<div class="layui-input-block" style="margin-left:10px;">
-									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-									<div style="padding: 5px 0px;">
-										<form:select path="consultantRemarks" id="auditOpinion" lay-filter="zixunOpinion" lay-verify="zixunOpinion" class="form-control simple-select">
-											<form:option value=""/>
-											<form:options items="${fns:getMainDictListOnProjectAdvent('consultant_comments')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-										</form:select>
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
+					<input type="hidden" id="reimburseRemarks" name="reimburseRemarks" value="${auditOpinion}" maxlength="250">
+<%--					<div class="layui-item layui-col-sm12 lw7 with-textarea">--%>
+							<%--						<label class="layui-form-label double-line"><span class="require-item">*</span>审核意见:</label>--%>
+							<%--						<div class="layui-input-block">--%>
+							<%--							<div class="layui-item layui-col-sm6 lw7 with-textarea">--%>
+							<%--								<div class="layui-input-block" style="margin-left:0px;position: relative">--%>
+							<%--									<textarea placeholder="请输入审核意见:" id="reimburseRemarks" name="reimburseRemarks" style="width: 100%" rows="10" class="form-control required" maxlength="500">${auditOpinion}</textarea>--%>
+							<%--									<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+							<%--									<input type="file" name="upload_files" style="display: none;">--%>
+							<%--								</div>--%>
+							<%--							</div>--%>
+							<%--							<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+							<%--								<div class="layui-input-block" style="margin-left:10px;">--%>
+							<%--									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+							<%--									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+							<%--									<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+							<%--									<div style="padding: 5px 0px;">--%>
+							<%--										<form:select path="consultantRemarks" id="auditOpinion" lay-filter="zixunOpinion" lay-verify="zixunOpinion" class="form-control simple-select">--%>
+							<%--											<form:option value=""/>--%>
+							<%--											<form:options items="${fns:getMainDictListOnProjectAdvent('consultant_comments')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+							<%--										</form:select>--%>
+							<%--									</div>--%>
+							<%--								</div>--%>
+							<%--							</div>--%>
+							<%--						</div>--%>
+							<%--					</div>--%>
 					</div>
 				</form:form>
 			</div>
@@ -67,58 +75,98 @@
 	</div>
 </div>
 <script>
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-			}
-			$("#reimburseRemarks").val("");
-		})
-		$("#clearOpinons").click(function(){
-			var s=$("input[name='shs']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='shs']").attr("checked",false)
-				layui.form.render();
-			}
-			$("#fuzerenOpinion").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(zixunOpinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#reimburseRemarks").val()+span+";"
-					$("#reimburseRemarks").val(opinion);
-				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#reimburseRemarks").val()+span+";"
-					$("#reimburseRemarks").val(opinion);
-				}
-			});
-			layui.form.on('select(fuzerenOpinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#fuzerenOpinion").val()+span+";"
-					$("#fuzerenOpinion").val(opinion);
+	// $(document).ready(function() {
+	// 	$("#clearOpinon").click(function(){
+	// 		var s=$("input[name='sh']").length;
+	// 		for(var i=0;i<s;i++){
+	// 			$("input[name='sh']").attr("checked",false)
+	// 			layui.form.render();
+	// 		}
+	// 		$("#reimburseRemarks").val("");
+	// 	})
+	// 	$("#clearOpinons").click(function(){
+	// 		var s=$("input[name='shs']").length;
+	// 		for(var i=0;i<s;i++){
+	// 			$("input[name='shs']").attr("checked",false)
+	// 			layui.form.render();
+	// 		}
+	// 		$("#fuzerenOpinion").val("");
+	// 	})
+	// 	layui.use(['form', 'layer'], function () {
+	// 		var form = layui.form;
+	// 		//下拉框监听器
+	// 		layui.form.on('select(zixunOpinion)', function(data){
+	// 			var span=data.value;
+	// 			if(span!=""){
+	// 				var opinion=$("#reimburseRemarks").val()+span+";"
+	// 				$("#reimburseRemarks").val(opinion);
+	// 			}
+	// 		});
+	// 		layui.form.on('checkbox(raopinion)', function(data){
+	// 			var span=data.value;
+	// 			if(span!=""){
+	// 				$(this).attr("checked",false)
+	// 				var opinion=$("#reimburseRemarks").val()+span+";"
+	// 				$("#reimburseRemarks").val(opinion);
+	// 			}
+	// 		});
+	// 		layui.form.on('select(fuzerenOpinion)', function(data){
+	// 			var span=data.value;
+	// 			if(span!=""){
+	// 				var opinion=$("#fuzerenOpinion").val()+span+";"
+	// 				$("#fuzerenOpinion").val(opinion);
+	// 			}
+	// 		});
+	// 		layui.form.on('checkbox(raopinions)', function(data){
+	// 			var span=data.value;
+	// 			if(span!=""){
+	// 				$(this).attr("checked",false)
+	// 				var opinion=$("#fuzerenOpinion").val()+span+";"
+	// 				$("#fuzerenOpinion").val(opinion);
+	// 			}
+	// 		});
+	// 	});
+	// })
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinions)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#fuzerenOpinion").val()+span+";"
-					$("#fuzerenOpinion").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
+	}
 </script>
 </body>
 </html>

+ 66 - 59
src/main/webapp/webpage/modules/workcontractinfo/workContractAudit.jsp

@@ -12,6 +12,8 @@
             // 回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1) {
+                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                    $("#opinion").val(ss);
                     $("#flag").val("yes");
                 }else {
                     $("#flag").val("no");
@@ -58,14 +60,14 @@
 
 			<form:form id="inputForm" modelAttribute="workContractInfo" enctype="multipart/form-data" action="${ctx}/workcontractinfo/workContractInfo/saveAudit" method="post" class="form-horizontal layui-form">
 				<form:hidden path="id"/>
-			<form:hidden path="home"/>
+			    <form:hidden path="home"/>
 				<form:hidden path="act.taskId"/>
 				<form:hidden path="act.taskName"/>
 				<form:hidden path="act.taskDefKey"/>
 				<form:hidden path="act.procInsId"/>
 				<form:hidden path="act.procDefId"/>
 				<form:hidden id="flag" path="act.flag"/>
-
+                <input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 				<c:set var="status" value="${workContractInfo.act.status}" />
 				<div class="tabs-container" style="margin-top: 20px;">
 					<div class="tab-content">
@@ -251,41 +253,36 @@
 
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>审批意见</h2></div>
-                    <div class="layui-item layui-col-sm8 lw6 with-textarea">
-                        <div class="layui-input-block" style="margin-left:10px;position: relative">
-                            <form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-                            <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-                            <input type="file" name="upload_files" style="display: none;">
-                        </div>
-                    </div>
-                    <div class="layui-item layui-col-sm4 lw6 with-textarea">
-                        <div class="layui-input-block" style="margin-left:10px;">
-                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-                            <div style="padding: 5px 0px;">
-                                <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-                                    <form:option value=""/>
-                                    <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-                                </form:select>
-                            </div>
-                        </div>
-                    </div>
-                </div>
 <%--                <div class="form-group layui-row">--%>
 <%--                    <div class="form-group-label"><h2>审批意见</h2></div>--%>
-<%--                    <div class="layui-item layui-col-xs12 with-textarea" >--%>
-<%--                        <label class="layui-form-label">审批意见:</label>--%>
-<%--                        <div class="layui-input-block">--%>
-<%--                            <form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />--%>
+<%--                    <div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--                        <div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--                            <form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--                            <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
 <%--                            <input type="file" name="upload_files" style="display: none;">--%>
 <%--                        </div>--%>
 <%--                    </div>--%>
+<%--                    <div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--                        <div class="layui-input-block" style="margin-left:10px;">--%>
+<%--                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                            <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--                            <div style="padding: 5px 0px;">--%>
+<%--                                <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--                                    <form:option value=""/>--%>
+<%--                                    <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--                                </form:select>--%>
+<%--                            </div>--%>
+<%--                        </div>--%>
+<%--                    </div>--%>
 <%--                </div>--%>
 
             </form:form>
+        <div class="form-group-label">
+            <div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+            <h2>审批意见</h2>
+        </div>
+        <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
         <div class="form-group layui-row">
             <div class="form-group-label"><h2>审批流程</h2></div>
             <div class="layui-item layui-col-xs12 form-table-container" >
@@ -295,40 +292,50 @@
         </div>
     </div>
     <script>
-        $(document).ready(function() {
-            $("#clearOpinon").click(function(){
-                var s=$("input[name='sh']").length;
-                for(var i=0;i<s;i++){
-                    $("input[name='sh']").attr("checked",false)
-                    layui.form.render();
-
-                }
-                $("#opinion").val("");
-            })
-            layui.use(['form', 'layer'], function () {
-                var form = layui.form;
-                //下拉框监听器
-                layui.form.on('select(opinion)', function(data){
-                    var span=data.value;
-                    if(span!=""){
-                        var opinion=$("#opinion").val()+span+";"
-                        $("#opinion").val(opinion);
-                    }
-                });
-                layui.form.on('checkbox(raopinion)', function(data){
-                    var span=data.value;
-                    if(span!=""){
-                        $(this).attr("checked",false)
-                        var opinion=$("#opinion").val()+span+";"
-                        $("#opinion").val(opinion);
-                    }
-                });
-            });
-        })
         layui.use('form', function () {
             var form = layui.form;
             form.render();
         });
+        function f1(row) {
+            // window.parent.document.getElementById('opinion').value = row;
+            $("#opinion").val(row)
+        }
+        function openDialogre(title,url,width,height,target,buttons) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                        setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
+                    }
+                },
+                btn2:function(index){
+                }
+            });
+        }
     </script>
 </div>
 </body>

+ 58 - 59
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp

@@ -14,7 +14,9 @@
 		      var fileNum =  $("#fileNum").val();
 		      var fileNumTow =  $("#fileNumTow").val();
               if(obj == 1){
-                  $('#flag').val('yes');
+				  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				  $("#opinion").val(ss);
+				  $('#flag').val('yes');
                   if(fileNum == ''|| fileNum == undefined){
                       top.layer.msg('填写案卷号!', {icon: 0});
                       return;
@@ -38,6 +40,10 @@
 		  return false;
 		}
 		$(document).ready(function() {
+			layui.use('form', function () {
+				var form = layui.form;
+				form.render();
+			});
 			validateForm = $("#inputForm").validate({
 				submitHandler: function(form){
 					loading('正在提交,请稍等...');
@@ -105,7 +111,7 @@
 			<form:hidden path="act.procDefId"/>
 			<form:hidden id="flag" path="act.flag"/>
 			<sys:message content="${message}"/>
-
+			<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 			<div class="form-group layui-row first lw8">
 				<div class="form-group-label"><h2>基础信息</h2></div>
 				<div class="layui-item layui-col-sm6">
@@ -276,71 +282,64 @@
 <%--					</div>--%>
 <%--				</div>--%>
 <%--			</div>--%>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批流程</h2></div>
-				<div class="layui-item layui-col-xs12 form-table-container" >
-					<act:flowChart procInsId="${workContractRecord.act.procInsId}"/>
-					<act:histoicFlow procInsId="${workContractRecord.act.procInsId}"/>
-				</div>
-			</div>
+
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${workContractRecord.act.procInsId}"/>
+				<act:histoicFlow procInsId="${workContractRecord.act.procInsId}"/>
+			</div>
+		</div>
 	</div>
 </div>
 <script>
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-
-			}
-			$("#opinion").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(opinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
+	}
 </script>
 </body>
 </html>

+ 80 - 57
src/main/webapp/webpage/modules/workinvoice/workInvoiceAuditEnd.jsp

@@ -19,6 +19,8 @@
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 		  if(validateForm.form()){
               if(obj == 1) {
+			  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+			  $("#opinion").val(ss);
               	//非空验证
 				  var ff=true;
 				  $(".judgment").each(function(){
@@ -70,7 +72,10 @@
 		  return false;
 		}
 		$(document).ready(function() {
-
+			layui.use('form', function () {
+				var form = layui.form;
+				form.render();
+			});
 			$("#name").focus();
 			validateForm = $("#inputForm").validate({
 				submitHandler: function(form){
@@ -461,7 +466,7 @@
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
 		<c:set var="status" value="${workInvoice.act.status}" />
-
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
 		<div class="form-group layui-row first lw14">
 			<div class="form-group-label"><h2>基本信息</h2></div>
 			<div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
@@ -603,29 +608,29 @@
 					<input type="text"  readonly="true" value="${workInvoice.accountCheckingUserName}"  class="form-control layui-input" style="background-color: #f1f1f1" >
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>审批意见</h2></div>
-				<div class="layui-item layui-col-sm8 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;position: relative">
-						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-						<input type="file" name="upload_files" style="display: none;">
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm4 lw6 with-textarea">
-					<div class="layui-input-block" style="margin-left:10px;">
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-						<div style="padding: 5px 0px;">
-							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-								<form:option value=""/>
-								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-							</form:select>
-						</div>
-					</div>
-				</div>
-			</div>
+<%--			<div class="form-group layui-row">--%>
+<%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
+<%--				<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--						<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--						<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--						<input type="file" name="upload_files" style="display: none;">--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--				<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--					<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--						<div style="padding: 5px 0px;">--%>
+<%--							<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--								<form:option value=""/>--%>
+<%--								<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--							</form:select>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
 <%--			<div class="layui-item layui-col-sm12 with-textarea">--%>
 <%--				<label class="layui-form-label">审批意见:</label>--%>
 <%--				<div class="layui-input-block">--%>
@@ -714,35 +719,6 @@
 							</tr>//-->
 				</script>
 				<script type="text/javascript">
-					$(document).ready(function() {
-						$("#clearOpinon").click(function(){
-							var s=$("input[name='sh']").length;
-							for(var i=0;i<s;i++){
-								$("input[name='sh']").attr("checked",false)
-								layui.form.render();
-							}
-							$("#opinion").val("");
-						})
-						layui.use(['form', 'layer'], function () {
-							var form = layui.form;
-							//下拉框监听器
-							layui.form.on('select(opinion)', function(data){
-								var span=data.value;
-								if(span!=""){
-									var opinion=$("#opinion").val()+span+";"
-									$("#opinion").val(opinion);
-								}
-							});
-							layui.form.on('checkbox(raopinion)', function(data){
-								var span=data.value;
-								if(span!=""){
-									$(this).attr("checked",false)
-									var opinion=$("#opinion").val()+span+";"
-									$("#opinion").val(opinion);
-								}
-							});
-						});
-					})
 					var workAccountListRowIdx = 0, workAccountListTpl = $("#workAccountListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 					$(document).ready(function() {
 						var data = ${fns:toJson(workInvoice.workAccountList)};
@@ -756,9 +732,59 @@
 							workAccountListRowIdx = workAccountListRowIdx + 1;
 						}
 					});
+					function f1(row) {
+						// window.parent.document.getElementById('opinion').value = row;
+						$("#opinion").val(row)
+					}
+					function openDialogre(title,url,width,height,target,buttons) {
+						if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+							width = 'auto';
+							height = 'auto';
+						} else {//如果是PC端,根据用户设置的width和height显示。
+						}
+						var split = buttons.split(",");
+						top.layer.open({
+							type: 2,
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							skin: 'three-btns',
+							content: url,
+							btn: split,
+							btn1: function(index, layero){
+								var body = top.layer.getChildFrame('body', index);
+								var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+								var inputForm = body.find('#inputForm');
+								var top_iframe;
+								if(target){
+									top_iframe = target;//如果指定了iframe,则在改frame中跳转
+								}else{
+									top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+								}
+								inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+								if(iframeWin.contentWindow.doSubmit(1) ){
+									// top.layer.close(index);//关闭对话框。
+									setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+									setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
+								}
+							},
+							btn2:function(index){
+							}
+						});
+					}
 				</script>
 			</div>
 		</div>
+
+
+		<div class="form-group layui-row page-end"></div>
+	</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+
 		<div class="form-group layui-row">
 			<div class="form-group-label"><h2>审批流程</h2></div>
 			<div class="layui-item layui-col-xs12 form-table-container" >
@@ -766,9 +792,6 @@
 				<act:histoicFlow procInsId="${workInvoice.act.procInsId}" />
 			</div>
 		</div>
-
-		<div class="form-group layui-row page-end"></div>
-	</form:form>
 	</div>
 </div>
 </body>

+ 77 - 55
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp

@@ -11,6 +11,8 @@
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 		  if(validateForm.form()){
 		      if(obj == 1){
+				  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				  $("#opinion").val(ss);
                   $('#flag').val('yes');
               }else{
                   $('#flag').val('no');
@@ -24,6 +26,10 @@
 		  return false;
 		}
 		$(document).ready(function() {
+			layui.use('form', function () {
+				var form = layui.form;
+				form.render();
+			});
             if (${workReimbursement.ext == 0}){
                 $(".td1").removeClass("hide");
                 $(".project_reimbursement_div").show();
@@ -79,7 +85,7 @@
 		<form:hidden path="act.procInsId"/>
 		<form:hidden path="act.procDefId"/>
 		<form:hidden id="flag" path="act.flag"/>
-
+		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
 		<div class="form-group layui-row first ">
 			<div class="form-group-label"><h2>基础信息</h2></div>
 			<div class="layui-item layui-col-sm6">
@@ -455,29 +461,29 @@
 				</table>
 			</div>
 		</div>
-		<div class="form-group layui-row">
-			<div class="form-group-label"><h2>审批意见</h2></div>
-			<div class="layui-item layui-col-sm8 lw6 with-textarea">
-				<div class="layui-input-block" style="margin-left:10px;position: relative">
-					<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-					<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-					<input type="file" name="upload_files" style="display: none;">
-				</div>
-			</div>
-			<div class="layui-item layui-col-sm4 lw6 with-textarea">
-				<div class="layui-input-block" style="margin-left:10px;">
-					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-					<div style="padding: 5px 0px;">
-						<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-							<form:option value=""/>
-							<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-						</form:select>
-					</div>
-				</div>
-			</div>
-		</div>
+<%--		<div class="form-group layui-row">--%>
+<%--			<div class="form-group-label"><h2>审批意见</h2></div>--%>
+<%--			<div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--				<div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--					<form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--					<a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--					<input type="file" name="upload_files" style="display: none;">--%>
+<%--				</div>--%>
+<%--			</div>--%>
+<%--			<div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--				<div class="layui-input-block" style="margin-left:10px;">--%>
+<%--					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--					<div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--					<div style="padding: 5px 0px;">--%>
+<%--						<form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--							<form:option value=""/>--%>
+<%--							<form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--						</form:select>--%>
+<%--					</div>--%>
+<%--				</div>--%>
+<%--			</div>--%>
+<%--		</div>--%>
 <%--		<div class="form-group layui-row">--%>
 <%--			<div class="form-group-label"><h2>审批意见</h2></div>--%>
 <%--			<div class="layui-item layui-col-xs12 with-textarea" >--%>
@@ -488,48 +494,64 @@
 <%--					</div>--%>
 <%--			</div>--%>
 <%--		</div>--%>
+		<div class="form-group layui-row page-end"></div>
+	</form:form>
+		<div class="form-group-label">
+			<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+			<h2>审批意见</h2>
+		</div>
+		<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
 		<div class="form-group layui-row">
 			<div class="form-group-label"><h2>审批流程</h2></div>
 			<div class="layui-item layui-col-xs12 form-table-container" >
-		<act:flowChart procInsId="${workReimbursement.act.procInsId}"/>
-		<act:histoicFlow procInsId="${workReimbursement.act.procInsId}"/>
+				<act:flowChart procInsId="${workReimbursement.act.procInsId}"/>
+				<act:histoicFlow procInsId="${workReimbursement.act.procInsId}"/>
 			</div>
 		</div>
-
-		<div class="form-group layui-row page-end"></div>
-	</form:form>
 </div>
 </div>
 <script>
-	$(document).ready(function() {
-		$("#clearOpinon").click(function(){
-			var s=$("input[name='sh']").length;
-			for(var i=0;i<s;i++){
-				$("input[name='sh']").attr("checked",false)
-				layui.form.render();
-			}
-			$("#opinion").val("");
-		})
-		layui.use(['form', 'layer'], function () {
-			var form = layui.form;
-			//下拉框监听器
-			layui.form.on('select(opinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+	function f1(row) {
+		// window.parent.document.getElementById('opinion').value = row;
+		$("#opinion").val(row)
+	}
+	function openDialogre(title,url,width,height,target,buttons) {
+		if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+			width = 'auto';
+			height = 'auto';
+		} else {//如果是PC端,根据用户设置的width和height显示。
+		}
+		var split = buttons.split(",");
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			skin: 'three-btns',
+			content: url,
+			btn: split,
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 				}
-			});
-			layui.form.on('checkbox(raopinion)', function(data){
-				var span=data.value;
-				if(span!=""){
-					$(this).attr("checked",false)
-					var opinion=$("#opinion").val()+span+";"
-					$("#opinion").val(opinion);
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
 				}
-			});
+			},
+			btn2:function(index){
+			}
 		});
-	})
+	}
+
 </script>
 </body>
 </html>

+ 75 - 51
src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp

@@ -12,6 +12,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 1){
+                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                    $("#opinion").val(ss);
                     $('#flag').val('yes');
                     var idx1 = $("#contentTable tbody").length;
                     /*for(var i = 0;i < idx1; i++){
@@ -73,6 +75,10 @@
             return false;
         }
         $(document).ready(function() {
+            layui.use('form', function () {
+                var form = layui.form;
+                form.render();
+            });
             if (${workReimbursement.ext == 0}){
                 $(".td1").removeClass("hide");
                 $(".project_reimbursement_div").show();
@@ -263,6 +269,7 @@
         <form:hidden path="act.procInsId"/>
         <form:hidden path="act.procDefId"/>
         <form:hidden id="flag" path="act.flag"/>
+         <input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
             <div class="form-group layui-row first ">
                 <div class="form-group-label"><h2>基础信息</h2></div>
                 <div class="layui-item layui-col-sm6">
@@ -773,29 +780,29 @@
                 </table>
             </div>
         </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>审批意见</h2></div>
-                <div class="layui-item layui-col-sm8 lw6 with-textarea">
-                    <div class="layui-input-block" style="margin-left:10px;position: relative">
-                        <form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />
-                        <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>
-                        <input type="file" name="upload_files" style="display: none;">
-                    </div>
-                </div>
-                <div class="layui-item layui-col-sm4 lw6 with-textarea">
-                    <div class="layui-input-block" style="margin-left:10px;">
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>
-                        <div style="padding: 5px 0px;">
-                            <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
-                                <form:option value=""/>
-                                <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
-                            </form:select>
-                        </div>
-                    </div>
-                </div>
-            </div>
+<%--            <div class="form-group layui-row">--%>
+<%--                <div class="form-group-label"><h2>审批意见</h2></div>--%>
+<%--                <div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
+<%--                    <div class="layui-input-block" style="margin-left:10px;position: relative">--%>
+<%--                        <form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
+<%--                        <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
+<%--                        <input type="file" name="upload_files" style="display: none;">--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--                <div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
+<%--                    <div class="layui-input-block" style="margin-left:10px;">--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
+<%--                        <div style="padding: 5px 0px;">--%>
+<%--                            <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
+<%--                                <form:option value=""/>--%>
+<%--                                <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+<%--                            </form:select>--%>
+<%--                        </div>--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--            </div>--%>
 <%--        <div class="form-group layui-row">--%>
 <%--            <div class="form-group-label"><h2>审批意见</h2></div>--%>
 <%--            <div class="layui-item layui-col-xs12 with-textarea" >--%>
@@ -806,6 +813,14 @@
 <%--                </div>--%>
 <%--            </div>--%>
 <%--        </div>--%>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+        <div class="form-group-label">
+            <div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${identification}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>
+            <h2>审批意见</h2>
+        </div>
+        <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
         <div class="form-group layui-row">
             <div class="form-group-label"><h2>审批流程</h2></div>
             <div class="layui-item layui-col-xs12 form-table-container" >
@@ -813,40 +828,49 @@
                 <act:histoicFlow procInsId="${workReimbursement.act.procInsId}"/>
             </div>
         </div>
-            <div class="form-group layui-row page-end"></div>
-        </form:form>
     </div>
 </div>
 <script>
-    $(document).ready(function() {
-        $("#clearOpinon").click(function(){
-            var s=$("input[name='sh']").length;
-            for(var i=0;i<s;i++){
-                $("input[name='sh']").attr("checked",false)
-                layui.form.render();
-            }
-            $("#opinion").val("");
-        })
-        layui.use(['form', 'layer'], function () {
-            var form = layui.form;
-            //下拉框监听器
-            layui.form.on('select(opinion)', function(data){
-                var span=data.value;
-                if(span!=""){
-                    var opinion=$("#opinion").val()+span+";"
-                    $("#opinion").val(opinion);
+    function f1(row) {
+        // window.parent.document.getElementById('opinion').value = row;
+        $("#opinion").val(row)
+    }
+    function openDialogre(title,url,width,height,target,buttons) {
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+            width = 'auto';
+            height = 'auto';
+        } else {//如果是PC端,根据用户设置的width和height显示。
+        }
+        var split = buttons.split(",");
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            maxmin: true, //开启最大化最小化按钮
+            skin: 'three-btns',
+            content: url,
+            btn: split,
+            btn1: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                 }
-            });
-            layui.form.on('checkbox(raopinion)', function(data){
-                var span=data.value;
-                if(span!=""){
-                    $(this).attr("checked",false)
-                    var opinion=$("#opinion").val()+span+";"
-                    $("#opinion").val(opinion);
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(1) ){
+                    // top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    setTimeout(function(){top.layer.close(document.getElementById('iframe').contentWindow.location.reload())}, 100);
                 }
-            });
+            },
+            btn2:function(index){
+            }
         });
-    })
+    }
 </script>
 </body>
 </html>