Browse Source

报销添加电子发票报销功能

user5 1 year ago
parent
commit
9a563e4b60
22 changed files with 1628 additions and 353 deletions
  1. 87 0
      src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java
  2. 9 0
      src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java
  3. 1 1
      src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java
  4. 10 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  5. 1 1
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java
  6. 143 4
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  7. 5 67
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java
  8. 1 1
      src/main/resources/jeeplus.properties
  9. 5 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  10. 9 1
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  11. 217 0
      src/main/webapp/static/oss/ossupload.js
  12. 2 2
      src/main/webapp/webpage/include/head.jsp
  13. 1 1
      src/main/webapp/webpage/include/ossTools.jsp
  14. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp
  15. 1 1
      src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp
  16. 2 2
      src/main/webapp/webpage/modules/workinvoice/workInvoiceNotProjectAuditEnd.jsp
  17. 189 3
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp
  18. 351 126
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewModifyApply.jsp
  19. 18 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp
  20. 368 139
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp
  21. 188 3
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  22. 19 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

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

@@ -21,6 +21,7 @@ import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.utils.SftpClientUtil;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +35,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.ConstraintViolationException;
+import java.io.File;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -56,6 +58,9 @@ public class WorkattachmentController extends BaseController {
 	@Autowired
 	private ProjectMaterialStorageService projectMaterialStorageService;
 
+	@Autowired
+	private WorkReimbursementService workReimbursementService;
+
 	@ModelAttribute
 	public Workattachment get(@RequestParam(required=false) String id) {
 		Workattachment entity = null;
@@ -282,6 +287,88 @@ public class WorkattachmentController extends BaseController {
 	}
 
 	/**
+	 *  单个删除阿里云上的文件,同时更新相关对象的附件信息
+	 *  阿里云文件地址http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/attachment-file/workBidingDocument/3fcf03e37b3ba0fd5c7821998e392395.doc
+	 *  其中阿里云删除接口所需的参数 key 指的是 attachment-file/workBidingDocument/3fcf03e37b3ba0fd5c7821998e392395.doc
+	 *  电子发票报销专用,需下载文件并对文件进行分析,获取对应
+	 * @return
+	 */
+	@RequestMapping("/deleteFileFromAliyunByInvoiceReimbursement")
+	@ResponseBody
+	public HashMap<Object, Object> deleteFileFromAliyunByInvoiceReimbursement(String id,String type,String url,Model model){
+		HashMap<Object, Object> map = Maps.newHashMap();
+
+
+		if(StringUtils.isNotBlank(id)) {
+			Workattachment workattachment = workattachmentService.get(id);
+			if("1".equals(uploadMode) || "2".equals(uploadMode)) {
+				String fileUrl = "";
+				if(null != workattachment && StringUtils.isNotBlank(workattachment.getUrl())){
+					fileUrl = workattachment.getUrl();
+				}else{
+					fileUrl = url;
+				}
+				//根据url下载文件到指定文件夹。
+				//下载审定单文件
+				String path = null;
+				if(System.getProperty("os.name").toLowerCase().contains("win")){
+					path = "D:/attachment-file/";
+				}else{
+					path = "/attachment-file/";
+				}
+				String file = fileUrl;
+				file = file.replace("amp;","");
+				String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+
+				String aliyunUrl = Global.getAliyunUrl();
+				String aliDownloadUrl = Global.getAliDownloadUrl();
+				String cons = "";
+				if (file.contains(aliyunUrl)){
+					cons = aliyunUrl;
+				}else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+					cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+				}else {
+					cons = aliDownloadUrl;
+				}
+				if(!file.contains(cons)){
+					file = cons + file;
+				}
+				String ossKey = file.split(cons+"/")[1];
+				new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+
+				File file1 = new File(path+fileName);
+				try{
+					Map<String, Object> stringObjectMap = workReimbursementService.disposeXmlFile(file1,"");
+					map.putAll(stringObjectMap);
+				}catch (Exception e){
+					e.printStackTrace();
+				}finally {
+					file1.delete();
+				}
+
+				workattachmentService.deleteFileFromAliyun(workattachment, workattachment == null ? url : workattachment.getUrl());
+			}else{
+				SftpClientUtil sftpClientUtil=new SftpClientUtil();
+				try {
+					if(null != workattachment){
+						sftpClientUtil.delete(workattachment.getUrl());
+					}else{
+						sftpClientUtil.delete(url);
+						}
+
+						if(workattachment != null){
+							workattachmentService.delete(workattachment);
+						}
+					} catch (Exception e) {
+						e.printStackTrace();
+					}
+				}
+			}
+			map.put("str","success");
+		return map;
+	}
+
+	/**
 	 * 删除附件信息
 	 */
 	@RequiresPermissions("sys:workattachment:del")

+ 9 - 0
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -1341,7 +1341,16 @@ public class WorkFullManageController extends BaseController {
 				info.setZixunyuanName("");
 			}
 		}
+		for (RuralReportConsultant consultant : consultantList) {
+			if(StringUtils.isNotBlank(consultant.getAuditOpinion())){
+				if(consultant.getAuditOpinion().contains("&sup2;")){
+					String auditOpinion = consultant.getAuditOpinion().replaceAll("&sup2;","²");
+					consultant.setAuditOpinion(auditOpinion);
+				}
+			}
+		}
 		data.put("list",consultantList);
+
 		/*if(null != projectReportData.getPrincipalDate()){
 			//专业咨询员
 			data.put("consultantName",currentConsultant.getZixunyuanName());

+ 1 - 1
src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java

@@ -68,6 +68,6 @@ public interface WorkReimbursementDao extends CrudDao<WorkReimbursement> {
 	 * @param invoiceNumber
 	 * @return
 	 */
-	ReimbursementVATTax getEffectiveDataByinvoiceNumber(String invoiceNumber);
+	ReimbursementVATTax getEffectiveDataByinvoiceNumber(@Param("invoiceNumber")String invoiceNumber, @Param("id")String id);
 
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java

@@ -173,6 +173,16 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	// 流程定义
 	private ProcessDefinition processDefinition;
 	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+	private List<WorkClientAttachment> workAttachmentInvoiceReimbursements = Lists.newArrayList();
+
+	public List<WorkClientAttachment> getWorkAttachmentInvoiceReimbursements() {
+		return workAttachmentInvoiceReimbursements;
+	}
+
+	public void setWorkAttachmentInvoiceReimbursements(List<WorkClientAttachment> workAttachmentInvoiceReimbursements) {
+		this.workAttachmentInvoiceReimbursements = workAttachmentInvoiceReimbursements;
+	}
+
 	public List<WorkClientAttachment> getWorkAttachments() {
 		return workAttachments;
 	}

+ 1 - 1
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java

@@ -685,7 +685,7 @@ public class WorkReimbursementNewService extends CrudService<WorkReimbursementDa
                 }
                 if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
                     workClientAttachment.setAttachmentId(workReimbursement.getId());
-                    workClientAttachment.setAttachmentFlag(VarStr.attachmentFlag[1]);
+                    workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
                     workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
                     if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
                         workattachmentService.insertOnWorkClientAttachment(workClientAttachment);

+ 143 - 4
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.FtlUtils;
 import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.act.entity.Act;
