Browse Source

项目文件上传组件部分功能开发

徐滕 20 hours ago
parent
commit
137501ddcb
75 changed files with 5033 additions and 8532 deletions
  1. 54 0
      src/main/java/com/jeeplus/modules/projectAccessory/web/ProjectAccessoryController.java
  2. 10 1
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectContentData.java
  3. 2 2
      src/main/java/com/jeeplus/modules/projectmaterialstorage/service/ProjectMaterialStorageService.java
  4. 15 0
      src/main/java/com/jeeplus/modules/projectrecord/web/monthly/MonthlyConsultationReportController.java
  5. 0 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  6. 21 19
      src/main/java/com/jeeplus/modules/sys/utils/ALiYunSmsUtil.java
  7. 5 15
      src/main/java/com/jeeplus/modules/sys/web/RegisterController.java
  8. 0 1
      src/main/java/com/jeeplus/modules/workclientinfo/web/WorkClientInfoController.java
  9. 26 0
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  10. 26 8
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java
  11. 6 4
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  12. 115 0
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoManageController.java
  13. 204 0
      src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoPracticeController.java
  14. 2 1
      src/main/resources/mappings/modules/projectAccessory/ProjectAccessoryDao.xml
  15. 379 0
      src/main/webapp/WEB-INF/tags/table/approvalSealAttachment.tag
  16. 412 0
      src/main/webapp/WEB-INF/tags/table/attachmentManager.tag
  17. 1 1
      src/main/webapp/WEB-INF/tags/table/fileDisplay.tag
  18. 448 0
      src/main/webapp/WEB-INF/tags/table/fileUpload.tag
  19. 2 2
      src/main/webapp/WEB-INF/tags/table/otherFileDisplay.tag
  20. 2 2
      src/main/webapp/WEB-INF/tags/table/otherFileInstallDisplay.tag
  21. 18 191
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAudit.jsp
  22. 19 190
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsForm.jsp
  23. 18 189
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsModify.jsp
  24. 14 176
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsView.jsp
  25. 0 210
      src/main/webapp/webpage/modules/externalUnit/capitalDemandFormAuditJfsh.jsp
  26. 18 257
      src/main/webapp/webpage/modules/knowledgeSharing/knowledgeSharingDetailsForm.jsp
  27. 14 172
      src/main/webapp/webpage/modules/knowledgeSharing/knowledgeSharingView.jsp
  28. 14 152
      src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp
  29. 21 171
      src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp
  30. 19 171
      src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp
  31. 14 151
      src/main/webapp/webpage/modules/oa/oaNotifyView.jsp
  32. 20 95
      src/main/webapp/webpage/modules/processProjectPlan/plan/processProjectPlanForm.jsp
  33. 12 143
      src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp
  34. 23 94
      src/main/webapp/webpage/modules/projectConstruction/projectConstructionForm.jsp
  35. 20 119
      src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp
  36. 40 276
      src/main/webapp/webpage/modules/projectrecord/monthly/monthlyContentForm.jsp
  37. 32 168
      src/main/webapp/webpage/modules/projectrecord/monthly/monthlyContentView.jsp
  38. 20 139
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp
  39. 1 65
      src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp
  40. 18 82
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowAudit.jsp
  41. 22 93
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowForm.jsp
  42. 22 91
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowModify.jsp
  43. 20 85
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowView.jsp
  44. 9 166
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp
  45. 14 166
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp
  46. 13 147
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageAudit.jsp
  47. 12 164
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp
  48. 30 226
      src/main/webapp/webpage/modules/ruralprojectrecords/view/workClientAndContractView.jsp
  49. 181 0
      src/main/webapp/webpage/modules/sys/collectNewSelect.jsp
  50. 23 202
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp
  51. 22 5
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoFormDetail.jsp
  52. 33 374
      src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractAudit.jsp
  53. 35 383
      src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractInfoFormAdd.jsp
  54. 37 379
      src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractInfoFormEdit.jsp
  55. 31 539
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoLookForm.jsp
  56. 25 187
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp
  57. 19 210
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordModifyApply.jsp
  58. 21 165
      src/main/webapp/webpage/modules/workcontractrecord/workContractView.jsp
  59. 1 133
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllForm.jsp
  60. 0 132
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllModify.jsp
  61. 1 133
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoForm.jsp
  62. 0 132
      src/main/webapp/webpage/modules/workinvoice/workInvoiceExamineModify.jsp
  63. 1 133
      src/main/webapp/webpage/modules/workinvoice/workInvoiceNotProjectModify.jsp
  64. 0 139
      src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoForm.jsp
  65. 0 132
      src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoModify.jsp
  66. 1 29
      src/main/webapp/webpage/modules/workproject/workRecordView.jsp
  67. 14 122
      src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormDetail.jsp
  68. 16 141
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp
  69. 18 148
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewFormAdd.jsp
  70. 19 144
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewModifyApply.jsp
  71. 17 141
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  72. 403 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoManageList.jsp
  73. 1481 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoPracticeForm.jsp
  74. 406 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoPracticeList.jsp
  75. 1 22
      src/main/webapp/webpage/modules/workvisa/workVisaView.jsp

+ 54 - 0
src/main/java/com/jeeplus/modules/projectAccessory/web/ProjectAccessoryController.java

@@ -39,6 +39,7 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.springframework.web.util.HtmlUtils;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -594,6 +595,59 @@ public class ProjectAccessoryController extends BaseController {
 		return  "modules/sys/collectSelect";
 	}
 
+
+
+	/**
+	 * 无合同,查询公司所有客户及其关联的联系人
+	 * @return
+	 */
+	@RequestMapping("getCollectNewList")
+	public String getCollectNewList(CollectAccessoryInfo collectAccessoryInfo, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, String searchLabel1, String searchKey1, HttpServletRequest request, HttpServletResponse response, Model model){
+
+			// 2. 优先从URL获取参数(若URL有值,覆盖表单传递的hidden值)
+			String urlFieldLabels = request.getParameter("fieldLabels");
+			String urlFieldKeys = request.getParameter("fieldKeys");
+			String urlSearchLabel = request.getParameter("searchLabel");
+			String urlSearchKey = request.getParameter("searchKey");
+
+			// 3. 解码参数(仅解码URL传递的参数,避免表单参数干扰)
+			try {
+				if (urlFieldLabels != null) fieldLabels = URLDecoder.decode(urlFieldLabels, "UTF-8");
+				if (urlFieldKeys != null) fieldKeys = URLDecoder.decode(urlFieldKeys, "UTF-8");
+				if (urlSearchLabel != null) searchLabel = URLDecoder.decode(urlSearchLabel, "UTF-8");
+				if (urlSearchKey != null) searchKey = URLDecoder.decode(urlSearchKey, "UTF-8");
+			} catch (UnsupportedEncodingException e) {
+				logger.error("参数解码异常", e);
+				// 解码失败时用默认值,避免渲染异常
+				fieldLabels = "${collectFieldLabels}";
+				fieldKeys = "${collectFieldKeys}";
+				searchLabel = "${collectSearchLabel}";
+				searchKey = "${collectSearchKey}";
+			}
+
+			// 4. 关键:HTML转义(防止参数含"、<等字符导致hidden字段value渲染断裂)
+			String safeFieldLabels = HtmlUtils.htmlEscape(fieldLabels);
+			String safeFieldKeys = HtmlUtils.htmlEscape(fieldKeys);
+			String safeSearchLabel = HtmlUtils.htmlEscape(searchLabel);
+			String safeSearchKey = HtmlUtils.htmlEscape(searchKey);
+
+			// 5. 分页查询(保持原有逻辑)
+			Page<CollectAccessoryInfo> page = projectAccessoryService.getCollectList(
+					new Page<CollectAccessoryInfo>(request, response), collectAccessoryInfo);
+
+
+			// 7. 传递转义后的参数到页面(确保hidden字段渲染正确)
+			model.addAttribute("url", url);
+			model.addAttribute("fieldLabels", safeFieldLabels); // 转义后的值
+			model.addAttribute("fieldKeys", safeFieldKeys);
+			model.addAttribute("searchLabel", safeSearchLabel);
+			model.addAttribute("searchKey", safeSearchKey);
+			model.addAttribute("page", page);
+			model.addAttribute("obj", collectAccessoryInfo);
+
+			return "modules/sys/collectNewSelect";
+	}
+
 	/**
 	 * 选择报销项目
 	 */

+ 10 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectContentData.java

