Преглед изворни кода

Merge remote-tracking branch 'origin/master'

user7 пре 5 година
родитељ
комит
3ccca72d94

+ 17 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java

@@ -9,6 +9,7 @@ import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentTreeData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
 import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.workcontent.entity.WorkContentClaim;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -59,9 +60,24 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
 	 */
 	List<ProjectContentTreeData> getProjectContentData(String projectId);
 
-	List<ProjectContentTreeData> getProjectContentTreeDataOnLeft(@Param("projectId")String projectId,@Param("workContentType")Integer workContentType);
+	List<ProjectContentTreeData> getProjectContentTreeDataOnLeft(@Param("projectId")String projectId,@Param("workContentType")Integer workContentType,@Param("dictType")String dictType);
 
 	List<ProjectContentTreeData> getProjectContentTreeData(@Param("projectId") String projectId,@Param("type") String type);
 
 	int saveBasedDataWorkAttachment(Workattachment workattachment);
+
+	/**
+	 * 根据typeId查询类型名称
+	 * @param typeId
+	 * @return
+	 */
+	String getWorkContentTypeByTypeId(String typeId);
+
+	/**
+	 * 查询数据类型
+	 * @param projectId
+	 * @param contentId
+	 * @return
+	 */
+	WorkContentClaim getTypeByProjectIdAndContentId(@Param("projectId") String projectId ,@Param("contentId")  String contentId);
 }

+ 28 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectContentData.java

