Browse Source

Merge remote-tracking branch 'origin/master'

user5 4 years ago
parent
commit
47a149a3d0
37 changed files with 740 additions and 103 deletions
  1. 15 0
      src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java
  2. 7 0
      src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java
  3. 6 6
      src/main/java/com/jeeplus/modules/projectAccessory/entity/CollectAccessoryInfo.java
  4. 9 4
      src/main/java/com/jeeplus/modules/projectAccessory/service/CollectAccessoryService.java
  5. 10 0
      src/main/java/com/jeeplus/modules/projectAccessory/web/CollectAccessoryController.java
  6. 20 0
      src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java
  7. 3 2
      src/main/java/com/jeeplus/modules/sys/security/FormAuthenticationFilter.java
  8. 1 1
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  9. 1 0
      src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java
  10. 9 0
      src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java
  11. 15 3
      src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java
  12. 46 1
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  13. 60 6
      src/main/resources/mappings/modules/collectAccessory/CollectAccessoryDao.xml
  14. 3 5
      src/main/resources/mappings/modules/projectAccessory/ProjectAccessoryDao.xml
  15. 7 3
      src/main/resources/mappings/modules/sys/WorkattachmentDao.xml
  16. 3 0
      src/main/resources/mappings/modules/workclientinfo/WorkClientAttachmentDao.xml
  17. 70 19
      src/main/webapp/static/oss/ossupload.js
  18. 11 4
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp
  19. 18 12
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp
  20. 11 6
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp
  21. 27 1
      src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp
  22. 8 1
      src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp
  23. 8 2
      src/main/webapp/webpage/modules/projectAccessory/selectCollectingAccessory.jsp
  24. 4 4
      src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp
  25. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp
  26. 23 2
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp
  27. 22 1
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp
  28. 4 4
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsModify.jsp
  29. 153 3
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp
  30. 2 2
      src/main/webapp/webpage/modules/sys/collectSelect.jsp
  31. 22 1
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp
  32. 23 1
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp
  33. 22 1
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormEdit.jsp
  34. 22 1
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordForm.jsp
  35. 25 4
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordModifyApply.jsp
  36. 25 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp
  37. 24 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

+ 15 - 0
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -40,6 +40,7 @@ import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
 import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
 import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
@@ -1496,6 +1497,20 @@ public class OaNotifyService extends CrudService<OaNotifyDao, OaNotify> {
         if(oaNotify==null)return;
         oaNotify.setOfficeList(this.queryOfficeList(oaNotify));
         oaNotify.setUserList(this.queryUserList(oaNotify));
+        WorkClientAttachment attchment = new WorkClientAttachment();
+        attchment.setAttachmentId(oaNotify.getId());
+        attchment.setAttachmentFlag("79");
+        List<WorkClientAttachment> attachments = workattachmentService.getAttachmentList(attchment);
+        for (WorkClientAttachment clientAttachment:attachments){
+            if (clientAttachment.getCollectFlag().equals("1")){
+                for (Workattachment workattachment:oaNotify.getWorkAttachments()){
+                    if (clientAttachment.getId().equals(workattachment.getId())){
+                        workattachment.setCollectFlag("1");
+                        break;
+                    }
+                }
+            }
+        }
     }
 
     private List<Office> queryOfficeList(OaNotify oaNotify) {

+ 7 - 0
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -17,12 +17,17 @@ import com.jeeplus.modules.oa.entity.OaNotifyComment;
 import com.jeeplus.modules.oa.entity.OaNotifyRecord;
 import com.jeeplus.modules.oa.entity.OaNotifyView;
 import com.jeeplus.modules.oa.service.OaNotifyService;
+import com.jeeplus.modules.projectAccessory.entity.CollectAccessoryInfo;
 import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
 import com.jeeplus.modules.pushinfo.service.PushinfoService;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.SystemService;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -62,6 +67,8 @@ public class OaNotifyController extends BaseController {
 	private PushinfoService pushinfoService;
 	@Autowired
 	protected WorkProjectNotifyService workProjectNotifyService;
+	@Autowired
+	protected WorkattachmentService workattachmentService;
 
 	@ModelAttribute
 	public OaNotify get(@RequestParam(required=false) String id) {

+ 6 - 6
src/main/java/com/jeeplus/modules/projectAccessory/entity/CollectAccessoryInfo.java

@@ -12,16 +12,16 @@ public class CollectAccessoryInfo extends DataEntity<CollectAccessoryInfo> {
     private String url;     //附件路径
     private String fileName;     //附件名称
     private String fileSize;     //附件大小
-    private String fileType;     //附件类型
     private String userId;  //收藏人
     private String type;    //收藏类型
     private String officeId;    //部门id
     private String companyId;    //公司id
     private String temporaryUrl;    //临时查看url
     private String uploadUserName;    //附件上传人
+    private String collectUserId;    //附件上传人Id
     private String createDateStr;    //收藏时间
     private Integer collectType;    //是否收藏收藏
-    private User collectUser;    //收藏
+    private User collectUser;    //上传
     private Integer officeFlag;     //部门判定
     private Integer companyFlag;    //公司判定
     private Integer individualFlag;    //个人判定
@@ -147,11 +147,11 @@ public class CollectAccessoryInfo extends DataEntity<CollectAccessoryInfo> {
         this.fileSize = fileSize;
     }
 
-    public String getFileType() {
-        return fileType;
+    public String getCollectUserId() {
+        return collectUserId;
     }
 
-    public void setFileType(String fileType) {
-        this.fileType = fileType;
+    public void setCollectUserId(String collectUserId) {
+        this.collectUserId = collectUserId;
     }
 }

+ 9 - 4
src/main/java/com/jeeplus/modules/projectAccessory/service/CollectAccessoryService.java

@@ -8,6 +8,7 @@ import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -62,10 +63,11 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
                     }
                 }
             }
+
         }else{
-            for (CollectAccessoryInfo officeInfo: officeList) {
-                for (CollectAccessoryInfo info: list) {
-                    if(officeInfo.getUrl().equals(info.getUrl())){
+            for (CollectAccessoryInfo officeInfo : officeList) {
+                for (CollectAccessoryInfo info : list) {
+                    if (officeInfo.getUrl().equals(info.getUrl())) {
                         info.setOfficeFlag(1);
                         break;
                     }
@@ -80,7 +82,6 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
                 }
             }
         }
-
         workattachmentService.attachmentManageByUrlOnCollect(list);
         page.setList(list);
         return page;
@@ -210,4 +211,8 @@ public class CollectAccessoryService extends CrudService<CollectAccessoryDao, Co
         }
         return saveResult;
     }
+    @Transactional(readOnly = false)
+    public void deleteByLogic(CollectAccessoryInfo collectAccessoryInfo){
+        dao.deleteByLogic(collectAccessoryInfo);
+    }
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/projectAccessory/web/CollectAccessoryController.java

@@ -169,4 +169,14 @@ public class CollectAccessoryController extends BaseController {
         }
         return map;
     }
+
+    /**
+     * 个人附件信息删除
+     */
+    @RequestMapping(value = "delete")
+    public Object delete(CollectAccessoryInfo collectAccessoryInfo, Model model) {
+        //删除收藏附件信息
+        collectAccessoryService.deleteByLogic(collectAccessoryInfo);
+        return "redirect:"+Global.getAdminPath()+"/collectAccessory/collectAccessory/?repage";
+    }
 }

