Forráskód Böngészése

实施合同管理

user7 4 éve
szülő
commit
74be771e02

+ 47 - 0
src/main/java/com/jeeplus/modules/projectConstruction/dao/ContractDao.java

@@ -0,0 +1,47 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectConstruction.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 客户管理DAO接口
+ * @author 丁旭
+ * @version 2017-03-20
+ */
+@MyBatisDao
+public interface ContractDao extends CrudDao<ConstructionContract> {
+
+
+    int getBeUsedCount1(String clientId);
+    int getBeUsedCount2(String clientId);
+    int getBeUsedCount3(String clientId);
+    int getBeUsedCount4(String clientId);
+    int getBeUsedCount5(String clientId);
+
+    int countByUscCode(String uscCode);
+    int queryCount(ConstructionContract constructionContract);
+
+
+    List<WorkClientInfo> findByName(WorkClientInfo workClientInfo);
+
+    List<MainDictDetail> getJobTypeById(String id);
+
+    int getCount(WorkClientInfo workClientInfo);
+
+    List<WorkClientInfo> findList3(WorkClientInfo workClientInfo);
+    //根据统一社会信用代码查出来对应的客户信息表
+    WorkClientInfo findWorkClientInfo(WorkClientInfo workClientInfo);
+    //根据客户信息表查出来对应的联系人类型
+    List<Map> getJopType(WorkClientInfo work);
+
+    int insertContract(ConstructionContract constructionContract);
+}

+ 317 - 0
src/main/java/com/jeeplus/modules/projectConstruction/entity/ConstructionContract.java

@@ -0,0 +1,317 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectConstruction.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.workcontent.entity.WorkContentContractTerm;
+import org.springframework.format.annotation.NumberFormat;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 实施阶段合同登记Entity
+ * @author ssrh
+ * @version 2018-06-12
+ */
+public class ConstructionContract extends DataEntity<ConstructionContract> {
+	
+	private static final long serialVersionUID = 1L;
+	private String contractName;//合同名称
+
+	private String projectId;		// 项目id
+	private String contentId;		// 工作内容ID
+	private ProjectContentData program;		// 合约规划名称
+	private String cnumber;		// 合同编号
+	private String contCate;		// 合同分类
+	private String contAttr;		// 合同属性
+	private String lettingAgent;		// 发包人
+	private String contractor;		// 承包人
+	private String scope;		// 合同范围
+	private Date signDate;		// 签约日期
+	private Date effectDate;		// 生效日期
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double titularAmt;		// 名义合同金额
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double trueAmt;		// 有效合同金额
+	private String pledgePercent;		// 保修金比例(%)
+	private Date startWorkDate;		// 合同开工日期
+	private Date endWorkDate;		// 合同竣工日期
+	private String stopPercent;		// 止付比例(%)
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double stopAmt;		// 止付金额
+	private String status;		// 合同执行状态
+	private String payType;		// 支付方式
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double payAmt;		// 支付金额
+	private Date startDate;		// 开始日期
+	private Date endDate;		// 结束日期
+    List<WorkContentContractTerm> termList;
+
+    private String createName; //操作人名称
+
+    private String proConTentName;//关联合同名称
+
+	public String getCreateName() {
+		return createName;
+	}
+
+	public void setCreateName(String createName) {
+		this.createName = createName;
+	}
+
+	public String getProConTentName() {
+		return proConTentName;
+	}
+
+	public void setProConTentName(String proConTentName) {
+		this.proConTentName = proConTentName;
+	}
+
+	public ConstructionContract() {
+		super();
+	}
+
+	public ConstructionContract(String id){
+		super(id);
+	}
+
+	@ExcelField(title="项目id", align=2, sort=7)
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+	
+	@ExcelField(title="工作内容ID", align=2, sort=8)
+	public String getContentId() {
+		return contentId;
+	}
+
+	public void setContentId(String contentId) {
+		this.contentId = contentId;
+	}
+
+    public ProjectContentData getProgram() {
+        return program;
+    }
+
+    public void setProgram(ProjectContentData program) {
+        this.program = program;
+    }
+
+    @ExcelField(title="合同编号", align=2, sort=10)
+	public String getCnumber() {
+		return cnumber;
+	}
+
+	public void setCnumber(String cnumber) {
+		this.cnumber = cnumber;
+	}
+	
+	@ExcelField(title="合同分类", dictType="", align=2, sort=11)
+	public String getContCate() {
+		return contCate;
+	}
+
+	public void setContCate(String contCate) {
+		this.contCate = contCate;
+	}
+	
+	@ExcelField(title="合同属性", dictType="", align=2, sort=12)
+	public String getContAttr() {
+		return contAttr;
+	}
+
+	public void setContAttr(String contAttr) {
+		this.contAttr = contAttr;
+	}
+	
+	@ExcelField(title="发包人", align=2, sort=13)
+	public String getLettingAgent() {
+		return lettingAgent;
+	}
+
+	public void setLettingAgent(String lettingAgent) {
+		this.lettingAgent = lettingAgent;
+	}
+	
+	@ExcelField(title="承包人", align=2, sort=14)
+	public String getContractor() {
+		return contractor;
+	}
+
+	public void setContractor(String contractor) {
+		this.contractor = contractor;
+	}
+	
+	@ExcelField(title="合同范围", align=2, sort=15)
+	public String getScope() {
+		return scope;
+	}
+
+	public void setScope(String scope) {
+		this.scope = scope;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="签约日期不能为空")
+	@ExcelField(title="签约日期", align=2, sort=16)
+	public Date getSignDate() {
+		return signDate;
+	}
+
+	public void setSignDate(Date signDate) {
+		this.signDate = signDate;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="生效日期不能为空")
+	@ExcelField(title="生效日期", align=2, sort=17)
+	public Date getEffectDate() {
+		return effectDate;
+	}
+
+	public void setEffectDate(Date effectDate) {
+		this.effectDate = effectDate;
+	}
+	
+	@ExcelField(title="名义合同金额", align=2, sort=18)
+	public Double getTitularAmt() {
+		return titularAmt;
+	}
+
+	public void setTitularAmt(Double titularAmt) {
+		this.titularAmt = titularAmt;
+	}
+	
+	@ExcelField(title="有效合同金额", align=2, sort=19)
+	public Double getTrueAmt() {
+		return trueAmt;
+	}
+
+	public void setTrueAmt(Double trueAmt) {
+		this.trueAmt = trueAmt;
+	}
+	
+	@ExcelField(title="保修金比例(%)", align=2, sort=20)
+	public String getPledgePercent() {
+		return pledgePercent;
+	}
+
+	public void setPledgePercent(String pledgePercent) {
+		this.pledgePercent = pledgePercent;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="合同开工日期不能为空")
+	@ExcelField(title="合同开工日期", align=2, sort=21)
+	public Date getStartWorkDate() {
+		return startWorkDate;
+	}
+
+	public void setStartWorkDate(Date startWorkDate) {
+		this.startWorkDate = startWorkDate;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="合同竣工日期不能为空")
+	@ExcelField(title="合同竣工日期", align=2, sort=22)
+	public Date getEndWorkDate() {
+		return endWorkDate;
+	}
+
+	public void setEndWorkDate(Date endWorkDate) {
+		this.endWorkDate = endWorkDate;
+	}
+	
+	@ExcelField(title="止付比例(%)", align=2, sort=23)
+	public String getStopPercent() {
+		return stopPercent;
+	}
+
+	public void setStopPercent(String stopPercent) {
+		this.stopPercent = stopPercent;
+	}
+	
+	@ExcelField(title="止付金额", align=2, sort=24)
+	public Double getStopAmt() {
+		return stopAmt;
+	}
+
+	public void setStopAmt(Double stopAmt) {
+		this.stopAmt = stopAmt;
+	}
+	
+	@ExcelField(title="合同执行状态", dictType="", align=2, sort=25)
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	
+	@ExcelField(title="支付方式", align=2, sort=26)
+	public String getPayType() {
+		return payType;
+	}
+
+	public void setPayType(String payType) {
+		this.payType = payType;
+	}
+	
+	@ExcelField(title="支付金额", align=2, sort=27)
+	public Double getPayAmt() {
+		return payAmt;
+	}
+
+	public void setPayAmt(Double payAmt) {
+		this.payAmt = payAmt;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="开始日期不能为空")
+	@ExcelField(title="开始日期", align=2, sort=28)
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@NotNull(message="结束日期不能为空")
+	@ExcelField(title="结束日期", align=2, sort=29)
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+    public List<WorkContentContractTerm> getTermList() {
+        return termList;
+    }
+
+    public void setTermList(List<WorkContentContractTerm> termList) {
+        this.termList = termList;
+    }
+
+	public String getContractName() {
+		return contractName;
+	}
+
+	public void setContractName(String contractName) {
+		this.contractName = contractName;
+	}
+}

+ 120 - 0
src/main/java/com/jeeplus/modules/projectConstruction/service/ContractService.java

