瀏覽代碼

甲供物资审核模块

user5 4 年之前
父節點
當前提交
90584646db
共有 15 個文件被更改,包括 2802 次插入71 次删除
  1. 51 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/armorForMaterials/ArmorForMaterialsDao.java
  2. 145 0
      src/main/java/com/jeeplus/modules/projectrecord/service/armorForMaterials/ArmorForMaterialsService.java
  3. 293 0
      src/main/java/com/jeeplus/modules/projectrecord/web/armorForMaterials/ArmorForMaterialsController.java
  4. 11 30
      src/main/java/com/jeeplus/modules/projectrecord/web/concealProject/ConcealProjectController.java
  5. 9 0
      src/main/java/com/jeeplus/modules/workcontent/entity/WorkFiveDirectionsAffirm.java
  6. 12 0
      src/main/java/com/jeeplus/modules/workcontent/web/WorkFiveDirectionsAffirmController.java
  7. 132 0
      src/main/resources/mappings/modules/projectrecord/armorForMaterials/ArmorForMaterialsDao.xml
  8. 1 0
      src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp
  9. 839 0
      src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsForm.jsp
  10. 468 0
      src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsList.jsp
  11. 800 0
      src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsView.jsp
  12. 1 1
      src/main/webapp/webpage/modules/projectrecord/concealProject/concealProjectList.jsp
  13. 1 1
      src/main/webapp/webpage/modules/projectrecord/concealProject/workContentForm.jsp
  14. 20 20
      src/main/webapp/webpage/modules/workcontent/workFiveDirectionsAffirmList.jsp
  15. 19 19
      src/main/webapp/webpage/modules/workcontent/workFiveDirectionsAffirmListView.jsp

+ 51 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/armorForMaterials/ArmorForMaterialsDao.java

@@ -0,0 +1,51 @@
+package com.jeeplus.modules.projectrecord.dao.armorForMaterials;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectrecord.entity.ConcealProjectInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@MyBatisDao
+public interface ArmorForMaterialsDao extends CrudDao<ConcealProjectInfo> {
+    List<Projectcontentinfo> findListByProject(Projectcontentinfo projectcontentinfo);
+
+    /**
+     * 添加隐蔽工程量信息
+     * @param projectContentData
+     * @return
+     */
+    Integer saveConcealProject(ProjectContentData projectContentData);
+    /**
+     * 修改隐蔽工程量信息
+     * @param projectContentData
+     * @return
+     */
+    Integer upodateConcealProject(ProjectContentData projectContentData);
+
+    /**
+     * 删除文件
+     * @param concealProjectInfo
+     * @return
+     */
+    Integer deleteConcealProject(ConcealProjectInfo concealProjectInfo);
+
+    /**
+     * 获取隐蔽工程量基本信息
+     * @param contractId
+     * @return
+     */
+    List<ProjectContentData> getConcealProjectList(String contractId);
+
+    /**
+     * 根据id查询信息
+     * @param id
+     * @return
+     */
+    ProjectContentData getConcealProjectData(String id);
+
+    int deleteBasedData(@Param("contentId") String contentId, @Param("basedId") String basedId);
+}

+ 145 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/armorForMaterials/ArmorForMaterialsService.java

@@ -0,0 +1,145 @@
+package com.jeeplus.modules.projectrecord.service.armorForMaterials;
+
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectrecord.dao.ConcealProjectDao;
+import com.jeeplus.modules.projectrecord.dao.armorForMaterials.ArmorForMaterialsDao;
+import com.jeeplus.modules.projectrecord.entity.ConcealProjectInfo;
+import com.jeeplus.modules.sys.dao.WorkattachmentDao;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workcontent.service.WorkFiveDirectionsAffirmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 甲供物资Service
+ * @author 徐滕
+ * @version 2020-07-30
+ */
+@Service
+@Transactional(readOnly = true)
+public class ArmorForMaterialsService extends CrudService<ArmorForMaterialsDao, ConcealProjectInfo> {
+
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private WorkClientAttachmentDao workClientAttachmentDao;
+    @Autowired
+    private ArmorForMaterialsDao dao;
+    @Autowired
+    private WorkFiveDirectionsAffirmService workFiveDirectionsAffirmService;
+    @Autowired
+    private WorkattachmentDao workattachmentDao;
+
+
+    @Transactional(readOnly = true)
+    public List<ProjectContentData> getConcealProjectList(String id) {
+        List<ProjectContentData> projectVisaList=dao.getConcealProjectList(id);
+        return projectVisaList;
+    }
+
+
+    public ProjectContentData getProjectContentData(String id) {
+        ProjectContentData projectContentData = dao.getConcealProjectData(id);
+        if(projectContentData!=null){
+            Workattachment workattachment = new Workattachment();
+            workattachment.setAttachmentId(id);
+            projectContentData.setWorkAttachments(workattachmentDao.findList(workattachment));
+        }
+        return projectContentData;
+    }
+
+    @Transactional(readOnly = false)
+    public void deleteBased(String contentId,String basedId) {
+        int i = dao.deleteBasedData(contentId, basedId);
+        if(i==0){
+            return;
+        }
+    }
+
+
+    @Transactional(readOnly = false)
+    public String saveData(ConcealProjectInfo concealProjectInfo) throws Exception {
+        Projectcontentinfo s = new Projectcontentinfo();
+        s.setParentIds("0,");
+        s.setProject(concealProjectInfo.getProject());
+        //根据项目id查询相关工作内容信息的数据 并将其存为父级数据
+        Projectcontentinfo contentinfo = dao.findListByProject(s).get(0);
+        //保存工作内容相关数据
+        ProjectContentData projectContentData = concealProjectInfo.getProjectContentData();
+        if(StringUtils.isNotBlank(projectContentData.getId())){
+            ProjectContentData oldData = dao.getConcealProjectData(projectContentData.getId());
+            MyBeanUtils.copyBeanNotNull2Bean(projectContentData, oldData);
+            projectContentData = oldData;
+        }
+        projectContentData.setCompanyId(contentinfo.getCompanyId());
+        projectContentData.setOfficeId(contentinfo.getOfficeId());
+        projectContentData.setContractId(concealProjectInfo.getContract().getId());
+        if(StringUtils.isNotBlank(projectContentData.getId())){
+            projectContentData.preUpdate();
+            dao.upodateConcealProject(projectContentData);
+        }else{
+            projectContentData.preInsert();
+            dao.saveConcealProject(projectContentData);
+        }
+        //保存工作内容详情
+        if(StringUtils.isNotBlank(projectContentData.getContentDetail())) {
+            workFiveDirectionsAffirmService.saveDetails(URLDecoder.decode(projectContentData.getContentDetail(),"UTF-8"), concealProjectInfo.getProject().getId(), projectContentData.getId());
+        }
+        //保存依据资料信息
+        if(projectContentData.getProjectBasedDataList()!=null&&!projectContentData.getProjectBasedDataList().isEmpty()){
+            for (ProjectBasedData data:projectContentData.getProjectBasedDataList()) {
+                if (data.getDelFlag().equals("0")){
+                    List<ProjectBasedData> projectBasedData = new ArrayList<>();
+                    projectBasedData.add(data);
+                    projectContentDataService.saveBasedData(projectContentData.getId(),projectBasedData);
+                }
+            }
+        }
+
+        if (concealProjectInfo.getWorkAttachments()!=null && !concealProjectInfo.getWorkAttachments().isEmpty()) {
+            //保存附件信息
+            for (WorkClientAttachment workClientAttachment : concealProjectInfo.getWorkAttachments()) {
+                if (StringUtils.isBlank(workClientAttachment.getId())&& StringUtils.isNotBlank(workClientAttachment.getAttachmentId())) {
+                    continue;
+                }
+                if (StringUtils.isBlank(workClientAttachment.getId())&& StringUtils.isBlank(workClientAttachment.getUrl())) {
+                    continue;
+                }
+                if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+                    workClientAttachment.setAttachmentId(projectContentData.getId());
+                    workClientAttachment.setAttachmentFlag("135");
+                    workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+                        workClientAttachment.preInsert();
+                        workClientAttachmentDao.insert(workClientAttachment);
+                    } else {
+                        workClientAttachment.preUpdate();
+                        workClientAttachmentDao.update(workClientAttachment);
+                    }
+                } else {
+                    workClientAttachmentDao.delete(workClientAttachment);
+                }
+            }
+        }
+        return "true";
+    }
+
+    @Transactional(readOnly = false)
+    public void deleteConcealProject(ConcealProjectInfo concealProjectInfo){
+        dao.deleteConcealProject(concealProjectInfo);
+    }
+}