@@ -17,6 +18,7 @@ import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
@@ -63,9 +65,22 @@ import org.activiti.engine.task.TaskQuery;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.regex.Matcher;
@@ -145,6 +160,9 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
     public WorkReimbursement get(String id) {
         WorkReimbursement workReimbursement = super.get(id);
         if(null != workReimbursement){
+            //获取专业类型
+            List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("invoiceReimbursementType");
+
             List<WorkAccount> workAccounts = workAccountDao.findList(new WorkAccount(workReimbursement));
             for (WorkAccount workAccount:workAccounts){
                 List<WorkAccountAudit> workAccountAudits = workAccountDao.findByWorkAccount(workAccount);
@@ -171,11 +189,17 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                         vatTaxList.add(vatTax);
                         break;
                     case "1":
-                        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                         if(null != vatTax.getInvoiceDate()){
                             String dateString = formatter.format(vatTax.getInvoiceDate());
                             vatTax.setInvoiceDateStr(dateString);
                         }
+                        for (MainDictDetail dictDetail : certificateMajor) {
+                            if(dictDetail.getValue().equals(vatTax.getInvoiceType())){
+                                vatTax.setInvoiceTypeStr(dictDetail.getLabel());
+                            }
+                        }
+
                         electronicInvoiceVATTaxesList.add(vatTax);
                         break;
 
@@ -193,6 +217,11 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
             if (workReimbursement!=null && StringUtils.isNotBlank(workReimbursement.getOfficeId())){
                 workReimbursement.setOfficeName(UserUtils.getOfficeById(workReimbursement.getOfficeId()).getName());
             }
+
+            WorkClientAttachment workClientInvoiceAttachment = new WorkClientAttachment();
+            workClientInvoiceAttachment.setAttachmentId(id);
+            workClientInvoiceAttachment.setAttachmentFlag("workInvoiceReimbursement");
+            workReimbursement.setWorkAttachmentInvoiceReimbursements(workattachmentService.getAttachmentList(workClientInvoiceAttachment));
             //暂存状态不操作流程
 		/*if(!"1".equals(workReimbursement.getStatus())){
             Map<String,Object> variables=null;
@@ -247,6 +276,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
         workReimbursement.setUploadMode(uploadMode);
         //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
         workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
+        workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachmentInvoiceReimbursements());
         return workReimbursement;
     }
 
@@ -724,7 +754,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                 }
                 if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
                     workClientAttachment.setAttachmentId(workReimbursement.getId());
-                    workClientAttachment.setAttachmentFlag(VarStr.attachmentFlag[1]);
+                    workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
                     workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
                     if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
                         workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
@@ -1814,7 +1844,116 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
      * @param invoiceNumber
      * @return
      */
-    public ReimbursementVATTax getEffectiveDataByinvoiceNumber(String invoiceNumber) {
-        return workReimbursementDao.getEffectiveDataByinvoiceNumber(invoiceNumber);
+    public ReimbursementVATTax getEffectiveDataByinvoiceNumber(String invoiceNumber, String id) {
+        return workReimbursementDao.getEffectiveDataByinvoiceNumber(invoiceNumber, id);
+    }
+
+
+    /**
+     * 报销电子发票数据处理
+     * @param file
+     * @return
+     */
+    public Map<String,Object> disposeXmlFile(File file, String id){
+        Map<String,Object> map = new HashMap();
+        //创建DOM4J解析器对象
+        try {
+            // 创建一个 DocumentBuilderFactory
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            // 使用工厂创建一个 DocumentBuilder
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            // 使用 DocumentBuilder 解析 XML 文件
+            Document document = builder.parse(file);
+            // 获取所有header节点的集合
+            NodeList headerList = document.getElementsByTagName("Header");
+            // 获取所有eInvoiceDataList节点的集合
+            NodeList eInvoiceDataList = document.getElementsByTagName("EInvoiceData");
+            // 获取所有taxSupervisionInfo节点的集合
+            NodeList taxSupervisionInfoList = document.getElementsByTagName("TaxSupervisionInfo");
+
+            Map<String,String> map1 = xmlNodeListDataDispose(headerList, document);
+            Map<String,String> map2 = xmlNodeListDataDispose(eInvoiceDataList, document);
+            Map<String,String> map3 = xmlNodeListDataDispose(taxSupervisionInfoList, document);
+            map.putAll(map1);
+            map.putAll(map2);
+            map.putAll(map3);
+
+            //对处理后的数据根据发票号进行数据库查询,查看是否存在已报销的电子发票数据
+            if(StringUtils.isNotBlank(map.get("InvoiceNumber").toString())){
+                ReimbursementVATTax invoiceNumber = workReimbursementDao.getEffectiveDataByinvoiceNumber(map.get("InvoiceNumber").toString(), id);
+                if(null != invoiceNumber){
+                    map.put("flag",true);
+                    map.put("message","发票号:" + map.get("InvoiceNumber").toString() + " 已发起或完成报销,请勿重复报销");
+                }else{
+                    map.put("flag",false);
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return map;
+    }
+
+    /**
+     * 对节点集合进行遍历,并获取每个节点下的参数信息
+     * @param nodeList
+     * @param document
+     * @return
+     */
+    public Map<String,String> xmlNodeListDataDispose(NodeList nodeList,Document document){
+        Map<String,String> map = new HashMap<>();
+        if(null != nodeList && nodeList.getLength()>0){
+            //遍历每一个header节点
+            for (int i = 0; i < nodeList.getLength(); i++) {
+                //通过 item(i)方法 获取一个header节点,nodelist的索引值从0开始
+                Node header = nodeList.item(i);
+                //解析定义节点的子节点
+                NodeList childNodes = header.getChildNodes();
+                //节点数据处理
+                Map<String,String> map1 = xmlDataDispose(childNodes, document);
+                map.putAll(map1);
+            }
+        }
+        return map;
+    }
+
+    /**
+     * 子节点遍历获取参数,若其下还有子节点,则循环调用 xmlNodeListDataDispose 方法
+     * @param childNodes
+     * @param document
+     * @return
+     */
+    public Map<String,String> xmlDataDispose(NodeList childNodes,Document document){
+        Map<String,String> map = new HashMap<>();
+        for (int k = 0; k < childNodes.getLength(); k++) {
+            // 区分出text类型的node以及element类型的node
+            if (childNodes.item(k).getNodeType() == Node.ELEMENT_NODE) {
+                Node firstChild = childNodes.item(k).getFirstChild();
+                if(null != firstChild){
+                    if(StringUtils.isBlank(childNodes.item(k).getFirstChild().getNodeValue())){
+                        // 获取所有header节点的集合
+                        NodeList childList = document.getElementsByTagName(childNodes.item(k).getNodeName());
+
+                        String parentName = childNodes.item(k).getNodeName();
+                        //循环调用,获取最低级节点数据信息
+                        Map<String,String> map1 = xmlNodeListDataDispose(childList, document);
+                        Map<String,String> map2 = new HashMap<>();
+                        if(map1.size()>0){
+                            //将获取到的数据进行遍历,添加父节点的参数信息,防止子节点key键相同,导致数据被覆盖
+                            for (String key : map1.keySet()) {
+                                map2.put(parentName + key,map1.get(key));
+                            }
+                        }
+                        map.putAll(map2);
+                    }
+                    //判定key 和value 值均存在,则进行储存,否则不进行储存
+                    if(StringUtils.isNotBlank(childNodes.item(k).getNodeName()) && StringUtils.isNotBlank(childNodes.item(k).getFirstChild().getNodeValue())){
+                        map.put(childNodes.item(k).getNodeName(),childNodes.item(k).getFirstChild().getNodeValue());
+                    }
+                }
+            }
+        }
+        return map;
     }
 }

+ 5 - 67
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java

@@ -1044,7 +1044,7 @@ public class WorkReimbursementController extends BaseController {
 
 	@RequestMapping(value = "disposeXmlFile", method=RequestMethod.POST)
 	@ResponseBody
-	public Map<String,Object> disposeXmlFile(HttpServletRequest request, MultipartFile multipartFile){
+	public Map<String,Object> disposeXmlFile(HttpServletRequest request, MultipartFile multipartFile, String id){
 		Map<String,Object> map = new HashMap();
 		//创建DOM4J解析器对象
 		try {
@@ -1063,16 +1063,16 @@ public class WorkReimbursementController extends BaseController {
 			// 获取所有taxSupervisionInfo节点的集合
 			NodeList taxSupervisionInfoList = document.getElementsByTagName("TaxSupervisionInfo");
 
-			Map<String,String> map1 = xmlNodeListDataDispose(headerList, document);
-			Map<String,String> map2 = xmlNodeListDataDispose(eInvoiceDataList, document);
-			Map<String,String> map3 = xmlNodeListDataDispose(taxSupervisionInfoList, document);
+			Map<String,String> map1 = workReimbursementService.xmlNodeListDataDispose(headerList, document);
+			Map<String,String> map2 = workReimbursementService.xmlNodeListDataDispose(eInvoiceDataList, document);
+			Map<String,String> map3 = workReimbursementService.xmlNodeListDataDispose(taxSupervisionInfoList, document);
 			map.putAll(map1);
 			map.putAll(map2);
 			map.putAll(map3);
 
 			//对处理后的数据根据发票号进行数据库查询,查看是否存在已报销的电子发票数据
 			if(StringUtils.isNotBlank(map.get("InvoiceNumber").toString())){
-				ReimbursementVATTax invoiceNumber = workReimbursementService.getEffectiveDataByinvoiceNumber(map.get("InvoiceNumber").toString());
+				ReimbursementVATTax invoiceNumber = workReimbursementService.getEffectiveDataByinvoiceNumber(map.get("InvoiceNumber").toString(), id);
 				if(null != invoiceNumber){
 					map.put("flag",true);
 					map.put("message","发票号:" + map.get("InvoiceNumber").toString() + " 已发起或完成报销,请勿重复报销");
@@ -1086,66 +1086,4 @@ public class WorkReimbursementController extends BaseController {
 		}
 		return map;
 	}
-
-	/**
-	 * 对节点集合进行遍历,并获取每个节点下的参数信息
-	 * @param nodeList
-	 * @param document
-	 * @return
-	 */
-	public Map<String,String> xmlNodeListDataDispose(NodeList nodeList,Document document){
-		Map<String,String> map = new HashMap<>();
-		if(null != nodeList && nodeList.getLength()>0){
-			//遍历每一个header节点
-			for (int i = 0; i < nodeList.getLength(); i++) {
-				//通过 item(i)方法 获取一个header节点,nodelist的索引值从0开始
-				Node header = nodeList.item(i);
-				//解析定义节点的子节点
-				NodeList childNodes = header.getChildNodes();
-				//节点数据处理
-				Map<String,String> map1 = xmlDataDispose(childNodes, document);
-				map.putAll(map1);
-			}
-		}
-		return map;
-	}
-
-	/**
-	 * 子节点遍历获取参数,若其下还有子节点,则循环调用 xmlNodeListDataDispose 方法
-	 * @param childNodes
-	 * @param document
-	 * @return
-	 */
-	public Map<String,String> xmlDataDispose(NodeList childNodes,Document document){
-		Map<String,String> map = new HashMap<>();
-		for (int k = 0; k < childNodes.getLength(); k++) {
-			// 区分出text类型的node以及element类型的node
-			if (childNodes.item(k).getNodeType() == Node.ELEMENT_NODE) {
-				Node firstChild = childNodes.item(k).getFirstChild();
-				if(null != firstChild){
-					if(StringUtils.isBlank(childNodes.item(k).getFirstChild().getNodeValue())){
-						// 获取所有header节点的集合
-						NodeList childList = document.getElementsByTagName(childNodes.item(k).getNodeName());
-
-						String parentName = childNodes.item(k).getNodeName();
-						//循环调用,获取最低级节点数据信息
-						Map<String,String> map1 = xmlNodeListDataDispose(childList, document);
-						Map<String,String> map2 = new HashMap<>();
-						if(map1.size()>0){
-							//将获取到的数据进行遍历,添加父节点的参数信息,防止子节点key键相同,导致数据被覆盖
-							for (String key : map1.keySet()) {
-								map2.put(parentName + key,map1.get(key));
-							}
-						}
-						map.putAll(map2);
-					}
-					//判定key 和value 值均存在,则进行储存,否则不进行储存
-					if(StringUtils.isNotBlank(childNodes.item(k).getNodeName()) && StringUtils.isNotBlank(childNodes.item(k).getFirstChild().getNodeValue())){
-						map.put(childNodes.item(k).getNodeName(),childNodes.item(k).getFirstChild().getNodeValue());
-					}
-				}
-			}
-		}
-		return map;
-	}
 }

+ 1 - 1
src/main/resources/jeeplus.properties

@@ -6,7 +6,7 @@
 jdbc.type=mysql
 jdbc.driver=com.mysql.jdbc.Driver
 db.name=ruihuaoa-activity-data
-#jdbc.url=jdbc:mysql://192.168.2.4:3306/simple_xg_total_process?useUnicode=true&characterEncoding=utf-8
+#jdbc.url=jdbc:mysql://192.168.2.4:3306/new_ccpm?useUnicode=true&characterEncoding=utf-8
 jdbc.url=jdbc:mysql://127.0.0.1:3306/new_ccpm?useUnicode=true&characterEncoding=utf-8
 jdbc.username=root
 jdbc.password=root

+ 5 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -2614,6 +2614,8 @@ END) as projectScale*/
 		LEFT JOIN project_approval_signature pas ON pas.project_id = a.id
 		LEFT JOIN project_report_signature prs ON prs.project_id = a.id
 		LEFT JOIN project_report_signature_info prsi ON prsi.project_report_id = prd.number
+		LEFT JOIN project_report_internal_audit pria ON pria.project_id = a.id
+		LEFT JOIN project_report_internal_audit_info priai ON priai.project_report_id = prd.number
 		<where>
 			a.status = 5
 			<if test="bzshbUserId!=null and bzshbUserId!=''">
@@ -2622,6 +2624,9 @@ END) as projectScale*/
 			<if test="reportSignatureStatus!=null and reportSignatureStatus!=''">
 				and prs.status=#{reportSignatureStatus}
 			</if>
+			<if test="reportInternalAuditStatus!=null and reportInternalAuditStatus!=''">
+				and pria.status=#{reportInternalAuditStatus}
+			</if>
 			<if test="approvalSignatureStatus!=null and approvalSignatureStatus!=''">
 				and pas.status=#{approvalSignatureStatus}
 			</if>

+ 9 - 1
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -82,10 +82,12 @@
 		left join sys_office sob on sub.office_id = sob.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
-			and wa.del_flag = 0
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 			</if>
+			<if test="reimbursementType != null and reimbursementType != ''">
+				AND a.reimbursement_type = #{reimbursementType}
+			</if>
 			<if test="number != null and number != ''">
 				AND a.number like concat('%',#{number},'%')
 			</if>
@@ -176,6 +178,9 @@
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 			</if>
+			<if test="reimbursementType != null and reimbursementType != ''">
+				AND a.reimbursement_type = #{reimbursementType}
+			</if>
 			<if test="project != null and project.id != null and project.id != ''">
 				AND wa.project_id = #{project.id}
 			</if>
@@ -969,6 +974,9 @@
 			and rvt.del_flag = 0
 			and rvt.reimbursement_type = 1
 			and rvt.invoice_number = #{invoiceNumber}
+			<if test="id != null and id != ''">
+				and a.work_reimbursement_id != #{id}
+			</if>
 		</where>
 		order by a.number desc,rvt.update_date desc,rvt.invoice_number desc
 		limit 1

+ 217 - 0
src/main/webapp/static/oss/ossupload.js

@@ -2011,6 +2011,198 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
 };*/
 
 
+function invoiceReimbursementMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
+
+    console.log("-----------------------start");
+    console.log("-----------------------"+realPath);
+
+    file.name.replace(" ","")
+    file.name.replace(/—/g,"")
+    var fileName = file.name;
+    // 将单引号‘’都转换成',将双引号“”都转换成"
+    fileName = fileName.replace(/\’|\‘/g,"'").replace(/\“|\”/g,"");
+    // 将中括号【】转换成[],将大括号{}转换成{}
+    fileName = fileName.replace(/\【/g,"(").replace(/\】/g,")").replace(/\{/g,"(").replace(/\}/g,")");
+    fileName = fileName.replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")");
+    // 将逗号,转换成,,将:转换成:
+    fileName = fileName.replace(/,/g,",").replace(/:/g,":");
+    //将中文——转换为英文-
+    fileName = fileName.replace(/—/g,"-")
+    fileName = fileName.replace(/……/g,"")
+    fileName = fileName.replace(/±/g,"")
+    fileName = fileName.replace(/#/g,"")
+    fileName = fileName.replace(/%/g,"")
+    fileName = fileName.replace(/Π/g,"")
+    fileName = fileName.replace(/π/g,"")
+    fileName = fileName.replace(/·/g,".")
+    var dfl=new File([file],fileName,{type:file.type});
+    file = dfl
+
+    requestUrl = realPath+"/previewController/getAccess";
+    OSS.urllib.request(requestUrl, {method: 'GET'}, function (err, response) {
+        if (err) {
+            console.log(err);
+            $.ajax({
+                type:"post",
+                url:realPath+"/previewController/saveJSError",
+                data:{object:err.toString()},
+                async: false,
+                success:function(data){
+                }
+            });
+            return alert(err);
+        }
+        try {
+            result = JSON.parse(response);
+        } catch (e) {
+            errmsg = 'parse sts response info error: ' + e.message;
+            return alert(errmsg);
+        }
+        console.log("---------result"+result);
+        client = new OSS.Wrapper({
+            accessKeyId: result.AccessKeyId,
+            accessKeySecret: result.AccessKeySecret,
+            stsToken: result.SecurityToken,
+            bucket: result.Bucket,
+            endpoint: result.Endpoint,
+            timeout:'30000'
+        });
+        storeAs = "attachment-file/" + storeAs +"/"+today+new Date().getTime()+ file.name;
+        invoiceReimbursementMultitest(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://dmtest-test.oss-cn-shanghai.aliyuncs.com', result.AliyunUrl),divId,size, cpt);
+    })
+};
+
+
+function invoiceReimbursementMultitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
+
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    ossClient.multipartUpload(storeAs, file,{
+        partSize: 1 * 1024 * 1024,
+        parallel: 5,
+        progress: function* (percent, cpt) {
+            var p = Math.floor(percent*100);
+            $("#jindutiao"+divId).attr("style","width: "+p+"%");
+            $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
+            $("#baifenbi"+divId).html(p+"%");
+            $("#fileName"+divId).html(file.name);
+            checkpoint_temp = cpt;
+        }
+    }).then(function (result) {
+        var fileLocation = "";
+        var lookUrl = "";
+        //获取文件存储位置(0:本地;1:百度云;2:阿里云)
+        $.ajax({
+            type:"get",
+            url:realPath+"/bos/getFileStorageLocation",
+            async: false,
+            success:function(data){
+                fileLocation = data.fileLocation;
+            }
+        });
+
+        returnUrl = realPath+"/sys/workattachment/saveAttachment";
+        $.ajax({
+            type:'post',
+            url:returnUrl,
+            data:{
+                "attachmentName":file['name'],
+                "attachmentId":attachmentId,
+                "attachmentFlag":attachmentFlag,
+                "fileSize":file['size'],
+                "url":"/"+storeAs,
+                "divIdType":divId
+            },
+            success:function(data){
+                var lowerType = data.type.toLowerCase();
+                if(data.status=="Success"){
+                    parent.layer.msg("上传成功!",{icon:1});
+                    var lenght =$(".trIdAdds").length;
+                    if (size != 0){
+                        lenght += size;
+                    }
+                    var addFile = "addFile"+divId;
+                    var str = '<tr class="trIdAdds">'+
+                        '<td class="text-center">' ;
+                    if(2 == fileLocation){
+                        $.ajax({
+                            type:"post",
+                            async:false,
+                            url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
+                            data:{"file":data.url,},
+                            success:function(result){
+                                lookUrl = result.lookUrl;
+                                if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
+                                    str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                }else if(isContains("pdf",lowerType)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',1)">'+data.attachmentName+'</a>';
+                                }else if(isContains("rar,zip,jar,7z",lowerType)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',3)">'+data.attachmentName+'</a>';
+                                }else if(isContains("avi,wmv,mpg,mpeg,mov,rm,ram,swf,flv,mp4,rmvb",lowerType)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/videoPreview?url=' +lookUrl+ '\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                }else {
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',2)">'+data.attachmentName+'</a>';
+                                }
+                            }
+                        });
+
+                    }else{
+                        if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
+                            str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                        }else if(isContains("pdf",lowerType)){
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',1)">'+data.attachmentName+'</a>';
+                        }else if(isContains("rar,zip,jar,7z",lowerType)){
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',3)">'+data.attachmentName+'</a>';
+                        }else if(isContains("avi,wmv,mpg,mpeg,mov,rm,ram,swf,flv,mp4,rmvb",lowerType)){
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/videoPreview?url=' +lookUrl+ '\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                        }else {
+                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',2)">'+data.attachmentName+'</a>';
+                        }
+                    }
+                    str = str +'</td>'+
+                        '<td >'+data.createByName+'</td>'+
+                        '<td >'+data.createDate+
+                        '<input name="workAttachments['+lenght+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+                        '<input name="workAttachments['+lenght+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentId+'"/>'+
+                        '<input name="workAttachments['+lenght+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.url+'"/>'+
+                        '<input name="workAttachments['+lenght+'].temporaryUrl" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.temporaryUrl+'"/>'+
+                        '<input name="workAttachments['+lenght+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentName+'"/>'+
+                        '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
+                        '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
+                        '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                        '<input name="workAttachments['+lenght+'].fileSize" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.fileSize+'"/>'+
+                        '<input name="workAttachments['+lenght+'].divIdType" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.divIdType+'"/>'+
+                        '</td>'+
+                        '<td class="op-td">'+
+                        '<div class="op-btn-box">';
+                    if(2 == fileLocation){
+                        if(isContains("pdf",lowerType)){
+                            str = str +'<a href="'+lookUrl+'" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
+                        }else{
+                            str = str +'<a href="'+lookUrl+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
+                        }
+                    }else{
+                        str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
+                    }
+                    /*str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>'+*/
+                    str = str + '<a href="javascript:void(0)" onclick="deleteFileFromAliyunByInvoiceReimbursement(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyunByInvoiceReimbursement?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                        '</div>' +
+                        '</td>'+
+                        '</tr>';
+                    $("#file"+divId).append(str);
+                }else {
+                    parent.layer.msg("上传失败!",{icon:2});
+                }
+            }
+        })
+    }).catch(function (err) {
+        console.log("err------ err:");
+        console.log(err);
+    });
+};
+
+
+
 function isContains(str, substr) {
     return str.indexOf(substr) >= 0;
 }
@@ -2041,6 +2233,31 @@ function deleteFileFromAliyun(obj,deleteUrl,addFile,divId){
         }
     });
 }
+
+function deleteFileFromAliyunByInvoiceReimbursement(obj,deleteUrl,addFile,divId){
+    if (divId==null || divId== undefined || divId == ''){
+        divId = "_attachment";
+    }
+    var fileDiv = divId.substr(1,divId.length)+"_file";
+    $("#"+fileDiv).val("");
+    $.ajax({
+        type:"post",
+        url:deleteUrl,
+        success:function(data){
+            if(data.str){
+                parent.layer.msg('删除成功',{icon:1});
+                $(obj).parent().parent().parent().remove();
+                $("#"+addFile).hide();
+                if(typeof deleteInvoiceReimbursementByNumber === 'function'){
+                    //根据附件信息删除对应的电子发票标信息
+                    deleteInvoiceReimbursementByNumber(data.InvoiceNumber)
+                }
+            }else {
+                parent.layer.msg('删除失败',{icon:2});
+            }
+        }
+    });
+}
 function deleteFileFromAliyun1(obj,deleteUrl,addFile,divId){
     /*console.log("---------------------------------:");
     console.log(divId);

+ 2 - 2
src/main/webapp/webpage/include/head.jsp

@@ -99,7 +99,7 @@
         {
              document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
             document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?10"><\/script>');
+            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?11"><\/script>');
             /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
         }
     }
@@ -107,7 +107,7 @@
     {
          document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
         document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-        document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?10"><\/script>');
+        document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?11"><\/script>');
         /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
     }
 

+ 1 - 1
src/main/webapp/webpage/include/ossTools.jsp

@@ -9,4 +9,4 @@
 <script type="text/javascript" src="${ctxStatic}/oss/lib/plupload-2.3.6/plupload-2.3.6/js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
 <script type="text/javascript" src="${ctxStatic}/oss/lib/plupload-2.3.6/plupload-2.3.6/js/plupload.dev.js"></script>
 <script type="text/javascript" src="${ctxStatic}/oss/upload.js"></script>
-<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?10"></script>
+<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?11"></script>

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

@@ -6,7 +6,7 @@
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
 	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
-	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?10"></script>
+	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?11"></script>
 	<style>
 		label.error{
 			top:40px;

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

@@ -6,7 +6,7 @@
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
 	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
-	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?10"></script>
+	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js?11"></script>
 	<style>
 		label.error{
 			top:40px;

+ 2 - 2
src/main/webapp/webpage/modules/workinvoice/workInvoiceNotProjectAuditEnd.jsp

@@ -574,9 +574,9 @@
 				</div>
 			</div>--%>
 			<div class="layui-item layui-col-sm6">
-				<label class="layui-form-label"><span class="require-item">*</span>发票类型:</label>
+				<label class="layui-form-label"><span class="require-item" style=" font-weight: bold;">*<c:choose><c:when test="${workInvoice.invoiceType eq '2'}">发票类型:</c:when></c:choose></span><c:choose><c:when test="${workInvoice.invoiceType eq '1'}">发票类型:</c:when></c:choose></label>
 				<div class="layui-input-block">
-					<input htmlEscape="false" readonly="true" id="invoiceType"  class="form-control layui-input" value="<c:choose><c:when test="${workInvoice.invoiceType eq '1'}">专票</c:when><c:when test="${workInvoice.invoiceType eq '2'}">普票</c:when></c:choose>"/>
+					<input htmlEscape="false" readonly="true" id="invoiceType"  class="form-control layui-input" <c:choose><c:when test="${workInvoice.invoiceType eq '2'}"> style=" font-weight: bold;color: red;" </c:when></c:choose> value="<c:choose><c:when test="${workInvoice.invoiceType eq '1'}">专票</c:when><c:when test="${workInvoice.invoiceType eq '2'}">普票</c:when></c:choose>"/>
 				</div>
 			</div>
 			<div class="layui-item layui-col-sm6 count1">

+ 189 - 3
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp

@@ -101,7 +101,7 @@
 			<div class="form-group-label"><h2>基础信息</h2></div>
 
 			<div class="layui-item layui-col-sm6">
-				<label class="layui-form-label"><span class="require-item">*</span>报销类型:</label>
+				<label class="layui-form-label"><span class="require-item">*</span>报销:</label>
 				<div class="layui-input-block">
 					<input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value = "${workReimbursement.reimbursementTypeStr}"/>
 				</div>
@@ -437,7 +437,7 @@
 								</td>
 									<%--开票日期--%>
 								<td>
-									<input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly autocomplete="off" onmouseover="this.title=this.value" readOnly="true" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control datetime"/>
+									<input lay-verify="date" placeholder="yyyy-MM-dd" readonly autocomplete="off" onmouseover="this.title=this.value" readOnly="true" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control datetime"/>
 								</td>
 									<%--开票单位--%>
 								<td>
@@ -467,8 +467,194 @@
 			</div>
 		</div>
 
+		<div class="form-group layui-row count2">
+			<div class="form-group-label"><h2>电子发票附件信息</h2></div>
+			<div id="addFile_attachment_InvoiceReimbursement" style="display: none" class="upload-progress">
+				<span id="fileName_attachment_InvoiceReimbursement" ></span>
+				<b><span id="baifenbi_attachment_InvoiceReimbursement" ></span></b>
+				<div class="progress">
+					<div id="jindutiao_attachment_InvoiceReimbursement" class="progress-bar" style="width: 0%" aria-valuenow="0">
+					</div>
+				</div>
+			</div>
+			<input id="attachment_file_InvoiceReimbursement" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(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_InvoiceReimbursement">
+					<c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" 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="${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="${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>
+
 		<div class="form-group layui-row">
-			<div class="form-group-label"><h2>相关附件</h2></div>
+			<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>

+ 351 - 126
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewModifyApply.jsp

@@ -115,10 +115,14 @@
             $("#attachment_btn").click(function () {
                 $("#attachment_file").click();
             });
+
+            $("#attachment_btn_InvoiceReimbursement").click(function () {
+                $("#attachment_file_InvoiceReimbursement").click();
+            });
            // getRandom();
 
 
-            laydate.render({
+            /*laydate.render({
                 elem: '#invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                 event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                 type : 'date'
@@ -131,7 +135,7 @@
                     event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                     type : 'datetime'
                 });
-            }
+            }*/
 
         });
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -141,7 +145,7 @@
                 return false;
             }
 
-            var electronicInvoiceArr = $("#reimbursementElectronicInvoiceVATTaxes tr:visible");
+            /*var electronicInvoiceArr = $("#reimbursementElectronicInvoiceVATTaxes tr:visible");
             if(electronicInvoiceArr.length>0){
                 var flag = false;
                 var countFlag = 0;
@@ -174,11 +178,11 @@
                     parent.layer.msg("已填写电子发票信息,请上传对应发票的xml文件!", {icon: 5});
                     flags= false;
                 }
-                /*if(countFlag < electronicInvoiceArr.length){
+                /!*if(countFlag < electronicInvoiceArr.length){
                     parent.layer.msg("填写电子发票数据量与上传发票xml文件数量不符,请重新上传!", {icon: 5});
                     flags= false;
-                }*/
-            }
+                }*!/
+            }*/
 
             var trlen = $("#workAccountList tr").length;
             var tdlen = $("#workAccountList tr td").length;
