Parcourir la source

问题反馈管理

[user3] il y a 4 ans
Parent
commit
a62a322574

+ 20 - 0
src/main/java/com/jeeplus/modules/feedback/dao/QuestionFeedbackDao.java

@@ -0,0 +1,20 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.feedback.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.examplesingle.entity.ExampleSingle;
+import com.jeeplus.modules.feedback.entity.QuestionFeedback;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 问题反馈 DAO接口
+ */
+@MyBatisDao
+public interface QuestionFeedbackDao extends CrudDao<QuestionFeedback> {
+
+}

+ 37 - 0
src/main/java/com/jeeplus/modules/feedback/entity/QuestionFeedback.java

@@ -0,0 +1,37 @@
+package com.jeeplus.modules.feedback.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.examplesingle.entity.ExampleSingle;
+
+/**
+ * 问题反馈 实体类
+ */
+public class QuestionFeedback extends DataEntity<QuestionFeedback> {
+    private String title; //反馈标题
+    private String content; //反馈内容
+    private String contents; //反馈内容1
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getContents() {
+        return contents;
+    }
+
+    public void setContents(String contents) {
+        this.contents = contents;
+    }
+}

+ 52 - 0
src/main/java/com/jeeplus/modules/feedback/service/QuestionFeedbackService.java

@@ -0,0 +1,52 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.feedback.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.Collections3;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.modules.examplesingle.dao.ExampleSingleDao;
+import com.jeeplus.modules.examplesingle.entity.ExampleSingle;
+import com.jeeplus.modules.feedback.dao.QuestionFeedbackDao;
+import com.jeeplus.modules.feedback.entity.QuestionFeedback;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+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
+ */
+@Service
+@Transactional(readOnly = true)
+public class QuestionFeedbackService extends CrudService<QuestionFeedbackDao, QuestionFeedback> {
+	@Autowired
+	private QuestionFeedbackDao questionFeedbackDao;
+	@Override
+	public Page<QuestionFeedback> findPage(Page<QuestionFeedback> page, QuestionFeedback questionFeedback) {
+		//设置数据权限
+		if(!UserUtils.getUser().isAdmin()) {
+			String dataScopeSql = null;
+			questionFeedback.getSqlMap().put("dsf", dataScopeSql);
+			questionFeedback.getSqlMap().put("delFlag", "AND a.del_flag = 0");
+		}
+		int count = dao.queryCount(questionFeedback);
+		page.setCount(count);
+		page.setCountFlag(false);
+		questionFeedback.setPage(page);
+		List<QuestionFeedback> questionFeedbackList = findList(questionFeedback);
+		for (QuestionFeedback feedback : questionFeedbackList) {
+			User user=UserUtils.get(feedback.getCreateBy().getId());
+			feedback.setCreateBy(user);
+		}
+		page.setList(questionFeedbackList);
+		return page;
+	}
+
+}

+ 179 - 0
src/main/java/com/jeeplus/modules/feedback/web/QuestionFeedbackController.java