@@ -38,6 +38,7 @@ public class ProjectContentData extends DataEntity<ProjectContentData> {
     private String extId;
 	private List<ProjectControlTable> projectControlTableList;
 	private List<Workattachment> workAttachments;
+	private List<Workattachment> workMonthlyAttachments;
 	private List<ProjectBasedData> projectBasedDataList;
 	private String masterName;
 	private String contractId;  //合同id
@@ -188,7 +189,15 @@ public class ProjectContentData extends DataEntity<ProjectContentData> {
         this.workAttachments = workAttachments;
     }
 
-    public List<ProjectBasedData> getProjectBasedDataList() {
+	public List<Workattachment> getWorkMonthlyAttachments() {
+		return workMonthlyAttachments;
+	}
+
+	public void setWorkMonthlyAttachments(List<Workattachment> workMonthlyAttachments) {
+		this.workMonthlyAttachments = workMonthlyAttachments;
+	}
+
+	public List<ProjectBasedData> getProjectBasedDataList() {
         return projectBasedDataList;
     }
 

+ 2 - 2
src/main/java/com/jeeplus/modules/projectmaterialstorage/service/ProjectMaterialStorageService.java

@@ -203,7 +203,7 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
         }
 
         // 2. 遍历uniqueList,移除与duplicateList中重复的项
-        Iterator<ProjectMaterialStorageImport> uniqueListIterator = uniqueList.iterator();
+        /*Iterator<ProjectMaterialStorageImport> uniqueListIterator = uniqueList.iterator();
         while (uniqueListIterator.hasNext()) {
             ProjectMaterialStorageImport item = uniqueListIterator.next();
             String distinctStr = item.getDistinctStr();
@@ -214,7 +214,7 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
                 // 可选:如果需要将移除的项加入duplicateList,取消下面这行注释
                 // duplicateList.add(item);
             }
-        }
+        }*/
 
         // 最终返回处理后的列表
         map.put("uniqueList", uniqueList);      // 仅包含本次新增且不与历史重复的数据

+ 15 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/monthly/MonthlyConsultationReportController.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.projectrecord.web.monthly;
 
+import com.google.common.collect.Lists;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.persistence.Page;
@@ -261,6 +262,20 @@ public class MonthlyConsultationReportController extends BaseController {
         /*if(StringUtils.isBlank(projectcontentinfo.getId()) && StringUtils.isNotBlank(projectcontentinfo.getProjectContentId())){
             projectcontentinfo.setId(projectcontentinfo.getProjectContentId());
         }*/
+        List<Workattachment> workAttachments = projectcontentinfo.getProjectContentData().getWorkAttachments();
+        List<Workattachment> attachments = Lists.newArrayList();
+        List<Workattachment> monthlyAttachments = Lists.newArrayList();
+        if(null != workAttachments){
+            for (Workattachment workAttachment : workAttachments) {
+                if("_monthly".equals(workAttachment.getDivIdType())){
+                    monthlyAttachments.add(workAttachment);
+                } else if("_attachment".equals(workAttachment.getDivIdType())){
+                    attachments.add(workAttachment);
+                }
+            }
+            projectcontentinfo.getProjectContentData().setWorkAttachments(attachments);
+            projectcontentinfo.getProjectContentData().setWorkMonthlyAttachments(monthlyAttachments);
+        }
         model.addAttribute("projectcontentinfo", projectcontentinfo);
         if ("view".equals(projectcontentinfo.getView())){
             return "modules/projectrecord/monthly/monthlyContentView";

+ 0 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -599,8 +599,6 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
 
         //修改项目开始时间和结束时间
-        System.out.println(ruralProjectRecords.getStartDate());
-        System.out.println(ruralProjectRecords.getEndingDate());
         if(null != ruralProjectRecords.getStartDate() && null != ruralProjectRecords.getEndingDate()){
             ruralProjectRecordsService.updateDate(ruralProjectRecords);
 

+ 21 - 19
src/main/java/com/jeeplus/modules/sys/utils/ALiYunSmsUtil.java

@@ -3,7 +3,6 @@ package com.jeeplus.modules.sys.utils;
 import com.aliyun.dysmsapi20170525.Client;
 import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
 import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
-import com.aliyun.tea.TeaException;
 import com.aliyun.teaopenapi.models.Config;
 
 import java.util.HashMap;
@@ -43,7 +42,7 @@ public class ALiYunSmsUtil {
                 .setTemplateCode("SMS_491315361")
                 //此处是设计模版的时候预留的变量${code}就验证码,用下面的随机生成4位数字传入
                 .setTemplateParam(String.format("{\"code\":\"%s\"}", randomCode));
-            
+
         try {
             SendSmsResponse sendSmsResponse = client.sendSms(sendSmsRequest);
             System.out.println(sendSmsResponse);
@@ -67,7 +66,7 @@ public class ALiYunSmsUtil {
                 map.put("statusCode",sendSmsResponse.getStatusCode());
             }
             return map;
-        } catch (TeaException error) {
+        } catch (Exception error) {
             return map;
         }
     }
@@ -117,7 +116,7 @@ public class ALiYunSmsUtil {
                 map.put("statusCode",sendSmsResponse.getStatusCode());
             }
             return map;
-        } catch (TeaException error) {
+        } catch (Exception error) {
             return map;
         }
     }
@@ -129,23 +128,24 @@ public class ALiYunSmsUtil {
      * @return
      * @throws Exception
      */
-    public static HashMap<String,Object> updatePasswordSendSms(String phoneNumbers, String randomCode) throws Exception {
+    public static HashMap<String,Object> updatePasswordSendSms(String phoneNumbers, String randomCode) {
         HashMap<String,Object> map = new HashMap<>();
-        Config config = new Config()
-                .setAccessKeyId(ACCESS_KEY_ID)
-                .setAccessKeySecret(ACCESS_KEY_SECRET)
-                .setEndpoint(ENDPOINT);
+        try {
+            System.out.println("进入获取密码修改短信通知接口3。");
+            Config config = new Config()
+                    .setAccessKeyId(ACCESS_KEY_ID)
+                    .setAccessKeySecret(ACCESS_KEY_SECRET)
+                    .setEndpoint(ENDPOINT);
 
-        Client client = new Client(config);
-        SendSmsRequest sendSmsRequest = new SendSmsRequest()
-                .setPhoneNumbers(phoneNumbers)
-                .setSignName(SIGNNAME)
-                /*.setTemplateCode("SMS_472770050")*/
-                .setTemplateCode("SMS_491460317")
-                //此处是设计模版的时候预留的变量${code}就验证码,用下面的随机生成4位数字传入
-                .setTemplateParam(String.format("{\"code\":\"%s\"}", randomCode));
+            Client client = new Client(config);
+            SendSmsRequest sendSmsRequest = new SendSmsRequest()
+                    .setPhoneNumbers(phoneNumbers)
+                    .setSignName(SIGNNAME)
+                    /*.setTemplateCode("SMS_472770050")*/
+                    .setTemplateCode("SMS_491460317")
+                    //此处是设计模版的时候预留的变量${code}就验证码,用下面的随机生成4位数字传入
+                    .setTemplateParam(String.format("{\"code\":\"%s\"}", randomCode));
 
-        try {
             SendSmsResponse sendSmsResponse = client.sendSms(sendSmsRequest);
             System.out.println(sendSmsResponse);
             if(sendSmsResponse.body.code.equals("isv.BUSINESS_LIMIT_CONTROL")){
@@ -168,7 +168,9 @@ public class ALiYunSmsUtil {
                 map.put("statusCode",sendSmsResponse.getStatusCode());
             }
             return map;
-        } catch (TeaException error) {
+        } catch (Throwable error) {  // 捕获所有异常和错误
+            map.put("statusCode", 500);
+            map.put("message", "发送失败:" + error.getMessage());
             return map;
         }
     }

+ 5 - 15
src/main/java/com/jeeplus/modules/sys/web/RegisterController.java

@@ -303,7 +303,6 @@ public class RegisterController extends BaseController {
 	@ResponseBody
 	public AjaxJson getRegisterCode(HttpServletRequest request,HttpServletResponse response, String mobile,String type,
 			Model model, RedirectAttributes redirectAttributes) {
-		SystemConfig config = systemConfigService.get("1");
 		AjaxJson j = new AjaxJson();
 		//验证手机号是否已经注册
 		if(userDao.validateMobile(mobile) == null||("resetPassword").equals(type)){
@@ -312,10 +311,12 @@ public class RegisterController extends BaseController {
 		Jedis jedis = null;
 		try{
 			//调用工具类返回结果
+			System.out.println("准备调用updatePasswordSendSms,mobile=" + mobile + ",code=" + randomCode);
 			result = ALiYunSmsUtil.updatePasswordSendSms(mobile, randomCode);
+			System.out.println("调用updatePasswordSendSms完成,返回结果=" + result);
 			Integer statusCode = (Integer) result.get("statusCode");
 			if (200 == statusCode) {
-
+				System.out.println("进入获取密码修改短信通知接口2。获取阿里云短信通知成功");
 				j.setSuccess(true);
 				j.setErrorCode("-1");
 				j.setMsg("短信发送成功!");
@@ -349,6 +350,8 @@ public class RegisterController extends BaseController {
 				j.put("ErrorXml",result);
 			}
 		}catch (Exception e){
+			System.out.println("阿里云发送短信失败。失败原因为:" + e.getMessage());
+			logger.error("调用短信接口发生错误", e);  // 记录详细日志
 			e.printStackTrace();
 			logger.info("5");
 			j.setSuccess(false);
@@ -362,19 +365,6 @@ public class RegisterController extends BaseController {
 		}else{
 			return null ;
 		}
-		/*		} catch (IOException e) {
-			j.setSuccess(false);
-			j.setErrorCode("3");
-			j.setMsg("因未知原因导致短信发送失败,请联系管理员。");
-		}
-		//验证手机号是否已经注册
-		if(userDao.findUniqueByProperty("mobile", mobile) != null){
-
-				j.setSuccess(false);
-				j.setErrorCode("1");
-				j.setMsg("手机号已经被使用!");
-		        return j;
-		}*/
 	}
 
 	/**

+ 0 - 1
src/main/java/com/jeeplus/modules/workclientinfo/web/WorkClientInfoController.java

@@ -870,7 +870,6 @@ public class WorkClientInfoController extends BaseController {
 		if(StringUtils.isBlank(keyword)){
 			return null;
 		}
-		String s = TicketQueryUtils.enterpriseSearchByName(keyword);
 		return  TicketQueryUtils.enterpriseSearchByName(keyword);
 	}
 

+ 26 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -612,6 +612,32 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			}
 		}
 	}
+
+	@Transactional(readOnly = false)
+	public void saveWorkAttachments(WorkContractInfo workContractInfo) {
+		for (WorkClientAttachment workClientAttachment : workContractInfo.getWorkAttachments()){
+			if (workClientAttachment.getId() == null){
+				continue;
+			}
+			if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())){
+				workClientAttachment.setAttachmentId(workContractInfo.getId());
+				if(StringUtils.isNotBlank(workClientAttachment.getAttachmentFlag())){
+					workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
+				}else{
+					workClientAttachment.setAttachmentFlag("44");
+				}
+				workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+				if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())){
+					workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
+					signatureDocumentService.createIsignature(workClientAttachment.getUrl(),workClientAttachment.getAttachmentName(),workClientAttachment.getId(),workContractInfo.getName());
+				}else{
+					workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
+				}
+			}else{
+				workClientAttachmentDao.delete(workClientAttachment);
+			}
+		}
+	}
 	@Transactional(readOnly = false)
 	public void saves(WorkContractInfo workContractInfo) {
 		super.save(workContractInfo);

+ 26 - 8
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -1849,10 +1849,19 @@ public class WorkContractInfoController extends BaseController {
         //当状态为未通过时,重新修改数据
         if ("modifyApply".equals(taskDefKey)) {
             workContractInfo.getAct().setComment("重新申请");
-            List<WorkClientAttachment> workClientAttachments = workClientInfoService.uploadFile(request, upload_files, workContractInfo.getId(), "44");
-            List<WorkClientAttachment> workClientAttachmentList = workContractInfo.getWorkAttachments();
-            workClientAttachments.addAll(workClientAttachmentList);
-            workContractInfo.setWorkAttachments(workClientAttachments);
+            List<WorkClientAttachment> list = workContractInfo.getWorkAttachments();
+            List<WorkClientAttachment> list1 = new ArrayList<>();
+            List<WorkClientAttachment> list2 = new ArrayList<>();
+            for (WorkClientAttachment workClientAttachment:list){
+                if (StringUtils.isNotBlank(workClientAttachment.getAttachmentFlag()) && (workClientAttachment.getAttachmentFlag().equals("44") || workClientAttachment.getAttachmentFlag().equals("45"))){
+                    list1.add(workClientAttachment);
+                }else {
+                    list2.add(workClientAttachment);
+                }
+            }
+
+            workContractInfo.setWorkAttachments(list1);
+            workContractInfoService.saveWorkAttachments(workContractInfo);//从数据库取出记录的值
         }
         try{
             // 对不同环节的业务逻辑进行操作
@@ -1910,10 +1919,19 @@ public class WorkContractInfoController extends BaseController {
         //当状态为未通过时,重新修改数据
         if ("modifyApply".equals(taskDefKey)) {
             workContractInfo.getAct().setComment("重新申请");
-            List<WorkClientAttachment> workClientAttachments = workClientInfoService.uploadFile(request, upload_files, workContractInfo.getId(), "44");
-            List<WorkClientAttachment> workClientAttachmentList = workContractInfo.getWorkAttachments();
-            workClientAttachments.addAll(workClientAttachmentList);
-            workContractInfo.setWorkAttachments(workClientAttachments);
+            List<WorkClientAttachment> list = workContractInfo.getWorkAttachments();
+            List<WorkClientAttachment> list1 = new ArrayList<>();
+            List<WorkClientAttachment> list2 = new ArrayList<>();
+            for (WorkClientAttachment workClientAttachment:list){
+                if (StringUtils.isNotBlank(workClientAttachment.getAttachmentFlag()) && (workClientAttachment.getAttachmentFlag().equals("44") || workClientAttachment.getAttachmentFlag().equals("45"))){
+                    list1.add(workClientAttachment);
+                }else {
+                    list2.add(workClientAttachment);
+                }
+            }
+
+            workContractInfo.setWorkAttachments(list1);
+            workContractInfoService.saveWorkAttachments(workContractInfo);//从数据库取出记录的值
         }
         try{
             // 对不同环节的业务逻辑进行操作

+ 6 - 4
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -10651,10 +10651,12 @@ public class WorkProjectNotifyController extends BaseController {
 		List<WorkActivityProcess> lists = workActivityProcessService.findByProcInsIdAudit(workActivityProcess);
 		if(null != lists && lists.size()>0){
 			WorkActivityProcess workActivity = lists.get(0);
-			SysRoleActivity role = workActivity.getActivity().getRole();
-			String enname = role.getEnname();
-			if("cwzg".equals(enname)){
-				isChangeStatus = "1";
+			if(null != workActivity.getActivity()){
+				SysRoleActivity role = workActivity.getActivity().getRole();
+				String enname = role.getEnname();
+				if("cwzg".equals(enname)){
+					isChangeStatus = "1";
+				}
 			}
 		}
 		String showChangeStatus = "1";

+ 115 - 0
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoManageController.java

@@ -0,0 +1,115 @@
+package com.jeeplus.modules.workstaff.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.sys.service.RoleService;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 员工管理信息Controller
+ * @author 徐滕
+ * @version 2025-07-8
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workstaff/workStaffBasicInfoManage")
+public class WorkStaffBasicInfoManageController extends BaseController {
+
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
+    @Autowired
+    private RoleService roleService;
+
+    @ModelAttribute
+    public WorkStaffBasicInfo get(@RequestParam(required=false) String id) {
+        WorkStaffBasicInfo entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = workStaffBasicInfoService.get(id);
+        }
+        if (entity == null){
+            entity = new WorkStaffBasicInfo();
+            entity.setId(id);
+        }
+        return entity;
+    }
+
+
+    /**
+     * 离员工信息列表页面
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoManage:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(workStaffBasicInfo.getToflag())){
+            if (workStaffBasicInfo.getToflag().equals("1")){
+                request.getSession().removeAttribute("workStaffBasicInfoManage");
+                WorkStaffBasicInfo search=workStaffBasicInfo;
+                request.getSession().setAttribute("workStaffBasicInfoManage",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("workStaffBasicInfoManage")!=null){
+                workStaffBasicInfo= (WorkStaffBasicInfo) request.getSession().getAttribute("workStaffBasicInfoManage");
+                model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
+            }
+        }
+        if(StringUtils.isBlank(workStaffBasicInfo.getStatus())){
+            workStaffBasicInfo.setStatus("正式");
+        }
+        if(StringUtils.isBlank(workStaffBasicInfo.getUserLoginFlag())){
+            workStaffBasicInfo.setUserLoginFlag("1");
+        }
+        Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response), workStaffBasicInfo);
+        List<WorkStaffBasicInfo> list = page.getList();
+        for (WorkStaffBasicInfo info:list){
+            info.setRoleId(roleService.getRoleIdByUserId(info.getUserId()));
+            info.setRoleName(roleService.getRoleNameByUserId(info.getUserId()));
+        }
+        model.addAttribute("page", page);
+        return "modules/workstaff/workStaffBasicInfoManageList";
+    }
+
+
+    /**
+     * 导出excel文件
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoManage:export")
+    @RequestMapping(value = "exportAchive", method=RequestMethod.POST)
+    public String exportFile(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            String fileName = "员工信息"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response, -1), workStaffBasicInfo);
+            List<WorkStaffBasicInfoExcel> excelData=workStaffBasicInfoService.getExcelData(page);
+            new ExportExcel("员工信息", WorkStaffBasicInfoExcel.class).setDataList(excelData).write(response, fileName).dispose();
+            addMessage(redirectAttributes, "导出员工信息记录成功!");
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出员工信息记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoManage/list/?repage";
+    }
+
+}

+ 204 - 0
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoPracticeController.java

@@ -0,0 +1,204 @@
+package com.jeeplus.modules.workstaff.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.sys.service.RoleService;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 实习员工基本信息Controller
+ * @author 徐滕
+ * @version 2025-07-8
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workstaff/workStaffBasicInfoPractice")
+public class WorkStaffBasicInfoPracticeController extends BaseController {
+
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
+    @Autowired
+    private RoleService roleService;
+
+    @ModelAttribute
+    public WorkStaffBasicInfo get(@RequestParam(required=false) String id) {
+        WorkStaffBasicInfo entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = workStaffBasicInfoService.get(id);
+        }
+        if (entity == null){
+            entity = new WorkStaffBasicInfo();
+            entity.setId(id);
+        }
+        return entity;
+    }
+
+
+    /**
+     * 离员工信息列表页面
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoPractice:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(workStaffBasicInfo.getToflag())){
+            if (workStaffBasicInfo.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchStaffBasicInfo");
+                WorkStaffBasicInfo search=workStaffBasicInfo;
+                request.getSession().setAttribute("searchStaffBasicInfo",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchStaffBasicInfo")!=null){
+                workStaffBasicInfo= (WorkStaffBasicInfo) request.getSession().getAttribute("searchStaffBasicInfo");
+                model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
+            }
+        }
+        if(StringUtils.isBlank(workStaffBasicInfo.getStatus())){
+            workStaffBasicInfo.setStatus("实习");
+        }
+        Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response), workStaffBasicInfo);
+        List<WorkStaffBasicInfo> list = page.getList();
+        for (WorkStaffBasicInfo info:list){
+            info.setRoleId(roleService.getRoleIdByUserId(info.getUserId()));
+            info.setRoleName(roleService.getRoleNameByUserId(info.getUserId()));
+        }
+        model.addAttribute("page", page);
+        return "modules/workstaff/workStaffBasicInfoPracticeList";
+    }
+
+    /**
+     * 查看,增加,编辑员工信息表单页面
+     */
+    @RequiresPermissions(value={"workstaff:workStaffBasicInfoPractice:add","workstaff:workStaffBasicInfoPractice:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(WorkStaffBasicInfo workStaffBasicInfo, Model model,boolean reFlag) {
+        if(StringUtils.isBlank(workStaffBasicInfo.getId())&&StringUtils.isNotBlank(workStaffBasicInfo.getAchiveId())) {
+            workStaffBasicInfo = workStaffBasicInfoService.getByAchiveId(workStaffBasicInfo);
+        }
+        if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
+            workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
+        }else {
+            workStaffBasicInfo.setTs("0");
+            workStaffBasicInfo.setPolitics("普通居民");
+            workStaffBasicInfo.setExSoldier("0");
+            workStaffBasicInfo.setMarriage("未婚");
+            workStaffBasicInfo.setStatus("实习");
+            workStaffBasicInfo.setNation(DictUtils.getDictValue("汉族","nation_type",""));
+        }
+        workStaffBasicInfo.setRoleId(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId()));
+        if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
+            model.addAttribute("updateFlag","1");
+        }
+        model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
+        return "modules/workstaff/workStaffBasicInfoPracticeForm";
+    }
+
+    /**
+     * 保存员工信息
+     */
+    @RequestMapping(value = "save")
+    public String save(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+        if (!beanValidator(model, workStaffBasicInfo)){
+            return form(workStaffBasicInfo, model,false);
+        }
+        MultipartFile pictureFile = workStaffBasicInfo.getPictureFile();
+        if(pictureFile != null && pictureFile.getSize()>0){
+
+            OSSClientUtil ossClientUtil = new OSSClientUtil();
+            if (pictureFile != null && !pictureFile.isEmpty() && pictureFile.getSize() > 0) {
+                try {
+                    String url = ossClientUtil.uploadFile2OSS(pictureFile, "certificate");
+                    workStaffBasicInfo.setPicture(url);
+                } catch (Exception e) {
+                    logger.error("oss上传文件失败!");
+                }
+            }
+
+        }else{
+            workStaffBasicInfo.setPicture("");
+        }
+
+        if(!workStaffBasicInfo.getIsNewRecord()){//编辑表单保存
+            WorkStaffBasicInfo t = workStaffBasicInfoService.get(workStaffBasicInfo.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(workStaffBasicInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            workStaffBasicInfoService.save(t,request);//保存
+        }else{//新增表单保存
+
+            workStaffBasicInfoService.save(workStaffBasicInfo,request);//保存
+        }
+        addMessage(redirectAttributes, "保存实习员工信息成功");
+        if (StringUtils.isNotBlank(workStaffBasicInfo.getHome()) && "home".equals(workStaffBasicInfo.getHome())){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
+
+    /**
+     * 导出excel文件
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoPractice:export")
+    @RequestMapping(value = "exportAchive", method= RequestMethod.POST)
+    public String exportFile(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            workStaffBasicInfo.setStatus("返聘");
+            String fileName = "返聘员工信息"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<WorkStaffBasicInfo> page = workStaffBasicInfoService.findPage(new Page<WorkStaffBasicInfo>(request, response, -1), workStaffBasicInfo);
+            List<WorkStaffBasicInfoExcel> excelData=workStaffBasicInfoService.getExcelData(page);
+            new ExportExcel("返聘员工信息", WorkStaffBasicInfoExcel.class).setDataList(excelData).write(response, fileName).dispose();
+            addMessage(redirectAttributes, "导出返聘员工信息记录成功!");
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出返聘员工信息记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+ Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
+
+
+    /**
+     * 员工信息冻结或激活
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoPractice:freeze")
+    @RequestMapping(value = "freeze")
+    public String freeze(WorkStaffBasicInfo workStaffBasicInfo, RedirectAttributes redirectAttributes) throws Exception {
+        workStaffBasicInfoService.freeze(workStaffBasicInfo);
+        addMessage(redirectAttributes, "员工登录权限更新成功");
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
+    /**
+     * 删除员工信息
+     */
+    @RequiresPermissions("workstaff:workStaffBasicInfoPractice:del")
+    @RequestMapping(value = "delete")
+    public String delete(WorkStaffBasicInfo workStaffBasicInfo, RedirectAttributes redirectAttributes) {
+        workStaffBasicInfoService.delete(workStaffBasicInfo);
+        addMessage(redirectAttributes, "删除员工信息成功");
+        return "redirect:"+Global.getAdminPath()+"/workstaff/workStaffBasicInfoEmploymentIn/?repage";
+    }
+
+}

+ 2 - 1
src/main/resources/mappings/modules/projectAccessory/ProjectAccessoryDao.xml

@@ -296,7 +296,7 @@
 		  left join sys_user asu on asu.id = a.create_by
 		where  a.del_flag = 0
 			<if test="fileName !=null and fileName != ''">
-				and a.file_name = #{fileName}
+				and a.file_name like concat('%',#{fileName},'%')
 			</if>
 			<if test="type == 1">
 				and a.create_by = #{createBy.id} and a.type='1'
@@ -307,6 +307,7 @@
 			<if test="type == 3">
 				and a.company_id = #{companyId} and a.type='3'
 			</if>
+		order by a.update_date desc
 	</select>
 	<select id="getCollectAccessoryInfo1"
 			resultType="com.jeeplus.modules.projectAccessory.entity.CollectAccessoryInfo">

+ 379 - 0
src/main/webapp/WEB-INF/tags/table/approvalSealAttachment.tag

@@ -0,0 +1,379 @@
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ tag pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
+
+<%-- 1. 可配置参数定义(支持自定义修改) --%>
+<%@ attribute name="title" type="java.lang.String" description="附件区域标题"%>
+<%@ attribute name="addBtnText" type="java.lang.String" description="添加附件按钮文本"%>
+<%@ attribute name="downloadBtnText" type="java.lang.String" description="下载模板按钮文本"%>
+<%@ attribute name="templateUrl" type="java.lang.String" description="模板下载地址"%>
+<%@ attribute name="baseId" type="java.lang.String" required="true" description="组件唯一标识(避免页面冲突)"%>
+<%@ attribute name="attachments" type="java.util.List" required="true" description="附件列表数据(必填)"%>
+<%@ attribute name="uploadMode" type="java.lang.Integer" description="上传模式(1=百度云,2=阿里云)"%>
+<%@ attribute name="previewUrl" type="java.lang.String" description="图片预览基础地址"%>
+<%@ attribute name="fileHandlerFunc" type="java.lang.String" description="文件选择回调函数名"%>
+<%@ attribute name="showOperateBtn" type="java.lang.Boolean" description="是否显示操作按钮(添加/下载)"%>
+<%@ attribute name="attachmentFlag" type="java.lang.String" description="附件标识" %>
+<%@ attribute name="storeAs" type="java.lang.String" description="存储路径标识" %>
+
+<%-- 2. 初始化默认值(参数未传时使用) --%>
+<c:set var="ctx" value="${pageContext.request.contextPath}" />
+<%-- 基础默认值 --%>
+<c:set var="defTitle" value="审定单签章附件信息" />
+<c:set var="defAddBtnText" value="添加附件" />
+<c:set var="defDownloadBtnText" value="下载模板" />
+<c:set var="defUploadMode" value="2" />
+<c:set var="defFileHandlerFunc" value="insertTitle" />
+<c:set var="defShowOperateBtn" value="true" />
+<c:set var="defaultAttachmentFlag" value="6" />
+<c:set var="defaultStoreAs" value="wrkReimbursement" />
+
+<%-- 3. 处理参数默认值(为空时赋值默认值) --%>
+<c:if test="${empty title}"><c:set var="title" value="${defTitle}" /></c:if>
+<c:if test="${empty addBtnText}"><c:set var="addBtnText" value="${defAddBtnText}" /></c:if>
+<c:if test="${empty downloadBtnText}"><c:set var="downloadBtnText" value="${defDownloadBtnText}" /></c:if>
+<c:if test="${empty uploadMode}"><c:set var="uploadMode" value="${defUploadMode}" /></c:if>
+<c:if test="${empty fileHandlerFunc}"><c:set var="fileHandlerFunc" value="${defFileHandlerFunc}" /></c:if>
+<c:if test="${empty showOperateBtn}"><c:set var="showOperateBtn" value="${defShowOperateBtn}" /></c:if>
+<c:if test="${empty attachmentFlag}"><c:set var="attachmentFlag" value="${defaultAttachmentFlag}" /></c:if>
+<c:if test="${empty storeAs}"><c:set var="storeAs" value="${defaultStoreAs}" /></c:if>
+
+<%-- 4. 组件核心HTML结构 --%>
+<div class="form-group layui-row">
+    <%-- 标题区域 --%>
+    <div class="form-group-label"><h2>${title}</h2></div>
+
+    <%-- 操作按钮区域(添加附件+下载模板) --%>
+    <c:if test="${showOperateBtn}">
+        <div class="layui-item nav-btns">
+                <%-- 添加附件按钮 --%>
+            <a id="${baseId}_btn" class="nav-btn nav-btn-add" title="${addBtnText}">
+                <i class="fa fa-plus"></i>&nbsp;${addBtnText}
+            </a>
+                <%-- 下载模板按钮 --%>
+            ${templateUrl}
+        </div>
+    </c:if>
+
+    <%-- 上传进度条(默认隐藏) --%>
+    <div id="addFile_${baseId}" style="display: none" class="upload-progress">
+        <span id="fileName_${baseId}"></span>
+        <b><span id="baifenbi_${baseId}"></span></b>
+        <div class="progress">
+            <div id="jindutiao_${baseId}" class="progress-bar" style="width: 0%" aria-valuenow="0"></div>
+        </div>
+    </div>
+
+    <%-- 文件选择框(隐藏,通过添加按钮触发) --%>
+    <input
+            id="${baseId}_file"
+            type="file"
+            name="${baseId}_file"
+            multiple="multiple"
+            style="display: none;"
+            onChange="if(this.value) ${fileHandlerFunc}(this.value);"
+    />
+    <span id="${baseId}_title"></span>
+
+    <%-- 附件列表表格 --%>
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="${baseId}_listAttachment" class="table table-bordered table-condensed details">
+            <thead>
+            <tr>
+                <th>文件预览</th>
+                <th>上传人</th>
+                <th>上传时间</th>
+                <th width="180px">操作</th>
+            </tr>
+            </thead>
+            <tbody id="file_${baseId}">
+            <%-- 循环渲染附件列表 --%>
+            <c:forEach items="${attachments}" var="workClientAttachment" varStatus="status">
+                <tr>
+                        <%-- 文件预览(按上传模式和文件类型适配) --%>
+                    <c:choose>
+                        <%-- 阿里云模式(uploadMode=2) --%>
+                        <c:when test="${uploadMode == 2}">
+                            <c:choose>
+                                <%-- 图片类型(jpg/png等) --%>
+                                <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="openPreview('${workClientAttachment.temporaryUrl}',5)" alt="${workClientAttachment.attachmentName}">
+                                    </td>
+                                </c:when>
+                                <%-- 非图片类型 --%>
+                                <c:otherwise>
+                                    <c:choose>
+                                        <%-- PDF文件 --%>
+                                        <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>
+                                        <%-- 压缩包(rar/zip等) --%>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">
+                                                        ${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>
+                        <%-- 百度云模式(uploadMode=1) --%>
+                        <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.temporaryUrl}" width="50" height="50" onclick="openPreview('${workClientAttachment.temporaryUrl}',5)" alt="${workClientAttachment.attachmentName}">
+                                    </td>
+                                </c:when>
+                                <%-- 非图片类型 --%>
+                                <c:otherwise>
+                                    <c:choose>
+                                        <%-- PDF文件 --%>
+                                        <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>
+                                            <c:choose>
+                                                <c:when test="${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.url}" width="50" height="50" onclick="openDialogView('预览','${pageContext.request.contextPath}${fns:getAdminPath()}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                            </td>
+                                                        </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:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                    <td>
+                                                                        <a class="attention-info" href="javascript:void(0)"
+                                                                           onclick="openPreview('${workClientAttachment.url}',3)">
+                                                                                ${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: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('预览','${pageContext.request.contextPath}${fns:getAdminPath()}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                            </td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                    <td>
+                                                                        <a href="javascript:void(0)"
+                                                                           onclick="openPreview('${workClientAttachment.url}',1)">
+                                                                                ${workClientAttachment.attachmentName}
+                                                                        </a>
+                                                                    </td>
+                                                                </c:when>
+                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                    or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                    <td>
+                                                                        <a class="attention-info" href="javascript:void(0)"
+                                                                           onclick="openPreview('${workClientAttachment.url}',3)">
+                                                                                ${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>
+                                        </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='${pageContext.request.contextPath}${fns:getAdminPath()}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
+                               class="op-btn op-btn-download">
+                                <i class="fa fa-download"></i>&nbsp;下载
+                            </a>
+
+                            <c:if test="${showOperateBtn}">
+                                <%-- 删除按钮 --%>
+                                <a href="javascript:void(0)"
+                                   onclick="deleteFileFromAliyun(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_${baseId}','_${baseId}')"
+                                   class="op-btn op-btn-delete">
+                                    <i class="fa fa-trash"></i>&nbsp;删除
+                                </a>
+                            </c:if>
+                        </div>
+                    </td>
+                </tr>
+            </c:forEach>
+
+            </tbody>
+        </table>
+    </div>
+</div>
+
+<%-- 5. 组件初始化脚本 --%>
+<script type="text/javascript">
+    // 页面加载完成后初始化
+    $(document).ready(function() {
+        // 绑定添加附件按钮事件(触发文件选择框)
+        $("#${baseId}_btn").click(function() {
+            $("#${baseId}_file").click();
+        });
+
+        // 初始化进度条默认状态
+        $("#addFile_${baseId}").hide();
+        $("#jindutiao_${baseId}").css("width", "0%").attr("aria-valuenow", "0");
+        $("#baifenbi_${baseId}").text("");
+    });
+
+    // 默认文件处理函数(可通过fileHandlerFunc参数自定义)
+    function ${fileHandlerFunc}(tValue) {
+        // 使用标签参数作为变量
+        var files = $("#${baseId}_file")[0].files;
+        var trLength = $("#file_${baseId}").find("tr").length;
+        console.log(trLength)
+
+        // 校验:只能存在一个附件
+        if (trLength > 0) {
+            top.layer.msg("已上传文件,文件有且只能存在一条", {icon: 0});
+            return;
+        }
+
+        // 校验:只能上传一个文件
+        if (files.length > 1) {
+            top.layer.msg("只能够上传一个文件", {icon: 0});
+            return;
+        }
+
+        // 遍历文件(实际只会有一个)
+        for (var i = 0; i < files.length; i++) {
+            var file = files[i];
+            var allowTypes = "doc,docx,pdf,xls,xlsx";
+            var isAllowed = false;
+
+            // 获取文件后缀名并转换为小写
+            var fileName = file.name;
+            var suffixIndex = fileName.lastIndexOf(".");
+            if (suffixIndex === -1) {
+                top.layer.msg("上传文件必须包含后缀名", {icon: 0});
+                return false;
+            }
+            var suffix = fileName.substring(suffixIndex + 1).toLowerCase();
+
+            // 校验文件类型
+            var typeList = allowTypes.toLowerCase().split(",");
+            for (var x in typeList) {
+                if (typeList[x] === suffix) {
+                    isAllowed = true;
+                    break;
+                }
+            }
+            if (!isAllowed) {
+                top.layer.msg("上传附件只能为:" + allowTypes + " 类型文件", {icon: 0});
+                return false;
+            }
+
+            // 准备上传参数
+            var attachmentId = $("#id").val();
+            var attachmentFlag = "${attachmentFlag}";
+            var storeAs = "${storeAs}";
+            var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+            var divId = "_${baseId}";
+
+            // 显示上传进度条并执行上传
+            $("#addFile" + divId).show();
+            multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, 0);
+        }
+    }
+
+</script>

+ 412 - 0
src/main/webapp/WEB-INF/tags/table/attachmentManager.tag

@@ -0,0 +1,412 @@
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ tag pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
+
+<%-- 可配置参数定义 --%>
+<%@ attribute name="title" type="java.lang.String" description="附件区域标题"%>
+<%@ attribute name="addBtnText" type="java.lang.String" description="添加附件按钮文本"%>
+<%@ attribute name="onChangeFunc" type="java.lang.String" description="文件选择onChange回调函数名"%>
+<%@ attribute name="baseId" type="java.lang.String" required="true" description="组件唯一标识前缀(避免页面冲突)"%>
+<%@ attribute name="attachments" type="java.util.List" required="true" description="附件列表数据(必填)"%>
+<%@ attribute name="uploadMode" type="java.lang.Integer" description="上传模式(1:百度云,2:阿里云)"%>
+<%@ attribute name="showCollectBtn" type="java.lang.Boolean" description="是否显示收藏按钮"%>
+<%@ attribute name="picturePreviewUrl" type="java.lang.String" description="图片预览接口地址"%>
+<%@ attribute name="attachmentFlag" type="java.lang.String" description="附件标识" %>
+<%@ attribute name="storeAs" type="java.lang.String" description="存储路径标识" %>
+<%@ attribute name="fileHandlerFuncName" type="java.lang.String" description="文件选择处理函数名" %>
+<%@ attribute name="showOperateArea" type="java.lang.Boolean" description="是否显示操作按钮区域(添加附件和选择资料库)" %>
+
+<%-- collectSelect标签所需参数(内部使用) --%>
+<%@ attribute name="collectId" type="java.lang.String" description="collectSelect组件ID"%>
+<%@ attribute name="collectUrl" type="java.lang.String" description="collectSelect数据地址"%>
+<%@ attribute name="collectName" type="java.lang.String" description="collectSelect隐藏域名称"%>
+<%@ attribute name="collectTitle" type="java.lang.String" description="collectSelect选择框标题"%>
+<%@ attribute name="collectCssClass" type="java.lang.String" description="collectSelect样式类"%>
+<%@ attribute name="collectFieldLabels" type="java.lang.String" description="collectSelect表格标题"%>
+<%@ attribute name="collectFieldKeys" type="java.lang.String" description="collectSelect表格字段"%>
+<%@ attribute name="collectSearchLabel" type="java.lang.String" description="collectSelect搜索标签"%>
+<%@ attribute name="collectSearchKey" type="java.lang.String" description="collectSelect搜索字段"%>
+
+<%-- 初始化默认值 --%>
+<c:set var="ctx" value="${pageContext.request.contextPath}" />
+<c:set var="defaultTitle" value="附件信息" />
+<c:set var="defaultAddBtnText" value="添加附件" />
+<c:set var="defaultOnChangeFunc" value="insertTitle" />
+<c:set var="defaultUploadMode" value="2" />
+<c:set var="defaultShowCollectBtn" value="true" />
+<c:set var="defaultPicturePreviewUrl" value="${pageContext.request.contextPath}${fns:getAdminPath()}/sys/picturepreview/picturePreview?url=" />
+<c:set var="defaultAttachmentFlag" value="6" />
+<c:set var="defaultStoreAs" value="wrkReimbursement" />
+<c:set var="defaultFileHandlerFuncName" value="${defaultOnChangeFunc}" />
+<c:set var="defaultShowOperateArea" value="true" />
+
+<%-- collectSelect默认参数 --%>
+<c:set var="defaultCollectId" value="${baseId}_linkman" />
+<c:set var="defaultCollectUrl" value="${pageContext.request.contextPath}${fns:getAdminPath()}/projectAccessory/projectAccessory/getCollectNewList" />
+<c:set var="defaultCollectName" value="linkman.id" />
+<c:set var="defaultCollectTitle" value="收藏调用" />
+<c:set var="defaultCollectCssClass" value="form-control judgment" />
+<c:set var="defaultCollectFieldLabels" value="资料库" />
+<c:set var="defaultCollectFieldKeys" value="name" />
+<c:set var="defaultCollectSearchLabel" value="资料库" />
+<c:set var="defaultCollectSearchKey" value="fileName" />
+
+<%-- 处理参数默认值 --%>
+<c:if test="${empty title}"><c:set var="title" value="${defaultTitle}" /></c:if>
+<c:if test="${empty addBtnText}"><c:set var="addBtnText" value="${defaultAddBtnText}" /></c:if>
+<c:if test="${empty onChangeFunc}"><c:set var="onChangeFunc" value="${defaultOnChangeFunc}" /></c:if>
+<c:if test="${empty uploadMode}"><c:set var="uploadMode" value="${defaultUploadMode}" /></c:if>
+<c:if test="${empty showCollectBtn}"><c:set var="showCollectBtn" value="${defaultShowCollectBtn}" /></c:if>
+<c:if test="${empty picturePreviewUrl}"><c:set var="picturePreviewUrl" value="${defaultPicturePreviewUrl}" /></c:if>
+<c:if test="${empty attachmentFlag}"><c:set var="attachmentFlag" value="${defaultAttachmentFlag}" /></c:if>
+<c:if test="${empty storeAs}"><c:set var="storeAs" value="${defaultStoreAs}" /></c:if>
+<c:if test="${empty fileHandlerFuncName}"><c:set var="fileHandlerFuncName" value="${defaultFileHandlerFuncName}" /></c:if>
+<c:if test="${empty showOperateArea}"><c:set var="showOperateArea" value="${defaultShowOperateArea}" /></c:if>
+
+<%-- 处理collectSelect默认值 --%>
+<c:if test="${empty collectId}"><c:set var="collectId" value="${defaultCollectId}" /></c:if>
+<c:if test="${empty collectUrl}"><c:set var="collectUrl" value="${defaultCollectUrl}" /></c:if>
+<c:if test="${empty collectName}"><c:set var="collectName" value="${defaultCollectName}" /></c:if>
+<c:if test="${empty collectTitle}"><c:set var="collectTitle" value="${defaultCollectTitle}" /></c:if>
+<c:if test="${empty collectCssClass}"><c:set var="collectCssClass" value="${defaultCollectCssClass}" /></c:if>
+<c:if test="${empty collectFieldLabels}"><c:set var="collectFieldLabels" value="${defaultCollectFieldLabels}" /></c:if>
+<c:if test="${empty collectFieldKeys}"><c:set var="collectFieldKeys" value="${defaultCollectFieldKeys}" /></c:if>
+<c:if test="${empty collectSearchLabel}"><c:set var="collectSearchLabel" value="${defaultCollectSearchLabel}" /></c:if>
+<c:if test="${empty collectSearchKey}"><c:set var="collectSearchKey" value="${defaultCollectSearchKey}" /></c:if>
+
+<%-- 组件HTML结构 --%>
+<div class="form-group layui-row">
+    <%-- 标题区域 --%>
+    <div class="form-group-label"><h2>${title}1</h2></div>
+
+        <%-- 操作按钮区域 --%>
+        <c:if test="${showOperateArea}">
+            <div class="layui-item nav-btns" style="display: flex; gap: 10px; align-items: center;">
+                    <%-- 添加附件按钮 --%>
+                <a id="${baseId}_btn" class="nav-btn nav-btn-add" title="${addBtnText}"
+                   style="font-size:14px;">
+                    <i class="fa fa-plus"></i>&nbsp;${addBtnText}
+                </a>
+
+                    <%-- 收藏调用(还原原始样式结构) --%>
+                <input id="${collectId}Id" type="hidden" name="${collectName}"/>
+                <div class="input-group" style="float: left; width: auto;">
+            <span class="input-group-btn">
+                <a href="javascript:void(0);"
+                   style="font-size:14px;"
+                   onclick="searchGrid${collectId}()"
+                   id="${collectId}Button"
+                   class="nav-btn nav-btn-add">
+                    <i class="fa fa-search-plus"></i> 收藏调用
+                </a>
+            </span>
+                </div>
+                <label id="${collectId}Name-error" class="error" for="${collectId}Name" style="display:none"></label>
+            </div>
+        </c:if>
+
+    <%-- 上传进度条(默认隐藏) --%>
+    <div id="addFile_${baseId}" style="display: none" class="upload-progress">
+        <span id="fileName_${baseId}"></span>
+        <b><span id="baifenbi_${baseId}"></span></b>
+        <div class="progress">
+            <div id="jindutiao_${baseId}" class="progress-bar" style="width: 0%" aria-valuenow="0"></div>
+        </div>
+    </div>
+
+    <%-- 文件选择框(隐藏,通过添加按钮触发) --%>
+    <input
+            id="${baseId}_file"
+            type="file"
+            name="${baseId}_file"
+            multiple="multiple"
+            style="display: none;"
+            onChange="if(this.value)${fileHandlerFuncName}(this.value);"
+    />
+    <span id="${baseId}_title"></span>
+
+    <%-- 附件列表表格 --%>
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="${baseId}_upTable" class="table table-bordered table-condensed details">
+            <thead>
+            <tr>
+                <th>文件预览</th>
+                <th>上传人</th>
+                <th>上传时间</th>
+                <th width="200px">操作</th>
+            </tr>
+            </thead>
+            <tbody id="file_${baseId}">
+            <c:forEach items="${attachments}" var="attach" varStatus="status">
+                <tr>
+                        <%-- 文件预览(根据文件类型和上传模式显示不同内容) --%>
+                    <c:choose>
+                        <%-- 阿里云上传模式(uploadMode=2) --%>
+                        <c:when test="${uploadMode == 2}">
+                            <c:choose>
+                                <%-- 图片类型(jpg/png等) --%>
+                                <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'jpg')
+                                           or fn:containsIgnoreCase(attach.attachmentName,'png')
+                                           or fn:containsIgnoreCase(attach.attachmentName,'gif')
+                                           or fn:containsIgnoreCase(attach.attachmentName,'bmp')
+                                           or fn:containsIgnoreCase(attach.attachmentName,'jpeg')}">
+                                    <td>
+                                        <img src="${attach.temporaryUrl}" width="50" height="50" onclick="openPreview('${attach.temporaryUrl}',5)" alt="${attach.attachmentName}">
+                                    </td>
+                                </c:when>
+                                <%-- 非图片类型 --%>
+                                <c:otherwise>
+                                    <c:choose>
+                                        <%-- PDF文件 --%>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'pdf')}">
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.temporaryUrl}',1)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:when>
+                                        <%-- 压缩包(rar/zip等) --%>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'rar')
+                                                           or fn:containsIgnoreCase(attach.attachmentName,'zip')
+                                                           or fn:containsIgnoreCase(attach.attachmentName,'jar')
+                                                           or fn:containsIgnoreCase(attach.attachmentName,'7z')}">
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.temporaryUrl}',1)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:when>
+                                        <%-- 其他文件 --%>
+                                        <c:otherwise>
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.temporaryUrl}',2)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:when>
+                        <%-- 百度云上传模式(uploadMode=1) --%>
+                        <c:otherwise>
+                            <c:choose>
+                                <%-- 图片类型 --%>
+                                <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'jpg')
+                                               or fn:containsIgnoreCase(attach.attachmentName,'png')
+                                               or fn:containsIgnoreCase(attach.attachmentName,'gif')
+                                               or fn:containsIgnoreCase(attach.attachmentName,'bmp')
+                                               or fn:containsIgnoreCase(attach.attachmentName,'jpeg')}">
+                                    <td>
+                                        <img src="${attach.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${picturePreviewUrl}${attach.temporaryUrl}','90%','90%')" alt="${attach.attachmentName}">
+                                    </td>
+                                </c:when>
+                                <%-- 非图片类型 --%>
+                                <c:otherwise>
+                                    <c:choose>
+                                        <%-- PDF文件 --%>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'pdf')}">
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.url}',1)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:when>
+                                        <%-- 压缩包 --%>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(attach.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(attach.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(attach.attachmentName,'7z')}">
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.url}',1)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:when>
+                                        <%-- 其他文件 --%>
+                                        <c:otherwise>
+                                            <td>
+                                                <a class="attention-info" href="javascript:void(0)"
+                                                   onclick="openPreview('${attach.url}',2)">${attach.attachmentName}</a>
+                                            </td>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:otherwise>
+                    </c:choose>
+
+                        <%-- 上传人 --%>
+                    <td>${attach.createBy.name}</td>
+
+                        <%-- 上传时间 --%>
+                    <td><fmt:formatDate value="${attach.createDate}" type="both"/></td>
+
+                        <%-- 操作按钮(下载/收藏/删除) --%>
+                    <td class="op-td">
+                        <div class="op-btn-box">
+                                <%-- 下载按钮 --%>
+                            <c:choose>
+                                <c:when test="${uploadMode == 2}">
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'pdf')}">
+                                            <a href="javascript:location.href='${pageContext.request.contextPath}${fns:getAdminPath()}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${attach.url}');"
+                                               class="op-btn op-btn-download">
+                                                <i class="fa fa-download"></i>&nbsp;下载
+                                            </a>
+                                        </c:when>
+                                        <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'xml')}">
+                                            <a href="javascript:location.href='${pageContext.request.contextPath}${fns:getAdminPath()}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${attach.url}');"
+                                               class="op-btn op-btn-download">
+                                                <i class="fa fa-download"></i>&nbsp;下载
+                                            </a>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <a href="${attach.temporaryUrl}" class="op-btn op-btn-download">
+                                                <i class="fa fa-download"></i>&nbsp;下载
+                                            </a>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:when>
+                                <c:otherwise>
+                                    <a href="javascript:location.href='${pageContext.request.contextPath}${fns:getAdminPath()}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${attach.url}');"
+                                       class="op-btn op-btn-download">
+                                        <i class="fa fa-download"></i>&nbsp;下载
+                                    </a>
+                                </c:otherwise>
+                            </c:choose>
+
+                                <%-- 收藏按钮(可配置是否显示) --%>
+                            <c:if test="${showCollectBtn && attach.collectFlag != 1}">
+                                <a href="javascript:void(0)"
+                                   onclick="collectingAccessory(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/projectAccessory/projectAccessory/saveCollectAccessory',
+                                           '${attach.url}','${attach.createBy.id}','${attach.fileSize}')"
+                                   class="op-btn op-btn-delete" style="background-color: #FFB800">
+                                    <i class="layui-icon layui-icon-rate"></i>&nbsp;收藏
+                                </a>
+                            </c:if>
+
+                                <%-- 删除按钮(仅上传者可见) --%>
+                            <c:if test="${attach.createBy.id eq fns:getUser().id and showOperateArea}">
+                                <a href="javascript:void(0)"
+                                   onclick="deleteFileFromAliyun(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/sys/workattachment/deleteFileFromAliyun?url=${attach.url}&id=${attach.id}&type=2','addFile')"
+                                   class="op-btn op-btn-delete">
+                                    <i class="fa fa-trash"></i>&nbsp;删除
+                                </a>
+                            </c:if>
+                        </div>
+                    </td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>
+
+<%-- 组件初始化脚本 --%>
+<script type="text/javascript">
+    // 为添加按钮绑定点击事件,触发文件选择框
+    document.getElementById('${baseId}_btn').addEventListener('click', function() {
+        document.getElementById('${baseId}_file').click();
+    });
+
+    // 下载文件处理函数(处理特殊字符和编码问题)
+    function downloadFile(originalUrl, fileName) {
+        try {
+            // 清理并标准化文件名
+            const safeFileName = fileName
+                .replace(/[\/:*?"<>|]/g, '_')  // 移除系统不允许的特殊字符
+                .replace(/\s+/g, ' ').trim();  // 标准化空格
+
+            // 编码文件名
+            const encodedFileName = encodeURIComponent(safeFileName);
+
+            // 拼接下载参数
+            const param = `response-content-disposition=attachment;filename="${encodedFileName}";filename*=UTF-8''${encodedFileName}`;
+            const separator = originalUrl.includes('?') ? '&' : '?';
+            const finalUrl = originalUrl + separator + param;
+
+            window.location.href = finalUrl;
+        } catch (e) {
+            // 出错时降级为原始链接
+            window.location.href = originalUrl;
+        }
+    }
+
+    // 动态函数定义(使用变量作为函数名)
+    function ${fileHandlerFuncName}(tValue){
+        // 使用标签参数作为变量
+        var attachmentFlag = '${attachmentFlag}';
+        var storeAs = '${storeAs}';
+
+        // 获取附件列表和文件信息
+        var list = '${attachments}';
+        var size = (list.split('url')).length - 1;
+        var files = $("#${baseId}_file")[0].files;
+
+        // 遍历文件并上传
+        for(var i = 0; i < files.length; i++) {
+            var file = files[i];
+            var attachmentId = "";
+            var timestamp = new Date().getTime();
+
+            // 构建上传路径
+            var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+            var divId = "_${baseId}";
+
+            // 显示上传进度条并执行上传
+            $("#addFile" + divId).show();
+            multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
+        }
+    }
+
+    // 生成collectSelect的唯一函数(保持不变)
+    function searchGrid${collectId}() {
+        console.log('${baseId}')
+        var clientId = $("#${collectId}Id").val();
+        var uri = "${collectUrl}";
+
+        top.layer.open({
+            type: 2,
+            area: ['90%', '90%'],
+            title: "${collectTitle}",
+            skin: "two-btns",
+            name: 'friend',
+            content: encodeURI(
+                uri + "?fieldLabels=${collectFieldLabels}&fieldKeys=${collectFieldKeys}" +
+                "&searchLabel=${collectSearchLabel}&searchKey=${collectSearchKey}"
+            ),
+            btn: ['确定', '关闭'],
+            yes: function(index, layero) {
+                var iframeWin = layero.find('iframe')[0].contentWindow;
+                var item = iframeWin.getSelectedItem();
+
+                if (item == "-1") {
+                    return;
+                }
+
+                console.log('item',item)
+                // 调用文件处理函数处理选择结果
+                ${baseId}QuoteCollectCollection(item);
+
+                top.layer.close(index);
+            },
+            cancel: function(index) {}
+        });
+    }
+
+    function ${baseId}QuoteCollectCollection(tValue){
+        console.log('${baseId}')
+        var list = "${attachments}";
+        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 = '${attachmentFlag}';
+            var storeAs = '${storeAs}';
+            var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+            /*将这段字符串存到数据库即可*/
+            var divId = "_${baseId}";
+            $("#addFile" + divId).show();
+            multipartUploadWithStsCollection(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
+        }
+    }
+</script>

+ 1 - 1
src/main/webapp/WEB-INF/tags/table/fileDisplay.tag

@@ -24,7 +24,7 @@
 <c:set var="showSyncStatusValue" value="${not empty showSyncStatus ? showSyncStatus : true}"/>
 
 <div class="form-group layui-row">
-    <div class="form-group-label"><h2>${title}1</h2></div>
+    <div class="form-group-label"><h2>${title}</h2></div>
 
     <%-- 上传进度条 --%>
     <div id="addFile_${moduleId}" style="display: none" class="upload-progress">

+ 448 - 0
src/main/webapp/WEB-INF/tags/table/fileUpload.tag

@@ -0,0 +1,448 @@
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ tag pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
+
+<%-- 可配置参数定义 --%>
+<%@ attribute name="title" type="java.lang.String" description="附件区域标题"%>
+<%@ attribute name="addBtnText" type="java.lang.String" description="添加附件按钮文本"%>
+<%@ attribute name="baseId" type="java.lang.String" required="true" description="组件唯一标识前缀(避免页面冲突)"%>
+<%@ attribute name="attachments" type="java.util.List" description="附件列表数据"%>
+<%@ attribute name="attachTypes" type="java.lang.String" description="允许上传的文件类型(如:jpg,png,pdf)"%>
+<%@ attribute name="attachLength" type="java.lang.String" description="文件大小限制(单位:M)"%>
+<%@ attribute name="storeAs" type="java.lang.String" description="OSS存储目录(如:workAttachment)"%>
+<%@ attribute name="ossDomain" type="java.lang.String" description="OSS域名"%>
+<%@ attribute name="uploadMode" type="java.lang.Integer" description="上传模式(1:百度云,2:阿里云)"%>
+<%@ attribute name="showCollectBtn" type="java.lang.Boolean" description="是否显示收藏按钮"%>
+<%@ attribute name="picturePreviewUrl" type="java.lang.String" description="图片预览接口地址"%>
+<%@ attribute name="showOperateArea" type="java.lang.Boolean" description="是否显示操作按钮区域"%>
+<%@ attribute name="attachmentFlag" type="java.lang.String" description="附件标识"%>
+
+<%-- collectSelect标签所需参数(独立命名空间) --%>
+<%@ attribute name="collectId" type="java.lang.String" description="collectSelect组件ID"%>
+<%@ attribute name="collectUrl" type="java.lang.String" description="collectSelect数据地址"%>
+<%@ attribute name="collectName" type="java.lang.String" description="collectSelect隐藏域名称"%>
+<%@ attribute name="collectTitle" type="java.lang.String" description="collectSelect选择框标题"%>
+<%@ attribute name="collectCssClass" type="java.lang.String" description="collectSelect样式类"%>
+<%@ attribute name="collectFieldLabels" type="java.lang.String" description="collectSelect表格标题"%>
+<%@ attribute name="collectFieldKeys" type="java.lang.String" description="collectSelect表格字段"%>
+<%@ attribute name="collectSearchLabel" type="java.lang.String" description="collectSelect搜索标签"%>
+<%@ attribute name="collectSearchKey" type="java.lang.String" description="collectSelect搜索字段"%>
+
+<%-- 初始化默认值 --%>
+<c:set var="ctx" value="${pageContext.request.contextPath}" />
+<c:set var="defaultTitle" value="附件信息" />
+<c:set var="defaultAddBtnText" value="添加附件" />
+<c:set var="defaultUploadMode" value="2" />
+<c:set var="defaultShowCollectBtn" value="true" />
+<c:set var="defaultCollectUrl" value="${pageContext.request.contextPath}${fns:getAdminPath()}/projectAccessory/projectAccessory/getCollectNewList" />
+<c:set var="defaultPicturePreviewUrl" value="${ctx}/sys/picturepreview/picturePreview?url=" />
+<c:set var="defaultStoreAs" value="workAttachment" />
+<c:set var="defaultOssDomain" value="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com" />
+<c:set var="defaultShowOperateArea" value="true" />
+<c:set var="defaultAttachmentFlag" value="100" />
+
+<%-- collectSelect默认参数 --%>
+<c:set var="defaultCollectId" value="${baseId}_linkman" />
+<c:set var="defaultCollectName" value="linkman.id" />
+<c:set var="defaultCollectTitle" value="选择资料库" />
+<c:set var="defaultCollectCssClass" value="form-control judgment" />
+<c:set var="defaultCollectFieldLabels" value="资料库" />
+<c:set var="defaultCollectFieldKeys" value="name" />
+<c:set var="defaultCollectSearchLabel" value="资料库" />
+<c:set var="defaultCollectSearchKey" value="fileName" />
+
+<%-- 处理参数默认值 --%>
+<c:if test="${empty title}"><c:set var="title" value="${defaultTitle}" /></c:if>
+<c:if test="${empty collectUrl}"><c:set var="collectUrl" value="${defaultCollectUrl}" /></c:if>
+<c:if test="${empty addBtnText}"><c:set var="addBtnText" value="${defaultAddBtnText}" /></c:if>
+<c:if test="${empty uploadMode}"><c:set var="uploadMode" value="${defaultUploadMode}" /></c:if>
+<c:if test="${empty showCollectBtn}"><c:set var="showCollectBtn" value="${defaultShowCollectBtn}" /></c:if>
+<c:if test="${empty picturePreviewUrl}"><c:set var="picturePreviewUrl" value="${defaultPicturePreviewUrl}" /></c:if>
+<c:if test="${empty storeAs}"><c:set var="storeAs" value="${defaultStoreAs}" /></c:if>
+<c:if test="${empty ossDomain}"><c:set var="ossDomain" value="${defaultOssDomain}" /></c:if>
+<c:if test="${empty showOperateArea}"><c:set var="showOperateArea" value="${defaultShowOperateArea}" /></c:if>
+<c:if test="${empty attachmentFlag}"><c:set var="attachmentFlag" value="${defaultAttachmentFlag}" /></c:if>
+
+<%-- 处理collectSelect默认值 --%>
+<c:if test="${empty collectId}"><c:set var="collectId" value="${defaultCollectId}" /></c:if>
+<c:if test="${empty collectName}"><c:set var="collectName" value="${defaultCollectName}" /></c:if>
+<c:if test="${empty collectTitle}"><c:set var="collectTitle" value="${defaultCollectTitle}" /></c:if>
+<c:if test="${empty collectCssClass}"><c:set var="collectCssClass" value="${defaultCollectCssClass}" /></c:if>
+<c:if test="${empty collectFieldLabels}"><c:set var="collectFieldLabels" value="${defaultCollectFieldLabels}" /></c:if>
+<c:if test="${empty collectFieldKeys}"><c:set var="collectFieldKeys" value="${defaultCollectFieldKeys}" /></c:if>
+<c:if test="${empty collectSearchLabel}"><c:set var="collectSearchLabel" value="${defaultCollectSearchLabel}" /></c:if>
+<c:if test="${empty collectSearchKey}"><c:set var="collectSearchKey" value="${defaultCollectSearchKey}" /></c:if>
+
+<%-- 组件HTML结构 --%>
+<div class="form-group layui-row">
+    <%-- 标题区域 --%>
+    <div class="form-group-label"><h2>${title}</h2></div>
+
+    <%-- 操作按钮区域 --%>
+    <c:if test="${showOperateArea}">
+        <div class="layui-item nav-btns" style="display: flex; gap: 10px; align-items: center;">
+                <%-- 添加附件按钮 --%>
+            <a id="${baseId}_btn" class="nav-btn nav-btn-add" title="${addBtnText}"
+               style="font-size:14px;">
+                <i class="fa fa-plus"></i>&nbsp;${addBtnText}
+            </a>
+
+                <%-- 收藏调用(还原原始样式结构) --%>
+            <input id="${collectId}Id" type="hidden" name="${collectName}"/>
+            <div class="input-group" style="float: left; width: auto;">
+            <span class="input-group-btn">
+                <a href="javascript:void(0);"
+                   style="font-size:14px;"
+                   onclick="searchGrid${collectId}()"
+                   id="${collectId}Button"
+                   class="nav-btn nav-btn-add">
+                    <i class="fa fa-search-plus"></i> 收藏调用
+                </a>
+            </span>
+            </div>
+            <label id="${collectId}Name-error" class="error" for="${collectId}Name" style="display:none"></label>
+        </div>
+    </c:if>
+
+    <%-- 上传进度条(ID已调整) --%>
+    <div id="${baseId}_addFile" style="display: none" class="upload-progress">
+        <span id="${baseId}_fileName"></span>
+        <b><span id="${baseId}_baifenbi"></span></b>
+        <div class="progress">
+            <div id="${baseId}_jindutiao" class="progress-bar" style="width: 0%" aria-valuenow="0"></div>
+        </div>
+    </div>
+
+    <%-- 文件选择框(ID已调整) --%>
+    <input
+            id="${baseId}_file"
+            type="file"
+            multiple="multiple"
+            style="display: none;"
+            onChange="if(this.value) ${baseId}_insertTitle(this.value);"
+    />
+    <span id="${baseId}_title"></span>
+
+    <%-- 附件列表表格(ID已调整) --%>
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="${baseId}_upTable" class="table table-bordered table-condensed details">
+            <thead>
+            <tr>
+                <th width="30%">文件预览</th>
+                <th width="80px">上传人</th>
+                <th width="160px">上传时间</th>
+                <th width="30%">文件描述</th>
+                <th width="200px">操作</th>
+                <th class="hide"></th>
+            </tr>
+            </thead>
+            <tbody id="file_${baseId}">
+            <c:if test="${not empty attachments}">
+                <c:forEach items="${attachments}" var="attach" varStatus="status">
+                    <tr class="${baseId}_attachmentClass${status.index} trIdAdds">
+                        <input type="hidden" id="workAttachments${status.index + 1}_" name="workAttachments${status.index + 1}_" value="${attach.id}" />
+                            <%-- 文件预览逻辑 --%>
+                        <td>
+                            <c:choose>
+                                <%-- 图片类型 --%>
+                                <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'jpg')
+                                        or fn:containsIgnoreCase(attach.attachmentName,'png')
+                                        or fn:containsIgnoreCase(attach.attachmentName,'gif')
+                                        or fn:containsIgnoreCase(attach.attachmentName,'bmp')
+                                        or fn:containsIgnoreCase(attach.attachmentName,'jpeg')}">
+                                    <img src="${attach.temporaryUrl != null ? attach.temporaryUrl : attach.url}"
+                                         width="50" height="50"
+                                         onclick="openDialogView('预览','${picturePreviewUrl}${attach.temporaryUrl != null ? attach.temporaryUrl : attach.url}','90%','90%')"
+                                         alt="${attach.attachmentName}" title="${attach.attachmentName}">
+                                </c:when>
+                                <%-- PDF类型 --%>
+                                <c:when test="${fn:containsIgnoreCase(attach.attachmentName,'pdf')}">
+                                    <a class="attention-info" href="javascript:void(0)"
+                                       onclick="openPreview('${attach.temporaryUrl != null ? attach.temporaryUrl : attach.url}',1)"
+                                       title="${attach.attachmentName}">${attach.attachmentName}</a>
+                                </c:when>
+                                <%-- 其他文件类型 --%>
+                                <c:otherwise>
+                                    <a class="attention-info" href="javascript:void(0)"
+                                       onclick="openPreview('${attach.temporaryUrl != null ? attach.temporaryUrl : attach.url}',2)"
+                                       title="${attach.attachmentName}">${attach.attachmentName}</a>
+                                </c:otherwise>
+                            </c:choose>
+                        </td>
+
+                            <%-- 上传人信息 --%>
+                        <td>${attach.createBy.name}</td>
+
+                            <%-- 上传时间 --%>
+                        <td><fmt:formatDate value="${attach.createDate}" type="both"/></td>
+
+                            <%-- 文件描述 --%>
+                        <td style="padding:0px"><input id="workAttachments${status.index + 1}_description" name="workAttachments[${status.index + 1}].description" type="text" value="${attach.description}"  class="form-control layui-input" placeholder="请输入文件描述" style="width: 100%;height: 100%;padding:0px;background-color: #FFFFFF;" readonly="true" onclick="openInfo('workAttachments${status.index + 1}',this.value)"/></td>
+
+                            <%-- 操作按钮 --%>
+                        <td class="op-td">
+                            <div class="op-btn-box">
+                                    <%-- 收藏按钮 --%>
+                                <c:if test="${showCollectBtn && attach.collectFlag != 1}">
+                                    <a href="javascript:void(0)"
+                                       onclick="collectingAccessory(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/projectAccessory/projectAccessory/saveCollectAccessory',
+                                               '${attach.url}','${attach.createBy.id}','${attach.fileSize}')"
+                                       class="op-btn op-btn-delete" style="background-color: #FFB800">
+                                        <i class="layui-icon layui-icon-rate"></i>&nbsp;收藏
+                                    </a>
+                                </c:if>
+
+                                    <%-- 删除按钮 --%>
+                                <c:choose>
+                                    <c:when test="${attach.createBy.id eq fns:getUser().id}">
+                                        <a href="javascript:void(0)"
+                                           onclick="deleteFileFromAliyun(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/sys/workattachment/deleteFileFromAliyun?url=${attach.url}&id=${attach.id}&type=2','addFile')"
+                                           class="op-btn op-btn-delete">
+                                            <i class="fa fa-trash"></i>&nbsp;删除
+                                        </a>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
+                                            <a href="javascript:void(0)"
+                                               onclick="deleteFileFromAliyun(this,'${pageContext.request.contextPath}${fns:getAdminPath()}/sys/workattachment/deleteFileFromAliyun?url=${attach.url}&id=${attach.id}&type=2','addFile')"
+                                               class="op-btn op-btn-delete">
+                                                <i class="fa fa-trash"></i>&nbsp;删除
+                                            </a>
+                                        </shiro:hasPermission>
+                                    </c:otherwise>
+                                </c:choose>
+                            </div>
+                        </td>
+
+                        <%-- 隐藏域(排序和ID) --%>
+                        <td class="hide">
+                            <input id="workAttachments${status.index + 1}_id" name="workAttachments[${status.index + 1}].id" type="hidden" value="${attach.id}"/>
+                            <input id="workAttachments${status.index + 1}_sort" name="workAttachments[${status.index + 1}].sort" type="hidden" value="${attach.sort}"/>
+                        </td>
+                    </tr>
+                </c:forEach>
+            </c:if>
+            </tbody>
+        </table>
+    </div>
+</div>
+
+<%-- 隐藏域(存储配置信息,ID已调整) --%>
+<input type="hidden" id="${baseId}_fileCount" value="${not empty attachments ? attachments.size() : 0}">
+<input type="hidden" id="${baseId}_attachTypes" value="${attachTypes}">
+<input type="hidden" id="${baseId}_attachLength" value="${attachLength}">
+
+<%-- 组件脚本逻辑(所有ID引用已同步调整) --%>
+<script type="text/javascript">
+    // 初始化文件上传组件
+    $(document).ready(function() {
+        // 初始化文件排序
+        var ${baseId}_attachmentFile = $("#${baseId}_fileList tr").length;
+        for(var i = 0 ; i < ${baseId}_attachmentFile; i++){
+            let val = $("#${baseId}_fileList").find("tr").eq(i).find("input").eq(0).attr("name");
+            if(val.indexOf("[") != -1){
+                var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
+                $("#${baseId}_attach"+number+"_sort").val(i+1);
+            }else{
+                $("#"+val+"sort").val(i+1);
+            }
+        }
+
+        // 绑定上传按钮点击事件(ID已调整)
+        $("#${baseId}_btn").click(function () {
+            $("#${baseId}_file").click();
+        });
+
+        // 表格拖拽排序(ID已调整)
+        $("#${baseId}_upTable tbody").sortable({
+            helper: ${baseId}_fixHelperModified,
+            stop: ${baseId}_updateIndex,
+            update : function(event, ui){
+                var ${baseId}_attachmentFile = $("#${baseId}_fileList tr").length;
+                for(var i = 0 ; i < ${baseId}_attachmentFile; i++){
+                    let val = $("#${baseId}_fileList").find("tr").eq(i).find("input").eq(0).attr("name");
+                    if(val.indexOf("[") != -1){
+                        var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
+                        $("#${baseId}_attach"+number+"_sort").val(i+1);
+                    }else{
+                        $("#"+val+"sort").val(i+1);
+                    }
+                }
+            }
+        }).disableSelection();
+    });
+
+    // 文件验证与上传处理
+    function ${baseId}_insertTitle(tValue) {
+        var attachTypes = $("#${baseId}_attachTypes").val();
+        var attachLength = $("#${baseId}_attachLength").val();
+        var suffixResult = 0;
+
+        // 验证文件类型
+        var fileName = tValue.lastIndexOf(".");
+        var fileNameLength = tValue.length;
+        var suffix = tValue.substring(fileName + 1, fileNameLength).toLowerCase();
+        if(attachTypes && attachTypes.trim() !== ''){
+            var attachTypeList = attachTypes.toLowerCase().split(",");
+            for (var x in attachTypeList) {
+                if(attachTypeList[x] == suffix){
+                    suffixResult = 1;
+                    break;
+                }
+            }
+            if(suffixResult == 0 ){
+                top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                return false;
+            }
+        }
+
+        // 验证文件大小并上传
+        var files = $("#${baseId}_file")[0].files;
+        var ${baseId}_size = $("#${baseId}_fileList tr").length;
+        for(var i = 0;i < files.length;i++) {
+            var file = files[i];
+            var fileSize = (file.size/(1024 * 1024)).toFixed(2);
+            if(attachLength && attachLength.trim() !== '') {
+                if (parseFloat(fileSize) > parseFloat(attachLength)) {
+                    top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+                    return false;
+                }
+            }
+
+            // 调用OSS上传(ID已调整)
+            var attachmentId = "";
+            var attachmentFlag = "${attachmentFlag}";
+            var uploadPath = "${ossDomain}/${storeAs}";
+            var divId = "_${baseId}";
+            $("#${baseId}_addFile").show();
+            var fileCount = $("#${baseId}_fileCount").val();
+            $("#${baseId}_fileCount").val(parseInt(fileCount)+1);
+            multipartUploadWithStsOnProcessAccessory("${storeAs}", file, attachmentId, attachmentFlag, uploadPath, divId, ${baseId}_size, fileCount);
+        }
+    }
+
+    // 收藏文件处理
+    function ${baseId}_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});
+                }
+            }
+        });
+    }
+
+    // 拖拽辅助方法
+    var ${baseId}_fixHelperModified = function(e, tr) {
+        var $originals = tr.children();
+        var $helper = tr.clone();
+        $helper.children().each(function(index) {
+            $(this).width($originals.eq(index).width())
+        });
+        return $helper;
+    };
+
+    // 拖拽后更新序号
+    var ${baseId}_updateIndex = function(e, ui) {
+        $('td.index', ui.item.parent()).each(function (i) {
+            $(this).html(i + 1);
+        });
+    };
+
+    // 生成collectSelect的唯一函数(保持不变)
+    function searchGrid${collectId}() {
+        var uri = "${collectUrl}";
+
+        // 1. 对每个参数值单独用encodeURIComponent编码(处理|、&、中文等所有特殊字符)
+        var fieldLabels = encodeURIComponent("${collectFieldLabels}");
+        var fieldKeys = encodeURIComponent("${collectFieldKeys}");
+        var searchLabel = encodeURIComponent("${collectSearchLabel}");
+        var searchKey = encodeURIComponent("${collectSearchKey}");
+
+        // 2. 拼接URL(无需整体encodeURI,因参数值已单独编码)
+        var fullUrl = uri + "?fieldLabels=" + fieldLabels
+            + "&fieldKeys=" + fieldKeys
+            + "&searchLabel=" + searchLabel
+            + "&searchKey=" + searchKey;
+
+        top.layer.open({
+            type: 2,
+            area: ['90%', '90%'],
+            title: "${collectTitle}",
+            skin: "two-btns",
+            name: 'friend',
+            content: fullUrl, // 直接使用拼接好的URL
+            btn: ['确定', '关闭'],
+            yes: function(index, layero) {
+                var iframeWin = layero.find('iframe')[0].contentWindow;
+                var item = iframeWin.getSelectedItem();
+                if (item == "-1" || item.length === 0) {
+                    return;
+                }
+                ${baseId}QuoteCollectCollection(item);
+                top.layer.close(index);
+            },
+            cancel: function(index) {}
+        });
+    }
+
+    function ${baseId}QuoteCollectCollection(tValue){
+        var attachTypes = $("#${baseId}_attachTypes").val();
+        var attachLength = $("#${baseId}_attachLength").val();
+        var suffixResult = 0;
+
+        var list = "${attachments}";
+        var size = (list.split('url')).length-1;
+        var files = tValue;
+        for(var i = 0;i<files.length;i++) {
+            var file = files[i];
+
+            var fileName = file.fileName.lastIndexOf(".");
+            var fileNameLength = file.fileName.length;
+            var suffix = file.fileName.substring(fileName + 1, fileNameLength).toLowerCase();
+            // 验证文件类型
+            if(attachTypes && attachTypes.trim() !== ''){
+                var attachTypeList = attachTypes.toLowerCase().split(",");
+                for (var x in attachTypeList) {
+                    if(attachTypeList[x] == suffix){
+                        suffixResult = 1;
+                        break;
+                    }
+                }
+                if(suffixResult == 0 ){
+                    top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+                    return false;
+                }
+            }
+            var fileSize = file.fileSize;
+            console.log("fileSize",fileSize)
+            if(attachLength && attachLength.trim() !== '') {
+                if (parseFloat(fileSize) > parseFloat(attachLength)) {
+                    top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+                    return false;
+                }
+            }
+
+
+
+            var attachmentId = "";
+            var attachmentFlag = '${attachmentFlag}';
+            var storeAs = '${storeAs}';
+            var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+            /*将这段字符串存到数据库即可*/
+            var divId = "_${baseId}";
+            $("#addFile" + divId).show();
+            var fileCount = $("#${baseId}_fileCount").val();
+            $("#${baseId}_fileCount").val(parseInt(fileCount)+1);
+            multipartUploadWithStsCollectionCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
+        }
+    }
+</script>