+ 20 - 0
src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java

@@ -29,6 +29,10 @@ public class Workattachment extends DataEntity<Workattachment> {
 	private Integer quoteResult;//是否为引用文件判定
 	private String quoteId;//被引用文件id
 
+	private String collectFlag;		// 收藏判定
+	private String fileSize;	//文件大小
+
+
 	public String getDivIdType() {
 		return divIdType;
 	}
@@ -137,4 +141,20 @@ public class Workattachment extends DataEntity<Workattachment> {
 	public void setTemporaryUrl(String temporaryUrl) {
 		this.temporaryUrl = temporaryUrl;
 	}
+
+	public String getCollectFlag() {
+		return collectFlag;
+	}
+
+	public void setCollectFlag(String collectFlag) {
+		this.collectFlag = collectFlag;
+	}
+
+	public String getFileSize() {
+		return fileSize;
+	}
+
+	public void setFileSize(String fileSize) {
+		this.fileSize = fileSize;
+	}
 }

+ 3 - 2
src/main/java/com/jeeplus/modules/sys/security/FormAuthenticationFilter.java

@@ -60,9 +60,9 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc.
 			String randomCode = httpRequest.getParameter("randomCode");
 			//String sessionType = httpRequest.getParameter("type");
 			User user = UserUtils.getByLoginNameNoSesion(username);
-
-			if (password==null || user==null){
+			if (password==null || StringUtils.isBlank(user.getId())){
 				password = "";
+				loginPassword = "";
 			}else{
 				password = SystemService.encrypeString(password);
 			}
@@ -77,6 +77,7 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc.
 						password =user.getPasswordRemake();
 					}else{
 						password = "";
+						loginPassword="";
 					}
 				}else {
 					password = "";

+ 1 - 1
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -368,7 +368,7 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 		//遍历附件信息,判定改附件信息是否被收藏
 		for (WorkClientAttachment info: list) {
 			cAInfo.setUrl(info.getUrl());
-			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo(cAInfo);
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo1(cAInfo);
 			if(null != collectAccessoryInfo){
 				info.setCollectFlag("1");
 			}else{

+ 1 - 0
src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java

@@ -189,6 +189,7 @@ public class WorkattachmentController extends BaseController {
 			map.put("attachmentFlag", workattachment.getAttachmentFlag());
 			map.put("id", workattachment.getId());
 			map.put("divIdType", workattachment.getDivIdType());
+			map.put("fileSize", workattachment.getFileSize());
 		}catch (Exception e){
 			map.put("status","Fail");
 		}

+ 9 - 0
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java

@@ -25,6 +25,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	private String projectId; //项目id
 	private String temporaryUrl;		// 附件地址(临时地址)
 	private String collectFlag;		// 收藏判定
+	private String fileSize;	//文件大小
 
 	public WorkClientAttachment() {
 		super();
@@ -118,4 +119,12 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setCollectFlag(String collectFlag) {
 		this.collectFlag = collectFlag;
 	}
+
+	public String getFileSize() {
+		return fileSize;
+	}
+
+	public void setFileSize(String fileSize) {
+		this.fileSize = fileSize;
+	}
 }

+ 15 - 3
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -955,7 +955,15 @@ public class WorkFullManageController extends BaseController {
 
 		//获取合同信息
 		WorkContractInfo workContractInfo = workContractInfoService.get(ruralProjectRecords.getWorkContractInfo().getId());
-
+		//无合同状态下,获取委托方的名称
+		if (workContractInfo == null) {
+			projectRecordsService.queryLinkmanInfos(ruralProjectRecords);
+			if (ruralProjectRecords.getWorkClientLinkmanList() != null && ruralProjectRecords.getWorkClientLinkmanList().size() > 0) {
+				WorkClientLinkman linkman = ruralProjectRecords.getWorkClientLinkmanList().get(0);
+				workContractInfo = new WorkContractInfo();
+				workContractInfo.setClient(linkman.getClientId());
+			}
+		}
 		List<RuralReportConsultant> consultants = Lists.newArrayList();
 		//将自己添加到咨询员数据中
 		//根据用户查询技能信息(项目负责人信息)
@@ -1098,7 +1106,7 @@ public class WorkFullManageController extends BaseController {
 		if(StringUtils.isBlank(projectReportData.getNumber())){
 			data.put("number","");
 		}else{
-			data.put("number",projectReportData.getNumber());
+			data.put("number",projectReportData.getNumber()+" 号");
 		}
 		data.put("projectName",ruralProjectRecords.getProjectName());
 		//咨询类别
@@ -1110,7 +1118,11 @@ public class WorkFullManageController extends BaseController {
 			}else{
 				data.put("entrustUnit","");
 			}
-			data.put("contractNumber",workContractInfo.getContractNum());
+			if (StringUtils.isNotBlank(workContractInfo.getContractNum())){
+				data.put("contractNumber",workContractInfo.getContractNum());
+			}else{
+				data.put("contractNumber","");
+			}
 		}else{
 			data.put("entrustUnit","");
 			data.put("contractNumber","");

+ 46 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -2524,6 +2524,7 @@ public class WorkProjectNotifyController extends BaseController {
 							projectcontentinfo.setChargeCriterionList(chargeCriterionList);
 						}
 					}
+					RuralProjectRecords projectRecordPlans=this.planView(projectcontentinfo.getProject().getId());
 					model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
 					model.addAttribute("projectId", projectcontentinfo.getProject().getId());
 					model.addAttribute("id", projectcontentinfo.getId());
@@ -2533,6 +2534,7 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("consultantCount", consultants.size());
 					model.addAttribute("subProjectInfos", subProjectInfos);
 					model.addAttribute("workContractInfo", workContractInfo);
+					model.addAttribute("projectRecordPlans", projectRecordPlans);
 					WorkReviewAudit workReviewAudit = new WorkReviewAudit();
 					String type = "";
 					if ("master".equals(act.getTaskDefKey())) {
@@ -4731,6 +4733,49 @@ public class WorkProjectNotifyController extends BaseController {
 		WorkContractInfo workContractInfo = workContractInfoService.get(projectRecords.getWorkContractInfo().getId());
 		return workContractInfo;
 	}
-
+	//获取项目计划
+	public RuralProjectRecords planView(String projectId) {
+		//获取项目信息
+		//如果没有id则为新增 添加创建人信息和当前创建时间信息
+		RuralProjectRecords projectRecords=new RuralProjectRecords();
+		if (StringUtils.isNotBlank(projectId)) {
+			//projectRecords = ruralProjectRecordsService.get(projectRecords.getId());
+			projectRecords = ruralProjectRecordsService.getMasters(projectId);
+		}else {
+			projectRecords.setCreateBy(UserUtils.getUser());
+			projectRecords.setCreateDate(new Date());
+		}
+		ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+		//将项目id放入项目计划表中
+		projectPlanInfo.setProjectId(projectRecords.getId());
+		//获取项目计划信息
+		List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+		if(projectPlanList.size() == 0){
+			//获取项目计划信息
+			List<MainDictDetail> mainDictList = DictUtils.getMainDictList("projectPlan");
+			if(mainDictList.size()>0){
+				for (MainDictDetail mainDict : mainDictList) {
+					ProjectPlanInfo projectPlan = new ProjectPlanInfo();
+					projectPlan.setProjectStage(mainDict.getLabel());
+					//将项目负责人添加到展示栏
+					if(null != projectRecords.getProjectLeaders()) {
+						projectPlan.setRemindName(projectRecords.getProjectLeaders().get(0).getName());
+						projectPlan.setRemindId(projectRecords.getProjectLeaders().get(0).getId());
+					}
+					//将项目等级人信息添加到完成人控件中
+					User user = UserUtils.get(projectRecords.getCreateBy().getId());
+					projectPlan.setFinishId(user.getId());
+					projectPlan.setFinishName(user.getName());
+					projectPlanList.add(projectPlan);
+				}
+			}
+		}
+		//获取 项目计划附件信息
+		List<WorkClientAttachment> workAttachmentList = projectPlanService.getWorkAttachment(projectRecords.getId());
+		projectRecords.setProjectPlanList(projectPlanList);
+		projectRecords.setWorkAttachments(workAttachmentList);
+		projectRecords.setUploadMode(uploadMode);
+		return projectRecords;
+	}
 
 }

+ 60 - 6
src/main/resources/mappings/modules/collectAccessory/CollectAccessoryDao.xml

@@ -18,8 +18,8 @@
 		a.collect_type  AS "collectType",
 		a.collect_user_id AS "collectUser.id",
 		a.file_size AS "fileSize",
-		su.name as "createBy.name",
-		suc.name as "collectUser.name"
+		su.name as "collectUser.name",
+		suc.name as "createBy.name"
 	</sql>
 
 	<sql id="joinColumns">
@@ -46,6 +46,24 @@
             <if test="fileName!=null and fileName != ''">
                 and a.file_name like concat('%',#{fileName},'%')
             </if>
+			<if test="collectUserId!=null and collectUserId != ''">
+                and a.collect_user_id =#{collectUserId}
+            </if>
+			<if test="type==1">
+				<if test="createBy.id!=null and createBy.id!=''">
+					and a.create_by = #{createBy.id}
+				</if>
+			</if>
+			<if test="type==2">
+				<if test="createBy.office.id!=null and createBy.office.id!=''">
+					and a.office_id = #{createBy.office.id}
+				</if>
+			</if>
+			<if test="type==3">
+				<if test="createBy.company.id!=null and createBy.company.id!=''">
+					and a.company_id = #{createBy.company.id}
+				</if>
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -66,6 +84,24 @@
 			<if test="fileName!=null and fileName != ''">
 				and a.file_name like concat('%',#{fileName},'%')
 			</if>
+			<if test="collectUserId!=null and collectUserId != ''">
+				and a.collect_user_id =#{collectUserId}
+			</if>
+			<if test="type==1">
+				<if test="createBy.id!=null and createBy.id!=''">
+					and a.create_by = #{createBy.id}
+				</if>
+			</if>
+			<if test="type==2">
+				<if test="createBy.office.id!=null and createBy.office.id!=''">
+					and a.office_id = #{createBy.office.id}
+				</if>
+			</if>
+			<if test="type==3">
+				<if test="createBy.company.id!=null and createBy.company.id!=''">
+					and a.company_id = #{createBy.company.id}
+				</if>
+			</if>
 		</where>
 	</select>
 
@@ -85,8 +121,7 @@
 		  company_id,
 		  collect_type,
 		  collect_user_id,
-		  file_size,
-		  file_type
+		  file_size
 		)
 		values
 		  (
@@ -104,8 +139,7 @@
 			#{companyId},
 			#{collectType},
 			#{collectUser.id},
-			#{fileSize},
-			#{fileType}
+			#{fileSize}
 		  )
 	</insert>
 
@@ -118,6 +152,21 @@
 		<include refid="joinColumns"/>
 		<where>
 			a.type = #{type} and a.del_flag = 0
+			<if test="type==1">
+				<if test="createBy.id!=null and createBy.id!=''">
+					and a.create_by = #{createBy.id}
+				</if>
+			</if>
+			<if test="type==2">
+				<if test="createBy.office.id!=null and createBy.office.id!=''">
+					and a.office_id = #{createBy.office.id}
+				</if>
+			</if>
+			<if test="type==3">
+				<if test="createBy.company.id!=null and createBy.company.id!=''">
+					and a.company_id = #{createBy.company.id}
+				</if>
+			</if>
 		</where>
 		ORDER BY a.create_date asc,a.file_name asc
 	</select>
@@ -132,4 +181,9 @@
 		</where>
 		ORDER BY a.create_date asc,a.file_name asc
 	</select>
+	<update id="deleteByLogic">
+		UPDATE work_collect_accessory SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
 </mapper>

+ 3 - 5
src/main/resources/mappings/modules/projectAccessory/ProjectAccessoryDao.xml

@@ -225,8 +225,7 @@
 		  company_id,
 		  collect_type,
 		  collect_user_id,
-		  file_size,
-		  file_type
+		  file_size
 		)
 		values
 		  (
@@ -243,9 +242,8 @@
 			#{officeId},
 			#{companyId},
 			#{collectType},
-			#{collectUser.id},
-			#{fileSize},
-			#{fileType}
+			#{collectUserId},
+			#{fileSize}
 		  )
 	</insert>
 

+ 7 - 3
src/main/resources/mappings/modules/sys/WorkattachmentDao.xml

@@ -18,6 +18,7 @@
 		a.company_id AS "companyId",
 		a.attachment_flag AS "attachmentFlag",
 		a.div_id_type AS "divIdType",
+		a.file_size AS "fileSize",
 		createBy.name AS "createBy.name"
 	</sql>
 
@@ -52,12 +53,13 @@
 		a.company_id AS "companyId",
 		a.attachment_flag AS "attachmentFlag",
 		a.div_id_type AS "divIdType",
+		a.file_size AS "fileSize",
 		createByName AS "createBy.name",
 		quoteResult
 		from(
 		select
 		p.id ,p.create_by ,p.create_date ,p.update_by ,p.update_date ,p.remarks ,p.del_flag ,
-		p.url,p.type,p.attachment_id,p.attachment_user,p.attachment_name,p.company_id,p.attachment_flag,p.div_id_type,
+		p.url,p.type,p.attachment_id,p.attachment_user,p.attachment_name,p.company_id,p.attachment_flag,p.div_id_type,p.file_size,
 		createBy.name AS "createByName",0 as "quoteResult"
 		from work_attachment p
 		LEFT JOIN sys_user createBy on createBy.id = p.create_by
@@ -266,7 +268,8 @@
 			attachment_name,
 			company_id,
 			attachment_flag,
-			div_id_type
+			div_id_type,
+		    file_size
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -282,7 +285,8 @@
 			#{attachmentName},
 			#{companyId},
 			#{attachmentFlag},
-			#{divIdType}
+			#{divIdType},
+		    #{fileSize}
 		)
 	</insert>
 

+ 3 - 0
src/main/resources/mappings/modules/workclientinfo/WorkClientAttachmentDao.xml

@@ -17,6 +17,7 @@
         a.attachment_name AS "attachmentName",
         a.attachment_flag AS "attachmentFlag",
         a.company_id AS "companyId",
+        a.file_size AS "fileSize",
         createBy.name AS "createBy.name"
     </sql>
 
@@ -95,6 +96,7 @@
         <if test="projectId != null and projectId != ''">
             ,project_id
         </if>
+        ,file_size
         ) VALUES (
         #{id},
         #{createBy.id},
@@ -113,6 +115,7 @@
         <if test="projectId != null and projectId != ''">
             ,#{projectId}
         </if>
+        ,#{fileSize}
         )
     </insert>
 

+ 70 - 19
src/main/webapp/static/oss/ossupload.js

@@ -207,9 +207,9 @@ function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divI
                                         if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                                             str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                                         }else if(isContains("pdf",data.lowerType)){
-                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',1)">'+data.attachmentName+'</a>';
                                         }else {
-                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',2)">'+data.attachmentName+'</a>';
                                         }
                                     }
                                 });