@@ -0,0 +1,120 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectConstruction.service;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.SpringContextHolder;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectConstruction.dao.ContractDao;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.sys.dao.AreaDao;
+import com.jeeplus.modules.sys.dao.MainDictDetailDao;
+import com.jeeplus.modules.sys.entity.Area;
+import com.jeeplus.modules.sys.entity.MainDict;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.MainDictService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientBankDao;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientInfoDao;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientLinkmanDao;
+import com.jeeplus.modules.workclientinfo.entity.*;
+import com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoDao;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workreimbursement.utils.VarStr;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 客户管理Service
+ * @author 丁旭
+ * @version 2017-03-20
+ */
+@Service
+@Transactional(readOnly = true)
+public class ContractService extends CrudService<ContractDao,ConstructionContract> {
+
+	@Autowired
+	private WorkClientLinkmanDao workClientLinkmanDao;
+	@Autowired
+	private WorkClientBankDao workClientBankDao;
+	@Autowired
+	private WorkClientAttachmentDao workClientAttachmentDao;
+    @Autowired
+    private WorkContractInfoDao workContractInfoDao;
+    @Autowired
+    private WorkClientInfoDao workClientInfoDao;
+    @Autowired
+    private SerialNumTplService serialNumTplService;
+    @Autowired
+    private ContractDao contractDao;
+
+    @Autowired
+    private AreaDao areaDao;
+
+    private static MainDictService mainDictService = SpringContextHolder.getBean(MainDictService.class);
+
+    private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
+
+
+
+
+    /**
+     * 获取客户列表信息
+     * @param ConstructionContract
+     * @return
+     */
+	public List<ConstructionContract> findList(ConstructionContract constructionContract) {
+        constructionContract.setDelFlag("0");
+		return super.findList(constructionContract);
+	}
+    /**
+     * 获取一个客户信息
+     * @param page 分页对象
+     * @param ConstructionContract
+     * @return
+     */
+    public Page<ConstructionContract> findPage(Page<ConstructionContract> page, ConstructionContract constructionContract) {
+        long t1 = System.currentTimeMillis();
+        //根据项目类型获取对应的客户id个数
+        int count = contractDao.queryCount(constructionContract);
+        page.setCount(count);
+        long t2 = System.currentTimeMillis();
+        logger.info("查询客户总数耗时:{}",t2-t1);
+        page.setCountFlag(false);
+        constructionContract.setPage(page);
+        List<ConstructionContract> list = findList(constructionContract);
+        long t3 = System.currentTimeMillis();
+        logger.info("查询客户列表耗时:{}",t3-t2);
+        long t4 = System.currentTimeMillis();
+        logger.info("查询客户详情耗时:{}",t4-t3);
+        logger.info("查询客户总耗时:{}",t4-t1);
+        page.setList(list);
+        return page;
+    }
+
+
+    public int insertContract(ConstructionContract constructionContract) {
+        int count=contractDao.insertContract(constructionContract);
+        return count;
+    }
+}

+ 206 - 537
src/main/java/com/jeeplus/modules/projectConstruction/web/ContractController.java

@@ -17,6 +17,8 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.projectConstruction.service.ContractService;
 import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
 import com.jeeplus.modules.projectType.service.ProjectResultsFileTemplateService;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