+ 293 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/armorForMaterials/ArmorForMaterialsController.java

@@ -0,0 +1,293 @@
+package com.jeeplus.modules.projectrecord.web.armorForMaterials;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.projectConstruction.service.ContractService;
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
+import com.jeeplus.modules.projectVisa.entity.VisaTreeData;
+import com.jeeplus.modules.projectVisa.service.ProjectVisaService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
+import com.jeeplus.modules.projectrecord.entity.ConcealProjectInfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
+import com.jeeplus.modules.projectrecord.service.armorForMaterials.ArmorForMaterialsService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+
+/**
+ * 甲供物资Controller
+ * @author 徐滕
+ * @version 2020-07-30
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/armorForMaterials")
+public class ArmorForMaterialsController extends BaseController {
+    @Autowired
+    private ProjectVisaService projectVisaService;
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ContractService contractService;
+    @Autowired
+    private ArmorForMaterialsService armorForMaterialsService;
+    @Autowired
+    private ProjectControlTableService projectControlTableService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+
+    @ModelAttribute
+    public ConstructionContract get(@RequestParam(required=false) String id) {
+        ConstructionContract entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = contractService.get(id);
+        }
+        if (entity == null){
+            entity = new ConstructionContract();
+        }
+        return entity;
+    }
+
+    /**
+     * 签证汇总表列表页面
+     */
+    @RequiresPermissions("project:armorForMaterials:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        ProjectImplementEarly projectRecords = new ProjectImplementEarly();
+        if(StringUtils.isNotBlank(constructionContract.getProjectName())){
+            projectRecords.setProjectName(constructionContract.getProjectName());
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        model.addAttribute("page", page);
+        return "modules/projectrecord/armorForMaterials/armorForMaterialsList";
+    }
+
+    //获取树状图
+    @RequestMapping(value = "getProjectList")
+    @ResponseBody
+    public Map<String, List> getTreeList(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model){
+
+        Map<String,List> map = new HashMap<>();
+        ProjectImplementEarly projectRecords = new ProjectImplementEarly();
+        if(StringUtils.isNotBlank(constructionContract.getProjectName())){
+            projectRecords.setProjectName(constructionContract.getProjectName());
+        }
+        Page<ProjectImplementEarly> recordPage = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //获取项目信息
+        List<ProjectImplementEarly> recordList = recordPage.getList();
+        //新建树形列表集合
+        List<VisaTreeData> treeList=new ArrayList<>();
+        if(recordList.size()>0){
+            for (ProjectImplementEarly record:recordList) {
+                //将项目信息放入树形列表集合中
+                VisaTreeData recordTreeData = new VisaTreeData();
+                //将界面需要展示数据放入类中
+                recordTreeData.setId(record.getId());
+                recordTreeData.setContractName(record.getProjectName());
+                recordTreeData.setCnumber(record.getProjectId());
+                recordTreeData.setNumber("");
+                recordTreeData.setPid("0");
+                //将项目设置为第一级数据
+                recordTreeData.setCondition(1);
+                //将项目信息放入
+                treeList.add(recordTreeData);
+
+                //处理合同信息数据
+                ConstructionContract conditionContract = new ConstructionContract();
+                conditionContract.setProjectId(record.getId());
+
+                if(StringUtils.isNotBlank(constructionContract.getContractName())){
+                    conditionContract.setContractName(constructionContract.getContractName());
+                }
+                //获取合同信息
+                List<ConstructionContract> contractList = contractService.getConstructionContractList(conditionContract);
+                if(contractList.size()>0){
+                    //遍历项目中的合同信息
+                    for (ConstructionContract contract:contractList) {
+                        VisaTreeData visaTreeData=new VisaTreeData();
+                        visaTreeData.setContractId(contract.getId());
+                        visaTreeData.setId(contract.getId());
+                        visaTreeData.setContractName(contract.getContractName());
+                        visaTreeData.setDate(contract.getCreateDate());
+                        visaTreeData.setNumber("");
+                        visaTreeData.setPid(record.getId());
+                        visaTreeData.setCnumber(contract.getCnumber());
+
+                        //将项目设置为第二级数据
+                        visaTreeData.setCondition(2);
+                        //遍历项目负责人信息
+                        List<User> masterUserList = record.getProjectLeaders();
+                        List<String> masterList = new ArrayList<>();
+                        Set masterIdSet = new HashSet();
+                        for (User masterUser:masterUserList) {
+                            masterList.add(masterUser.getName());
+                            masterIdSet.add(masterUser.getId());
+                        }
+                        //Set转List
+                        List<String> masterIdList = new ArrayList<>(masterIdSet);
+                        for (String masterId : masterIdList) {
+                            if(masterId.equals(UserUtils.getUser().getId())){
+                                visaTreeData.setOperationSign(1);
+                                break;
+                            }else{
+                                visaTreeData.setOperationSign(0);
+                            }
+                        }
+
+                        //将项目信息放入
+                        treeList.add(visaTreeData);
+
+
+                        //根据获取的合同的id去查找汇总表获取汇总表信息
+                        List<ProjectContentData> contentDataList=armorForMaterialsService.getConcealProjectList(contract.getId());
+                        for (int j=0;j<contentDataList.size();j++){
+                            VisaTreeData contentData=new VisaTreeData();
+                            ProjectContentData data=contentDataList.get(j);
+                            contentData.setPid(data.getContractId());
+                            contentData.setId(data.getId());
+                            contentData.setContractName(data.getName());
+                            contentData.setCnumber(contract.getCnumber());
+                            contentData.setNumber(data.getNumber());
+                            contentData.setProjectId(record.getId());
+
+                            //将项目设置为第二级数据
+                            contentData.setCondition(3);
+                            for (String masterId : masterIdList) {
+                                if(masterId.equals(UserUtils.getUser().getId())){
+                                    contentData.setOperationSign(1);
+                                    break;
+                                }else{
+                                    contentData.setOperationSign(0);
+                                }
+                            }
+                            treeList.add(contentData);
+                        }
+
+                    }
+                }
+            }
+
+        }
+        map.put("data",treeList);
+        return map;
+    }
+
+    /**
+     * 甲供物资查方法
+     * @param concealProjectInfo
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "form")
+    public String form(ConcealProjectInfo concealProjectInfo, Model model) {
+
+        ProjectContentData projectContentData = new ProjectContentData();
+        projectContentData.setType("");
+        if (StringUtils.isNotBlank(concealProjectInfo.getInfoId())){
+            projectContentData = armorForMaterialsService.getProjectContentData(concealProjectInfo.getInfoId());
+        }else if (concealProjectInfo.getProjectContentData()!=null && StringUtils.isNotBlank(concealProjectInfo.getProjectContentData().getId())) {
+            projectContentData = armorForMaterialsService.getProjectContentData(concealProjectInfo.getProjectContentData().getId());
+        }
+        projectContentData.setMaster(UserUtils.getUser());
+        if(StringUtils.isNotBlank(projectContentData.getId())){
+            List<ProjectControlTable> controlData = projectControlTableService.getControlData(projectContentData.getId(),"");
+            projectContentData.setProjectControlTableList(controlData);
+            projectContentDataService.queryBasedData(projectContentData);
+        }
+
+        concealProjectInfo.setProjectContentData(projectContentData);
+        model.addAttribute("concealProjectInfo", concealProjectInfo);
+        if("view".equals(concealProjectInfo.getType())){
+            return "modules/projectrecord/armorForMaterials/armorForMaterialsView";
+        }
+        return "modules/projectrecord/armorForMaterials/armorForMaterialsForm";
+    }
+
+    /**
+     * 甲供物资增改方法
+     * @param concealProjectInfo
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = {"save"})
+    public String save(ConcealProjectInfo concealProjectInfo, RedirectAttributes redirectAttributes) throws Exception {
+
+        String str = armorForMaterialsService.saveData(concealProjectInfo);
+        addMessage(redirectAttributes, "保存隐蔽工程量内容信息"+(str.equals("true")?"成功":"失败"));
+        return "redirect:"+Global.getAdminPath()+"/project/armorForMaterials/?repage";
+    }
+
+    @RequestMapping("ajaxdelete")
+    @ResponseBody
+    public AjaxJson deleteBased(String contentId, String basedId){
+        AjaxJson ajaxJson = new AjaxJson();
+        try {
+            if (StringUtils.isNotBlank(contentId)) {
+                armorForMaterialsService.deleteBased(contentId, basedId);
+            }
+            Integer count = projectContentDataService.countBased(basedId);
+            ajaxJson.getBody().put("inuse", count == null ? true : count > 0);
+        }catch (Exception e){
+            logger.error("删除依据资料异常!",e);
+            ajaxJson.setSuccess(false);
+            ajaxJson.setMsg("删除依据资料失败");
+        }
+        return  ajaxJson;
+    }
+
+
+    /**
+     * 甲供物资删除方法
+     * @param concealProjectInfo
+     * @return
+     */
+    @RequestMapping(value = {"deleteConcealProject"})
+    public String deleteConcealProject(ConcealProjectInfo concealProjectInfo) {
+        armorForMaterialsService.deleteConcealProject(concealProjectInfo);
+        return "redirect:"+ Global.getAdminPath()+"/project/armorForMaterials/?repage";
+    }
+    /**
+     * 删除依据性资料
+     */
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Map<String,Object> delete(ProjectVisa projectVisa, RedirectAttributes redirectAttributes) {
+        Map<String,Object> j= new HashMap<>();
+        try {
+            projectVisaService.deleteByLogic(projectVisa.getId(),projectVisa.getType());
+            j.put("status",true);
+            j.put("msg","删除成功");
+            addMessage(redirectAttributes, "删除成功");
+        }catch (Exception e){
+            j.put("status",false);
+            j.put("msg","删除失败");
+            addMessage(redirectAttributes, "删除失败");
+        }
+        return j;
+    }
+}