@@ -218,9 +218,9 @@ function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divI
                                 if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                                     str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                                 }else if(isContains("pdf",lowerType)){
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',1)">'+data.attachmentName+'</a>';
                                 }else {
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',2)">'+data.attachmentName+'</a>';
                                 }
                             }
                             str = str +'</td>'+
@@ -242,7 +242,7 @@ function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divI
                                 }else{
                                     str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
                                 }
-                                str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                                str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
                                 '</div>' +
                                 '</td>'+
                                 '</tr>';
@@ -266,12 +266,27 @@ function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divI
         }
     })
 };
-
+function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize) {
+    $.ajax({
+        type: "post",
+        url: url,
+        data: {"url": fileUrl, "type": "1", "collectType": 1, "collectUserId": uploadUserId,"fileSize":fileSize},
+        success: function (data) {
+            if (data.success) {
+                $(obj).hide()
+                parent.layer.msg(data.str, {icon: 1});
+            } else {
+                parent.layer.msg(data.str, {icon: 2});
+            }
+        }
+    });
+}
 function multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
     console.log("-----------------------start");
     console.log("-----------------------"+realPath);
     var fileUrl=file.linUrl;
     var url=file.url;
+    var fileSize=file.fileSize;
     file.fileName.replace(" ","")
     file.fileName.replace(/—/g,"")
     var fileName = file.fileName;