@@ -0,0 +1,179 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.feedback.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.json.AjaxJson;
+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.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.feedback.dao.QuestionFeedbackDao;
+import com.jeeplus.modules.feedback.entity.QuestionFeedback;
+import com.jeeplus.modules.feedback.service.QuestionFeedbackService;
+import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.oa.entity.OaNotifyView;
+import com.jeeplus.modules.oa.service.OaNotifyService;
+import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
+import com.jeeplus.modules.pushinfo.service.PushinfoService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+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.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static com.jeeplus.common.websocket.onchat.ChatServer.oaNotifyService;
+
+/**
+ * 问题反馈Controller
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/feedback/questionFeedback")
+public class QuestionFeedbackController extends BaseController {
+	@Autowired
+	private QuestionFeedbackService feedbackService;
+	@Autowired
+	private QuestionFeedbackDao feedbackDao;
+	@ModelAttribute
+	public QuestionFeedback get(@RequestParam(required=false) String id) {
+		QuestionFeedback entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = feedbackService.get(id);
+		}
+		if (entity == null){
+			entity = new QuestionFeedback();
+		}
+		return entity;
+	}
+
+	/**
+	 * 列表
+	 * @param questionFeedback
+	 * @param request
+	 * @param response
+	 * @param model
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequestMapping(value = {"list", ""})
+	public String list(QuestionFeedback questionFeedback, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes redirectAttributes) {
+		Page<QuestionFeedback> page = feedbackService.findPage(new Page<QuestionFeedback>(request, response), questionFeedback);
+		model.addAttribute("page", page);
+		return "modules/feedback/feedbackList";
+	}
+
+	/**
+	 * 反馈新增/修改
+	 * @param questionFeedback
+	 * @param model
+	 * @return
+	 */
+	@RequiresPermissions(value={"feedback:questionFeedback:add","feedback:questionFeedback:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(QuestionFeedback questionFeedback, Model model) {
+		if (questionFeedback!=null&&StringUtils.isNotBlank(questionFeedback.getId())) {
+			questionFeedback = feedbackService.get(questionFeedback.getId());
+			User user=UserUtils.get(questionFeedback.getCreateBy().getId());
+			questionFeedback.setCreateBy(user);
+		}else {
+			questionFeedback.setCreateBy(UserUtils.getUser());
+			questionFeedback.setCreateDate(new Date());
+		}
+		model.addAttribute("questionFeedback", questionFeedback);
+		return "modules/feedback/feedbackForm";
+	}
+	/**
+	 * 保存反馈
+	 */
+	@RequiresPermissions(value={"feedback:questionFeedback:add","feedback:questionFeedback:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public String save(QuestionFeedback questionFeedback, Model model, RedirectAttributes redirectAttributes) throws Exception {
+		if (!beanValidator(model, questionFeedback)){
+			return form(questionFeedback, model);
+		}
+		try {
+//            projectRecords.setProjectStatus(ProjectStatusEnum.IN_APRL.getValue());
+			if (!questionFeedback.getIsNewRecord()) {//编辑表单保存
+				QuestionFeedback t = feedbackService.get(questionFeedback.getId());//从数据库取出记录的值
+				if(t != null) {
+					MyBeanUtils.copyBeanNotNull2Bean(questionFeedback, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+					feedbackService.save(questionFeedback);//保存
+				}
+			} else {//新增表单保存
+				feedbackService.save(questionFeedback);//保存
+			}
+			addMessage(redirectAttributes, "保存成功");
+		}catch (Exception e){
+			logger.error("保存异常:",e);
+			addMessage(redirectAttributes, "保存异常:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/feedback/questionFeedback/?repage";
+	}
+
+	/**
+	 * 删除反馈
+	 * @param questionFeedback
+	 * @param redirectAttributes
+	 * @return
+	 * @throws Exception
+	 */
+	@RequiresPermissions(value={"feedback:questionFeedback:del"})
+	@RequestMapping(value = "delete")
+	public String delete(QuestionFeedback questionFeedback, RedirectAttributes redirectAttributes) throws Exception {
+		feedbackService.delete(questionFeedback);
+		return "redirect:"+Global.getAdminPath()+"/feedback/questionFeedback/?repage";
+	}
+	/**
+	 * 获取反馈是否存在判定
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "getFeedback")
+	@ResponseBody
+	public Map<String,String> getFeedback(String id){
+		Map map = new HashMap();
+		QuestionFeedback questionFeedback = null;
+		if (StringUtils.isNotBlank(id)){
+			questionFeedback = feedbackService.get(id);
+		}
+		if(null != questionFeedback){
+			map.put("success",true);
+		}else{
+			map.put("success",false);
+		}
+		return map;
+	}
+	@RequestMapping("getCount")
+	@ResponseBody
+	public Map<String,Object> getCount(QuestionFeedback questionFeedback, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes redirectAttributes) {
+		Page<QuestionFeedback> page = feedbackService.findPage(new Page<QuestionFeedback>(request, response), questionFeedback);
+		Map<String,Object> map=new HashMap<>();
+		Integer count=feedbackDao.queryCount(questionFeedback);
+		map.put("count",count);
+		map.put("page",page.getList());
+		return map;
+	}
+}

+ 109 - 0
src/main/resources/mappings/modules/feedback/QuestionFeedbackDao.xml

@@ -0,0 +1,109 @@
+<?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.feedback.dao.QuestionFeedbackDao">
+    
+	<sql id="feedbackColumns">
+		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.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.title AS "title",
+		a.content AS "content",
+		a.contents AS "contents"
+	</sql>
+	<select id="get" resultType="QuestionFeedback" >
+		SELECT 
+			<include refid="feedbackColumns"/>
+		FROM question_feedback a
+		WHERE a.id = #{id}
+	</select>
+	<select id="queryCount" resultType="int">
+		SELECT
+			count(DISTINCT a.id)
+		FROM
+			question_feedback a
+		<where>
+			<if test="title!=null and title !=''">
+				and a.title like CONCAT('%',#{title},'%')
+			</if>
+			<if test="content!=null and content !=''">
+				and a.content like CONCAT('%',#{content},'%')
+			</if>
+		</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="findList" resultType="QuestionFeedback" >
+		SELECT 
+			<include refid="feedbackColumns"/>
+		FROM question_feedback a
+		<where>
+			<if test="title!=null and title !=''">
+				and a.title like CONCAT('%',#{title},'%')
+			</if>
+			<if test="content!=null and content !=''">
+				and a.content like CONCAT('%',#{content},'%')
+			</if>
+		</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>
+
+	<insert id="insert">
+		INSERT INTO question_feedback(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			title,
+			content,
+			contents
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{title},
+			#{content},
+			#{contents}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE question_feedback SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			title = #{title},
+			content = #{content},
+			contents = #{contents}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		delete from question_feedback WHERE id = #{id}
+	</delete>
+
+</mapper>

+ 162 - 0
src/main/webapp/webpage/modules/feedback/feedbackForm.jsp

@@ -0,0 +1,162 @@
+<%@ 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"/>
+    <style type="text/css">
+        img {width: 50px; height: 50px;}
+    </style>
+    <script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+    <script type="text/javascript" language="JavaScript" for="window" event="onload">
+        var validateForm;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            //var remarks = CKEDITOR.instances.content.getData();
+            var content = CKEDITOR.instances.contents.document.getBody().getText();
+            while (content.indexOf("img{max-width:100%!important;") != -1){
+                content = content.replace("img{max-width:100%!important;}","");
+            }
+            $("#content").val(content);
+            console.log(content+","+(content == null)+(content == undefined)+(content == ""));
+            if(content == null || content == undefined || content == "" || content == "\n"){
+                parent.layer.msg('反馈内容不能为空',{icon:5});
+                return false;
+            }
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+            });
+            //$("#name").focus();
+            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);
+                    }
+                }
+            });
+            //只做查看时,禁用掉以下标签
+            $('input,textarea,select').attr('disabled',<%=request.getAttribute("disabled")%>);
+            laydate.render({
+                elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'datetime'
+                , trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'datetime'
+                , trigger: 'click'
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+        });
+    </script>
+    <script type="text/javascript">
+
+        function changeUser(ids,names,parents) {
+            var split = ids.split(',');
+            var split2 = names.split(',');
+            $("#userTableList").html("");
+            userIdx=0;
+            for(var i=0;i<split.length;i++){
+                var id = split[i];
+                if(id==''||id==null){
+                    continue;
+                }
+                var obj = {'id':id,'name':split2[i],'officeName':parents[i]};
+                addRow('#userTableList',userIdx,userTpl,obj);
+                userIdx+=1;
+            }
+        }
+
+        function changeOffice(ids,names,parentIds) {
+            $("#officeTableList").html("");
+            officeIdx=0;
+            for(var i=0;i<ids.length;i++){
+                var obj = {'id':ids[i],'name':parentIds[i]};
+                addRow('#officeTableList',officeIdx,officeTpl,obj);
+                officeIdx+=1;
+            }
+        }
+        function getSelectOfficeIds() {
+            var selectedIds = "";
+            var pidArr = $("#officeTableList tr .officeId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        function getSelectUserIds() {
+            var selectedIds = "";
+            var pidArr = $("#userTableList tr .userId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+
+    </script>
+
+</head>
+<body >
+<div class="single-form">
+    <div class="container">
+        <form:form id="inputForm" modelAttribute="questionFeedback" enctype="multipart/form-data" action="${ctx}/feedback/questionFeedback/save" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>反馈信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>反馈标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" htmlEscape="false" placeholder="请输入反馈标题" maxlength="30" class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                    <label class="layui-form-label"><span class="require-item">*</span>内容:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="contents" htmlEscape="false"  colspan="3" rows="6"  maxlength="550" class="form-control "/>
+                        <form:hidden id="content" path="content" htmlEscape="false" maxlength="64" class="form-control required"/>
+                        <sys:ckeditor replace="contents" uploadPath="/feedback/feedback"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 520 - 0
src/main/webapp/webpage/modules/feedback/feedbackList.jsp

@@ -0,0 +1,520 @@
+<%@ 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}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript">
+
+		$(function () {
+			$(".btn btn-white btn-sm").bind("click",function () {
+
+            })
+        });
+
+        $(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#createStartDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#createEndDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+        function openDialog(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,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['保存', '关闭'],
+                /*yes: 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()) {
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function () {
+                            top.layer.close(index)
+                        }, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },*/
+
+                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(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+        function openDialogAdmin(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,
+                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(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+        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
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    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
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogreModify(title,url,id,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+			$.ajax({
+				async: false,
+				url: "${ctx}/oa/oaNotify/getOaNotify?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						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
+								}
+							},
+							btn2:function(index,layero){
+								if(split.length==2){return}
+								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
+								}else {
+									return false;
+								}
+							},
+							btn3: function (index) {
+							}
+						});
+					}else{
+						top.layer.msg("该公告信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+
+        }
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,id,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: "${ctx}/feedback/questionFeedback/getFeedback?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}else{
+						top.layer.msg("该反馈信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+		}
+	</script>
+	<script>
+
+		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>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+			<form:form id="searchForm" modelAttribute="questionFeedback" action="${ctx}/feedback/questionFeedback/" method="post" class="form-inline">
+			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+			<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+
+				<div class="commonQuery">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">反馈标题:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="title" htmlEscape="false" maxlength="200"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建日期:</label>
+						<div class="layui-input-block">
+							<input id="createStartDate" name="createDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+								   value="<fmt:formatDate value="${questionFeedback.createDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<div class="layui-btn-group search-spacing">
+								<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>
+<%--							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
+<%--							<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>
+<%--							<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>--%>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" style="clear:both;display:none;">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">反馈内容:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="content" htmlEscape="false" maxlength="200"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div style="clear:both;"></div>
+				</div>
+			</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+						<shiro:hasPermission name="feedback:questionFeedback:add">
+							<table:addRow label="新增" url="${ctx}/feedback/questionFeedback/form" title="反馈" height="95%;" width="95%;"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</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 }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center',  width:40,title: '序号'}
+				,{field:'title',align:'center', title: '反馈标题', minWidth:150,templet:function(d){
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogListView('查看反馈', '${ctx}/feedback/questionFeedback/form?id=" + d.id + "','" + d.id + "','95%','95%')\">" +
+								"<span title=" + d.title + ">" + d.title + "</span></a>";
+						return xml;
+					}}
+                ,{field:'content',align:'center', title: '反馈内容', minWidth:200,templet:function(d){
+                    return "<span title='"+ d.content +"'>" + d.content + "</span>";
+                }}
+                ,{field:'createBy', align:'center',title: '创建人', width:80,templet:function(d){
+                        return "<span title='"+ d.createBy +"'>" + d.createBy + "</span>";
+                    }}
+                ,{field:'tmdcreateDate', align:'center',title: '创建时间',width:150,templet:function(d){
+						return "<span title='"+ d.createDate +"'>" + d.tmdcreateDate + "</span>";
+					}}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "<div class=\"layui-btn-group\">";
+						if(d.canedit1 != undefined && d.canedit1 =="1")
+						{
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改反馈', '${ctx}/feedback/questionFeedback/form?id=" + d.id +"','95%', '95%','','保存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+						}
+						if(d.canedit2 != undefined && d.canedit2 =="2")
+						{
+							xml+="<a href=\"${ctx}/feedback/questionFeedback/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该反馈信息吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+						}
+                        xml+="</div>"
+                            return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="oaNotify" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${oaNotify.id}"
+                    ,"title":"<c:out value="${oaNotify.title}" escapeXml="true"/>"
+                    ,"content":"<c:out value="${oaNotify.content}" escapeXml="true"/>"
+                    ,"createBy":"${oaNotify.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${oaNotify.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"tmdcreateDate":"<fmt:formatDate value="${oaNotify.createDate}" pattern="yyyy-MM-dd"/>"
+					<shiro:hasPermission name="feedback:questionFeedback:edit">
+					,"canedit1":1
+					</shiro:hasPermission>
+					<shiro:hasPermission name="feedback:questionFeedback:del">
+					,"canedit2":2
+					</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 1 - 1
src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp

@@ -235,7 +235,7 @@
                     <div class="layui-input-block">
                         <form:textarea path="contents" htmlEscape="false"  colspan="3" rows="6"  maxlength="550" class="form-control "/>
                         <form:hidden id="content" path="content" htmlEscape="false" maxlength="64" class="form-control required"/>
-                        <sys:ckeditor replace="contents" uploadPath="/oa/oa"/>
+                        <sys:ckeditor replace="contents" uploadPath="oa/oa"/>
                     </div>
                 </div>
             </div>

+ 18 - 13
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp

@@ -34,7 +34,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
 				var projectId = '${projectRecords.id}';
-				var leng = $("#file_attachment tr").length;
+				var leng = $(".file_attachment_tr").length;
+				var leng1 = $("#reportedConsultantList tr").length;
 				var boolFlag = true;
 				var startDate = new Date($("#startDate").val());
 				var endingDate = new Date($("#endingDate").val());
@@ -44,8 +45,8 @@
 					return false;
 				}
 				for(var i=0; i<leng; i++) {
-					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+					var numberStr = $(".file_attachment_tr").eq(i).find("td:first").html();
+					var second = $(".file_attachment_tr").eq(i).find("td:eq(1)").html();
 					if(second == 1){
 						if(numberStr != undefined && numberStr !=null && numberStr !=''){
 							$.ajax({
@@ -66,11 +67,15 @@
 						}
 					}
 				}
+				if (leng1==0){
+					top.layer.msg("请添加咨询员信息!", {icon: 0});
+					return false;
+				}
 				if(boolFlag){
-					var gistdata = $("#file_gistdata tr").length;
+					var gistdata = $(".file_gistdata_tr").length;
 					for(var i=0; i<gistdata; i++) {
-						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+						var numberStr = $(".file_gistdata_tr").eq(i).find("td:first").html();
+						var second = $(".file_gistdata_tr").eq(i).find("td:eq(1)").html();
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
 								$.ajax({
@@ -93,10 +98,10 @@
 					}
 				}
 				if(boolFlag){
-					var other = $("#file_other tr").length;
+					var other = $(".file_other_tr").length;
 					for(var i=0; i<other; i++) {
-						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+						var numberStr = $(".file_other_tr").eq(i).find("td:first").html();
+						var second = $(".file_other_tr").eq(i).find("td:eq(1)").html();
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
 								$.ajax({
@@ -1079,7 +1084,7 @@
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
+							<tr id="file_attachment_${fileAttachment.id}_tr_fu" onclick="listTr(this)">
 								<td style="display:none">${fileAttachment.id}</td>
 								<td style="display:none">${fileAttachment.mustFlag}</td>
 								<c:choose>
@@ -1098,7 +1103,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
+								<tr class="file_attachment_tr">
 									<td></td>
 										<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -1238,7 +1243,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
+								<tr class="file_gistdata_tr">
 									<td></td>
 									<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -1378,7 +1383,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
+								<tr class="file_other_tr">
 									<td></td>
 									<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">

+ 18 - 13
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp

@@ -27,7 +27,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 var projectId = '${projectcontentinfo.project.id}';
-                var leng = $("#file_attachment tr").length;
+                var leng1 = $("#reportedConsultantList tr").length;
+                var leng = $(".file_attachment_tr").length;
                 var boolFlag = true;
                 var startDate = new Date($("#startDate").val());
                 var endingDate = new Date($("#endingDate").val());
@@ -36,10 +37,14 @@
                     parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                     return false;
                 }
+                if (leng1==0){
+                    top.layer.msg("请添加咨询员信息!", {icon: 0});
+                    return false;
+                }
                 for(var i=0; i<leng; i++) {
-                    var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-                    var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-                    var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+                    var numberStr = $(".file_attachment_tr").eq(i).find("td:first").html();
+                    var second = $(".file_attachment_tr").eq(i).find("td:eq(1)").html();
+                    var name = $(".file_attachment_tr").eq(i).find("td:eq(2)").html();
                     if(second == 1){
                         if(numberStr != undefined && numberStr !=null && numberStr !=''){
                             $.ajax({
@@ -61,10 +66,10 @@
                     }
                 }
                 if(boolFlag){
-                    var gistdata = $("#file_gistdata tr").length;
+                    var gistdata = $(".file_gistdata_tr").length;
                     for(var i=0; i<gistdata; i++) {
-                        var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-                        var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+                        var numberStr = $(".file_gistdata_tr").eq(i).find("td:first").html();
+                        var second = $(".file_gistdata_tr").eq(i).find("td:eq(1)").html();
                         if(second == 1){
                             if(numberStr != undefined && numberStr !=null && numberStr !=''){
                                 $.ajax({
@@ -87,10 +92,10 @@
                     }
                 }
                 if(boolFlag){
-                    var other = $("#file_other tr").length;
+                    var other = $(".file_other_tr").length;
                     for(var i=0; i<other; i++) {
-                        var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-                        var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+                        var numberStr = $(".file_other_tr").eq(i).find("td:first").html();
+                        var second = $(".file_other_tr").eq(i).find("td:eq(1)").html();
                         if(second == 1){
                             if(numberStr != undefined && numberStr !=null && numberStr !=''){
                                 $.ajax({
@@ -826,7 +831,7 @@
                                     </td>
                                 </tr>
                             <c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr class="file_attachment_${fileAttachment.id}_tr">
+                                <tr class="file_attachment_tr">
                                     <td></td>
                                     <c:choose>
                                         <c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -926,7 +931,7 @@
                                     </td>
                                 </tr>
                             <c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr class="file_gistdata_${fileGistdata.id}_tr">
+                                <tr class="file_gistdata_tr">
                                     <td></td>
                                     <c:choose>
                                         <c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -1026,7 +1031,7 @@
                                 </td>
                                 </tr>
                             <c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr class="file_other_${fileOther.id}_tr">
+                                <tr class="file_other_tr">
                                     <td></td>
                                     <c:choose>
                                         <c:when test="${projectcontentinfo.uploadMode == 2}">

+ 18 - 13
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -21,7 +21,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
 				var projectId = '${projectRecords.id}';
-				var leng = $("#file_attachment tr").length;
+				var leng = $(".file_attachment_tr").length;
+				var leng1 = $("#reportedConsultantList tr").length;
 				var boolFlag = true;
 				var startDate = new Date($("#startDate").val());
 				var endingDate = new Date($("#endingDate").val());
@@ -30,10 +31,14 @@
 					parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 					return false;
 				}
+				if (leng1==0){
+					top.layer.msg("请添加咨询员信息!", {icon: 0});
+					return false;
+				}
 				for(var i=0; i<leng; i++) {
-					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+					var numberStr = $(".file_attachment_tr").eq(i).find("td:first").html();
+					var second = $(".file_attachment_tr").eq(i).find("td:eq(1)").html();
+					var name = $(".file_attachment_tr").eq(i).find("td:eq(2)").html();
 					if(second == 1){
 					if(numberStr != undefined && numberStr !=null && numberStr !=''){
 						$.ajax({
@@ -55,10 +60,10 @@
 					}
 				}
 				if(boolFlag){
-					var gistdata = $("#file_gistdata tr").length;
+					var gistdata = $(".file_gistdata_tr").length;
 					for(var i=0; i<gistdata; i++) {
-						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+						var numberStr = $(".file_gistdata_tr").eq(i).find("td:first").html();
+						var second = $(".file_gistdata_tr").eq(i).find("td:eq(1)").html();
 						if(second == 1){
 						if(numberStr != undefined && numberStr !=null && numberStr !=''){
 							$.ajax({
@@ -81,10 +86,10 @@
 					}
 				}
 				if(boolFlag){
-					var other = $("#file_other tr").length;
+					var other = $(".file_other_tr").length;
 					for(var i=0; i<other; i++) {
-						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+						var numberStr = $(".file_other_tr").eq(i).find("td:first").html();
+						var second = $(".file_other_tr").eq(i).find("td:eq(1)").html();
 						if(second == 1){
 						if(numberStr != undefined && numberStr !=null && numberStr !=''){
 							$.ajax({
@@ -1065,7 +1070,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
+								<tr class="file_attachment_tr">
 									<td></td>
 									<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -1207,7 +1212,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
+								<tr class="file_gistdata_tr">
 									<td></td>
 									<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">
@@ -1347,7 +1352,7 @@
 								</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
+								<tr class="file_other_tr">
 									<td></td>
 									<c:choose>
 										<c:when test="${projectcontentinfo.uploadMode == 2}">

+ 21 - 1
src/main/webapp/webpage/modules/sys/sysIndex.jsp

@@ -38,6 +38,18 @@
             };
             //ajax废弃
             startRequest();
+            $.ajax({
+                type : "get",
+                async : true, //同步请求
+                url : "${ctx}/feedback/questionFeedback/getCount",
+                success:function(datas){
+                    //$("#mainContent").html(dates);//要刷新的div
+                    $("#totalCount1").text((datas.count)>9?"10+":(datas.count));
+                },
+                error: function() {
+                    <!--parent.layer.msg('获取通知失败,请稍后再试!',{icon:2}) -->
+                }
+            });
         });
         window.setInterval("requesting()",600000);
         function startRequest(){
@@ -60,6 +72,7 @@
                     <!--parent.layer.msg('获取通知失败,请稍后再试!',{icon:2}) -->
                 }
             });
+
         }
         function requesting(){
             var totalCount = $("#totalCount").text();
@@ -308,7 +321,14 @@
                         <%--</ul>--%>
                     </li>
                     <li class="dropdown">
-                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:void(0)">
+                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:void(0)" onclick='top.openTab("${ctx }/feedback/questionFeedback/list","反馈列表", false)' >
+                            <%--<i class="fa fa-bell"></i>--%>
+                            <i class="fa fa-list-ul"></i>
+                            <span class="label label-danger labelInfo" id="totalCount1">0</span>&nbsp;问题反馈
+                        </a>
+                    </li>
+                    <li class="dropdown">
+                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:void(0)" >
                             <%--<i class="fa fa-bell"></i>--%>
                             <i class="fa fa-list-ul"></i>
                             <span class="label label-danger labelInfo" id="totalCount">0</span>&nbsp;待办事宜

+ 11 - 2
src/main/webapp/webpage/modules/sys/tagTreeselect.jsp

@@ -179,10 +179,19 @@
 				tree = $.fn.zTree.init($("#tree"), setting, zNodes);
 
 				// 默认展开一级节点
-				var nodes = tree.getNodesByParam("level", 0);
+				var nodes1 = tree.getNodesByParam("name", 0);
+				for(var i=0; i<nodes1.length; i++) {
+					tree.expandNode(nodes1[i], true, false, false);
+				}
+				//默认展开到查询的节点
+				var nodes = tree.transformToArray(tree.getNodes());
 				for(var i=0; i<nodes.length; i++) {
-					tree.expandNode(nodes[i], true, false, false);
+					//展开相关的字节点
+					tree.expandNode(nodes[i], true, true, true);
+					//配合使用打开相关联的父节点
+					tree.selectNode(nodes[i]);
 				}
+				// showAllNode(zNodes)
 				//异步加载子节点(加载用户)
 				var nodesOne = tree.getNodesByParam("isParent", true);
 				for(var j=0; j<nodesOne.length; j++) {

+ 2 - 2
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp

@@ -564,8 +564,8 @@
 						<div class="input-group">
 							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
 							<div class="layui-btn-group search-spacing">
-								<button id="searchQuery" class="layui-btn layui-bg-blue" onclick="search()">查询</button>
-								<button id="searchReset" class="layui-btn " onclick="resetSearch()">重置</button>
+								<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>
 <%--							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
 <%--							<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>