浏览代码

报销功能调整(添加补贴金额模块,报销人更改为多选)

徐滕 1 月之前
父节点
当前提交
e06fdde782
共有 28 个文件被更改,包括 702 次插入217 次删除
  1. 1 0
      src/main/java/com/jeeplus/modules/sys/dao/OfficeDao.java
  2. 1 0
      src/main/java/com/jeeplus/modules/sys/dao/UserDao.java
  3. 5 0
      src/main/java/com/jeeplus/modules/sys/service/OfficeService.java
  4. 10 0
      src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java
  5. 9 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkAccount.java
  6. 19 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  7. 112 3
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java
  8. 2 0
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java
  9. 69 3
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  10. 2 2
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementAllController.java
  11. 2 2
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java
  12. 13 0
      src/main/resources/mappings/modules/sys/OfficeDao.xml
  13. 15 0
      src/main/resources/mappings/modules/sys/UserDao.xml
  14. 17 4
      src/main/resources/mappings/modules/workreimbursement/WorkAccountDao.xml
  15. 36 24
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  16. 18 4
      src/main/webapp/WEB-INF/tags/sys/reimburtreeselectUser.tag
  17. 27 13
      src/main/webapp/static/common/html/js/script.js
  18. 51 22
      src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllFormAdd.jsp
  19. 16 10
      src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllFormDetail.jsp
  20. 45 20
      src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllModifyApply.jsp
  21. 15 9
      src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewAudit.jsp
  22. 51 22
      src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewFormAdd.jsp
  23. 45 20
      src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewModifyApply.jsp
  24. 46 21
      src/main/webapp/webpage/modules/workreimbursement/treeForm/replenish/workReimbursementReplenishAudit.jsp
  25. 14 8
      src/main/webapp/webpage/modules/workreimbursement/treeForm/replenish/workReimbursementReplenishCwAudit.jsp
  26. 14 8
      src/main/webapp/webpage/modules/workreimbursement/treeForm/specific/workReimbursementSpecificAudit.jsp
  27. 45 20
      src/main/webapp/webpage/modules/workreimbursement/treeForm/specific/workReimbursementSpecificModifyApply.jsp
  28. 2 2
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

+ 1 - 0
src/main/java/com/jeeplus/modules/sys/dao/OfficeDao.java