@@ -322,11 +337,11 @@ function multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentF
         if(cpt == 1)
             fBmultitestFlag(client,storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://dmtest-test.oss-cn-shanghai.aliyuncs.com', result.AliyunUrl),divId,size, cpt,idx,prefix,currentUser);
         else
-            multitestCollection(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://dmtest-test.oss-cn-shanghai.aliyuncs.com', result.AliyunUrl),divId,size, cpt,fileUrl);
+            multitestCollection(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://dmtest-test.oss-cn-shanghai.aliyuncs.com', result.AliyunUrl),divId,size, cpt,fileUrl,fileSize);
     })
 
 };
-function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,fileUrl) {
+function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,fileUrl,fileSize) {
 
     var names =  storeAs.split("/");
     var name = names[names.length-1];
@@ -361,6 +376,7 @@ function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFl
                 "attachmentName":file['name'],
                 "attachmentId":attachmentId,
                 "attachmentFlag":attachmentFlag,
+                "fileSize":fileSize,
                 "url":storeAs
             },
             success:function(data){
@@ -385,9 +401,9 @@ function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFl
                                 if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                                     str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                                 }else if(isContains("pdf",lowerType)){
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',1)">'+data.attachmentName+'</a>';
                                 }else {
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',2)">'+data.attachmentName+'</a>';
                                 }
                             }
                         });
@@ -396,9 +412,9 @@ function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFl
                         if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                             str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                         }else if(isContains("pdf",lowerType)){
-                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',1)">'+data.attachmentName+'</a>';
                         }else {
-                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',2)">'+data.attachmentName+'</a>';
                         }
                     }
                     str = str +'</td>'+
@@ -412,6 +428,7 @@ function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFl
                         '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
                         '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
                         '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                        '<input name="workAttachments['+lenght+'].fileSize" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.fileSize+'"/>'+
                         '</td>'+
                         '<td class="op-td">'+
                         '<div class="op-btn-box">';
@@ -420,7 +437,7 @@ function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFl
                     }else{
                         str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
                     }
-                    str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                    str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
                         /*'<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/ossCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>'+*/
                         '</div>' +
                         '</td>'+
@@ -662,6 +679,7 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                 "attachmentName":file['name'],
                 "attachmentId":attachmentId,
                 "attachmentFlag":attachmentFlag,