@@ -413,12 +417,12 @@
                 }
             });
 
-            laydate.render({
+            /*laydate.render({
                 elem : (list+idx+"_invoiceDate"),
                 event: 'focus',
                 type : 'datetime',
                 trigger: 'click'
-            });
+            });*/
         }
         function delRow(obj, prefix){
             var id = $(prefix+"_id");
@@ -493,109 +497,146 @@
         function insertTitle(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
-            var files = $("#attachment_file")[0].files;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "6";
+                console.log(file);
+                var timestamp=new Date().getTime();
 
+                var storeAs = "wrkReimbursement";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+        function insertTitleInvoiceReimbursement(tValue){
+            var list = "${workReimbursement.workAttachmentInvoiceReimbursements}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file_InvoiceReimbursement")[0].files;
             //判断报销类型是否为电子报销
-            var reimbursementType=$('input:radio[name="reimbursementType"]:checked').val();
-            if(reimbursementType === "1"){
-                for(var i = 0;i<files.length;i++) {
-                    var file = files[i];
-                    //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-                    const spliceLength2 = file.name.lastIndexOf(".");
-                    var fileNameSuffix = file.name.slice(spliceLength2 + 1);
-                    if(fileNameSuffix === "xml" ) {
-                        var formdata = new FormData();
-                        formdata.append("multipartFile",file);
-                        $.ajax({
-                            type:'post',
-                            url:"${ctx}/workreimbursement/workReimbursement/disposeXmlFile",
-                            data:formdata,
-                            contentType: false,
-                            processData: false,
-                            success:function (data) {
-                                if(data.flag){
-                                    top.layer.msg(data.message,{icon:2});
-                                }else{
-                                    //创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
-                                    var includeFlag = false;
-                                    //xml文件处理
-                                    //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
-                                    //获取专用发票信息 行数
-                                    var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
-                                    for(var i = 0;i < trlen;i++){
-                                        var id = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(0).val();
-                                        var delFlag = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(1).val();
-                                        var invoiceType = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("select").eq(0).val();
-                                        var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val();
-                                        var invoiceDate = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
-                                        var invoiceUnit = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val();
-                                        var money = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val();
-                                        var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
-                                        var sumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
-                                        var remarks = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
+            for(var i = 0;i<files.length;i++) {
+                var file = files[i];
+                //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+                const spliceLength2 = file.name.lastIndexOf(".");
+                var fileNameSuffix = file.name.slice(spliceLength2 + 1);
+                if(fileNameSuffix === "xml" ) {
+                    var formdata = new FormData();
+                    formdata.append("multipartFile",file);
+                    $.ajax({
+                        type:'post',
+                        url:"${ctx}/workreimbursement/workReimbursement/disposeXmlFile",
+                        data:formdata,
+                        contentType: false,
+                        async: false,
+                        processData: false,
+                        success:function (data) {
+                            console.log(data)
+                            if(data.flag){
+                                top.layer.msg(data.message,{icon:2});
+                            }else{
+                                //获取专用发票信息 行数
+                                var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+                                console.log("trlen:" , trlen)
+                                //创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
+                                var includeFlag = false;
+                                //xml文件处理
+                                //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
+                                //获取专用发票信息 行数
+                                for(var i = 0;i < trlen;i++){
+                                    var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
 
-                                        if(invoiceNumber === data.InvoiceNumber){
-                                            includeFlag = true
-                                            //数据处理
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("select").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val(data.BasicInformationRequestTime);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val(data.BuyerInformationBuyerName);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val("");
-                                        }
+                                    if(invoiceNumber === data.InvoiceNumber){
+                                        includeFlag = true
+                                        //数据处理
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val("");
+                                        $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val("0")
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).show();
                                     }
-                                    //若发票号不存在。则新增行将对应信息添加进去
-                                    if(!includeFlag){
-                                        addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);
-
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(0).find("input").eq(0).val("");
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(0).find("input").eq(1).val(0);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(1).find("select").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(4).find("input").eq(0).val(data.BasicInformationRequestTime);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(5).find("input").eq(0).val(data.BuyerInformationBuyerName);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(9).find("input").eq(0).val("");
+                                }
+                                //若发票号不存在。则新增行将对应信息添加进去
+                                if(!includeFlag){
+                                    addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);
 
-                                        reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;
-                                    }
-                                    var attachmentId = "";
-                                    var attachmentFlag = "6";
-                                    var timestamp=new Date().getTime();
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(0).val("");
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(1).val(0);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
+                                    $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(9).find("input").eq(0).val("");
 
-                                    var storeAs = "wrkReimbursement";
-                                    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);
+                                    reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;
                                 }
+                                var attachmentId = "";
+                                var attachmentFlag = "workInvoiceReimbursement";
+                                var timestamp=new Date().getTime();
 
+                                var storeAs = "workInvoiceReimbursement";
+                                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                                var divId = "_attachment_InvoiceReimbursement";
+                                $("#addFile"+divId).show();
+                                console.log(file)
+                                invoiceReimbursementMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
                             }
-                        });
-                    }
+
+                        }
+                    });
                 }
-            }else{
-                for(var i = 0;i<files.length;i++) {                var file = files[i];
-                    var attachmentId = "";
-                    var attachmentFlag = "6";
-                    console.log(file);
-                    var timestamp=new Date().getTime();
+                else{
+                    parent.layer.msg("请上传xml格式文件!", {icon: 5});
+                    return false;
+                }
+            }
 
-                    var storeAs = "wrkReimbursement";
-                    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 deleteInvoiceReimbursementByNumber(number){
+            if (number){
+                console.log("invoiceNumber:",number)
+                //xml文件处理
+                //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
+                //获取专用发票信息 行数
+                var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+                for(var i = 0;i < trlen;i++){
+                    var id = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(0).val();
+                    var delFlag = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("input").eq(1).val();
+                    var invoiceType = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("select").eq(0).val();
+                    var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
+                    var invoiceDate = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val();
+                    var invoiceUnit = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val();
+                    var money = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
+                    var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
+                    var sumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
+                    var remarks = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val();
+
+                    if(invoiceNumber === number){
+                        //数据处理
+                        $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val("1")
+                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).hide();
+                    }
+                }
             }
 
         }
+
         function insertTitleCollection(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
@@ -782,7 +823,7 @@
         <div class="form-group layui-row first">
             <div class="form-group-label"><h2>基础信息</h2></div>
             <div class="layui-item layui-col-sm6">
-                <label class="layui-form-label"><span class="require-item">*</span>报销类型:</label>
+                <label class="layui-form-label"><span class="require-item">*</span>报销:</label>
                 <div class="layui-input-block layui-form">
                     <input type="radio" name="reimbursementType" disabled lay-filter="reimbursementTypeRadio" title="普通报销" value="0">
                     <input type="radio" name="reimbursementType" disabled lay-filter="reimbursementTypeRadio" title="电子发票报销" value="1">
@@ -1272,10 +1313,10 @@
         </div>
 
         <div class="form-group layui-row count2">
-            <div class="form-group-label"><h2>电子发票信息<span style="color: red;font-size: 14px"> (可通过上传电子发票xml文件自动填写电子发票信息)</span></h2></div>
-            <div class="layui-item nav-btns">
+            <div class="form-group-label"><h2>电子发票信息<span style="color: red;font-size: 14px"> 可通过上传电子发票xml格式的附件自动获取发票信息</span></h2></div>
+            <%--<div class="layui-item nav-btns">
                 <a class="nav-btn nav-btn-add" onclick="addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
-            </div>
+            </div>--%>
             <div class="layui-item layui-col-xs12 form-table-container">
                 <table id="contentTable3" class="table table-bordered table-condensed can-edit">
                     <thead>
@@ -1289,7 +1330,7 @@
                         <th width="150px"><font color="red">*</font>税额</th>
                         <th width="150px"><font color="red">*</font>价税合计</th>
                         <th width="200px">备注</th>
-                        <th width="150px">操作</th>
+                        <%--<th width="150px">操作</th>--%>
                     </tr>
                     </thead>
                     <tbody id="reimbursementElectronicInvoiceVATTaxes">
@@ -1299,39 +1340,36 @@
                                 <td class="hide">
                                     <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_id" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].id" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.id}"/>
                                     <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].delFlag" type="hidden" value="0"/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.invoiceType}"/>
+
                                 </td>
                                     <%--发票类型--%>
                                 <td>
-                                    <select name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" class="form-control judgment">
-                                        <option value=""></option>
-                                        <c:forEach items="${fns:getMainDictList('invoiceReimbursementType')}" var="var">
-                                            <option value="${var.value}" <c:if test="${reimbursementElectronicInvoiceVATTaxes.invoiceType eq var.value}">selected</c:if>>${var.label}</option>
-                                        </c:forEach>
-                                    </select>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceTypeStr" onmouseover="this.title=this.value" readOnly="true" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceTypeStr" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceTypeStr}" onmouseover="this.title=this.value"  class="form-control judgment "/>
                                 </td>
                                     <%--发票项目名--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceProjectName" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceProjectName" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceProjectName}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceProjectName" onmouseover="this.title=this.value" maxlength="50" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceProjectName" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceProjectName}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
                                 </td>
                                     <%--发票号--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceNumber" onmouseover="this.title=this.value" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceNumber" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceNumber}" onmouseover="this.title=this.value" placeholder="请输入发票号"  class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceNumber" onmouseover="this.title=this.value" maxlength="30" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceNumber" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceNumber}" onmouseover="this.title=this.value" placeholder="请输入发票号"  class="form-control judgment number "/>
                                 </td>
                                     <%--开票日期--%>
                                 <td>