+ 2 - 2
src/main/webapp/WEB-INF/tags/table/otherFileDisplay.tag

@@ -15,7 +15,7 @@
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 
 <div class="form-group layui-row">
-    <div class="form-group-label"><h2>${title}2</h2></div>
+    <div class="form-group-label"><h2>${title}</h2></div>
     <div class="layui-item nav-btns">
         <%--<a id="${moduleId}_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
     </div>
@@ -168,7 +168,7 @@
                                         <c:when test="${projectReportRecord.uploadMode == 2}">
                                             <c:choose>
                                                 <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
+                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');"
                                                        class="op-btn op-btn-download">
                                                         <i class="fa fa-download"></i>&nbsp;下载
                                                     </a>

+ 2 - 2
src/main/webapp/WEB-INF/tags/table/otherFileInstallDisplay.tag

@@ -45,7 +45,7 @@
 </c:choose>
 
 <div class="form-group layui-row">
-    <div class="form-group-label"><h2>${title}1</h2></div>
+    <div class="form-group-label"><h2>${title}</h2></div>
 
     <c:if test="${showAddButtonValue}">
         <div class="layui-item nav-btns">
@@ -106,7 +106,7 @@
                     <td class="op-td">
                         <div class="op-btn-box">
                             <c:if test="${showEditBtnValue}">