+ 11 - 30
src/main/java/com/jeeplus/modules/projectrecord/web/concealProject/ConcealProjectController.java

@@ -10,24 +10,16 @@ import com.jeeplus.modules.projectConstruction.service.ContractService;
 import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
 import com.jeeplus.modules.projectVisa.entity.VisaTreeData;
 import com.jeeplus.modules.projectVisa.service.ProjectVisaService;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
-import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectBasedDataService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
 import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
-import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
 import com.jeeplus.modules.projectrecord.entity.ConcealProjectInfo;
 import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
-import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
 import com.jeeplus.modules.projectrecord.service.concealProject.ConcealProjectService;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -57,8 +49,6 @@ public class ConcealProjectController extends BaseController {
     @Autowired
     private ContractService contractService;
     @Autowired
-    private WorkClientAttachmentDao workClientAttachmentDao;
-    @Autowired
     private ConcealProjectService concealProjectService;
     @Autowired
     private ProjectControlTableService projectControlTableService;
@@ -86,7 +76,12 @@ public class ConcealProjectController extends BaseController {
         if(UserUtils.isManager()){
             model.addAttribute("flag","1");
         }
-        Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
+
+        ProjectImplementEarly projectRecords = new ProjectImplementEarly();
+        if(StringUtils.isNotBlank(constructionContract.getProjectName())){
+            projectRecords.setProjectName(constructionContract.getProjectName());
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
         model.addAttribute("page", page);
         return "modules/projectrecord/concealProject/concealProjectList";
     }
@@ -254,30 +249,16 @@ public class ConcealProjectController extends BaseController {
     }
 
 
+    /**
+     * 删除数据
+     * @param concealProjectInfo
+     * @return
+     */
     @RequestMapping(value = {"deleteConcealProject"})
     public String deleteConcealProject(ConcealProjectInfo concealProjectInfo) {
         concealProjectService.deleteConcealProject(concealProjectInfo);
         return "redirect:"+Global.getAdminPath()+"/project/concealProject/?repage";
     }
-
-
-    //编辑签证汇总页面
-    @RequestMapping(value = "view")
-    public String view(ProjectVisa projectVisa, Model model) {
-
-        if(StringUtils.isNotEmpty(projectVisa.getId())){
-            ProjectVisa visa=projectVisaService.getVisa(projectVisa);
-            WorkClientAttachment attchment = new WorkClientAttachment();
-            attchment.setAttachmentId(projectVisa.getId());
-            List<WorkClientAttachment> attachments = workClientAttachmentDao.findList(attchment);
-            visa.setWorkAttachments(attachments);
-            model.addAttribute("projectVisa", visa);
-        }else{
-            model.addAttribute("projectVisa", projectVisa);
-        }
-
-        return "modules/projectrecord/implementStage/projectVisaView";
-    }
     /**
      * 删除依据性资料
      */

+ 9 - 0
src/main/java/com/jeeplus/modules/workcontent/entity/WorkFiveDirectionsAffirm.java

@@ -44,6 +44,7 @@ public class WorkFiveDirectionsAffirm extends DataEntity<WorkFiveDirectionsAffir
 	private String consultAuditTotal;  //审核合计量
 	private String consultRemarks;  //备注
 	private String type;          //数据状态
+	private String roadworkDemandDateStr;  //需求日期Str
 
 	public WorkFiveDirectionsAffirm() {
 		super();
@@ -228,4 +229,12 @@ public class WorkFiveDirectionsAffirm extends DataEntity<WorkFiveDirectionsAffir
 	public void setType(String type) {
 		this.type = type;
 	}
+
+	public String getRoadworkDemandDateStr() {
+		return roadworkDemandDateStr;
+	}
+
+	public void setRoadworkDemandDateStr(String roadworkDemandDateStr) {
+		this.roadworkDemandDateStr = roadworkDemandDateStr;
+	}
 }

+ 12 - 0
src/main/java/com/jeeplus/modules/workcontent/web/WorkFiveDirectionsAffirmController.java

@@ -25,8 +25,11 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -68,6 +71,9 @@ public class WorkFiveDirectionsAffirmController extends BaseController {
         if(StringUtils.isNotBlank(workFiveDirectionsAffirm.getContentId())){
             list = workFiveDirectionsAffirmService.findList(workFiveDirectionsAffirm);
         }
+		for ( WorkFiveDirectionsAffirm affirm:list) {
+			affirm.setRoadworkDemandDateStr(getNowDate(affirm.getRoadworkDemandDate()));
+		}
         model.addAttribute("signList", signList);
         model.addAttribute("fiveDirectionsAffirmList", list);
         String viewPath = "modules/workcontent/workFiveDirectionsAffirmList";
@@ -83,6 +89,12 @@ public class WorkFiveDirectionsAffirmController extends BaseController {
         return viewPath;
 	}
 
+	public static String getNowDate(Date currentTime) {
+		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+		String dateString = formatter.format(currentTime);
+		return dateString;
+	}
+
 
 	/**
 	 * 查询数据表中的所有数据类型

+ 132 - 0
src/main/resources/mappings/modules/projectrecord/armorForMaterials/ArmorForMaterialsDao.xml

@@ -0,0 +1,132 @@
+<?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.projectrecord.dao.armorForMaterials.ArmorForMaterialsDao">
+
+	<sql id="projectcontentinfoColumns">
+		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.parent_id AS "parent.id",
+		a.parent_ids AS "parentIds",
+		a.sort AS "sort",
+		a.project_id AS "project.id",
+		a.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.type AS "type",
+		a.info_id AS "infoId",
+		a.dict_type AS "dictType",
+		a.name AS "name",
+		a.link_id AS "linkId"
+	</sql>
+
+	<sql id="projectContentDataColumns">
+		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.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.name as "name",
+		a.contract_id as "contractId"
+	</sql>
+
+
+	<select id="findListByProject" resultType="Projectcontentinfo" >
+		SELECT
+		<include refid="projectcontentinfoColumns"/>
+		FROM project_content_info a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			AND a.parent_ids = #{parentIds}
+			AND a.project_id = #{project.id}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.sort DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="getConcealProjectList" resultType="ProjectContentData">
+		SELECT
+		<include refid="projectContentDataColumns"/>
+		from armor_for_materials_info a
+		where a.contract_id = #{contractId}  and del_flag=0
+
+	</select>
+
+	<select id="getConcealProjectData" resultType="ProjectContentData">
+		SELECT
+		<include refid="projectContentDataColumns"/>
+		from armor_for_materials_info a
+		where a.id = #{id} and del_flag=0
+
+	</select>
+
+
+	<update id="deleteBasedData">
+        DELETE FROM project_content_based WHERE content_id = #{contentId} and based_id = #{basedId}
+    </update>
+
+	<insert id="saveConcealProject">
+		insert into armor_for_materials_info (
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			company_id,
+			office_id,
+			contract_id,
+			`name`,
+			`number`,
+			master
+			)
+		values
+			(
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{companyId},
+			#{officeId},
+			#{contractId},
+			#{name},
+			#{number},
+			#{master.id}
+			)
+	</insert>
+
+	<update id="upodateConcealProject">
+		update
+		  armor_for_materials_info
+		set
+		  update_by = #{updateBy.id},
+		  update_date = #{updateDate},
+		  remarks = #{remarks},
+		  name = #{name},
+		  master = #{master.id}
+		where id = #{id}
+	</update>
+
+	<delete id="deleteConcealProject">
+		update armor_for_materials_info
+		set del_flag = 1
+		where id = #{id}
+	</delete>
+</mapper>

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

@@ -81,6 +81,7 @@
 			<form:hidden path="id"/>
 			<form:hidden path="edit"/>
 			<form:hidden path="parentIds"/>
+			<form:hidden path="project.id"/>
 			<form:hidden path="projectBasedData.id"/>
 			<sys:message content="${message}"/>
 

+ 839 - 0
src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsForm.jsp

@@ -0,0 +1,839 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工作内容详情管理</title>
+	<meta name="decorator" content="default"/>
+    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+    <style>
+        #projectContentDataType-error{
+            left:0;
+            top:40px;
+        }
+    </style>
+	<script type="text/javascript">
+        $.fn.serializeJson=function(){
+            var serializeObj={};
+            var array=this.serializeArray();
+            var str=this.serialize();
+            $(array).each(function(){
+                if(serializeObj[this.name]){
+                    if($.isArray(serializeObj[this.name])){
+                        serializeObj[this.name].push(this.value);
+                    }else{
+                        serializeObj[this.name]=[serializeObj[this.name],this.value];
+                    }
+                }else{
+                    serializeObj[this.name]=this.value;
+                }
+            });
+            return serializeObj;
+        };
+
+        var validateForm;
+        var detailFlag =0;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                beforeSubmit();
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+
+        function beforeSubmit() {
+            var contentDetaStr = '';
+            if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
+                contentDetaStr += encodeURIComponent(genDetailStr());
+            }
+            if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
+                contentDetaStr += encodeURIComponent(genSecondDetailStr());
+            }
+            if(detailFlag==1){
+                $("#contentDeta").val(contentDetaStr);
+            }
+            $(document.getElementById("projectContentDataType")).removeAttr("disabled");
+        }
+
+        $(function() {
+            var editVal = '${concealProjectInfo.edit}';
+
+            if($("#createDate").val()==null || $("#createDate").val()==''){
+                $("#createDate").val(getNowFormatDate());
+            }
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            changeContentDetail(document.getElementById("projectContentDataType"));
+            var tp = "${concealProjectInfo.dictType}";
+            var tp2 = "${concealProjectInfo.projectContentData.id}"
+            if((tp!=null && tp!='')||(tp2!=null && tp2!='')){
+                $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
+            }
+            initControlData("1");
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+
+        function openDialogre(title,url,width,height,formId){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+        
+        function changeContentDetail(obj) {
+            $("#contentDetail").empty();
+            var val = "411";
+            contentDetailTypeShow(val);
+            $("#contentDetailTypeDiv").show();
+            $("#projectContentDataSign").val(val);
+            var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}"};
+            detailFlag=1;
+            $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "94";
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function openDialogreControl(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
+                    formSubmit($document,"inputForm",index,index1);
+                },
+                btn2: function(index){
+                    parent.layer.close(index)
+                },
+                end:function(index){
+                    parent.layer.close(index)
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index,index1){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        parent.parent.layer.msg("操作成功",{icon:1})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initGetControlData();
+                    },error:function(){
+                        parent.parent.layer.msg("操作失败",{icon:2})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initControlData("1");
+                    }
+                });
+            }else {
+                parent.parent.layer.msg("信息未填写完整!", {icon: 2});
+                parent.layer.close(index1)
+                parent.parent.layer.close(index1)
+            }
+        }
+        /**
+         * 删除临时数据
+         */
+        function initControlData(obj,othis,del,tableId){
+            if(del == "del"){
+                proId = tableId;
+			}else{
+                proId = "";
+			}
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/delControlData',
+                data:{
+                    "projectId":"${concealProjectInfo.project.id}",
+					"projectContentId":proId,
+					"flag":del
+                },
+                success:function(data){
+                    if(obj != "1"){
+                        if(data.flag){
+                            //$(othis).parent().parent().parent().remove();
+                            parent.layer.msg("数据删除成功",{icon:1})
+                            $(othis).remove()
+                        }else{
+                            parent.layer.msg("数据删除失败",{icon:2})
+                        }
+                    }
+                }
+            })
+        }
+
+        function getMatchDate(str){
+//            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/;
+            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1]))/
+            var date = (""+str).match(reDateTime);
+            if(date){
+                return date[0]
+            }else{
+                return "";
+            }
+        }
+
+        /**
+         * 获取临时数据
+         * @param obj
+         * @param othis
+         */
+        function initGetControlData(){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/getControlData',
+                data:{
+                    "projectId":"${concealProjectInfo.project.id}",
+                    "proId":"${concealProjectInfo.projectContentData.id}"
+                },
+                success:function(data){
+                    if(data){
+                        var htmlStr = '';
+                        data = data.list.projectControlTableList;
+                        for(var i=0;i<data.length;i++){
+                            htmlStr += "<tr id='tr"+i+"'>"+
+                                "   <td style='text-align:center;'>"+
+                                "	   "+data[i].tName+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].id' value='"+data[i].id+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tName' value='"+data[i].tName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].processName' value='"+data[i].processName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].pfId' value='"+data[i].pfId+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>" +
+                                "  			"+data[i].processName+
+                                "	   		<input type='hidden' name='projectContentData.projectControlTableList["+i+"].tType' value='"+data[i].tType+"'>"+
+                                "	</td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  		"+data[i].tUser.name+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  "+ getMatchDate(data[i].createDate)+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createDate' value='"+data[i].createDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].updateDate' value='"+data[i].updateDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].delFlag' value='"+data[i].delFlag+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createBy.id' value='"+data[i].createBy.id+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "   	<a href='javascript:void(0)' onclick=\"openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?view=view&id="+data[i].id+"','90%', '90%')\" class='btn btn-info btn-xs' ><i class='fa fa-search-plus'></i> 查看</a>"+
+                                "  		<a href=\"javascript:initControlData('0','#tr"+i+"','del','"+data[i].id+"')\" onclick=\"return confirmx('确认要删除该过程控制数据吗?', this.href)\"   class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> 删除</a>"+
+                                "  </td>"+
+                                "</tr>";
+                        }
+                        if(htmlStr){
+                            $("#projectControlTables").html(htmlStr);
+                        }
+                    }
+                }
+            })
+        }
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            console.log("-----------val"+val);
+            if(!isNumber(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container${container}">
+        <form:form id="inputForm" modelAttribute="concealProjectInfo" action="${ctx}/project/armorForMaterials/save" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="edit"/>
+            <form:hidden path="parentIds"/>
+            <form:hidden path="condition"/>
+            <form:hidden path="project.id"/>
+            <form:hidden path="contract.id"/>
+            <form:hidden path="projectContentData.id"/>
+            <input type="hidden" id="projectId" value="${concealProjectInfo.project.id}">
+            <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
+            <input type="hidden" id="dataBodyList" name="dataBodyList" value="">
+            <input type="hidden" id="projectContentDataSign" name="projectContentDataSign" value="">
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <%--<div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">隐蔽工程量编号:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectContentData.number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                    </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="projectContentData.name" value="${concealProjectInfo.contract.contractName}" htmlEscape="false" class="form-control required layui-input"/>
+                    </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="projectContentData.master.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                        <form:hidden path="projectContentData.master.id" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                    </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">
+                        <input id="createDate" name="projectContentData.createDate" type="text" readonly="true" maxlength="20" class="form-control layui-input required"
+                               value="<fmt:formatDate value="${concealProjectInfo.projectContentData.createDate}" pattern="yyyy-MM-dd"/>"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6" id="contentDetailTypeDiv" style="display: none">
+                    <label class="layui-form-label">选择类型:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <div >
+                                <div id="contentDetailType" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
+                            </div>
+                            <span class="input-group-btn" onclick="getDetailsNum()">
+								<label class="form-status">生成表格</label>
+							 </span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>内容详情</h2></div>
+                <div style="padding: 0 15px;">
+                    <div id="contentDetail"></div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>依据性资料明细</h2></div>
+                <div class="layui-item nav-btns">
+                    <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${concealProjectInfo.dictType}&project.id=${concealProjectInfo.project.id}&parentIds=${concealProjectInfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
+
+                    <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
+                                            cssClass="form-control" projectId="${concealProjectInfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTableBase" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th class="hide"></th>
+                    <th >资料编号</th>
+                    <th >资料名称</th>
+                    <th >资料类别</th>
+                    <th >上传人</th>
+                    <th >上传日期</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody id="workBaseDataList">
+                <c:forEach items="${concealProjectInfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
+                    <tr>
+                        <td class="hide">
+                            <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.number}
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.name}
+                        </td>
+                        <td style="text-align:center;">
+                                ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.uploadUser.name}
+                        </td>
+                        <td style="text-align:center;">
+                            <fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
+                        </td>
+
+                        <td class="text-center op-td">
+                            <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                        </td>
+                    </tr>
+                </c:forEach>
+                </tbody>
+            </table>
+                </div>
+            </div>
+            <script type="text/template" id="workBaseDataTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
+                        <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
+                        <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
+                        <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.number}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.typeLabel}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.uploadUser.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.uploadDate}}
+                    </td>
+                    <td class="text-center op-td">
+                        <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                    </td>
+                </tr>//-->
+            </script>
+            <script type="text/javascript">
+                var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workBaseDataRowIdx = ${fn:length(concealProjectInfo.projectReportData.projectBasedDataList)};
+                function setValuee(obj){
+                    for(var i=0;i<obj.length;i++){
+                        var idArr = $("#workBaseDataList tr:visible .clientId");
+                        if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                            addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+                            workBaseDataRowIdx=workBaseDataRowIdx+1;
+                        }
+                    }
+                }
+                function hasInArr(id,idArr) {
+                    for(var i=0;i<idArr.length;i++){
+                        if(id==$(idArr[i]).val()){
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+                function existBaseData(id,length) {
+                    for (var i=0;i<length;i++) {
+                        var val = $('#workBaseDataList'+i+'_id').val();
+                        if(id==val){
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                function addRowBaseData(list, idx, tpl, row){
+                    bornTemplete(list, idx, tpl, row, idx);
+                }
+
+                function bornTemplete(list, idx, tpl, row, idx1){
+                    var idx1 = $("#workBaseDataList tr").length +1;
+                    $(list).append(Mustache.render(tpl, {
+                        idx: idx, delBtn: true, row: row,
+                        order:idx1 + 1, idx1:idx1
+                    }));
+                    $(list+idx).find("select").each(function(){
+                        $(this).val($(this).attr("data-value"));
+                    });
+                    $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                        var ss = $(this).attr("data-value").split(',');
+                        for (var i=0; i<ss.length; i++){
+                            if($(this).val() == ss[i]){
+                                $(this).attr("checked","checked");
+                            }
+                        }
+                    });
+                }
+                function delRowBaseData(obj, prefix,userId){
+                    var id = $(prefix+"_id").val();
+                   /* var createBy = $(prefix+"_userId").val();*/
+                    var currentUser = '${fns:getUser().id}';
+                    var contentId = '${concealProjectInfo.projectContentData.id}';
+                    console.log(contentId);
+
+                    $.ajax({
+                        type:"post",
+                        url:'${ctx}/project/concealProject/ajaxdelete',
+                        data:{"contentId":contentId,"basedId":id},
+                        dataType:"json",
+                        success:function(data){
+                            if(data.success) {
+                                $(obj).parent().parent().remove();
+                                if(data.body.inuse){
+                                    return;
+                                }
+                                if (currentUser == userId) {
+                                    confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${concealProjectInfo.id}&type=1');
+                                }
+                            }else {
+                                top.layer.msg("删除依据资料失败!", {icon: 0});
+                            }
+                        }
+                    })
+                    return;
+                }
+
+                function confirmDelete(mess, href){
+                    top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+                        //do something
+                        if (typeof href == 'function') {
+                            href();
+                        }else{
+                            $.ajax({
+                                url:href,
+                                type:"post",
+                                success:function(data){
+                                    if(data.success){
+                                        top.layer.msg("删除依据资料成功!", {icon: 0});
+                                    }
+                                }
+                            });
+                        }
+                        top.layer.close(index);
+                    });
+                    return false;
+                }
+            </script>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                            <tr>
+                            <th>文件名称</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${concealProjectInfo.projectContentData.workAttachments}" var = "workAttachment" varStatus="status">
+                            <tr>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+                                        <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">
+                                            <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workAttachment.url}&id=${workAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                </tbody>
+                    </table>
+                </div>
+            </div>
+            <c:if test="${concealProjectInfo.infoId !=null and concealProjectInfo.edit  == 'edit'}">
+                <div class="pull-right">
+                    <button id="btnSubmit" class="nav-btn nav-btn-add" type="submit" onclick="$('#edit').val('edit');beforeSubmit();"><i class="fa fa-chevron-up"></i> 提 交</button>
+                </div>
+            </c:if>
+            <div class="form-group layui-row page-end">
+            <br>
+            <br>
+            <br>
+            </div>
+        </form:form>
+    </div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    function contentDetailTypeShow(obj) {
+        var projectContentDataId = '${concealProjectInfo.projectContentData.id}';
+        $.ajax({
+            type:'post',
+            url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList2',
+            data:{
+                "achievementParentId":obj,
+                "type":2
+            },
+            success:function(data){
+                if(data.success) {
+                    if (null != obj && "" != obj) {
+                        if(null !=projectContentDataId && ""!= projectContentDataId) {
+                            $.ajax({
+                                type: 'post',
+                                url: getExistingDataOnPath(obj),
+                                data: {
+                                    "contentId": "${concealProjectInfo.projectContentData.id}"
+                                },
+                                success: function (tableTypeList) {
+                                    var dataList = data.body.list;
+                                    var newDataList = [];
+                                    var holdDataList = data.body.list;
+                                    if (0 != dataList.length) {
+                                        for (i in holdDataList) {
+                                            newDataList.push(holdDataList[i])
+                                        }
+                                    }
+                                    if (0 != newDataList.length && 0 !=tableTypeList.length){
+                                        for (i in newDataList) {
+                                            for (j in tableTypeList) {
+                                                if (newDataList[i].value == tableTypeList[j]) {
+                                                    var newData = {
+                                                        "name": newDataList[i].name,
+                                                        "value": newDataList[i].value,
+                                                        "selected": true
+                                                    }
+                                                    holdDataList.splice(i,1,newData);
+                                                }
+                                                modifyGetDetailsNum(tableTypeList);
+                                            }
+                                        }
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: holdDataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }else{
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: dataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }
+                                }
+                            })
+                        }else{
+                            xmSelect.render({
+                                el: '#contentDetailType',
+                                language: 'zn',
+                                data: data.body.list
+                            })
+                            $("#dataBodyList").val(data.body.list);
+                        }
+                    }else {
+                        xmSelect.render({
+                            el: '#contentDetailType',
+                            language: 'zn',
+                            data: data.body.list
+                        })
+                        $("#dataBodyList").val(data.body.list);
+                    }
+                }
+            }
+        })
+    }
+
+    var contentDetailType = xmSelect.render({
+        el: '#contentDetailType',
+        language: 'zn',
+        data: [
+        ]
+    })
+    
+    function getExistingDataOnPath(val) {
+        return "${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/getTableType";
+    }
+
+
+    function getDetailsNum(){
+        var list = [];
+        //获取当前多选选中的值
+        var selectArr = contentDetailType.getValue();
+        for (var i in selectArr){
+            list.push(selectArr[i].value);
+        }
+        $("#contentDetail").val("");
+        console.log(list);
+        var val = $("#projectContentDataSign").val();
+        var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",'sign':list.toString(),'achievementParentId':val};
+        detailFlag=1;
+        $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+
+    }
+
+    function modifyGetDetailsNum(list){
+        $("#contentDetailType").empty();
+        console.log(list);
+        var val = $("#projectContentDataSign").val();
+        var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",'sign':list.toString(),'achievementParentId':val};
+        detailFlag=1;
+        $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+    }
+</script>
+</body>
+</html>

+ 468 - 0
src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsList.jsp

@@ -0,0 +1,468 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>签证管理</title>
+    <meta name="decorator" content="default"/>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+    <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: ['保存','关闭'],
+
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+    </script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="layui-row contentShadow shadowLR" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="constructionContract" action="${ctx}/project/armorForMaterials/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}"/>
+                    <div class="commonQuery lw14">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">项目名称:</label>
+                            <div class="layui-input-block">
+                                <form:input path="projectName" 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="contractName" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+                            </div>
+                        </div>
+
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+                                <button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="layui-form contentDetails contentShadow shadowLBR">
+                <div class="nav-btns">
+                    <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>
+                </div>
+                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+    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();
+            if(undefined == projectName){
+                projectName = "";
+            }
+            var contractName = $("#contractName").val();
+            if(undefined == contractName){
+                contractName = "";
+            }
+            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/armorForMaterials/getProjectList?pageNo=${page.pageNo}&projectName='+projectName+'&contractName='+contractName,
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'cnumber', title: '项目编号/合同编号',templet:function(d){
+                            if(d.condition ==1){
+                                return "<font>"+d.cnumber+"</font>";
+                            }else if(d.condition ==2){
+                                return "<font>"+d.cnumber+"</font>";
+                            }else{
+                                return "<font>"+d.cnumber+"</font>";
+                            }
+                        }},
+                    {field: 'contractName', title: '项目名称/合同名称/隐蔽工程量名称',templet:function(d){
+                            if(d.condition ==1){
+                                return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.contractName + "</a>";
+                            }else if(d.condition ==2){
+                                return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/project/constructionContract/view?id=" + d.contractId +"','95%', '95%')\">" + d.contractName + "</a>";
+                            }else{
+                                return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看隐蔽工程量信息', '${ctx}/project/armorForMaterials/form?type=view&infoId="+d.id+"&contractId="+d.contractId+"&project.id="+d.projectId+"&contract.id="+d.pid+"','95%', '95%')\">" + d.contractName + "</a>";
+                            }
+                        }},
+                    {field: 'date', align:'center', title: '创建日期',width:100,templet: function(d){
+                            var date=d.createDate;
+                            if(d.condition ==1){
+                                return "";
+                            }else if(d.condition ==2){
+                                return "";
+                            }else{
+                                return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+                            }
+                        }},
+                    {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();
+        });
+
+
+        function complain(d){//操作中显示的内容
+            if(d.condition ==1) {
+                return [
+                    '',
+                ].join('');
+            } else if(d.condition ==2) {
+                return [
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增甲供物资信息\', \'${ctx}/project/armorForMaterials/form?project.id='+d.pid+'&contract.id='+d.id+'&contract.contractName='+d.contractName+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+                ].join('');
+            } else if (d.condition ==3){
+                return [
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改甲供物资信息\', \'${ctx}/project/armorForMaterials/form?infoId='+d.id+'&contractId='+d.contractId+'&project.id='+d.projectId+'&contract.id='+d.pid+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+                    '<a href="${ctx}/project/armorForMaterials/deleteConcealProject?id='+d.id+'" onclick="return confirmx(\'确认要删除该甲供物资信息吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
+                ].join('');
+
+            }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);
+                }
+            }
+        });
+    });
+
+</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显示。
+
+        }
+        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){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'three-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['提交','关闭'],
+            btn1: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(1) ){
+                    top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            btn2: function(index){
+            }
+        });
+    }
+    // 确认对话框
+    function confirmxRefresh(mess, href){
+        top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+            //do something
+            if (typeof href == 'function') {
+                href();
+            }else{
+                resetTip(); //loading();
+                $.ajax({
+                    url:href,
+                    data:$('#loginForm').serialize(),
+                    type:"post",
+                    success:function(data){
+                        if(data.status){
+                            parent.layer.msg(data.msg,{icon:1});
+                        }else {
+                            parent.layer.msg(data.msg,{icon:2});
+                        }
+                        //parent.refreshTrees();
+                        location = '${ctx}/project/projectVisa/list';
+                    }
+                });
+            }
+            top.layer.close(index);
+        });
+        return false;
+    }
+</script>
+</body>
+</html>