-                                    <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly onmouseover="this.title=this.value" autocomplete="off" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control judgment datetime"/>
+                                    <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly onmouseover="this.title=this.value" autocomplete="off" readOnly="true" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control judgment datetime"/>
                                 </td>
                                     <%--开票单位--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceUnit" onmouseover="this.title=this.value" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceUnit" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceUnit}"  placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceUnit" onmouseover="this.title=this.value" maxlength="30" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceUnit" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceUnit}"  placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
                                 </td>
                                     <%--金额--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_money" onmouseover="this.title=this.value" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.money}"  placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_money" onmouseover="this.title=this.value" readOnly="true" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.money}"  placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
                                 </td>
                                     <%--税额--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_taxAmount" onmouseover="this.title=this.value" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.taxAmount}"  placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_taxAmount" onmouseover="this.title=this.value" readOnly="true" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.taxAmount}"  placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
                                 </td>
                                     <%--合计价税--%>
                                 <td>
@@ -1339,11 +1377,11 @@
                                 </td>
                                     <%--备注--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}"    class="form-control input"/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}"    class="form-control input"/>
                                 </td>
-                                <td class="text-center op-td">
+                                <%--<td class="text-center op-td">
                                     <span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
-                                </td>
+                                </td>--%>
                             </tr>
                         </c:forEach>
                     </c:if>