-                                <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectId}&uploadMode=${uploadMode}','70%','80%',false,'inputForm','upTable_${moduleId}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                <a href="javascript:void(0)"  onclick="openBill2('编辑附件1', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectId}&uploadMode=${uploadMode}','70%','80%',false,'inputForm','upTable_${moduleId}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
                             </c:if>
                         </div>
                     </td>

+ 18 - 191
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAudit.jsp

@@ -36,12 +36,12 @@
 				}
 			});
 
-			$("#attachment_btn").click(function () {
+			/*$("#attachment_btn").click(function () {
 				$("#attachment_file").click();
-			});
+			});*/
 		});
 
-		function insertTitle(tValue){
+		/*function insertTitle(tValue){
 			var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
 				var attachmentId = "";
 				var attachmentFlag = "182";
@@ -49,11 +49,11 @@
 				var timestamp=new Date().getTime();
 
 				var storeAs = "businessQuestions";
-				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
 				var divId = "_attachment";
 				$("#addFile"+divId).show();
 				multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-		}
+		}*/
 	</script>
 </head>
 <body>
@@ -153,194 +153,21 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-						<%--<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="listAttachment" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-
-									<%-- <td>${status.index + 1}</td>--%>
-								<c:choose>
-									<c:when test="${businessQuestions.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-														<c:choose>
-															<c:when test="${businessQuestions.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>
-																				<c:choose>
-																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																			</c:when>
-																			<c:otherwise>
-																				<c:choose>
-																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-								</c:choose>
+			<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+			<!-- attachmentFlag="6" 附件标识 -->
+			<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+			<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+			<table:attachmentManager
+					title="附件信息"
+					addBtnText="添加附件"
+					baseId="attachment"
+					attachments="${businessQuestions.workAttachments}"
+					fileHandlerFuncName="insertTitle"
+					attachmentFlag="182"
+					storeAs="businessQuestions"
+			/>
 
-								<td>${workClientAttachment.createBy.name}</td>
-								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-											<%--附件下载删除--%>
-										<c:choose>
-											<c:when test="${businessQuestions.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
 
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
 		</div>
 		<div class="form-group layui-row">
 			<div class="form-group-label"><h2>意见</h2></div>

+ 19 - 190
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsForm.jsp

@@ -59,9 +59,9 @@
                 }
             });
 
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 
             laydate.render({
                 elem: '#expectationClosingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
@@ -72,7 +72,7 @@
         });
 
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
                 var attachmentId = "";
                 var attachmentFlag = "182";
@@ -80,11 +80,11 @@
                 var timestamp=new Date().getTime();
 
                 var storeAs = "businessQuestions";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
     </script>
 </head>
@@ -145,194 +145,23 @@
                         <sys:ckeditor replace="contents" uploadPath="/oa/oa"/>
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>附件信息</h2></div>
-                    <div class="layui-item nav-btns">
-                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                        <%--<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>
-                        <b><span id="baifenbi_attachment" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="listAttachment" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="200px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr>
 
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${businessQuestions.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                            <c:choose>
-                                                                <c:when test="${businessQuestions.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>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                </c:when>
-                                                                                <c:otherwise>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </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" >
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${businessQuestions.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-                                            <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>
+                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                <!-- attachmentFlag="6" 附件标识 -->
+                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                <table:attachmentManager
+                        title="附件信息"
+                        addBtnText="添加附件"
+                        baseId="attachment"
+                        attachments="${businessQuestions.workAttachments}"
+                        fileHandlerFuncName="insertTitle"
+                        attachmentFlag="182"
+                        storeAs="businessQuestions"
+                />
+
 
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
             </div>
 
             <div class="form-group layui-row page-end"></div>

+ 18 - 189
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsModify.jsp

@@ -59,9 +59,9 @@
                 }
             });
 
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 
             laydate.render({
                 elem: '#expectationClosingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
@@ -72,7 +72,7 @@
         });
 
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
                 var attachmentId = "";
                 var attachmentFlag = "182";
@@ -80,11 +80,11 @@
                 var timestamp=new Date().getTime();
 
                 var storeAs = "businessQuestions";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
     </script>
 </head>
@@ -184,192 +184,21 @@
                 </div>
 
 
+                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                <!-- attachmentFlag="6" 附件标识 -->
+                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                <table:attachmentManager
+                        title="附件信息"
+                        addBtnText="添加附件"
+                        baseId="attachment"
+                        attachments="${businessQuestions.workAttachments}"
+                        fileHandlerFuncName="insertTitle"
+                        attachmentFlag="182"
+                        storeAs="businessQuestions"
+                />
 
 
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>附件信息</h2></div>
-                    <div class="layui-item nav-btns">
-                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                    </div>
-                    <div id="addFile_attachment" style="display: none" class="upload-progress">
-                        <span id="fileName_attachment" ></span>
-                        <b><span id="baifenbi_attachment" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="listAttachment" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="200px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr>
-
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${businessQuestions.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                            <c:choose>
-                                                                <c:when test="${businessQuestions.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>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                </c:when>
-                                                                                <c:otherwise>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </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" >
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${businessQuestions.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-                                            <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>
-
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
             </div>
 
             <div class="form-group layui-row page-end"></div>

+ 14 - 176
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsView.jsp

@@ -122,184 +122,22 @@
                 </c:forEach>
 
 
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>附件信息</h2></div>
-                    <div id="addFile_attachment" style="display: none" class="upload-progress">
-                        <span id="fileName_attachment" ></span>
-                        <b><span id="baifenbi_attachment" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="listAttachment" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="200px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr>
 
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${businessQuestions.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                            <c:choose>
-                                                                <c:when test="${businessQuestions.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>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                </c:when>
-                                                                                <c:otherwise>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
+                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                <!-- attachmentFlag="6" 附件标识 -->
+                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                <table:attachmentManager
+                        title="附件信息"
+                        addBtnText="添加附件"
+                        baseId="attachment"
+                        attachments="${businessQuestions.workAttachments}"
+                        fileHandlerFuncName="insertTitle"
+                        attachmentFlag="182"
+                        storeAs="businessQuestions"
+                        showOperateArea="false"
+                />
 
-                                    <td>${workClientAttachment.createBy.name}</td>
-                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                    <td class="op-td">
-                                        <div class="op-btn-box" >
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${businessQuestions.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
             </div>
 
             <div class="form-group layui-row page-end"></div>

+ 0 - 210
src/main/webapp/webpage/modules/externalUnit/capitalDemandFormAuditJfsh.jsp

@@ -179,219 +179,9 @@
 						<form:textarea placeholder="请输入备注" readonly="true" path="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control required judgment"/>
 					</div>
 				</div>
-<%--				<div class="layui-item layui-col-sm6 lw6">--%>
-<%--					<label class="layui-form-label">是否转办:</label>--%>
-<%--					<div class="layui-input-block">--%>
-<%--						<form:radiobutton  class="i-checks" path="ext" value="0" label="转办"  />--%>
-<%--						<form:radiobutton  class="i-checks" path="ext" value="1" label="不转办" checked="true" />--%>
-<%--					</div>--%>
-<%--				</div>--%>
-<%--				<div id="zbr">--%>
-<%--					<div class="layui-item layui-col-sm6 lw6">--%>
 
-<%--						<label class="layui-form-label">转办人:</label>--%>
-<%--						<div class="layui-input-block">--%>
-<%--							<form:select path="turner" cssClass="form-control judgment simple-select">--%>
-<%--								<form:option value="" label=""/>--%>
-<%--								<c:forEach items="${projectMembers}" var="member">--%>
-<%--									<option value="${member.id}" <c:if test="${turner==member.id}">selected</c:if> >${member.name}</option>--%>
-<%--								</c:forEach>--%>
-<%--							</form:select>--%>
-<%--						</div>--%>
-<%--					</div>--%>
-<%--				</div>--%>
 			</div>
-<%--			<div class="form-group-label"><h2>文件管理</h2></div>--%>
-<%--			<div class="layui-item nav-btns">--%>
-<%--				<a id="attachment_btn_conciliationRecords" class="nav-btn nav-btn-add" title="上传文件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
 
-<%--			</div>--%>
-<%--			<div id="addFile_exterProcess" style="display: none" class="upload-progress">--%>
-<%--				<span id="fileName_exterProcess"></span>--%>
-<%--				<b><span id="baifenbi_exterProcess"></span></b>--%>
-<%--				<div class="progress">--%>
-<%--						&lt;%&ndash;进度条&ndash;%&gt;--%>
-<%--					<div id="jindutiao_exterProcess" class="progress-bar" style="width: 0%" aria-valuenow="0">--%>
-<%--					</div>--%>
-<%--				</div>--%>
-<%--			</div>--%>
-<%--			<input id="attachment_file_conciliationRecords" type="file" multiple="multiple"--%>
-<%--				   style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>--%>
-<%--			<span id="attachment_title_conciliationRecords"></span>--%>
-<%--			<div class="layui-item layui-col-xs12" style="padding:0 16px;">--%>
-<%--				<table id="upTable_conciliationRecords" class="table table-bordered table-condensed details">--%>
-<%--					<thead>--%>
-<%--					<tr>--%>
-<%--							&lt;%&ndash; <th>序号</th>&ndash;%&gt;--%>
-<%--						<th>文件</th>--%>
-<%--						<th>上传人</th>--%>
-<%--						<th>上传时间</th>--%>
-<%--						<th width="200px">操作</th>--%>
-<%--					</tr>--%>
-<%--					</thead>--%>
-<%--					<tbody id="file_exterProcess">--%>
-<%--					<c:forEach items="${capitalDemand.workAttachments}" var="workClientAttachment"--%>
-<%--							   varStatus="status">--%>
-<%--						<tr>--%>
-<%--								&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;--%>
-<%--							<c:choose>--%>
-<%--								<c:when test="${capitalDemand.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>--%>
-<%--													<c:choose>--%>
-<%--														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">--%>
-<%--															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>--%>
-<%--													<c:choose>--%>
-<%--														<c:when test="${capitalDemand.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>--%>
-<%--																			<c:choose>--%>
-<%--																				<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">--%>
-<%--																					<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>--%>
-<%--																		</c:when>--%>
-<%--																		<c:otherwise>--%>
-<%--																			<c:choose>--%>
-<%--																				<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')--%>
-<%--                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">--%>
-<%--																					<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>--%>
-<%--														</c:otherwise>--%>
-<%--													</c:choose>--%>
-<%--												</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">--%>
-
-<%--										&lt;%&ndash;附件下载删除&ndash;%&gt;--%>
-<%--									<c:choose>--%>
-<%--										<c:when test="${capitalDemand.uploadMode == 2}">--%>
-<%--											<c:choose>--%>
-<%--												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">--%>
-<%--													<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>--%>
-<%--												</c:when>--%>
-<%--												<c:otherwise>--%>
-<%--													<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>--%>
-<%--												</c:otherwise>--%>
-<%--											</c:choose>--%>
-<%--										</c:when>--%>
-<%--										<c:otherwise>--%>
-<%--											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>--%>
-<%--										</c:otherwise>--%>
-<%--									</c:choose>--%>
-<%--									<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">--%>
-<%--										<a href="javascript:void(0)"--%>
-<%--										   onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteExterFileFromAliyun?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>--%>
-<%--&lt;%&ndash;									<c:if test="${workClientAttachment.collectFlag != 1}">&ndash;%&gt;--%>
-<%--&lt;%&ndash;										<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn layui-btn-warm" >&nbsp;收藏</a>&ndash;%&gt;--%>
-<%--&lt;%&ndash;									</c:if>&ndash;%&gt;--%>
-<%--								</div>--%>
-<%--							</td>--%>
-<%--						</tr>--%>
-<%--					</c:forEach>--%>
-<%--					</tbody>--%>
-<%--				</table>--%>
-<%--			</div>--%>
 			<div>
 				<div class="form-group layui-row">
 					<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>

+ 18 - 257
src/main/webapp/webpage/modules/knowledgeSharing/knowledgeSharingDetailsForm.jsp

@@ -49,13 +49,13 @@
                 }
             });
 
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
         });
 
 
-        function insertTitle(tValue) {
+        /*function insertTitle(tValue) {
             console.log(files)
             var files = $("#attachment_file")[0].files;
             for (var i = 0; i < files.length; i++) {
@@ -66,12 +66,12 @@
                 var timestamp = new Date().getTime();
 
                 var storeAs = "knowledgeSharingInfo";
-                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile" + divId).show();
                 multipartUploadWithStsToDify(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, 0);
             }
-        }
+        }*/
 
     </script>
 </head>
@@ -116,261 +116,22 @@
                         <sys:ckeditor replace="contents" uploadPath="/oa/oa"/>
                     </div>
                 </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>知识分享附件</h2></div>
-                    <div class="layui-item nav-btns">
-                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                            <%--<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>
-                        <b><span id="baifenbi_attachment"></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple"
-                           style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="listAttachment" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                <!-- <th>序号</th> -->
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                    <th>同步状态</th>
-                                <th width="200px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${knowledgeSharingInfo.workAttachments}" var="workClientAttachment"
-                                       varStatus="status">
-                                <tr>
 
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${knowledgeSharingInfo.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info"
-                                                                           href="javascript:void(0)"
-                                                                           onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                            <c:choose>
-                                                                <c:when test="${knowledgeSharingInfo.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>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td>
-                                                                                                <a class="attention-info"
-                                                                                                   href="javascript:void(0)"
-                                                                                                   onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)"
-                                                                                           onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
-                                                                                    </td>
-                                                                                </c:when>
-                                                                                <c:otherwise>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td>
-                                                                                                <a class="attention-info"
-                                                                                                   href="javascript:void(0)"
-                                                                                                   onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </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>
-                                    <c:if test="${not empty knowledgeSharingInfo.id}">
-                                        <td>
-                                            <c:choose>
-                                                <c:when test="${not empty workClientAttachment.syncDifySync}">
-                                                    <c:choose>
-                                                        <c:when test="${workClientAttachment.syncDifySync == '1'}">
-                                                            <span class='layui-badge layui-bg-green'>已同步</span>
-                                                        </c:when>
-                                                        <c:when test="${workClientAttachment.syncDifySync == '2'}">
-                                                            <span class='layui-badge'>无法同步</span>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <span class='layui-badge layui-bg-orange'>未同步</span>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <span class='layui-badge'>未同步</span>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </td>
-                                    </c:if>
-                                    <td class="op-td">
-                                        <div class="op-btn-box">
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${knowledgeSharingInfo.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}"
-                                                               target="_blank" class="op-btn op-btn-download"><i
-                                                                    class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}"
-                                                               class="op-btn op-btn-download"><i
-                                                                    class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
-                                                       class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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" style="background-color: #FFB800"><i
-                                                        class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-                                            <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
-                                                <a href="javascript:void(0)"
-                                                   onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteExterFileFromAliyunByDify?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2&fileName=${workClientAttachment.attachmentName}&difyId=${knowledgeSharingInfo.columnId}','addFile_attachment','_attachment')"
-                                                   class="op-btn op-btn-delete"><i
-                                                        class="fa fa-trash"></i>&nbsp;删除</a>
-                                            </c:if>
+                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                <!-- attachmentFlag="6" 附件标识 -->
+                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                <table:attachmentManager
+                        title="知识分享附件"
+                        addBtnText="添加附件"
+                        baseId="attachment"
+                        attachments="${workClientInfo.workAttachments}"
+                        fileHandlerFuncName="insertTitle"
+                        attachmentFlag="183"
+                        storeAs="knowledgeSharingInfo"
+                />
 
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
             </div>
 
             <div class="form-group layui-row page-end"></div>

+ 14 - 172
src/main/webapp/webpage/modules/knowledgeSharing/knowledgeSharingView.jsp

@@ -86,181 +86,23 @@
                 </div>
             </div>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>知识分享附件</h2></div>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件预览</th>
-                            <th>上传人</th>
-                                    <th>上传时间</th>
-                                    <th>同步状态</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
 
-                        <c:forEach items="${knowledgeSharingInfo.workAttachments}" var="workClientAttachment" varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                <c:choose>
-                                    <c:when test="${knowledgeSharingInfo.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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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: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}"></td>
-                                            </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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.url}','90%','90%')" >${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>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:otherwise>
-                                </c:choose>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${knowledgeSharingInfo.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="183"
+                    storeAs="knowledgeSharingInfo"
+                    showOperateArea="false"
+            />
 
 
-                                <td>${workClientAttachment.createBy.name}</td>
-                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                        <td>
-                                            <c:choose>
-                                                <c:when test="${not empty workClientAttachment.syncDifySync}">
-                                                    <c:choose>
-                                                        <c:when test="${workClientAttachment.syncDifySync == '1'}">
-                                                            <span class='layui-badge layui-bg-green'>已同步</span>
-                                                        </c:when>
-                                                        <c:when test="${workClientAttachment.syncDifySync == '2'}">
-                                                            <span class='layui-badge '>无法同步</span>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <span class='layui-badge  layui-bg-orange'>未同步</span>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <span class='layui-badge'>未同步</span>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </td>
-                                        <td class="op-td">
-                                    <div class="op-btn-box">
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${knowledgeSharingInfo.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-
-                        </tbody>
-                    </table>
-                </div>
-            </div>
 
 
             <div class="form-group layui-row">

+ 14 - 152
src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp

@@ -334,161 +334,23 @@
                         </script>
                     </div>
 
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>通告附件</h2></div>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="150px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-
-                            <c:forEach items="${oaNotify.workAttachments}" var="workClientAttachment" varStatus="status">
-                                <tr>
-                                        <%-- <td>${status.index + 1}</td>--%>
 
-                                    <c:choose>
-                                        <c:when test="${oaNotify.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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: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}"></td>
-                                                </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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${oaNotify.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="107"
+                    storeAs="oaNotify"
+                    showOperateArea="false"
+            />
 
 
-                                    <td>${workClientAttachment.createBy.name}</td>
-                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                    <td class="op-td">
-                                        <div class="op-btn-box">
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${oaNotify.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
 <%--            <div class="form-group layui-row">--%>
 <%--                <div class="form-group-label"><h2>审批意见</h2></div>--%>
 <%--                <div class="layui-item layui-col-sm8 lw6 with-textarea">--%>

+ 21 - 171
src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp

@@ -86,9 +86,9 @@
                 type : 'datetime'
                 , trigger: 'click'
             });
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 
             var ext = ${oaNotify.ext};
             if (ext == 1) {
@@ -101,7 +101,7 @@
         });
     </script>
     <script type="text/javascript">
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${oaNotify.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;
@@ -114,12 +114,12 @@
 
                 var storeAs = "oaNotify";
                 var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
-                /*将这段字符串存到数据库即可*/
+                /!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile" + divId).show();
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
             }
-        }
+        }*/
         function insertTitleCollection(tValue){
             var list = "${oaNotify.workAttachments}";
             var size = (list.split('url')).length-1;
@@ -384,173 +384,23 @@
                     }
                 </script>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                    <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>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件预览</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="200px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${oaNotify.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${oaNotify.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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: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}"></td>
-                                                </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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.url}','90%','90%')" >${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>
-                                                </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" >
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${oaNotify.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                        <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>
 
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${oaNotify.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="107"
+                    storeAs="oaNotify"
+            />
+
+
             <div class="form-group layui-row page-end"></div>
         </form:form>
     </div>

+ 19 - 171
src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp

@@ -82,14 +82,14 @@
                 type : 'datetime'
                 , trigger: 'click'
             });
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 
         });
     </script>
     <script type="text/javascript">
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${oaNotify.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;
@@ -102,12 +102,12 @@
 
                 var storeAs = "oaNotify";
                 var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
-                /*将这段字符串存到数据库即可*/
+                /!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile" + divId).show();
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
             }
-        }
+        }*/
 
         function changeUser(ids,names,parents) {
             var split = ids.split(',');
@@ -356,175 +356,23 @@
                     }
                 </script>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                    <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>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件预览</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="200px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${oaNotify.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                <c:choose>
-                                    <c:when test="${oaNotify.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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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: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}"></td>
-                                            </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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.url}','90%','90%')" >${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>
-                                            </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" >
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${oaNotify.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                        <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>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${oaNotify.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="107"
+                    storeAs="oaNotify"
+            />
+
 
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >

+ 14 - 151
src/main/webapp/webpage/modules/oa/oaNotifyView.jsp

@@ -215,160 +215,23 @@
             </c:if>
 
             <c:if test="${!empty oaNotify.workAttachments}">
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>通告附件</h2></div>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="150px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
 
-                            <c:forEach items="${oaNotify.workAttachments}" var="workClientAttachment" varStatus="status">
-                                <tr>
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${oaNotify.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" >${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: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}"></td>
-                                                </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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'avi')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'wmv')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpg')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mpeg')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mov')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rm')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ram')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'swf')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'flv')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'mp4')
-                                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'rmvb')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openDialogView('预览','${ctx}/sys/picturepreview/videoPreview?url=${workClientAttachment.url}','90%','90%')" >${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>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
+                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                <!-- attachmentFlag="6" 附件标识 -->
+                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                <table:attachmentManager
+                        title="附件信息"
+                        addBtnText="添加附件"
+                        baseId="attachment"
+                        attachments="${oaNotify.workAttachments}"
+                        fileHandlerFuncName="insertTitle"
+                        attachmentFlag="107"
+                        storeAs="oaNotify"
+                        showOperateArea="false"
+                />
 
 
-                                    <td>${workClientAttachment.createBy.name}</td>
-                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                    <td class="op-td">
-                                        <div class="op-btn-box">
-                                                <%--附件下载删除--%>
-                                            <c:choose>
-                                                <c:when test="${oaNotify.uploadMode == 2}">
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:otherwise>
-                                            </c:choose>
-                                            <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                            </c:if>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
             </c:if>
             <!--在“我的通告”中只能查看到个人接收的,只改变未读状态为已读,不显示所有的查看状态;
             在“通告管理”中只有管理员权限才能查看,显示该条通告的所有查看状态;