+                "fileSize":file['size'],
                 "url":"/"+storeAs
             },
             success:function(data){
@@ -686,9 +704,9 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                                 if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                                     str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                                 }else if(isContains("pdf",lowerType)){
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',1)">'+data.attachmentName+'</a>';
                                 }else {
-                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',2)">'+data.attachmentName+'</a>';
                                 }
                             }
                         });
@@ -697,9 +715,9 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                         if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
                             str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
                         }else if(isContains("pdf",lowerType)){
-                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',1)">'+data.attachmentName+'</a>';
                         }else {
-                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',2)">'+data.attachmentName+'</a>';
                         }
                     }
                     str = str +'</td>'+
@@ -713,6 +731,7 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                         '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
                         '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
                         '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                        '<input name="workAttachments['+lenght+'].fileSize" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.fileSize+'"/>'+
                         '</td>'+
                         '<td class="op-td">'+
                         '<div class="op-btn-box">';
@@ -725,8 +744,8 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                     }else{
                         str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
                     }
-                    str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
-                        '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/ossCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>'+
+                    str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                        '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>'+
                         '</div>' +
                         '</td>'+
                         '</tr>';
@@ -741,6 +760,22 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
         console.log(err);
     });
 };
+function ossCollectingAccessory(obj,url,id,uploadUserId){
+    $.ajax({
+        type:"post",
+        url:url,
+        data: {"id":id,"type":"1","collectType":1,"collectUserId":uploadUserId},
+        success:function(data){
+            if(data.success){
+                parent.layer.msg(data.str,{icon:1});
+                $(obj).hide()
+            }else {
+                parent.layer.msg(data.str,{icon:2});
+            }
+        }
+    });
+}
+
 /*
 function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
     var formdata = new FormData();
@@ -989,6 +1024,22 @@ function deleteFileFromAliyun(obj,deleteUrl,addFile,divId){
         }
     });
 }
+function deleteFileFromAliyun1(obj,deleteUrl,addFile,divId){
+    /*console.log("---------------------------------:");
+    console.log(divId);
+    console.log("---------------------------------");*/
+    if (divId==null || divId== undefined || divId == ''){
+        divId = "_attachment";
+    }
+    var fileDiv = divId.substr(1,divId.length)+"_file";
+    /*console.log("---------------------------------:");
+    console.log(fileDiv);
+    console.log("---------------------------------");*/
+    $("#"+fileDiv).val("");
+    parent.layer.msg('删除成功',{icon:1});
+    $(obj).parent().parent().parent().remove();
+    $("#"+addFile).hide();
+}
 function fileCollectAccessory(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
     file.name.replace(" ","")
     file.name.replace(/—/g,"")

+ 11 - 4
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp

@@ -262,6 +262,13 @@
 								<form:input path="fileName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
 							</div>
 						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">上传人:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="collectUserId" name="collectUserId" value="${collectAccessoryInfo.collectUserId}" labelName="uploadUserName" labelValue="${collectAccessoryInfo.uploadUserName}" cssStyle="background-color: #fff"
+												title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
 						<div class="layui-item athird">
 							<div class="input-group">
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -321,17 +328,17 @@
                 			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
 							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.url +"',2)\">" + d.fileName + "</a>";
 							}
 						}
                     }}

+ 18 - 12
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp

@@ -245,6 +245,13 @@
 								<form:input path="fileName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
 							</div>
 						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">上传人:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="collectUserId" name="collectUserId" value="${collectAccessoryInfo.collectUserId}" labelName="uploadUserName" labelValue="${collectAccessoryInfo.uploadUserName}" cssStyle="background-color: #fff"
+																	 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
 						<div class="layui-item athird">
 							<div class="input-group">
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -315,22 +322,22 @@
                 			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
 							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',2)\">" + d.fileName + "</a>";
 							}
 						}
                     }}
-				,{field:'createName',align:'center', title: '上传人',  width:150}
-				,{field:'collectUserName',align:'center', title: '收藏人',  width:150}
+				,{field:'collectUserName',align:'center', title: '上传人',  width:150}
+				,{field:'createName',align:'center', title: '收藏人',  width:150}
 				,{field:'createDate',align:'center', title: '上传/收藏时间',  width:150}
                 ,{field:'op',align:'center',title:"操作",width:200,templet:function(d){
                         ////对操作进行初始化
@@ -352,21 +359,20 @@
                 <c:if test="${ not empty page.list}">
                 <c:forEach items="${page.list}" var="collectAccessoryInfo" varStatus="index">
                 <c:if test="${index.index != 0}">,</c:if>
-                {
+				{
                     "index":"${index.index+1}"
                     ,"id":"${collectAccessoryInfo.id}"
                     ,"fileName":"${collectAccessoryInfo.fileName}"
                     ,"temporaryUrl":"${collectAccessoryInfo.temporaryUrl}"
                     ,"url":"${collectAccessoryInfo.url}"
                     ,"uploadMode":"${collectAccessoryInfo.uploadMode}"
-                    ,"createName":"${collectAccessoryInfo.createBy.name}"
-                    ,"collectUserName":"${collectAccessoryInfo.collectUser.name}"
+                    ,"createName":"${collectAccessoryInfo.createBy.name}"//收藏人
+                    ,"collectUserName":"${collectAccessoryInfo.collectUser.name}"//上传人
 					,"officeFlag":"${collectAccessoryInfo.officeFlag}"
 					,"companyFlag":"${collectAccessoryInfo.companyFlag}"
 					,"createDate":"<fmt:formatDate value="${collectAccessoryInfo.createDate}" pattern="yyyy-MM-dd"/>"
-
-                }
-                </c:forEach>
+				}
+				</c:forEach>
                 </c:if>
             ]
         });

+ 11 - 6
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp

@@ -263,6 +263,13 @@
 								<form:input path="fileName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
 							</div>
 						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">上传人:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="collectUserId" name="collectUserId" value="${collectAccessoryInfo.collectUserId}" labelName="uploadUserName" labelValue="${collectAccessoryInfo.uploadUserName}" cssStyle="background-color: #fff"
+												title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
 						<div class="layui-item athird">
 							<div class="input-group">
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -322,17 +329,17 @@
                 			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.temporaryUrl +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
 							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
 							}else if(d.fileName.indexOf('pdf') != -1){
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%','1')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
-								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '" + d.url +"','95%', '95%')\">" + d.fileName + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',2)\">" + d.fileName + "</a>";
 							}
 						}
                     }}
@@ -347,7 +354,6 @@
 						}
                 	xml+="</div>"
                         return xml;