@@ -40,6 +40,10 @@ public class ProjectContentData extends DataEntity<ProjectContentData> {
 	private List<Workattachment> workAttachments;
 	private List<ProjectBasedData> projectBasedDataList;
 
+	private Double initialMoney;  //初始金额
+	private Double alterMoney;   //变更金额
+	private Double ultimatelyMoney;   //最终金额
+
     public List getDetailObject() {
         return detailObject;
     }
@@ -189,4 +193,28 @@ public class ProjectContentData extends DataEntity<ProjectContentData> {
     public void setProjectBasedDataList(List<ProjectBasedData> projectBasedDataList) {
         this.projectBasedDataList = projectBasedDataList;
     }
+
+	public Double getInitialMoney() {
+		return initialMoney;
+	}
+
+	public void setInitialMoney(Double initialMoney) {
+		this.initialMoney = initialMoney;
+	}
+
+	public Double getAlterMoney() {
+		return alterMoney;
+	}
+
+	public void setAlterMoney(Double alterMoney) {
+		this.alterMoney = alterMoney;
+	}
+
+	public Double getUltimatelyMoney() {
+		return ultimatelyMoney;
+	}
+
+	public void setUltimatelyMoney(Double ultimatelyMoney) {
+		this.ultimatelyMoney = ultimatelyMoney;
+	}
 }

+ 64 - 3
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java

@@ -28,8 +28,11 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
 import com.jeeplus.modules.workcontent.common.WorkContentDetailFactory;
+import com.jeeplus.modules.workcontent.dao.WorkContentClaimDao;
+import com.jeeplus.modules.workcontent.dao.WorkContentContractinfoDao;
 import com.jeeplus.modules.workcontent.dao.WorkContentInvestmentCostDao;
-import com.jeeplus.modules.workcontent.entity.WorkContentType;
+import com.jeeplus.modules.workcontent.entity.*;
+import com.jeeplus.modules.workcontent.service.WorkContentContractSumService;
 import com.jeeplus.modules.workcontent.service.WorkContentDetailBaseService;
 import com.jeeplus.modules.workcontent.service.WorkContentTypeService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
@@ -40,6 +43,7 @@ import com.jeeplus.modules.workreview.service.WorkReviewStandardService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.ui.Model;
 
 import java.net.URLDecoder;
 import java.util.*;
@@ -88,6 +92,12 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	private ProjectBasedDataDao projectBasedDataDao;
 	@Autowired
 	private WorkContentInvestmentCostDao workContentInvestmentCostDao;
+	@Autowired
+	private WorkContentContractSumService workContentContractSumService;
+	@Autowired
+	private WorkContentClaimDao workContentClaimDao;
+	@Autowired
+	private WorkContentContractinfoDao workContentContractinfoDao;
 
 	private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
 
@@ -1426,8 +1436,11 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	 * @param projectId
 	 * @return
 	 */
-	public List<ProjectContentTreeData> getProjectContentTreeDataOnLeft(String projectId,Integer workContentType){
-		return projectcontentinfoDao.getProjectContentTreeDataOnLeft(projectId,workContentType);
+	public List<ProjectContentTreeData> getProjectContentTreeDataOnLeft(String projectId,Integer workContentType,String dictType){
+		if("41".equals(dictType)) {
+			return projectcontentinfoDao.getProjectContentTreeDataOnLeft(projectId, workContentType, "");
+		}
+		return projectcontentinfoDao.getProjectContentTreeDataOnLeft(projectId, workContentType, dictType);
 	}
 
 	/**
@@ -1439,4 +1452,52 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 		return projectcontentinfoDao.getProjectContentTreeData(projectId,type);
 	}
 
+	/**
+	 * 根据typeId查询类型名称
+	 * @param typeId
+	 * @return
+	 */
+	public String getWorkContentTypeByTypeId(String typeId){
+		return projectcontentinfoDao.getWorkContentTypeByTypeId(typeId);
+	}
+
+	/**
+	 * 查询数据类型
+	 * @param projectId
+	 * @param contentId
+	 * @return
+	 */
+	public WorkContentClaim getTypeByProjectIdAndContentId(String projectId,String contentId){
+		return projectcontentinfoDao.getTypeByProjectIdAndContentId(projectId,contentId);
+	}
+
+
+	public Map<String,Double> getProjectBalanceInfo(WorkContentContractSum workContentContractSum) {
+		Map<String,Double> map = new HashMap<>();
+		//初始金额
+		Double alterMoney = 0D;
+		WorkContentContractSum oldRecord = null;
+		if(StringUtils.isNotBlank(workContentContractSum.getContentId())){
+			List<WorkContentContractSum> list = workContentContractSumService.findList(workContentContractSum);
+			if(list!=null&&!list.isEmpty()){
+				oldRecord = list.get(0);
+			}
+		}
+		if(oldRecord!=null){
+			//初始金额
+			map.put("initialMoney",oldRecord.getContractAmount());
+			String conId = oldRecord.getContentId();
+			//获取变更信息和索赔信息
+			List<WorkContentClaim> workContentClaims = workContentClaimDao.findByConId(conId);
+			if(null != workContentClaims && workContentClaims.size() >0){
+				for(WorkContentClaim workContentClaim : workContentClaims) {
+					alterMoney += workContentClaim.getSetAmt();
+				}
+			}
+			map.put("alterMoney",alterMoney);
+			map.put("ultimatelyMoney",oldRecord.getContractAmount()-alterMoney);
+		}
+		return map;
+	}
+
 }

+ 59 - 8
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java

@@ -25,6 +25,9 @@ import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontent.entity.WorkContentClaim;
+import com.jeeplus.modules.workcontent.entity.WorkContentContractSum;
+import com.jeeplus.modules.workcontent.service.WorkContentAltermanageService;
 import com.jeeplus.modules.workcontent.web.WorkContentTypeController;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
@@ -411,10 +414,27 @@ public class ProjectcontentinfoController extends BaseController {
 						}
 						projectContentData.setProject(records);
 						projectContentData.setType(projectcontentinfo.getDictType());
-						List<ProjectContentData> projectContentDatas = projectContentDataService.findList(projectContentData);
-						model.addAttribute("projectContentDatas", projectContentDatas);
-						model.addAttribute("workContentType", Integer.valueOf(projectcontentinfo.getType())-1);
-						return "modules/projectcontentinfo/workContentList";
+						if("400".equals(projectcontentinfo.getDictType())){
+							Page<ProjectContentData> page = projectContentDataService.findPage(new Page<ProjectContentData>(request, response),projectContentData);
+							List<ProjectContentData> projectContentDataList = page.getList();
+							for (ProjectContentData contentData : projectContentDataList) {
+								WorkContentContractSum workContentContractSum = new WorkContentContractSum();
+								workContentContractSum.setProjectId(contentData.getProject().getId());
+								workContentContractSum.setContentId(contentData.getId());
+								Map<String, Double> map = projectcontentinfoService.getProjectBalanceInfo(workContentContractSum);
+								contentData.setInitialMoney(map.get("initialMoney"));
+								contentData.setAlterMoney(map.get("alterMoney"));
+								contentData.setUltimatelyMoney(map.get("ultimatelyMoney"));
+							}
+							model.addAttribute("page", page);
+							return "modules/projectcontentinfo/workContentSumList";
+						}else{
+							List<ProjectContentData> projectContentDatas = projectContentDataService.findList(projectContentData);
+							model.addAttribute("projectContentDatas", projectContentDatas);
+							model.addAttribute("workContentType", Integer.valueOf(projectcontentinfo.getType())-1);
+							model.addAttribute("dictType", projectcontentinfo.getDictType());
+							return "modules/projectcontentinfo/workContentList";
+						}
 					}else{
 						//详情页面
 						ProjectContentData projectContentData = projectContentDataService.get(projectcontentinfo.getInfoId());
@@ -1592,12 +1612,13 @@ public class ProjectcontentinfoController extends BaseController {
 	 */
 	@RequestMapping("getProjectContentTreeDataOnLeft")
 	@ResponseBody
-	public Map<String,List> getProjectContentTreeDataOnLeft(String projectId,Integer workContentType){
+	public Map<String,List> getProjectContentTreeDataOnLeft(String projectId,Integer workContentType,String dictType){
 		Map<String,List> map = new HashMap<>();
-		List<ProjectContentTreeData> projectContentDataList = projectcontentinfoService.getProjectContentTreeDataOnLeft(projectId,workContentType);
+		User user = UserUtils.getUser();
+		List<ProjectContentTreeData> projectContentDataList = projectcontentinfoService.getProjectContentTreeDataOnLeft(projectId,workContentType,dictType);
 		List<ProjectContentTreeData> projectContentTreeDataList = new ArrayList<>();
-		if (null != projectContentDataList) {
-			User user = UserUtils.getUser();
+		//判定是否为合同管理目录访问
+		if (null != projectContentDataList && !dictType.equals("41") && !dictType.equals("400")) {
 			for (ProjectContentTreeData projectContentData : projectContentDataList) {
 				String contentTypeName = WorkContentTypeController.getContentTypeName(projectContentData.getType(), "");
 				ProjectContentTreeData projectContentTreeData = new ProjectContentTreeData();
@@ -1614,6 +1635,36 @@ public class ProjectcontentinfoController extends BaseController {
 				projectContentTreeDataList.add(projectContentTreeData);
 				projectContentTreeDataList.addAll(projectContentTreeDatas);
 			}
+		}else if(null != projectContentDataList){
+			//查询所有项目下合同信息
+			List<ProjectContentTreeData> projectContentTreeDatas = projectcontentinfoService.getProjectContentTreeData(projectId, dictType);
+			for (ProjectContentTreeData contentTreeData : projectContentTreeDatas) {
+				ProjectContentTreeData projectContentTreeData = new ProjectContentTreeData();
+				projectContentTreeData.setType(projectcontentinfoService.getWorkContentTypeByTypeId(contentTreeData.getType()));
+				projectContentTreeData.setName(contentTreeData.getName());
+				projectContentTreeData.setId(contentTreeData.getId());
+				projectContentTreeData.setPid("0");
+				projectContentTreeData.setLoginId(user.getId());
+				projectContentTreeData.setCreateId("");
+				projectContentTreeDataList.add(projectContentTreeData);
+			}
+			//查询所有项目下的索赔,变更,签证等数据信息,并绑定到对应的合同下边(合同管理和合同汇总不进行数据分析)
+			for (ProjectContentTreeData projectContentData : projectContentDataList) {
+				if(!projectContentData.getType().equals("41") && !projectContentData.getType().equals("400")){
+					List<ProjectContentTreeData> contentTreeDataList = projectcontentinfoService.getProjectContentTreeData(projectId, projectContentData.getType());
+					if(contentTreeDataList.size()>0){
+						for (ProjectContentTreeData contentTreeData:contentTreeDataList) {
+							WorkContentClaim listWorkContentClaim = projectcontentinfoService.getTypeByProjectIdAndContentId(projectId,contentTreeData.getId());
+							if(null != listWorkContentClaim){
+								contentTreeData.setPid(listWorkContentClaim.getContract().getId());
+								contentTreeData.setLoginId(user.getId());
+								contentTreeData.setType(projectcontentinfoService.getWorkContentTypeByTypeId(projectContentData.getType()));
+								projectContentTreeDataList.add(contentTreeData);
+							}
+						}
+					}
+				}
+			}
 		}
 		map.put("data",projectContentTreeDataList);
 		return map;

+ 46 - 15
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -1,7 +1,7 @@
 <?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.projectcontentinfo.dao.ProjectcontentinfoDao">
-    
+
 	<sql id="projectcontentinfoColumns">
 		a.id AS "id",
 		a.create_by AS "createBy.id",
@@ -22,13 +22,13 @@
 		a.name AS "name",
 		a.link_id AS "linkId"
 	</sql>
-	
+
 	<sql id="projectcontentinfoJoins">
 	</sql>
-	
-    
+
+
 	<select id="get" resultType="Projectcontentinfo" >
-		SELECT 
+		SELECT
 			<include refid="projectcontentinfoColumns"/>
 		FROM project_content_info a
 		<include refid="projectcontentinfoJoins"/>
@@ -53,7 +53,7 @@
 	</select>
 
 	<select id="findList" resultType="Projectcontentinfo" >
-		SELECT 
+		SELECT
 			<include refid="projectcontentinfoColumns"/>
 		FROM project_content_info a
 		<include refid="projectcontentinfoJoins"/>
@@ -152,6 +152,9 @@
 			a.del_flag = 0
 			and a.project_id = #{projectId}
 			and wct.parent_id =#{workContentType}
+			<if test="dictType != null and dictType != ''">
+				AND a.type =  #{dictType}
+			</if>
 		</where>
 	</select>
 
@@ -284,13 +287,13 @@
 	</select>
 
 	<select id="findAllList" resultType="Projectcontentinfo" >
-		SELECT 
+		SELECT
 			<include refid="projectcontentinfoColumns"/>
 		FROM project_content_info a
 		<include refid="projectcontentinfoJoins"/>
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -300,7 +303,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert">
 		INSERT INTO project_content_info(
 			id,
@@ -384,9 +387,9 @@
 			#{linkId}
 		)
 	</insert>
-	
+
 	<update id="update">
-		UPDATE project_content_info SET 	
+		UPDATE project_content_info SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			remarks = #{remarks},
@@ -417,7 +420,7 @@
 		WHERE link_id = #{linkId}
 	</update>
 
-	
+
 	<!--物理删除-->
 	<update id="delete">
 		DELETE FROM project_content_info
@@ -431,12 +434,12 @@
 
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
-		UPDATE project_content_info SET 
+		UPDATE project_content_info SET
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}
 	</update>
-	
-	
+
+
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<select id="findUniqueByProperty" resultType="Projectcontentinfo" statementType="STATEMENT">
 		select * FROM project_content_info  where ${propertyName} = '${value}'
@@ -526,4 +529,32 @@
 			#{updateBy.id}
 		)
 	</insert>
+
+	<select id="getWorkContentTypeByTypeId" resultType="java.lang.String">
+		select type_name as typeName from work_content_type where type_id = #{typeId}
+	</select>
+
+
+	<select id="getTypeByProjectIdAndContentId" resultType="WorkContentClaim">
+		select wcc.project_id as projectId, wcc.review_amt  as 'reviewAmt',wcc.set_amt as 'setAmt',wcc.content_id as 'contentId',pcd2.name as 'proConTentName',
+		wcc.cont_id as 'contract.id',
+		wct.type_name as 'typeName',wcc.create_date as 'createDate',wcc.update_date as 'updateDate', pcd.name as 'name',
+		wct.type_name as 'typeName',su.name as 'createName'
+		from (
+		select id,create_by,create_date,update_by,update_date,remarks,del_flag,project_id,content_id,cont_id,alter_type,alter_date,review_amt,set_amt  from work_content_altermanage
+		union all
+		select id,create_by,create_date,update_by,update_date,remarks,del_flag,project_id,content_id,cont_id,price_type,price_date,review_amt,set_amt from work_content_pricemanage
+		union all
+		select id,create_by,create_date,update_by,update_date,remarks,del_flag,project_id,content_id,contract_id,claim_type,claim_date,review_amt,set_amt from work_content_claim
+		union all
+		select id,create_by,create_date,update_by,update_date,remarks,del_flag,project_id,content_id,cont_id,visa_type,
+		visa_date,review_amt,set_amt from work_content_visamanage) as  wcc
+		left join project_content_data pcd on wcc.cont_id = pcd.id
+		left join project_content_data pcd2 on pcd2.id =wcc.content_id
+		left join project_content_info pci on pci.info_id = wcc.content_id
+		left join work_content_type wct on wct.type_id = pci.dict_type
+		left join sys_user su on su.id = wcc.create_by
+		where wcc.project_id = #{projectId} and wcc.content_id =#{contentId}
+		order by wcc.update_date asc
+	</select>
 </mapper>

+ 1 - 1
src/main/webapp/webpage/modules/projectcontentinfo/workContentList.jsp

@@ -273,7 +273,7 @@
                 treeDefaultClose: false,//是否默认折叠
                 treeLinkage: true,//父级展开时是否自动展开所有子级
                 elem: '#permissionTable',
-                url: '${ctx}/projectcontentinfo/projectcontentinfo/getProjectContentTreeDataOnLeft?projectId=${projectRecords.id}&workContentType=${workContentType}',
+                url: '${ctx}/projectcontentinfo/projectcontentinfo/getProjectContentTreeDataOnLeft?projectId=${projectRecords.id}&workContentType=${workContentType}&dictType=${dictType}',
                 page: false,
                 cols: [[
                     {type: 'numbers', title: '编号' ,width:80},

+ 241 - 0
src/main/webapp/webpage/modules/projectcontentinfo/workContentSumList.jsp

@@ -0,0 +1,241 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>工作内容详情管理</title>
+    <meta name="decorator" content="default"/>
+    <%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+    <script type="text/javascript">
+        $(function() {
+            $("#cus_name").show();
+            $("#cus_name").siblings().hide();
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp('slow');
+                    $(this).text("").removeClass("fa fa-chevron-up").addClass("fa fa-chevron-down");
+                    //document.getElementById("moresees").style.visibility = "hidden";
+                }else{
+                    $('#moresees').slideDown('slow');
+                    $(this).text("").removeClass("fa fa-chevron-down").addClass("fa fa-chevron-up");
+                    //document.getElementById("moresees").style.visibility = "visible";
+                }
+            });
+
+            laydate.render({
+                elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+        });
+        function switchInput(obj){
+            $("#"+obj).show();
+            $("#"+obj).siblings().hide();
+        }
+
+        function openDialogre(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){
+                }
+            });
+        }
+
+        // 确认对话框
+        function confirmxRefresh(mess, href){
+            top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+                //do something
+                if (typeof href == 'function') {
+                    href();
+                }else{
+                    resetTip(); //loading();
+                    $.ajax({
+                        url:href,
+                        data:$('#loginForm').serialize(),
+                        type:"post",
+                        success:function(data){
+                            if(data.status){
+                                parent.layer.msg('删除成功',{icon:1});
+                            }else {
+                                parent.layer.msg('删除失败',{icon:2});
+                            }
+                            parent.refreshTrees();
+                            location = '${ctx}/projectcontentinfo/projectcontentinfo/list?project.id=${projectRecords.id}';
+                        }
+                    });
+                }
+                top.layer.close(index);
+            });
+            return false;
+        }
+    </script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="contentShadow bottomShadow full-width fl">
+            <div class=" layui-row" id="queryDiv">
+                <!--查询条件-->
+                <form:form id="searchForm" modelAttribute="projectcontentinfo" action="${ctx}/projectcontentinfo/projectcontentinfo/list" method="post" class="form-inline">
+                    <input id="id" name="id" type="hidden" value="${id}"/>
+                    <input id="parentIds" name="parentIds" type="hidden" value="${parentIds}"/>
+                    <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 lw6">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">内容名称:</label>
+                            <div class="layui-input-block">
+                                <form:input path="projectContentData.name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">内容编号:</label>
+                            <div class="layui-input-block">
+                                <form:input path="projectContentData.number" htmlEscape="false" maxlength="64"   class=" form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <c:if test="${empty change}">
+                                    <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>
+                                </c:if>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;" class="lw6">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">负责人:</label>
+                            <div class="layui-input-block">
+                                <form:input path="projectContentData.master.name" htmlEscape="false" maxlength="64"   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 class="form-control layer-date laydate-icon layui-input laydate-icondate query-group" placeholder="开始时间" id="startDate" name="projectContentData.startDate" value="<fmt:formatDate value="${projectcontentinfo.projectContentData.startDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+                                <span class="group-sep">-</span>
+                                <input class="form-control layer-date laydate-icon layui-input laydate-icondate query-group" placeholder="结束时间" id="endDate" name="projectContentData.endDate" value="<fmt:formatDate value="${projectcontentinfo.projectContentData.endDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+                            </div>
+                        </div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+        <div class="contentShadow upShadow full-width fl">
+            <div class="layui-form contentDetails">
+                <div class="nav-btns">
+                    <c:if test="${empty change}">
+                        <a href="javascript:void(0)" onclick="openDialogre('新增工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}','95%','95%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp; 新增</a>
+                        <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                    </c:if>
+                    <div style="clear: both;"></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>
+<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:'num',align:'center',minWidth:200,title: '内容编号', sort: true}
+                ,{field:'name',align:'center',minWidth:200, title: '内容名称',templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=" + d.dictType +"&id="+ d.id + "&parentIds=" + d.pid + "&infoId=" + d.bid + "','95%','95%')\">" +
+                            "<span title=" + d.name + ">" + d.name + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'type',align:'center', title: '内容类型', width:150}
+                ,{field:'master',align:'center', title: '负责人', width:150}
+                ,{field:'initialMoney',align:'center', title: '调整前金额', width:150}
+                ,{field:'alterMoney',align:'center', title: '调整额', width:150}
+                ,{field:'ultimatelyMoney',align:'center', title: '调整后金额', width:150}
+                ,{field:'createDate', align:'center',title: '创建日期', width:150, sort: true}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="projectContentData" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "bid":"${projectContentData.id}"
+                    ,"dictType":"${dictType}"
+                    ,"id":"${id}"
+                    ,"pid":"${parentIds}"
+                    ,"initialMoney":"${projectContentData.initialMoney}"
+                    ,"alterMoney":"${projectContentData.alterMoney}"
+                    ,"ultimatelyMoney":"${projectContentData.ultimatelyMoney}"
+                    ,"num":"${projectContentData.number}"
+                    ,"name":"<c:out value="${projectContentData.name}" escapeXml="true"/>"
+                    ,"type":"${fns:getContentTypeName(projectContentData.type,"")}"
+                    ,"master":"${projectContentData.master.name}"
+                    ,"createDate":"<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd"/>"
+                    <c:if test="${projectContentData.createBy.id eq fns:getUser().id && empty change}">,"canedit":"1"</c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow3();
+    $(window).resize(function(){
+        resizeListWindow3();
+    });
+    $("a").on("click",addLinkVisied);
+</script>
+</body>
+</html>