+ 20 - 95
src/main/webapp/webpage/modules/processProjectPlan/plan/processProjectPlanForm.jsp

@@ -55,19 +55,19 @@
 
         });
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
                 var attachmentId = "";
                 var attachmentFlag = "131";
-                /*console.log(file);*/
+                /!*console.log(file);*!/
                 var timestamp=new Date().getTime();
 
                 var storeAs = "projectPlan";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
 
         laydate.render({
@@ -87,9 +87,9 @@
             var vs = document.getElementById("projectPlanList"+idx+"_projectStage").value;
         }
 
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
-        }
+        }*/
 
         function addRow(list, idx, tpl, row){
             var idx1 = $("#projectPlanList tr").length;
@@ -258,96 +258,21 @@
                 </div>
             </div>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>项目计划附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                        <%--<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/project/projectPlan/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>--%>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12 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_attachment">
-                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr class="trIdAdds">
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                        <c:choose>
-                                            <c:when test="${projectRecords.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                            </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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        <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>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="项目计划附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectRecords.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="131"
+                    storeAs="projectPlan"
+            />
+
 
             <div class="form-group layui-row page-end"></div>
         </form:form>

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

@@ -52,7 +52,6 @@
 						let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
 						if(val.indexOf("[") != -1){
 							var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
-							console.log($("#workAttachments"+number+"_sort").val())
 							$("#workAttachments"+number+"_sort").val(i+1);
 						}else{
 							$("#"+val+"sort").val(i+1);
@@ -67,7 +66,6 @@
 		function insertTitle(tValue){
 			//文件后缀名
 			var attachTypes = $("#attachTypes").val();
-			console.log("attachTypes",attachTypes)
 			//文件大小
 			var attachLength = $("#attachLength").val();
 			var suffixResult = 0;
@@ -107,7 +105,6 @@
 				}
 				var attachmentId = "";
 				var attachmentFlag = "100";
-				console.log(file);
 				var timestamp=new Date().getTime();
 
 				var storeAs = "workAttachment";
@@ -121,9 +118,7 @@
 
 		function insertTitleCollection(tValue){
 			//文件后缀名
-			console.log(tValue);
 			var attachTypes =$("#attachTypes").val();
-			console.log(attachTypes);
 			//文件大小
 			var attachLength = $("#attachLength").val();
 			var suffixResult = 0;
@@ -162,7 +157,6 @@
 				}
 				var attachmentId = "";
 				var attachmentFlag = "100";
-				console.log(file);
 				var timestamp=new Date().getTime();
 
 				var storeAs = "workAttachment";
@@ -214,7 +208,6 @@
 		}
 
 		function openInfo(id,value) {
-			console.log(id);
 			top.layer.open({
 				type: 2,
 				area: ['80%','65%'],
@@ -226,13 +219,10 @@
 				yes: function(index, layero){
 					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
 					var item = iframeWin.getSelectedItem();
-					console.log(item);
 					if(item == "-1"){
 						return;
 					}
 					var items = item.split('_item_');
-					console.log(items)
-					console.log(id)
 
 					$("#"+id+"_description").val(items[1]);
 					top.layer.close(index);//关闭对话框。
@@ -252,143 +242,22 @@
 			<form:hidden path="attachTypes"/>
 			<form:hidden path="attachLength"/>
 			<input type="hidden" id="fileCount" value="">
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th width="30%">文件预览</th>
-							<th width="80px">上传人</th>
-							<th width="160px">上传时间</th>
-							<th width="30%" >文件描述</th>
-							<th width="200px">操作</th>
-							<th class="hide"></th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectTemplateInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr class="attachmentClass${status.index} trIdAdds">
-								<input type="hidden" id="workAttachments${status.index + 1}_" name="workAttachments${status.index + 1}_" value="${workClientAttachment.id}" />
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${projectTemplateInfo.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}" title="${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)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)" title="${workClientAttachment.attachmentName}">${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}" title="${workClientAttachment.attachmentName}"></td>
-													</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)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)" title="${workClientAttachment.attachmentName}">${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 style="padding:0px"><input id="workAttachments${status.index + 1}_description" name="workAttachments[${status.index + 1}].description" type="text" value="${workClientAttachment.description}"  class="form-control layui-input" placeholder="请输入文件描述" style="width: 100%;height: 100%;padding:0px;background-color: #FFFFFF;" readonly="true" onclick="openInfo('workAttachments${status.index + 1}',this.value)"/></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<span>
-										</span>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<c:choose>
-											<c:when test="${workClientAttachment.createBy.id eq fns:getUser().id}">
-												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
-											</c:when>
-											<c:otherwise>
-												<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
-													<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
-												</shiro:hasPermission>
-											</c:otherwise>
-										</c:choose>
+			<table:fileUpload
+					title="附件信息"
+					addBtnText="添加附件"
+					baseId="attachment"
+					attachments="${projectTemplateInfo.workAttachments}"
+					storeAs="workAttachment"
+					attachmentFlag="100"
+					attachTypes="${projectTemplateInfo.attachTypes}"
+					attachLength="${projectTemplateInfo.attachLength}"
+			/>
 
-									</div>
-								</td>
-								<td class="hide">
-									<input id="workAttachments${status.index + 1}_id" name="workAttachments[${status.index + 1}].id" type="hidden" value="${workClientAttachment.id}"/>
-									<input id="workAttachments${status.index + 1}_sort" name="workAttachments[${status.index + 1}].sort" type="hidden" value="${workClientAttachment.sort}"/>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
+
+			
 		</form:form>
 	</div>
 </div>
-<script>
-
-		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()
-					//关闭当前页
-					top.layer.close(index)
-					parent.layer.msg(data.str,{icon:1});
-				}else {
-					parent.layer.msg(data.str,{icon:2});
-				}
-			}
-		});
-	}
-</script>
 </body>
 </html>

+ 23 - 94
src/main/webapp/webpage/modules/projectConstruction/projectConstructionForm.jsp

@@ -167,24 +167,24 @@
             return false;
         }
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
                 var attachmentId = $("#id").val();
                 var attachmentFlag = "134";
-                /*console.log(file);*/
+                /!*console.log(file);*!/
                 var timestamp=new Date().getTime();
 
                 var storeAs = "projectRecords";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
+*/
 
-
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
-        }
+        }*/
 
         function addRow(list, idx, tpl, row){
             bornTemplete(list, idx, tpl, row, idx);
@@ -384,95 +384,24 @@
                     </div>
                 </div>
             </div>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2><span class="require-item">*</span>附件信息</h2></div>
-                <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>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12 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_attachment">
-                        <c:forEach items="${constructionContract.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr class="trIdAdds">
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                        <c:choose>
-                                            <c:when test="${constructionContract.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                            </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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        <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>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${constructionContract.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="134"
+                    storeAs="projectRecords"
+            />
+
+
         </form:form>
     </div>
 </div>

+ 20 - 119
src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp

@@ -48,12 +48,12 @@
                 type : 'date'
 , trigger: 'click'
             });
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
         });
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
             var attachmentFlag = "85";
@@ -61,11 +61,11 @@
             var timestamp=new Date().getTime();
 
             var storeAs = "basedData";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
 			multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,"0");}
-        }
+        }*/
 
         function setValuee(obj){
             var divId = "_attachment";
@@ -122,122 +122,23 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-				</div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<%--<th>是否引用成果文件</th>--%>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectcontentinfo.projectAchievementFileData.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${projectcontentinfo.projectAchievementFileData.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}1</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}2</a></td>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
 
-								<td>
-									<input type="hidden" name="workClientAttachment.quoteResult" value="${workClientAttachment.quoteResult}">
-									${workClientAttachment.createBy.name}
-								</td>
-								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-											<%--附件下载删除--%>
-										<c:choose>
-											<c:when test="${projectcontentinfo.projectAchievementFileData.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
 
-										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
-											<c:if test="${workClientAttachment.quoteResult==1}">
-												<a href="javascript:void(0)" onclick="quoteDeleteFileFromAliyun(this,'${ctx}/projectcontentinfo/projectBasedData/deleteBasedDataAndWorkAttachment?basedDataId=${projectcontentinfo.projectAchievementFileData.id}&workAttachmentId=${workClientAttachment.id}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
-											</c:if>
-											<c:if test="${workClientAttachment.quoteResult==0}">
-												<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>
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
+			<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+			<!-- attachmentFlag="6" 附件标识 -->
+			<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+			<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+			<table:attachmentManager
+					title="附件信息"
+					addBtnText="添加附件"
+					baseId="attachment"
+					attachments="${projectcontentinfo.projectAchievementFileData.workAttachments}"
+					fileHandlerFuncName="insertTitle"
+					attachmentFlag="85"
+					storeAs="basedData"
+			/>
+
+
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>

+ 40 - 276
src/main/webapp/webpage/modules/projectrecord/monthly/monthlyContentForm.jsp

@@ -36,7 +36,7 @@
             if(validateForm.form()){
 
                 var length = document.getElementById("file_monthly");
-                var rows = length.rows.length;
+                var rows = length.rows.length;
                 if(rows<=0){
                     layer.msg('请上传月报信息', {icon: 5});
                     return false;
@@ -93,12 +93,12 @@
                 $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
             }
             initControlData("1");
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
             });
             $("#monthly_btn").click(function () {
                 $("#monthly_file").click();
-            });
+            });*/
         });
 
 
@@ -200,38 +200,38 @@
 
 
 
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
         }
         function addMonthlyFile() {
             $("#monthly_file").click();
-        }
+        }*/
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
             var attachmentFlag = "94";
             var timestamp=new Date().getTime();
 
                 var storeAs = "monthlyContent";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
-        function insertMonthlyTitle(tValue){
+        /*function insertMonthlyTitle(tValue){
             var files = $("#monthly_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var monthlyId = "";
             var monthlyFlag = "94";
             var timestamp=new Date().getTime();
 
                 var storeAs = "monthlyContent";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_monthly";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,monthlyId,monthlyFlag,uploadPath,divId,0);}
-        }
+        }*/
 
         function openDialogreControl(title,url,width,height,target){
             if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
@@ -705,273 +705,37 @@
                     return false;
                 }
             </script>
-            <%--<div class="form-group layui-row">
-                <div class="form-group-label"><h2>过程控制明细</h2></div>
-                <div class="layui-item nav-btns">
-                    <a href="javascript:void(0)" onclick="openDialogreControl('新增控制表格', '${ctx}/projectcontroltable/projectControlTable/form?pfId=${projectcontentinfo.project.id}','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
-                </div>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="contentTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                                <th  >表格名称</th>
-                                <th  >表格类型</th>
-                                <th  >负责人</th>
-                                <th  >创建日期</th>
-                                <th>操作</th>
-                            </tr>
-                        </thead>
-                        <tbody id="projectControlTables">
-                    <c:choose>
-                        <c:when test="${not empty projectcontentinfo.projectContentData.projectControlTableList}">
-                            <c:forEach items="${projectcontentinfo.projectContentData.projectControlTableList}" var="projectControlTable" varStatus="status">
-                                <tr id="tr${status.index}">
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.tName}
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].id" value="${projectControlTable.id}">
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tName" value="${projectControlTable.tName}">
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].pfId" value="${projectControlTable.pfId}">
-                                    </td>
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.processName}
-                                        <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tType" value="${projectControlTable.tType}">
-                                    </td>
-                                    <td style="text-align:center;">
-                                            ${projectControlTable.tUser.name}
-                                    </td>
-                                    <td style="text-align:center;">
-                                        <fmt:formatDate value="${projectControlTable.createDate}" pattern="yyyy-MM-dd" />
-                                            &lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].createDate" value="${projectControlTable.createDate}">&ndash;%&gt;
-                                            &lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].updateDate" value="${projectControlTable.updateDate}">&ndash;%&gt;
-                                            &lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].delFlag" value="${projectControlTable.delFlag}">&ndash;%&gt;
-                                            &lt;%&ndash;<input type="hidden" name="projectControlTableList[${status.index}].createBy.id" value="${projectControlTable.createBy.id}">&ndash;%&gt;
-                                    </td>
-                                    <td class="op-td text-center">
-                                        <div class="op-btn-box">
-                                        <a href="#" onclick="openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?id=${projectControlTable.id}&view=view','90%', '90%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
-                                        <a href="javascript:initControlData('0','#tr${status.index}','del','${projectControlTable.id}')" onclick="return confirmx('确认要删除该过程控制数据吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                        </c:when>
-                        <c:otherwise>
-                            <tr>
-                                <td colspan="5" align="center">暂无数据</td>
-                            </tr>
-                        </c:otherwise>
-                    </c:choose>
-                    </tbody>
-                    </table>
-                </div>
-            </div>--%>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2><span class="require-item">*</span>月报</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="monthly_btn" class="nav-btn nav-btn-add" title="添加月报"><i class="fa fa-plus"></i>&nbsp;添加月报</a>
-                    <a class="nav-btn nav-btn-export" title="下载月报模板"  onclick="window.location.href='${ctx}/project/monthlyConsultationReport/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
-                </div>
-                <div id="addFile_monthly" style="display: none" class="upload-progress">
-                    <span id="fileName_monthly" ></span>
-                    <b><span id="baifenbi_monthly" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_monthly" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="monthly_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertMonthlyTitle(this.value);"/>
-                <span id="monthly_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upMonthlyTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_monthly">
-                        <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <c:if test="${workClientAttachment.divIdType =='_monthly'}">
-                                <tr>
-                                    <c:choose>
-                                        <c:when test="${projectcontentinfo.projectContentData.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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-                                                </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>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                        </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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-
-                                            <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','addMonthlyFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
-                                            </c:if>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:if>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <c:if test="${workClientAttachment.divIdType =='_attachment'}">
-                                <tr>
-                                    <c:choose>
-                                        <c:when test="${projectcontentinfo.projectContentData.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}"></td>
-                                                </c:when>
-                                                <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>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${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}"></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-
-                                            <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">A
-                                                <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> 删除</a>
-                                            </c:if>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:if>
-                        </c:forEach>
-                </tbody>
-                    </table>
-                </div>
-            </div>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title='<span class="require-item">*</span>月报'
+                    addBtnText="添加月报"
+                    baseId="monthly"
+                    attachments="${projectcontentinfo.projectContentData.workMonthlyAttachments}"
+                    fileHandlerFuncName="insertMonthlyTitle"
+                    attachmentFlag="94"
+                    storeAs="monthlyContent"
+            />
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectcontentinfo.projectContentData.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="monthlyContent"
+            />
+
 
 
 

+ 32 - 168
src/main/webapp/webpage/modules/projectrecord/monthly/monthlyContentView.jsp

@@ -747,175 +747,39 @@
                 </div>
             </div>--%>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2><span class="require-item">*</span>月报</h2></div>
-                <div id="addFile_monthly" style="display: none" class="upload-progress">
-                    <span id="fileName_monthly" ></span>
-                    <b><span id="baifenbi_monthly" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_monthly" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="monthly_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertMonthlyTitle(this.value);"/>
-                <span id="monthly_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upMonthlyTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_monthly">
-                        <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <c:if test="${workClientAttachment.divIdType =='_monthly'}">
-                                <tr>
-                                    <c:choose>
-                                        <c:when test="${projectcontentinfo.projectContentData.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}"></td>
-                                                </c:when>
-                                                <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>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${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}"></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:if>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <c:if test="${workClientAttachment.divIdType =='_attachment'}">
-                                <tr>
-                                    <c:choose>
-                                        <c:when test="${projectcontentinfo.projectContentData.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}"></td>
-                                                </c:when>
-                                                <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>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:if>
-                        </c:forEach>
-                </tbody>
-                    </table>
-                </div>
-            </div>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title= '<span class="require-item">*</span>月报'
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectcontentinfo.projectContentData.workMonthlyAttachments}"
+                    fileHandlerFuncName="insertMonthlyTitle"
+                    attachmentFlag="94"
+                    storeAs="monthlyContent"
+                    showOperateArea="false"
+            />
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectcontentinfo.projectContentData.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="monthlyContent"
+                    showOperateArea="false"
+            />
+
+
             <div class="form-group layui-row page-end">
             <br>
             <br>

+ 20 - 139
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp

@@ -80,15 +80,15 @@
 
         });
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
                 var attachmentId = "";
                 var attachmentFlag = "131";
-                /*console.log(file);*/
+                /!*console.log(file);*!/
                 var timestamp=new Date().getTime();
 
                 var storeAs = "projectPlan";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
@@ -101,12 +101,12 @@
                 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({
@@ -128,9 +128,9 @@
             var vs = document.getElementById("projectPlanList"+idx+"_projectStage").value;
         }
 
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
-        }
+        }*/
 
         function addRow(list, idx, tpl, row){
             var idx1 = $("#projectPlanList tr").length;
@@ -299,140 +299,21 @@
                 </div>
             </div>
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>项目计划附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  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>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12 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="200px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr class="trIdAdds">
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                        <c:choose>
-                                            <c:when test="${projectRecords.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>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                            </c:otherwise>
-                                        </c:choose>
-
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="项目计划附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectRecords.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="131"
+                    storeAs="projectPlan"
+            />
 
-                                <td>${workClientAttachment.createBy.name}</td>
-                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                <td class="op-td">
-                                    <div class="op-btn-box" >
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${projectRecords.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFilesFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
 
             <div class="form-group layui-row page-end"></div>
         </form:form>

+ 1 - 65
src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp

@@ -1773,71 +1773,7 @@
                     </script>
                 </div>
             </div>
-            <%--end--%>
-            <%--<div class="form-group layui-row">
-                <div class="form-group-label"><h2><span class="require-item">*</span>项目计划附件信息</h2></div>
-                <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/projectRecords/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12 form-table-container">
-                    <table id="listAttachment" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                &lt;%&ndash; <th>序号</th>&ndash;%&gt;
-                            <th width="25%">文件</th>
-                            <th width="25%">上传人</th>
-                            <th width="25%">上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr class="trIdAdds">
-                                    &lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-                                <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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
-                                            </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>
-                                        <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>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>--%>
+
 
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>项目组成员列表</h2></div>

+ 18 - 82
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowAudit.jsp

@@ -1101,88 +1101,24 @@
                     return false;
                 }
             </script>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectFollowReport.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                <c:choose>
-                                    <c:when test="${projectFollowReport.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                    </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}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${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>
+
+
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="成果文件"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectFollowReport.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="workFloolw"
+                    showOperateArea="false"
+            />
 
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>审批意见</h2></div>

+ 22 - 93
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowForm.jsp

@@ -121,9 +121,9 @@
                 $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
             }
             initControlData("1");
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
         });
 
 
@@ -410,18 +410,18 @@
             $("#attachment_file").click();
         }
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
             var attachmentFlag = "94";
             var timestamp=new Date().getTime();
 
                 var storeAs = "workFloolw";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
         function openDialogreControl(title,url,width,height,target){
             if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
@@ -1190,94 +1190,23 @@
                     return false;
                 }
             </script>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>成果文件</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectFollowReport.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                <c:choose>
-                                    <c:when test="${projectFollowReport.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                    </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}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        <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> 删除</a>
-                                        </c:if>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                </tbody>
-                    </table>
-                </div>
-            </div>
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="成果文件"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectFollowReport.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="workFloolw"
+            />
+
+
         </form:form>
     </div>
 </div>

+ 22 - 91
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowModify.jsp

@@ -350,7 +350,7 @@
             }
         }
 
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
         }
 
@@ -361,11 +361,11 @@
             var timestamp=new Date().getTime();
 
             var storeAs = "workFloolw";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
         function openDialogreControl(title,url,width,height,target){
             if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
@@ -1142,94 +1142,25 @@
                     return false;
                 }
             </script>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>成果文件</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                </div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectFollowReport.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                <c:choose>
-                                    <c:when test="${projectFollowReport.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                    </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}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        <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> 删除</a>
-                                        </c:if>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                </tbody>
-                    </table>
-                </div>
-            </div>
+
+
+
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="成果文件"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectFollowReport.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="workFloolw"
+            />
+
+
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >

+ 20 - 85
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowView.jsp

@@ -346,7 +346,7 @@
             }
         }
 