@@ -24,9 +26,11 @@ import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectrecord.service.early.ProjectEarlyReviewService;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
@@ -93,6 +97,12 @@ public class ContractController extends BaseController {
     private ProjectReportDataService projectReportDataService;
     @Autowired
     private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ContractService contractService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
 
     private static String template_path = Global.getProjectTemplatePath()+"咨询工作方案.xlsx";
     private static String template_name = "咨询工作方案.xlsx";
@@ -113,49 +123,84 @@ public class ContractController extends BaseController {
      * 项目列表页面
      */
     @RequiresPermissions("project:constructionContract:list")
-    @RequestMapping(value = {"list", ""})
-    public String list(ProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+   /* @RequestMapping(value = {"list", ""})
+    public String list(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model) {
+
+
         if(UserUtils.isManager()){
             model.addAttribute("flag","1");
         }
-        Page<ProjectRecords> page = projectRecordsService.findPage(new Page<ProjectRecords>(request, response), projectRecords);
-        //无合同状态下,获取委托方的名称
-        List<ProjectRecords> list = page.getList();
-        for (int i = 0; i < list.size(); i++) {
-            ProjectRecords records1 = list.get(i);
-            if (records1.getWorkContractInfo() == null) {
-                projectRecordsService.queryLinkmanInfos(records1);
-                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
-                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
-                    WorkContractInfo contractInfo = new WorkContractInfo();
-                    contractInfo.setClient(linkman.getClientId());
-                    records1.setWorkContractInfo(contractInfo);
-                }
-            }
+        Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
+        model.addAttribute("page", page);
+        return "modules/projectConstruction/projectConstructionList";
+    }*/
+    @RequestMapping(value = {"list", ""})
+    public String list(WorkClientInfo workClientInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+        WorkClientLinkman workClientLinkman = workClientInfo.getWorkClientLinkman();
+        if(workClientLinkman != null){
+            workClientLinkman.setId("");
+        }
+        workClientInfo.setWorkClientLinkman(workClientLinkman);
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
         }
+        Page<WorkClientInfo> page = workClientInfoService.findPage(new Page<WorkClientInfo>(request, response), workClientInfo);
         model.addAttribute("page", page);
         return "modules/projectConstruction/projectConstructionList";
     }
 
+
+
+
+
     /**
-     * 项目列表页面
+     * 跳转添加合同页面
      */
-    @RequestMapping(value = "getProjectList")
-    @ResponseBody
-    public Map<String,List> getProjectList(ProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+    @RequestMapping(value = "form")
+    public String form(ProjectRecords projectRecords, Model model) {
+        ConstructionContract constructionContract =  new ConstructionContract();
+        model.addAttribute("constructionContract", constructionContract);
+        /*if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+            projectRecords = projectRecordsService.get(projectRecords.getId());
+            projectRecordsService.queryProjectDetail(projectRecords);
+        }else {
+            projectRecords.setCreateBy(UserUtils.getUser());
+            projectRecords.setCreateDate(new Date());
+        }
+        model.addAttribute("projectRecords", projectRecords);*/
+        return "modules/projectConstruction/projectConstructionForm";
+    }
+
+    /**
+     * 添加合同数据
+     */
+    @RequestMapping(value = "save")
+    public String save(ConstructionContract constructionContract, Model model) {
+        int count=contractService.insertContract(constructionContract);
+        return "modules/projectConstruction/projectConstructionForm";
+    }
+
+    @RequestMapping("selectcontent")
+    public String gridSelect(ProjectImplementEarly projectRecords, String searchLabel ,HttpServletRequest request, HttpServletResponse response, Model model) throws UnsupportedEncodingException {
+        /*Page<ProjectContentData> page = projectContentDataService.findPage(new Page<ProjectContentData>(request, response), projectContentData);
+        model.addAttribute("obj", projectContentData);
+        model.addAttribute("page", page);
+        searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+        model.addAttribute("searchLabel",searchLabel);*/
+
+
         if(UserUtils.isManager()){
             model.addAttribute("flag","1");
         }
-        Page<ProjectRecords> page = projectRecordsService.findPage(new Page<ProjectRecords>(request, response), projectRecords);
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
         //无合同状态下,获取委托方的名称
-        List<ProjectRecords> list = page.getList();
+        List<ProjectImplementEarly> list = page.getList();
         List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
         Map<String,List> map = new HashMap<>();
         for (int i = 0; i < list.size(); i++) {
             ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
-            ProjectRecords records1 = list.get(i);
+            ProjectImplementEarly records1 = list.get(i);
             if (records1.getWorkContractInfo() == null) {
-                projectRecordsService.queryLinkmanInfos(records1);
                 if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
                     WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
                     WorkContractInfo contractInfo = new WorkContractInfo();
@@ -167,33 +212,57 @@ public class ContractController extends BaseController {
             projectRecordTreeData.setId(records1.getId());
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectId(records1.getProjectId());
-            projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
+            if(null!= records1.getWorkContractInfo()){
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            }else{
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
+            }
             projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
             projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
             projectRecordTreeData.setCreateDate(records1.getCreateDate());
             projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
             //父节点的pid设置为0
             projectRecordTreeData.setPid("0");
-            projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
             //遍历项目负责人信息
             List<User> masterUserList = records1.getProjectLeaders();
             List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
             for (User masterUser:masterUserList) {
                 masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
             }
+            //masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if(masterId.equals(UserUtils.getUser().getId())){
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                }else{
+                    projectRecordTreeData.setOperationSign(0);
+                }
+            }
+
             //项目负责人list数据转String
             String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
-            System.out.println(projectLeader);
             projectRecordTreeData.setProjectLeader(projectLeader);
             projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
             projectRecordTreeDataList.add(projectRecordTreeData);
 
+            //获取阶段Type父节点信息
+            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施前期");
             //根据项目id查询相关的项目阶段内容
-            List<ProjectRecordTreeData> reportDataList = projectReportDataService.getProjectRecordDataList(records1.getId());
+            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
             if(0 != reportDataList.size()){
                 Projectcontentinfo select = new Projectcontentinfo();
-                select.setProject(records1);
+                ProjectRecords project = new ProjectRecords();
+                project.setId(records1.getId());
                 select.setParentIds("0,");
+                select.setProject(project);
                 List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
                 for (ProjectRecordTreeData reportData : reportDataList) {
                     //添加工作内容id
@@ -202,541 +271,141 @@ public class ContractController extends BaseController {
                         reportData.setParentIds("0,");
                         reportData.setDictType("");
                     }
+                    //将项目所属类型名称放入树形列表的projectId中
+                    reportData.setProjectId(reportData.getProjectLeader());
+                    //添加项目负责人
+                    reportData.setProjectLeader(projectLeader);
                     //添加登陆者id
                     reportData.setLoginId(UserUtils.getUser().getId());
                     reportData.setCreateId(records1.getCreateBy().getId());
+                    //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+                    for (String masterId : masterIdList) {
+                        if(masterId.equals(UserUtils.getUser().getId())){
+                            reportData.setOperationSign(1);
+                            break;
+                        }else{
+                            reportData.setOperationSign(0);
+                        }
+                    }
                 }
             }
             projectRecordTreeDataList.addAll(reportDataList);
 
         }
-        map.put("data",projectRecordTreeDataList);
-        return map;
-    }
-
-    /**
-     * 查看,增加,编辑项目表单页面
-     */
-    @RequestMapping(value = "form")
-    public String form(ProjectRecords projectRecords, Model model) {
-        WorkContentContractinfo workContentContractinfo =  new WorkContentContractinfo();
-        model.addAttribute("workContentContractinfo", workContentContractinfo);
-        /*if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
-            projectRecords = projectRecordsService.get(projectRecords.getId());
-            projectRecordsService.queryProjectDetail(projectRecords);
-        }else {
-            projectRecords.setCreateBy(UserUtils.getUser());
-            projectRecords.setCreateDate(new Date());
-        }
-        model.addAttribute("projectRecords", projectRecords);*/
-        return "modules/projectConstruction/projectConstructionForm";
-    }
-
-    /**
-     * 查看
-     * @param projectRecords
-     * @param model
-     * @return
-     */
-    @RequiresPermissions(value={"project:projectRecords:view"})
-    @RequestMapping(value = "view")
-    public String view(ProjectRecords projectRecords, Model model) {
-        if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
-            projectRecordsService.queryProjectDetail(projectRecords);
-        }
-        model.addAttribute("projectRecords", projectRecords);
-        return "modules/projectrecord/projectRecordsView";
-    }
-
-    /**
-     * 保存项目
-     */
-    @RequiresPermissions(value={"project:projectRecords:add","project:projectRecords:edit"},logical=Logical.OR)
-    @RequestMapping(value = "save")
-    public String save(ProjectRecords projectRecords, Model model, RedirectAttributes redirectAttributes) {
-        if (!beanValidator(model, projectRecords)){
-            return form(projectRecords, model);
-        }
-        try {
-//            projectRecords.setProjectStatus(ProjectStatusEnum.IN_APRL.getValue());
-            if (!projectRecords.getIsNewRecord()) {//编辑表单保存
-                ProjectRecords t = projectRecordsService.get(projectRecords.getId());//从数据库取出记录的值
-                MyBeanUtils.copyBeanNotNull2Bean(projectRecords, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
-                projectRecordsService.saveProject(t,ProjectStatusEnum.IN_APRL);//保存
-            } else {//新增表单保存
-                projectRecordsService.saveProject(projectRecords,ProjectStatusEnum.IN_APRL);//保存
-            }
-            addMessage(redirectAttributes, "保存项目成功");
-        }catch (Exception e){
-            logger.error("保存项目异常:",e);
-            addMessage(redirectAttributes, "保存项目异常:"+e.getMessage());
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
-    /**
-     * 保存项目
-     */
-    @RequiresPermissions(value={"project:projectRecords:add","project:projectRecords:edit"},logical=Logical.OR)
-    @RequestMapping(value = "tstore")
-    public String tStore(ProjectRecords projectRecords, Model model, RedirectAttributes redirectAttributes) throws Exception{
-        if (!beanValidator(model, projectRecords)){
-            return form(projectRecords, model);
-        }
-        try {
-//            projectRecords.setProjectStatus(ProjectStatusEnum.TSTORE.getValue());
-            if (!projectRecords.getIsNewRecord()) {//编辑表单保存
-                ProjectRecords t = projectRecordsService.get(projectRecords.getId());//从数据库取出记录的值
-                MyBeanUtils.copyBeanNotNull2Bean(projectRecords, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
-                projectRecordsService.saveProject(t,ProjectStatusEnum.TSTORE);//保存
-            } else {//新增表单保存
-                projectRecordsService.saveProject(projectRecords,ProjectStatusEnum.TSTORE);//保存
-            }
-            addMessage(redirectAttributes, "暂存项目成功");
-        }catch (Exception e){
-            logger.error("暂存项目异常:",e);
-            addMessage(redirectAttributes, "暂存项目异常:"+e.getMessage());
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
-
-    /**
-     * 编辑项目表单页面
-     */
-    @RequiresPermissions(value={"project:projectRecords:edit"},logical=Logical.OR)
-    @RequestMapping(value = "modify")
-    public String modify(ProjectRecords projectRecords, Model model,RedirectAttributes redirectAttributes) {
-        projectRecords=projectRecordsService.get(projectRecords.getId());
-        ProcessInstance processInstance = actTaskService.getProcIns(projectRecords.getProcessInstanceId());
-        if (processInstance!=null) {
-            Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
-            Act act = new Act();
-            act.setTaskId(taskInfok.getId());
-            act.setTaskName(taskInfok.getName());
-            act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
-            act.setProcDefId(taskInfok.getProcessDefinitionId());
-            act.setProcInsId(taskInfok.getProcessInstanceId());
-            act.setTask(taskInfok);
-            projectRecords.setAct(act);
-        }
-
-        projectRecordsService.queryProjectDetail(projectRecords);
-        model.addAttribute("projectRecords", projectRecords);
-        return "modules/projectrecord/projectRecordsModify";
-    }
-
-    /**
-     * 删除项目
-     */
-    @RequiresPermissions("project:projectRecords:del")
-    @RequestMapping(value = "delete")
-    public String delete(ProjectRecords projectRecords, RedirectAttributes redirectAttributes) {
-        int status = projectRecords.getProjectStatus();
-        if(status==ProjectStatusEnum.TSTORE.getValue()||status==ProjectStatusEnum.REJECTED.getValue()||status==ProjectStatusEnum.RECALL.getValue()){
-            projectRecordsService.delete(projectRecords);
-            addMessage(redirectAttributes, "删除项目成功");
-            return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-        }else {
-            addMessage(redirectAttributes, "删除项目失败,只有“暂存”、“驳回”、“撤回”状态的项目才能删除");
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
-
-    /**
-     * 批量删除项目
-     */
-    @RequiresPermissions("project:projectRecords:del")
-    @RequestMapping(value = "deleteAll")
-    public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
-        String idArray[] =ids.split(",");
-        for(String id : idArray){
-            projectRecordsService.delete(projectRecordsService.get(id));
-        }
-        addMessage(redirectAttributes, "删除项目成功");
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
 
-    /**
-     * 导出excel文件
-     */
-    @RequiresPermissions("project:projectRecords:export")
-    @RequestMapping(value = "export", method= RequestMethod.POST)
-    public String exportFile(ProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
-        try {
-            String fileName = "项目"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-            Page<ProjectRecords> page = projectRecordsService.findPage(new Page<ProjectRecords>(request, response, -1), projectRecords);
-            new ExportExcel("项目", ProjectRecords.class).setDataList(page.getList()).write(response, fileName).dispose();
-            return null;
-        } catch (Exception e) {
-            addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+        return "modules/sys/gridselectProjcontent";
     }
 
     /**
-     * 下载导入项目数据模板
+     * 项目列表页面
      */
-    @RequiresPermissions("project:projectRecords:import")
-    @RequestMapping(value = "import/template")
-    public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
-        try {
-            String fileName = "项目数据导入模板.xlsx";
-            List<ProjectRecords> list = Lists.newArrayList();
-            new ExportExcel("项目数据", ProjectRecords.class, 1).setDataList(list).write(response, fileName).dispose();
-            return null;
-        } catch (Exception e) {
-            addMessage(redirectAttributes, "导入模板下载失败!失败信息:"+e.getMessage());
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
-
-
-
-    @RequestMapping("getContractInfo")
+    @RequestMapping(value = "getProjectList")
     @ResponseBody
-    public WorkContractInfo queryContractInfo(WorkContractInfo  contractInfo){
-        WorkContractInfo workContractInfo = contractInfoService.get(contractInfo.getId());
-        if(workContractInfo==null){
-            return workContractInfo;
+    public Map<String,List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
         }
-        workContractInfo.setConstructionProjectTypeStr(DictUtils.getDictLabel(String.valueOf(workContractInfo.getConstructionProjectType()),"construction_project_type",""));
-        if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
-            StringBuilder workClinetInfoIds = new StringBuilder();
-            for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
-                workClinetInfoIds.append(workClientInfo.getId()).append(",");
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
+        Map<String,List> map = new HashMap<>();
+        for (int i = 0; i < list.size(); i++) {
+            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
+            ProjectImplementEarly records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
             }
-            workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
-            workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
-        }
-        return  workContractInfo;
-    }
-
-    //	审批页面
-    @RequestMapping(value = "projectRecordsAudit")
-    public String workContractInfoAudit(Act act, ProjectRecords projectRecords, Model model) {
-
-        if (act.getProcInsId() != null) {
-            if (actTaskService.getProcIns(act.getProcInsId()) != null) {
-                act.setProcIns(actTaskService.getProcIns(act.getProcInsId()));
-            } else {
-                act.setFinishedProcIns(actTaskService.getFinishedProcIns(act.getProcInsId()));
+            //将界面需要展示数据放入类中
+            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setProjectName(records1.getProjectName());
+            projectRecordTreeData.setProjectId(records1.getProjectId());
+            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
+            if(null!= records1.getWorkContractInfo()){
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            }else{
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
             }
-        }
-        if (act != null && StringUtils.isNotBlank(act.getTaskId())) {
-            projectRecords.setAct(act);
-            model.addAttribute("processInstanceId", projectRecords.getProcessInstanceId());
-        }
-        if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
-            projectRecordsService.queryProjectDetail(projectRecords);
-        }
-        model.addAttribute("projectRecords", projectRecords);
-        return "modules/projectrecord/projectRecordsAudit";
-    }
-
-    @RequestMapping(value = "getProcess")
-    public String getProcess(ProjectRecords projectRecords, Model model,HttpServletRequest request){
-        model.addAttribute("processInstanceId", projectRecords.getProcessInstanceId());
-        return "modules/projectrecord/projectRecordsTask";
-    }
-
-    @RequestMapping(value = "revoke")
-    public String revoke(HttpServletRequest request, RedirectAttributes redirectAttributes) {
-        HashMap<String, String> requestMap = findRequestMap(request);
-        String processInstanceId = requestMap.get("processInstanceId");
-        String id = requestMap.get("id");
-        try {
-            ProjectRecords projectRecords = projectRecordsService.get(id);
-            if(5==projectRecords.getProjectStatus()){
-                addMessage(redirectAttributes, "项目登记已审批通过,无法撤回");
-                return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
+            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
+            projectRecordTreeData.setCreateDate(records1.getCreateDate());
+            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
+            //父节点的pid设置为0
+            projectRecordTreeData.setPid("0");
+            //遍历项目负责人信息
+            List<User> masterUserList = records1.getProjectLeaders();
+            List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
+            for (User masterUser:masterUserList) {
+                masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
             }
-            projectRecordsService.cancelProcess(projectRecords);
-            addMessage(redirectAttributes, "撤回该项目登记成功");
-        }catch (Exception e){
-            logger.info(e.getMessage());
-            addMessage(redirectAttributes, "撤回该项目登记失败");
-        }
-        return "redirect:" + Global.getAdminPath() + "/project/projectRecords/?repage";
-    }
-
-    /**
-     * 查询待办任务
-     *
-     * @param act
-     * @param model
-     * @return
-     */
-    @RequestMapping("/toDoList")
-    public String queryToList(Act act, Model model) {
-
-        //合同申请流程
-        act.setProcDefKey(ActUtils.PD_PROJECTRECORD[0]);
-        List<Act> list = actTaskService.todoList(act);
-        Office office = UserUtils.getSelectCompany();
-        String companyId = office==null?"":office.getId();
-        List<Activity> activities = activityService.groupByActivityMenu("7854872f45b84acd893010e66a3db2c8",companyId);
-        for (Activity activity:activities){
-            act.setProcDefKey(activity.getProcessKey());
-            list.addAll(actTaskService.todoList(act));
-        }
-
-        Role role = UserUtils.getSelectRole().get(0);
-        List<ProjectRecords> lists = new ArrayList<ProjectRecords>();
-        for (Act a : list) {
-            if (a.getTask().getTaskDefinitionKey()!=null) {
-                ProjectRecords projectRecords = projectRecordsService.getByProcessInstanceId(a.getProcInsId());
-                if (projectRecords==null){continue;}
-                projectRecordsService.queryContractInfos(projectRecords);
-                projectRecords.setAuditType("项目登记");
-                if(projectRecords.getProjectStatus()!= ProjectStatusEnum.RECALL.getValue()) {
-                    User user1 = UserUtils.get(projectRecords.getCreateBy().getId());
-                    if (projectRecords != null && user1.getCompany().getId().equals(companyId)) {
-                        projectRecords.setCreateBy(user1);
-                        if (a.getVars().getMap().get("applyUserId") != null) {
-                            User user = UserUtils.get(a.getVars().getMap().get("applyUserId").toString());
-                            if (user != null) {
-                                a.getVars().getMap().put("applyUserId", UserUtils.get(a.getVars().getMap().get("applyUserId").toString()).getName());
-                            }
-                        }
-                        projectRecords.setAct(a);
-                        lists.add(projectRecords);
-                    }
+            //masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if(masterId.equals(UserUtils.getUser().getId())){
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                }else{
+                    projectRecordTreeData.setOperationSign(0);
                 }
             }
-        }
 
-        /*------变更--------*/
-        act.setProcDefKey("projectAlter");
-        List<Act> list3 = actTaskService.todoList(act);
-        Office office3 = UserUtils.getSelectCompany();
-        String companyId3 = office3==null?"":office3.getId();
-        List<Activity> activities3 = activityService.groupByActivityMenu("807c6d4b5623474792fe78ff1fd1cdff",companyId3);
-        for (Activity activity:activities3){
-            act.setProcDefKey(activity.getProcessKey());
-            list3.addAll(actTaskService.todoList(act));
-        }
+            //项目负责人list数据转String
+            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
+            projectRecordTreeData.setProjectLeader(projectLeader);
+            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
+            projectRecordTreeDataList.add(projectRecordTreeData);
 
-        for (Act a : list3) {
-            ProjectRecords projectRecords = projectRecordsService.getByAlterProcessInstanceId(a.getTask().getProcessInstanceId());
-            if (projectRecords!=null){
-                projectRecordsService.queryContractInfos(projectRecords);
-            }
-            if (projectRecords != null && projectRecords.getCompany().getId().equals(companyId3)&& projectRecords.getProjectStatus()==ProjectStatusEnum.ON_CHANGE.getValue()) {
-                if (a.getVars().getMap().get("applyUserId") != null) {
-                    User user = UserUtils.get(a.getVars().getMap().get("applyUserId").toString());
-                    if (user != null) {
-                        a.getVars().getMap().put("applyUserId", UserUtils.get(a.getVars().getMap().get("applyUserId").toString()).getName());
+            //获取阶段Type父节点信息
+            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施前期");
+            //根据项目id查询相关的项目阶段内容
+            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
+            if(0 != reportDataList.size()){
+                Projectcontentinfo select = new Projectcontentinfo();
+                ProjectRecords project = new ProjectRecords();
+                project.setId(records1.getId());
+                select.setParentIds("0,");
+                select.setProject(project);
+                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
+                for (ProjectRecordTreeData reportData : reportDataList) {
+                    //添加工作内容id
+                    if(p.size()>0){
+                        reportData.setContentPId(p.get(0).getId());
+                        reportData.setParentIds("0,");
+                        reportData.setDictType("");
+                    }
+                    //将项目所属类型名称放入树形列表的projectId中
+                    reportData.setProjectId(reportData.getProjectLeader());
+                    //添加项目负责人
+                    reportData.setProjectLeader(projectLeader);
+                    //添加登陆者id
+                    reportData.setLoginId(UserUtils.getUser().getId());
+                    reportData.setCreateId(records1.getCreateBy().getId());
+                    //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+                    for (String masterId : masterIdList) {
+                        if(masterId.equals(UserUtils.getUser().getId())){
+                            reportData.setOperationSign(1);
+                            break;
+                        }else{
+                            reportData.setOperationSign(0);
+                        }
                     }
                 }
-                projectRecords.setAct(a);
-                projectRecords.setAuditType("项目变更");
-                lists.add(projectRecords);
-            }
-        }
-
-        //排除 重新申请|撤销
-        Iterator<ProjectRecords> it = lists.iterator();
-        while(it.hasNext()){
-            ProjectRecords w = it.next();
-            if(w.getAct()!=null && w.getAct().getTaskDefKey().equals("reapply")){
-                it.remove();
-            }
-        }
-
-        model.addAttribute("list", lists);
-        return "modules/projectrecord/projectRecordsToDoList";
-    }
-
-    /**
-     * 审批
-     * @param projectRecords
-     * @param model
-     * @param upload_files
-     * @param redirectAttributes
-     * @return
-     */
-    @RequestMapping("saveAudit")
-    public String saveAudit(ProjectRecords projectRecords, Model model,
-                            @RequestParam(value = "upload_files", required = false) MultipartFile[] upload_files,
-                            RedirectAttributes redirectAttributes)  {
-        String home = projectRecords.getHome();
-        try {
-            String taskDefKey = projectRecords.getAct().getTaskDefKey();
-            //当状态为未通过时,重新修改数据
-            if ("modifyApply".equals(taskDefKey)) {
-                projectRecords.getAct().setComment("重新申请");
-            }
-            List<User> users = UserUtils.getByProssType(projectRecords.getProcessInstanceId(),1);
-            String flag = projectRecords.getAct().getFlag();
-            if ("yes".equals(flag) && (users==null || users.size()==0)){
-                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
-            }else {
-                String str = projectRecordsService.auditSave(projectRecords,users);
-                addMessage(redirectAttributes, str);
             }
-        }catch (Exception e){
-            addMessage(redirectAttributes, "项目登记流程审批失败");
-        }
-
-        if (StringUtils.isNotBlank(home) && "home".equals(home)){
-            return "redirect:" + Global.getAdminPath() + "/home/?repage";
-        }else {
-            return "redirect:" + Global.getAdminPath() + "/project/projectRecords/?repage";
-        }
-    }
-
-    /**
-     * 查询已办列表
-     * @return
-     */
-    @RequestMapping("/queryCompleteList")
-    public String queryCompleteList(Act act,HttpServletRequest request,HttpServletResponse response,Model model){
-        act.setProcDefKey("projectAudit");
-        List<ProjectRecords> list = projectRecordsService.historicList(act);
-        Office office = UserUtils.getSelectCompany();
-        String companyId = office==null?"":office.getId();
-        List<Activity> activities = activityService.groupByActivityMenu("7854872f45b84acd893010e66a3db2c8",companyId);
-        for (Activity activity:activities){
-            act.setProcDefKey(activity.getProcessKey());
-            list.addAll(projectRecordsService.historicList(act));
-        }
-
-        //合同变更
-        act.setProcDefKey("projectAlter");
-        List<Activity> activities3 = activityService.groupByActivityMenu("807c6d4b5623474792fe78ff1fd1cdff",companyId);
-        for (Activity activity:activities3){
-            act.setProcDefKey(activity.getProcessKey());
-            list.addAll(projectRecordsService.historicAlterList(act));
-        }
-        model.addAttribute("list",list);
-        return "modules/projectrecord/projectRecordsHistoricList";
-    }
-
-    /**
-     * 选择合同
-     */
-    @RequestMapping(value = "selectcontract")
-    public String selectcontractId(WorkContractInfo contract, String url,String type,String isTotal, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(!"1".equals(UserUtils.getSelectCompany().getId())){
-            contract.setOfficeId(UserUtils.getSelectOffice().getId());
-            contract.setChargeCompany(UserUtils.getSelectOffice().getId());
-            contract.setCreateBy(UserUtils.getUser());
-        }
-        contract.setContractState("5");
-        Page<WorkContractInfo> page = contractInfoService.findPageReceipts(new Page<WorkContractInfo>(request, response),  contract);
-        try {
-            fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
-            fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");
-            searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
-            searchKey = URLDecoder.decode(searchKey, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        model.addAttribute("labelNames", fieldLabels.split("\\|"));
-        model.addAttribute("labelValues", fieldKeys.split("\\|"));
-        model.addAttribute("fieldLabels", fieldLabels);
-        model.addAttribute("fieldKeys", fieldKeys);
-        model.addAttribute("url", url);
-        model.addAttribute("searchLabel", searchLabel);
-        model.addAttribute("searchKey", searchKey);
-        model.addAttribute("type", type);
-        model.addAttribute("isTotal", isTotal);
-        model.addAttribute("obj", contract);
-        model.addAttribute("page", page);
-        return "modules/sys/gridselectContractDetail";
-    }
-
-    @RequestMapping(value = "detailList")
-    @RequiresPermissions("project:projectRecordsDetail:list")
-    public String detailList(ProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
-        }
-        Page<ProjectRecords> page = projectRecordsService.findPageDetail(new Page<ProjectRecords>(request, response), projectRecords);
-        model.addAttribute("page", page);
-        return "modules/projectrecord/projectRecordsDetailList";
-    }
-
-    /**
-     * 导出excel文件
-     */
-    @RequiresPermissions("project:projectRecordsDetail:export")
-    @RequestMapping(value = "exportDetail", method=RequestMethod.POST)
-    public String exportDetailFile(ProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
-        try {
-            String fileName = "项目"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-            Page<ProjectRecords> page = projectRecordsService.findPageDetail(new Page<ProjectRecords>(request, response, -1), projectRecords);
-            new ExportExcel("项目", ProjectRecords.class).setDataList(page.getList()).write(response, fileName).dispose();
-            return null;
-        } catch (Exception e) {
-            addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
-        }
-        return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
-    }
-
-    /**
-     * 下载导入项目数据模板
-     */
-    @RequiresPermissions("project:projectRecords:edit")
-    @RequestMapping(value = "downloadTemplate")
-    public void downloadTemplate(HttpServletRequest request,HttpServletResponse response) {
-        try {
-            new OSSClientUtil().downByStream(template_path,template_name,response,request.getHeader("USER-AGENT"));
-        } catch (Exception e) {
-            logger.error("项目计划模板下载失败!",e);
-        }
-    }
+            projectRecordTreeDataList.addAll(reportDataList);
 
-    /**
-     * 项目登记新增客户管理
-     */
-    @RequestMapping(value = "linkManSave")
-    @ResponseBody
-    public Object linkManSave(WorkClientInfo workClientInfo,
-                              Model model, RedirectAttributes redirectAttributes,
-                              HttpServletRequest request
-    ) throws Exception{
-        Map<String,Object> map = new HashMap<>();
-        try {
-            //保存当前人的公司
-            workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());
-            workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
-            workClientInfoService.save(workClientInfo);//保存
-            WorkClientLinkman linkman = workClientInfo.getWorkClientLinkmanList().get(0);
-            map.put("id",linkman.getId());
-            map.put("clientId",workClientInfo.getId());
-            map.put("clientName",workClientInfo.getName());
-            map.put("linkName",linkman.getName());
-            map.put("linkMobile",linkman.getLinkMobile());
-            map.put("linkPhone",linkman.getLinkPhone());
-            map.put("str","新增客户信息成功!");
-        }catch (Exception e){
-            e.printStackTrace();
         }
+        map.put("data",projectRecordTreeDataList);
         return map;
     }
-
-    /**
-     *选择合同-Ajax自动映射联系人
-     * @param clientId
-     * @return
-     */
-    @ResponseBody
-    @RequestMapping(value = "getLinkManByClientId")
-    public Map<String, Object> queryWorkClientLinkMen(String clientId){
-        WorkClientLinkman linkman = workClientInfoService.queryLinkManByClientId(clientId);
-        if (linkman != null) {
-            WorkClientInfo workClientInfo = workClientInfoService.get(clientId);
-            Map<String, Object> map = new HashMap<>();
-            map.put("id", linkman.getId());
-            map.put("clientId", workClientInfo.getId());
-            map.put("clientName", workClientInfo.getName());
-            map.put("uscCode",workClientInfo.getUscCode());
-            map.put("linkName", linkman.getName());
-            map.put("linkMobile", linkman.getLinkMobile());
-            map.put("linkPhone", linkman.getLinkPhone());
-            return map;
-        }
-        return null;
-    }
-
 }

+ 353 - 0
src/main/resources/mappings/modules/constructionContract/contractDao.xml

@@ -0,0 +1,353 @@
+<?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.projectConstruction.dao.ContractDao">
+
+	<sql id="workContentContractinfoColumns">
+		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.project_id AS "projectId",
+		a.content_id AS "contentId",
+		a.program_id AS "program.id",
+		a.cnumber AS "cnumber",
+		a.cont_cate AS "contCate",
+		a.cont_attr AS "contAttr",
+		a.letting_agent AS "lettingAgent",
+		a.contractor AS "contractor",
+		a.scope AS "scope",
+		a.sign_date AS "signDate",
+		a.effect_date AS "effectDate",
+		a.titular_amt AS "titularAmt",
+		a.true_amt AS "trueAmt",
+		a.pledge_percent AS "pledgePercent",
+		a.start_work_date AS "startWorkDate",
+		a.end_work_date AS "endWorkDate",
+		a.stop_percent AS "stopPercent",
+		a.stop_amt AS "stopAmt",
+		a.status AS "status",
+		a.pay_type AS "payType",
+		a.pay_amt AS "payAmt",
+		a.start_date AS "startDate",
+		a.end_date AS "endDate",
+		pd.name AS "program.name",
+		a.contract_name as "contractName"
+	</sql>
+
+	<sql id="workContentContractinfoJoins">
+		LEFT JOIN  project_content_data pd ON pd.id = a.program_id
+	</sql>
+
+
+	<select id="get" resultType="WorkContentContractinfo" >
+		SELECT
+		<include refid="workContentContractinfoColumns"/>
+		FROM work_content_contractinfo a
+		<include refid="workContentContractinfoJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<!--<select id="findList" resultType="WorkContentContractinfo" >
+		SELECT
+		<include refid="workContentContractinfoColumns"/>
+		FROM work_content_contractinfo a
+		<include refid="workContentContractinfoJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id = #{projectId}
+			</if>
+			<if test="contentId != null and contentId != ''">
+				AND a.content_id = #{contentId}
+			</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="findByConId" resultType="WorkContentContractinfo" parameterType="String">
+		SELECT
+		<include refid="workContentContractinfoColumns"/>
+		,pcd.name as 'proContentName',su.name as 'createName'
+		FROM work_content_contractinfo a
+		<include refid="workContentContractinfoJoins"/>
+		LEFT JOIN  project_content_data pcd ON pcd.id = a.content_id
+		left join sys_user su on su.id = a.create_by
+		<where>
+			content_id = #{id} and pcd.del_flag=0
+		</where>
+	</select>
+
+	<select id="findByType" resultType="WorkContentContractinfo" parameterType="String">
+		SELECT
+		a.id
+		FROM work_content_contractinfo a
+		<where>
+			a.cnumber = #{cnumber}
+		</where>
+		order by a.create_date DESC
+	</select>
+
+	<select id="findAllList" resultType="WorkContentContractinfo" >
+		SELECT
+		<include refid="workContentContractinfoColumns"/>
+		FROM work_content_contractinfo a
+		<include refid="workContentContractinfoJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<insert id="insertContract">
+		INSERT INTO construction_contract(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			project_id,
+			content_id,
+			program_id,
+			cnumber,
+			cont_cate,
+			cont_attr,
+			letting_agent,
+			contractor,
+			scope,
+			sign_date,
+			effect_date,
+			titular_amt,
+			true_amt,
+			pledge_percent,
+			start_work_date,
+			end_work_date,
+			stop_percent,
+			stop_amt,
+			status,
+			pay_type,
+			pay_amt,
+			start_date,
+			end_date,
+			contract_name
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{projectId},
+			#{contentId},
+			#{program.id},
+			#{cnumber},
+			#{contCate},
+			#{contAttr},
+			#{lettingAgent},
+			#{contractor},
+			#{scope},
+			#{signDate},
+			#{effectDate},
+			#{titularAmt},
+			#{trueAmt},
+			#{pledgePercent},
+			#{startWorkDate},
+			#{endWorkDate},
+			#{stopPercent},
+			#{stopAmt},
+			#{status},
+			#{payType},
+			#{payAmt},
+			#{startDate},
+			#{endDate},
+			#{contractName}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE work_content_contractinfo SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			project_id = #{projectId},
+			content_id = #{contentId},
+			program_id = #{program.id},
+			cnumber = #{cnumber},
+			cont_cate = #{contCate},
+			cont_attr = #{contAttr},
+			letting_agent = #{lettingAgent},
+			contractor = #{contractor},
+			scope = #{scope},
+			sign_date = #{signDate},
+			effect_date = #{effectDate},
+			titular_amt = #{titularAmt},
+			true_amt = #{trueAmt},
+			pledge_percent = #{pledgePercent},
+			start_work_date = #{startWorkDate},
+			end_work_date = #{endWorkDate},
+			stop_percent = #{stopPercent},
+			stop_amt = #{stopAmt},
+			status = #{status},
+			pay_type = #{payType},
+			pay_amt = #{payAmt},
+			start_date = #{startDate},
+			end_date = #{endDate},
+			contract_name=#{contractName}
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM work_content_contractinfo
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE work_content_contractinfo SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="WorkContentContractinfo" statementType="STATEMENT">
+		select * FROM work_content_contractinfo  where ${propertyName} = '${value}'
+	</select>
+
+
+
+	<select id="findList" resultType="ConstructionContract" >
+		SELECT
+		<include refid="workContentContractinfoColumns"/>
+		FROM construction_contract a
+
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<!--<if test="workClientLinkman != null and workClientLinkman.id != '' and workClientLinkman.id != null">-->
+			<!--LEFT JOIN work_client_linkman b ON a.id = b.client_id-->
+			<!--and b.id = #{workClientLinkman.id}-->
+			<!--</if>-->
+			<if test="name != null and name != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="companyType != null and companyType != ''">
+				AND a.company_type = #{companyType}
+			</if>
+			<if test="companyIndustry != null and companyIndustry != ''">
+				AND a.company_industry = #{companyIndustry}
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND (a.area_id = #{area.id} OR find_in_set(#{area.id},a.area_parent_ids))
+			</if>
+			<if test="workClientLinkman != null and workClientLinkman.name != null and workClientLinkman.name !=''">
+				AND b.name LIKE concat('%',#{workClientLinkman.name},'%')
+			</if>
+			<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
+				AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
+			</if>
+			<if test="address != null and address != ''">
+				AND a.address LIKE
+				<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{address}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{address},'%')</if>
+			</if>
+			<if test="clientType != null and clientType != ''">
+				AND a.client_type like concat('%',#{clientType},'%')
+			</if>
+			<if test="uscCode != null and uscCode != ''">
+				AND a.usc_code like concat('%',#{uscCode},'%')
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+			AND a.company_id = #{currentUser.company.id}
+		</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="queryCount" resultType="int" >
+		SELECT
+		count(1)
+		FROM work_client_info a
+		<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
+			LEFT JOIN work_client_linkman b ON a.id = b.client_id
+		</if>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="name != null and name != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="companyType != null and companyType != ''">
+				AND a.company_type = #{companyType}
+			</if>
+			<if test="companyIndustry != null and companyIndustry != ''">
+				AND a.company_industry = #{companyIndustry}
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND (a.area_id = #{area.id} OR find_in_set(#{area.id},a.area_parent_ids))
+			</if>
+			<if test="workClientLinkman != null and workClientLinkman.name != null and workClientLinkman.name !=''">
+				AND b.name LIKE concat('%',#{workClientLinkman.name},'%')
+			</if>
+			<if test="workClientLinkman != null and workClientLinkman.linkPhone != null and workClientLinkman.linkPhone !=''">
+				AND b.link_phone LIKE concat('%',#{workClientLinkman.linkPhone},'%')
+			</if>
+			<if test="address != null and address != ''">
+				AND a.address LIKE
+				<if test="dbName == 'oracle'">'%'||#{address}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{address}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{address},'%')</if>
+			</if>
+			<if test="clientType != null and clientType != ''">
+				AND a.client_type like concat('%',#{clientType},'%')
+			</if>
+			<if test="uscCode != null and uscCode != ''">
+				AND a.usc_code like concat('%',#{uscCode},'%')
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+			AND a.company_id = #{currentUser.company.id}
+		</where>
+	</select>
+</mapper>

+ 3 - 1
src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml

@@ -293,11 +293,13 @@
 		a.project_id as "pid", a.name as "projectName", "" as projectId,
 		"0" as projectStatus,su.name as "projectRegistrant" ,
 		pt.type_name as projectLeader,
-		ppt.type_name as clientName
+		ppt.type_name as clientName,prd.status as status
 		from project_content_data a
 		left join sys_user su on su.id = a.create_by
 		left join project_type pt on a.type = pt.type_id
 		left join project_type ppt on pt.parent_id = ppt.id
+		left join project_content_report pcr on pcr.content_id = a.id
+		left join project_report_data prd on prd.id = pcr.report_id
 		where a.project_id = #{projectId} and pt.parent_id =#{projectTypeParentId} and a.del_flag = 0 order by a.update_date desc
 	</select>
 

+ 19 - 13
src/main/webapp/webpage/modules/projectConstruction/projectConstructionForm.jsp

@@ -1053,15 +1053,21 @@
 <div class="single-form">
     <div class="container">
         <sys:message content="${message}"/>
-        <form:form id="subForm" modelAttribute="workContentContractinfo" action="#" method="post" class="form-horizontal">
+        <form:form id="subForm" modelAttribute="constructionContract" action="#" method="post" class="form-horizontal">
             <form:hidden path="id"/>
         <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>合同信息</h2></div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
                     <div class="layui-input-block with-icon">
-                        <sys:gridselectProjcontent url="${ctx}/projectcontentinfo/projectContentData/selectcontent" id="programId" name="program.id"  value="${workContentContractinfo.program.id}"  title="选择合约规划名称" labelName="program.name"
-                                                   labelValue="${workContentContractinfo.program.name}" cssClass="form-control layui-input required" projectId="${workContentContractinfo.projectId}" type="31" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('合约名称')}" searchKey="" ></sys:gridselectProjcontent>
+                        <sys:gridselectProjcontent url="${ctx}/projectcontentinfo/projectContentData/selectcontent" id="programId" name="program.id"  value="${constructionContract.program.id}"  title="选择项目名称" labelName="program.name"
+                                                   labelValue="${constructionContract.program.name}" cssClass="form-control layui-input required" projectId="${constructionContract.projectId}" type="31" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('项目名称')}" searchKey="" ></sys:gridselectProjcontent>
+                    </div>
+                </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="contractName" htmlEscape="false"    class="form-control layui-input required"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
@@ -1112,26 +1118,26 @@
                     <label class="layui-form-label"><span class="require-item">*</span>签约日期:</label>
                     <div class="layui-input-block">
                         <input id="signDate" name="signDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
-                               value="<fmt:formatDate value="${workContentContractinfo.signDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.signDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">生效日期:</label>
                     <div class="layui-input-block">
                         <input id="effectDate" name="effectDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon "
-                               value="<fmt:formatDate value="${workContentContractinfo.effectDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.effectDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label ">目标成本(元):</label>
                     <div class="layui-input-block">
-                        <input name="titularAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentContractinfo.titularAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input number"/>
+                        <input name="titularAmt" htmlEscape="false"  value="<fmt:formatNumber value="${constructionContract.titularAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input number"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>有效合同金额(元):</label>
                     <div class="layui-input-block">
-                        <input name="trueAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentContractinfo.trueAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input number required"/>
+                        <input name="trueAmt" htmlEscape="false"  value="<fmt:formatNumber value="${constructionContract.trueAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input number required"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
@@ -1144,14 +1150,14 @@
                     <label class="layui-form-label"><span class="require-item">*</span>合同开工日期:</label>
                     <div class="layui-input-block">
                         <input id="startWorkDate" name="startWorkDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
-                               value="<fmt:formatDate value="${workContentContractinfo.startWorkDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.startWorkDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">合同竣工日期:</label>
                     <div class="layui-input-block">
                         <input id="endWorkDate" name="endWorkDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon "
-                               value="<fmt:formatDate value="${workContentContractinfo.endWorkDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.endWorkDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
@@ -1163,7 +1169,7 @@
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">止付金额:</label>
                     <div class="layui-input-block">
-                        <input name="stopAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentContractinfo.stopAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input  number"/>
+                        <input name="stopAmt" htmlEscape="false"  value="<fmt:formatNumber value="${constructionContract.stopAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input  number"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
@@ -1187,21 +1193,21 @@
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label"><span class="require-item">*</span>支付金额:</label>
                     <div class="layui-input-block">
-                        <input name="payAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentContractinfo.payAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input required number"/>
+                        <input name="payAmt" htmlEscape="false"  value="<fmt:formatNumber value="${constructionContract.payAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control layui-input required number"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">开始日期:</label>
                     <div class="layui-input-block">
                         <input id="startDate" name="startDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon "
-                               value="<fmt:formatDate value="${workContentContractinfo.startDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.startDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">结束日期:</label>
                     <div class="layui-input-block">
                         <input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon "
-                               value="<fmt:formatDate value="${workContentContractinfo.endDate}" pattern="yyyy-MM-dd"/>"/>
+                               value="<fmt:formatDate value="${constructionContract.endDate}" pattern="yyyy-MM-dd"/>"/>
                     </div>
                 </div>
             </div>

+ 186 - 671
src/main/webapp/webpage/modules/projectConstruction/projectConstructionList.jsp

@@ -1,184 +1,66 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
+<%@ page isELIgnored="false"%>
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
-	<title>施工合同管理</title>
+	<title>客户管理管理</title>
 	<meta name="decorator" content="default"/>
-    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
-	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
-    <style>
-        .layui-table th{
-            font-size: 14px;
-            /*表头内容居中显示*/
-            text-align: center;
-        }
-		.pid{
-			font-size:14px;
-			font-weight:400;
-		}
-    </style>
 	<script type="text/javascript">
-        $(document).ready(function() {
-
-            //搜索框收放
-            $('#moresee').click(function(){
-                if($('#moresees').is(':visible'))
-                {
-                    $('#moresees').slideUp(0,resizeListWindow2);
-                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
-                }else{
-                    $('#moresees').slideDown(0,resizeListWindow2);
-                    $('#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'
-            });
-            laydate.render({
-                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
-                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
-                type : 'date'
-            });
-        });
-
-        function reset() {
-            $("#searchForm").resetForm();
-        }
-
-        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(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
-                    }else {
-                        return false;
-                    }
-                },
-                btn3: 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显示。
+		$(document).ready(function() {
+			$("#cus_name").show();
+			$("#cus_name").siblings().hide();
+			//搜索框收放
+			$('#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: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+			});
+			laydate.render({
+				elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+			});
+		});
+		function switchInput(obj){
+			$("#"+obj).show();
+			$("#"+obj).siblings().hide();
+		}
+		//打开对话框(查看)
+		function openDialogNow(title,url,width,height){
+			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) {
-                }
-            });
-        }
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['关闭'],
+				cancel: function(index){
+				}
+			});
+		}
+	</script>
+	<script type="text/javascript">
+		$(function () {
+			function openNewWindowTab(url) {
+				alert(url);
+			}
+		})
 	</script>
 	<style>
 		body{
@@ -190,52 +72,31 @@
 		}
 	</style>
 </head>
-<body>
+<body class="gray-bg">
 <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}/project/projectRecords/list">项目登记列表</a></li>
-					<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>
-				</ul>
-			</div>
-
-			<%--<div class="layui-row" id="tabDiv">--%>
-			<%--<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">--%>
-			<%--<ul class="layui-tab-title">--%>
-			<%--<li class="layui-this"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>--%>
-			<%--<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>--%>
-			<%--</ul>--%>
-			<%--</div>--%>
-			<%--</div>--%>
-		</div>
-		<div class="full-width fl">
-			<div class="layui-row contentShadow shadowLR" id="queryDiv">
-				<form:form id="searchForm" modelAttribute="projectRecords" action="${ctx}/project/projectRecords/" method="post" class="form-inline">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workClientInfo" action="${ctx}/workclientinfo/workClientInfo/list" 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 lw6">
-						<%--<div class="layui-item query athird">
-							<label class="layui-form-label">项目编号:</label>
-							<div class="layui-input-block with-icon">
-								<form:input path="projectId" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
-							</div>
-						</div>--%>
+					<%--<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->--%>
+					<div class="commonQuery lw14">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">项目名称:</label>
+							<label class="layui-form-label">合同名称:</label>
 							<div class="layui-input-block">
-								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+								<form:input path="name" htmlEscape="false" maxlength="255"  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="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+						<%--<div class="layui-item query athird">
+							<label class="layui-form-label">地区:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="area" name="area.id" value="${workClientInfo.area.id}" labelName="area.name" labelValue="${workClientInfo.area.name}"
+												title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
 							</div>
-						</div>
+						</div>--%>
+
 						<div class="layui-item athird">
 							<div class="input-group">
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -245,63 +106,78 @@
 						</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 id="moresees" style="clear:both;display:none;" class="lw14">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">创建时间:</label>
 							<div class="layui-input-block">
-								<input type="text" input="workContractInfoName" name="workContractInfo.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+								<input id="beginDate" placeholder="开始时间" name="beginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workClientInfo.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workClientInfo.endDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
 							</div>
 						</div>
-						<div class="layui-item query athird ">
-							<label class="layui-form-label">委托方:</label>
+
+						<div class="layui-item query athird">
+							<label class="layui-form-label">客户性质:</label>
 							<div class="layui-input-block">
-								<input type="text" input="workContractInfoClientName" name="workContractInfo.client.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+								<form:select path="companyType"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('company_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
 							</div>
 						</div>
-						<div class="layui-item query athird ">
-							<label class="layui-form-label">创建时间:</label>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">客户行业:</label>
 							<div class="layui-input-block">
-								<input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-									   value="<fmt:formatDate value="${projectRecords.beginDate}" pattern="yyyy-MM-dd"/>"/>
-								</input>
-                                <span class="group-sep">-</span>
-                                <input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-                                       value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
-                                </input>
+								<form:select path="companyIndustry" class="form-control layui-input">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('company_industry')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
 							</div>
 						</div>
-						<div class="layui-item query athird ">
-							<label class="layui-form-label">状态:</label>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">客户类型:</label>
 							<div class="layui-input-block">
-								<form:select path="projectStatus" class=" form-control  simple-select">
+								<form:select path="clientType" class="form-control layui-input">
 									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									<form:options items="${fns:getMainDictList('client_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 								</form:select>
 							</div>
 						</div>
-						<div style="clear:both;"></div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">统一社会信用代码:</label>
+							<div class="layui-input-block">
+								<form:input path="uscCode" htmlEscape="false"  class="form-control layui-input"/>
+							</div>
+						</div>
 					</div>
 				</form:form>
 			</div>
 		</div>
+
 		<div class="full-width fl">
-			<div class="layui-form contentDetails contentShadow shadowLBR">
+			<div class="contentShadow layui-form contentDetails">
 				<div class="nav-btns">
-					<table:addRow url="${ctx}/project/constructionContract/form" title="合同"></table:addRow><!-- 增加按钮 -->
-					<shiro:hasPermission name="project:projectRecords:del">
-						<%--<table:delRow url="${ctx}/project/projectRecords/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->--%>
+					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+						<table:addRow url="${ctx}/project/constructionContract/form" title="合同管理"></table:addRow><!-- 增加按钮 -->
+					<shiro:hasPermission name="workclientinfo:workClientInfo:import">
+						<table:importExcel url="${ctx}/workclientinfo/workClientInfo/import"></table:importExcel><!-- 导入按钮 -->
 					</shiro:hasPermission>
-					<shiro:hasPermission name="project:projectRecords:export">
-						<table:exportExcel url="${ctx}/project/projectRecords/export"></table:exportExcel><!-- 导出按钮 -->
+
+					<shiro:hasPermission name="workclientinfo:workClientInfo:export">
+						<table:exportExcel url="${ctx}/workclientinfo/workClientInfo/export"></table:exportExcel><!-- 导出按钮 -->
 					</shiro:hasPermission>
-					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
-					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
-					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
 
-                    <div style="clear: both;"></div>
+					<table:importInfoErr url="${ctx}/workclientinfo/workClientInfo/importInfoErr" title="导入日志"></table:importInfoErr><!-- 导出按钮 -->
+
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
 				</div>
-				<table class="oa-table layui-table" id="contentTable1"></table>
-<%--                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>--%>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
 				<!-- 分页代码 -->
 				<table:page page="${page}"></table:page>
 				<div style="clear: both;"></div>
@@ -310,443 +186,82 @@
 	</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: '#contentTable1'
-            ,page: false
-            ,cols: [[
-                // {checkbox: true, fixed: true},
-                {field:'index',align:'center', title: '序号',width:40}
-                ,{field:'projName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
-                        return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
-                    }}
-                ,{field:'projId',align:'center', title: '项目编号',minWidth:150,templet:function(d){
-                        return "<a class=\"attention-info\" title=\"" + d.projId + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id + "','95%', '95%')\">" + d.projId + "</a>";
-                    }}
-                ,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
-                    	return "<span title='"+ d.contract +"'>" + d.contract + "</span>";
+	layui.use('table', function(){
+		layui.table.render({
+			limit:${ page.pageSize }
+			,elem: '#contentTable'
+			,page: false
+			,cols: [[
+				{field:'index',align:'center', title: '序号',width:40}
+				,{field:'clientName',align:'center', title: '客户名称',minWidth:200,templet:function(d){
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看客户信息', '${ctx}/workclientinfo/workClientInfo/detail?id=" + d.id + "&wlId=" + d.linkman + "','95%','95%')\">" +
+								"<span title=" + d.clientName + ">" + d.clientName.substr(0,40) + "</span></a>";
+						return xml;
 					}}
-                ,{field:'projMaster', align:'center',title: '负责人', width:65,templet:function(d){
-                        return "<span title=\"" + d.projMaster + "\">" + d.projMaster + "</span>";
-                    }}
-                ,{field:'client',align:'center', title: '主委托方',  width:150,templet:function(d){
-                        return "<span title=\"" + d.client + "\">" + d.client + "</span>";
-                    }}
-                ,{field:'createDate',align:'center', title: '创建日期',  width:80}
-                ,{align:'center', title: '状态',  width:70,templet:function(d){
-                        <%--var st = getAuditState(d.projectStatus)--%>
-                        <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
-                        <%--return xml;--%>
-                        var st = getAuditState(d.projectStatus);
-                        if(st.action)
-                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-                        else
-                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-                        return xml;
-                    }}
-                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
-                        ////对操作进行初始化
-                        var xml="";
-                        if(d.canedit1 != undefined && d.canedit1 =="1")
-                        {
-                            xml+="<a href=\"#\" onclick=\"openDialogre('修改项目', '${ctx}/project/projectRecords/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                        }
-                        if(d.canedit2 != undefined && d.canedit2 =="1")
-                        {
-                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                        }
-                        if(d.canrecall != undefined && d.canrecall =="1")
-                        {
-                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                        }
-                        if(d.candel != undefined && d.candel =="1")
-                        {
-                            xml+="<a href=\"${ctx}/project/projectRecords/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该项目信息吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
-                        }
-                        if(d.cancancel != undefined && d.cancancel =="1")
-                        {
-                            xml+="<a href=\"${ctx}/project/projectRecords/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
-                        }
-                        if(d.canedit3 != undefined && d.canedit3 =="1")
-                        {
-                            xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
-                        }
-                        return xml;
-
-                    }}
-            ]]
-            ,data: [
-                <c:if test="${ not empty page.list}">
-                <c:forEach items="${page.list}" var="projectRecords" varStatus="index">
-                <c:if test="${index.index != 0}">,</c:if>
-                {
-                    "index":"${index.index+1}"
-                    ,"id":"${projectRecords.id}"
-                    ,"projId":"${projectRecords.projectId}"
-                    ,"projName":"<c:out value="${projectRecords.projectName}" escapeXml="true"/>"
-                    ,"projMaster":"<c:forEach items="${projectRecords.projectLeaders}" var="leader" varStatus="status"><c:choose><c:when test="${status.last}">${leader.name}</c:when><c:otherwise>${leader.name},</c:otherwise></c:choose></c:forEach>"
-                    ,"contract":"${projectRecords.workContractInfo.name}"
-                    ,"client":"${projectRecords.workContractInfo.client.name}"
-                    ,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
-                    ,"projectStatus":"${projectRecords.projectStatus}"
-                    ,"procId":"${projectRecords.processInstanceId}"
-                    <c:choose><c:when test="${flag == '1' or fns:getUser().id == projectRecords.createBy.id}">
-                    <shiro:hasPermission name="project:projectRecords:del">,"candel":	<c:choose><c:when test="${projectRecords.projectStatus == 1 or projectRecords.projectStatus == 3 or projectRecords.projectStatus == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
-                    <shiro:hasPermission name="project:projectRecords:edit">,"canedit1":	<c:choose><c:when test="${projectRecords.projectStatus == 1 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
-                    ,"canedit2":<c:choose><c:when test="${projectRecords.projectStatus == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
-                    ,"canrecall":<c:choose><c:when test="${projectRecords.projectStatus == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
-                    </shiro:hasPermission>
-                    ,"cancancel":<c:choose><c:when test="${projectRecords.projectStatus == 2 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
-                    </c:when>
-                    <c:otherwise>
-                    ,"candel":"0"
-                    ,"canedit1":"0"
-                    ,"canedit2":"0"
-                    ,"canrecall":"0"
-                    ,"cancancel":"0"
-                    </c:otherwise>
-                    </c:choose>
-                    <shiro:hasPermission name="project:projectRecords:edit">,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && fn:contains(projectRecords.leaderIds,fns:getUser().id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
-                }
-                </c:forEach>
-                </c:if>
-            ]
-            // ,even: true
-            // ,height: 315
-        });
-    })
-
-    resizeListTable();
-    $("a").on("click",addLinkVisied);
-</script>
-<script>
-    resizeListWindow2();
-    $(window).resize(function(){
-        resizeListWindow2();
-    });
-</script>
-<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
-<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
-<%--<script>
-    /*使用模块加载的方式 加载文件*/
-    layui.config({
-        base: '${ctx}/resoueces/css/layui/module/'
-    }).extend({
-        treetable: 'treetable-lay/treetable'
-    }).use(['layer', 'table', 'treetable'], function () {
-        var $ = layui.jquery;
-        var table = layui.table;
-        var layer = layui.layer;
-        var treetable = layui.treetable;
-
-        // 渲染表格
-        var renderTable = function () {
-        	var projectName = $("#projectName").val();
-        	var workContractInfoName = $("#workContractInfoName").val();
-        	var workContractInfoClientName = $("#workContractInfoClientName").val();
-        	if(undefined == workContractInfoName){
-				workContractInfoName = "";
-			}
-        	if(undefined == workContractInfoClientName){
-				workContractInfoClientName = "";
-			}
-            layer.load(2);
-            treetable.render({
-                treeColIndex: 1,//树形图标显示在第几列
-                treeSpid: 0,//最上级的父级id
-                treeIdName: 'permissionId',//id字段的名称
-                treePidName: 'pid',//pid字段的名称
-                treeDefaultClose: true,//是否默认折叠
-                treeLinkage: true,//父级展开时是否自动展开所有子级
-                elem: '#permissionTable',
-                url: '${ctx}/project/projectRecords/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName+'&beginDate='+$("#beginDate").val()+'&endDate='+$("#endDate").val()+'&projectStatus='+$("#projectStatus").val(),
-                page: false,
-                cols: [[
-                    {type: 'numbers', align:'center', title: '序号' ,width:80},
-                    {field: 'projectId', title: '项目编号/项目阶段编号'},
-                    {field: 'projectName', align:'center', title: '项目名称/成果文件编号',templet:function(d){
-                    	if(0 == d.pid){
-							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
-						}else{
-							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看成果文件名称', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportView&dictType="+d.dictType+"&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
-						}
-						}},
-					{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
-							if(0 == d.pid){
-								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
-							}else{
-								return "<font>"+d.clientName+"</font>";
-							}
-						}},
-                    {field: 'projectLeader', align:'center', title: '项目负责人/工作内容',templet: function(d){
-							if(0 == d.pid){
-								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
-							}else{
-								return "<font>"+d.projectLeader+"</font>";
-							}
-						}},
-                    {field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
-							if(0 == d.pid){
-								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
-							}else{
-								return "<font>"+d.projectRegistrant+"</font>";
-							}
-						}},
-                    {field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
-							var date=d.createDate;
-							date=date.replace(new RegExp(/-/gm) ,"/");
-
-							if(0 == d.pid){
-								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
-							}else{
-								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
-							}
-						}},
-					{align:'center', title: '状态',  width:70,templet:function(d){
-							var st = getAuditState(""+d.projectStatus);
-							if(d.pid ==0){
-								if(st.action)
-									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-								else
-									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-								return xml;
-							}else if(d.pid !=0){
-								if(st.action)
-									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-								else
-									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
-								return xml;
-							}else{
-								return '';
-							}
-						}},
-                    {templet: complain, align:'center', title: '操作',width:130}
-                ]],
-                done: function () {
-                    layer.closeAll('loading');
-                }
-            });
-        };
-
-        renderTable();
-
-        //触发三个button按钮
-        $('#btn-expand').click(function () {
-            treetable.expandAll('#permissionTable');
-        });
-
-        $('#btn-fold').click(function () {
-            treetable.foldAll('#permissionTable');
-        });
-
-        $('#btn-refresh').click(function () {
-            renderTable();
-        });
+				,{field:'number',align:'center', title: '客户编号',width:150}
+				,{field:'clientProperty',align:'center', title: '客户性质',width:150}
+				,{field:'trade',align:'center', title: '客户行业', width:150}
+				,{field:'area', align:'center',title: '所在地区',width:200}
+				,{field:'clientType', align:'center',title: '客户类型',minWidth:200,templet:function(d){
+						return "<span title='"+ d.clientType +"'>" + d.clientType + "</span>";
+					}}
+				,{field:'code', align:'center',title: '统一社会信用代码',minWidth:250,templet:function(d){
+						return "<span title='"+ d.code +"'>" + d.code + "</span>";
+					}}
+				,{field:'createDate',align:'center', title: '创建时间', width:85}
+				,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+						////对操作进行初始化
+						var xml = "";
 
+						if(d.canedit != undefined && d.canedit == "1")
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改客户信息', '${ctx}/workclientinfo/workClientInfo/form?id=" + d.id + "&param=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
 
-        function complain(d){//操作中显示的内容
-			if(d.loginId == d.createId) {
-				if (0 == d.pid) {
-					if(1==d.projectStatus){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogres(\'暂存项目修改\', \'${ctx}/project/projectRecords/form?id=' + d.id +'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/project/projectRecords/delete?id='+d.id+'" onclick="return confirmx(\'确认要删除该项目信息吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}
-					else if(2==d.projectStatus){
-						return [
-							'<a href="${ctx}/project/projectRecords/revoke?id='+d.id+ "&processInstanceId=" + d.procId +'" onclick="return confirmx(\'确认要撤回该项目审批吗?\', this.href)"   class="op-btn op-btn-cancel"><i class="glyphicon glyphicon-share-alt"></i> 撤回</a>',
-						].join('');
-					}
-					else if(3==d.projectStatus){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'撤回项目调整\', \'${ctx}/project/projectRecords/form?id=' + d.id +'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/project/projectRecords/delete?id='+d.id+'" onclick="return confirmx(\'确认要删除该项目信息吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}
-					else if(4==d.projectStatus){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'驳回项目调整\', \'${ctx}/project/projectRecords/modify?id=' + d.id +'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/project/projectRecords/delete?id='+d.id+'" onclick="return confirmx(\'确认要删除该项目信息吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}
-					else if(5==d.projectStatus){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'项目变更管理\', \'${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-op-btn-revert" ><i class="fa fa-edit"></i> 变更</a>',
-						].join('');
-					}else{
-						return[''].join('');
-					}
-				} else {
-					//
-					if(d.projectStatus == 1){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogres(\'修改报告\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=report&condition=record&dictType='+d.dictType+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&projectReportData.id='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}else if(d.projectStatus == 2){
-						return [
-							'<a href="${ctx}/projectcontentinfo/projectcontentinfo/cancelInvalidate?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要撤回该工作内容报告吗?\', this.href)"   class="op-btn op-btn-cancel"><i class="glyphicon glyphicon-share-alt"></i> 撤回</a>',
-						].join('');
-					}else if(d.projectStatus == 3){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改报告\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=report&condition=record&dictType='+d.dictType+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&projectReportData.id='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}else if(d.projectStatus == 4){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改报告\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportModify&condition=record&dictType='+d.dictType+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&projectReportData.id='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
-							'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
-						].join('');
-					}else if(d.projectStatus == 5){
-						return [
-							'<a href="javascript:void(0)" onclick="openDialogres(\'报告作废\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportInvalid&condition=record&dictType='+d.dictType+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&projectReportData.id='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-invalid" ><i class="fa fa-trash-o"></i> 作废</a>',
-						].join('');
-					}else{
-						return[''].join('');
-					}
+						if(d.candelete != undefined && d.candelete == "1")
+							xml +="<a href=\"${ctx}/workclientinfo/workClientInfo/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该客户信息吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+						return xml;
+					}}
+			]]
+			,data: [
+				<c:if test="${ not empty page.list}">
+				<c:forEach items="${page.list}" var="workClientInfo" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"index":"${index.index+1}"
+					,"id":"${workClientInfo.id}"
+					,"number":"${workClientInfo.number}"
+					,"linkman":"${workClientInfo.workClientLinkman.id}"
+					,"clientName":"${workClientInfo.name}"
+					,"clientProperty":"${fns:getMainDictLabel(workClientInfo.companyType, 'company_type', '')}"
+					,"trade":"${fns:getMainDictLabel(workClientInfo.companyIndustry, 'company_industry', '')}"
+					,"area":"${workClientInfo.area.name}"
+					,"clientType":"${fns:getMainDictLabels(workClientInfo.clientType,',','client_type', '')}"
+					,"code":"${workClientInfo.uscCode}"
+					,"createDate":"<fmt:formatDate value="${workClientInfo.createDate}" pattern="yyyy-MM-dd"/>"
+					<c:if test="${flag == '1' or fns:getUser().id == workClientInfo.createBy.id}">
+					<shiro:hasPermission name="workclientinfo:workClientInfo:edit">,"canedit":"1"</shiro:hasPermission>
+					<shiro:hasPermission name="workclientinfo:workClientInfo:del">,"candelete":"1"</shiro:hasPermission>
+					</c:if>
 				}
-			}else{
-				return[''].join('');
-			}
-        }
-        //监听工具条
-        table.on('tool(permissionTable)', function (obj) {
-            var data = obj.data;
-            var layEvent = obj.event;
-            if(data.permissionName!=null){
-                if (layEvent === 'del') {
-                    layer.msg('删除' + data.id);
-                } else if (layEvent === 'edit') {
-                    layer.msg('修改' + data.id);
-                }
-            }
-        });
-    });
+				</c:forEach>
+				</c:if>
+			]
+		});
 
-</script>
-<script>
-	function openDialogres(title,url,width,height,target){
+	})
 
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
+	resizeListTable();/*消除由于有竖向滚动条造成table出现横向滚动条*/
+	$("a").on("click",addLinkVisied);
+</script>
 
-		}
-		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){
-			}
-		});
-	}
-	function openDialogreAudit(title,url,width,height,target){
+<script type="text/javascript">
+	resizeListWindow1();
+	$(window).resize(function(){
+		resizeListWindow1();
+	});
+</script>
+</body>
 
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
+</html>
 
-		}
-		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(data.msg,{icon:1});
-						}else {
-							parent.layer.msg(data.msg,{icon:2});
-						}
-						//parent.refreshTrees();
-						location = '${ctx}/project/projectRecords/list';
-					}
-				});
-			}
-			top.layer.close(index);
-		});
-		return false;
-	}
-</script>--%>
-</body>
-</html>