@@ -1354,15 +1392,11 @@
                         <td class="hide">
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_id" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].delFlag" type="hidden" value="0"/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceType" type="hidden" value="{{row.invoiceType}}"/>
                         </td>
                             <%--发票类型--%>
                         <td>
-                            <select name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceType" id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceType" class="form-control judgment">
-                                <option value=""></option>
-                                <c:forEach items="${fns:getMainDictList('invoiceReimbursementType')}" var="var">
-                                    <option value="${var.value}">${var.label}</option>
-                                </c:forEach>
-                            </select>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceTypeStr" readOnly="true" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceTypeStr" type="text" value="{{row.invoiceTypeStr}}" onmouseover="this.title=this.value"  class="form-control judgment "/>
                         </td>
                             <%--发票项目名--%>
                         <td>
@@ -1396,9 +1430,9 @@
                          <td>
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks"  name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255"  onmouseover="this.title=this.value" class="form-control"/>
                         </td>
-                        <td class="text-center op-td">
+                        <%--<td class="text-center op-td">
                             {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
-                        </td>
+                        </td>--%>
                     </tr>//-->
                 </script>
                 <script type="text/javascript">
@@ -1421,9 +1455,200 @@
             </div>
         </div>
 
+        <div class="form-group layui-row count2">
+            <div class="form-group-label"><h2><span class="require-item">*</span>电子发票附件信息<span style="color: red;font-size: 14px"> 上传报销的电子发票xml文件</span></h2></div>
+            <div class="layui-item nav-btns">
+                <a id="attachment_btn_InvoiceReimbursement" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+            </div>
+            <div id="addFile_attachment_InvoiceReimbursement" style="display: none" class="upload-progress">
+                <span id="fileName_attachment_InvoiceReimbursement" ></span>
+                <b><span id="baifenbi_attachment_InvoiceReimbursement" ></span></b>
+                <div class="progress">
+                    <div id="jindutiao_attachment_InvoiceReimbursement" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                    </div>
+                </div>
+            </div>
+            <input id="attachment_file_InvoiceReimbursement" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(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_InvoiceReimbursement">
+                    <c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" 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="${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="${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="deleteFileFromAliyunByInvoiceReimbursement(this,'${ctx}/sys/workattachment/deleteFileFromAliyunByInvoiceReimbursement?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></div>
+            <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"

+ 18 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -138,6 +138,16 @@
                             </div>
                         </div>
                         <div class="layui-item query athird">
+                            <label class="layui-form-label">报销项:</label>
+                            <div class="layui-input-block">
+                                <form:select path="reimbursementType" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:option value="0" label="普通报销"/>
+                                    <form:option value="1" label="电子发票报销"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
                             <label class="layui-form-label double-line">报销金额:</label>
                             <div class="layui-input-block with-icon">
                                 <input id="beginReimbursementPrice" placeholder="(元)" name="beginReimbursementPrice" type="text" value="${workReimbursement.beginReimbursementPrice}" maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
@@ -201,6 +211,13 @@
                             "<span title=" + d.realnumber + ">" + d.number + "</span></a>";
                         return xml;
                     }}
+                ,{field:'reimbursementType',align:'center', title: '报销项', width:100,templet:function(d){
+                        if(1 == d.reimbursementType && d.reimbursementType != undefined){
+                            return "<span title='电子发票报销'>" +"电子发票报销"+ "</span>";
+                        }else{
+                            return "<span title='普通报销'>" +"普通报销"+ "</span>";
+                        }
+                    }}
                 ,{field:'businessTypeName',align:'center', title: '报销类别', width:100,templet:function(d){
                         return "<span title='"+ d.businessTypeName +"'>" + d.businessTypeName + "</span>";
                     }}
@@ -273,6 +290,7 @@
                     ,"realnumber":"${workReimbursement.number}"
                     ,"number":"${workReimbursement.number}"
                     ,"taskName":"${workReimbursement.taskName}"
+                    ,"reimbursementType":"${workReimbursement.reimbursementType}"
                     ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
                     ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
                     ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"

+ 368 - 139
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp

@@ -113,23 +113,26 @@
             $("#attachment_btn").click(function () {
                 $("#attachment_file").click();
             });
+            $("#attachment_btn_InvoiceReimbursement").click(function () {
+                $("#attachment_file_InvoiceReimbursement").click();
+            });
             // getRandom();
 
 
-            laydate.render({
+            /*laydate.render({
                 elem: '#invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                 event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                 type : 'date'
-            });
+            });*/
 
-            var data = ${fns:toJson(workReimbursement.reimbursementElectronicInvoiceVATTaxes)};//后端获取值
+            /*var data = ${fns:toJson(workReimbursement.reimbursementElectronicInvoiceVATTaxes)};//后端获取值
             for (var i=0; i<data.length; i++){
                 laydate.render({
                     elem: '#reimbursementElectronicInvoiceVATTaxes' + i + '_invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                     event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                     type : 'datetime'
                 });
-            }
+            }*/
 
         });
             <%--$.ajax({--%>
@@ -175,6 +178,10 @@
                 }
 
                 var electronicInvoiceArr = $("#reimbursementElectronicInvoiceVATTaxes tr:visible");
+                for (let i = 0; i <electronicInvoiceArr.length ; i++) {
+                    $('#reimbursementElectronicInvoiceVATTaxes' + i + '_invoiceType').attr("disabled",false);
+                }
+                /*var electronicInvoiceArr = $("#reimbursementElectronicInvoiceVATTaxes tr:visible");
                 if(electronicInvoiceArr.length>0){
                     var flag = false;
                     var countFlag = 0;
@@ -207,11 +214,11 @@
                         parent.layer.msg("已填写电子发票信息,请上传对应发票的xml文件!", {icon: 5});
                         flags= false;
                     }
-                    /*if(countFlag < electronicInvoiceArr.length){
+                    /!*if(countFlag < electronicInvoiceArr.length){
                         parent.layer.msg("填写电子发票数据量与上传发票xml文件数量不符,请重新上传!", {icon: 5});
                         flags= false;
-                    }*/
-                }
+                    }*!/
+                }*/
 
                 if (flags){
                     $("#inputForm").attr("action","${ctx}/workreimbursement/workReimbursement/save");
@@ -430,12 +437,12 @@
                 }
             });
 