-        function addFile() {
+        /*function addFile() {
             $("#attachment_file").click();
         }
 
@@ -357,11 +357,11 @@
             var timestamp=new Date().getTime();
 
             var storeAs = "workFollow";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
         function openDialogreControl(title,url,width,height,target){
             if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
@@ -1097,88 +1097,23 @@
                     return false;
                 }
             </script>
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>成果文件</h2></div>
-                <div id="addFile_attachment" style="display: none" class="upload-progress">
-                    <span id="fileName_attachment" ></span>
-                    <b><span id="baifenbi_attachment" ></span></b>
-                    <div class="progress">
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                            <tr>
-                            <th>文件名称</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${projectFollowReport.workAttachments}" var = "workClientAttachment" varStatus="status">
-                            <tr>
-                                <c:choose>
-                                    <c:when test="${projectFollowReport.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','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>
-                                                    </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}"></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${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('${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>
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="成果文件"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${projectFollowReport.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="94"
+                    storeAs="workFloolw"
+                    showOperateArea="false"
+            />
+
+
         </form:form>
     </div>
 </div>

+ 9 - 166
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -1556,172 +1556,15 @@
 			</div>
 
 			<c:if test="${projectRecords.attachmentProjectSort == 8}">
-				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>审定单签章附件信息</h2></div>
-					<div class="layui-item nav-btns">
-						<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-						<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
-					</div>
-					<div id="addFile_attachment_judgement" style="display: none" class="upload-progress">
-						<span id="fileName_attachment_judgement" ></span>
-						<b><span id="baifenbi_attachment_judgement" ></span></b>
-						<div class="progress">
-							<div id="jindutiao_attachment_judgement" class="progress-bar" style="width: 0%" aria-valuenow="0">
-							</div>
-						</div>
-					</div>
-					<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-					<span id="attachment_title"></span>
-					<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-						<table id="listAttachment" class="table table-bordered table-condensed details">
-							<thead>
-							<tr>
-									<%-- <th>序号</th>--%>
-								<th>文件预览</th>
-								<th>上传人</th>
-								<th>上传时间</th>
-								<th width="180px">操作</th>
-							</tr>
-							</thead>
-							<tbody id="file_attachment_judgement">
-							<c:forEach items="${projectcontentinfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr>
-										<%-- <td>${status.index + 1}</td>--%>
-									<c:choose>
-										<c:when test="${projectcontentinfo.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${workReimbursement.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>
-																					<c:choose>
-																						<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																							<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																				</c:when>
-																				<c:otherwise>
-																					<c:choose>
-																						<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																							<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																</c:otherwise>
-															</c:choose>
-														</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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												<%--													<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>--%>
-											<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>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-							</tbody>
-						</table>
-					</div>
-				</div>
+
+				<%-- 2. 调用审定单签章附件组件 --%>
+				<table:approvalSealAttachment
+						title="审定单签章附件信息"
+						baseId="sealAttachment"
+						attachments="${projectcontentinfo.workAttachments}"
+						uploadMode="${projectcontentinfo.uploadMode}"
+						templateUrl='<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href=\'${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate\';"><i class="fa fa-download"></i>&nbsp;下载模板</a>'
+				/>
 			</c:if>
 
 

+ 14 - 166
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -1317,172 +1317,20 @@
 			</div>
 
 			<c:if test="${projectRecords.attachmentProjectSort == 8}">
-				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></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>
-						<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
-					</div>
-					<div id="addFile_attachment_judgement" style="display: none" class="upload-progress">
-						<span id="fileName_attachment_judgement" ></span>
-						<b><span id="baifenbi_attachment_judgement" ></span></b>
-						<div class="progress">
-							<div id="jindutiao_attachment_judgement" class="progress-bar" style="width: 0%" aria-valuenow="0">
-							</div>
-						</div>
-					</div>
-					<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-					<span id="attachment_title"></span>
-					<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-						<table id="listAttachment" class="table table-bordered table-condensed details">
-							<thead>
-							<tr>
-									<%-- <th>序号</th>--%>
-								<th>文件预览</th>
-								<th>上传人</th>
-								<th>上传时间</th>
-								<th width="180px">操作</th>
-							</tr>
-							</thead>
-							<tbody id="file_attachment_judgement">
-							<c:forEach items="${projectcontentinfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr>
-										<%-- <td>${status.index + 1}</td>--%>
-									<c:choose>
-										<c:when test="${projectcontentinfo.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${workReimbursement.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>
-																					<c:choose>
-																						<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																							<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																				</c:when>
-																				<c:otherwise>
-																					<c:choose>
-																						<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																							<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																</c:otherwise>
-															</c:choose>
-														</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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												<%--													<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>--%>
-											<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>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-							</tbody>
-						</table>
-					</div>
-				</div>
+
+
+				<%-- 2. 调用审定单签章附件组件 --%>
+				<table:approvalSealAttachment
+						title='审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span>'
+						baseId="attachment_judgement"
+						attachments="${projectcontentinfo.workAttachments}"
+						uploadMode="${projectcontentinfo.uploadMode}"
+						templateUrl='<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href=\'${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate\';"><i class="fa fa-download"></i>&nbsp;下载模板</a>'
+						attachmentFlag="105"
+						storeAs="projectRecords"
+				/>
+
+
 			</c:if>
 
 				<%-- showAddButton="true" 显示添加按钮 --%>

+ 13 - 147
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageAudit.jsp

@@ -1127,154 +1127,20 @@
 					</div>
 
 					<c:if test="${attachmentProjectSort == 8}">
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></h2></div>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="judgementAttachment" class="table table-bordered table-condensed details">
-								<thead>
-								<tr>
-										<%-- <th>序号</th>--%>
-									<th>文件预览</th>
-									<th>上传人</th>
-									<th>上传时间</th>
-									<th width="180px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment_judgement">
-								<c:forEach items="${projectcontentinfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-									<tr>
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${projectcontentinfo.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																		<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${workReimbursement.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>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																					</c:when>
-																					<c:otherwise>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																	</c:otherwise>
-																</c:choose>
-															</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('${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>
+						<%-- 2. 调用审定单签章附件组件 --%>
+						<table:approvalSealAttachment
+								title='审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span>'
+								baseId="attachment_judgement"
+								showOperateBtn="false"
+								attachments="${projectcontentinfo.workAttachments}"
+								uploadMode="${projectcontentinfo.uploadMode}"
+								templateUrl='<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href=\'${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate\';"><i class="fa fa-download"></i>&nbsp;下载模板</a>'
+								attachmentFlag="105"
+								storeAs="projectRecords"
+						/>
+
+
 						</c:if>
 
 					<div class="form-group layui-row">

+ 12 - 164
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp

@@ -1136,171 +1136,19 @@
             </div>
 
             <c:if test="${attachmentProjectSort == 8}">
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></h2></div>
-                    <div class="layui-item nav-btns">
-                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                    </div>
-                    <div id="addFile_attachment_judgement" style="display: none" class="upload-progress">
-                        <span id="fileName_attachment_judgement" ></span>
-                        <b><span id="baifenbi_attachment_judgement" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment_judgement" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="listAttachment" class="table table-bordered table-condensed details">
-                            <thead>
-                            <tr>
-                                    <%-- <th>序号</th>--%>
-                                <th>文件预览</th>
-                                <th>上传人</th>
-                                <th>上传时间</th>
-                                <th width="180px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment_judgement">
-                            <c:forEach items="${projectcontentinfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                <tr>
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${projectcontentinfo.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="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <c:choose>
-                                                                <c:when test="${workReimbursement.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>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                </c:when>
-                                                                                <c:otherwise>
-                                                                                    <c:choose>
-                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </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('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                <%--													<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>--%>
-                                            <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>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
+
+                <%-- 2. 调用审定单签章附件组件 --%>
+                <table:approvalSealAttachment
+                        title='审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span>'
+                        baseId="attachment_judgement"
+                        attachments="${projectcontentinfo.workAttachments}"
+                        uploadMode="${projectcontentinfo.uploadMode}"
+                        templateUrl='<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href=\'${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate\';"><i class="fa fa-download"></i>&nbsp;下载模板</a>'
+                        attachmentFlag="105"
+                        storeAs="projectRecords"
+                />
+
             </c:if>
 
 

+ 30 - 226
src/main/webapp/webpage/modules/ruralprojectrecords/view/workClientAndContractView.jsp

@@ -229,113 +229,23 @@
                 </table>
             </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="contentTable1" class="table table-bordered table-condensed details">
-                    <thead>
-                    <tr>
-                        <%-- <th>序号</th>--%>
-                        <th>文件预览</th>
-                        <th>上传人</th>
-                        <th>上传时间</th>
-                        <th width="150px">操作</th>
-                    </tr>
-                    </thead>
-                    <tbody id="workClientAttachmentList">
-                    <c:choose>
-                        <c:when test="${not empty workClientInfo.workAttachments}">
-                            <c:forEach items="${workClientInfo.workAttachments}" var="workClientAttachment"
-                                       varStatus="status">
-                                <tr>
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                            <c:choose>
-                                                <c:when test="${workClientInfo.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>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                </c:otherwise>
-                                            </c:choose>
 
-                                    <td>${workClientAttachment.createBy.name}</td>
-                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                    <td class="op-td">
-                                        <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>
-                                        <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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                        </c:when>
-                        <c:otherwise>
-                            <tr>
-                                <td colspan="4" align="center">暂无数据</td>
-                            </tr>
-                        </c:otherwise>
-                    </c:choose>
-                    </tbody>
-                </table>
-            </div>
-        </div>
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${workClientInfo.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="5"
+                    storeAs="workClientInfo"
+                    showOperateArea="false"
+            />
+
             <div class="form-group layui-row first lw9">
                 <div class="form-group-label"><h2>合同信息</h2></div>
                 <div class="layui-item layui-col-sm6">
@@ -419,129 +329,23 @@
                     </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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-                        <thead>
-                        <tr>
 
-                            <th>文件</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="180px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <c:choose>
-                            <c:when test="${not empty workContractInfo.workAttachments}">
-                                <c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-                                    <tr>
 
-                                            <%-- <td>${status.index + 1}</td>--%>
-                                        <c:choose>
-                                            <c:when test="${workContractInfo.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>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																		   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                            </c:otherwise>
-                                        </c:choose>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="合同附件表"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${workContractInfo.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="5"
+                    storeAs="workClientInfo"
+                    showOperateArea="false"
+            />
 
-                                        <td>${workClientAttachment.createBy.name}</td>
-                                        <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                                        <td class="op-td">
-                                            <div class="op-btn-box" >
-                                                    <%--附件下载删除--%>
-                                                <c:choose>
-                                                    <c:when test="${workContractInfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                                </c:if>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </c:forEach>
-                            </c:when>
-                            <c:otherwise>
-                                <tr>
-                                    <td colspan="4" align="center">暂无数据</td>
-                                </tr>
-                            </c:otherwise>
-                        </c:choose>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
             <div class="form-group layui-row">
                 <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
                 <div class="layui-item layui-col-xs12 form-table-container" >

+ 181 - 0
src/main/webapp/webpage/modules/sys/collectNewSelect.jsp

@@ -0,0 +1,181 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			    $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
+			    	});
+
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+			    	});
+		});
+
+		function getSelectedItem(){
+
+			var size = $("#contentTable tbody tr td input.i-checks:checked").size();
+			  /*if(size == 0 ){
+					top.layer.alert('请选择一条数据!', {icon: 0, title:'警告'});
+					return "-1";
+				  }
+			  if(size > 1 ){
+					top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
+					return "-1";
+				  }*/
+            var arr=new Array();
+            $("#contentTable tbody tr td input.i-checks:checkbox:checked").each(function () {
+                var id =  $(this).attr("id");
+                var label1 = $(this).parent().parent().parent().find(".codelabel1").html();
+                var label2 = $(this).parent().parent().parent().find(".codelabel2").html();
+                var label3 = $(this).parent().parent().parent().find(".codelabel3").html();
+                var label5 = $(this).parent().parent().parent().find(".codelabel5").html();
+                var label6 = $(this).parent().parent().parent().find(".codelabel6").html();
+                var label7 = $(this).parent().parent().parent().find(".codelabel7").html();
+                var data= {'id':id,'fileName':label5,'createName':label2,'url':label3,'fileSize':label6,'linUrl':label1,'fileType':label7};
+                arr.push(data);
+			})
+            return arr;
+		}
+
+		function page(n,s){
+			if(n) $("#pageNo").val(n);
+			if(s) $("#pageSize").val(s);
+			$("#searchForm").attr("action","${url}");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+	</script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="obj" action="${url}" method="post" class="form-inline">
+					<input type="hidden" name="url" value="${url}"/>
+					<%--<input type="hidden" name="fieldLabels" value="${fieldLabels}"/>
+					<input type="hidden" name="fieldKeys" value="${fieldKeys}"/>
+					<input type="hidden" name="searchLabel" value="${searchLabel}"/>
+					<input type="hidden" name="searchKey" value="${searchKey}"/>--%>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+
+					<div class="commonQuery">
+						<div class="layui-item query athird" style="width: 300px;">
+							<span class="layui-form-label">文件名称:</span>
+							<div class="layui-input-block">
+								<form:input path="${searchKey}" htmlEscape="false" maxlength="50" class="form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird" style="width: 300px;">
+							<span class="layui-form-label">收藏人:</span>
+							<div class="layui-input-block">
+								<form:input path="createBy.name" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird fr">
+							<div class="input-group">
+								<button id="searchReset" class="fixed-btn searchReset fr" style="margin-right: 0px;" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable" class="table details table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th width="50"></th>
+								<th style="display:none">编号</th>
+								<th width="60%">附件名称</th>
+								<th width="20%">收藏人</th>
+								<th width="20%">收藏时间</th>
+						</tr>
+					</thead>
+					<tbody>
+					<c:choose>
+					<c:when test="${not empty page.list}">
+					<c:forEach items="${page.list}" var="obj">
+						<tr>
+							<td> <input type="checkbox" name="radioName" id="${fns:getValue(obj, 'id')}" class="i-checks"></td>
+
+							<c:choose>
+								<c:when test="${obj.uploadMode == 2}">
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(obj.fileName,'jpg')
+                                                           or fn:containsIgnoreCase(obj.fileName,'png')
+                                                           or fn:containsIgnoreCase(obj.fileName,'gif')
+                                                           or fn:containsIgnoreCase(obj.fileName,'bmp')
+                                                           or fn:containsIgnoreCase(obj.fileName,'jpeg')}">
+											<td title="${obj.fileName}" class="codelabel1"><img src="${obj.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${obj.fileName}','90%','90%')" alt="${obj.fileName}">
+										</c:when>
+										<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="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="openPreview('${obj.temporaryUrl}',2)">${obj.fileName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(obj.fileName,'jpg')
+                                                           or fn:containsIgnoreCase(obj.fileName,'png')
+                                                           or fn:containsIgnoreCase(obj.fileName,'gif')
+                                                           or fn:containsIgnoreCase(obj.fileName,'bmp')
+                                                           or fn:containsIgnoreCase(obj.fileName,'jpeg')}">
+											<td title="${obj.fileName}" class="codelabel1"><img src="${obj.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${obj.url}','90%','90%')" alt="${obj.fileName}"></td>
+										</c:when>
+										<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.url}','90%','90%','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.url}','90%','90%')">${obj.fileName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td title="${obj.createBy.name}" class="codelabel2">${obj.createBy.name}</td>
+							<td title="${obj.createDateStr}" class="codelabel4">${obj.createDateStr}</td>
+							<td style="display:none" class="codelabel3">${obj.url}</td>
+							<td style="display:none" class="codelabel5">${obj.fileName}</td>
+							<td style="display:none" class="codelabel6">${obj.fileSize}</td>
+							<td style="display:none" class="codelabel7">${obj.type}</td>
+						</tr>
+					</c:forEach>
+					</c:when>
+						<c:otherwise>
+							<tr>
+								<td colspan="4" align="center">
+									暂无数据
+								</td>
+							</tr>
+						</c:otherwise>
+					</c:choose>
+
+					</tbody>
+				</table>
+				<table:page page="${page}"></table:page>
+			</div>
+		</div>
+	<div class="form-group layui-row page-end"></div>
+	</div>
+</div>
+</body>
+</html>

+ 23 - 202
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -186,9 +186,9 @@
 					}
 				}
 			});
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
             $('input[name="hasUscc"]').on('ifChecked', function(event){
                 disUscc(event.target.defaultValue);
             });
@@ -386,7 +386,7 @@
             });
         }
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workClientInfo.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;
@@ -399,7 +399,7 @@
 
                 var storeAs = "workClientInfo";
                 var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
-                /*将这段字符串存到数据库即可*/
+                /!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile" + divId).show();
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
@@ -413,12 +413,12 @@
                 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){
@@ -446,6 +446,8 @@
                         return;
                     }
                     var json = eval(result.data.items);
+                    console.log("result",result)
+                    console.log("json",json)
                     //如果精准查询,只有一条数据,则不显示模糊查询div,直接赋值
                     if (json.length == 1) {
                         var id = json[0].id;
@@ -866,202 +868,21 @@
             </div>
 
 
-            <div class="form-group layui-row">
-                <div class="form-group-label"><h2>附件信息</h2></div>
-                <div class="layui-item nav-btns">
-                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                    <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>
-                    <b><span id="baifenbi_attachment"></span></b>
-                    <div class="progress">
-                            <%--进度条--%>
-                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                        </div>
-                    </div>
-                </div>
-                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple"
-                       style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                <span id="attachment_title"></span>
-                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                    <table id="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="200px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${workClientInfo.workAttachments}" var="workClientAttachment"
-                                   varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                <c:choose>
-                                    <c:when test="${workClientInfo.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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                        <c:choose>
-                                                            <c:when test="${workReimbursement.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>
-                                                                                <c:choose>
-                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <c:choose>
-                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </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">
-
-                                        <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${workClientInfo.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${workClientInfo.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="5"
+                    storeAs="workClientInfo"
+            />
+
             <div class="form-group layui-row page-end"></div>
         </form:form>
     </div>

+ 22 - 5
src/main/webapp/webpage/modules/workclientinfo/workClientInfoFormDetail.jsp

@@ -196,13 +196,30 @@
                 </table>
             </div>
         </div>
-        <div class="form-group layui-row">
+
+
+        <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+        <!-- attachmentFlag="6" 附件标识 -->
+        <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+        <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+        <table:attachmentManager
+                title="附件信息"
+                addBtnText="添加附件"
+                baseId="attachment"
+                attachments="${workClientInfo.workAttachments}"
+                fileHandlerFuncName="insertTitle"
+                attachmentFlag="5"
+                storeAs="workClientInfo"
+                showOperateArea="false"
+        />
+
+        <%--<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="contentTable1" class="table table-bordered table-condensed details">
                     <thead>
                     <tr>
-                        <%-- <th>序号</th>--%>
+                        &lt;%&ndash; <th>序号</th>&ndash;%&gt;
                         <th>文件预览</th>
                         <th>上传人</th>
                         <th>上传时间</th>
@@ -215,7 +232,7 @@
                             <c:forEach items="${workClientInfo.workAttachments}" var="workClientAttachment"
                                        varStatus="status">
                                 <tr>
-                                        <%-- <td>${status.index + 1}</td>--%>
+                                        &lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
                                             <c:choose>
                                                 <c:when test="${workClientInfo.uploadMode == 2}">
                                                     <c:choose>
@@ -269,7 +286,7 @@
                                     <td>${workClientAttachment.createBy.name}</td>
                                     <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
                                     <td class="op-td">
-                                            <%--附件下载删除--%>
+                                            &lt;%&ndash;附件下载删除&ndash;%&gt;
                                         <c:choose>
                                             <c:when test="${workClientInfo.uploadMode == 2}">
                                                 <c:choose>
@@ -301,7 +318,7 @@
                     </tbody>
                 </table>
             </div>
-        </div>
+        </div>--%>
         <div class="form-group layui-row page-end"></div>
 
     </div>

+ 33 - 374
src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractAudit.jsp

@@ -177,385 +177,44 @@
                                     </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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-                                        <thead>
-                                        <tr>
+                        </div>
 
-                                            <th>文件</th>
-                                            <th>上传人</th>
-                                            <th>上传时间</th>
-                                            <th width="180px">操作</th>
-                                        </tr>
-                                        </thead>
-                                        <tbody>
-                                        <c:choose>
-                                            <c:when test="${not empty workContractInfo.workAttachments}">
-                                                <c:forEach items="${workContractInfo.workAttachments}" var="workClientAttachment" varStatus="status">
-                                                    <tr>
-                                                            <%--<td>${status.index + 1}</td>--%>
-                                                                <c:choose>
-                                                                    <c:when test="${workContractInfo.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>
-                                                                                        <c:choose>
-                                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                                                        <c:choose>
-                                                                                            <c:when test="${workReimbursement.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>
-                                                                                                                <c:choose>
-                                                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                                            </c:when>
-                                                                                                            <c:otherwise>
-                                                                                                                <c:choose>
-                                                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                                            </c:otherwise>
-                                                                                        </c:choose>
-                                                                                    </c:otherwise>
-                                                                                </c:choose>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                        <td>${workClientAttachment.createBy.name}</td>
-                                                        <td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
-                                                        <td  class="op-td">
-                                                                <%--附件下载删除--%>
-                                                            <c:choose>
-                                                                <c:when test="${workContractInfo.uploadMode == 2}">
-                                                                    <c:choose>
-                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                        </c:when>
-                                                                        <c:otherwise>
-                                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                        </c:otherwise>
-                                                                    </c:choose>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                            <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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                                            </c:if>
-                                                        </td>
-                                                    </tr>
-                                                </c:forEach>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <tr>
-                                                    <td colspan="4" align="center">暂无数据</td>
-                                                </tr>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        </tbody>
-                                    </table>
-                                </div>
-                            </div>
 
-                            <div class="form-group layui-row">
-                                <div class="form-group-label"><h2>中标通知书信息</h2><%--<span style="color: red;">注:有中标通知书必填,否则无法纸质归档。</span>--%></div>
-                                <div class="layui-item layui-col-xs12 form-table-container" >
-                                    <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-                                        <thead>
-                                        <tr>
+                        <div class="form-group layui-row">
+                            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                            <!-- attachmentFlag="6" 附件标识 -->
+                            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                            <table:attachmentManager
+                                    title="合同附件信息"
+                                    addBtnText="添加附件"
+                                    baseId="attachment"
+                                    attachments="${workContractInfo.workAttachments}"
+                                    fileHandlerFuncName="insertTitle"
+                                    attachmentFlag="44"
+                                    storeAs="workContractInfo"
+                                    showOperateArea="false"
+                            />
+                        </div>
 
-                                            <th>文件</th>
-                                            <th>上传人</th>
-                                            <th>上传时间</th>
-                                            <th width="180px">操作</th>
-                                        </tr>
-                                        </thead>
-                                        <tbody>
-                                        <c:choose>
-                                            <c:when test="${not empty workContractInfo.workAttachmentLetterOfAcceptances}">
-                                                <c:forEach items="${workContractInfo.workAttachmentLetterOfAcceptances}" var="workClientAttachment" varStatus="status">
-                                                    <tr>
-                                                            <%--<td>${status.index + 1}</td>--%>
-                                                        <c:choose>
-                                                            <c:when test="${workContractInfo.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>
-                                                                                <c:choose>
-                                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                                                <c:choose>
-                                                                                    <c:when test="${workReimbursement.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>
-                                                                                                        <c:choose>
-                                                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                                                                                    </c:when>
-                                                                                                    <c:otherwise>
-                                                                                                        <c:choose>
-                                                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                                                                    </c:otherwise>
-                                                                                </c:choose>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                        <td>${workClientAttachment.createBy.name}</td>
-                                                        <td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
-                                                        <td  class="op-td">
-                                                            <div class="op-btn-box" >
-                                                                <c:set var="signflag" value="${fns:getSysParam('sign_flag',fns:getUser())}"/>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'doc')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'docx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xls')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xlsx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ppt')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'pptx')}">
-                                                                        <c:choose>
-                                                                            <c:when test="${signflag == '是'}">
-                                                                                <a href="javascript:void(0);" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?recordId=${workClientAttachment.id}','95%', '95%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
-                                                                                <a href="javascript:location.href='${ctx}/isignature/iSignatureDocument/download?recordId=${workClientAttachment.id}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <%--附件下载删除--%>
-                                                                                <c:choose>
-                                                                                    <c:when test="${workContractInfo.uploadMode == 2}">
-                                                                                        <c:choose>
-                                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                                            </c:when>
-                                                                                            <c:otherwise>
-                                                                                                <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                                            </c:otherwise>
-                                                                                        </c:choose>
-                                                                                    </c:when>
-                                                                                    <c:otherwise>
-                                                                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                                    </c:otherwise>
-                                                                                </c:choose>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <%--附件下载删除--%>
-                                                                        <c:choose>
-                                                                            <c:when test="${workContractInfo.uploadMode == 2}">
-                                                                                <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                                <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                                                </c:if>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                </c:forEach>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <tr>
-                                                    <td colspan="4" align="center">暂无数据</td>
-                                                </tr>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        </tbody>
-                                    </table>
-                                </div>
+                            <div class="form-group layui-row">
+                                <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+                                <!-- attachmentFlag="6" 附件标识 -->
+                                <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+                                <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+                                <table:attachmentManager
+                                        title="中标通知书信息"
+                                        addBtnText="添加附件"
+                                        baseId="attachment_letterOfAcceptance"
+                                        attachments="${workContractInfo.workAttachmentLetterOfAcceptances}"
+                                        fileHandlerFuncName="insertTitleLetterOfAcceptance"
+                                        attachmentFlag="45"
+                                        storeAs="workContractInfo"
+                                        showOperateArea="false"
+                                />
 
 
-                                <div class="layui-item layui-col-sm12 with-textarea" style="margin-top: 10px;">
+                                <div class="layui-item layui-col-sm12 with-textarea" >
                                     <label class="layui-form-label double-line">中标通知书描述说明:</label>
                                     <div class="layui-input-block">
                                         <form:textarea path="letterOfAcceptanceRemarks" id="letterOfAcceptanceRemarks" readonly="true" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>

+ 35 - 383
src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractInfoFormAdd.jsp

@@ -149,17 +149,17 @@
                      $("#contractTypeDoc").attr("class","form-control");
                  }
              })*/
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
             $("#attachment_review_btn").click(function () {
                 $("#attachment_review_file").click();
             });
 
 
-			$("#attachment_btn_letterOfAcceptance").click(function () {
+			/*$("#attachment_btn_letterOfAcceptance").click(function () {
 				$("#attachment_file_letterOfAcceptance").click();
-			});
+			});*/
 
 
             laydate.render({
@@ -256,7 +256,7 @@
             }
         }
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = "";
             var attachmentFlag = "44";
@@ -264,11 +264,11 @@
             var timestamp=new Date().getTime();
 
             var storeAs = "workContractInfo";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 		function insertTitleCollection(tValue){
 			var files = tValue;
 			for(var i = 0;i<files.length;i++) {
@@ -857,384 +857,36 @@
 
 							</div>
 						</div>--%>
-						<div class="form-group layui-row">
-							<div class="form-group-label"><h2>合同附件信息</h2></div>
-							<div class="layui-item nav-btns">
-								<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-								<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>
-								<b><span id="baifenbi_attachment" ></span></b>
-								<div class="progress">
-									<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-									</div>
-								</div>
-							</div>
-							<input id="attachment_file" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-							<span id="attachment_title"></span>
-							<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-								<table id="listAttachment" class="table table-bordered table-condensed details">
-									<thead>
-									<tr>
-											<%-- <th>序号</th>--%>
-										<th>文件预览</th>
-										<th>上传人</th>
-										<th>上传时间</th>
-										<th width="200px">操作</th>
-									</tr>
-									</thead>
-									<tbody id="file_attachment">
-									<c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-										<tr>
-
-												<%-- <td>${status.index + 1}</td>--%>
-											<c:choose>
-												<c:when test="${workContractInfo.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>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																	<c:choose>
-																		<c:when test="${workReimbursement.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>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																						</c:when>
-																						<c:otherwise>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																		</c:otherwise>
-																	</c:choose>
-																</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" >
-														<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${workContractInfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-													<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-													</c:if>
-													<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>
-
-												</div>
-											</td>
-										</tr>
-									</c:forEach>
-									</tbody>
-								</table>
-							</div>
-						</div>
 
 
-						<div class="form-group layui-row">
-							<div class="form-group-label"><h2>中标通知书信息</h2><%--<span style="color: red;">注:有中标通知书必填,否则无法纸质归档。</span>--%></div>
-							<div class="layui-item nav-btns">
-								<a id="attachment_btn_letterOfAcceptance" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-								<sys:collectSelectTwo  id="linkmanLetterOfAcceptance" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
-													name="linkman.id"  title="选择资料库"
-													cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
-													searchLabel="资料库" searchKey="fileName"></sys:collectSelectTwo>
-							</div>
-							<div id="addFile_attachment_letterOfAcceptance" style="display: none" class="upload-progress">
-								<span id="fileName_attachment_letterOfAcceptance" ></span>
-								<b><span id="baifenbi_attachment_letterOfAcceptance" ></span></b>
-								<div class="progress">
-									<div id="jindutiao_attachment_letterOfAcceptance" class="progress-bar" style="width: 0%" aria-valuenow="0">
-									</div>
-								</div>
-							</div>
-							<input id="attachment_file_letterOfAcceptance" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleLetterOfAcceptance(this.value);"/>
-							<span id="attachment_title"></span>
-							<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-								<table id="listAttachment" class="table table-bordered table-condensed details">
-									<thead>
-									<tr>
-											<%-- <th>序号</th>--%>
-										<th>文件预览</th>
-										<th>上传人</th>
-										<th>上传时间</th>
-										<th width="200px">操作</th>
-									</tr>
-									</thead>
-									<tbody id="file_attachment_letterOfAcceptance">
-									<c:forEach items="${workContractInfo.workAttachmentLetterOfAcceptances}" var = "workClientAttachment" varStatus="status">
-										<tr>
-
-												<%-- <td>${status.index + 1}</td>--%>
-											<c:choose>
-												<c:when test="${workContractInfo.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>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																	<c:choose>
-																		<c:when test="${workReimbursement.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>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																						</c:when>
-																						<c:otherwise>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																		</c:otherwise>
-																	</c:choose>
-																</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" >
-														<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${workContractInfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-													<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-													</c:if>
-													<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>
-
-												</div>
-											</td>
-										</tr>
-									</c:forEach>
-									</tbody>
-								</table>
-							</div>
-						</div>
+						<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+						<!-- attachmentFlag="6" 附件标识 -->
+						<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+						<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+						<table:attachmentManager
+								title="合同附件信息"
+								addBtnText="添加附件"
+								baseId="attachment"
+								attachments="${workContractInfo.workAttachments}"
+								fileHandlerFuncName="insertTitle"
+								attachmentFlag="44"
+								storeAs="workContractInfo"
+						/>
+
+
+						<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+						<!-- attachmentFlag="6" 附件标识 -->
+						<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+						<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+						<table:attachmentManager
+								title="中标通知书信息"
+								addBtnText="添加附件"
+								baseId="attachment_letterOfAcceptance"
+								attachments="${workContractInfo.workAttachmentLetterOfAcceptances}"
+								fileHandlerFuncName="insertTitleLetterOfAcceptance"
+								attachmentFlag="45"
+								storeAs="workContractInfo"
+						/>
 
 						<div class="form-group layui-row page-end"></div>
 					</div>

+ 37 - 379
src/main/webapp/webpage/modules/workcontractinfo/newWorkContract/workContractInfoFormEdit.jsp

@@ -83,13 +83,13 @@
                     $("#contractTypeDoc").attr("class","form-control");
                 }
             })*/
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
             });
 
 			$("#attachment_btn_letterOfAcceptance").click(function () {
 				$("#attachment_file_letterOfAcceptance").click();
-			});
+			});*/
 
             $("input[name='ext']").on('ifChecked', function(event){
                 var radioVal = $(this).val();
@@ -221,7 +221,7 @@
             }
         }
 
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = $("#id").val();
             var attachmentFlag = "44";
@@ -229,7 +229,7 @@
             var timestamp=new Date().getTime();
 
 				var storeAs = "workContractInfo";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