-
                     }}
             ]]
             ,data: [
@@ -365,7 +371,6 @@
                     ,"collectUserName":"${collectAccessoryInfo.collectUser.name}"
 					,"individualFlag":"${collectAccessoryInfo.individualFlag}"
 					,"createDate":"<fmt:formatDate value="${collectAccessoryInfo.createDate}" pattern="yyyy-MM-dd"/>"
-
                 }
                 </c:forEach>
                 </c:if>

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

@@ -120,6 +120,25 @@
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
             }
         }
+        function insertTitleCollection(tValue){
+            var list = "${oaNotify.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = tValue;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "107";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "oaNotify";
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithStsCollection(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
+            }
+        }
 
         function changeUser(ids,names,parents) {
             var split = ids.split(',');
@@ -367,6 +386,10 @@
                 <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>
+                    <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                        name="linkman.id"  title="选择资料库"
+                                        cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                        searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
                 </div>
                 <div id="addFile_attachment" style="display: none" class="upload-progress">
                     <span id="fileName_attachment" ></span>
@@ -386,7 +409,7 @@
                             <th>文件预览</th>
                             <th>上传人</th>
                             <th>上传时间</th>
-                            <th width="150px">操作</th>
+                            <th width="200px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
@@ -461,6 +484,9 @@
                                         <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
                                             <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
                                         </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

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

@@ -360,6 +360,10 @@
                 <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>
+                    <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                        name="linkman.id"  title="选择资料库"
+                                        cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                        searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
                 </div>
                 <div id="addFile_attachment" style="display: none" class="upload-progress">
                     <span id="fileName_attachment" ></span>
@@ -379,7 +383,7 @@
                             <th>文件预览</th>
                             <th>上传人</th>
                             <th>上传时间</th>
-                            <th width="150px">操作</th>
+                            <th width="200px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
@@ -456,6 +460,9 @@
                                         <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
                                             <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
                                         </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1 && workClientAttachment.collectFlag!=''}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

+ 8 - 2
src/main/webapp/webpage/modules/projectAccessory/selectCollectingAccessory.jsp

@@ -10,8 +10,15 @@
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
 	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+			return false;
+		}
 		$(document).ready(function() {
-
 			layui.use(['dropdown', 'util','form', 'layer'], function () {
 				var form = layui.form;
 				var dropdown = layui.dropdown
@@ -20,7 +27,6 @@
 						,$ = layui.jquery;
 			});
 		});