-            laydate.render({
+            /*laydate.render({
                 elem : (list+idx+"_invoiceDate"),
                 event: 'focus',
                 type : 'datetime',
                 trigger: 'click'
-            });
+            });*/
         }
         function delRow(obj, prefix){
             var id = $(prefix+"_id");
@@ -511,11 +518,25 @@
         function insertTitle(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
-            var files = $("#attachment_file")[0].files;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "6";
+                console.log(file);
+                var timestamp=new Date().getTime();
 
+                var storeAs = "wrkReimbursement";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+        function insertTitleInvoiceReimbursement(tValue){
+            var list = "${workReimbursement.workAttachmentInvoiceReimbursements}";
+            var id = "${workReimbursement.id}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file_InvoiceReimbursement")[0].files;
             //判断报销类型是否为电子报销
-            var reimbursementType=$('input:radio[name="reimbursementType"]:checked').val();
-            if(reimbursementType === "1"){
                 for(var i = 0;i<files.length;i++) {
                     var file = files[i];
                     //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
@@ -524,96 +545,119 @@
                     if(fileNameSuffix === "xml" ) {
                         var formdata = new FormData();
                         formdata.append("multipartFile",file);
+                        formdata.append("id",id);
                         $.ajax({
                             type:'post',
                             url:"${ctx}/workreimbursement/workReimbursement/disposeXmlFile",
                             data:formdata,
                             contentType: false,
+                            async: false,
                             processData: false,
                             success:function (data) {
+                                console.log(data)
                                 if(data.flag){
                                     top.layer.msg(data.message,{icon:2});
                                 }else{
+                                    //获取专用发票信息 行数
+                                    var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+                                    console.log("trlen:" , trlen)
                                     //创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
                                     var includeFlag = false;
                                     //xml文件处理
                                     //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
                                     //获取专用发票信息 行数
-                                    var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
                                     for(var i = 0;i < trlen;i++){
-                                        var id = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(0).val();
-                                        var delFlag = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(1).val();
-                                        var invoiceType = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("select").eq(0).val();
-                                        var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val();
-                                        var invoiceDate = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
-                                        var invoiceUnit = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val();
-                                        var money = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val();
-                                        var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
-                                        var sumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
-                                        var remarks = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
+                                        var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
 
                                         if(invoiceNumber === data.InvoiceNumber){
                                             includeFlag = true
                                             //数据处理
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("select").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
+                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
+                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val(data.BasicInformationRequestTime);
-                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val(data.BuyerInformationBuyerName);
+                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
+                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
                                             $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val("");
+                                            $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val("0")
+                                            $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).show();
                                         }
                                     }
                                     //若发票号不存在。则新增行将对应信息添加进去
                                     if(!includeFlag){
                                         addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);
 
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(0).find("input").eq(0).val("");
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(0).find("input").eq(1).val(0);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(1).find("select").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(4).find("input").eq(0).val(data.BasicInformationRequestTime);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(5).find("input").eq(0).val(data.BuyerInformationBuyerName);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
-                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(reimbursementElectronicInvoiceVATTaxesRowIdx).find("td").eq(9).find("input").eq(0).val("");
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(0).val("");
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(1).val(0);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(6).find("input").eq(0).val(data.IssuItemInformationAmount);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(7).find("input").eq(0).val(data.IssuItemInformationComTaxAm);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(8).find("input").eq(0).val(data.IssuItemInformationTotaltaxIncludedAmount);
+                                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(9).find("input").eq(0).val("");
 
                                         reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;
                                     }
                                     var attachmentId = "";
-                                    var attachmentFlag = "6";
+                                    var attachmentFlag = "workInvoiceReimbursement";
                                     var timestamp=new Date().getTime();
 
-                                    var storeAs = "wrkReimbursement";
+                                    var storeAs = "workInvoiceReimbursement";
                                     var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
-                                    var divId = "_attachment";
+                                    var divId = "_attachment_InvoiceReimbursement";
                                     $("#addFile"+divId).show();
-                                    multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
+                                    console.log(file)
+                                    invoiceReimbursementMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
                                 }
 
                             }
                         });
                     }
+                    else{
+                        parent.layer.msg("请上传xml格式文件!", {icon: 5});
+                        return false;
+                    }
+                }
+
+        }
+
+        function deleteInvoiceReimbursementByNumber(number){
+            if (number){
+                console.log("invoiceNumber:",number)
+                //xml文件处理
+                //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
+                //获取专用发票信息 行数
+                var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+                for(var i = 0;i < trlen;i++){
+                    var id = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(0).val();
+                    var delFlag = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("input").eq(1).val();
+                    var invoiceType = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("select").eq(0).val();
+                    var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
+                    var invoiceDate = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val();
+                    var invoiceUnit = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val();
+                    var money = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
+                    var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
+                    var sumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
+                    var remarks = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val();
+
+                    if(invoiceNumber === number){
+                        //数据处理
+                        $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val("1")
+                        $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).hide();
+                    }
                 }
-            }else{
-                for(var i = 0;i<files.length;i++) {                var file = files[i];
-                    var attachmentId = "";
-                    var attachmentFlag = "6";
-                    console.log(file);
-                    var timestamp=new Date().getTime();
-
-                    var storeAs = "wrkReimbursement";
-                    var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
-                    var divId = "_attachment";
-                    $("#addFile"+divId).show();
-                    multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
             }
 
         }
+
+
         function insertTitleCollection(tValue){
             var list = "${workReimbursement.workAttachments}";
             var size = (list.split('url')).length-1;
@@ -796,7 +840,7 @@
             <div class="form-group-label"><h2>基础信息</h2></div>
 
             <div class="layui-item layui-col-sm6">
-                <label class="layui-form-label"><span class="require-item">*</span>报销类型:</label>
+                <label class="layui-form-label"><span class="require-item">*</span>报销:</label>
                 <div class="layui-input-block layui-form">
                     <input type="radio" name="reimbursementType" lay-filter="reimbursementTypeRadio" title="普通报销" value="0">
                     <input type="radio" name="reimbursementType" lay-filter="reimbursementTypeRadio" title="电子发票报销" value="1">
@@ -1186,10 +1230,10 @@
         </div>
 
         <div class="form-group layui-row count2">
-            <div class="form-group-label"><h2>电子发票信息<span style="color: red;font-size: 14px"> (可通过上传电子发票xml文件自动填写电子发票信息)</span></h2></div>
-            <div class="layui-item nav-btns">
+            <div class="form-group-label"><h2>电子发票信息<span style="color: red;font-size: 14px"> 可通过上传电子发票xml格式的附件自动获取发票信息</span></h2></div>
+            <%--<div class="layui-item nav-btns">
                 <a class="nav-btn nav-btn-add" onclick="addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
-            </div>
+            </div>&ndash;%&gt;--%>
             <div class="layui-item layui-col-xs12 form-table-container">
                 <table id="contentTable3" class="table table-bordered table-condensed can-edit">
                     <thead>
@@ -1203,7 +1247,7 @@
                         <th width="150px"><font color="red">*</font>税额</th>
                         <th width="150px"><font color="red">*</font>价税合计</th>
                         <th width="200px">备注</th>
-                        <th width="150px">操作</th>
+                        <%--<th width="150px">操作</th>--%>
                     </tr>
                     </thead>
                     <tbody id="reimbursementElectronicInvoiceVATTaxes">
@@ -1213,39 +1257,36 @@
                                 <td class="hide">
                                     <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_id" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].id" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.id}"/>
                                     <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].delFlag" type="hidden" value="0"/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.invoiceType}"/>