@@ -242,7 +242,7 @@
 				var attachmentFlag = "44";
 				console.log(file);
 				var timestamp = new Date().getTime();
-				/*将这段字符串存到数据库即可*/
+				/!*将这段字符串存到数据库即可*!/
 				var divId = "_attachment";
 				$("#addFile" + divId).show();
 				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
@@ -258,7 +258,7 @@
 				var timestamp=new Date().getTime();
 
 				var storeAs = "workContractInfo";
-				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
 				var divId = "_attachment_letterOfAcceptance";
 				$("#addFile"+divId).show();
 				multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
@@ -272,7 +272,7 @@
 				var attachmentFlag = "45";
 				console.log(file);
 				var timestamp = new Date().getTime();
-				/*将这段字符串存到数据库即可*/
+				/!*将这段字符串存到数据库即可*!/
 				var divId = "_attachment_letterOfAcceptance";
 				$("#addFile" + divId).show();
 				multipartUploadWithStsCollection('', file, attachmentId, attachmentFlag, '', divId, 0);
@@ -287,11 +287,11 @@
             var timestamp=new Date().getTime();
 
 				var storeAs = "workContractInfo";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment_review";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
-        }
+        }*/
 
         function openBill(title,url,width,height,target,formId){
             var frameIndex = parent.layer.getFrameIndex(window.name);
@@ -816,381 +816,39 @@
 
 					</div>
 				</div>--%>
-				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>合同附件信息</h2></div>
-					<div class="layui-item nav-btns">
-						<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-						<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>
-						<b><span id="baifenbi_attachment" ></span></b>
-						<div class="progress">
-							<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-							</div>
-						</div>
-					</div>
-					<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-					<span id="attachment_title"></span>
-					<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-						<table id="listAttachment" class="table table-bordered table-condensed details">
-							<thead>
-							<tr>
-									<%-- <th>序号</th>--%>
-								<th>文件预览</th>
-								<th>上传人</th>
-								<th>上传时间</th>
-								<th width="200px">操作</th>
-							</tr>
-							</thead>
-							<tbody id="file_attachment">
-							<c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr>
-										<%-- <td>${status.index + 1}</td>--%>
-											<c:choose>
-												<c:when test="${workContractInfo.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>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																	<c:choose>
-																		<c:when test="${workReimbursement.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>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																						</c:when>
-																						<c:otherwise>
-																							<c:choose>
-																								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																		</c:otherwise>
-																	</c:choose>
-																</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" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${workContractInfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-											<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-											</c:if>
-											<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>
 
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-							</tbody>
-						</table>
-					</div>
-				</div>
 
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>中标通知书信息</h2><%--<span style="color: red;">注:有中标通知书必填,否则无法纸质归档。</span>--%></div>
-						<div class="layui-item nav-btns">
-							<a id="attachment_btn_letterOfAcceptance" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-							<sys:collectSelectTwo  id="linkmanLetterOfAcceptance" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
-												   name="linkman.id"  title="选择资料库"
-												   cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
-												   searchLabel="资料库" searchKey="fileName"></sys:collectSelectTwo>
-						</div>
-						<div id="addFile_attachment_letterOfAcceptance" style="display: none" class="upload-progress">
-							<span id="fileName_attachment_letterOfAcceptance" ></span>
-							<b><span id="baifenbi_attachment_letterOfAcceptance" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_attachment_letterOfAcceptance" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="attachment_file_letterOfAcceptance" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleLetterOfAcceptance(this.value);"/>
-						<span id="attachment_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="listAttachment" class="table table-bordered table-condensed details">
-								<thead>
-								<tr>
-										<%-- <th>序号</th>--%>
-									<th>文件预览</th>
-									<th>上传人</th>
-									<th>上传时间</th>
-									<th width="200px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment_letterOfAcceptance">
-								<c:forEach items="${workContractInfo.workAttachmentLetterOfAcceptances}" var = "workClientAttachment" varStatus="status">
-									<tr>
+					<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+					<!-- attachmentFlag="6" 附件标识 -->
+					<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+					<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+					<table:attachmentManager
+							title="合同附件信息"
+							addBtnText="添加附件"
+							baseId="attachment"
+							attachments="${workContractInfo.workAttachments}"
+							fileHandlerFuncName="insertTitle"
+							attachmentFlag="44"
+							storeAs="workContractInfo"
+					/>
 
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${workContractInfo.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>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																		<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																<c:choose>
-																	<c:when test="${workReimbursement.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>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																					</c:when>
-																					<c:otherwise>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																	</c:otherwise>
-																</c:choose>
-															</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" >
-													<%--附件下载删除--%>
-												<c:choose>
-													<c:when test="${workContractInfo.uploadMode == 2}">
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:when>
-															<c:otherwise>
-																<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:when>
-													<c:otherwise>
-														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-												<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-												</c:if>
-												<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>
 
-											</div>
-										</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
+
+
+					<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+					<!-- attachmentFlag="6" 附件标识 -->
+					<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+					<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+					<table:attachmentManager
+							title="中标通知书信息"
+							addBtnText="添加附件"
+							baseId="attachment_letterOfAcceptance"
+							attachments="${workContractInfo.workAttachmentLetterOfAcceptances}"
+							fileHandlerFuncName="insertTitleLetterOfAcceptance"
+							attachmentFlag="45"
+							storeAs="workContractInfo"
+					/>
 
 					<div class="form-group layui-row page-end"></div>
 				</div>

+ 31 - 539
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoLookForm.jsp

@@ -236,554 +236,46 @@
 								<textarea style="background-color: #f1f1f1" htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${workContractInfo.remarks}</textarea>
 							</div>
 						</div>
-						<%--<c:if test="${not empty workContractInfo.alterInfo.reason}">
-							<div class="layui-item layui-col-sm12 with-textarea">
-								<label class="layui-form-label">作废原因:</label>
-								<div class="layui-input-block">
-									<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${workContractInfo.alterInfo.reason}</textarea>
-								</div>
-							</div>
-						</c:if>
-						<c:if test="${not empty workContractInfo.contractCategory}">
-							<div class="layui-item layui-col-sm12 with-textarea">
-								<label class="layui-form-label">变更原因:</label>
-								<div class="layui-input-block">
-									<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${workContractInfo.contractCategory}</textarea>
-								</div>
-							</div>
-						</c:if>--%>
 					</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="contentTable4" class="table table-bordered table-condensed no-bottom-margin details">
-								<thead>
-								<tr>
-									&lt;%&ndash;<th width="10%">序号</th>&ndash;%&gt;
-									<th width="30%">委托方名称</th>
-									<th width="20%">客户性质</th>
-									<th width="20%">所属行业</th>
-									<th width="30%">所属地区</th>
-								</tr>
-								</thead>
-								<tbody id="workClientInfoList">
-								<c:if test="${not empty workContractInfo.workClientInfoList}">
-									<c:forEach items="${workContractInfo.workClientInfoList}" var="casePeopleNorm" varStatus="index">
-										<tr id="workClientInfoList${index.index}">
-											<td class="hide">
-													&lt;%&ndash;<input id="workClientInfoList${index.index}_id" name="workClientInfoList[${index.index}].id" type="hidden" value="${casePeopleNorm.id}"/>&ndash;%&gt;
-											</td>
-											&lt;%&ndash;<td>&ndash;%&gt;
-													&lt;%&ndash;${index.index + 1}&ndash;%&gt;
-											&lt;%&ndash;</td>&ndash;%&gt;
-												&lt;%&ndash;${fns:getDictLabel(workAccount.financialSubjectss, 'not_project_reimbursement', '')}&ndash;%&gt;
-											<td>
-													&lt;%&ndash;<input id="workClientInfoList${index.index}_name" name="workClientInfoList[${index.index}].name" type="text" value="${casePeopleNorm.name}" readonly="true"   class="form-control "/>&ndash;%&gt;
-													${casePeopleNorm.name}
-											</td>
-											<td>
-													&lt;%&ndash;<form:select id="workClientInfoList${index.index}_companyType" path="workClientInfoList[${index.index}].companyType" disabled="true" readonly="true" class="form-control">
-                                                        <form:option value="" label=""/>
-                                                        <form:options items="${fns:getMainDictList('company_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                                                    </form:select>&ndash;%&gt;
-													${fns:getMainDictLabel(casePeopleNorm.companyType, 'company_type', '')}
-											</td>
-											<td>
-													&lt;%&ndash;<form:select id="workClientInfoList${index.index}_companyIndustry" path="workClientInfoList[${index.index}].companyIndustry" disabled="true" readonly="true" class="form-control">
-                                                        <form:option value="" label=""/>
-                                                        <form:options items="${fns:getMainDictList('company_industry')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-                                                    </form:select>&ndash;%&gt;
-													${fns:getMainDictLabel(casePeopleNorm.companyIndustry, 'company_industry', '')}
-											</td>
-											<td>
-													&lt;%&ndash;<input id="workClientInfoList${index.index}_area" name="workClientInfoList[${index.index}].area.name" type="text" value="${casePeopleNorm.area.name}"  readonly="true"  class="form-control "/>&ndash;%&gt;
-													${casePeopleNorm.area.name}
-											</td>
-										</tr>
-									</c:forEach>
-								</c:if>
-								</tbody>
-							</table>
-						</div>
-					</div>--%>
-					<%--<c:if test="${workContractInfo.contractState eq '5'}">
-						<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="contentTable3" class="table table-bordered table-condensed details">
-									<thead>
-									<tr>
-										<th><span class="require-item">*</span>发票代码</th>
-										<th><span class="require-item">*</span>发票号</th>
-										<th><span class="require-item">*</span>价税合计</th>
-										<th><span class="require-item">*</span>税率</th>
-										<th><span class="require-item">*</span>金额</th>
-										<th><span class="require-item">*</span>税额</th>
-										<th><span class="require-item">*</span>累计登记金额</th>
-										<th><span class="require-item">*</span>发票状态</th>&lt;%&ndash;正常&ndash;%&gt;
-										<th><span class="require-item">*</span>被退标记</th>
-										<th><span class="require-item">*</span>被退票号</th>
-										<th><span class="require-item">*</span>开票日期</th>
-									</tr>
-									</thead>
-									<tbody id="workAccountList">
-									<c:if test="${not empty workContractInfo.invoiceDetails}">
-										<c:forEach items="${workContractInfo.invoiceDetails}" var="workAccount" varStatus="index">
-											<tr id="workAccountList${index.index}">
-												<td title="${workAccount.code}">
-														${workAccount.code}
-												</td>
-												<td title="${workAccount.number}">
-														${workAccount.number}
-												</td>
 
-												<td title="<fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>">
-													<fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>
-												</td>
-												<td title="${workAccount.tax}">
-														${workAccount.tax}
-												</td>
-												<td title="<fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>">
-													<fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>
-												</td>
-												<td title="<fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>">
-													<fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>
-												</td>
-												<td title="<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>">
-													<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>
-												</td>
-												<td title="${workAccount.state}">
-														${workAccount.state}
-												</td>
-												<td title="${workAccount.backSign}">
-														${workAccount.backSign}
-												</td>
-												<td title="${workAccount.backNumber}">
-														${workAccount.backNumber}
-												</td>
-												<td title="<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>">
-													<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>
-												</td>
-											</tr>
-										</c:forEach>
-									</c:if>
-									</tbody>
-								</table>
-							</div>
-						</div>
-					</c:if>--%>
 					<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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-								<thead>
-								<tr>
-
-									<th>文件</th>
-									<th>上传人</th>
-									<th>上传时间</th>
-									<th width="180px">操作</th>
-								</tr>
-								</thead>
-								<tbody>
-								<c:choose>
-									<c:when test="${not empty workContractInfo.workAttachments}">
-									<c:forEach items="${workContractInfo.workAttachments}" var="workClientAttachment" varStatus="status">
-									<tr>
-											<%--<td>${status.index + 1}</td>--%>
-												<c:choose>
-													<c:when test="${workContractInfo.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>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																				<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																		<c:choose>
-																			<c:when test="${workReimbursement.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>
-																								<c:choose>
-																									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																										<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																							</c:when>
-																							<c:otherwise>
-																								<c:choose>
-																									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																										<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-										<td>${workClientAttachment.createBy.name}</td>
-										<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
-										<td  class="op-td">
-											<div class="op-btn-box" >
-                                                <c:set var="signflag" value="${fns:getSysParam('sign_flag',fns:getUser())}"/>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'doc')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'docx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xls')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xlsx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ppt')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'pptx')}">
-                                                        <c:choose>
-                                                            <c:when test="${signflag == '是'}">
-																<a href="javascript:void(0);" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?recordId=${workClientAttachment.id}','95%', '95%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
-																<a href="javascript:location.href='${ctx}/isignature/iSignatureDocument/download?recordId=${workClientAttachment.id}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:when>
-                                                            <c:otherwise>
-																<%--附件下载删除--%>
-																<c:choose>
-																	<c:when test="${workContractInfo.uploadMode == 2}">
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																				<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																			</c:when>
-																			<c:otherwise>
-																				<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${workContractInfo.uploadMode == 2}">
-																<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-												<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-												</c:if>
-											</div>
-										</td>
-									</tr>
-									</c:forEach>
-									</c:when>
-									<c:otherwise>
-									<tr>
-										<td colspan="4" align="center">暂无数据</td>
-									</tr>
-									</c:otherwise>
-								</c:choose>
-								</tbody>
-							</table>
-						</div>
+						<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+						<!-- attachmentFlag="6" 附件标识 -->
+						<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+						<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+						<table:attachmentManager
+								title="合同附件信息"
+								addBtnText="添加附件"
+								baseId="attachment"
+								attachments="${workContractInfo.workAttachments}"
+								fileHandlerFuncName="insertTitle"
+								attachmentFlag="44"
+								storeAs="workContractInfo"
+								showOperateArea="false"
+						/>
 					</div>
 
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>中标通知书信息</h2><%--<span style="color: red;">注:有中标通知书必填,否则无法纸质归档。</span>--%></div>
-						<div class="layui-item layui-col-xs12 form-table-container" >
-							<table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
-								<thead>
-								<tr>
 
-									<th>文件</th>
-									<th>上传人</th>
-									<th>上传时间</th>
-									<th width="180px">操作</th>
-								</tr>
-								</thead>
-								<tbody>
-								<c:choose>
-									<c:when test="${not empty workContractInfo.workAttachmentLetterOfAcceptances}">
-										<c:forEach items="${workContractInfo.workAttachmentLetterOfAcceptances}" var="workClientAttachment" varStatus="status">
-											<tr>
-													<%--<td>${status.index + 1}</td>--%>
-												<c:choose>
-													<c:when test="${workContractInfo.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>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																				<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																		<c:choose>
-																			<c:when test="${workReimbursement.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>
-																								<c:choose>
-																									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																										<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																							</c:when>
-																							<c:otherwise>
-																								<c:choose>
-																									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																										<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-												<td>${workClientAttachment.createBy.name}</td>
-												<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
-												<td  class="op-td">
-													<div class="op-btn-box" >
-														<c:set var="signflag" value="${fns:getSysParam('sign_flag',fns:getUser())}"/>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'doc')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'docx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xls')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xlsx')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ppt')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'pptx')}">
-																<c:choose>
-																	<c:when test="${signflag == '是'}">
-																		<a href="javascript:void(0);" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?recordId=${workClientAttachment.id}','95%', '95%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
-																		<a href="javascript:location.href='${ctx}/isignature/iSignatureDocument/download?recordId=${workClientAttachment.id}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<%--附件下载删除--%>
-																		<c:choose>
-																			<c:when test="${workContractInfo.uploadMode == 2}">
-																				<c:choose>
-																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																						<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																					</c:when>
-																					<c:otherwise>
-																						<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																					</c:otherwise>
-																				</c:choose>
-																			</c:when>
-																			<c:otherwise>
-																				<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<%--附件下载删除--%>
-																<c:choose>
-																	<c:when test="${workContractInfo.uploadMode == 2}">
-																		<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-														<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-														</c:if>
-													</div>
-												</td>
-											</tr>
-										</c:forEach>
-									</c:when>
-									<c:otherwise>
-										<tr>
-											<td colspan="4" align="center">暂无数据</td>
-										</tr>
-									</c:otherwise>
-								</c:choose>
-								</tbody>
-							</table>
-						</div>
+
+					<div class="form-group layui-row">
+						<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+						<!-- attachmentFlag="6" 附件标识 -->
+						<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+						<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+						<table:attachmentManager
+								title="中标通知书信息"
+								addBtnText="添加附件"
+								baseId="attachment_letterOfAcceptance"
+								attachments="${workContractInfo.workAttachmentLetterOfAcceptances}"
+								fileHandlerFuncName="insertTitleLetterOfAcceptance"
+								attachmentFlag="45"
+								storeAs="workContractInfo"
+								showOperateArea="false"
+						/>
 
 
-						<div class="layui-item layui-col-sm12 with-textarea" style="margin-top: 10px;">
+						<div class="layui-item layui-col-sm12 with-textarea">
 							<label class="layui-form-label double-line">中标通知书描述说明:</label>
 							<div class="layui-input-block">
 								<form:textarea path="letterOfAcceptanceRemarks" id="letterOfAcceptanceRemarks" readonly="true" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>

+ 25 - 187
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp

@@ -59,9 +59,9 @@
 					}
 				}
 			});
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 			if("${workContractRecord.workContractInfo.contractInformation}" == "1"){
 				$("#contractPrice").parent().parent().hide();
 				$("#contractPrice").removeClass("judgment")
@@ -74,7 +74,7 @@
 				$("#otherDetails").attr("class","form-control layui-input")
 			}
 		});
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workContractRecord.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
@@ -84,11 +84,11 @@
             var timestamp=new Date().getTime();
 
 				var storeAs = "workContractInfo";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
-        }
+        }*/
 
         function setValue(obj){
             $.ajax({
@@ -239,7 +239,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label double-line"><span class="require-item">*</span>确认案卷号:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>确认案卷号:</label>
 					<div class="layui-input-block">
 						<input id="fileNumTow" placeholder="请输入确认案卷号" name="fileNumTow" type="text"  class="layui-input form-control" equalTo="#fileNum"/>
 					</div>
@@ -251,189 +251,27 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>合同附件表</h2></div>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workContractRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${workContractRecord.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>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																		<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																<c:choose>
-																	<c:when test="${workReimbursement.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>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																					</c:when>
-																					<c:otherwise>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
 
-<%--								<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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>--%>
-<%--											</c:when>--%>
-<%--											<c:otherwise>--%>
-<%--												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>--%>
-<%--											</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">
-										<%--附件下载删除--%>
-									<c:choose>
-										<c:when test="${workContractRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-													<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:when>
-												<c:otherwise>
-													<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-										</c:otherwise>
-									</c:choose>
-									<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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-									</c:if>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
+
+
+			<div class="form-group layui-row">
+				<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+				<!-- attachmentFlag="6" 附件标识 -->
+				<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+				<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+				<table:attachmentManager
+						title="合同附件表"
+						addBtnText="添加附件"
+						baseId="attachment"
+						attachments="${workContractRecord.workAttachments}"
+						fileHandlerFuncName="insertTitle"
+						attachmentFlag="44"
+						storeAs="workContractInfo"
+						showOperateArea="false"
+				/>
 			</div>
+
+
 <%--			<div class="form-group layui-row lw8">--%>
 <%--				<div class="form-group-label"><h2>审批意见</h2></div>--%>
 <%--				<div class="layui-item layui-col-sm12  with-textarea">--%>

+ 19 - 210
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordModifyApply.jsp

@@ -46,9 +46,9 @@
 					}
 				}
 			});
-			$("#attachment_btn").click(function () {
+			/*$("#attachment_btn").click(function () {
 				$("#attachment_file").click();
-			});
+			});*/
 			if("${workContractRecord.workContractInfo.contractInformation}" == "1"){
 				$("#contractPrice").parent().parent().hide();
 				$("#contractPrice").removeClass("required")
@@ -95,7 +95,7 @@
 				, trigger: 'click'
 			});
 		});
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workContractRecord.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
@@ -105,7 +105,7 @@
             var timestamp=new Date().getTime();
 
 				var storeAs = "workContractInfo";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
@@ -118,12 +118,12 @@
 				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 >
@@ -251,214 +251,23 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>合同附件表</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workContractRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${workContractRecord.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>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																		<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																<c:choose>
-																	<c:when test="${workReimbursement.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>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																					</c:when>
-																					<c:otherwise>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
 
 
+			<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+			<!-- attachmentFlag="6" 附件标识 -->
+			<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+			<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+			<table:attachmentManager
+					title="合同附件表"
+					addBtnText="添加附件"
+					baseId="attachment"
+					attachments="${workContractRecord.workAttachments}"
+					fileHandlerFuncName="insertTitle"
+					attachmentFlag="44"
+					storeAs="workContractInfo"
+			/>
 
-<%--								<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="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>--%>
-<%--											</c:when>--%>
-<%--											<c:otherwise>--%>
-<%--												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>--%>
-<%--											</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" >
-											<%--附件下载删除--%>
-										<c:choose>
-											<c:when test="${workContractRecord.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
 
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 21 - 165
src/main/webapp/webpage/modules/workcontractrecord/workContractView.jsp

@@ -52,7 +52,7 @@
 				$("#otherDetails").attr("class","form-control layui-input")
 			}
 		});
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workContractRecord.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
@@ -62,11 +62,11 @@
             var timestamp=new Date().getTime();
 
 				var storeAs = "workContractRd";
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
             var divId = "_attachment";
             $("#addFile"+divId).show();
             multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
-        }
+        }*/
 
 
         function setValue(obj){
@@ -221,170 +221,26 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workContractRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${workContractRecord.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>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																		<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-																<c:choose>
-																	<c:when test="${workReimbursement.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>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																					</c:when>
-																					<c:otherwise>
-																						<c:choose>
-																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																								<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-																	</c:otherwise>
-																</c:choose>
-															</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">
-										<%--附件下载删除--%>
-									<c:choose>
-										<c:when test="${workContractRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-													<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:when>
-												<c:otherwise>
-													<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-										</c:otherwise>
-									</c:choose>
-									<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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-									</c:if>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
+
+			<div class="form-group layui-row">
+				<!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+				<!-- attachmentFlag="6" 附件标识 -->
+				<!-- storeAs="wrkReimbursement" 存储路径标识 -->
+				<!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+				<table:attachmentManager
+						title="合同附件表"
+						addBtnText="添加附件"
+						baseId="attachment"
+						attachments="${workContractRecord.workAttachments}"
+						fileHandlerFuncName="insertTitle"
+						attachmentFlag="44"
+						storeAs="workContractInfo"
+						showOperateArea="false"
+				/>
 			</div>
+
+
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 1 - 133
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllForm.jsp

@@ -1281,139 +1281,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
-
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 0 - 132
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllModify.jsp

@@ -1205,139 +1205,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
 
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 1 - 133
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoForm.jsp

@@ -1322,139 +1322,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
-
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 0 - 132
src/main/webapp/webpage/modules/workinvoice/workInvoiceExamineModify.jsp

@@ -1125,139 +1125,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
 
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 1 - 133
src/main/webapp/webpage/modules/workinvoice/workInvoiceNotProjectModify.jsp

@@ -1275,139 +1275,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
-
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 0 - 139
src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoForm.jsp

@@ -1411,146 +1411,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div>
 
-				&lt;%&ndash;嵌入子页面&ndash;%&gt;
-				<iframe id="orgContent" src="" style="border:1px dashed #000;" width="100%" height="450px" frameborder="0">
-				</iframe>
-
-			</div>--%>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
-
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>--%>
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>发票明细</h2></div>

+ 0 - 132
src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoModify.jsp

@@ -1222,139 +1222,7 @@
 					</div>
 				</div>
 			</div>
-			<%--<div class="form-group layui-row">
-				<div class="form-group-label"><h2>附件信息</h2></div>
-				<div class="layui-item nav-btns">
-					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-					<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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
-						<thead>
-						<tr>
-								&lt;%&ndash; <th>序号</th>&ndash;%&gt;
-							<th>文件预览</th>
-							<th>上传人</th>
-							<th>上传时间</th>
-							<th width="200px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
-							<tr>
-									&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
-								<c:choose>
-									<c:when test="${workInvoice.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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-											</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>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-									</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" >
-											&lt;%&ndash;附件下载删除&ndash;%&gt;
-										<c:choose>
-											<c:when test="${workInvoice.uploadMode == 2}">
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:when>
-													<c:otherwise>
-														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-											</c:when>
-											<c:otherwise>
-												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-											</c:otherwise>
-										</c:choose>
-										<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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-										</c:if>
-										<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>
 
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</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">

+ 1 - 29
src/main/webapp/webpage/modules/workproject/workRecordView.jsp

@@ -238,35 +238,7 @@
 											附件
 										</div>
 										<div style="float:left; height: 100%; width: 500px; ">
-												<%--<div style="display: inline-block">--%>
-												<%--<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>--%>
-												<%--<a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>--%>
-												<%--<span id="attachment_title"></span>--%>
-												<%--</div>--%>
-													<%--<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
-														<thead>
-														<tr>
-															<th>序号</th>
-															<th>文件名称</th>
-															<th>上传人</th>
-															<th>上传时间</th>
-															<th>操作</th>
-														</tr>
-														</thead>
-														<tbody id="file_attachment">
-														<c:forEach items="${workAttachments}" varStatus="status" var="workClientAttachment">
-															<tr>
-																<td>${status.index + 1}</td>
-																<td>${workClientAttachment.attachmentName}</td>
-																<td>${workClientAttachment.createBy.name}</td>
-																<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
-																<td>
-																	<a href="${attachment.url}">下载</a>
-																</td>
-															</tr>
-														</c:forEach>
-														</tbody>
-													</table>--%>
+
 
 
 										<table id="contentTable" class="table table-striped table-bordered table-condensed">

+ 14 - 122
src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormDetail.jsp

@@ -940,129 +940,21 @@
         </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="upTable" class="table table-bordered table-condensed details">
-                <thead>
-                <tr>
-                        <%-- <th>序号</th>--%>
-                    <th>文件预览</th>
-                    <th>上传人</th>
-                    <th>上传时间</th>
-                    <th width="150px">操作</th>
-                </tr>
-                </thead>
-                <tbody id="file_attachment">
-                <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
-                    <tr>
-                            <%-- <td>${status.index + 1}</td>--%>
-                        <c:choose>
-                            <c:when test="${workReimbursement.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>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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 href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                            </c:otherwise>
-                        </c:choose>
+    <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+    <!-- attachmentFlag="6" 附件标识 -->
+    <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+    <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+    <table:attachmentManager
+            title="附件信息"
+            addBtnText="添加附件"
+            baseId="attachment"
+            attachments="${workReimbursement.workAttachments}"
+            fileHandlerFuncName="insertTitle"
+            attachmentFlag="6"
+            storeAs="wrkReimbursement"
+            showOperateArea="false"
+    />
 
-                        <td>${workClientAttachment.createBy.name}</td>
-                        <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
-                        <td class="op-td">
-                            <div class="op-btn-box" >
-                                    <%--附件下载删除--%>
-                                <c:choose>
-                                    <c:when test="${workReimbursement.uploadMode == 2}">
-                                        <c:choose>
-                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
-                                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </c:when>
-                                    <c:otherwise>
-                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                    </c:otherwise>
-                                </c:choose>
-                                <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"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                </c:if>
-                             <%--   <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>--%>
-                            </div>
-                        </td>
-                    </tr>
-                </c:forEach>
-                </tbody>
-            </table>
-        </div>
-    </div>
 
     <div class="form-group layui-row">
         <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>

+ 16 - 141
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp

@@ -1080,148 +1080,23 @@
                 </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="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件预览</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${workReimbursement.workAttachments}" var="workClientAttachment"
-                                   varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                <c:choose>
-                                    <c:when test="${workReimbursement.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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)"
-                                                                       onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)"
-                                                                       onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                    </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">
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${workReimbursement.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank"
-                                                           class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
-                                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
-                                                                   class="op-btn op-btn-download"><i
-                                                                        class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <a href="${workClientAttachment.temporaryUrl}"
-                                                                   class="op-btn op-btn-download"><i
-                                                                        class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
-                                                   class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i
-                                                    class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${workReimbursement.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="6"
+                    storeAs="wrkReimbursement"
+                    showOperateArea="false"
+            />
+
+
             <div class="form-group layui-row page-end"></div>
         </form:form>
         <div class="form-group-label">

+ 18 - 148
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewFormAdd.jsp

@@ -91,9 +91,9 @@
                 type : 'date'
                 , trigger: 'click'
             });
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
             $("#attachment_btn_xml").click(function () {
                 $("#attachment_InvoiceReimbursement_file").click();
             });
@@ -523,7 +523,7 @@
             });
 
         }
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;
@@ -534,12 +534,12 @@
                 var timestamp=new Date().getTime();
 
                 var storeAs = "wrkReimbursement";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
 