-
 		function getSelectedItem() {
 			radio=0;
 			var reimburseRemarks = $("#reimburseRemarks").val();

+ 4 - 4
src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp

@@ -193,7 +193,7 @@
 							<th width="50%">文件预览</th>
 							<th>上传人</th>
 							<th>上传时间</th>
-							<th width="150px">操作</th>
+							<th width="200px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -262,7 +262,7 @@
 											</c:otherwise>
 										</c:choose>
 										<c:if test="${workClientAttachment.collectFlag != 1}">
-											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
 										</c:if>
 									</div>
 								</td>
@@ -277,11 +277,11 @@
 </div>
 <script>
 
-	function collectingAccessory(obj,url,fileUrl){
+		function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize){
 		$.ajax({
 			type:"post",
 			url:url,
-			data: {"url":fileUrl,"type":"1","collectType":1},
+			data: {"url":fileUrl,"type":"1","collectType":1,"collectUserId":uploadUserId,"fileSize":fileSize},
 			success:function(data){
 				if(data.success){
 					$(obj).hide()

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

@@ -538,7 +538,7 @@
 															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
 														</c:when>
 														<c:otherwise>
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">>${workClientAttachment.attachmentName}</a></td>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
 														</c:otherwise>
 													</c:choose>
 												</c:otherwise>

+ 23 - 2
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp

@@ -68,7 +68,20 @@
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
-
+        function insertTitleCollection(tValue){
+            var files = tValue;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "131";
+                console.log(file);
+                var timestamp = new Date().getTime();
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+            }
+        }
 
         laydate.render({
             elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
@@ -262,6 +275,10 @@
                 <div class="layui-item nav-btns">
                     <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
                     <%--<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/project/projectPlanConsulting/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>--%>
+                    <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                        name="linkman.id"  title="选择资料库"
+                                        cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                        searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
                 </div>
                 <div id="addFile_attachment" style="display: none" class="upload-progress">
                     <span id="fileName_attachment" ></span>
@@ -281,7 +298,7 @@
                             <th width="25%">文件</th>
                             <th width="25%">上传人</th>
                             <th width="25%">上传时间</th>
-                            <th width="150px">操作</th>
+                            <th width="200px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
@@ -355,6 +372,10 @@
                                             </c:otherwise>
                                         </c:choose>
                                         <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
+
                                     </div>
                                 </td>
                             </tr>

+ 22 - 1
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp

@@ -68,6 +68,20 @@
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
+        function insertTitleCollection(tValue){
+            var files = tValue;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "131";
+                console.log(file);
+                var timestamp = new Date().getTime();
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+            }
+        }
 
 
         laydate.render({
@@ -262,6 +276,10 @@
                 <div class="layui-item nav-btns">
                     <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
                     <%--<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/project/projectPlanCost/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>--%>
+                    <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                        name="linkman.id"  title="选择资料库"
+                                        cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                        searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
                 </div>
                 <div id="addFile_attachment" style="display: none" class="upload-progress">
                     <span id="fileName_attachment" ></span>
@@ -281,7 +299,7 @@
                             <th width="25%">文件</th>
                             <th width="25%">上传人</th>
                             <th width="25%">上传时间</th>
-                            <th width="150px">操作</th>
+                            <th width="200px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
@@ -355,6 +373,9 @@
                                             </c:otherwise>
                                         </c:choose>
                                         <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

+ 4 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsModify.jsp

@@ -443,10 +443,10 @@
                                             <c:otherwise>
                                                 <c:choose>
                                                     <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
                                                     </c:when>
                                                     <c:otherwise>
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
                                                     </c:otherwise>
                                                 </c:choose>
                                             </c:otherwise>
@@ -464,10 +464,10 @@
                                             <c:otherwise>
                                                 <c:choose>
                                                     <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a></td>
+                                                        <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
                                                     </c:when>
                                                     <c:otherwise>
-                                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${workClientAttachment.attachmentName}</a></td>
+                                                        <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
                                                     </c:otherwise>
                                                 </c:choose>
                                             </c:otherwise>

+ 153 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp

@@ -142,7 +142,6 @@
                 }
             });
         }
-
 	</script>
 </head>
 <body >
@@ -186,6 +185,7 @@
 							<li><a>子项目列表</a><span class="hide">subProjectInfo</span></li>
 							<li><a>合同信息</a><span class="hide">workContractInfo</span></li>
 							<li><a>客户信息</a><span class="hide">workClientInfo</span></li>
+							<li><a>项目计划信息</a><span class="hide">planView</span></li>
 						</ul>
 					</div>
 				</div>
@@ -875,7 +875,7 @@
 								<div class="form-group-label"><h2><span class="require-item">*</span>项目组成员</h2></div>
 								<div class="layui-item layui-col-sm12 lw6">
 									<div class="layui-item nav-btns">
-										<table id="bankinfo" class="table table-bordered table-condensed can-edit">
+										<table id="bankinfo1" class="table table-bordered table-condensed can-edit">
 											<thead>
 											<tr>
 												<th width="60px">编号</th>
@@ -1287,7 +1287,7 @@
 									<label class="layui-form-label">开户行信息:</label>
 									<div class="layui-input-block">
 
-										<table id="bankinfo" class="table table-bordered table-condensed details">
+										<table id="bankinfo2" class="table table-bordered table-condensed details">
 											<thead>
 											<tr>
 												<th width="80px">序号</th>
@@ -1361,6 +1361,156 @@
 						</c:otherwise>
 					</c:choose>
 				</div>
+				<div class="form-group layui-row first hide" id="planView">
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>项目计划信息</h2></div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.projectName}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block">
+								<div class="input-group">
+									<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.projectId}"/>
+								</div>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">创建人:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.createBy.name}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">创建日期:</label>
+							<div class="layui-input-block">
+								<input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecordPlans.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+							</div>
+						</div>
+					</div>
+
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>项目计划列表</h2></div>
+						<div class="layui-item layui-col-sm12 lw7">
+							<div class="layui-item nav-btns">
+								<table id="bankinfo3" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th >任务阶段</th>
+										<th >计划开始时间</th>
+										<th >计划结束时间</th>
+										<th >提醒人</th>
+										<th >完成人</th>
+									</tr>
+									</thead>
+									<tbody id="projectPlanList">
+										<c:forEach items="${projectRecordPlans.projectPlanList}" var="plan">
+											<tr>
+												<td>
+													<input readonly="readonly" value="${plan.projectStage}" type="text" class="form-control contentDetail"/>
+												</td>
+
+												<td>
+													<input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" readonly="readonly" type="text" value="${plan.beginDate}"  class="form-control required datetime"/>
+												</td>
+												<td>
+													<input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off"  readonly="readonly"  type="text" value="${plan.endDate}"  class="form-control required datetime"/>
+												</td>
+
+												<td>
+													<input readonly="readonly" style="text-align: center"  value="${plan.remindName}" type="text" class="form-control contentDetail"/>
+												</td>
+
+												<td>
+													<input readonly="readonly" style="text-align: center"  value="${plan.finishName}" type="text" class="form-control contentDetail"/>
+												</td>
+											</tr>
+										</c:forEach>
+									</tbody>
+								</table>
+							</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="listAttachment" class="table table-bordered table-condensed details">
+								<thead>
+								<tr>
+										<%-- <th>序号</th>--%>
+									<th width="25%">文件</th>
+									<th width="25%">上传人</th>
+									<th width="25%">上传时间</th>
+									<th width="150px">操作</th>
+								</tr>
+								</thead>
+								<tbody id="file_attachment1">
+								<c:forEach items="${projectRecordPlans.workAttachments}" var = "workClientAttachment" varStatus="status">
+									<tr class="trIdAdds">
+											<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${projectRecordPlans.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+
+										<td>${workClientAttachment.createBy.name}</td>
+										<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+										<td class="op-td">
+											<div class="op-btn-box" >
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											</div>
+										</td>
+									</tr>
+								</c:forEach>
+								</tbody>
+							</table>
+						</div>
+					</div>
+				</div>
 			</div>
 			<%--<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>咨询质量控制信息</h2></div>

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

@@ -120,10 +120,10 @@
 										<c:otherwise>
 											<c:choose>
 												<c:when test="${fn:containsIgnoreCase(obj.fileName,'pdf')}">
-													<td title="${obj.fileName}" class="codelabel1"><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${obj.temporaryUrl}','90%','90%','1')">${obj.fileName}</a></td>
+													<td title="${obj.fileName}" class="codelabel1"><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${obj.temporaryUrl}',1)">${obj.fileName}</a></td>
 												</c:when>
 												<c:otherwise>
-													<td title="${obj.fileName}" class="codelabel1"><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${obj.temporaryUrl}','90%','90%')">${obj.fileName}</a></td>
+													<td title="${obj.fileName}" class="codelabel1"><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${obj.temporaryUrl}',2)">${obj.fileName}</a></td>
 												</c:otherwise>
 											</c:choose>
 										</c:otherwise>

+ 22 - 1
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -383,6 +383,20 @@
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
             }
         }
+        function insertTitleCollection(tValue){
+            var files = tValue;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "5";
+                console.log(file);
+                var timestamp = new Date().getTime();
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+            }
+        }
 
         function disUscc(hasUscc) {
             if("2"==hasUscc){
@@ -828,6 +842,10 @@
                 <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>
+                    <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                        name="linkman.id"  title="选择资料库"
+                                        cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                        searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
                 </div>
                 <div id="addFile_attachment" style="display: none" class="upload-progress">
                     <span id="fileName_attachment"></span>
@@ -849,7 +867,7 @@
                             <th>文件</th>
                             <th>上传人</th>
                             <th>上传时间</th>
-                            <th width="150px">操作</th>
+                            <th width="200px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
@@ -934,6 +952,9 @@
                                                onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')"
                                                class="op-btn op-btn-delete"><i class="fa fa-trash"></i>&nbsp;删除</a>
                                         </c:if>
+                                        <c:if test="${workClientAttachment.collectFlag != 1}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

+ 23 - 1
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -248,6 +248,20 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
+		function insertTitleCollection(tValue){
+			var files = tValue;
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "44";
+				console.log(file);
+				var timestamp = new Date().getTime();
+				/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile" + divId).show();
+				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+			}
+		}
         function insertTitleReview(tValue){
             var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
@@ -262,6 +276,7 @@
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
 
+
         function openBill(title,url,width,height,target,formId){
             var frameIndex = parent.layer.getFrameIndex(window.name);
             var urls = url+"&index="+frameIndex;
@@ -805,6 +820,10 @@
 							<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>
+								<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+													name="linkman.id"  title="选择资料库"
+													cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+													searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
 							</div>
 							<div id="addFile_attachment" style="display: none" class="upload-progress">
 								<span id="fileName_attachment" ></span>
@@ -824,7 +843,7 @@
 										<th>文件预览</th>
 										<th>上传人</th>
 										<th>上传时间</th>
-										<th width="180px">操作</th>
+										<th width="200px">操作</th>
 									</tr>
 									</thead>
 									<tbody id="file_attachment">
@@ -900,6 +919,9 @@
 													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 													</c:if>
+													<c:if test="${workClientAttachment.collectFlag != 1}">
+														<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+													</c:if>
 												</div>
 											</td>
 										</tr>

+ 22 - 1
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormEdit.jsp

@@ -215,6 +215,20 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
+		function insertTitleCollection(tValue){
+			var files = tValue;
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "44";
+				console.log(file);
+				var timestamp = new Date().getTime();
+				/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile" + divId).show();
+				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+			}
+		}
         function insertTitleReview(tValue){
             var files = $("#attachment_file_review")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
@@ -750,6 +764,10 @@
 					<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>
+						<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+											name="linkman.id"  title="选择资料库"
+											cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+											searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
 					</div>
 					<div id="addFile_attachment" style="display: none" class="upload-progress">
 						<span id="fileName_attachment" ></span>
@@ -769,7 +787,7 @@
 								<th>文件预览</th>
 								<th>上传人</th>
 								<th>上传时间</th>
-								<th width="180px">操作</th>
+								<th width="200px">操作</th>
 							</tr>
 							</thead>
 							<tbody id="file_attachment">
@@ -844,6 +862,9 @@
 											<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 											</c:if>
+											<c:if test="${workClientAttachment.collectFlag != 1}">
+												<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+											</c:if>
 										</div>
 									</td>
 								</tr>

+ 22 - 1
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordForm.jsp

@@ -155,6 +155,20 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+		function insertTitleCollection(tValue){
+			var files = tValue;
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "44";
+				console.log(file);
+				var timestamp = new Date().getTime();
+				/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile" + divId).show();
+				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+			}
+		}
 
         function setValue(obj){
             $.ajax({
@@ -297,6 +311,10 @@
 				<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>
+					<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+										name="linkman.id"  title="选择资料库"
+										cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+										searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
 				</div>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
@@ -316,7 +334,7 @@
 							<th>文件预览</th>
 							<th>上传人</th>
 							<th>上传时间</th>
-							<th width="150px">操作</th>
+							<th width="200px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -391,6 +409,9 @@
 										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 										</c:if>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+										</c:if>
 									</div>
 								</td>
 							</tr>

+ 25 - 4
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordModifyApply.jsp

@@ -110,6 +110,20 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+		function insertTitleCollection(tValue){
+			var files = tValue;
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "44";
+				console.log(file);
+				var timestamp = new Date().getTime();
+				/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile" + divId).show();
+				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
+			}
+		}
 	</script>
 </head>
 <body >
@@ -150,7 +164,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">合同生效日期:</label>
+					<label class="layui-form-label  double-line">合同生效日期:</label>
 					<div class="layui-input-block">
 						<input placeholder="请选择合同生效日期" style="background-color: #fff" class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="readonly" id="effectiveDate" name="workContractInfo.effectiveDate" value="<fmt:formatDate value="${workContractRecord.workContractInfo.effectiveDate}" pattern="yyyy-MM-dd"/>">
 					</div>
@@ -178,13 +192,13 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label double-line"><span class="require-item">*</span>合同金额 (元)<br/>预计金额:</label>
+					<label class="layui-form-label double-line"><span class="require-item">*</span>合同金额 (元)预计金额:</label>
 					<div class="layui-input-block">
 						<form:input path="workContractInfo.contractPrice" id="contractPrice" htmlEscape="false"  placeholder="请输入合同金额/预计金额"   pattern="#.00" class="form-control required number  layui-input"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">对方合同编号:</label>
+					<label class="layui-form-label double-line">对方合同编号:</label>
 					<div class="layui-input-block">
 						<form:input path="workContractInfo.anotherContractNum" placeholder="请输入对方合同编号" htmlEscape="false" class="form-control layui-input"/>
 					</div>
@@ -241,6 +255,10 @@
 				<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>
+					<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+										name="linkman.id"  title="选择资料库"
+										cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+										searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
 				</div>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
@@ -260,7 +278,7 @@
 							<th>文件预览</th>
 							<th>上传人</th>
 							<th>上传时间</th>
-							<th width="150px">操作</th>
+							<th width="200px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -356,6 +374,9 @@
 										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 										</c:if>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+										</c:if>
 									</div>
 								</td>
 							</tr>

+ 25 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp

@@ -430,6 +430,23 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+        function insertTitleCollection(tValue){
+            var list = "${workReimbursement.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = tValue;
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "6";
+                console.log(file);
+                var timestamp=new Date().getTime();
+                var storeAs = "wrkReimbursement";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
+            }
+        }
 
         function getMoney(value){
             var money = "0.00";
@@ -950,6 +967,10 @@
             <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>
+                <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                    name="linkman.id"  title="选择资料库"
+                                    cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                    searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
             </div>
             <div id="addFile_attachment" style="display: none" class="upload-progress">
                 <span id="fileName_attachment" ></span>
@@ -969,7 +990,7 @@
                         <th>文件预览</th>
                         <th>上传人</th>
                         <th>上传时间</th>
-                        <th width="150px">操作</th>
+                        <th width="200px">操作</th>
                     </tr>
                     </thead>
                     <tbody id="file_attachment">
@@ -1046,6 +1067,9 @@
                                     <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
                                         <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
                                     </c:if>
+                                    <c:if test="${workClientAttachment.collectFlag != 1}">
+                                        <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                    </c:if>
                                 </div>
                             </td>
                         </tr>

+ 24 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

@@ -410,6 +410,22 @@
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
         }
+        function insertTitleCollection(tValue){
+            var list = "${workReimbursement.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = tValue;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "6";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "wrkReimbursement";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
 
         function getMoney(value){
             var money = "0.00";
@@ -1040,6 +1056,10 @@
             <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>
+                <sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                    name="linkman.id"  title="选择资料库"
+                                    cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                    searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
             </div>
             <div id="addFile_attachment" style="display: none" class="upload-progress">
                 <span id="fileName_attachment" ></span>
@@ -1059,7 +1079,7 @@
                         <th>文件预览</th>
                         <th>上传人</th>
                         <th>上传时间</th>
-                        <th width="150px">操作</th>
+                        <th width="200px">操作</th>
                     </tr>
                     </thead>
                     <tbody id="file_attachment">
@@ -1135,6 +1155,9 @@
                                     <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
                                         <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
                                     </c:if>
+                                    <c:if test="${workClientAttachment.collectFlag != 1}">
+                                        <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                    </c:if>
                                 </div>
                             </td>
                         </tr>