Преглед на файлове

附件上传调用资料库附件

[user3] преди 4 години
родител
ревизия
c8fdf7e230
променени са 27 файла, в които са добавени 482 реда и са изтрити 85 реда
  1. 21 0
      src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java
  2. 6 6
      src/main/java/com/jeeplus/modules/projectAccessory/entity/CollectAccessoryInfo.java
  3. 9 4
      src/main/java/com/jeeplus/modules/projectAccessory/service/CollectAccessoryService.java
  4. 10 0
      src/main/java/com/jeeplus/modules/projectAccessory/web/CollectAccessoryController.java
  5. 11 0
      src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java
  6. 1 1
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  7. 60 6
      src/main/resources/mappings/modules/collectAccessory/CollectAccessoryDao.xml
  8. 3 5
      src/main/resources/mappings/modules/projectAccessory/ProjectAccessoryDao.xml
  9. 63 17
      src/main/webapp/static/oss/ossupload.js
  10. 11 4
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp
  11. 18 12
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp
  12. 11 6
      src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp
  13. 27 1
      src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp
  14. 8 1
      src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp
  15. 8 2
      src/main/webapp/webpage/modules/projectAccessory/selectCollectingAccessory.jsp
  16. 4 4
      src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp
  17. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp
  18. 23 2
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp
  19. 22 1
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp
  20. 2 2
      src/main/webapp/webpage/modules/sys/collectSelect.jsp
  21. 22 1
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp
  22. 23 1
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp
  23. 22 1
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormEdit.jsp
  24. 22 1
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordForm.jsp
  25. 25 4
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordModifyApply.jsp
  26. 25 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp
  27. 24 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

+ 21 - 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) {
@@ -180,6 +187,20 @@ public class OaNotifyController extends BaseController {
 		if (StringUtils.isNotBlank(oaNotify.getId())){
 			oaNotify = oaNotifyService.getRecordList2(oaNotify);
             oaNotifyService.queryDetails(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;
+						}
+					}
+				}
+			}
 		}else{
 			oaNotify.setExt(0);
 		}

+ 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";
+    }
 }

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

@@ -29,6 +29,9 @@ public class Workattachment extends DataEntity<Workattachment> {
 	private Integer quoteResult;//是否为引用文件判定
 	private String quoteId;//被引用文件id
 
+	private String collectFlag;		// 收藏判定
+
+
 	public String getDivIdType() {
 		return divIdType;
 	}
@@ -137,4 +140,12 @@ 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;
+	}
 }

+ 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{

+ 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>
 

+ 63 - 17
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,7 +266,21 @@ function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divI
         }
     })
 };
-
+function collectingAccessory(obj,url,fileUrl,uploadUserId) {
+    $.ajax({
+        type: "post",
+        url: url,
+        data: {"url": fileUrl, "type": "1", "collectType": 1, "collectUserId": uploadUserId},
+        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);
@@ -385,9 +399,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 +410,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>'+
@@ -420,7 +434,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>'+
@@ -686,9 +700,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 +711,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>'+
@@ -725,8 +739,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 +755,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 +1019,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}')" 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}">
+                                            <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}')" 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}')" 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){
 		$.ajax({
 			type:"post",
 			url:url,
-			data: {"url":fileUrl,"type":"1","collectType":1},
+			data: {"url":fileUrl,"type":"1","collectType":1,"collectUserId":uploadUserId},
 			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}')" 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}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

+ 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}')" 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}')" 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}')" 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}')" 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}')" 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}')" 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}')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;收藏</a>
+                                    </c:if>
                                 </div>
                             </td>
                         </tr>