-        }
+        }*/
 
         async function insertTitleInvoiceReimbursement(tValue) {
             var id = "${workReimbursement.id}";
@@ -1880,149 +1880,19 @@
             </div>
         </div>--%>
 
-
-        <div class="form-group layui-row">
-            <div class="form-group-label"><h2>附件信息</h2></div>
-            <div class="layui-item nav-btns">
-                <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                <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>
-                <b><span id="baifenbi_attachment" ></span></b>
-                <div class="progress">
-                    <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                    </div>
-                </div>
-            </div>
-            <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-            <span id="attachment_title"></span>
-            <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                <table id="upTable" class="table table-bordered table-condensed details">
-                    <thead>
-                    <tr>
-                            <%-- <th>序号</th>--%>
-                        <th>文件预览</th>
-                        <th>上传人</th>
-                        <th>上传时间</th>
-                        <th width="200px">操作</th>
-                    </tr>
-                    </thead>
-                    <tbody id="file_attachment">
-                    <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
-                        <tr>
-                                <%-- <td>${status.index + 1}</td>--%>
-                        <c:choose>
-                            <c:when test="${workReimbursement.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>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}"></td>
-                                    </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>
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                            </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" >
-                                        <%--附件下载删除--%>
-                                    <c:choose>
-                                        <c:when test="${workReimbursement.uploadMode == 2}">
-                                            <c:choose>
-                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                    <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <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"   style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                    </c:if>
-                                    <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>
-
-                                </div>
-                            </td>
-                        </tr>
-                    </c:forEach>
-                    </tbody>
-                </table>
-            </div>
-        </div>
+        <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+        <!-- attachmentFlag="6" 附件标识 -->
+        <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+        <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+        <table:attachmentManager
+                title="附件信息"
+                addBtnText="添加附件"
+                baseId="attachment"
+                attachments="${workReimbursement.workAttachments}"
+                fileHandlerFuncName="insertTitle"
+                attachmentFlag="6"
+                storeAs="wrkReimbursement"
+        />
         <div class="form-group layui-row page-end"></div>
     </form:form>
 </div>

+ 19 - 144
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewModifyApply.jsp

@@ -112,9 +112,9 @@
                 type : 'date'
 , trigger: 'click'
             });
-            $("#attachment_btn").click(function () {
+            /*$("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });
+            });*/
 
             $("#attachment_btn_InvoiceReimbursement").click(function () {
                 $("#attachment_InvoiceReimbursement_file").click();
@@ -584,7 +584,7 @@
             });
 
         }
-        function insertTitle(tValue){
+        /*function insertTitle(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
@@ -594,11 +594,11 @@
                 var timestamp=new Date().getTime();
 
                 var storeAs = "wrkReimbursement";
-                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
                 var divId = "_attachment";
                 $("#addFile"+divId).show();
                 multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
-        }
+        }*/
 
         async function insertTitleInvoiceReimbursement(tValue) {
             var id = "${workReimbursement.id}";
@@ -2136,147 +2136,22 @@
             </div>
         </div>--%>
 
-        <div class="form-group layui-row">
-            <div class="form-group-label"><h2>附件信息</h2></div>
-            <div class="layui-item nav-btns">
-                <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
-                <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>
-                <b><span id="baifenbi_attachment" ></span></b>
-                <div class="progress">
-                    <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                    </div>
-                </div>
-            </div>
-            <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-            <span id="attachment_title"></span>
-            <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                <table id="upTable" class="table table-bordered table-condensed details">
-                    <thead>
-                    <tr>
-                            <%-- <th>序号</th>--%>
-                        <th>文件预览</th>
-                        <th>上传人</th>
-                        <th>上传时间</th>
-                        <th width="200px">操作</th>
-                    </tr>
-                    </thead>
-                    <tbody id="file_attachment">
-                    <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
-                        <tr>
-                                <%-- <td>${status.index + 1}</td>--%>
-                            <c:choose>
-                                <c:when test="${workReimbursement.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>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                </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" >
-                                        <%--附件下载删除--%>
-                                    <c:choose>
-                                        <c:when test="${workReimbursement.uploadMode == 2}">
-                                            <c:choose>
-                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                    <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <c:choose>
-                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                        </c:otherwise>
-                                    </c:choose>
+        <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+        <!-- attachmentFlag="6" 附件标识 -->
+        <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+        <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+        <table:attachmentManager
+                title="附件信息"
+                addBtnText="添加附件"
+                baseId="attachment"
+                attachments="${workReimbursement.workAttachments}"
+                fileHandlerFuncName="insertTitle"
+                attachmentFlag="6"
+                storeAs="wrkReimbursement"
+        />
+
 
-                                    <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" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                    </c:if>
-                                </div>
-                            </td>
-                        </tr>
-                    </c:forEach>
-                    </tbody>
-                </table>
-            </div>
-        </div>
 
         <div class="form-group layui-row">
             <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>

+ 17 - 141
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp

@@ -1076,148 +1076,24 @@
                 </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="upTable" class="table table-bordered table-condensed details">
-                        <thead>
-                        <tr>
-                                <%-- <th>序号</th>--%>
-                            <th>文件预览</th>
-                            <th>上传人</th>
-                            <th>上传时间</th>
-                            <th width="150px">操作</th>
-                        </tr>
-                        </thead>
-                        <tbody id="file_attachment">
-                        <c:forEach items="${workReimbursement.workAttachments}" var="workClientAttachment"
-                                   varStatus="status">
-                            <tr>
-                                    <%-- <td>${status.index + 1}</td>--%>
-                                <c:choose>
-                                    <c:when test="${workReimbursement.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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)"
-                                                                       onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-                                                                <td><a class="attention-info" href="javascript:void(0)"
-                                                                       onclick="openPreview('${workClientAttachment.url}',3)">${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>
-                                    </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">
-                                            <%--附件下载删除--%>
-                                        <c:choose>
-                                            <c:when test="${workReimbursement.uploadMode == 2}">
-                                                <c:choose>
-                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-                                                        <a href="${workClientAttachment.temporaryUrl}" target="_blank"
-                                                           class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
-                                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
-                                                                   class="op-btn op-btn-download"><i
-                                                                        class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <a href="${workClientAttachment.temporaryUrl}"
-                                                                   class="op-btn op-btn-download"><i
-                                                                        class="fa fa-download"></i>&nbsp;下载</a>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
-                                                   class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                            </c:otherwise>
-                                        </c:choose>
-                                        <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" style="background-color: #FFB800"><i
-                                                    class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-                                        </c:if>
-                                    </div>
-                                </td>
-                            </tr>
-                        </c:forEach>
-                        </tbody>
-                    </table>
-                </div>
-            </div>
+
+            <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
+            <!-- attachmentFlag="6" 附件标识 -->
+            <!-- storeAs="wrkReimbursement" 存储路径标识 -->
+            <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
+            <table:attachmentManager
+                    title="附件信息"
+                    addBtnText="添加附件"
+                    baseId="attachment"
+                    attachments="${workReimbursement.workAttachments}"
+                    fileHandlerFuncName="insertTitle"
+                    attachmentFlag="6"
+                    storeAs="wrkReimbursement"
+                    showOperateArea="false"
+            />
+
+
             <div class="form-group layui-row page-end"></div>
         </form:form>
 

+ 403 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoManageList.jsp

@@ -0,0 +1,403 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息管理</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#cus_name").show();
+            $("#cus_name").siblings().hide();
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+
+        });
+
+        function openDialog(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ["提交","关闭"],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if(iframeWin.contentWindow.doSubmit(index) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+
+
+                },
+                btn2: function (index) {
+
+                }
+            });
+        }
+
+        function adminModifuPwd(title,url,width,height,target) {
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: "修改密码",
+                content: url,
+                skin: "two-btns",
+                btn: ['确定', '关闭'],
+                yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var inputForm = $(body).find('#inputForm');
+
+
+                    // 直接从表单中获取各个输入字段的值
+                    var newPassword = inputForm.find("#newPassword").val(); // 新密码
+                    var confirmNewPassword = inputForm.find("#confirmNewPassword").val(); // 确认密码
+
+                    // 定义正则表达式
+                    var passwordRegex = /^(?=(.*[A-Z]))(?=(.*[a-z]))(?=(.*\d))|(?=(.*[A-Z]))(?=(.*[a-z]))(?=(.*[!@#$%^&*.,]))|(?=(.*[A-Z]))(?=(.*\d))(?=(.*[!@#$%^&*.,]))|(?=(.*[a-z]))(?=(.*\d))(?=(.*[!@#$%^&*.,]))[A-Za-z\d!@#$%^&*.,]{8,20}$/;
+                    var submitFlag = true;
+                    // 验证密码
+                    if (!passwordRegex.test(newPassword)) {
+                        console.error("新密码不符合要求!");
+                        parent.layer.msg("新密码必须同时包含大写、小写、数字和特殊字符中的三项,且长度在8到20位之间!",{icon:5});
+                        submitFlag = false;
+                        return; // 结束函数,不提交表单
+                    }
+
+                    // 验证确认密码
+                    if (newPassword !== confirmNewPassword) {
+                        console.error("确认密码与新密码不一致!");
+                        parent.layer.msg("确认密码与新密码不一致!",{icon:5});
+                        submitFlag = false;
+                        return; // 结束函数,不提交表单
+                    }
+
+
+                    var btn = body.find('#btnSubmit');
+                    var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    inputForm.validate({
+                        rules: {},
+                        messages: {
+                            confirmNewPassword: {equalTo: "输入与上面相同的密码"}
+                        },
+                        submitHandler: function (form) {
+                            loading('正在提交,请稍等...');
+                            form.submit();
+
+                        },
+                        errorContainer: "#messageBox",
+                        errorPlacement: function (error, element) {
+                            $("#messageBox").text("输入有误,请先更正。");
+                            if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                                error.appendTo(element.parent().parent());
+                            } else {
+                                error.insertAfter(element);
+                            }
+                        }
+                    });
+                    if (inputForm.valid()) {
+                        loading("正在提交,请稍等...");
+                        inputForm.submit();
+                        top.layer.close(index);//关闭对话框。
+                    } else {
+                        return;
+                    }
+
+
+                },
+                cancel: function (index) {
+                }
+            });
+        }
+
+        function setParentInfo(ids,names,nos,salarys){
+            return;
+        }
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+            <form:form id="searchForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfoManage/" method="post" class="form-inline">
+                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                <input type="hidden" input="params" value="">
+                <input id="toflag" name="toflag" type="hidden" value="1"/>
+                <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                <div class="commonQuery lw6">
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">姓    名:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item athird fr">
+                        <div class="input-group">
+                            <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                            <div class="layui-btn-group search-spacing">
+                                <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                <button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+                            </div>
+                        </div>
+                    </div>
+                    <div style="    clear:both;"></div>
+                </div>
+                <div id="moresees" style="clear:both;display:none;" class="form-group layui-row first lw12">
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">工    号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="no" htmlEscape="false" maxlength="10"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">身份证号码:</label>
+                        <div class="layui-input-block">
+                            <form:input path="idCard" htmlEscape="false" maxlength="20"  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="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
+                                            title="部门" url="/sys/office/treeDataAll?type=7" cssClass="form-control layui-input required" notAllowSelectParent="false" allowInput="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">是否有手签章:</label>
+                        <div class="layui-input-block">
+                            <form:select path="isHandSignature" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">入职日期:</label>
+                        <div class="layui-input-block readOnlyFFF">
+                            <input id="beginEntryDate" name="beginEntryDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endEntryDate" name="endEntryDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                </div>
+            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <div class="layui-btn-group">
+                        <shiro:hasPermission name="workstaff:workStaffBasicInfoManage:export">
+                            <table:exportExcel url="${ctx}/workstaff/workStaffBasicInfoManage/exportAchive"></table:exportExcel><!-- 导出按钮 -->
+                        </shiro:hasPermission>
+                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    </div>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable" lay-filter="tableEvent"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+<script charset="utf-8" src="${ctxStatic}/kindeditor/plugins/tableEdit/tableEdit.js"></script>
+<script>
+    $(document).ready(function() {
+
+    });
+    layui.use(['table','tableEdit','layer'], function () {
+        var table = layui.table,tableEdit = layui.tableEdit,$ = layui.$;
+
+        var cols = layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/view?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/view?id="+d.id+"','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+                ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
+                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                ,{field:'role',align:'center', title: '岗位', minWidth:100}
+                /*,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}*/
+                ,{field:'status',align:'center', title: '员工状态', minWidth:80}
+                /*,{field:'ddType',align:'center', title: '是否已加入钉钉', minWidth:80}*/
+                ,{field:'entryDate', align:'center',sort:true,title: '入职日期',width:100}
+                ,{field:'op',align:'center',title:"操作",width:260,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "<div class=\"layui-btn-group\">";
+
+                        if(d.canedit != undefined && d.canedit == "1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfoEmploymentIn/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+
+                        if(d.freeze != undefined && d.freeze == "1"){
+                            if(d.userLoginFlag == 1){
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要禁用该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-warm\"> 禁用</a>";
+                            }else{
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要激活该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-normal\"> 激活</a>";
+                            }
+                        }
+
+                        if(d.candelete != undefined && d.candelete == "1")
+                            xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoEmploymentIn/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+
+                            xml+="</div>"
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index": "${index.index+1}"
+                    ,
+                    "id": "${workStaffBasicInfo.id}"
+                    ,
+                    "auditUserId": "${workStaffBasicInfo.auditUserId}"
+                    ,
+                    "auditUserName": "${workStaffBasicInfo.auditUserName}"
+                    ,
+                    "role": "${workStaffBasicInfo.roleName}"
+                    ,
+                    "userLoginFlag": "${workStaffBasicInfo.userLoginFlag}"
+                    ,
+                    "no": "<c:out value="${workStaffBasicInfo.no}" escapeXml="true"/>"
+                    ,
+                    "name": "<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    ,
+                    "idCard": "<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
+                    ,
+                    'mobile': "<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
+                    ,
+                    'office': "<c:out value="${workStaffBasicInfo.office.showName}" escapeXml="true"/>"
+                    ,
+                    'jobGrade': "<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
+                    ,
+                    'status': "<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
+                    ,
+                    "userId": "${workStaffBasicInfo.userId}"
+                    ,
+                    'highestEducation': "<c:out value="${workStaffBasicInfo.highestEducation}"/>"
+                    <%--,'ddType':"<c:out value="${workStaffBasicInfo.ddType}"/>"--%>
+                    <c:choose>
+                    <c:when test="${workStaffBasicInfo.ddType == '1'}">
+                    ,
+                    "ddType": "已加入"
+                    </c:when>
+                    <c:otherwise>
+                    ,
+                    "ddType": "未加入"
+                    </c:otherwise>
+                    </c:choose>
+
+                    ,
+                    "entryDate": "<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:edit">,
+                    "canedit": "1"</shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:freeze">,
+                    "freeze": "1"</shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:del">,
+                    "candelete": "1"</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        }).config.cols;
+
+
+    })
+
+    resizeListTable(130);
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+
+
+</script>
+</body>
+</html>

File diff suppressed because it is too large
+ 1481 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoPracticeForm.jsp


+ 406 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoPracticeList.jsp

@@ -0,0 +1,406 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息管理</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#cus_name").show();
+            $("#cus_name").siblings().hide();
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+
+        });
+
+        function openDialog(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ["提交","关闭"],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if(iframeWin.contentWindow.doSubmit(index) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+
+
+                },
+                btn2: function (index) {
+
+                }
+            });
+        }
+
+        function adminModifuPwd(title,url,width,height,target) {
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: "修改密码",
+                content: url,
+                skin: "two-btns",
+                btn: ['确定', '关闭'],
+                yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var inputForm = $(body).find('#inputForm');
+
+
+                    // 直接从表单中获取各个输入字段的值
+                    var newPassword = inputForm.find("#newPassword").val(); // 新密码
+                    var confirmNewPassword = inputForm.find("#confirmNewPassword").val(); // 确认密码
+
+                    // 定义正则表达式
+                    var passwordRegex = /^(?=(.*[A-Z]))(?=(.*[a-z]))(?=(.*\d))|(?=(.*[A-Z]))(?=(.*[a-z]))(?=(.*[!@#$%^&*.,]))|(?=(.*[A-Z]))(?=(.*\d))(?=(.*[!@#$%^&*.,]))|(?=(.*[a-z]))(?=(.*\d))(?=(.*[!@#$%^&*.,]))[A-Za-z\d!@#$%^&*.,]{8,20}$/;
+                    var submitFlag = true;
+                    // 验证密码
+                    if (!passwordRegex.test(newPassword)) {
+                        console.error("新密码不符合要求!");
+                        parent.layer.msg("新密码必须同时包含大写、小写、数字和特殊字符中的三项,且长度在8到20位之间!",{icon:5});
+                        submitFlag = false;
+                        return; // 结束函数,不提交表单
+                    }
+
+                    // 验证确认密码
+                    if (newPassword !== confirmNewPassword) {
+                        console.error("确认密码与新密码不一致!");
+                        parent.layer.msg("确认密码与新密码不一致!",{icon:5});
+                        submitFlag = false;
+                        return; // 结束函数,不提交表单
+                    }
+
+
+                    var btn = body.find('#btnSubmit');
+                    var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    inputForm.validate({
+                        rules: {},
+                        messages: {
+                            confirmNewPassword: {equalTo: "输入与上面相同的密码"}
+                        },
+                        submitHandler: function (form) {
+                            loading('正在提交,请稍等...');
+                            form.submit();
+
+                        },
+                        errorContainer: "#messageBox",
+                        errorPlacement: function (error, element) {
+                            $("#messageBox").text("输入有误,请先更正。");
+                            if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                                error.appendTo(element.parent().parent());
+                            } else {
+                                error.insertAfter(element);
+                            }
+                        }
+                    });
+                    if (inputForm.valid()) {
+                        loading("正在提交,请稍等...");
+                        inputForm.submit();
+                        top.layer.close(index);//关闭对话框。
+                    } else {
+                        return;
+                    }
+
+
+                },
+                cancel: function (index) {
+                }
+            });
+        }
+
+        function setParentInfo(ids,names,nos,salarys){
+            return;
+        }
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+            <form:form id="searchForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfoPractice/" method="post" class="form-inline">
+                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                <input type="hidden" input="params" value="">
+                <input id="toflag" name="toflag" type="hidden" value="1"/>
+                <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                <div class="commonQuery lw6">
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">姓    名:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item athird fr">
+                        <div class="input-group">
+                            <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                            <div class="layui-btn-group search-spacing">
+                                <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                <button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+                            </div>
+                        </div>
+                    </div>
+                    <div style="    clear:both;"></div>
+                </div>
+                <div id="moresees" style="clear:both;display:none;" class="form-group layui-row first lw12">
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">工    号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="no" htmlEscape="false" maxlength="10"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">身份证号码:</label>
+                        <div class="layui-input-block">
+                            <form:input path="idCard" htmlEscape="false" maxlength="20"  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="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
+                                            title="部门" url="/sys/office/treeDataAll?type=7" cssClass="form-control layui-input required" notAllowSelectParent="false" allowInput="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">是否有手签章:</label>
+                        <div class="layui-input-block">
+                            <form:select path="isHandSignature" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">入职日期:</label>
+                        <div class="layui-input-block readOnlyFFF">
+                            <input id="beginEntryDate" name="beginEntryDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endEntryDate" name="endEntryDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                </div>
+            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <div class="layui-btn-group">
+                        <shiro:hasPermission name="workstaff:workStaffBasicInfo:add">
+                            <table:addRow url="${ctx}/workstaff/workStaffBasicInfoPractice/form" title="员工信息"></table:addRow><!-- 增加按钮 -->
+                        </shiro:hasPermission>
+                        <shiro:hasPermission name="workstaff:workStaffBasicInfo:export">
+                            <table:exportExcel url="${ctx}/workstaff/workStaffBasicInfoPractice/exportAchive"></table:exportExcel><!-- 导出按钮 -->
+                        </shiro:hasPermission>
+                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    </div>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable" lay-filter="tableEvent"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+<script charset="utf-8" src="${ctxStatic}/kindeditor/plugins/tableEdit/tableEdit.js"></script>
+<script>
+    $(document).ready(function() {
+
+    });
+    layui.use(['table','tableEdit','layer'], function () {
+        var table = layui.table,tableEdit = layui.tableEdit,$ = layui.$;
+
+        var cols = layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfoPractice/view?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfoPractice/view?id="+d.id+"','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+                ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
+                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                ,{field:'role',align:'center', title: '岗位', minWidth:100}
+                /*,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}*/
+                ,{field:'status',align:'center', title: '员工状态', minWidth:80}
+                /*,{field:'ddType',align:'center', title: '是否已加入钉钉', minWidth:80}*/
+                ,{field:'entryDate', align:'center',sort:true,title: '入职日期',width:100}
+                ,{field:'op',align:'center',title:"操作",width:260,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "<div class=\"layui-btn-group\">";
+
+                        if(d.canedit != undefined && d.canedit == "1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfoPractice/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+                        }
+
+                        if(d.freeze != undefined && d.freeze == "1"){
+                            if(d.userLoginFlag == 1){
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoPractice/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要禁用该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-warm\"> 禁用</a>";
+                            }else{
+                                xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoPractice/freeze?userId=" + d.userId + "\" onclick=\"return confirmx('确认要激活该人员信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-btn-normal\"> 激活</a>";
+                            }
+                        }
+
+                        if(d.candelete != undefined && d.candelete == "1")
+                            xml +="<a href=\"${ctx}/workstaff/workStaffBasicInfoPractice/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+
+                            xml+="</div>"
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index": "${index.index+1}"
+                    ,
+                    "id": "${workStaffBasicInfo.id}"
+                    ,
+                    "auditUserId": "${workStaffBasicInfo.auditUserId}"
+                    ,
+                    "auditUserName": "${workStaffBasicInfo.auditUserName}"
+                    ,
+                    "role": "${workStaffBasicInfo.roleName}"
+                    ,
+                    "userLoginFlag": "${workStaffBasicInfo.userLoginFlag}"
+                    ,
+                    "no": "<c:out value="${workStaffBasicInfo.no}" escapeXml="true"/>"
+                    ,
+                    "name": "<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    ,
+                    "idCard": "<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
+                    ,
+                    'mobile': "<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
+                    ,
+                    'office': "<c:out value="${workStaffBasicInfo.office.showName}" escapeXml="true"/>"
+                    ,
+                    'jobGrade': "<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
+                    ,
+                    'status': "<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
+                    ,
+                    "userId": "${workStaffBasicInfo.userId}"
+                    ,
+                    'highestEducation': "<c:out value="${workStaffBasicInfo.highestEducation}"/>"
+                    <%--,'ddType':"<c:out value="${workStaffBasicInfo.ddType}"/>"--%>
+                    <c:choose>
+                    <c:when test="${workStaffBasicInfo.ddType == '1'}">
+                    ,
+                    "ddType": "已加入"
+                    </c:when>
+                    <c:otherwise>
+                    ,
+                    "ddType": "未加入"
+                    </c:otherwise>
+                    </c:choose>
+
+                    ,
+                    "entryDate": "<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:edit">,
+                    "canedit": "1"</shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:freeze">,
+                    "freeze": "1"</shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:del">,
+                    "candelete": "1"</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        }).config.cols;
+
+
+    })
+
+    resizeListTable(130);
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+
+
+</script>
+</body>
+</html>

+ 1 - 22
src/main/webapp/webpage/modules/workvisa/workVisaView.jsp

@@ -104,28 +104,7 @@
 								附件
 							</div>
 							<div style="float:left; height: 100%; width: 500px; ">
-								<%--<div style="display: inline-block">--%>
-									<%--<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>--%>
-									<%--<a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>--%>
-									<%--<span id="attachment_title"></span>--%>
-								<%--</div>--%>
-								<%--<table id="listAttachment"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
-									<tr>
-										<td>序号</td><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
-									</tr>
-									<c:forEach items="${workAttachments}" var="attachment" varStatus="index">
-										<tr>
-											<td>${index.index + 1}</td>
-											<td>${attachment.attachmentName}</td>
-											<td>${attachment.attachmentUser}</td>
-											<td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
-											<td>
-												<a href="${attachment.url}">下载</a>
-												&lt;%&ndash;<a href="${ctx}/workvisa/workVisa/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workVisa.id}">删除</a>&ndash;%&gt;
-											</td>
-										</tr>
-									</c:forEach>
-								</table>--%>
+
 
 									<table id="contentTable" class="table table-striped table-bordered table-condensed">
 										</tbody>