+ 800 - 0
src/main/webapp/webpage/modules/projectrecord/armorForMaterials/armorForMaterialsView.jsp

@@ -0,0 +1,800 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工作内容详情管理</title>
+	<meta name="decorator" content="default"/>
+    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+    <style>
+        #projectContentDataType-error{
+            left:0;
+            top:40px;
+        }
+    </style>
+	<script type="text/javascript">
+        $.fn.serializeJson=function(){
+            var serializeObj={};
+            var array=this.serializeArray();
+            var str=this.serialize();
+            $(array).each(function(){
+                if(serializeObj[this.name]){
+                    if($.isArray(serializeObj[this.name])){
+                        serializeObj[this.name].push(this.value);
+                    }else{
+                        serializeObj[this.name]=[serializeObj[this.name],this.value];
+                    }
+                }else{
+                    serializeObj[this.name]=this.value;
+                }
+            });
+            return serializeObj;
+        };
+
+        var validateForm;
+        var detailFlag =0;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                beforeSubmit();
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+
+        function beforeSubmit() {
+            var contentDetaStr = '';
+            if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
+                contentDetaStr += encodeURIComponent(genDetailStr());
+            }
+            if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
+                contentDetaStr += encodeURIComponent(genSecondDetailStr());
+            }
+            if(detailFlag==1){
+                $("#contentDeta").val(contentDetaStr);
+            }
+            $(document.getElementById("projectContentDataType")).removeAttr("disabled");
+        }
+
+        $(function() {
+            var editVal = '${concealProjectInfo.edit}';
+
+            if($("#createDate").val()==null || $("#createDate").val()==''){
+                $("#createDate").val(getNowFormatDate());
+            }
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            changeContentDetail(document.getElementById("projectContentDataType"));
+            var tp = "${concealProjectInfo.dictType}";
+            var tp2 = "${concealProjectInfo.projectContentData.id}"
+            if((tp!=null && tp!='')||(tp2!=null && tp2!='')){
+                $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
+            }
+            initControlData("1");
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+
+        function openDialogre(title,url,width,height,formId){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+        
+        function changeContentDetail(obj) {
+            $("#contentDetail").empty();
+            var val = "411";
+            contentDetailTypeShow(val);
+            $("#contentDetailTypeDiv").show();
+            $("#projectContentDataSign").val(val);
+            var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",view:"view"};
+            detailFlag=1;
+            $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "94";
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function openDialogreControl(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
+                    formSubmit($document,"inputForm",index,index1);
+                },
+                btn2: function(index){
+                    parent.layer.close(index)
+                },
+                end:function(index){
+                    parent.layer.close(index)
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index,index1){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        parent.parent.layer.msg("操作成功",{icon:1})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initGetControlData();
+                    },error:function(){
+                        parent.parent.layer.msg("操作失败",{icon:2})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initControlData("1");
+                    }
+                });
+            }else {
+                parent.parent.layer.msg("信息未填写完整!", {icon: 2});
+                parent.layer.close(index1)
+                parent.parent.layer.close(index1)
+            }
+        }
+        /**
+         * 删除临时数据
+         */
+        function initControlData(obj,othis,del,tableId){
+            if(del == "del"){
+                proId = tableId;
+			}else{
+                proId = "";
+			}
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/delControlData',
+                data:{
+                    "projectId":"${concealProjectInfo.project.id}",
+					"projectContentId":proId,
+					"flag":del
+                },
+                success:function(data){
+                    if(obj != "1"){
+                        if(data.flag){
+                            //$(othis).parent().parent().parent().remove();
+                            parent.layer.msg("数据删除成功",{icon:1})
+                            $(othis).remove()
+                        }else{
+                            parent.layer.msg("数据删除失败",{icon:2})
+                        }
+                    }
+                }
+            })
+        }
+
+        function getMatchDate(str){
+//            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/;
+            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1]))/
+            var date = (""+str).match(reDateTime);
+            if(date){
+                return date[0]
+            }else{
+                return "";
+            }
+        }
+
+        /**
+         * 获取临时数据
+         * @param obj
+         * @param othis
+         */
+        function initGetControlData(){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/getControlData',
+                data:{
+                    "projectId":"${concealProjectInfo.project.id}",
+                    "proId":"${concealProjectInfo.projectContentData.id}"
+                },
+                success:function(data){
+                    if(data){
+                        var htmlStr = '';
+                        data = data.list.projectControlTableList;
+                        for(var i=0;i<data.length;i++){
+                            htmlStr += "<tr id='tr"+i+"'>"+
+                                "   <td style='text-align:center;'>"+
+                                "	   "+data[i].tName+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].id' value='"+data[i].id+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tName' value='"+data[i].tName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].processName' value='"+data[i].processName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].pfId' value='"+data[i].pfId+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>" +
+                                "  			"+data[i].processName+
+                                "	   		<input type='hidden' name='projectContentData.projectControlTableList["+i+"].tType' value='"+data[i].tType+"'>"+
+                                "	</td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  		"+data[i].tUser.name+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  "+ getMatchDate(data[i].createDate)+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createDate' value='"+data[i].createDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].updateDate' value='"+data[i].updateDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].delFlag' value='"+data[i].delFlag+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createBy.id' value='"+data[i].createBy.id+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "   	<a href='javascript:void(0)' onclick=\"openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?view=view&id="+data[i].id+"','90%', '90%')\" class='btn btn-info btn-xs' ><i class='fa fa-search-plus'></i> 查看</a>"+
+                                "  		<a href=\"javascript:initControlData('0','#tr"+i+"','del','"+data[i].id+"')\" onclick=\"return confirmx('确认要删除该过程控制数据吗?', this.href)\"   class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> 删除</a>"+
+                                "  </td>"+
+                                "</tr>";
+                        }
+                        if(htmlStr){
+                            $("#projectControlTables").html(htmlStr);
+                        }
+                    }
+                }
+            })
+        }
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            console.log("-----------val"+val);
+            if(!isNumber(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container${container}">
+        <form:form id="inputForm" modelAttribute="concealProjectInfo" action="#" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="edit"/>
+            <form:hidden path="parentIds"/>
+            <form:hidden path="condition"/>
+            <form:hidden path="project.id"/>
+            <form:hidden path="contract.id"/>
+            <form:hidden path="projectContentData.id"/>
+            <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
+            <input type="hidden" id="dataBodyList" name="dataBodyList" value="">
+            <input type="hidden" id="projectContentDataSign" name="projectContentDataSign" value="">
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <%--<div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">隐蔽工程量编号:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectContentData.number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                    </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="projectContentData.name" readonly="true" value="${concealProjectInfo.contract.contractName}" htmlEscape="false" class="form-control required layui-input"/>
+                    </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="projectContentData.master.name"  htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                        <form:hidden path="projectContentData.master.id" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                    </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">
+                        <input id="createDate" name="projectContentData.createDate"  type="text" readonly="true" maxlength="20" class="form-control layui-input required"
+                               value="<fmt:formatDate value="${concealProjectInfo.projectContentData.createDate}" pattern="yyyy-MM-dd"/>"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6" id="contentDetailTypeDiv" style="display: none">
+                    <label class="layui-form-label">选择类型:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <div >
+                                <div id="contentDetailType" style="pointer-events: none;" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>内容详情</h2></div>
+                <div style="padding: 0 15px;">
+                    <div id="contentDetail"></div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>依据性资料明细</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTableBase" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th class="hide"></th>
+                    <th >资料编号</th>
+                    <th >资料名称</th>
+                    <th >资料类别</th>
+                    <th >上传人</th>
+                    <th >上传日期</th>
+                </tr>
+                </thead>
+                <tbody id="workBaseDataList">
+                <c:forEach items="${concealProjectInfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
+                    <tr>
+                        <td class="hide">
+                            <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.number}
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.name}
+                        </td>
+                        <td style="text-align:center;">
+                                ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
+                        </td>
+                        <td style="text-align:center;">
+                                ${projectBasedData.uploadUser.name}
+                        </td>
+                        <td style="text-align:center;">
+                            <fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
+                        </td>
+                    </tr>
+                </c:forEach>
+                </tbody>
+            </table>
+                </div>
+            </div>
+            <script type="text/template" id="workBaseDataTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
+                        <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
+                        <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
+                        <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.number}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.typeLabel}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.uploadUser.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.uploadDate}}
+                    </td>
+                    <td class="text-center op-td">
+                        <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                    </td>
+                </tr>//-->
+            </script>
+            <script type="text/javascript">
+                var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workBaseDataRowIdx = ${fn:length(concealProjectInfo.projectReportData.projectBasedDataList)};
+                function setValuee(obj){
+                    for(var i=0;i<obj.length;i++){
+                        var idArr = $("#workBaseDataList tr:visible .clientId");
+                        if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                            addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+                            workBaseDataRowIdx=workBaseDataRowIdx+1;
+                        }
+                    }
+                }
+                function hasInArr(id,idArr) {
+                    for(var i=0;i<idArr.length;i++){
+                        if(id==$(idArr[i]).val()){
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+                function existBaseData(id,length) {
+                    for (var i=0;i<length;i++) {
+                        var val = $('#workBaseDataList'+i+'_id').val();
+                        if(id==val){
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                function addRowBaseData(list, idx, tpl, row){
+                    bornTemplete(list, idx, tpl, row, idx);
+                }
+
+                function bornTemplete(list, idx, tpl, row, idx1){
+                    var idx1 = $("#workBaseDataList tr").length +1;
+                    $(list).append(Mustache.render(tpl, {
+                        idx: idx, delBtn: true, row: row,
+                        order:idx1 + 1, idx1:idx1
+                    }));
+                    $(list+idx).find("select").each(function(){
+                        $(this).val($(this).attr("data-value"));
+                    });
+                    $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                        var ss = $(this).attr("data-value").split(',');
+                        for (var i=0; i<ss.length; i++){
+                            if($(this).val() == ss[i]){
+                                $(this).attr("checked","checked");
+                            }
+                        }
+                    });
+                }
+                function delRowBaseData(obj, prefix,userId){
+                    var id = $(prefix+"_id").val();
+                   /* var createBy = $(prefix+"_userId").val();*/
+                    var currentUser = '${fns:getUser().id}';
+                    var contentId = '${concealProjectInfo.projectContentData.id}';
+                    console.log(contentId);
+
+                    $.ajax({
+                        type:"post",
+                        url:'${ctx}/project/concealProject/ajaxdelete',
+                        data:{"contentId":contentId,"basedId":id},
+                        dataType:"json",
+                        success:function(data){
+                            if(data.success) {
+                                $(obj).parent().parent().remove();
+                                if(data.body.inuse){
+                                    return;
+                                }
+                                if (currentUser == userId) {
+                                    confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${concealProjectInfo.id}&type=1');
+                                }
+                            }else {
+                                top.layer.msg("删除依据资料失败!", {icon: 0});
+                            }
+                        }
+                    })
+                    return;
+                }
+
+                function confirmDelete(mess, href){
+                    top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+                        //do something
+                        if (typeof href == 'function') {
+                            href();
+                        }else{
+                            $.ajax({
+                                url:href,
+                                type:"post",
+                                success:function(data){
+                                    if(data.success){
+                                        top.layer.msg("删除依据资料成功!", {icon: 0});
+                                    }
+                                }
+                            });
+                        }
+                        top.layer.close(index);
+                    });
+                    return false;
+                }
+            </script>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                            <tr>
+                            <th>文件名称</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${concealProjectInfo.projectContentData.workAttachments}" var = "workAttachment" varStatus="status">
+                            <tr>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                </tbody>
+                    </table>
+                </div>
+            </div>
+            <c:if test="${concealProjectInfo.infoId !=null and concealProjectInfo.edit  == 'edit'}">
+                <div class="pull-right">
+                    <button id="btnSubmit" class="nav-btn nav-btn-add" type="submit" onclick="$('#edit').val('edit');beforeSubmit();"><i class="fa fa-chevron-up"></i> 提 交</button>
+                </div>
+            </c:if>
+            <div class="form-group layui-row page-end">
+            <br>
+            <br>
+            <br>
+            </div>
+        </form:form>
+    </div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    function contentDetailTypeShow(obj) {
+        var projectContentDataId = '${concealProjectInfo.projectContentData.id}';
+        $.ajax({
+            type:'post',
+            url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList2',
+            data:{
+                "achievementParentId":obj,
+                "type":2
+            },
+            success:function(data){
+                if(data.success) {
+                    if (null != obj && "" != obj) {
+                        if(null !=projectContentDataId && ""!= projectContentDataId) {
+                            $.ajax({
+                                type: 'post',
+                                url: getExistingDataOnPath(obj),
+                                data: {
+                                    "contentId": "${concealProjectInfo.projectContentData.id}"
+                                },
+                                success: function (tableTypeList) {
+                                    var dataList = data.body.list;
+                                    var newDataList = [];
+                                    var holdDataList = data.body.list;
+                                    if (0 != dataList.length) {
+                                        for (i in holdDataList) {
+                                            newDataList.push(holdDataList[i])
+                                        }
+                                    }
+                                    if (0 != newDataList.length && 0 !=tableTypeList.length){
+                                        for (i in newDataList) {
+                                            for (j in tableTypeList) {
+                                                if (newDataList[i].value == tableTypeList[j]) {
+                                                    var newData = {
+                                                        "name": newDataList[i].name,
+                                                        "value": newDataList[i].value,
+                                                        "selected": true
+                                                    }
+                                                    holdDataList.splice(i,1,newData);
+                                                }
+                                                modifyGetDetailsNum(tableTypeList);
+                                            }
+                                        }
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: holdDataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }else{
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: dataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }
+                                }
+                            })
+                        }else{
+                            xmSelect.render({
+                                el: '#contentDetailType',
+                                language: 'zn',
+                                data: data.body.list
+                            })
+                            $("#dataBodyList").val(data.body.list);
+                        }
+                    }else {
+                        xmSelect.render({
+                            el: '#contentDetailType',
+                            language: 'zn',
+                            data: data.body.list
+                        })
+                        $("#dataBodyList").val(data.body.list);
+                    }
+                }
+            }
+        })
+    }
+
+    var contentDetailType = xmSelect.render({
+        el: '#contentDetailType',
+        language: 'zn',
+        data: [
+        ]
+    })
+    
+    function getExistingDataOnPath(val) {
+        return "${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/getTableType";
+    }
+
+    function modifyGetDetailsNum(list){
+        $("#contentDetailType").empty();
+        console.log(list);
+        var val = $("#projectContentDataSign").val();
+        var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",'sign':list.toString(),'achievementParentId':val,view:"view"};
+        detailFlag=1;
+        $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+    }
+</script>
+</body>
+</html>

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/concealProject/concealProjectList.jsp

@@ -316,7 +316,7 @@
                 ].join('');
             } else if(d.condition ==2) {
                 return [
-                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/concealProject/form?project.id='+d.pid+'&contract.id='+d.id+'&contract.contractName='+d.contractName+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增隐蔽工程量\', \'${ctx}/project/concealProject/form?project.id='+d.pid+'&contract.id='+d.id+'&contract.contractName='+d.contractName+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
                 ].join('');
             } else if (d.condition ==3){
                 return [

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/concealProject/workContentForm.jsp

@@ -460,7 +460,7 @@
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>依据性资料明细</h2></div>
                 <div class="layui-item nav-btns">
-                    <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${concealProjectInfo.dictType}&id=${concealProjectInfo.id}&parentIds=${concealProjectInfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
+                    <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${concealProjectInfo.dictType}&project.id=${concealProjectInfo.project.id}&parentIds=${concealProjectInfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
 
                     <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
                                             cssClass="form-control" projectId="${concealProjectInfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>

+ 20 - 20
src/main/webapp/webpage/modules/workcontent/workFiveDirectionsAffirmList.jsp

@@ -64,64 +64,64 @@
                 <input id="fiveDirectionsAffirmList{{idx}}_costNum" subName="costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
             </td>
 
-            <td>
+            <td title="{{row.ownerPurchasingRequisitionNum}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_ownerPurchasingRequisitionNum" subName="ownerPurchasingRequisitionNum" value="{{row.ownerPurchasingRequisitionNum}}" type="text" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.ownerMaterialCode}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_ownerMaterialCode" subName="ownerMaterialCode" type="text" value="{{row.ownerMaterialCode}}"  class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.ownerMaterialDescription}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_ownerMaterialDescription" subName="ownerMaterialDescription" type="text" value="{{row.ownerMaterialDescription}}"  class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.ownerUnits}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_ownerUnits" subName="ownerUnits" type="text" value="{{row.ownerUnits}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.ownerTenderNum}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_ownerTenderNum" subName="ownerTenderNum" type="text"  value="{{row.ownerTenderNum}}" class="form-control contentDetail"/>
             </td>
 
-            <td>
+            <td title="{{row.designMaterialName}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_designMaterialName" subName="designMaterialName" type="text"    value="{{row.designMaterialName}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.designDrawingAmount}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_designDrawingAmount" subName="designDrawingAmount" type="text"  value="{{row.designDrawingAmount}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.designAttritionRate}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_designAttritionRate" subName="designAttritionRate" type="text"  value="{{row.designAttritionRate}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.designAffirmTotal}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_designAffirmTotal" subName="designAffirmTotal" type="text"  value="{{row.designAffirmTotal}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.designRemarks}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_designRemarks" subName="designRemarks" type="text"  value="{{row.designRemarks}}" class="form-control contentDetail"/>
             </td>
 
-            <td>
+            <td title="{{row.roadworkDrawingAmount}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_roadworkDrawingAmount" subName="roadworkDrawingAmount" type="text"  value="{{row.roadworkDrawingAmount}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.roadworkAttritionRate}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_roadworkAttritionRate" subName="roadworkAttritionRate" type="text"  value="{{row.roadworkAttritionRate}}" class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.roadworkDemandDosage}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_roadworkDemandDosage" subName="roadworkDemandDosage" type="text"  value="{{row.roadworkDemandDosage}}" class="form-control  contentDetail"/>
             </td>
-            <td>
-                <input lay-verify="date" placeholder="yyyy-MM-dd" id="fiveDirectionsAffirmList{{idx}}_roadworkDemandDate" subName="roadworkDemandDate" type="text" value="{{row.roadworkDemandDate}}"  class="form-control contentDetail"/>
+            <td title="{{row.roadworkDemandDateStr}}">
+                <input lay-verify="date" placeholder="yyyy-MM-dd" id="fiveDirectionsAffirmList{{idx}}_roadworkDemandDate" subName="roadworkDemandDate" type="text" value="{{row.roadworkDemandDateStr}}"  class="form-control contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.roadworkRemarks}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_roadworkRemarks" subName="roadworkRemarks" type="text"  value="{{row.roadworkRemarks}}" class="form-control  contentDetail"/>
             </td>
 
-            <td>
+            <td title="{{row.consultDrawingAmount}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_consultDrawingAmount" subName="consultDrawingAmount" type="text"  value="{{row.consultDrawingAmount}}" class="form-control  contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.consultAttritionRate}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_consultAttritionRate" subName="consultAttritionRate" type="text"  value="{{row.consultAttritionRate}}" class="form-control  contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.consultAuditTotal}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_consultAuditTotal" subName="consultAuditTotal" type="text"  value="{{row.consultAuditTotal}}" class="form-control  contentDetail"/>
             </td>
-            <td>
+            <td title="{{row.consultRemarks}}">
                 <input id="fiveDirectionsAffirmList{{idx}}_consultRemarks" subName="consultRemarks" type="text"  value="{{row.consultRemarks}}" class="form-control  contentDetail"/>
             </td>
 

+ 19 - 19
src/main/webapp/webpage/modules/workcontent/workFiveDirectionsAffirmListView.jsp

@@ -48,64 +48,64 @@
                                 ${status.index+1}
                         </td>
 
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.ownerPurchasingRequisitionNum}">
                                 ${row.ownerPurchasingRequisitionNum}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.ownerMaterialCode}">
                                 ${row.ownerMaterialCode}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.ownerMaterialDescription}">
                                 ${row.ownerMaterialDescription}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.ownerUnits}">
                                 ${row.ownerUnits}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.ownerTenderNum}">
                                 ${row.ownerTenderNum}
                         </td>
 
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.designMaterialName}">
                                 ${row.designMaterialName}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.designDrawingAmount}">
                                  ${row.designDrawingAmount}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.designAttritionRate}">
                                 ${row.designAttritionRate}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.designAffirmTotal}">
                                 ${row.designAffirmTotal}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.designRemarks}">
                                 ${row.designRemarks}
                         </td>
 
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title=" ${row.roadworkDrawingAmount}">
                                 ${row.roadworkDrawingAmount}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.roadworkAttritionRate}">
                                 ${row.roadworkAttritionRate}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.roadworkDemandDosage}">
                                 ${row.roadworkDemandDosage}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="<fmt:formatDate value="${row.roadworkDemandDate}" pattern="yyyy-MM-dd" />">
                                 <fmt:formatDate value="${row.roadworkDemandDate}" pattern="yyyy-MM-dd" />
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.roadworkRemarks}">
                                 ${row.roadworkRemarks}
                         </td>
 
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.consultDrawingAmount}">
                                 ${row.consultDrawingAmount}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.consultAttritionRate}">
                                 ${row.consultAttritionRate}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.consultAuditTotal}">
                                 ${row.consultAuditTotal}
                         </td>
-                        <td style='text-align:center;'>
+                        <td style='text-align:center;' title="${row.consultRemarks}">
                                 ${row.consultRemarks}
                         </td>