+
                                 </td>
                                     <%--发票类型--%>
                                 <td>
-                                    <select name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" class="form-control judgment">
-                                        <option value=""></option>
-                                        <c:forEach items="${fns:getMainDictList('invoiceReimbursementType')}" var="var">
-                                            <option value="${var.value}" <c:if test="${reimbursementElectronicInvoiceVATTaxes.invoiceType eq var.value}">selected</c:if>>${var.label}</option>
-                                        </c:forEach>
-                                    </select>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceTypeStr" onmouseover="this.title=this.value" readOnly="true" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceTypeStr" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceTypeStr}" onmouseover="this.title=this.value"  class="form-control judgment "/>
                                 </td>
                                     <%--发票项目名--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceProjectName" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceProjectName" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceProjectName}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceProjectName" onmouseover="this.title=this.value" readOnly="true" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceProjectName" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceProjectName}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
                                 </td>
                                     <%--发票号--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceNumber" onmouseover="this.title=this.value" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceNumber" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceNumber}" onmouseover="this.title=this.value" placeholder="请输入发票号"  class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceNumber" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceNumber" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceNumber}" onmouseover="this.title=this.value" placeholder="请输入发票号"  class="form-control judgment number "/>
                                 </td>
                                     <%--开票日期--%>
                                 <td>
-                                    <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly onmouseover="this.title=this.value" autocomplete="off" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control judgment datetime"/>
+                                    <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly onmouseover="this.title=this.value" readOnly="true" autocomplete="off" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control judgment datetime"/>
                                 </td>
                                     <%--开票单位--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceUnit" onmouseover="this.title=this.value" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceUnit" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceUnit}"  placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceUnit" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceUnit" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceUnit}"  placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
                                 </td>
                                     <%--金额--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_money" onmouseover="this.title=this.value" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.money}"  placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_money" onmouseover="this.title=this.value" readOnly="true" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.money}"  placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
                                 </td>
                                     <%--税额--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_taxAmount" onmouseover="this.title=this.value" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.taxAmount}"  placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_taxAmount" onmouseover="this.title=this.value" readOnly="true" onchange="getMoneyElectronicInvoiceVATT(${index.index})" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.taxAmount}"  placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control judgment number "/>
                                 </td>
                                     <%--合计价税--%>
                                 <td>
