Преглед на файлове

默认意见等功能提交

user5 преди 3 години
родител
ревизия
535fca86bf

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

@@ -17,4 +17,10 @@ public interface AuditTemplateDao extends CrudDao<AuditTemplate> {
      * @return
      */
     List<AuditTemplate> findByIdentification(AuditTemplate auditTemplate);
+    /**
+     * 根据标识查找默认模板信息
+     * @param auditTemplate
+     * @return
+     */
+    List<AuditTemplate> findDefaultByIdentification(AuditTemplate auditTemplate);
 }

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

@@ -58,6 +58,15 @@ public class AuditTemplateService  extends CrudService<AuditTemplateDao, AuditTe
         List<AuditTemplate> auditTemplates=auditTemplateDao.findByIdentification(auditTemplate);
         return auditTemplates;
     }
+    /**
+     * 根据标识查找默认模板信息
+     * @param auditTemplate
+     * @return
+     */
+    public List<AuditTemplate> findDefaultByIdentification(AuditTemplate auditTemplate){
+        List<AuditTemplate> auditTemplates=auditTemplateDao.findDefaultByIdentification(auditTemplate);
+        return auditTemplates;
+    }
     @Transactional(readOnly = false)
     public Integer deleteById(AuditTemplate auditTemplate){
         return auditTemplateDao.delete(auditTemplate);

+ 5 - 2
src/main/java/com/jeeplus/modules/identification/web/AuditTemplateController.java

@@ -76,10 +76,12 @@ public class AuditTemplateController extends BaseController {
      */
     @RequestMapping(value = "opinionForm")
     public String opinionForm(AuditTemplate auditTemplate ,HttpServletRequest request,HttpServletResponse response,Model model){
+        List<AuditTemplate> auditTemplateList = auditTemplateService.findByIdentification(auditTemplate);
+        List<AuditTemplate> auditDefaultTemplateList = auditTemplateService.findDefaultByIdentification(auditTemplate);
         Page<AuditTemplate> page=auditTemplateService.findPage(new Page<AuditTemplate>(request, response),auditTemplate);
         model.addAttribute("auditTemplate",auditTemplate);
-        model.addAttribute("page",page);
-        model.addAttribute("auditTemplate",auditTemplate);
+        model.addAttribute("auditTemplateList",auditTemplateList);
+        model.addAttribute("auditDefaultTemplateList",auditDefaultTemplateList);
         return "modules/identification/opinionForm";
     }
 
@@ -125,6 +127,7 @@ public class AuditTemplateController extends BaseController {
     public String iframeView(AuditTemplate auditTemplate, Model model) {
         List<AuditTemplate> auditTemplates=auditTemplateService.findByIdentification(auditTemplate);
         model.addAttribute("auditTemplates",auditTemplates);
+        model.addAttribute("auditTemplate",auditTemplate);
         return "modules/iframeView/opinion";
     }
 

+ 2 - 0
src/main/java/com/jeeplus/modules/identification/web/AuditTemplateTypeController.java

@@ -66,6 +66,7 @@ public class AuditTemplateTypeController {
         List<MainDictDetail> mainDictList = DictUtils.getMainDictList("audit_opinion");
 
         if (auditTemplateType != null && StringUtils.isNotBlank(auditTemplateType.getId())){
+            model.addAttribute("modifyFlag","true");
             model.addAttribute("mainDictList", mainDictList);
             model.addAttribute("auditTemplateType",auditTemplateType);
             return  "modules/identification/AuditTemplateTypeForm";
@@ -83,6 +84,7 @@ public class AuditTemplateTypeController {
         auditTemplateType.setCreateBy(UserUtils.getUser());
         auditTemplateType.setCreateDate(new Date());
         model.addAttribute("auditTemplateType",auditTemplateType);
+        model.addAttribute("modifyFlag","false");
         // 返回添加页面
         return "modules/identification/AuditTemplateTypeForm";
     }

+ 8 - 2
src/main/java/com/jeeplus/modules/projectAccessory/service/CollectAccessoryService.java

@@ -68,6 +68,7 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
         collectAccessoryInfo.setType("1");
         List<CollectAccessoryInfo> individualList = dao.getTypeList(collectAccessoryInfo);
         collectAccessoryInfo.setType("2");
+        collectAccessoryInfo.setPage(null);
         List<CollectAccessoryInfo> officeList = dao.getTypeList(collectAccessoryInfo);
         collectAccessoryInfo.setType("3");
         List<CollectAccessoryInfo> companyList = dao.getTypeList(collectAccessoryInfo);
@@ -112,6 +113,7 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
      */
     @Transactional(readOnly = false)
     public Integer saveCollectAccessory(CollectAccessoryInfo collectAccessoryInfo){
+        User loginUser = UserUtils.getUser();
         //添加收藏人id
         collectAccessoryInfo.setUserId(UserUtils.getUser().getId());
         //保存信息
@@ -132,7 +134,9 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
                 case "2":
                     //部门共享
                     //根据部门id查询部门内所有人
-                    List<User> officeUserList = UserUtils.getOfficeUserList();
+                    //List<User> officeUserList = UserUtils.getOfficeUserList();
+                    List<User> officeUserList = Lists.newArrayList();
+                    officeUserList.add(loginUser);
                     for (User user : officeUserList) {
                         workProjectNotifyService
                                 .save(UtilNotify
@@ -150,7 +154,9 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
                 case "3":
                     //公司共享
                     //根据公司id查询公司内所有人
-                    List<User> companyUserList = UserUtils.getCompanyUserList();
+                    //List<User> companyUserList = UserUtils.getCompanyUserList();
+                    List<User> companyUserList = Lists.newArrayList();
+                    companyUserList.add(loginUser);
                     for (User user : companyUserList) {
                         workProjectNotifyService
                                 .save(UtilNotify

+ 7 - 2
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectAccessoryService.java

@@ -306,6 +306,7 @@ public class ProjectAccessoryService extends TreeService<ProjectAccessoryDao, Pr
      */
     @Transactional(readOnly = false)
     public Integer saveCollectAccessory(CollectAccessoryInfo collectAccessoryInfo){
+        User loginUser = UserUtils.getUser();
         //添加收藏人id
         collectAccessoryInfo.setUserId(UserUtils.getUser().getId());
         //保存信息
@@ -324,7 +325,9 @@ public class ProjectAccessoryService extends TreeService<ProjectAccessoryDao, Pr
                 case "2":
                     //部门共享
                     //根据部门id查询部门内所有人
-                    List<User> officeUserList = UserUtils.getOfficeUserList();
+                    //List<User> officeUserList = UserUtils.getOfficeUserList();
+                    List<User> officeUserList = Lists.newArrayList();
+                    officeUserList.add(loginUser);
                     for (User user : officeUserList) {
                         workProjectNotifyService
                                 .save(UtilNotify
@@ -342,7 +345,9 @@ public class ProjectAccessoryService extends TreeService<ProjectAccessoryDao, Pr
                 case "3":
                     //公司共享
                     //根据公司id查询公司内所有人
-                    List<User> companyUserList = UserUtils.getCompanyUserList();
+                    //List<User> companyUserList = UserUtils.getCompanyUserList();
+                    List<User> companyUserList = Lists.newArrayList();
+                    companyUserList.add(loginUser);
                     for (User user : companyUserList) {
                         workProjectNotifyService
                                 .save(UtilNotify

+ 10 - 10
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java

@@ -160,30 +160,30 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         Integer month = c.get(Calendar.MONTH)+1; //第一个月从0开始,所以得到月份+1
         //当月最后一天
         logger.info("-----------公司级—月度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementCompany(2021,2,12);
+        statementCompanyComprehensiveService.disposeStatementCompany(2022,2,2);
         logger.info("------------公司级—月度报表(结束)------------------");
         logger.info("-----------部门级—月度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementOffice(2021,2,12);
+        statementCompanyComprehensiveService.disposeStatementOffice(2022,2,2);
         logger.info("------------部门级—月度报表(结束)------------------");
         //}
 
         map.put("msgMonth","月度报表处理完成");
 
-        logger.info("-----------公司级—季度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementCompany(2021,1,4);
+        /*logger.info("-----------公司级—季度报表(开始)------------------");
+        statementCompanyComprehensiveService.disposeStatementCompany(2022,1,1);
         logger.info("------------公司级—季度报表(结束)------------------");
         logger.info("-----------部门级—季度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementOffice(2021,1,4);
-        logger.info("------------部门级—季度报表(结束)------------------");
+        statementCompanyComprehensiveService.disposeStatementOffice(2022,1,1);
+        logger.info("------------部门级—季度报表(结束)------------------");*/
 
         map.put("msgQuarter","季度报表处理完成");
 
-        logger.info("-----------公司级—年度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementCompany(2021,0,0);
+        /*logger.info("-----------公司级—年度报表(开始)------------------");
+        statementCompanyComprehensiveService.disposeStatementCompany(2022,0,0);
         logger.info("------------公司级—年度报表(结束)------------------");
         logger.info("-----------部门级—年度报表(开始)------------------");
-        statementCompanyComprehensiveService.disposeStatementOffice(2021,0,0);
-        logger.info("------------部门级—年度报表(结束)------------------");
+        statementCompanyComprehensiveService.disposeStatementOffice(2022,0,0);
+        logger.info("------------部门级—年度报表(结束)------------------");*/
 
         map.put("msgYear","年度报表处理完成");
 

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

@@ -14,6 +14,18 @@
 		a.content as "content",
 		a.office_id as "officeId"
 	</sql>
+
+	<sql id="auditDefaultColumns">
+		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.name AS "name",
+		a.identification as "identification",
+		a.content as "content"
+	</sql>
 	<select id="get" resultType="com.jeeplus.modules.identification.entity.AuditTemplate" >
 		SELECT
 			<include refid="auditColumns"/>
@@ -102,6 +114,18 @@
 		</where>
 		ORDER BY a.create_date DESC
 	</select>
+	<select id="findDefaultByIdentification" resultType="com.jeeplus.modules.identification.entity.AuditTemplate">
+		SELECT
+		<include refid="auditDefaultColumns"/>
+		FROM default_audit_template a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="identification!=null and identification!=''">
+				And a.identification = #{identification}
+			</if>
+		</where>
+		ORDER BY a.create_date DESC
+	</select>
 
 	<insert id="insert">
 		INSERT INTO audit_template(

+ 4 - 1
src/main/resources/mappings/modules/identification/AuditTemplateTypeDao.xml

@@ -34,6 +34,9 @@
             <if test="flowPath !=null and flowPath != ''">
                 and a.flow_path like concat('%',#{flowPath},'%')
             </if>
+            <if test="identification !=null and identification != ''">
+                and a.identification =#{identification}
+            </if>
         </where>
         <choose>
             <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -93,4 +96,4 @@
 
 
 
-</mapper>
+</mapper>

+ 1 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -3315,7 +3315,7 @@
 				and a.record_state = 7
 				and a.over_record_status = 1
 				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
-				and rprr.status = 5
+				/*and rprr.status = 5*/
 				and rprr.del_flag = 0
 				and rprr.accomplish_date >= #{beginDate}
 				and rprr.accomplish_date &lt;= #{endDate}

+ 19 - 6
src/main/webapp/webpage/modules/identification/AuditTemplateTypeForm.jsp

@@ -566,12 +566,25 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label"><span class="require-item">*</span>审核类型:</label>
                     <div class="layui-input-block readOnlyFFF">
-                        <select  class="form-control simple-select required"  name="identification">
-                            <option value="" label="--请选择审核类型--">--请选择审核类型--</option>
-                            <c:forEach items="${mainDictList}" var="info" varStatus="status" >
-                                <option value="${info.value}"  <c:if test="${info.value == auditTemplateType.identification}">selected</c:if> >${info.label}</option>
-                            </c:forEach>
-                        </select>
+                        <c:choose>
+                            <c:when test="${modifyFlag}">
+                                <select  class="form-control simple-select required" disabled name="identification">
+                                    <option value="" label="--请选择审核类型--">--请选择审核类型--</option>
+                                    <c:forEach items="${mainDictList}" var="info" varStatus="status" >
+                                        <option value="${info.value}"  <c:if test="${info.value == auditTemplateType.identification}">selected</c:if> >${info.label}</option>
+                                    </c:forEach>
+                                </select>
+                            </c:when>
+                            <c:otherwise>
+                                <select  class="form-control simple-select required"  name="identification">
+                                    <option value="" label="--请选择审核类型--">--请选择审核类型--</option>
+                                    <c:forEach items="${mainDictList}" var="info" varStatus="status" >
+                                        <option value="${info.value}"  <c:if test="${info.value == auditTemplateType.identification}">selected</c:if> >${info.label}</option>
+                                    </c:forEach>
+                                </select>
+                            </c:otherwise>
+                        </c:choose>
+
                     </div>
                 </div>
 

+ 24 - 152
src/main/webapp/webpage/modules/identification/AuditTemplateTypeList.jsp

@@ -42,18 +42,6 @@
                     $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
                 }
             });
-            laydate.render({
-                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
-                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
-                type : 'date'
-                , trigger: 'click'
-            });
-            laydate.render({
-                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
-                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
-                type : 'date'
-                , trigger: 'click'
-            });
         });
 
         function reset() {
@@ -197,132 +185,11 @@
             height:100%;
         }
     </style>
-
-    <script>
-        function notifyDialogres(title,url,deleteUrl,width,height,target) {
-            parent.index = "";
-            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-                width='auto';
-                height='auto';
-            }else{//如果是PC端,根据用户设置的width和height显示。
-
-            }
-            top.layer.open({
-                type: 2,
-                area: [width, height],
-                title: title,
-                maxmin: true, //开启最大化最小化按钮
-                content: url ,
-                skin: 'three-btns',
-                btn: ['重新申请','作废', '关闭'],
-                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(3)) {
-                        top.layer.close(index);//关闭对话框。
-                        setTimeout(function () {
-                            top.layer.close(index)
-                        }, 100);//延时0.1秒,对应360 7.1版本bug
-                    }
-                },
-                btn2:function(index,layero){
-                    top.layer.confirm("项目作废", {icon: 3, title:'系统提示'}, function(index){
-                        $.ajax({
-                            type:'post',
-                            url:deleteUrl,
-                            success:function(data){
-                                top.layer.closeAll();//关闭所有对话框。
-                                if(data.code == 1){
-                                    top.layer.msg(data.msg, {icon: 1});
-                                }else{
-                                    top.layer.msg(data.msg, {icon: 0});
-                                }
-                                window.location.reload();
-                            }
-                        })
-                    });
-                    return false;
-                },cancel: function(index){
-                }
-            });
-        }
-
-        function notifyDialogre(title,url,width,height,target){
-            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-                width='auto';
-                height='auto';
-            }else{//如果是PC端,根据用户设置的width和height显示。
-
-            }
-            top.layer.open({
-                type: 2,
-                area: [width, height],
-                title: title,
-                skin:"three-btns",
-                maxmin: true, //开启最大化最小化按钮
-                content: url ,
-                btn: ['通过','驳回','关闭'],
-                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
-                    }
-                },
-                btn2: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(2) ){
-                        top.layer.close(index);//关闭对话框。
-                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
-                    }
-                    return false;
-                },
-                btn3: function(index){
-                }
-            });
-
-        }
-    </script>
 </head>
 <body>
 <div class="wrapper wrapper-content">
-    <%--	<sys:message content="${message}"/>--%>
-    <div class="layui-row">
-        <div class="full-width fl">
-            <%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
-                <ul class="list-tabs" >
-                    <li class="active"><a href="${ctx}/ruralProject/ruralProjectRecords/list">项目登记列表</a></li>
-                    <li><a href="${ctx}/ruralProject/ruralProjectRecordsAlter/list">项目变更列表</a></li>
-                </ul>
-            </div>--%>
-
-        </div>
+    <sys:message content="${message}"/>
+    <div class="layui-row ">
         <div class="full-width fl">
             <div class="layui-row contentShadow shadowLR" id="queryDiv">
                 <form:form id="searchForm" modelAttribute="auditTemplateType" action="${ctx}/auditTemplate/auditTemplateType" method="post" class="form-inline">
@@ -343,7 +210,6 @@
                                 <input id="module" name="module" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
                             </div>
                         </div>
-
                         <div class="layui-item athird">
                             <div class="input-group">
                                 <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -351,24 +217,34 @@
                                     <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
                                     <button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
                                 </div>
-
-                        <div style="clear:both;"></div>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" class="commonQuery lw6" style="clear:both;display:none;">
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">审核类型:</label>
+                            <div class="layui-input-block">
+                                <form:select path="identification" class=" form-control  simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getMainDictList('audit_opinion')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
                     </div>
-
                 </form:form>
             </div>
         </div>
         <div class="full-width fl">
-            <div class="layui-form contentDetails contentShadow shadowLBR">
+            <div class=" contentShadow shadowLBR layui-form contentDetails">
                 <div class="nav-btns">
-                    <div class="layui-btn-group">
-                            <table:addRow url="${ctx}/auditTemplate/auditTemplateType/form" title="意见"></table:addRow><!-- 增加按钮 -->
-
-                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    <div class="layui-btn-group" style="float: left">
+                        <table:addRow url="${ctx}/auditTemplate/auditTemplateType/form" title="项目"></table:addRow><!-- 增加按钮 -->
+                        <button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
                     </div>
                     <div style="clear: both;"></div>
                 </div>
-                <table class="oa-table layui-table" id="contentTable1"></table>
+                <table class="oa-table layui-table" id="contentTable"></table>
 
                 <!-- 分页代码 -->
                 <table:page page="${page}"></table:page>
@@ -378,16 +254,12 @@
     </div>
     <div id="changewidth"></div>
 </div>
-
-
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script>
-
-
     layui.use('table', function(){
         layui.table.render({
             limit:${ page.pageSize }
-            ,id:"checkboxTable"
-            ,elem: '#contentTable1'
+            ,elem: '#contentTable'
             ,page: false
             ,cols: [[
                 // {checkbox: true, fixed: true},
@@ -419,7 +291,7 @@
                     ,"id":"${auditTemplateType.id}"
                     ,"module":"${auditTemplateType.module}"
                     ,"flowPath":"${auditTemplateType.flowPath}"
-                    ,"identification":"${auditTemplateType.identification}"
+                    ,"identification":"${fns:getMainDictLabel(auditTemplateType.identification, 'audit_opinion', '')}"
 
                 }
                 </c:forEach>

+ 65 - 19
src/main/webapp/webpage/modules/identification/opinionForm.jsp

@@ -38,6 +38,17 @@
             layui.use(['form', 'layer'], function () {
                 var form = layui.form;
             });
+            $(".list-tabs li").click(function(){
+                $(".list-tabs li").each(function(){
+                    $(this).removeAttr("class","active");
+                    var id='#'+$(this).find("span").html();
+                    $(id).attr("class","hide");
+                })
+                $(this).attr("class","active");
+                var id='#'+$(this).find("span").html();
+                $(id).removeAttr("class","hide");
+
+            })
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -64,33 +75,69 @@
             var size = $("#contentTable tbody tr td input.i-checks:checked").size();
             var sizeChecked = $("#contentTable tbody tr td input.i-checks:checked");
 
+            var defaultSize = $("#defaultContentTable tbody tr td input.i-checks:checked").size();
+            var defaultSizeChecked = $("#defaultContentTable tbody tr td input.i-checks:checked");
+
+            for (var i=0;i<defaultSize;i++){
+                array.push(defaultSizeChecked[i].id);
+            }
             for (var i=0;i<size;i++){
                 array.push(sizeChecked[i].id);
             }
-            if(size == 0 ){
+            if(size == 0 && defaultSize == 0){
                 top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
                 return "-1";
             }
-            /*if(size > 1 ){
-                top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
-                return "-1";
-            }*/
-            $("#projectFlag").val(1);
-
-            var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
-            var label = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel").html();
-            var number = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codenumber").html();
-            var details = $("#details").val();
-            var projectFlag = $("#projectFlag").val();
-            console.log(array.toString())
-            return array.toString()+"_item_"+label+"_item_"+number+"_item_"+isProject+"_item_"+details+"_item_"+projectFlag;
+            return array.join("");
         }
 
     </script>
 </head>
 <body>
 <div class="full-width fl form-group first  project">
-    <div class="layui-item layui-col-xs12 form-table-container">
+    <div class="form-group layui-row first lw12">
+        <div class="tapfixed" style="width: 80%;">
+            <div class="list-form-tab contentShadow list-form-tab" id="tabDiv">
+                <ul class="list-tabs" >
+                    <li class="active"><a>默认意见</a><span class="hide">defaultTemplate</span></li>
+                    <li><a>自定义意见</a><span class="hide">template</span></li>
+                </ul>
+            </div>
+        </div>
+    </div>
+
+    <div class="layui-item layui-col-xs12 form-table-container" id="defaultTemplate">
+        <table id="defaultContentTable" class="table details table-bordered table-condensed">
+            <thead>
+            <tr>
+                <th width="50px">序号</th>
+                <th>模块</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:choose>
+                <c:when test="${not empty auditDefaultTemplateList}">
+                    <c:forEach items="${auditDefaultTemplateList}" var="obj">
+                        <tr>
+                            <td> <input type="checkbox"  class="i-checks" id="${fns:getValue(obj, 'content')}"></td>
+                            <td class="codelabel">${obj.content}</td>
+                        </tr>
+                    </c:forEach>
+                </c:when>
+                <c:otherwise>
+                    <tr>
+                        <td colspan="2" align="center">
+                            暂无数据
+                        </td>
+                    </tr>
+                </c:otherwise>
+            </c:choose>
+
+            </tbody>
+        </table>
+    </div>
+
+    <div class="layui-item layui-col-xs12 form-table-container hide" id="template">
         <table id="contentTable" class="table details table-bordered table-condensed">
             <thead>
             <tr>
@@ -100,10 +147,10 @@
             </thead>
             <tbody>
             <c:choose>
-                <c:when test="${not empty page.list}">
-                    <c:forEach items="${page.list}" var="obj">
+                <c:when test="${not empty auditTemplateList}">
+                    <c:forEach items="${auditTemplateList}" var="obj">
                         <tr>
-                            <td> <input type="checkbox"  class="i-checks" id="${fns:getValue(obj, 'id')}"></td>
+                            <td> <input type="checkbox"  class="i-checks" id="${fns:getValue(obj, 'content')}"></td>
                             <td class="codelabel">${obj.content}</td>
                         </tr>
                     </c:forEach>
@@ -119,7 +166,6 @@
 
             </tbody>
         </table>
-        <table:page page="${page}"></table:page>
     </div>
 </div>
 <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>

+ 4 - 3
src/main/webapp/webpage/modules/iframeView/opinion.jsp

@@ -29,7 +29,7 @@
                         <div style="padding: 5px 0px;" class="layui-col-sm8">
                             <div style="float: left">
                                 <a href="javascript:void(0)" style='background-color: #FFB800 ; font-size: 14px' onclick="openForm('审核意见列表',
-                                        '${ctx}/auditTemplate/auditTemplate/opinionForm?identification=${identification}&name=${identificationName}','80%', '70%','','提交,关闭')" class="nav-btn layui-btn layui-btn-sm" >
+                                        '${ctx}/auditTemplate/auditTemplate/opinionForm?identification=${auditTemplate.identification}','80%', '70%','','提交,关闭')" class="nav-btn layui-btn layui-btn-sm" >
                                     <i class="fa fa-file-excel-o"></i> 审核意见</a>
                             </div>
                             <%--<select id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">
@@ -69,12 +69,13 @@
             btn1: function(index, layero){
                 var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
                 var item = iframeWin.getSelectedItem();
+                var opinion=$("#opinion").val()+item
+                $("#opinion").val(opinion)
+                console.log(opinion)
                 top.layer.close(index)
-                document.getElementById('iframe').contentWindow.location.reload();
             },
             btn2: function(index, layero){
                 top.layer.close(index)
-                document.getElementById('iframe').contentWindow.location.reload();
             }
         });
     }