@@ -20,6 +20,7 @@ public interface OfficeDao extends TreeDao<Office> {
 
 	public Office getByCode(String code);
 	public Office getByName(String name);
+	public List<Office> getOfficeByName(@Param("name") String name);
 	public void saveBranchOffice(Office office);
 	public void updateUseable(Office office);
 

+ 1 - 0
src/main/java/com/jeeplus/modules/sys/dao/UserDao.java

@@ -30,6 +30,7 @@ public interface UserDao extends CrudDao<User> {
 	 */
 	public User getByLoginName(User user);
 	public List<User> getByName(User user);
+	public List<User> getUserByName(@Param("name")String name);
 
 	public User getByUserId(String id);
 	public User findUserByNo(@Param("no")String no,@Param("companyId")String companyId);

+ 5 - 0
src/main/java/com/jeeplus/modules/sys/service/OfficeService.java

@@ -204,6 +204,11 @@ public class OfficeService extends TreeService<OfficeDao, Office> {
         return dao.getByName(name);
     }
 
+    @Transactional(readOnly = true)
+    public List<Office> getOfficeByName(String name){
+        return dao.getOfficeByName(name);
+    }
+
 
 	@Transactional(readOnly = false)
 	public void save(Office office) {

+ 10 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -218,6 +218,16 @@ public class UserUtils {
 		}
 		return user;
 	}
+	/**
+	 * 根据登录名获取用户
+	 * @param name
+	 * @return 取不到返回null
+	 */
+	public static List<User> getUserByName(String name){
+
+		List<User> list = userDao.getUserByName(name);
+		return list;
+	}
 
 	/**
 	 * 根据登录名获取用户

+ 9 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkAccount.java

@@ -34,6 +34,7 @@ public class WorkAccount extends DataEntity<WorkAccount> {
     private BigDecimal money;  //报销费用(元)
 	private BigDecimal eInvoiceMoney;		// 数电发票报销金额
 	private BigDecimal invoiceMoney;		// 普通发票报销金额
+	private BigDecimal subsidyMoney;		// 补贴金额
 	private BigDecimal tax; //税金(元)
 	private WorkReimbursement workReimbursement;		// 报销单主键 父类
 	private List<WorkAccountAudit> workAccountAuditList;		// 报销单主键 父类
@@ -254,6 +255,14 @@ public class WorkAccount extends DataEntity<WorkAccount> {
 		this.invoiceMoney = invoiceMoney;
 	}
 
+	public BigDecimal getSubsidyMoney() {
+		return subsidyMoney;
+	}
+
+	public void setSubsidyMoney(BigDecimal subsidyMoney) {
+		this.subsidyMoney = subsidyMoney;
+	}
+
 	public Integer geteInvoiceBills() {
 		return eInvoiceBills;
 	}

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

@@ -87,6 +87,9 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private Integer oldDataType; // 老数据状态
 	private String invoiceNumber; // 报销数电票号
 
+	private List<String> submitterIdList;
+	private List<String> submitterOfficeIdList;
+
 	public String getComment() {
 		return comment;
 	}
@@ -756,4 +759,20 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setInvoiceNumber(String invoiceNumber) {
 		this.invoiceNumber = invoiceNumber;
 	}
+
+	public List<String> getSubmitterIdList() {
+		return submitterIdList;
+	}
+
+	public void setSubmitterIdList(List<String> submitterIdList) {
+		this.submitterIdList = submitterIdList;
+	}
+
+	public List<String> getSubmitterOfficeIdList() {
+		return submitterOfficeIdList;
+	}
+
+	public void setSubmitterOfficeIdList(List<String> submitterOfficeIdList) {
+		this.submitterOfficeIdList = submitterOfficeIdList;
+	}
 }

+ 112 - 3
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java

@@ -679,15 +679,57 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
     }
     @Transactional(readOnly = false)
     public void updateWorkReimbursementInfo(WorkReimbursement workReimbursement) {
+        workReimbursement.setReimbursementElectronicInvoiceVATTaxes(Lists.newArrayList());
+        List<ReimbursementVATTax> temporaryReimbursementElectronicInvoiceVATTaxes = Lists.newArrayList();
         try {
             for (WorkAccount workAccount : workReimbursement.getWorkAccountList()) {
                 if(null == workAccount.getId()){
                     continue;
                 }
+                String id = workAccount.getId();
+                //如果id种包含random,则表示该数据是后加的,可能存在子节点数据,可以根据id进行获取,并处理
+                List<ReimbursementVATTax> invoiceList = Lists.newArrayList();
+                if(id.contains("random")){
+                    for (ReimbursementVATTax invoiceVATTax : workAccount.getReimbursementElectronicInvoiceVATTaxes()) {
+                        if(null == invoiceVATTax.getParentId()){
+                            continue;
+                        }
+                        if(invoiceVATTax.getParentId().contains(id)){
+                            invoiceList.add(invoiceVATTax);
+                        }
+                    }
+                    workAccount.setId("");
+                }else{
+                    for (ReimbursementVATTax invoiceVATTax : workAccount.getReimbursementElectronicInvoiceVATTaxes()) {
+                        if(null == invoiceVATTax.getParentId()){
+                            continue;
+                        }
+                        if(invoiceVATTax.getParentId().contains("#workAccountList_")){
+                            invoiceVATTax.setParentId(invoiceVATTax.getParentId().replace("#workAccountList_", ""));
+                        }
+                    }
+                }
+
+                for (ReimbursementVATTax invoiceVATTax : workAccount.getReimbursementElectronicInvoiceVATTaxes()) {
+                    if(null == invoiceVATTax.getInvoiceNumber()){
+                        continue;
+                    }
+                    invoiceVATTax.setParentId(workAccount.getId());
+                    temporaryReimbursementElectronicInvoiceVATTaxes.add(invoiceVATTax);
+                }
+
+
                 if(StringUtils.isNotBlank(workAccount.getReimbursementName())){
-                    //添加人员部门id
-                    User user = UserUtils.get(workAccount.getReimbursementName());
-                    workAccount.setOfficeId(user.getOffice().getId());
+                    //添加人员部门id(可能是多个人员信息,此处需要根据,进行分割并重新处理)
+                    List<String> reimbursementuserIdlist = Arrays.asList(workAccount.getReimbursementName().split(","));
+                    Set<String> officeIdList = new HashSet<>();
+                    for (String userId : reimbursementuserIdlist) {
+                        User user = UserUtils.get(userId);
+                        if(null != user){
+                            officeIdList.add(user.getOffice().getId());
+                        }
+                    }
+                    workAccount.setOfficeId(String.join(",", officeIdList));
                 }else{
                     workAccount.setOfficeId("");
                 }
@@ -726,6 +768,51 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                 } else {
                     workAccountDao.delete(workAccount);
                 }
+
+                //如果invoiceList不为空,则对其下的报销数据进行处理
+                for (ReimbursementVATTax info : invoiceList) {
+                    for (ReimbursementVATTax invoiceVATTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
+                        if(info.getParentId().equals(invoiceVATTax.getParentId())){
+                            invoiceVATTax.setParentId(workAccount.getId());
+                        }
+                    }
+                }
+            }
+            workReimbursement.setReimbursementElectronicInvoiceVATTaxes(temporaryReimbursementElectronicInvoiceVATTaxes);
+
+
+            List<WorkClientAttachment> disposeAttachmentList = Lists.newArrayList();
+            //处理数电发票附件信息
+            List<ReimbursementVATTax> reimbursementElectronicInvoiceVATTaxes = workReimbursement.getReimbursementElectronicInvoiceVATTaxes();
+            if(reimbursementElectronicInvoiceVATTaxes.size()>0){
+                for(int i = 0; i < reimbursementElectronicInvoiceVATTaxes.size(); i ++){
+                    ReimbursementVATTax reimbursementVATTax = reimbursementElectronicInvoiceVATTaxes.get(i);
+                    //判定有没有附件url
+                    if(StringUtils.isNotBlank(reimbursementVATTax.getUrl()) && !"1".equals(reimbursementVATTax.getDelFlag())){
+                        WorkClientAttachment workClientAttachment = new WorkClientAttachment();
+                        workClientAttachment.setUrl(reimbursementVATTax.getUrl());
+                        workClientAttachment.setAttachmentName(reimbursementVATTax.getAttachmentName());
+                        workClientAttachment.setDivIdType(reimbursementVATTax.getDivIdType());
+                        workClientAttachment.setType(reimbursementVATTax.getType());
+                        workClientAttachment.setAttachmentId(workReimbursement.getId());
+                        workClientAttachment.setProjectId(reimbursementVATTax.getInvoiceNumber());
+                        workClientAttachment.setFileSize(reimbursementVATTax.getFileSize());
+                        workClientAttachment.setAttachmentFlag(reimbursementVATTax.getAttachmentFlag());
+                        workClientAttachment.setSort(String.valueOf(i +1));
+                        workClientAttachment.setDelFlag("0");
+                        if(StringUtils.isNotBlank(reimbursementVATTax.getWorkAttachmentId())){
+                            workClientAttachment.setId(reimbursementVATTax.getWorkAttachmentId());
+                        }else{
+                            workClientAttachment.setId("");
+                        }
+
+                        disposeAttachmentList.add(workClientAttachment);
+                    }
+                }
+            }
+
+            if(disposeAttachmentList.size()>0){
+                workReimbursement.getWorkAttachments().addAll(disposeAttachmentList);
             }
 
             if("0".equals(workReimbursement.getReimbursementType())){
@@ -790,6 +877,28 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                     workClientAttachmentDao.delete(workClientAttachment);
                 }
             }
+
+            //查询数电发票上传得文件信息和disposeAttachmentList进行比对,如果查出来的不存在于disposeAttachmentList中,则表示数据被删除,应该从数据库中进行删除
+            if(disposeAttachmentList.size()>0){
+                WorkClientAttachment workClientAttachment = new WorkClientAttachment();
+                String attachmentFlag = disposeAttachmentList.get(0).getAttachmentFlag();
+                workClientAttachment.setAttachmentId(workReimbursement.getId());
+                workClientAttachment.setAttachmentFlag(attachmentFlag);
+                List<WorkClientAttachment> attachmentList = workattachmentService.getNotDisposeAttachmentList(workClientAttachment);
+                List<String> workAttachmentUrlList = Lists.newArrayList();
+                for (WorkClientAttachment clientAttachment : disposeAttachmentList) {
+                    workAttachmentUrlList.add(clientAttachment.getUrl());
+                }
+                String workAttachmentUrls = String.join(", ", workAttachmentUrlList);
+
+                for (WorkClientAttachment clientAttachment : attachmentList) {
+                    //如果本次保存的文件url不存在在数据库表中,则进行删除
+                    if(!workAttachmentUrls.contains(clientAttachment.getUrl())){
+                        workClientAttachmentDao.delete(clientAttachment);
+                    }
+                }
+            }
+
             if(workReimbursement.getReimbursementBackList()!=null&&workReimbursement.getReimbursementBackList().size()>0){
                 WorkReimbursementBack w=new WorkReimbursementBack();
                 w.setAchivesId(workReimbursement.getAchivesId());

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

@@ -1277,6 +1277,8 @@ public class WorkReimbursementNewService extends CrudService<WorkReimbursementDa
                 workAccount.setReimburseRemarks(workAccount.getProject().getProjectName());
             }else if (null != workAccount.getProjectRadio() && workAccount.getProjectRadio() ==1 && StringUtils.isBlank(workAccount.getProject().getId())){
                 workAccount.setReimburseRemarks(workAccount.getProject().getProjectName());
+            }else if(null != workAccount.getProjectRadio() && workAccount.getProjectRadio() == 2){
+                workAccount.setReimburseRemarks(workAccount.getProject().getProjectName());
             }
             if (WorkAccount.DEL_FLAG_NORMAL.equals(workAccount.getDelFlag())) {
                 List<WorkAccountAudit> workAccountAudits = workAccount.getWorkAccountAuditList();

+ 69 - 3
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -353,11 +353,54 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                 }
             }
         }
+
+        //查询报销的部门id
+        if(StringUtils.isBlank(workReimbursement.getOfficeId()) && StringUtils.isNotBlank(workReimbursement.getOfficeName())){
+            if ("一部本部".equals(workReimbursement.getOfficeName())) {
+                List<String> officeIdList = Lists.newArrayList();
+                Office office = officeService.getByName("工程一部");
+                officeIdList.add(office.getId());
+                workReimbursement.setOfficeIdList(officeIdList);
+            }else{
+                List<Office> officeList = officeService.getOfficeByName(workReimbursement.getOfficeName());
+                if(officeList!=null && officeList.size()>0){
+                    List<String> officeIdList = Lists.newArrayList();
+                    for (Office office : officeList) {
+                        officeIdList.add(office.getId());
+                        //获取其下的所有子部门信息
+                        List<String> childrenOffice = officeService.getChildrenOffice(office.getId());
+                        if(childrenOffice!=null && childrenOffice.size()>0){
+                            officeIdList.addAll(childrenOffice);
+                        }
+                    }
+                    workReimbursement.setOfficeIdList(officeIdList);
+                }
+            }
+        }
+
         if(StringUtils.isNotBlank(workReimbursement.getBusinessType())){
             //查询报销类型parentIds
             workReimbursement.setBusinessTypeParentIds(workReimbursement.getBusinessType()+",");
         }
 
+        //查询报销的人员id
+        if(StringUtils.isBlank(workReimbursement.getSubmitterId()) && StringUtils.isNotBlank(workReimbursement.getSubmitterName())){
+            List<User> userList = UserUtils.getUserByName(workReimbursement.getSubmitterName());
+            if(userList!=null&&userList.size()>0){
+                List<String> userIdList = Lists.newArrayList();
+                for (User user : userList) {
+                    userIdList.add(user.getId());
+                }
+                workReimbursement.setSubmitterIdList(userIdList);
+            }
+        }else{
+            if(StringUtils.isNotBlank(workReimbursement.getSubmitterId())) {
+                List<String> userIdList = Lists.newArrayList();
+                userIdList.add(workReimbursement.getSubmitterId());
+                workReimbursement.setSubmitterIdList(userIdList);
+            }
+        }
+
         int count = dao.queryCount(workReimbursement);
         page.setCount(count);
         page.setCountFlag(false);
@@ -366,6 +409,22 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
 
         List<WorkReimbursement> list = page.getList();
         for (WorkReimbursement info: list) {
+
+            //处理报销人信息
+            //添加人员部门id(可能是多个人员信息,此处需要根据,进行分割并重新处理)
+            List<String> reimbursementuserIdlist = Arrays.asList(info.getSubmitterId().split(","));
+            Set<String> submitterOfficeName = new HashSet<>();
+            Set<String> submitterName = new HashSet<>();
+            for (String userId : reimbursementuserIdlist) {
+                User user = UserUtils.get(userId);
+                if(null != user){
+                    submitterName.add(user.getName());
+                    submitterOfficeName.add(user.getOffice().getName());
+                }
+            }
+            info.setSubmitterName(String.join(",", submitterName));
+            info.setSubmitterOfficeName(String.join(",", submitterOfficeName));
+
             WorkAccount workAccount = info.getWorkAccount();
             if(null != workAccount){
                 if (null == workAccount.getType()){
@@ -736,9 +795,16 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
 
 
                 if(StringUtils.isNotBlank(workAccount.getReimbursementName())){
-                    //添加人员部门id
-                    User user = UserUtils.get(workAccount.getReimbursementName());
-                    workAccount.setOfficeId(user.getOffice().getId());
+                    //添加人员部门id(可能是多个人员信息,此处需要根据,进行分割并重新处理)
+                    List<String> reimbursementuserIdlist = Arrays.asList(workAccount.getReimbursementName().split(","));
+                    Set<String> officeIdList = new HashSet<>();
+                    for (String userId : reimbursementuserIdlist) {
+                        User user = UserUtils.get(userId);
+                        if(null != user){
+                            officeIdList.add(user.getOffice().getId());
+                        }
+                    }
+                    workAccount.setOfficeId(String.join(",", officeIdList));
                 }else{
                     workAccount.setOfficeId("");
                 }

+ 2 - 2
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementAllController.java

@@ -432,9 +432,9 @@ public class WorkReimbursementAllController extends BaseController {
 		if(!workReimbursement.getIsNewRecord()){//编辑表单保存
 			WorkReimbursement t = workReimbursementService.get(workReimbursement.getId());//从数据库取出记录的值
 			MyBeanUtils.copyBeanNotNull2Bean(workReimbursement, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
-			workReimbursementService.save(t);//保存
+			workReimbursementNewService.save(t);//保存
 		}else{//新增表单保存
-			workReimbursementService.save(workReimbursement);//保存
+			workReimbursementNewService.save(workReimbursement);//保存
 		}
 		addMessage(redirectAttributes, "保存报销单成功");
 		return "redirect:" + adminPath +"/workreimbursement/workReimbursementAll/?repage";

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

@@ -444,9 +444,9 @@ public class WorkReimbursementController extends BaseController {
         if (!workReimbursement.getIsNewRecord()) {//编辑表单保存
             WorkReimbursement t = workReimbursementService.get(workReimbursement.getId());//从数据库取出记录的值
             MyBeanUtils.copyBeanNotNull2Bean(workReimbursement, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
-            workReimbursementService.save(t);//保存
+            workReimbursementNewService.save(t);//保存
         } else {//新增表单保存
-            workReimbursementService.save(workReimbursement);//保存
+            workReimbursementNewService.save(workReimbursement);//保存
         }
         addMessage(redirectAttributes, "保存报销单成功");
         return "redirect:" + adminPath + "/workreimbursement/workReimbursement/?repage";

+ 13 - 0
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -157,6 +157,19 @@
 		<include refid="officeJoins"/>
 		WHERE a.name = #{name} and a.del_flag = 0
 	</select>
+
+	<select id="getOfficeByName" resultType="Office">
+		SELECT
+			<include refid="officeColumns"/>
+		FROM sys_office a
+		<include refid="officeJoins"/>
+		<where>
+			<if test="name != null and name != ''">
+				AND a.name like CONCAT('%', #{name}, '%')
+			</if>
+			and a.del_flag = 0
+		</where>
+	</select>
 	<select id="findList" resultType="Office">
 		SELECT
 			<include refid="officeColumns"/>

+ 15 - 0
src/main/resources/mappings/modules/sys/UserDao.xml

@@ -232,6 +232,21 @@
 		WHERE a.name = #{name} AND a.del_flag = #{DEL_FLAG_NORMAL}
 	</select>
 
+	<!-- 根据登录名查询用户 -->
+	<select id="getUserByName" resultType="User" parameterType="User">
+		SELECT
+		<include refid="userColumns"/>
+		FROM sys_user a
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		LEFT JOIN sys_office bo ON bo.id = o.branch_office
+		<where>
+			<if test="name != null and name != ''">
+				and a.name like concat('%',#{name},'%')
+			</if>
+		</where>
+	</select>
+
 	<!-- 分页查询用户信息 -->
 	<select id="findList" resultType="User">
 		SELECT

+ 17 - 4
src/main/resources/mappings/modules/workreimbursement/WorkAccountDao.xml

@@ -8,6 +8,7 @@
 		a.money AS "money",
 		a.e_invoice_money AS "eInvoiceMoney",
 		a.invoice_money AS "invoiceMoney",
+		a.subsidy_money AS "subsidyMoney",
 		a.financial_subjects AS "financialSubjects",
 		a.money_abstract AS "moneyAbstract",
 		a.tax AS "tax",
@@ -54,15 +55,22 @@
 	<select id="findList" resultType="WorkAccount" >
 		SELECT
 			<include refid="workAccountColumns"/>
-			,su.name as "reimbursementName"
-			,so.name as "officeId"
+			-- 对子查询获取的名称进行合并,确保单条记录的多用户名称合并
+			,(SELECT GROUP_CONCAT(su2.name)
+			FROM sys_user su2
+			WHERE FIND_IN_SET(su2.id, a.reimbursement_name) > 0
+			) as "reimbursementName"
+			-- 处理部门(如果需要显示多个部门,同样用子查询合并)
+			,(SELECT GROUP_CONCAT(DISTINCT so2.name)
+			FROM sys_user su2
+			LEFT JOIN sys_office so2 ON so2.id = su2.office_id
+			WHERE FIND_IN_SET(su2.id, a.reimbursement_name) > 0
+			) as "officeId"
 			,p.project_name as "project.projectName"
 			,prd.number as "projectReportNumber"
 			,t.standard_detail as "typeName"
 		FROM work_account a
 		<include refid="workAccountJoins"/>
-		left join sys_user su on su.id = a.reimbursement_name
-		left join sys_office so on so.id = su.office_id
 		left join rural_project_records p on p.id = a.project_id
 		left join project_report_data prd on prd.project_id = p.id
 		left join work_reimbursement_type_info t on a.type = t.id
@@ -116,6 +124,7 @@
 			money,
 			e_invoice_money,
 			invoice_money,
+			subsidy_money,
 			financial_subjects,
 			money_abstract,
 			tax,
@@ -142,6 +151,7 @@
 			#{money},
 			#{eInvoiceMoney},
 			#{invoiceMoney},
+			#{subsidyMoney},
 			#{financialSubjects},
 			#{moneyAbstract},
 			#{tax},
@@ -192,6 +202,9 @@
 		<if test="invoiceMoney != null">
 			invoice_money = #{invoiceMoney},
 		</if>
+		<if test="subsidyMoney != null">
+			subsidy_money = #{subsidyMoney},
+		</if>
 		<if test="financialSubjects != null and financialSubjects != ''">
 			financial_subjects = #{financialSubjects},
 		</if>

+ 36 - 24
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -73,8 +73,6 @@
 		,wa.type as "workAccount.type"
 		,su.name as "handleName"
 		,so.name as "handleOfficeName"
-		,sub.name as "submitterName"
-		,sob.name as "submitterOfficeName"
 		,wrr.id as "replenishId"
 		,wrr.create_by as "replenishUserId"
 		,wrr.status as "replenishStatus"
@@ -86,8 +84,6 @@
 		left join rural_project_records p on p.id = wa.project_id
 		left join sys_user su on su.id = a.submitter_id
 		left join sys_office so on su.office_id = so.id
-		left join sys_user sub on sub.id = wa.reimbursement_name
-		left join sys_office sob on sub.office_id = sob.id
 		LEFT JOIN (
 			SELECT id,create_by,create_date,update_by,update_date,remarks,del_flag,office_id,company_id,reimbursement_id,process_instance_id,status,audit_pass_date
 			FROM work_reimbursement_replenish
@@ -129,9 +125,16 @@
 					#{officeId}
 				</foreach>
 			</if>
-			<if test="officeId == '' and officeName!=null and officeName!=''">
-				AND sob.name like concat('%',#{officeName},'%')
+			<if test="submitterIdList != null and submitterIdList.size() > 0">
+				<!-- 用trim处理条件拼接,确保语法正确 -->
+				<trim prefix="and (" suffix=")" prefixOverrides="OR">
+					<!-- 遍历List中每个ID,生成模糊匹配条件 -->
+					<foreach collection="submitterIdList" item="submitterId" separator="OR">
+						wa.reimbursement_name LIKE CONCAT('%', #{submitterId}, '%')
+					</foreach>
+				</trim>
 			</if>
+
 			<if test="submitterDate != '' and submitterDate != null">
 				AND a.submitter_date = #{submitterDate}
 			</if>
@@ -147,12 +150,6 @@
 			<if test="handleId == '' and handleName != null and handleName != ''">
 				AND su.name like concat('%',#{handleName},'%')
 			</if>
-			<if test="submitterId != null and submitterId != ''">
-				AND wa.reimbursement_name = #{submitterId}
-			</if>
-			<if test="submitterId == '' and submitterName != null and submitterName != ''">
-				AND sub.name like concat('%',#{submitterName},'%')
-			</if>
 			<if test="businessType != null and businessType != ''">
 				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
@@ -178,7 +175,15 @@
 			</if>
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
 				and (${sqlMap.dsf}
-				or wa.reimbursement_name = #{createBy.id})
+				<!--<if test="submitterIdList != null and submitterIdList.size() > 0">
+					&lt;!&ndash; 用trim处理OR条件的拼接,避免开头多余的OR &ndash;&gt;
+					<trim prefix="OR (" suffix=")" prefixOverrides="OR">
+						<foreach collection="submitterIdList" item="submitterId" separator="OR">
+							wa.reimbursement_name LIKE CONCAT('%', #{submitterId}, '%')
+						</foreach>
+					</trim>
+				</if>-->
+		    	)
 			</if>
 		</where>
 		<choose>
@@ -199,8 +204,6 @@
 		left join work_reimbursement_type_info wrt on wrt.id =wa.type
 		left join project_report_data pd on pd.project_id =wa.project_id
 		left join sys_user su on su.id = a.submitter_id
-		left join sys_user sub on sub.id = wa.reimbursement_name
-		left join sys_office sob on sub.office_id = sob.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="id != null and id != ''">
@@ -233,9 +236,16 @@
 					#{officeId}
 				</foreach>
 			</if>
-			<if test="officeId == '' and officeName!=null and officeName!=''">
-				AND sob.name like concat('%',#{officeName},'%')
+			<if test="submitterIdList != null and submitterIdList.size() > 0">
+				<!-- 用trim处理条件拼接,确保语法正确 -->
+				<trim prefix="and (" suffix=")" prefixOverrides="OR">
+					<!-- 遍历List中每个ID,生成模糊匹配条件 -->
+					<foreach collection="submitterIdList" item="submitterId" separator="OR">
+						wa.reimbursement_name LIKE CONCAT('%', #{submitterId}, '%')
+					</foreach>
+				</trim>
 			</if>
+
 			<if test="submitterDate != '' and submitterDate != null">
 				AND a.submitter_date = #{submitterDate}
 			</if>
@@ -251,12 +261,6 @@
 			<if test="handleId == '' and handleName != null and handleName != ''">
 				AND su.name like concat('%',#{handleName},'%')
 			</if>
-			<if test="submitterId != null and submitterId != ''">
-				AND wa.reimbursement_name = #{submitterId}
-			</if>
-			<if test="submitterId == '' and submitterName != null and submitterName != ''">
-				AND sub.name like concat('%',#{submitterName},'%')
-			</if>
 			<if test="businessType != null and businessType != ''">
 				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
@@ -281,7 +285,15 @@
 			</if>
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
 				and (${sqlMap.dsf}
-				or wa.reimbursement_name = #{createBy.id})
+				<!--<if test="submitterIdList != null and submitterIdList.size() > 0">
+					&lt;!&ndash; 用trim处理OR条件的拼接,避免开头多余的OR &ndash;&gt;
+					<trim prefix="OR (" suffix=")" prefixOverrides="OR">
+						<foreach collection="submitterIdList" item="submitterId" separator="OR">
+							wa.reimbursement_name LIKE CONCAT('%', #{submitterId}, '%')
+						</foreach>
+					</trim>
+				</if>-->
+				)
 			</if>
 		</where>
 		<choose>

+ 18 - 4
src/main/webapp/WEB-INF/tags/sys/reimburtreeselectUser.tag

@@ -75,16 +75,30 @@
 								top.layer.msg("不能选择当前栏目以外的栏目模型,请重新选择。", {icon: 0});
 								return false;
 							}//</c:if>
-							ids.push(nodes[i].id);
-							names.push(nodes[i].name);
-							officeIds.push(nodes[i].officeId);
+							// 关键:去重判断——先获取当前节点的officeId
+							var currentId = nodes[i].id;
+							// 1. 检查ids中是否已存在当前officeId
+							if (ids.indexOf(currentId) === -1) {
+								// 2. 仅当不存在时,同步添加到三个数组(确保数据一一对应)
+								ids.push(nodes[i].id);
+								names.push(nodes[i].name);
+							}
+							// 关键:去重判断——先获取当前节点的officeId
+							var currentOfficeId = nodes[i].officeId;
+							// 1. 检查officeIds中是否已存在当前officeId
+							if (officeIds.indexOf(currentOfficeId) === -1) {
+								// 2. 仅当不存在时,同步添加到三个数组(确保数据一一对应)
+								officeIds.push(currentOfficeId); // 去重后添加
+							}
 							//<c:if test="${!checked}">
 							break; // 如果为非复选框选择,则返回第一个选择  </c:if>
 						}
-						if(ids.length>1){
+						var check = '${checked}';
+						if(ids.length>1 && check != "true"){
 							top.layer.msg("不能进行多选,请重新选择。", {icon: 0});
 							return false;
 						}
+						console.log("id",'${id}')
 						$("#${id}Id").val(ids.join(",").replace(/u_/ig,""));
 						$("#${id}Name").val(names.join(","));
 						$("#${id}officeId").val(officeIds.join(","));

+ 27 - 13
src/main/webapp/static/common/html/js/script.js

@@ -362,25 +362,39 @@ $(document).ready(function () {
 
     //添加进去的元素如何转化成公式
 
-//暂存无需判断,则送审时需要判断
 function judgment(){
-    var flag1=true;
+    var flag1 = true;
     $(".judgment").each(function(){
-        var zhi=$(this).val();
-        var s=$(this).parent().html();
-        if (''==zhi || null == zhi){
-            if(!$("#"+this.id).is(":hidden")){
-                $(this).css("border","1px solid red")
-                flag1=false;
+        var $this = $(this);
+        var zhi = $this.val()?.trim() || '';
+        var isElementHidden = false; // 标记“元素是否应被视为隐藏”
+
+        // 步骤1:先尝试找 input 所在的行(tr)—— 适配表格场景
+        var $parentTr = $this.closest("tr");
+        if ($parentTr.length > 0) {
+            // 场景1:有行 → 判断“行是否隐藏”
+            isElementHidden = $parentTr.is(":hidden");
+        } else {
+            // 场景2:无行(独立 input)→ 判断“input 自身是否隐藏”
+            isElementHidden = $this.is(":hidden");
+        }
+
+        // 步骤2:根据“是否隐藏”和“值是否为空”做校验
+        if (zhi === '') {
+            if (!isElementHidden) { // 未隐藏 + 未填写 → 标红
+                $this.css("border", "1px solid red");
+                flag1 = false;
+            } else { // 已隐藏 → 恢复正常边框
+                $this.css("border", "1px solid #f1f1f1");
             }
-        }else{
-            $(this).css("border","1px solid #f1f1f1")
+        } else { // 已填写 → 恢复正常边框
+            $this.css("border", "1px solid #f1f1f1");
         }
     });
-    if (!flag1){
+
+    if (!flag1) {
         parent.layer.msg("信息未填写完整!", {icon: 5});
         return false;
-    }else{
-        return true;
     }
+    return true;
 }

+ 51 - 22
src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllFormAdd.jsp

@@ -243,7 +243,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     parsedTagHtml +  // 插入解析后的标签HTML
                                     '</div>' +
                                     "</td>" +
@@ -275,6 +275,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number judgment' style='background-color: #f5f5f5;'/>" +
                                     "</td>" +
 
@@ -307,8 +311,8 @@
 
 
                                 var subsetId="workAccountList_"+ obj.id;
-
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                console.log(1111)
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -576,7 +580,7 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
@@ -945,7 +949,7 @@
 
             var subsetId="workAccountList_"+randomStr;
 
-            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                 "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                 "<tbody id='" + subsetId + "'>" +
                 "</tbody>" +
@@ -1035,7 +1039,7 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
@@ -1102,12 +1106,12 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
                 "<td style='text-align: center;position: relative; width:50px'></td>" +
-                "<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+                "<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
                 "<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
                 "<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
                 <%--发票号--%>
@@ -1703,6 +1707,14 @@
                 var rowNumber = index; // 行号从1开始计数
                 // 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
                 $(this).find("td:nth-child(3)").text(rowNumber);
+
+                // 2. 更新第一个td中的第15个input的值
+                // 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+                $(this)
+                    .find("td:nth-child(1)") // 选中第一个td
+                    .find("input") // 找到该td下所有input
+                    .eq(14) // 取第15个input(索引14)
+                    .val(rowNumber); // 设置值为当前行号
             });
         }
 
@@ -2265,7 +2277,7 @@
         <%-- JSP模板:用占位符代替动态变量 --%>
         <div id="reimburseTemplate" style="display: none;">
             <sys:reimburtreeselectUser
-                    id="workAccountList__INDEX__reimbursementName"
+                    id="workAccountList__INDEX___reimbursementName"
                     name="workAccountList[__INDEX__].reimbursementName"
                     value="__LEADER_IDS__"
                     labelName="reimbursementNameName"
@@ -2274,6 +2286,7 @@
                     url="/sys/office/treeDataAll?type=3"
                     cssClass="form-control layui-input"
                     allowClear="true"
+                    checked="true"
                     notAllowSelectParent="true"/>
         </div>
         <%-- 隐藏的treeselectAccessoryNoParent标签模板 --%>
@@ -2375,7 +2388,7 @@
                 </div>
             </div>
             <div class="form-group layui-row">
-                <div class="form-group-label"><h2><span style="color: red;font-size: 14px"> (可在报销单后新增数电发票xml格式的附件获取发票信息)</span></h2></div>
+                <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('#workAccountList', workAccountListRowIdx, workAccountListTpl,'',true);workAccountListRowIdx = workAccountListRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增报销单</a>
                 </div>
@@ -2384,13 +2397,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -2401,6 +2414,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -2423,7 +2437,7 @@
                                         <td style="vertical-align: middle;">
                                             <div class="project_reimbursement_div"  style="width: 200px">
                                                 <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                           title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                           title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                             </div>
                                         </td>
                                         <td style="vertical-align: middle;">
@@ -2453,6 +2467,9 @@
                                             <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                         </td>
                                         <td>
+                                            <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                        </td>
+                                        <td>
                                             <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number judgment" style="background-color: #f5f5f5;"/>
                                         </td>
 
@@ -2486,12 +2503,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>
@@ -2516,13 +2534,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2550,6 +2568,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number judgment" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2699,6 +2720,7 @@
 <script>
     // 计算所有行的汇总金额(含单行汇总和总汇总)
     function calculateSum() {
+        console.log(456)
         var totalAllEInvoice = 0; // 所有行的数电发票总金额
         var totalAllInvoice = 0;  // 所有行的非数电票总金额
         var totalAllSum = 0;      // 所有行的总汇总金额
@@ -2786,9 +2808,13 @@
                 eInvoice = maxMoney
                 parent.layer.msg("该报销单数电票报销最大额度为:" + maxMoney.toFixed(2) + "!", {icon: 5});
             }
+            console.log(123)
 
             var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-            var rowSum = eInvoice + invoice;
+
+            var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+            var rowSum = eInvoice + invoice + subsidyMoney;
 
             // 5. 更新当前行的汇总金额
             $("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2796,6 +2822,7 @@
             // 6. 累加至总金额
             totalAllEInvoice += eInvoice;
             totalAllInvoice += invoice;
+            totalAllInvoice += subsidyMoney;
             totalAllSum += rowSum;
 
         });
@@ -2861,8 +2888,10 @@
         var eInvoice = parseFloat($("#workAccountList" + rowIndex + "_eInvoiceBills").val() || 0);
         // 获取非数电票金额
         var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceBills").val() || 0);
+        // 获取数电发票金额
+        var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
         // 计算汇总金额
-        var sum = eInvoice + invoice;
+        var sum = eInvoice + invoice + subsidyMoney;
         // 设置汇总金额
         $("#workAccountList" + rowIndex + "_bills").val(sum);
 

+ 16 - 10
src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllFormDetail.jsp

@@ -180,7 +180,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     "<input id='workAccountList" + index + "_reimbursementName'  maxlength='32' type='text' value='" + (obj.reimbursementName === null || obj.reimbursementName === undefined ? "" : obj.reimbursementName) + "' readonly='readonly'  class='form-control judgment'/>" +
                                     '</div>' +
                                     "</td>" +
@@ -210,7 +210,11 @@
                                     "</td>" +
 
                                     "<td>" +
-                                    "<input id='workAccountList" + index + "_invoiceMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].invoiceMoney' type='text' value='" + (obj.invoiceMoney === null || obj.invoiceMoney === undefined ? "" : obj.invoiceMoney) + "'  placeholder='非数电票金额' maxlength='10'  class='form-control number judgment'/>" +
+                                    "<input id='workAccountList" + index + "_invoiceMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].invoiceMoney' type='text' value='" + (obj.invoiceMoney === null || obj.invoiceMoney === undefined ? "" : obj.invoiceMoney) + "'  placeholder='非数电票金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
                                     "</td>" +
 
                                     "<td>" +
@@ -246,7 +250,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -472,7 +476,7 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:80px\">票据确认</th>" +
@@ -810,13 +814,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -827,6 +831,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -843,12 +848,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>

+ 45 - 20
src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllModifyApply.jsp

@@ -243,7 +243,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     parsedTagHtml +  // 插入解析后的标签HTML
                                     '</div>' +
                                     "</td>" +
@@ -275,6 +275,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number required' style='background-color: #f5f5f5;'/>" +
                                     "</td>" +
 
@@ -308,7 +312,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -604,7 +608,7 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
@@ -924,7 +928,7 @@
 
             var subsetId="workAccountList_"+randomStr;
 
-            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                 "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                 "<tbody id='" + subsetId + "'>" +
                 "</tbody>" +
@@ -1014,9 +1018,9 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传人</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:130px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
                 "</tr>";
 
@@ -1082,12 +1086,12 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
                 "<td style='text-align: center;position: relative; width:50px'></td>" +
-                "<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+                "<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
                 "<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
                 "<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
                 <%--发票号--%>
@@ -1683,6 +1687,14 @@
                 var rowNumber = index; // 行号从1开始计数
                 // 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
                 $(this).find("td:nth-child(3)").text(rowNumber);
+
+                // 2. 更新第一个td中的第15个input的值
+                // 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+                $(this)
+                    .find("td:nth-child(1)") // 选中第一个td
+                    .find("input") // 找到该td下所有input
+                    .eq(14) // 取第15个input(索引14)
+                    .val(rowNumber); // 设置值为当前行号
             });
         }
 
@@ -2252,6 +2264,7 @@
                     title="用户"
                     url="/sys/office/treeDataAll?type=3"
                     cssClass="form-control layui-input"
+                    checked="true"
                     allowClear="true"
                     notAllowSelectParent="true"/>
         </div>
@@ -2370,13 +2383,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -2387,6 +2400,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -2409,7 +2423,7 @@
                                         <td style="vertical-align: middle;">
                                             <div class="project_reimbursement_div"  style="width: 200px">
                                                 <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                           title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                           title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                             </div>
                                         </td>
                                         <td style="vertical-align: middle;">
@@ -2439,6 +2453,9 @@
                                             <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                         </td>
                                         <td>
+                                            <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                        </td>
+                                        <td>
                                             <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number required" style="background-color: #f5f5f5;"/>
                                         </td>
 
@@ -2472,12 +2489,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>
@@ -2502,13 +2520,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2536,6 +2554,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number required" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2774,7 +2795,10 @@
             }
 
             var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-            var rowSum = eInvoice + invoice;
+
+            var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+            var rowSum = eInvoice + invoice + subsidyMoney;
 
             // 5. 更新当前行的汇总金额
             $("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2782,6 +2806,7 @@
             // 6. 累加至总金额
             totalAllEInvoice += eInvoice;
             totalAllInvoice += invoice;
+            totalAllInvoice += subsidyMoney;
             totalAllSum += rowSum;
 
         });

+ 15 - 9
src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewAudit.jsp

@@ -180,7 +180,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     "<input id='workAccountList" + index + "_reimbursementName'  maxlength='32' type='text' value='" + (obj.reimbursementName === null || obj.reimbursementName === undefined ? "" : obj.reimbursementName) + "' readonly='readonly'  class='form-control judgment'/>" +
                                     '</div>' +
                                     "</td>" +
@@ -214,6 +214,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' readonly name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number' />" +
                                     "</td>" +
 
@@ -246,7 +250,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table  table-bordered table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -507,7 +511,7 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传时间</th>"+
                 // 嵌入服务器端生成的列(此时ticketConfirmTh是干净的<th>标签)
@@ -865,13 +869,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -882,6 +886,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -898,12 +903,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>

+ 51 - 22
src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewFormAdd.jsp

@@ -207,6 +207,7 @@
                             var projectId = (obj.project && obj.project.id) ?? ""; // 深层属性空值处理
                             var projectName = (obj.project && obj.project.projectName) ?? "";
                             var projectRadio = obj.projectRadio ?? ""; // 常规属性空值处理
+                            console.log('projectRadio',projectRadio)
 
                             // 3. 替换模板中的所有占位符
                             var reprojectParsedTagHtml = reprojectTemplateHtml
@@ -243,7 +244,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                         "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     parsedTagHtml +  // 插入解析后的标签HTML
                                     '</div>' +
                                     "</td>" +
@@ -275,6 +276,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number judgment' style='background-color: #f5f5f5;'/>" +
                                     "</td>" +
 
@@ -308,7 +313,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -576,7 +581,8 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+                // 核心修改:通过三元表达式判断indexNumber的值,无值或null则用trLength
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
@@ -945,7 +951,7 @@
 
             var subsetId="workAccountList_"+randomStr;
 
-            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                 "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                 "<tbody id='" + subsetId + "'>" +
                 "</tbody>" +
@@ -1036,9 +1042,9 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传人</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:130px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
                 "</tr>";
 
@@ -1102,12 +1108,12 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
                 "<td style='text-align: center;position: relative; width:50px'></td>" +
-                "<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+                "<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
                 "<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
                 "<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
                 <%--发票号--%>
@@ -1706,6 +1712,14 @@
                 var rowNumber = index; // 行号从1开始计数
                 // 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
                 $(this).find("td:nth-child(3)").text(rowNumber);
+
+                // 2. 更新第一个td中的第15个input的值
+                // 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+                $(this)
+                    .find("td:nth-child(1)") // 选中第一个td
+                    .find("input") // 找到该td下所有input
+                    .eq(14) // 取第15个input(索引14)
+                    .val(rowNumber); // 设置值为当前行号
             });
         }
 
@@ -2268,7 +2282,7 @@
         <%-- JSP模板:用占位符代替动态变量 --%>
         <div id="reimburseTemplate" style="display: none;">
             <sys:reimburtreeselectUser
-                    id="workAccountList__INDEX__reimbursementName"
+                    id="workAccountList__INDEX___reimbursementName"
                     name="workAccountList[__INDEX__].reimbursementName"
                     value="__LEADER_IDS__"
             labelName="reimbursementNameName"
@@ -2276,6 +2290,7 @@
             title="用户"
             url="/sys/office/treeDataAll?type=3"
             cssClass="form-control layui-input"
+            checked="true"
             allowClear="true"
             notAllowSelectParent="true"/>
         </div>
@@ -2387,13 +2402,13 @@
                     <thead>
                     <tr>
                         <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                        <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                        <th style="width:100px" rowspan="2">报销部门</th>
+                        <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                        <th style="width:150px" rowspan="2">报销部门</th>
                         <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                         <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                         <th style="width:200px" rowspan="2">报告号</th>
                         <!-- 多表头1:费用(元) -->
-                        <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                        <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                         <!-- 多表头2:收据张数 -->
                         <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                         <th style="width:100px" rowspan="2">出差天数</th>
@@ -2404,6 +2419,7 @@
                         <!-- 费用子表头 -->
                         <th style="width:100px">数电发票</th>
                         <th style="width:100px">非数电票</th>
+                        <th style="width:100px">补贴</th>
                         <th style="width:100px"><font color="red">*</font>汇总</th>
                         <!-- 收据张数子表头 -->
                         <th style="width:100px">数电发票</th>
@@ -2426,7 +2442,7 @@
                                 <td style="vertical-align: middle;">
                                     <div class="project_reimbursement_div"  style="width: 200px">
                                         <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                   title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                   title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                     </div>
                                 </td>
                                 <td style="vertical-align: middle;">
@@ -2456,6 +2472,9 @@
                                     <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                 </td>
                                 <td>
+                                    <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                </td>
+                                <td>
                                     <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number judgment" style="background-color: #f5f5f5;"/>
                                 </td>
 
@@ -2489,12 +2508,13 @@
                 <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                     <thead>
                     <tr style="border: 0px">
-                        <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                        <td style="width:100px"></td>
+                        <td></td>
+                        <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                        <td style="width:150px"></td>
                         <td style="width:180px"></td>
                         <td style="width:200px"></td>
                         <td style="width:200px"></td>
-                        <td style="width:300px" style="border: 0px">
+                        <td style="width:400px" style="border: 0px">
                             <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                         </td>
                         <td style="width:300px"></td>
@@ -2519,13 +2539,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2553,6 +2573,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number judgment" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2791,7 +2814,10 @@
             }
 
             var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-            var rowSum = eInvoice + invoice;
+
+            var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+            var rowSum = eInvoice + invoice + subsidyMoney;
 
             // 5. 更新当前行的汇总金额
             $("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2799,6 +2825,7 @@
             // 6. 累加至总金额
             totalAllEInvoice += eInvoice;
             totalAllInvoice += invoice;
+            totalAllInvoice += subsidyMoney;
             totalAllSum += rowSum;
 
         });
@@ -2865,8 +2892,10 @@
         var eInvoice = parseFloat($("#workAccountList" + rowIndex + "_eInvoiceBills").val() || 0);
         // 获取非数电票金额
         var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceBills").val() || 0);
+        // 获取数电发票金额
+        var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
         // 计算汇总金额
-        var sum = eInvoice + invoice;
+        var sum = eInvoice + invoice + subsidyMoney;
         // 设置汇总金额
         $("#workAccountList" + rowIndex + "_bills").val(sum);
 

+ 45 - 20
src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewModifyApply.jsp

@@ -243,7 +243,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     parsedTagHtml +  // 插入解析后的标签HTML
                                     '</div>' +
                                     "</td>" +
@@ -275,6 +275,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number required' style='background-color: #f5f5f5;'/>" +
                                     "</td>" +
 
@@ -308,7 +312,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table  table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -604,7 +608,7 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
@@ -924,7 +928,7 @@
 
             var subsetId="workAccountList_"+randomStr;
 
-            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                 "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                 "<tbody id='" + subsetId + "'>" +
                 "</tbody>" +
@@ -1014,9 +1018,9 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传人</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:130px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
                 "</tr>";
 
@@ -1082,12 +1086,12 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
                 "<td style='text-align: center;position: relative; width:50px'></td>" +
-                "<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+                "<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
                 "<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
                 "<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
                 <%--发票号--%>
@@ -1680,6 +1684,14 @@
                 var rowNumber = index; // 行号从1开始计数
                 // 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
                 $(this).find("td:nth-child(3)").text(rowNumber);
+
+                // 2. 更新第一个td中的第15个input的值
+                // 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+                $(this)
+                    .find("td:nth-child(1)") // 选中第一个td
+                    .find("input") // 找到该td下所有input
+                    .eq(14) // 取第15个input(索引14)
+                    .val(rowNumber); // 设置值为当前行号
             });
         }
 
@@ -2249,6 +2261,7 @@
                     title="用户"
                     url="/sys/office/treeDataAll?type=3"
                     cssClass="form-control layui-input"
+                    checked="true"
                     allowClear="true"
                     notAllowSelectParent="true"/>
         </div>
@@ -2367,13 +2380,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -2384,6 +2397,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -2406,7 +2420,7 @@
                                         <td style="vertical-align: middle;">
                                             <div class="project_reimbursement_div"  style="width: 200px">
                                                 <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                           title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                           title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                             </div>
                                         </td>
                                         <td style="vertical-align: middle;">
@@ -2436,6 +2450,9 @@
                                             <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                         </td>
                                         <td>
+                                            <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                        </td>
+                                        <td>
                                             <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number required" style="background-color: #f5f5f5;"/>
                                         </td>
 
@@ -2469,12 +2486,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>
@@ -2499,13 +2517,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2533,6 +2551,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number required" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2771,7 +2792,10 @@
             }
 
             var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-            var rowSum = eInvoice + invoice;
+
+            var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+            var rowSum = eInvoice + invoice + subsidyMoney;
 
             // 5. 更新当前行的汇总金额
             $("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2779,6 +2803,7 @@
             // 6. 累加至总金额
             totalAllEInvoice += eInvoice;
             totalAllInvoice += invoice;
+            totalAllInvoice += subsidyMoney;
             totalAllSum += rowSum;
 
         });

+ 46 - 21
src/main/webapp/webpage/modules/workreimbursement/treeForm/replenish/workReimbursementReplenishAudit.jsp

@@ -243,7 +243,7 @@
 										"<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
 										"<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
 										"<td>" +
-										'<div class="project_reimbursement_div" style="width: 200px">' +
+										'<div class="project_reimbursement_div" style="width: 150px">' +
 										parsedTagHtml +  // 插入解析后的标签HTML
 										'</div>' +
 										"</td>" +
@@ -275,6 +275,10 @@
 										"</td>" +
 
 										"<td>" +
+										"<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+										"</td>" +
+
+										"<td>" +
 										"<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number required' style='background-color: #f5f5f5;'/>" +
 										"</td>" +
 
@@ -308,7 +312,7 @@
 
 								var subsetId="workAccountList_"+ obj.id;
 
-								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
 										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
 										"<tbody id='"+subsetId+"'>" +
 										"<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -666,7 +670,7 @@
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
 					"</td>"+
 
 					<%--序号--%>
@@ -986,7 +990,7 @@
 
 			var subsetId="workAccountList_"+randomStr;
 
-			$(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+			$(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
 					"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
 					"<tbody id='" + subsetId + "'>" +
 					"</tbody>" +
@@ -1075,10 +1079,10 @@
 					"<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>税额</th>"+
 					"<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
 					"<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
-					"<th style=\"text-align: center; background-color:#F5F5F5; width:250px;padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-					"<th style=\"text-align: center; background-color:#F5F5F5; width:250px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
-					"<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
-					"<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
+					"<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
+					"<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+					"<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传人</th>"+
+					"<th style=\"text-align: center; background-color:#F5F5F5; width:130px;padding:0px\">上传时间</th>"+
 					"<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
 					"</tr>";
 
@@ -1144,12 +1148,12 @@
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
 					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+					"<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
 					"</td>"+
 
 					<%--序号--%>
 					"<td style='text-align: center;position: relative; width:50px'></td>" +
-					"<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+					"<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
 					"<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
 					"<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
 					<%--发票号--%>
@@ -1681,6 +1685,14 @@
 				var rowNumber = index; // 行号从1开始计数
 				// 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
 				$(this).find("td:nth-child(3)").text(rowNumber);
+
+				// 2. 更新第一个td中的第15个input的值
+				// 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+				$(this)
+						.find("td:nth-child(1)") // 选中第一个td
+						.find("input") // 找到该td下所有input
+						.eq(14) // 取第15个input(索引14)
+						.val(rowNumber); // 设置值为当前行号
 			});
 		}
 
@@ -2250,6 +2262,7 @@
 					title="用户"
 					url="/sys/office/treeDataAll?type=3"
 					cssClass="form-control layui-input"
+					checked="true"
 					allowClear="true"
 					notAllowSelectParent="true"/>
 		</div>
@@ -2364,13 +2377,13 @@
 						<thead>
 						<tr>
 							<th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-							<th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-							<th style="width:100px" rowspan="2">报销部门</th>
+							<th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+							<th style="width:150px" rowspan="2">报销部门</th>
 							<th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
 							<th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
 							<th style="width:200px" rowspan="2">报告号</th>
 							<!-- 多表头1:费用(元) -->
-							<th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+							<th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
 							<!-- 多表头2:收据张数 -->
 							<th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
 							<th style="width:100px" rowspan="2">出差天数</th>
@@ -2381,6 +2394,7 @@
 							<!-- 费用子表头 -->
 							<th style="width:100px">数电发票</th>
 							<th style="width:100px">非数电票</th>
+							<th style="width:100px">补贴</th>
 							<th style="width:100px"><font color="red">*</font>汇总</th>
 							<!-- 收据张数子表头 -->
 							<th style="width:100px">数电发票</th>
@@ -2403,7 +2417,7 @@
                                         <td style="vertical-align: middle;">
                                             <div class="project_reimbursement_div"  style="width: 200px">
                                                 <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                           title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                           title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                             </div>
                                         </td>
                                         <td style="vertical-align: middle;">
@@ -2432,6 +2446,9 @@
                                         <td>
                                             <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                         </td>
+                                <td>
+                                    <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                </td>
                                         <td>
                                             <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number required" style="background-color: #f5f5f5;"/>
                                         </td>
@@ -2466,12 +2483,13 @@
 					<table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
 						<thead>
 						<tr style="border: 0px">
-							<td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-							<td style="width:100px"></td>
+							<td></td>
+							<td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+							<td style="width:150px"></td>
 							<td style="width:180px"></td>
 							<td style="width:200px"></td>
 							<td style="width:200px"></td>
-							<td style="width:300px" style="border: 0px">
+							<td style="width:400px" style="border: 0px">
 								<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
 							</td>
 							<td style="width:300px"></td>
@@ -2496,13 +2514,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2530,6 +2548,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number required" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2778,7 +2799,10 @@
 			}
 
 			var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-			var rowSum = eInvoice + invoice;
+
+			var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+			var rowSum = eInvoice + invoice + subsidyMoney;
 
 			// 5. 更新当前行的汇总金额
 			$("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2786,6 +2810,7 @@
 			// 6. 累加至总金额
 			totalAllEInvoice += eInvoice;
 			totalAllInvoice += invoice;
+			totalAllInvoice += subsidyMoney;
 			totalAllSum += rowSum;
 
 		});

+ 14 - 8
src/main/webapp/webpage/modules/workreimbursement/treeForm/replenish/workReimbursementReplenishCwAudit.jsp

@@ -180,7 +180,7 @@
 										"<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
 										"<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
 										"<td>" +
-										'<div class="project_reimbursement_div" style="width: 200px">' +
+										'<div class="project_reimbursement_div" style="width: 150px">' +
 										"<input id='workAccountList" + index + "_reimbursementName'  maxlength='32' type='text' value='" + (obj.reimbursementName === null || obj.reimbursementName === undefined ? "" : obj.reimbursementName) + "' readonly='readonly'  class='form-control judgment'/>" +
 										'</div>' +
 										"</td>" +
@@ -214,6 +214,10 @@
 										"</td>" +
 
 										"<td>" +
+										"<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+										"</td>" +
+
+										"<td>" +
 										"<input id='workAccountList" + index + "_money' readonly name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number' />" +
 										"</td>" +
 
@@ -246,7 +250,7 @@
 
 								var subsetId="workAccountList_"+ obj.id;
 
-								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
 										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
 										"<tbody id='"+subsetId+"'>" +
 										"<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -778,13 +782,13 @@
 						<thead>
 						<tr>
 							<th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-							<th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-							<th style="width:100px" rowspan="2">报销部门</th>
+							<th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+							<th style="width:150px" rowspan="2">报销部门</th>
 							<th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
 							<th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
 							<th style="width:200px" rowspan="2">报告号</th>
 							<!-- 多表头1:费用(元) -->
-							<th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+							<th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
 							<!-- 多表头2:收据张数 -->
 							<th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
 							<th style="width:100px" rowspan="2">出差天数</th>
@@ -795,6 +799,7 @@
 							<!-- 费用子表头 -->
 							<th style="width:100px">数电发票</th>
 							<th style="width:100px">非数电票</th>
+							<th style="width:100px">补贴</th>
 							<th style="width:100px"><font color="red">*</font>汇总</th>
 							<!-- 收据张数子表头 -->
 							<th style="width:100px">数电发票</th>
@@ -811,12 +816,13 @@
 					<table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
 						<thead>
 						<tr style="border: 0px">
-							<td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-							<td style="width:100px"></td>
+							<td></td>
+							<td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+							<td style="width:150px"></td>
 							<td style="width:180px"></td>
 							<td style="width:200px"></td>
 							<td style="width:200px"></td>
-							<td style="width:300px" style="border: 0px">
+							<td style="width:400px" style="border: 0px">
 								<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
 							</td>
 							<td style="width:300px"></td>

+ 14 - 8
src/main/webapp/webpage/modules/workreimbursement/treeForm/specific/workReimbursementSpecificAudit.jsp

@@ -180,7 +180,7 @@
 										"<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
 										"<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
 										"<td>" +
-										'<div class="project_reimbursement_div" style="width: 200px">' +
+										'<div class="project_reimbursement_div" style="width: 150px">' +
 										"<input id='workAccountList" + index + "_reimbursementName'  maxlength='32' type='text' value='" + (obj.reimbursementName === null || obj.reimbursementName === undefined ? "" : obj.reimbursementName) + "' readonly='readonly'  class='form-control judgment'/>" +
 										'</div>' +
 										"</td>" +
@@ -214,6 +214,10 @@
 										"</td>" +
 
 										"<td>" +
+										"<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' readonly name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+										"</td>" +
+
+										"<td>" +
 										"<input id='workAccountList" + index + "_money' readonly name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number' />" +
 										"</td>" +
 
@@ -246,7 +250,7 @@
 
 								var subsetId="workAccountList_"+ obj.id;
 
-								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+								$("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
 										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
 										"<tbody id='"+subsetId+"'>" +
 										"<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -843,13 +847,13 @@
 						<thead>
 						<tr>
 							<th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-							<th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-							<th style="width:100px" rowspan="2">报销部门</th>
+							<th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+							<th style="width:150px" rowspan="2">报销部门</th>
 							<th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
 							<th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
 							<th style="width:200px" rowspan="2">报告号</th>
 							<!-- 多表头1:费用(元) -->
-							<th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+							<th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
 							<!-- 多表头2:收据张数 -->
 							<th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
 							<th style="width:100px" rowspan="2">出差天数</th>
@@ -860,6 +864,7 @@
 							<!-- 费用子表头 -->
 							<th style="width:100px">数电发票</th>
 							<th style="width:100px">非数电票</th>
+							<th style="width:100px">补贴</th>
 							<th style="width:100px"><font color="red">*</font>汇总</th>
 							<!-- 收据张数子表头 -->
 							<th style="width:100px">数电发票</th>
@@ -876,12 +881,13 @@
 					<table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
 						<thead>
 						<tr style="border: 0px">
-							<td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-							<td style="width:100px"></td>
+							<td></td>
+							<td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+							<td style="width:150px"></td>
 							<td style="width:180px"></td>
 							<td style="width:200px"></td>
 							<td style="width:200px"></td>
-							<td style="width:300px" style="border: 0px">
+							<td style="width:400px" style="border: 0px">
 								<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
 							</td>
 							<td style="width:300px"></td>

+ 45 - 20
src/main/webapp/webpage/modules/workreimbursement/treeForm/specific/workReimbursementSpecificModifyApply.jsp

@@ -243,7 +243,7 @@
                                     "<td onclick='listTr(this)' style='text-align: center;position: relative; width:80px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>" +
                                     "<span class='default_shut ' style=\"padding-right: 15px; \"></span><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + ">" + serialNumber + "</td>" +
                                     "<td>" +
-                                    '<div class="project_reimbursement_div" style="width: 200px">' +
+                                    '<div class="project_reimbursement_div" style="width: 150px">' +
                                     parsedTagHtml +  // 插入解析后的标签HTML
                                     '</div>' +
                                     "</td>" +
@@ -275,6 +275,10 @@
                                     "</td>" +
 
                                     "<td>" +
+                                    "<input id='workAccountList" + index + "_subsidyMoney' onchange='calculateSum(" + index + ")' name='workAccountList[" + index + "].subsidyMoney' type='text' value='" + (obj.subsidyMoney === null || obj.subsidyMoney === undefined ? "" : obj.subsidyMoney) + "'  placeholder='补贴金额' maxlength='10'  class='form-control number'/>" +
+                                    "</td>" +
+
+                                    "<td>" +
                                     "<input id='workAccountList" + index + "_money' name='workAccountList[" + index + "].money' type='text' value='" + (obj.money === null || obj.money === undefined ? "" : obj.money) + "'  readonly='readonly'  class='form-control number required' style='background-color: #f5f5f5;'/>" +
                                     "</td>" +
 
@@ -308,7 +312,7 @@
 
                                 var subsetId="workAccountList_"+ obj.id;
 
-                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+                                $("#workAccountList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                                     "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                                     "<tbody id='"+subsetId+"'>" +
                                     "<input type='text' id='"+subsetId+"_len' style='display: none;' name='flags' />"+
@@ -604,7 +608,7 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value='" + data.fileSize +"'/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value='" + data.divIdType +"'/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + data.parentId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + data.indexNumber + "'/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + (data.indexNumber == null || data.indexNumber === '' ? trLength : data.indexNumber) + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
@@ -924,7 +928,7 @@
 
             var subsetId="workAccountList_"+randomStr;
 
-            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='15' style='padding: 0px;'>" +
+            $(list).append("<tr class='"+randomStr+"' style='display: none;'> <td colspan='16' style='padding: 0px;'>" +
                 "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
                 "<tbody id='" + subsetId + "'>" +
                 "</tbody>" +
@@ -1025,9 +1029,9 @@
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\"><font color=\"red\">*</font>价税合计</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:150px;padding:0px\"><font color=\"red\">*</font>开票日期</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; padding:0px\"><font color=\"red\">*</font>开票单位</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:200px; max-width:200px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:80px;padding:0px\">上传人</th>"+
-                "<th style=\"text-align: center; background-color:#F5F5F5; width:110px;padding:0px\">上传时间</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:240px; max-width:240px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;;padding:0px\">文件预览</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:100px;padding:0px\">上传人</th>"+
+                "<th style=\"text-align: center; background-color:#F5F5F5; width:130px;padding:0px\">上传时间</th>"+
                 "<th style=\"text-align: center; background-color:#F5F5F5; width:200px;padding:0px\">操作</th>"+
                 "</tr>";
 
@@ -1093,12 +1097,12 @@
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_fileSize' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].fileSize' type='hidden' value=''/>"+
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_divIdType' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].divIdType' type='hidden' value=''/>" +
                 "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_parentId' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].parentId' type='hidden' value='" + tbodyId + "'/>" +
-                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value=''/>" +
+                "<input id='reimbursementElectronicInvoiceVATTaxes" + trLength +"_indexNumber' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength +"].indexNumber' type='hidden' value='" + serialNumber + "'/>" +
                 "</td>"+
 
                 <%--序号--%>
                 "<td style='text-align: center;position: relative; width:50px'></td>" +
-                "<td style='text-align: center;position: relative; width:80px;'>" + trLength + "</td>" +
+                "<td style='text-align: center;position: relative; width:80px;'>" + serialNumber + "</td>" +
                 "<td style='text-align: center; width:150px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceTypeStr' onmouseover='this.title=this.value' readOnly='true' maxlength='50' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceTypeStr' type='text' value='" + (data.InherentLabelGeneralOrSpecialVATLabelName ? data.InherentLabelGeneralOrSpecialVATLabelName : '') + "'  class='form-control judgment'/></td>"+
                 "<td style='text-align: center; width:250px'><input id='reimbursementElectronicInvoiceVATTaxes" + trLength + "_invoiceProjectName' onmouseover='this.title=this.value' readOnly='true' maxlength='500' name='workAccountList[" + parentIndex + "].reimbursementElectronicInvoiceVATTaxes[" + trLength + "].invoiceProjectName' type='text' value='" + (data.IssuItemInformationItemName ? data.IssuItemInformationItemName : '') + "'  class='form-control judgment'/></td>"+
                 <%--发票号--%>
@@ -1694,6 +1698,14 @@
                 var rowNumber = index; // 行号从1开始计数
                 // 更新第二个td中的行号(根据你的需求确认是否是nth-child(3))
                 $(this).find("td:nth-child(3)").text(rowNumber);
+
+                // 2. 更新第一个td中的第15个input的值
+                // 步骤:找到当前行的第一个td → 在其中找到所有input → 取第15个(eq(14),因为索引从0开始)→ 设置value为rowNumber
+                $(this)
+                    .find("td:nth-child(1)") // 选中第一个td
+                    .find("input") // 找到该td下所有input
+                    .eq(14) // 取第15个input(索引14)
+                    .val(rowNumber); // 设置值为当前行号
             });
         }
 
@@ -2263,6 +2275,7 @@
                     title="用户"
                     url="/sys/office/treeDataAll?type=3"
                     cssClass="form-control layui-input"
+                    checked="true"
                     allowClear="true"
                     notAllowSelectParent="true"/>
         </div>
@@ -2381,13 +2394,13 @@
                         <thead>
                         <tr>
                             <th style="width: 50px;padding: 0px" rowspan="2">报销单</th>
-                            <th style="width:100px" rowspan="2"><font color="red">*</font>报销人</th>
-                            <th style="width:100px" rowspan="2">报销部门</th>
+                            <th style="width:150px" rowspan="2"><font color="red">*</font>报销人</th>
+                            <th style="width:150px" rowspan="2">报销部门</th>
                             <th style="width:180px" rowspan="2"><font color="red">*</font>报销类型</th>
                             <th style="width:200px" rowspan="2"><font color="red">*</font>报销项目</th>
                             <th style="width:200px" rowspan="2">报告号</th>
                             <!-- 多表头1:费用(元) -->
-                            <th style="width:300px" colspan="3"><font color="red">*</font>费用(元)</th>
+                            <th style="width:400px" colspan="4"><font color="red">*</font>费用(元)</th>
                             <!-- 多表头2:收据张数 -->
                             <th style="width:300px" colspan="3"><font color="red">*</font>收据张数</th>
                             <th style="width:100px" rowspan="2">出差天数</th>
@@ -2398,6 +2411,7 @@
                             <!-- 费用子表头 -->
                             <th style="width:100px">数电发票</th>
                             <th style="width:100px">非数电票</th>
+                            <th style="width:100px">补贴</th>
                             <th style="width:100px"><font color="red">*</font>汇总</th>
                             <!-- 收据张数子表头 -->
                             <th style="width:100px">数电发票</th>
@@ -2420,7 +2434,7 @@
                                         <td style="vertical-align: middle;">
                                             <div class="project_reimbursement_div"  style="width: 200px">
                                                 <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
-                                                                           title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                                           title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
                                             </div>
                                         </td>
                                         <td style="vertical-align: middle;">
@@ -2449,6 +2463,9 @@
                                         <td>
                                             <input id="workAccountList${index.index}_invoiceMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].invoiceMoney" type="text" value="${workAccount.invoiceMoney}"  placeholder="非数电票金额" maxlength="10"  class="form-control number"/>
                                         </td>
+                                <td>
+                                    <input id="workAccountList${index.index}_subsidyMoney" onchange="calculateSum(${index.index})" name="workAccountList[${index.index}].subsidyMoney" type="text" value="${workAccount.subsidyMoney}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                                </td>
                                         <td>
                                             <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}"  readonly="readonly"  class="form-control number required" style="background-color: #f5f5f5;"/>
                                         </td>
@@ -2483,12 +2500,13 @@
                     <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
                         <thead>
                         <tr style="border: 0px">
-                            <td style="width:150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
-                            <td style="width:100px"></td>
+                            <td></td>
+                            <td style="width:200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                            <td style="width:150px"></td>
                             <td style="width:180px"></td>
                             <td style="width:200px"></td>
                             <td style="width:200px"></td>
-                            <td style="width:300px" style="border: 0px">
+                            <td style="width:400px" style="border: 0px">
                                 <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
                             </td>
                             <td style="width:300px"></td>
@@ -2513,13 +2531,13 @@
                 <span class='default_shut' name="workAccountList{{idx}}.serialNumber" style="padding-right: 15px; "></span>{{number}}
             </td>
             <td style="vertical-align: middle;">
-                <div class="project_reimbursement_div"  style="width: 200px">
+                <div class="project_reimbursement_div"  style="width: 150px" >
                     <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
-                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control judgment layui-input" allowClear="true" checked="true" notAllowSelectParent="true"/>
                 </div>
             </td>
             <td style="vertical-align: middle;">
-                <div class="not_project_reimbursement_div"  style="width: 200px">
+                <div class="not_project_reimbursement_div"  style="width: 150px">
                     <input id="workAccountList{{idx}}_reimbursementNameofficeId"  type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly"  class="form-control"/>
                 </div>
             </td>
@@ -2547,6 +2565,9 @@
                     <input id="workAccountList{{idx}}_invoiceMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].invoiceMoney" type="text" value="{{row.invoiceMoney}}"  placeholder="非数电票金额" maxlength="10" class="form-control number"/>
                 </td>
                 <td>
+                    <input id="workAccountList{{idx}}_subsidyMoney" onchange="calculateSum({{idx}})" name="workAccountList[{{idx}}].subsidyMoney" type="text" value="{{row.subsidyMoney}}"  placeholder="补贴金额" maxlength="10"  class="form-control number"/>
+                </td>
+                <td>
                     <input id="workAccountList{{idx}}_money" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}"  readonly="readonly" class="form-control number required" style="background-color: #f5f5f5;"/>
                 </td>
 
@@ -2785,7 +2806,10 @@
             }
 
             var invoice = parseFloat($("#workAccountList" + rowIndex + "_invoiceMoney").val() || 0);
-            var rowSum = eInvoice + invoice;
+
+            var subsidyMoney = parseFloat($("#workAccountList" + rowIndex + "_subsidyMoney").val() || 0);
+
+            var rowSum = eInvoice + invoice + subsidyMoney;
 
             // 5. 更新当前行的汇总金额
             $("#workAccountList" + rowIndex + "_money").val(rowSum.toFixed(2));
@@ -2793,6 +2817,7 @@
             // 6. 累加至总金额
             totalAllEInvoice += eInvoice;
             totalAllInvoice += invoice;
+            totalAllInvoice += subsidyMoney;
             totalAllSum += rowSum;
 
         });

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

@@ -414,9 +414,9 @@
                     ,"notifyFlag":"${workReimbursement.notifyFlag}"
                     ,"notifyId":"${workReimbursement.notifyId}"
                     ,"reimbursementType":"${workReimbursement.reimbursementType}"
-                    ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
+                    ,"submitterName":"<c:out value="${workReimbursement.submitterName}" escapeXml="true"/>"
                     ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
-                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).showName}"
+                    ,"officeId":"${workReimbursement.submitterOfficeName}"
                     ,"proId":"${workReimbursement.project.projectId}"
                     ,"projectId":
                         <c:if test="${workReimbursement.ext == 1}">