@@ -1253,11 +1294,11 @@
                                 </td>
                                     <%--备注--%>
                                 <td>
-                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}"    class="form-control input"/>
+                                    <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value"  name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}"    class="form-control input"/>
                                 </td>
-                                <td class="text-center op-td">
+                                <%--<td class="text-center op-td">
                                     <span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
-                                </td>
+                                </td>--%>
                             </tr>
                         </c:forEach>
                     </c:if>
@@ -1268,51 +1309,47 @@
                         <td class="hide">
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_id" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].delFlag" type="hidden" value="0"/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceType" type="hidden" value="{{row.invoiceType}}"/>
                         </td>
                             <%--发票类型--%>
                         <td>
-                            <select name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceType" id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceType" class="form-control judgment">
-                                <option value=""></option>
-                                <c:forEach items="${fns:getMainDictList('invoiceReimbursementType')}" var="var">
-                                    <option value="${var.value}">${var.label}</option>
-                                </c:forEach>
-                            </select>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceTypeStr" readOnly="true" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceTypeStr" type="text" value="{{row.invoiceTypeStr}}" onmouseover="this.title=this.value"  class="form-control judgment "/>
                         </td>
                             <%--发票项目名--%>
                         <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceProjectName" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceProjectName" type="text" value="{{row.invoiceNumber}}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceProjectName" readOnly="true" onmouseover="this.title=this.value" maxlength="50" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceProjectName" type="text" value="{{row.invoiceNumber}}" onmouseover="this.title=this.value" placeholder="请输入发票项目名"  class="form-control judgment "/>
                         </td>
                             <%--发票号--%>
                         <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceNumber" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceNumber" type="text" value="{{row.invoiceNumber}}" onmouseover="this.title=this.value" maxlength="32" placeholder="请输入发票号"  class="form-control judgment number "/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceNumber" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceNumber" type="text" value="{{row.invoiceNumber}}" onmouseover="this.title=this.value" maxlength="32" placeholder="请输入发票号"  class="form-control judgment number "/>
                         </td>
                             <%--开票日期--%>
                         <td>
-                            <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly autocomplete="off" id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceDate" type="text" value="{{row.invoiceDate}}"  onmouseover="this.title=this.value" class="form-control required datetime"/>
+                            <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss"  readOnly="true" autocomplete="off" id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceDate" type="text" value="{{row.invoiceDate}}"  onmouseover="this.title=this.value" class="form-control required datetime"/>
                         </td>
                             <%--开票单位--%>
                         <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceUnit" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceUnit" type="text" value="{{row.invoiceUnit}}" maxlength="32" placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceUnit" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceUnit" type="text" value="{{row.invoiceUnit}}" maxlength="32" placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control judgment "/>
                         </td>
                             <%--金额--%>
                          <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_money" onchange="getMoneyElectronicInvoiceVATT({{idx}})" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].money" type="text" value="{{row.money}}" maxlength="32" placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control number judgment"/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_money" readOnly="true" onchange="getMoneyElectronicInvoiceVATT({{idx}})" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].money" type="text" value="{{row.money}}" maxlength="32" placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control number judgment"/>
                         </td>
                             <%--税额--%>
                         <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_taxAmount"  onchange="getMoneyElectronicInvoiceVATT({{idx}})"name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].taxAmount" type="text" value="{{row.taxAmount}}" maxlength="32" placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control number judgment"/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_taxAmount" readOnly="true"  onchange="getMoneyElectronicInvoiceVATT({{idx}})"name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].taxAmount" type="text" value="{{row.taxAmount}}" maxlength="32" placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control number judgment"/>
                         </td>
                             <%--合计价税--%>
                          <td>
-                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_sumMoney" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].sumMoney" type="text" value="{{row.sumMoney}}" maxlength="32"  onmouseover="this.title=this.value" class="form-control number judgment sumMoney"/>
+                            <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_sumMoney" readOnly="true" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].sumMoney" type="text" value="{{row.sumMoney}}" maxlength="32"  onmouseover="this.title=this.value" class="form-control number judgment sumMoney"/>
                         </td>
                             <%--备注--%>
                          <td>
                             <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks"  name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255"  onmouseover="this.title=this.value" class="form-control"/>
                         </td>
-                        <td class="text-center op-td">
+                        <%--<td class="text-center op-td">
                             {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
-                        </td>
+                        </td>--%>
                     </tr>//-->
                 </script>
                 <script type="text/javascript">
@@ -1335,8 +1372,200 @@
             </div>
         </div>
 
+        <div class="form-group layui-row count2">
+            <div class="form-group-label"><h2><span class="require-item">*</span>电子发票附件信息<span style="color: red;font-size: 14px"> 上传报销的电子发票xml文件</span></h2></div>
+            <div class="layui-item nav-btns">
+                <a id="attachment_btn_InvoiceReimbursement" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+            </div>
+            <div id="addFile_attachment_InvoiceReimbursement" style="display: none" class="upload-progress">
+                <span id="fileName_attachment_InvoiceReimbursement" ></span>
+                <b><span id="baifenbi_attachment_InvoiceReimbursement" ></span></b>
+                <div class="progress">
+                    <div id="jindutiao_attachment_InvoiceReimbursement" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                    </div>
+                </div>
+            </div>
+            <input id="attachment_file_InvoiceReimbursement" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(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_InvoiceReimbursement">
+                    <c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" 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="${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="${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="deleteFileFromAliyunByInvoiceReimbursement(this,'${ctx}/sys/workattachment/deleteFileFromAliyunByInvoiceReimbursement?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></div>
+            <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"
@@ -1369,70 +1598,70 @@
                     <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')
+                            <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')
+                                            <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')
+                                                            <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')
+                                            <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><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>

+ 188 - 3
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp

@@ -89,7 +89,7 @@
         <div class="form-group-label"><h2>基础信息</h2></div>
 
         <div class="layui-item layui-col-sm6">
-            <label class="layui-form-label"><span class="require-item">*</span>报销类型:</label>
+            <label class="layui-form-label"><span class="require-item">*</span>报销:</label>
             <div class="layui-input-block">
                 <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value = "${workReimbursement.reimbursementTypeStr}"/>
             </div>
@@ -481,7 +481,7 @@
                         <tr id="reimbursementElectronicInvoiceVATTaxes${index.index}">
                                 <%--发票类型--%>
                             <td>
-                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceType}" onmouseover="this.title=this.value"  class="form-control "/>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceTypeStr}" onmouseover="this.title=this.value"  class="form-control "/>
                             </td>
                                 <%--发票项目名--%>
                             <td>
@@ -523,9 +523,194 @@
         </div>
     </div>
 
+    <div class="form-group layui-row count2">
+        <div class="form-group-label"><h2>电子发票附件信息</h2></div>
+        <div id="addFile_attachment_InvoiceReimbursement" style="display: none" class="upload-progress">
+            <span id="fileName_attachment_InvoiceReimbursement" ></span>
+            <b><span id="baifenbi_attachment_InvoiceReimbursement" ></span></b>
+            <div class="progress">
+                <div id="jindutiao_attachment_InvoiceReimbursement" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                </div>
+            </div>
+        </div>
+        <input id="attachment_file_InvoiceReimbursement" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(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_InvoiceReimbursement">
+                <c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" 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="${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="${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>
 
     <div class="form-group layui-row">
-        <div class="form-group-label"><h2>相关附件</h2></div>
+        <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>

+ 19 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

@@ -190,6 +190,17 @@
 <%--                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff"/>--%>
                             </div>
                         </div>
+
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销项:</label>
+                            <div class="layui-input-block">
+                                <form:select path="reimbursementType" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:option value="0" label="普通报销"/>
+                                    <form:option value="1" label="电子发票报销"/>
+                                </form:select>
+                            </div>
+                        </div>
                         <div class="layui-item query athird">
                             <label class="layui-form-label double-line">报销金额:</label>
                             <div class="layui-input-block with-icon">
@@ -255,6 +266,13 @@
                             "<span title=" + d.realnumber + ">" + d.number + "</span></a>";
                         return xml;
                     }}
+                ,{field:'reimbursementType',align:'center', title: '报销项', width:100,templet:function(d){
+                        if(1 == d.reimbursementType && d.reimbursementType != undefined){
+                            return "<span title='电子发票报销'>" +"电子发票报销"+ "</span>";
+                        }else{
+                            return "<span title='普通报销'>" +"普通报销"+ "</span>";
+                        }
+                    }}
                 ,{field:'businessTypeName',align:'center', title: '报销类别', width:100,templet:function(d){
                         return "<span title='"+ d.businessTypeName +"'>" + d.businessTypeName + "</span>";
                     }}
@@ -343,6 +361,7 @@
                     ,"taskName":"${workReimbursement.taskName}"
                     ,"notifyFlag":"${workReimbursement.notifyFlag}"
                     ,"notifyId":"${workReimbursement.notifyId}"
+                    ,"reimbursementType":"${workReimbursement.reimbursementType}"
                     ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
                     ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
                     ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"