commit
This commit is contained in:
@@ -309,9 +309,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
// if (Globals.sso) {
|
if (Globals.sso) {
|
||||||
throw new BaseException("用户名或者密码不正确");
|
throw new BaseException("用户名或者密码不正确");
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
+36
-23
@@ -11,41 +11,41 @@ import java.math.BigDecimal;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分工会季度额度分配服务。
|
* 分工会分配项目额度分配服务。
|
||||||
*
|
*
|
||||||
* <p>该服务统一处理季度额度的分配、批量分配和重置回滚,
|
* <p>该服务统一处理会费、评优奖励等分配项目的额度分配、批量分配和重置回滚,
|
||||||
* 保证季度记录与年度预算表金额始终同步。</p>
|
* 保证分配项目记录与年度预算表金额始终同步。</p>
|
||||||
*
|
*
|
||||||
* @author zhf
|
* @author zhf
|
||||||
*/
|
*/
|
||||||
public interface OutlayManageUnionAllocateService extends BaseService<OutLayAllocateUnion> {
|
public interface OutlayManageUnionAllocateService extends BaseService<OutLayAllocateUnion> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改单个分工会的季度分配金额。
|
* 修改单个分工会的分配项目金额。
|
||||||
*
|
*
|
||||||
* @param id outlay_allocate_union 表主键,用于定位当前编辑的季度分配记录
|
* @param id outlay_allocate_union 表主键,用于定位当前编辑的分配项目记录
|
||||||
* @param allocateMoney 本次要设置的季度分配金额,传入的是最终金额,不是增量金额
|
* @param allocateMoney 本次要设置的分配项目金额,传入的是最终金额,不是增量金额
|
||||||
* @return Result 成功时返回 success;失败时返回错误信息,前端据此提示用户
|
* @return Result 成功时返回 success;失败时返回错误信息,前端据此提示用户
|
||||||
*/
|
*/
|
||||||
Result doEdit(String id, BigDecimal allocateMoney);
|
Result doEdit(String id, BigDecimal allocateMoney);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量设置某一季度所有分工会的分配金额。
|
* 批量设置某一分配项目所有分工会的分配金额。
|
||||||
*
|
*
|
||||||
* @param allocateMoney 本次批量设置的季度分配金额,所有命中的分工会都会写入该金额
|
* @param allocateMoney 本次批量设置的分配项目金额,所有命中的分工会都会写入该金额
|
||||||
* @param quarterly 要操作的季度,例如 1/2/3/4
|
* @param quarterly 要操作的分配项目编码,复用 OUTLAY_QUARTERLY 字典
|
||||||
* @param year 要操作的年份,用于筛选对应季度的有效分配记录
|
* @param year 要操作的年份,用于筛选对应分配项目的有效记录
|
||||||
* @return Result 成功时返回 success;失败时返回错误信息
|
* @return Result 成功时返回 success;失败时返回错误信息
|
||||||
*/
|
*/
|
||||||
Result doBatchAllocate(BigDecimal allocateMoney, Integer quarterly, Integer year);
|
Result doBatchAllocate(BigDecimal allocateMoney, Integer quarterly, Integer year);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断某年某季度是否已经做过额度分配。
|
* 判断某年某分配项目是否已经做过额度分配。
|
||||||
*
|
*
|
||||||
* <p>只要当前季度记录中存在分配额度大于 0 的有效记录,
|
* <p>只要当前分配项目记录中存在分配额度大于 0 的有效记录,
|
||||||
* 就认为该季度已经分配过额度,前端据此决定是否提示再次分配。</p>
|
* 就认为该分配项目已经分配过额度,前端据此决定是否提示再次分配。</p>
|
||||||
*
|
*
|
||||||
* @param quarterly 要检查的季度,例如 1/2/3/4
|
* @param quarterly 要检查的分配项目编码,取值由 OUTLAY_QUARTERLY 字典维护
|
||||||
* @param year 要检查的年份
|
* @param year 要检查的年份
|
||||||
* @return true 已分配过;false 未分配
|
* @return true 已分配过;false 未分配
|
||||||
*/
|
*/
|
||||||
@@ -60,15 +60,28 @@ public interface OutlayManageUnionAllocateService extends BaseService<OutLayAllo
|
|||||||
List<OutlayUnionAllocateImportVo> readImportExcel(TempFile file);
|
List<OutlayUnionAllocateImportVo> readImportExcel(TempFile file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据导入数据按分工会逐条分配季度额度。
|
* 根据导入数据按分工会逐条分配项目额度。
|
||||||
*
|
*
|
||||||
* @param importList 导入预览数据
|
* @param importList 导入预览数据
|
||||||
* @param quarterly 当前季度
|
* @param quarterly 当前分配项目编码
|
||||||
* @param year 当前年度
|
* @param year 当前年度
|
||||||
* @return 导入分配结果
|
* @return 导入分配结果
|
||||||
*/
|
*/
|
||||||
Result doImportAllocate(List<OutlayUnionAllocateImportVo> importList, Integer quarterly, Integer year);
|
Result doImportAllocate(List<OutlayUnionAllocateImportVo> importList, Integer quarterly, Integer year);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给指定分工会新增评优奖励分配记录。
|
||||||
|
*
|
||||||
|
* <p>评优奖励属于 OUTLAY_QUARTERLY 字典中的独立分配项目,只针对单个分工会新增;
|
||||||
|
* 新增后同步累加年度预算表总额度,分工会经费分配详情会按分配项目展示该记录。</p>
|
||||||
|
*
|
||||||
|
* @param year 当前预算年度
|
||||||
|
* @param unionId 要新增评优奖励的分工会 ID
|
||||||
|
* @param allocateMoney 本次新增的评优奖励金额
|
||||||
|
* @return Result 成功时返回 success;失败时返回校验原因
|
||||||
|
*/
|
||||||
|
Result doAddAwardAllocate(Integer year, String unionId, BigDecimal allocateMoney);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出分工会额度导入模板。
|
* 导出分工会额度导入模板。
|
||||||
*
|
*
|
||||||
@@ -77,24 +90,24 @@ public interface OutlayManageUnionAllocateService extends BaseService<OutLayAllo
|
|||||||
Workbook exportImportTemplate();
|
Workbook exportImportTemplate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置指定年度季度的分配记录。
|
* 重置指定年度分配项目的分配记录。
|
||||||
*
|
*
|
||||||
* <p>页面支持切换年度和季度,所以重置动作必须严格使用前端当前选择值,
|
* <p>页面支持切换年度和分配项目,所以重置动作必须严格使用前端当前选择值,
|
||||||
* 不能再按系统当前自然季度处理,否则会出现页面筛选季度和实际重置季度不一致的问题。</p>
|
* 不能再按系统当前默认项目处理,否则会出现页面筛选项目和实际重置项目不一致的问题。</p>
|
||||||
*
|
*
|
||||||
* @param quarterly 要重置的季度,例如 1/2/3/4
|
* @param quarterly 要重置的分配项目编码
|
||||||
* @param year 要重置的年份
|
* @param year 要重置的年份
|
||||||
* @return Result 成功时返回 success;失败时返回错误信息
|
* @return Result 成功时返回 success;失败时返回错误信息
|
||||||
*/
|
*/
|
||||||
Result deleteAllocateRecord(Integer quarterly, Integer year);
|
Result deleteAllocateRecord(Integer quarterly, Integer year);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按指定年度季度生成分工会预算记录。
|
* 按指定年度分配项目生成分工会预算记录。
|
||||||
*
|
*
|
||||||
* <p>生成前会先校验该年度季度是否已存在有效记录;
|
* <p>生成前会先校验该年度分配项目是否已存在有效记录;
|
||||||
* 若已存在,则直接提示前端需要先重置后再重新生成。</p>
|
* 若已存在,则直接提示前端需要先重置后再重新生成。</p>
|
||||||
*
|
*
|
||||||
* @param quarterly 要生成的季度,例如 1/2/3/4
|
* @param quarterly 要生成的分配项目编码
|
||||||
* @param year 要生成的年份
|
* @param year 要生成的年份
|
||||||
* @return Result 成功时返回 success;失败时返回错误信息
|
* @return Result 成功时返回 success;失败时返回错误信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
+134
-37
@@ -33,13 +33,15 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分工会季度额度分配实现。
|
* 分工会分配项目额度分配实现。
|
||||||
*
|
*
|
||||||
* @author zhf
|
* @author zhf
|
||||||
*/
|
*/
|
||||||
@IocBean(args = {"refer:dao"})
|
@IocBean(args = {"refer:dao"})
|
||||||
public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLayAllocateUnion> implements OutlayManageUnionAllocateService {
|
public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLayAllocateUnion> implements OutlayManageUnionAllocateService {
|
||||||
|
|
||||||
|
private static final int AWARD_PROJECT_CODE = 4;
|
||||||
|
|
||||||
public OutlayManageUnionAllocateServiceImpl(Dao dao) {
|
public OutlayManageUnionAllocateServiceImpl(Dao dao) {
|
||||||
super(dao);
|
super(dao);
|
||||||
}
|
}
|
||||||
@@ -50,9 +52,9 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
if (Lang.isEmpty(allocateUnion)) {
|
if (Lang.isEmpty(allocateUnion)) {
|
||||||
return Result.error("分配记录不存在!");
|
return Result.error("分配记录不存在!");
|
||||||
}
|
}
|
||||||
int currentQuarter = getCurrentQuarter();
|
int currentProject = getCurrentFeeProject();
|
||||||
if (allocateUnion.getQuarterly() < currentQuarter) {
|
if (allocateUnion.getQuarterly() < currentProject) {
|
||||||
return Result.error("当前是第【" + currentQuarter + "季度】无法修改【第" + allocateUnion.getQuarterly() + "季度】的额度!");
|
return Result.error("当前仅允许修改当前会费项目额度!");
|
||||||
}
|
}
|
||||||
applyAllocateMoney(allocateUnion, allocateMoney);
|
applyAllocateMoney(allocateUnion, allocateMoney);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -60,7 +62,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result doBatchAllocate(BigDecimal allocateMoney, Integer quarterly, Integer year) {
|
public Result doBatchAllocate(BigDecimal allocateMoney, Integer quarterly, Integer year) {
|
||||||
Result validateResult = validateCurrentQuarterOperation(quarterly);
|
Result validateResult = validateCurrentPeriodOperation(quarterly);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -69,7 +71,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
.and(OutLayAllocateUnion::getYear, "=", year)
|
.and(OutLayAllocateUnion::getYear, "=", year)
|
||||||
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
||||||
return Result.error("当前季度没有分配记录!");
|
return Result.error("当前分配项目没有分配记录!");
|
||||||
}
|
}
|
||||||
for (OutLayAllocateUnion allocateUnion : allocateUnionList) {
|
for (OutLayAllocateUnion allocateUnion : allocateUnionList) {
|
||||||
applyAllocateMoney(allocateUnion, allocateMoney);
|
applyAllocateMoney(allocateUnion, allocateMoney);
|
||||||
@@ -143,7 +145,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result doImportAllocate(List<OutlayUnionAllocateImportVo> importList, Integer quarterly, Integer year) {
|
public Result doImportAllocate(List<OutlayUnionAllocateImportVo> importList, Integer quarterly, Integer year) {
|
||||||
Result validateResult = validateCurrentQuarterOperation(quarterly);
|
Result validateResult = validateCurrentPeriodOperation(quarterly);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -155,7 +157,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
.and(OutLayAllocateUnion::getYear, "=", year)
|
.and(OutLayAllocateUnion::getYear, "=", year)
|
||||||
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
||||||
return Result.error("当前季度没有分配记录!");
|
return Result.error("当前分配项目没有分配记录!");
|
||||||
}
|
}
|
||||||
List<Sys_union> unionList = dao().query(Sys_union.class, Cnd.NEW());
|
List<Sys_union> unionList = dao().query(Sys_union.class, Cnd.NEW());
|
||||||
Map<String, Sys_union> unionMap = new HashMap<>();
|
Map<String, Sys_union> unionMap = new HashMap<>();
|
||||||
@@ -190,7 +192,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!allocateUnionMap.containsKey(union.getId())) {
|
if (!allocateUnionMap.containsKey(union.getId())) {
|
||||||
errorList.add("第" + item.getRowNum() + "行:当前季度未生成该分工会分配记录");
|
errorList.add("第" + item.getRowNum() + "行:当前分配项目未生成该分工会分配记录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!errorList.isEmpty()) {
|
if (!errorList.isEmpty()) {
|
||||||
@@ -199,20 +201,62 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
for (OutlayUnionAllocateImportVo item : importList) {
|
for (OutlayUnionAllocateImportVo item : importList) {
|
||||||
Sys_union union = unionMap.get(item.getUnionCode());
|
Sys_union union = unionMap.get(item.getUnionCode());
|
||||||
OutLayAllocateUnion allocateUnion = allocateUnionMap.get(union.getId());
|
OutLayAllocateUnion allocateUnion = allocateUnionMap.get(union.getId());
|
||||||
// 导入分配与手工分配保持同一套金额同步规则,确保季度表和年度预算表数据一致。
|
// 导入分配与手工分配保持同一套金额同步规则,确保分配项目记录和年度预算表数据一致。
|
||||||
applyAllocateMoney(allocateUnion, item.getAllocateMoney());
|
applyAllocateMoney(allocateUnion, item.getAllocateMoney());
|
||||||
}
|
}
|
||||||
return Result.success("导入分配成功");
|
return Result.success("导入分配成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result doAddAwardAllocate(Integer year, String unionId, BigDecimal allocateMoney) {
|
||||||
|
if (year == null || StrUtil.isBlank(unionId) || allocateMoney == null) {
|
||||||
|
return Result.error("参数错误!");
|
||||||
|
}
|
||||||
|
if (allocateMoney.compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
|
return Result.error("评优奖励金额必须大于0!");
|
||||||
|
}
|
||||||
|
Sys_union union = dao().fetch(Sys_union.class, unionId);
|
||||||
|
if (Lang.isEmpty(union)) {
|
||||||
|
return Result.error("分工会不存在!");
|
||||||
|
}
|
||||||
|
int count = dao().count(OutLayAllocateUnion.class,
|
||||||
|
Cnd.where(OutLayAllocateUnion::getYear, "=", year)
|
||||||
|
.and(OutLayAllocateUnion::getUnionId, "=", unionId)
|
||||||
|
.and(OutLayAllocateUnion::getQuarterly, "=", AWARD_PROJECT_CODE)
|
||||||
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error("该分工会本年度已存在评优奖励记录,请直接编辑已有记录!");
|
||||||
|
}
|
||||||
|
|
||||||
|
OutLayAllocateUnion allocateUnion = new OutLayAllocateUnion();
|
||||||
|
allocateUnion.setYear(year);
|
||||||
|
allocateUnion.setUnionId(unionId);
|
||||||
|
allocateUnion.setQuarterly(AWARD_PROJECT_CODE);
|
||||||
|
allocateUnion.setAllocateHeadMoney(getCurrentYearSurplusMoney(year, unionId));
|
||||||
|
allocateUnion.setAllocateMoney(BigDecimal.ZERO);
|
||||||
|
insert(allocateUnion);
|
||||||
|
// 新增评优奖励后复用统一金额同步规则,确保分配项目记录和年度预算表 totalQuota 同步。
|
||||||
|
applyAllocateMoney(allocateUnion, allocateMoney);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Workbook exportImportTemplate() {
|
public Workbook exportImportTemplate() {
|
||||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
entityList.add(new ExcelExportEntity("工会名称", "unionName", 20));
|
||||||
entityList.add(new ExcelExportEntity("工会编码", "unionCode", 20));
|
entityList.add(new ExcelExportEntity("工会编码", "unionCode", 20));
|
||||||
entityList.add(new ExcelExportEntity("分配额度", "allocateMoney", 20));
|
entityList.add(new ExcelExportEntity("分配额度", "allocateMoney", 20));
|
||||||
|
List<Sys_union> unionList = dao().query(Sys_union.class, Cnd.NEW().asc("unionCode"));
|
||||||
|
List<OutlayUnionAllocateImportVo> templateList = new ArrayList<>();
|
||||||
|
for (Sys_union union : unionList) {
|
||||||
|
OutlayUnionAllocateImportVo item = new OutlayUnionAllocateImportVo();
|
||||||
|
item.setUnionName(union.getName());
|
||||||
|
item.setUnionCode(union.getUnionCode());
|
||||||
|
templateList.add(item);
|
||||||
|
}
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
return ExcelExportUtil.exportExcel(exportParams, entityList, new ArrayList<>());
|
return ExcelExportUtil.exportExcel(exportParams, entityList, templateList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -220,7 +264,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
if (quarterly == null || year == null) {
|
if (quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
Result validateResult = validateCurrentQuarterOperation(quarterly);
|
Result validateResult = validateCurrentPeriodOperation(quarterly);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -229,7 +273,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
.and(OutLayAllocateUnion::getYear, "=", year)
|
.and(OutLayAllocateUnion::getYear, "=", year)
|
||||||
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
if (allocateUnionList == null || allocateUnionList.isEmpty()) {
|
||||||
return Result.error("当前季度还未分配,无法重置!");
|
return Result.error("当前分配项目还未分配,无法重置!");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (OutLayAllocateUnion allocateUnion : allocateUnionList) {
|
for (OutLayAllocateUnion allocateUnion : allocateUnionList) {
|
||||||
@@ -248,7 +292,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
if (quarterly == null || year == null) {
|
if (quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
Result validateResult = validateCurrentQuarterOperation(quarterly);
|
Result validateResult = validateCurrentPeriodOperation(quarterly);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -257,10 +301,10 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
.and(OutLayAllocateUnion::getYear, "=", year)
|
.and(OutLayAllocateUnion::getYear, "=", year)
|
||||||
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error("当前季度已分配,如需重新分配请点击重置分配记录!");
|
return Result.error("当前分配项目已分配,如需重新分配请点击重置分配记录!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 第一季度需要承接上一年度剩余额度,其余季度承接当年预算额度,确保生成记录时的分配前额度准确。
|
// 第一个会费项目需要承接上一年度剩余额度,其余项目承接当年预算额度,确保生成记录时的分配前额度准确。
|
||||||
Integer sourceYear = quarterly == 1 ? year - 1 : year;
|
Integer sourceYear = quarterly == 1 ? year - 1 : year;
|
||||||
List<OutlayManageUnion> outlayManageUnionList = dao().query(OutlayManageUnion.class,
|
List<OutlayManageUnion> outlayManageUnionList = dao().query(OutlayManageUnion.class,
|
||||||
Cnd.where(OutlayManageUnion::getYear, "=", sourceYear));
|
Cnd.where(OutlayManageUnion::getYear, "=", sourceYear));
|
||||||
@@ -270,10 +314,10 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按“先回退旧额度,再写入新额度”的方式同步季度记录和年度预算表。
|
* 按“先回退旧额度,再写入新额度”的方式同步分配项目记录和年度预算表。
|
||||||
*
|
*
|
||||||
* @param allocateUnion 当前季度分配记录,包含分工会、年份、旧分配额度等上下文
|
* @param allocateUnion 当前分配项目记录,包含分工会、年份、旧分配额度等上下文
|
||||||
* @param newAllocateMoney 本次最终要保存的季度分配金额
|
* @param newAllocateMoney 本次最终要保存的分配项目金额
|
||||||
*/
|
*/
|
||||||
private void applyAllocateMoney(OutLayAllocateUnion allocateUnion, BigDecimal newAllocateMoney) {
|
private void applyAllocateMoney(OutLayAllocateUnion allocateUnion, BigDecimal newAllocateMoney) {
|
||||||
BigDecimal oldAllocateMoney = defaultValue(allocateUnion.getAllocateMoney());
|
BigDecimal oldAllocateMoney = defaultValue(allocateUnion.getAllocateMoney());
|
||||||
@@ -285,10 +329,14 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
manageUnion = buildManageUnion(allocateUnion, newAllocateMoney);
|
manageUnion = buildManageUnion(allocateUnion, newAllocateMoney);
|
||||||
insert(manageUnion);
|
insert(manageUnion);
|
||||||
} else {
|
} else {
|
||||||
// 当前 totalQuota 里已经包含了旧季度额度,因此要先减旧值,再加新值,避免重复累加。
|
// 当前 totalQuota 里已经包含了旧项目额度,因此要先减旧值,再加新值,避免重复累加。
|
||||||
BigDecimal newTotalQuota = defaultValue(manageUnion.getTotalQuota())
|
BigDecimal newTotalQuota = defaultValue(manageUnion.getTotalQuota())
|
||||||
.subtract(oldAllocateMoney)
|
.subtract(oldAllocateMoney)
|
||||||
.add(newAllocateMoney);
|
.add(newAllocateMoney);
|
||||||
|
BigDecimal lastYearSurplusMoney = getFirstProjectMissingHeadMoney(allocateUnion, manageUnion);
|
||||||
|
if (lastYearSurplusMoney.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
newTotalQuota = newTotalQuota.add(lastYearSurplusMoney);
|
||||||
|
}
|
||||||
dao().update(OutlayManageUnion.class, Chain.make("totalQuota", newTotalQuota),
|
dao().update(OutlayManageUnion.class, Chain.make("totalQuota", newTotalQuota),
|
||||||
Cnd.where(OutlayManageUnion::getId, "=", manageUnion.getId()));
|
Cnd.where(OutlayManageUnion::getId, "=", manageUnion.getId()));
|
||||||
}
|
}
|
||||||
@@ -298,9 +346,9 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回滚当前季度已分配到年度预算表中的金额。
|
* 回滚当前分配项目已分配到年度预算表中的金额。
|
||||||
*
|
*
|
||||||
* @param allocateUnion 当前季度分配记录,allocateMoney 表示本次需要从年度额度中扣回的金额
|
* @param allocateUnion 当前分配项目记录,allocateMoney 表示本次需要从年度额度中扣回的金额
|
||||||
*/
|
*/
|
||||||
private void rollbackAllocateMoney(OutLayAllocateUnion allocateUnion) {
|
private void rollbackAllocateMoney(OutLayAllocateUnion allocateUnion) {
|
||||||
OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class,
|
OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class,
|
||||||
@@ -315,11 +363,43 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
Cnd.where(OutlayManageUnion::getId, "=", manageUnion.getId()));
|
Cnd.where(OutlayManageUnion::getId, "=", manageUnion.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第一段会费分配记录的 allocateHeadMoney 保存上一年度剩余额度。
|
||||||
|
* 如果当前年度预算表已提前生成,导入/一键分配时 totalQuota 可能只包含各分配项目金额,
|
||||||
|
* 此时需要补入这笔期初结余;已补入过的年度预算再次导入时不重复累加。
|
||||||
|
*
|
||||||
|
* @param allocateUnion 当前分配项目记录
|
||||||
|
* @param manageUnion 当前年度分工会预算记录
|
||||||
|
* @return BigDecimal 本次需要补入的上一年度剩余额度;无需补入时返回 0
|
||||||
|
*/
|
||||||
|
private BigDecimal getFirstProjectMissingHeadMoney(OutLayAllocateUnion allocateUnion, OutlayManageUnion manageUnion) {
|
||||||
|
if (allocateUnion == null || manageUnion == null || !Integer.valueOf(1).equals(allocateUnion.getQuarterly())) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
BigDecimal headMoney = defaultValue(allocateUnion.getAllocateHeadMoney());
|
||||||
|
if (headMoney.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
List<OutLayAllocateUnion> allocateUnionList = dao().query(OutLayAllocateUnion.class,
|
||||||
|
Cnd.where(OutLayAllocateUnion::getUnionId, "=", allocateUnion.getUnionId())
|
||||||
|
.and(OutLayAllocateUnion::getYear, "=", allocateUnion.getYear())
|
||||||
|
.and(OutLayAllocateUnion::getDelFlag, "=", false));
|
||||||
|
BigDecimal allocatedTotalMoney = allocateUnionList.stream()
|
||||||
|
.map(OutLayAllocateUnion::getAllocateMoney)
|
||||||
|
.map(this::defaultValue)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal nonAllocateMoney = defaultValue(manageUnion.getTotalQuota()).subtract(allocatedTotalMoney);
|
||||||
|
if (nonAllocateMoney.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
return headMoney;
|
||||||
|
}
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前年份预算表不存在时,按“分配前额度 + 本次分配额度”创建年度预算记录。
|
* 当前年份预算表不存在时,按“分配前额度 + 本次分配额度”创建年度预算记录。
|
||||||
*
|
*
|
||||||
* @param allocateUnion 当前季度分配记录,allocateHeadMoney 表示生成记录时的剩余额度快照
|
* @param allocateUnion 当前分配项目记录,allocateHeadMoney 表示生成记录时的剩余额度快照
|
||||||
* @param allocateMoney 本次要设置的季度分配额度
|
* @param allocateMoney 本次要设置的分配项目额度
|
||||||
* @return OutlayManageUnion 新建的年度预算实体
|
* @return OutlayManageUnion 新建的年度预算实体
|
||||||
*/
|
*/
|
||||||
private OutlayManageUnion buildManageUnion(OutLayAllocateUnion allocateUnion, BigDecimal allocateMoney) {
|
private OutlayManageUnion buildManageUnion(OutLayAllocateUnion allocateUnion, BigDecimal allocateMoney) {
|
||||||
@@ -347,38 +427,55 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl<OutLay
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算当前自然季度。
|
* 计算当前年度指定分工会的可用余额,作为新增评优奖励前的额度快照。
|
||||||
*
|
*
|
||||||
* @return int 当前季度,取值范围 1-4
|
* @param year 当前预算年度
|
||||||
|
* @param unionId 分工会 ID
|
||||||
|
* @return BigDecimal 当前年度总额度减已使用额度;没有年度预算记录时返回 0
|
||||||
*/
|
*/
|
||||||
private int getCurrentQuarter() {
|
private BigDecimal getCurrentYearSurplusMoney(Integer year, String unionId) {
|
||||||
return DateUtil.month(DateUtil.date()) / 3 + 1;
|
OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class,
|
||||||
|
Cnd.where(OutlayManageUnion::getYear, "=", year)
|
||||||
|
.and(OutlayManageUnion::getUnionId, "=", unionId));
|
||||||
|
if (Lang.isEmpty(manageUnion)) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
return defaultValue(manageUnion.getTotalQuota()).subtract(defaultValue(manageUnion.getUsedQuota()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预算季度记录相关操作只能针对当前自然季度执行。
|
* 计算当前会费项目。
|
||||||
*
|
*
|
||||||
* @param quarterly 前端传入的目标季度
|
* @return int 当前会费项目,1 表示 1-4月会费,2 表示 5-8月会费,3 表示 9-12月会费
|
||||||
|
*/
|
||||||
|
private int getCurrentFeeProject() {
|
||||||
|
return DateUtil.month(DateUtil.date()) / 4 + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预算分配项目记录相关操作只能针对当前会费项目执行。
|
||||||
|
*
|
||||||
|
* @param quarterly 前端传入的目标分配项目编码,取值由 OUTLAY_QUARTERLY 字典维护
|
||||||
* @return Result 不允许操作时返回错误结果;允许操作时返回 null
|
* @return Result 不允许操作时返回错误结果;允许操作时返回 null
|
||||||
*/
|
*/
|
||||||
private Result validateCurrentQuarterOperation(Integer quarterly) {
|
private Result validateCurrentPeriodOperation(Integer quarterly) {
|
||||||
if (quarterly == null) {
|
if (quarterly == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
int currentQuarter = getCurrentQuarter();
|
int currentProject = getCurrentFeeProject();
|
||||||
if (!quarterly.equals(currentQuarter)) {
|
if (!quarterly.equals(currentProject)) {
|
||||||
return Result.error("当前仅允许操作第" + currentQuarter + "季度数据,请切换后再操作!");
|
return Result.error("当前仅允许操作当前会费项目数据,请切换后再操作!");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按目标年度季度初始化要生成的分工会分配记录。
|
* 按目标年度分配项目初始化要生成的分工会分配记录。
|
||||||
*
|
*
|
||||||
* @param outlayManageUnionList 用于计算“分配前额度”的年度预算数据
|
* @param outlayManageUnionList 用于计算“分配前额度”的年度预算数据
|
||||||
* @param quarterly 目标季度
|
* @param quarterly 目标分配项目编码
|
||||||
* @param year 目标年度
|
* @param year 目标年度
|
||||||
* @return List<OutLayAllocateUnion> 待插入的季度分配记录
|
* @return List<OutLayAllocateUnion> 待插入的分配项目记录
|
||||||
*/
|
*/
|
||||||
private List<OutLayAllocateUnion> buildAllocateUnionList(List<OutlayManageUnion> outlayManageUnionList, Integer quarterly, Integer year) {
|
private List<OutLayAllocateUnion> buildAllocateUnionList(List<OutlayManageUnion> outlayManageUnionList, Integer quarterly, Integer year) {
|
||||||
List<Sys_union> unionList = dao().query(Sys_union.class, Cnd.NEW());
|
List<Sys_union> unionList = dao().query(Sys_union.class, Cnd.NEW());
|
||||||
|
|||||||
+32
-9
@@ -38,13 +38,13 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* @author zhf
|
* @author zhf
|
||||||
* @date 2026/2/3 11:12
|
* @date 2026/2/3 11:12
|
||||||
* @description 分工会经费分配
|
* @description 分工会经费分配项目管理
|
||||||
*/
|
*/
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/outlay/outlayManage/unionAllocate")
|
@At("/platform/outlay/outlayManage/unionAllocate")
|
||||||
@Ok("json:full")
|
@Ok("json:full")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "分工会经费分配")
|
@Api(tags = "分工会经费分配项目管理")
|
||||||
public class OutlayManageUnionAllocateController {
|
public class OutlayManageUnionAllocateController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -100,11 +100,13 @@ public class OutlayManageUnionAllocateController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("一键批量分配所有工会额度")
|
@ApiOperation("一键批量分配所有工会额度")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SLog(tag = "分工会预算-季度预算分配", msg = "一键批量分配所有工会额度")
|
@SLog(tag = "分工会预算-分配项目预算分配", msg = "一键批量分配所有工会额度")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
public Result doBatchAllocate(@Param("allocateMoney") BigDecimal allocateMoney,
|
public Result doBatchAllocate(@Param("allocateMoney") BigDecimal allocateMoney,
|
||||||
@Param("quarterly") Integer quarterly,
|
@Param("quarterly") Integer quarterly,
|
||||||
@Param("year") Integer year) {
|
@Param("year") Integer year) {
|
||||||
|
// 参数说明:allocateMoney 为本次写入的分配额度;quarterly 承载 OUTLAY_QUARTERLY 字典编码,对应会费、评优奖励等分配项目;year 为预算年度。
|
||||||
|
// 返回 Result,成功时前端刷新列表,失败时 msg 字段用于页面提示。
|
||||||
if (allocateMoney == null || quarterly == null || year == null) {
|
if (allocateMoney == null || quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
@@ -112,7 +114,7 @@ public class OutlayManageUnionAllocateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("校验当前季度是否已分配额度")
|
@ApiOperation("校验当前分配项目是否已分配额度")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
public Result hasAllocated(@Param("quarterly") Integer quarterly,
|
public Result hasAllocated(@Param("quarterly") Integer quarterly,
|
||||||
@Param("year") Integer year) {
|
@Param("year") Integer year) {
|
||||||
@@ -139,11 +141,13 @@ public class OutlayManageUnionAllocateController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("导入分配分工会额度")
|
@ApiOperation("导入分配分工会额度")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SLog(tag = "分工会预算-季度预算分配", msg = "导入分配分工会额度")
|
@SLog(tag = "分工会预算-分配项目预算分配", msg = "导入分配分工会额度")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
public Result doImportAllocate(String data,
|
public Result doImportAllocate(String data,
|
||||||
@Param("quarterly") Integer quarterly,
|
@Param("quarterly") Integer quarterly,
|
||||||
@Param("year") Integer year) {
|
@Param("year") Integer year) {
|
||||||
|
// 参数说明:data 为导入预览行 JSON;quarterly 为分配项目字典编码;year 为预算年度。
|
||||||
|
// 返回 Result,成功表示导入额度已同步到分配项目记录和年度预算表,失败时 msg 字段返回具体校验原因。
|
||||||
if (StrUtil.isBlank(data) || quarterly == null || year == null) {
|
if (StrUtil.isBlank(data) || quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
@@ -151,6 +155,22 @@ public class OutlayManageUnionAllocateController {
|
|||||||
return outlayManageUnionAllocateService.doImportAllocate(importList, quarterly, year);
|
return outlayManageUnionAllocateService.doImportAllocate(importList, quarterly, year);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增单个分工会评优奖励")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(tag = "分工会预算-分配项目预算分配", msg = "新增单个分工会评优奖励")
|
||||||
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
|
public Result doAddAwardAllocate(@Param("year") Integer year,
|
||||||
|
@Param("unionId") String unionId,
|
||||||
|
@Param("allocateMoney") BigDecimal allocateMoney) {
|
||||||
|
// 参数说明:year 为预算年度;unionId 为分工会 ID;allocateMoney 为本次新增的评优奖励金额。
|
||||||
|
// 返回 Result,成功后前端刷新分配列表;失败时 msg 字段返回参数或重复新增等校验原因。
|
||||||
|
if (year == null || StrUtil.isBlank(unionId) || allocateMoney == null) {
|
||||||
|
return Result.error("参数错误!");
|
||||||
|
}
|
||||||
|
return outlayManageUnionAllocateService.doAddAwardAllocate(year, unionId, allocateMoney);
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
@ApiOperation("下载导入分配模板")
|
@ApiOperation("下载导入分配模板")
|
||||||
@@ -166,12 +186,13 @@ public class OutlayManageUnionAllocateController {
|
|||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("重置预算季度记录")
|
@ApiOperation("重置预算分配记录")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SLog(tag = "分工会预算-季度预算分配", msg = "重置预算季度记录")
|
@SLog(tag = "分工会预算-分配项目预算分配", msg = "重置预算分配记录")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
public Result deleteAllocateRecord(@Param("quarterly") Integer quarterly,
|
public Result deleteAllocateRecord(@Param("quarterly") Integer quarterly,
|
||||||
@Param("year") Integer year) {
|
@Param("year") Integer year) {
|
||||||
|
// 参数说明:quarterly 为当前要重置的分配项目编码,year 为预算年度;返回 Result 用于提示重置是否成功。
|
||||||
if (quarterly == null || year == null) {
|
if (quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
@@ -179,11 +200,13 @@ public class OutlayManageUnionAllocateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("预算季度记录生成")
|
@ApiOperation("预算分配记录生成")
|
||||||
@SLog(tag = "分工会预算-季度预算分配", msg = "生成了预算分配记录")
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(tag = "分工会预算-分配项目预算分配", msg = "生成了预算分配记录")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
@SaCheckPermission("outlay.outlayManage.union.allocate")
|
||||||
public Result doAllocateRecord(@Param("quarterly") Integer quarterly,
|
public Result doAllocateRecord(@Param("quarterly") Integer quarterly,
|
||||||
@Param("year") Integer year) {
|
@Param("year") Integer year) {
|
||||||
|
// 参数说明:quarterly 为本次生成记录的分配项目编码,year 为预算年度;返回 Result 用于前端提示生成结果。
|
||||||
if (quarterly == null || year == null) {
|
if (quarterly == null || year == null) {
|
||||||
return Result.error("参数错误!");
|
return Result.error("参数错误!");
|
||||||
}
|
}
|
||||||
|
|||||||
+142
@@ -0,0 +1,142 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.vo.OutlayUnionIncomeExpenseVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级分工会经费收支使用情况表。
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/outlay/outlayManage/unionIncomeExpense")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "二级分工会经费收支使用情况表")
|
||||||
|
public class OutlayManageUnionIncomeExpenseController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/outlay/outlayManage/union/incomeExpense/index.html")
|
||||||
|
@SaCheckPermission("outlay.outlayManage.union.incomeExpense")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("outlay.outlayManage.union.incomeExpense")
|
||||||
|
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||||
|
Sql sql = buildIncomeExpenseSql(year, unionId);
|
||||||
|
Pagination pagination = baseService.listPageVO(pageForm, sql, OutlayUnionIncomeExpenseVO.class);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("导出")
|
||||||
|
@SaCheckPermission("outlay.outlayManage.union.incomeExpense")
|
||||||
|
public void doExport(Integer year, String unionId, HttpServletResponse response) {
|
||||||
|
Integer queryYear = getQueryYear(year);
|
||||||
|
Sql sql = buildIncomeExpenseSql(queryYear, unionId);
|
||||||
|
List<OutlayUnionIncomeExpenseVO> list = baseService.listVO(sql, OutlayUnionIncomeExpenseVO.class);
|
||||||
|
|
||||||
|
ArrayList<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("单位", "unionName", 25));
|
||||||
|
entities.add(new ExcelExportEntity("年初数", "beginMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("1-4月会费", "feeJanApr", 20));
|
||||||
|
entities.add(new ExcelExportEntity("5-8月会费", "feeMayAug", 20));
|
||||||
|
entities.add(new ExcelExportEntity("9-12月会费", "feeSepDec", 20));
|
||||||
|
entities.add(new ExcelExportEntity("评优奖励", "awardMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("1-12月支出", "usedMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("经费余额", "remainMoney", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
CommonDownloadUtil.download(queryYear + "年二级分工会经费收支使用情况表.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计参数说明:
|
||||||
|
* year 为统计年度,未传时默认当前年份;unionId 为二级分工会主键,管理员可为空查询全部。
|
||||||
|
* 返回 VO 中 beginMoney 是年初数,feeJanApr/feeMayAug/feeSepDec 是三个会费收入段,
|
||||||
|
* awardMoney 是评优奖励,usedMoney 是年度支出,remainMoney 是当前经费余额。
|
||||||
|
*/
|
||||||
|
private Sql buildIncomeExpenseSql(Integer year, String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
mu.year AS year,
|
||||||
|
mu.unionId AS unionId,
|
||||||
|
COALESCE(mu.unionName, su.name) AS unionName,
|
||||||
|
COALESCE(mu.unionCode, su.unionCode) AS unionCode,
|
||||||
|
COALESCE(SUM(CASE WHEN au.quarterly = 1 THEN au.allocateHeadMoney ELSE 0 END), 0) AS beginMoney,
|
||||||
|
COALESCE(SUM(CASE WHEN au.quarterly = 1 THEN au.allocateMoney ELSE 0 END), 0) AS feeJanApr,
|
||||||
|
COALESCE(SUM(CASE WHEN au.quarterly = 2 THEN au.allocateMoney ELSE 0 END), 0) AS feeMayAug,
|
||||||
|
COALESCE(SUM(CASE WHEN au.quarterly = 3 THEN au.allocateMoney ELSE 0 END), 0) AS feeSepDec,
|
||||||
|
COALESCE(SUM(CASE WHEN au.quarterly = 4 THEN au.allocateMoney ELSE 0 END), 0) AS awardMoney,
|
||||||
|
COALESCE(mu.usedQuota, 0) AS usedMoney,
|
||||||
|
COALESCE(mu.totalQuota, 0) - COALESCE(mu.usedQuota, 0) AS remainMoney
|
||||||
|
FROM outlay_manage_union mu
|
||||||
|
LEFT JOIN sys_union su ON su.id = mu.unionId
|
||||||
|
LEFT JOIN outlay_allocate_union au ON au.year = mu.year
|
||||||
|
AND au.unionId = mu.unionId
|
||||||
|
AND au.delFlag = 0
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("mu.delFlag", "=", false);
|
||||||
|
cnd.and("mu.year", "=", getQueryYear(year));
|
||||||
|
cnd.and("mu.totalQuota", "IS NOT", null);
|
||||||
|
cnd.andEX("mu.unionId", "=", unionId);
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
cnd.and("mu.unionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.groupBy("mu.year");
|
||||||
|
cnd.groupBy("mu.unionId");
|
||||||
|
cnd.groupBy("mu.unionName");
|
||||||
|
cnd.groupBy("mu.unionCode");
|
||||||
|
cnd.groupBy("su.name");
|
||||||
|
cnd.groupBy("su.unionCode");
|
||||||
|
cnd.groupBy("mu.usedQuota");
|
||||||
|
cnd.groupBy("mu.totalQuota");
|
||||||
|
cnd.asc("mu.unionCode");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer getQueryYear(Integer year) {
|
||||||
|
if (year != null) {
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
return DateUtil.thisYear();
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -116,7 +116,7 @@ public class OutlayManageUnionUseDetailController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("查询分工会今年每个季度的分配情况")
|
@ApiOperation("查询分工会今年每个分配项目的分配情况")
|
||||||
@SaCheckPermission("outlay.outlayManage.union.useDetail")
|
@SaCheckPermission("outlay.outlayManage.union.useDetail")
|
||||||
public Result queryQuarterlyList(Integer year, String unionId){
|
public Result queryQuarterlyList(Integer year, String unionId){
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public class OutLayAllocateUnion extends BaseModel implements Serializable {
|
|||||||
private String unionId;
|
private String unionId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("季度")
|
@Comment("分配项目")
|
||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.INT)
|
||||||
private Integer quarterly;
|
private Integer quarterly;
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -6,22 +6,20 @@ import lombok.Data;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分工会季度额度导入行数据。
|
* 分工会分配项目额度导入行数据。
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class OutlayUnionAllocateImportVo {
|
public class OutlayUnionAllocateImportVo {
|
||||||
|
|
||||||
|
@Excel(name = "工会名称")
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
@Excel(name = "工会编码")
|
@Excel(name = "工会编码")
|
||||||
private String unionCode;
|
private String unionCode;
|
||||||
|
|
||||||
@Excel(name = "分配额度")
|
@Excel(name = "分配额度")
|
||||||
private BigDecimal allocateMoney;
|
private BigDecimal allocateMoney;
|
||||||
|
|
||||||
/**
|
|
||||||
* 预览时展示匹配到的工会名称。
|
|
||||||
*/
|
|
||||||
private String unionName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预览时展示当前行错误信息。
|
* 预览时展示当前行错误信息。
|
||||||
*/
|
*/
|
||||||
|
|||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级分工会经费收支使用情况表数据。
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OutlayUnionIncomeExpenseVO {
|
||||||
|
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
private String unionCode;
|
||||||
|
|
||||||
|
private BigDecimal beginMoney;
|
||||||
|
|
||||||
|
private BigDecimal feeJanApr;
|
||||||
|
|
||||||
|
private BigDecimal feeMayAug;
|
||||||
|
|
||||||
|
private BigDecimal feeSepDec;
|
||||||
|
|
||||||
|
private BigDecimal awardMoney;
|
||||||
|
|
||||||
|
private BigDecimal usedMoney;
|
||||||
|
|
||||||
|
private BigDecimal remainMoney;
|
||||||
|
}
|
||||||
+36
-22
@@ -111,8 +111,6 @@ public class UnionReimburseCollectController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.and("info.stateId", "in", List.of(3, 2));
|
|
||||||
|
|
||||||
applyListSort(cnd, pageForm);
|
applyListSort(cnd, pageForm);
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
@@ -185,29 +183,26 @@ public class UnionReimburseCollectController {
|
|||||||
@Ok("void")
|
@Ok("void")
|
||||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
||||||
@ApiOperation("导出报销汇总表")
|
@ApiOperation("导出报销汇总表")
|
||||||
public void onExport(@Param(value = "year") Integer year,
|
public void onExport(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year,
|
||||||
@Param(value = "unionId") String unionId,
|
@Param(value = "unionId") String unionId,
|
||||||
@Param(value = "unitId") String unitId,
|
@Param(value = "unitId") String unitId,
|
||||||
@Param(value = "reimburseProject") String reimburseProject,
|
@Param(value = "reimburseProject") String reimburseProject,
|
||||||
@Param(value = "userName") String userName,
|
@Param(value = "searchKeyword") String searchKeyword,
|
||||||
HttpServletResponse response) {
|
HttpServletResponse response) {
|
||||||
//查询审核通过的数据
|
// 导出复用收集列表筛选口径,保证下载结果与页面当前查询条件一致。
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
t1.*,
|
info.*
|
||||||
ins.state instanceState
|
|
||||||
FROM
|
FROM
|
||||||
union_reimburse t1
|
union_reimburse info
|
||||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = t1.id
|
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, userName, "t1.");
|
Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, searchKeyword, "info.");
|
||||||
// 只查询流程实例状态为20的数据(已完成状态)
|
|
||||||
cnd.and("ins.state", "=", 20);
|
|
||||||
if (!isAdmin()) {
|
if (!isAdmin()) {
|
||||||
cnd.andEX("t1.unionId", "=", SecurityUtil.getUnionId());
|
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
cnd.desc("t1.createTime");
|
applyListSort(cnd, pageForm);
|
||||||
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<UnionReimburseCollectExcelVO> list = unionReimburseService.listVO(sql,UnionReimburseCollectExcelVO.class);
|
List<UnionReimburseCollectExcelVO> list = unionReimburseService.listVO(sql,UnionReimburseCollectExcelVO.class);
|
||||||
@@ -242,11 +237,13 @@ public class UnionReimburseCollectController {
|
|||||||
item.setCreateTime(DateUtil.format(DateUtil.parse(item.getCreateTime()), "yyyy-MM-dd HH:mm:ss"));
|
item.setCreateTime(DateUtil.format(DateUtil.parse(item.getCreateTime()), "yyyy-MM-dd HH:mm:ss"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拼接备注字段(仿照系统代码逻辑,使用activityName和condolenceName字段)
|
item.setStateName(formatStateName(item.getStateId()));
|
||||||
|
|
||||||
|
// 备注字段与页面表格保持一致:慰问显示被慰问人,其他项目显示活动名称。
|
||||||
if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) {
|
if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) {
|
||||||
item.setRemark("活动名称:" + item.getActivityName());
|
item.setRemark("活动名称:" + item.getActivityName());
|
||||||
} else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceName())) {
|
} else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceUserName())) {
|
||||||
item.setRemark("慰问对象:" + item.getCondolenceName());
|
item.setRemark("被慰问人:" + item.getCondolenceUserName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -263,12 +260,12 @@ public class UnionReimburseCollectController {
|
|||||||
* @param unionId 工会ID
|
* @param unionId 工会ID
|
||||||
* @param unitId 单位ID
|
* @param unitId 单位ID
|
||||||
* @param reimburseProject 报销项目
|
* @param reimburseProject 报销项目
|
||||||
* @param userName 经办人姓名
|
* @param searchKeyword 经办人姓名或工号
|
||||||
* @param prefix 表前缀
|
* @param prefix 表前缀
|
||||||
* @return 查询条件
|
* @return 查询条件
|
||||||
*/
|
*/
|
||||||
private Cnd buildCondition(Integer year, String unionId, String unitId,
|
private Cnd buildCondition(Integer year, String unionId, String unitId,
|
||||||
String reimburseProject, String userName, String prefix) {
|
String reimburseProject, String searchKeyword, String prefix) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
// 年度查询条件
|
// 年度查询条件
|
||||||
@@ -281,9 +278,12 @@ public class UnionReimburseCollectController {
|
|||||||
// 报销项目查询条件
|
// 报销项目查询条件
|
||||||
cnd.andEX(prefix + "reimburseProject", "=", reimburseProject);
|
cnd.andEX(prefix + "reimburseProject", "=", reimburseProject);
|
||||||
|
|
||||||
// 经办人姓名查询条件
|
// 经办人姓名或工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and(prefix + "userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike(prefix + "userName", searchKeyword);
|
||||||
|
seg.orLike(prefix + "loginName", searchKeyword);
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cnd;
|
return cnd;
|
||||||
@@ -318,4 +318,18 @@ public class UnionReimburseCollectController {
|
|||||||
default -> null;
|
default -> null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String formatStateName(Integer stateId) {
|
||||||
|
if (stateId == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return switch (stateId) {
|
||||||
|
case 1 -> "待提交";
|
||||||
|
case 2 -> "待审核确认";
|
||||||
|
case 3 -> "报销成功";
|
||||||
|
case 4 -> "拒绝";
|
||||||
|
case 5 -> "退回";
|
||||||
|
default -> String.valueOf(stateId);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -175,6 +175,11 @@ public class UnionReimburse extends BaseModel {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
private String bankOfDeposit;
|
private String bankOfDeposit;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("支付明细")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> paymentDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 慰问
|
* 慰问
|
||||||
*/
|
*/
|
||||||
|
|||||||
+20
-8
@@ -369,13 +369,15 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
|||||||
if (Integer.valueOf(3).equals(dbRecord.getStateId())) {
|
if (Integer.valueOf(3).equals(dbRecord.getStateId())) {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
Result validateResult = validateFundSourceBeforeSubmit(dbRecord);
|
if (!skipBudgetDeduct(dbRecord)) {
|
||||||
if (validateResult != null) {
|
Result validateResult = validateFundSourceBeforeSubmit(dbRecord);
|
||||||
return validateResult;
|
if (validateResult != null) {
|
||||||
}
|
return validateResult;
|
||||||
Result deductResult = deductBudgetAndSaveUseDetail(dbRecord);
|
}
|
||||||
if (deductResult != null && deductResult.getCode() != 0) {
|
Result deductResult = deductBudgetAndSaveUseDetail(dbRecord);
|
||||||
return deductResult;
|
if (deductResult != null && deductResult.getCode() != 0) {
|
||||||
|
return deductResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbRecord.setReviewTime(new Date());
|
dbRecord.setReviewTime(new Date());
|
||||||
@@ -422,7 +424,7 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
|||||||
if (dbRecord == null) {
|
if (dbRecord == null) {
|
||||||
return Result.error("未找到对应的报销记录");
|
return Result.error("未找到对应的报销记录");
|
||||||
}
|
}
|
||||||
if (Integer.valueOf(3).equals(dbRecord.getStateId())) {
|
if (Integer.valueOf(3).equals(dbRecord.getStateId()) && !skipBudgetDeduct(dbRecord)) {
|
||||||
OutlayUseDetail oldDetail = dao().fetch(OutlayUseDetail.class, Cnd.where("outlayReimburseId", "=", dbRecord.getId()));
|
OutlayUseDetail oldDetail = dao().fetch(OutlayUseDetail.class, Cnd.where("outlayReimburseId", "=", dbRecord.getId()));
|
||||||
BigDecimal oldMoney = oldDetail != null && oldDetail.getAdjustMoney() != null
|
BigDecimal oldMoney = oldDetail != null && oldDetail.getAdjustMoney() != null
|
||||||
? oldDetail.getAdjustMoney()
|
? oldDetail.getAdjustMoney()
|
||||||
@@ -652,6 +654,16 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
|||||||
return Result.error("不支持的经费来源");
|
return Result.error("不支持的经费来源");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 慰问和专项活动费用不占用经费预算,审核通过及后续调整实际金额时都不写预算台账。
|
||||||
|
*/
|
||||||
|
private boolean skipBudgetDeduct(UnionReimburse unionReimburse) {
|
||||||
|
return unionReimburse != null && Set.of(
|
||||||
|
"UNION_REIMBURSE_PROJECT_1",
|
||||||
|
"UNION_REIMBURSE_PROJECT_4"
|
||||||
|
).contains(unionReimburse.getReimburseProject());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已通过报销单修改实际金额时,用差额同步预算主表和使用明细,避免重复全量扣减。
|
* 已通过报销单修改实际金额时,用差额同步预算主表和使用明细,避免重复全量扣减。
|
||||||
*/
|
*/
|
||||||
|
|||||||
+10
-3
@@ -22,23 +22,30 @@ public class UnionReimburseCollectExcelVO implements Serializable {
|
|||||||
@Excel(name = "所属单位", width = 20)
|
@Excel(name = "所属单位", width = 20)
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
@Excel(name = "申请时间", width = 30)
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
@Excel(name = "报销项目", width = 20)
|
@Excel(name = "报销项目", width = 20)
|
||||||
private String reimburseProject;
|
private String reimburseProject;
|
||||||
|
|
||||||
@Excel(name = "备注", width = 20)
|
@Excel(name = "备注", width = 20)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Excel(name = "金额", width = 20)
|
@Excel(name = "申请状态", width = 20)
|
||||||
|
private String stateName;
|
||||||
|
|
||||||
private Double money;
|
private Double money;
|
||||||
|
|
||||||
@Excel(name = "申请时间", width = 30)
|
private Integer stateId;
|
||||||
private String createTime;
|
|
||||||
|
|
||||||
private String reimburseFundSource;
|
private String reimburseFundSource;
|
||||||
|
|
||||||
//活动名称
|
//活动名称
|
||||||
private String activityName;
|
private String activityName;
|
||||||
|
|
||||||
|
//被慰问人姓名
|
||||||
|
private String condolenceUserName;
|
||||||
|
|
||||||
//被慰问人
|
//被慰问人
|
||||||
private String condolenceName;
|
private String condolenceName;
|
||||||
|
|
||||||
|
|||||||
+130
-40
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
|
|||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属季度">
|
<search-item label="分配项目">
|
||||||
<dict-select clearable code="OUTLAY_QUARTERLY"
|
<dict-select clearable code="OUTLAY_QUARTERLY"
|
||||||
placeholder="请选择所属季度"
|
placeholder="请选择分配项目"
|
||||||
v-model="pageForm.quarterly"></dict-select>
|
v-model="pageForm.quarterly"></dict-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属工会">
|
<search-item label="所属工会">
|
||||||
@@ -42,10 +42,13 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool label="预算分配">
|
<table-tool label="预算分配">
|
||||||
<el-button @click="showBatchAllocateDialog" size="small" type="primary" :loading="formLoading">一键分配
|
<el-button @click="showBatchAllocateDialog" size="small" type="primary" :loading="formLoading">一键分配
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="doAllocateRecord" size="small" type="primary" :loading="formLoading">季度记录生成
|
<el-button @click="showAwardAllocateDialog" size="small" type="primary" :loading="formLoading">
|
||||||
|
新增评优奖励
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doAllocateRecord" size="small" type="primary" :loading="formLoading">分配记录生成
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button @click="deleteAllocateRecord" size="small" type="danger" :loading="formLoading">重置季度记录
|
<el-button @click="deleteAllocateRecord" size="small" type="danger" :loading="formLoading">重置分配记录
|
||||||
</el-button>
|
</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||||
@@ -118,17 +121,15 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上传文件">
|
<el-form-item label="上传文件">
|
||||||
<el-upload
|
<el-upload
|
||||||
name="file"
|
class="upload-demo"
|
||||||
ref="importUploadRef"
|
ref="importUploadRef"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
action="/platform/outlay/outlayManage/unionAllocate/readImportExcel"
|
action="/platform/outlay/outlayManage/unionAllocate/readImportExcel"
|
||||||
:on-success="onImportSuccess"
|
:on-success="onImportSuccess"
|
||||||
:on-remove="onImportRemove"
|
:on-remove="onImportRemove"
|
||||||
:before-upload="beforeImportUpload"
|
:before-upload="beforeImportUpload"
|
||||||
:file-list="importFileList"
|
:file-list="importFileList">
|
||||||
drag>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<i class="el-icon-upload"></i>
|
|
||||||
<div class="el-upload__text">将Excel文件拖到此处,或<em>点击上传</em></div>
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="导入预览" v-if="batchAllocateForm.importPreviewList.length > 0">
|
<el-form-item label="导入预览" v-if="batchAllocateForm.importPreviewList.length > 0">
|
||||||
@@ -152,6 +153,41 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button type="primary" @click="doBatchAllocate" :loading="formLoading">确 定</el-button>
|
<el-button type="primary" @click="doBatchAllocate" :loading="formLoading">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="新增评优奖励" :visible.sync="awardAllocateDialogVisible" width="520px">
|
||||||
|
<el-form :model="awardAllocateForm" label-width="120px">
|
||||||
|
<el-form-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="选择年度"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="awardAllocateForm.year"
|
||||||
|
:clearable="false"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属工会">
|
||||||
|
<el-select placeholder="请选择所属工会" v-model="awardAllocateForm.unionId"
|
||||||
|
style="width: 100%;"
|
||||||
|
clearable
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in unionList"
|
||||||
|
:label="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="评优奖励金额">
|
||||||
|
<el-input-number v-model="awardAllocateForm.allocateMoney" :min="0" :precision="2"
|
||||||
|
style="width: 100%" placeholder="请输入评优奖励金额">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeAwardAllocateDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="doAddAwardAllocate" :loading="formLoading">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
@@ -170,48 +206,62 @@ layout("/layouts/platform.html"){
|
|||||||
unionList: [],
|
unionList: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'year', label: '年度'},
|
{prop: 'year', label: '年度'},
|
||||||
{prop: 'quarterly', label: '季度'},
|
{prop: 'quarterly', label: '分配项目'},
|
||||||
{prop: 'unionName', label: '工会名称'},
|
{prop: 'unionName', label: '工会名称'},
|
||||||
{prop: 'allocateHeadMoney', label: '分配前额度'},
|
{prop: 'allocateHeadMoney', label: '分配前额度'},
|
||||||
{prop: 'allocateMoney', label: '分配额度'},
|
{prop: 'allocateMoney', label: '分配额度'},
|
||||||
],
|
],
|
||||||
quarterlyList: [],
|
periodList: [],
|
||||||
batchAllocateDialogVisible: false,
|
batchAllocateDialogVisible: false,
|
||||||
batchAllocateForm: {
|
batchAllocateForm: {
|
||||||
allocateMode: "uniform",
|
allocateMode: "uniform",
|
||||||
allocateMoney: 0,
|
allocateMoney: 0,
|
||||||
importPreviewList: []
|
importPreviewList: []
|
||||||
},
|
},
|
||||||
importFileList: []
|
importFileList: [],
|
||||||
|
awardAllocateDialogVisible: false,
|
||||||
|
awardAllocateForm: {
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
unionId: "",
|
||||||
|
allocateMoney: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 确认提示文案优先展示页面当前筛选季度。
|
* 确认提示文案优先展示页面当前筛选的分配项目名称。
|
||||||
* 未选择季度时再回退到系统当前自然季度,避免提示文案与用户当前查看条件不一致。
|
* 未选择分配项目时再回退到当前会费项目,避免提示文案与用户当前查看条件不一致。
|
||||||
*/
|
*/
|
||||||
getPromptQuarter() {
|
getPromptProjectName() {
|
||||||
return this.pageForm.quarterly || this.$moment().quarter()
|
return this.getProjectName(this.pageForm.quarterly || this.getCurrentFeeProject())
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 季度记录生成、重置记录都要按页面当前筛选的年度和季度执行。
|
* 分配记录生成、重置记录都要按页面当前筛选的年度和分配项目执行。
|
||||||
* 这里统一封装请求参数,避免前后端再次出现“提示季度”和“实际执行季度”不一致的问题。
|
* quarterly 参数承载 OUTLAY_QUARTERLY 字典编码,例如 1-4月会费、5-8月会费、9-12月会费、评优奖励。
|
||||||
*/
|
*/
|
||||||
getCurrentQuarterParams() {
|
getCurrentProjectParams() {
|
||||||
return {
|
return {
|
||||||
quarterly: this.pageForm.quarterly || this.$moment().quarter(),
|
quarterly: this.pageForm.quarterly || this.getCurrentFeeProject(),
|
||||||
year: this.pageForm.year
|
year: this.pageForm.year
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生成、重置、一键分配都只允许操作当前自然季度。
|
* 生成、重置、一键分配都只允许操作当前会费项目。
|
||||||
* 这里统一做前端入口校验,避免同类判断分散在多个按钮方法里难维护。
|
* 当前会费项目按月份划分:1-4月会费、5-8月会费、9-12月会费。
|
||||||
*/
|
*/
|
||||||
validateCurrentQuarterAction(actionName) {
|
getCurrentFeeProject() {
|
||||||
const currentQuarter = this.$moment().quarter()
|
return Math.floor(this.$moment().month() / 4) + 1
|
||||||
const selectedQuarter = Number(this.getCurrentQuarterParams().quarterly)
|
},
|
||||||
if (selectedQuarter !== currentQuarter) {
|
getProjectName(code) {
|
||||||
this.$message.warning('当前仅允许操作第' + currentQuarter + '季度' + actionName + ',请切换后再操作')
|
const options = this.dict.type.OUTLAY_QUARTERLY || []
|
||||||
|
const project = options.find((item) => String(item.code || item.value || item.dictValue) === String(code))
|
||||||
|
return project ? (project.label || project.name || project.dictLabel || code) : code
|
||||||
|
},
|
||||||
|
validateCurrentProjectAction(actionName) {
|
||||||
|
const currentProject = this.getCurrentFeeProject()
|
||||||
|
const selectedProject = Number(this.getCurrentProjectParams().quarterly)
|
||||||
|
if (selectedProject !== currentProject) {
|
||||||
|
this.$message.warning('当前仅允许操作【' + this.getProjectName(currentProject) + '】' + actionName + ',请切换后再操作')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@@ -237,7 +287,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteAllocateRecord() {
|
deleteAllocateRecord() {
|
||||||
if (!this.validateCurrentQuarterAction('记录重置')) {
|
if (!this.validateCurrentProjectAction('记录重置')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 重置动作以当前列表是否已有记录为前置条件,避免用户在空列表场景下误操作。
|
// 重置动作以当前列表是否已有记录为前置条件,避免用户在空列表场景下误操作。
|
||||||
@@ -245,13 +295,13 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.warning('当前列表无可重置记录')
|
this.$message.warning('当前列表无可重置记录')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$confirm('确定要重置【第' + this.getPromptQuarter() + '季度】的预算记录吗?', '提示', {
|
this.$confirm('确定要重置【' + this.getPromptProjectName() + '】的预算记录吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.formLoading = true
|
this.formLoading = true
|
||||||
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/deleteAllocateRecord", this.getCurrentQuarterParams()).then((resp) => {
|
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/deleteAllocateRecord", this.getCurrentProjectParams()).then((resp) => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
@@ -262,16 +312,16 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
doAllocateRecord() {
|
doAllocateRecord() {
|
||||||
if (!this.validateCurrentQuarterAction('记录生成')) {
|
if (!this.validateCurrentProjectAction('记录生成')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$confirm('确定要生成【第' + this.getPromptQuarter() + '季度】的预算记录吗?', '提示', {
|
this.$confirm('确定要生成【' + this.getPromptProjectName() + '】的预算记录吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.formLoading = true
|
this.formLoading = true
|
||||||
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAllocateRecord", this.getCurrentQuarterParams()).then((resp) => {
|
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAllocateRecord", this.getCurrentProjectParams()).then((resp) => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
@@ -282,14 +332,14 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
showBatchAllocateDialog() {
|
showBatchAllocateDialog() {
|
||||||
if (!this.validateCurrentQuarterAction('一键分配')) {
|
if (!this.validateCurrentProjectAction('一键分配')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
this.$message.warning('当前没有可分配的工会记录,请先生成季度记录')
|
this.$message.warning('当前没有可分配的工会记录,请先生成分配记录')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const currentParams = this.getCurrentQuarterParams()
|
const currentParams = this.getCurrentProjectParams()
|
||||||
const openDialog = () => {
|
const openDialog = () => {
|
||||||
this.resetBatchAllocateForm()
|
this.resetBatchAllocateForm()
|
||||||
this.batchAllocateDialogVisible = true
|
this.batchAllocateDialogVisible = true
|
||||||
@@ -302,7 +352,7 @@ layout("/layouts/platform.html"){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.$confirm('温馨提示:当前季度已分配过额度,再次分配将覆盖本季度原有分配结果,是否继续?', '温馨提示', {
|
this.$confirm('温馨提示:当前分配项目已分配过额度,再次分配将覆盖本项目原有分配结果,是否继续?', '温馨提示', {
|
||||||
confirmButtonText: '继续',
|
confirmButtonText: '继续',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -323,6 +373,46 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
this.importFileList = []
|
this.importFileList = []
|
||||||
},
|
},
|
||||||
|
showAwardAllocateDialog() {
|
||||||
|
this.$set(this.awardAllocateForm, "year", this.pageForm.year)
|
||||||
|
this.$set(this.awardAllocateForm, "unionId", this.pageForm.unionId || "")
|
||||||
|
this.$set(this.awardAllocateForm, "allocateMoney", 0)
|
||||||
|
this.$set(this, "awardAllocateDialogVisible", true)
|
||||||
|
},
|
||||||
|
closeAwardAllocateDialog() {
|
||||||
|
this.$set(this, "awardAllocateDialogVisible", false)
|
||||||
|
},
|
||||||
|
doAddAwardAllocate() {
|
||||||
|
if (!this.awardAllocateForm.year) {
|
||||||
|
this.$message.warning("请选择年度")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.awardAllocateForm.unionId) {
|
||||||
|
this.$message.warning("请选择所属工会")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.awardAllocateForm.allocateMoney || this.awardAllocateForm.allocateMoney <= 0) {
|
||||||
|
this.$message.warning("请输入有效的评优奖励金额")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.formLoading = true
|
||||||
|
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAddAwardAllocate", {
|
||||||
|
year: this.awardAllocateForm.year,
|
||||||
|
unionId: this.awardAllocateForm.unionId,
|
||||||
|
allocateMoney: this.awardAllocateForm.allocateMoney
|
||||||
|
}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.closeAwardAllocateDialog()
|
||||||
|
this.$set(this.pageForm, "year", this.awardAllocateForm.year)
|
||||||
|
this.$set(this.pageForm, "quarterly", "4")
|
||||||
|
this.$set(this.pageForm, "unionId", this.awardAllocateForm.unionId)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.formLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
downloadImportTemplate() {
|
downloadImportTemplate() {
|
||||||
this.$downLoad("/platform/outlay/outlayManage/unionAllocate/downloadImportTemplate")
|
this.$downLoad("/platform/outlay/outlayManage/unionAllocate/downloadImportTemplate")
|
||||||
},
|
},
|
||||||
@@ -349,7 +439,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.batchAllocateForm, "importPreviewList", [])
|
this.$set(this.batchAllocateForm, "importPreviewList", [])
|
||||||
},
|
},
|
||||||
doBatchAllocate() {
|
doBatchAllocate() {
|
||||||
const currentParams = this.getCurrentQuarterParams()
|
const currentParams = this.getCurrentProjectParams()
|
||||||
if (this.batchAllocateForm.allocateMode === "uniform") {
|
if (this.batchAllocateForm.allocateMode === "uniform") {
|
||||||
if (!this.batchAllocateForm.allocateMoney || this.batchAllocateForm.allocateMoney <= 0) {
|
if (!this.batchAllocateForm.allocateMoney || this.batchAllocateForm.allocateMoney <= 0) {
|
||||||
this.$message.warning('请输入有效的分配额度')
|
this.$message.warning('请输入有效的分配额度')
|
||||||
@@ -401,8 +491,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.unionList = data
|
this.unionList = data
|
||||||
})
|
})
|
||||||
this.$businessTool.getDictOptions("OUTLAY_QUARTERLY").then((data) => {
|
this.$businessTool.getDictOptions("OUTLAY_QUARTERLY").then((data) => {
|
||||||
let quarter = this.$moment().quarter();
|
let project = this.getCurrentFeeProject();
|
||||||
this.$set(this.pageForm, "quarterly", data[quarter - 1].code)
|
this.$set(this.pageForm, "quarterly", data[project - 1].code)
|
||||||
this.pageData()
|
this.pageData()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+163
@@ -0,0 +1,163 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="platform" id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年度"
|
||||||
|
style="width: 100%" type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
:clearable="false"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||||
|
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
|
||||||
|
style="width: 100%;"
|
||||||
|
clearable
|
||||||
|
@change="doSearch"
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in unions"
|
||||||
|
:label="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool label="经费收支使用情况表">
|
||||||
|
<el-button size="mini" type="primary" @click="doExport">导出</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" style="width: 100%" row-key="unionId"
|
||||||
|
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
||||||
|
border>
|
||||||
|
<el-table-column
|
||||||
|
show-overflow-tooltip
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="单位"
|
||||||
|
prop="unionName"
|
||||||
|
min-width="140"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="年初数"
|
||||||
|
prop="beginMoney"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.beginMoney)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" :label="pageForm.year + '年会费收入'">
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="1-4月会费"
|
||||||
|
prop="feeJanApr"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.feeJanApr)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="5-8月会费"
|
||||||
|
prop="feeMayAug"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.feeMayAug)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="9-12月会费"
|
||||||
|
prop="feeSepDec"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.feeSepDec)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="评优奖励"
|
||||||
|
prop="awardMoney"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.awardMoney)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="1-12月支出"
|
||||||
|
prop="usedMoney"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.usedMoney)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="经费余额"
|
||||||
|
prop="remainMoney"
|
||||||
|
min-width="120">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{formatMoney(row.remainMoney)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
unionId: ""
|
||||||
|
},
|
||||||
|
unions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
formatMoney(value) {
|
||||||
|
return Number(value || 0).toFixed(2)
|
||||||
|
},
|
||||||
|
doExport() {
|
||||||
|
const unionId = this.pageForm.unionId || ""
|
||||||
|
window.open(loc() + "/doExport?year=" + this.pageForm.year + "&unionId=" + unionId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$businessTool.listUnion().then((data) => {
|
||||||
|
this.unions = data
|
||||||
|
})
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+2
-2
@@ -4,10 +4,10 @@ let OUTLAY_MANAGE_UNION_QUARTERLY_ALLOCATE = {
|
|||||||
`
|
`
|
||||||
<div>
|
<div>
|
||||||
<template>
|
<template>
|
||||||
<table-tool label="季度分配记录"></table-tool>
|
<table-tool label="分配记录"></table-tool>
|
||||||
<el-table :data="tableData" style="width: 100%" row-key="id" class="vi-table">
|
<el-table :data="tableData" style="width: 100%" row-key="id" class="vi-table">
|
||||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||||
<el-table-column label="季度" prop="quarterly">
|
<el-table-column label="分配项目" prop="quarterly">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
<dict-tag :options="dict.type.OUTLAY_QUARTERLY"
|
<dict-tag :options="dict.type.OUTLAY_QUARTERLY"
|
||||||
:value="row.quarterly"></dict-tag>
|
:value="row.quarterly"></dict-tag>
|
||||||
|
|||||||
+767
-473
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<table-tool label="申请列表">
|
<table-tool label="申请列表">
|
||||||
<el-button type="primary" size="small" @click="exportSkr">导出收款人名册</el-button>
|
<el-button type="primary" size="small" @click="exportSkr">导出收款人名册</el-button>
|
||||||
<!-- <el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>-->
|
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出表格</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
@@ -89,7 +89,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column label="操作" fixed="right" width="350px">
|
<el-table-column label="操作" fixed="right" width="350px">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="isAdmin" @click="openEdit(row)" size="mini" type="primary">实际金额</el-button>
|
<el-button v-if="isAdmin && row.stateId == 3" @click="openEdit(row)" size="mini" type="primary">实际金额</el-button>
|
||||||
<el-button v-if="row.stateId == 3" @click="doPrint(row)" size="mini" type="primary">打印</el-button>
|
<el-button v-if="row.stateId == 3" @click="doPrint(row)" size="mini" type="primary">打印</el-button>
|
||||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,25 +8,19 @@ const unionReimburseInfo = {
|
|||||||
|
|
||||||
<el-tabs v-model="activeTabName" style="margin-top: 10px;">
|
<el-tabs v-model="activeTabName" style="margin-top: 10px;">
|
||||||
<el-tab-pane label="申请基本信息" name="basic">
|
<el-tab-pane label="申请基本信息" name="basic">
|
||||||
<el-descriptions :column="2" border class="flow-task-form">
|
<el-descriptions :column="3" border class="flow-task-form">
|
||||||
<el-descriptions-item label="经费来源" :span="2">
|
<el-descriptions-item label="经费来源" :span="3">
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
||||||
:value="viewData.reimburseFundSource">
|
:value="viewData.reimburseFundSource">
|
||||||
</dict-tag>
|
</dict-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="报销项目" :span="2">
|
<el-descriptions-item label="报销项目" :span="3">
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||||
:value="viewData.reimburseProject">
|
:value="viewData.reimburseProject">
|
||||||
</dict-tag>
|
</dict-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="支付方式">
|
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
|
|
||||||
:value="viewData.paymentWay">
|
|
||||||
</dict-tag>
|
|
||||||
</el-descriptions-item>
|
|
||||||
|
|
||||||
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="经办人">{{viewData.userName}}</el-descriptions-item>
|
<el-descriptions-item label="经办人">{{viewData.userName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
||||||
@@ -44,20 +38,45 @@ const unionReimburseInfo = {
|
|||||||
<span>{{ viewData.mobile }}</span>
|
<span>{{ viewData.mobile }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="付款人" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
<el-descriptions-item label="支付信息" :span="3">
|
||||||
<span>{{ viewData.payerName }}</span>
|
<el-table :data="paymentInfoRows" border empty-text="暂无支付信息" style="width: 100%">
|
||||||
</el-descriptions-item>
|
<el-table-column label="支付方式" min-width="140">
|
||||||
|
<template slot-scope="scope">
|
||||||
<el-descriptions-item label="户名" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
|
||||||
<span>{{ viewData.bankUserName }}</span>
|
:value="scope.row.paymentWay">
|
||||||
</el-descriptions-item>
|
</dict-tag>
|
||||||
|
</template>
|
||||||
<el-descriptions-item label="开户行" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
</el-table-column>
|
||||||
<span>{{ viewData.bankOfDeposit }}</span>
|
<el-table-column label="金额" min-width="120">
|
||||||
</el-descriptions-item>
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatMoney(scope.row.money) }}</span>
|
||||||
<el-descriptions-item label="银行卡号" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
</template>
|
||||||
<span>{{ viewData.bankCardNumber }}</span>
|
</el-table-column>
|
||||||
|
<el-table-column label="付款人" min-width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">{{ scope.row.payerName }}</span>
|
||||||
|
<span v-else>无需填写</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="户名" min-width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">{{ scope.row.bankUserName }}</span>
|
||||||
|
<span v-else>无需填写</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开户行" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">{{ scope.row.bankOfDeposit }}</span>
|
||||||
|
<span v-else>无需填写</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="银行卡号" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">{{ scope.row.bankCardNumber }}</span>
|
||||||
|
<span v-else>无需填写</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
<el-descriptions-item label="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
@@ -159,20 +178,20 @@ const unionReimburseInfo = {
|
|||||||
<span>{{ viewData.condolenceRelationship }}</span>
|
<span>{{ viewData.condolenceRelationship }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="参加随行人员" :span="2"
|
<el-descriptions-item label="参加随行人员" :span="3"
|
||||||
v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
<span>{{ viewData.participants }}</span>
|
<span>{{ viewData.participants }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="报销事由" :span="2" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
<el-descriptions-item label="报销事由" :span="3" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
<span>{{ viewData.paymentNotes }}</span>
|
<span>{{ viewData.paymentNotes }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="备注" :span="2" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
<el-descriptions-item label="备注" :span="3" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
<span>{{ viewData.notes }}</span>
|
<span>{{ viewData.notes }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="附件" :span="2">
|
<el-descriptions-item label="附件" :span="3">
|
||||||
<file-preview v-if="viewData.files && viewData.files.length > 0"
|
<file-preview v-if="viewData.files && viewData.files.length > 0"
|
||||||
:files="viewData.files"
|
:files="viewData.files"
|
||||||
complete_result></file-preview>
|
complete_result></file-preview>
|
||||||
@@ -285,7 +304,8 @@ const unionReimburseInfo = {
|
|||||||
visible: false,
|
visible: false,
|
||||||
viewData: {
|
viewData: {
|
||||||
files: [],
|
files: [],
|
||||||
invoiceDetails: []
|
invoiceDetails: [],
|
||||||
|
paymentDetails: []
|
||||||
},
|
},
|
||||||
typeName: '',
|
typeName: '',
|
||||||
row: null
|
row: null
|
||||||
@@ -294,6 +314,9 @@ const unionReimburseInfo = {
|
|||||||
computed: {
|
computed: {
|
||||||
showInvoiceTab() {
|
showInvoiceTab() {
|
||||||
return !!this.viewData.reimburseProject
|
return !!this.viewData.reimburseProject
|
||||||
|
},
|
||||||
|
paymentInfoRows() {
|
||||||
|
return this.viewData.paymentDetails || []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -317,7 +340,8 @@ const unionReimburseInfo = {
|
|||||||
buildViewData(data) {
|
buildViewData(data) {
|
||||||
const viewData = Object.assign({
|
const viewData = Object.assign({
|
||||||
files: [],
|
files: [],
|
||||||
invoiceDetails: []
|
invoiceDetails: [],
|
||||||
|
paymentDetails: []
|
||||||
}, data || {})
|
}, data || {})
|
||||||
if (!Array.isArray(viewData.files)) {
|
if (!Array.isArray(viewData.files)) {
|
||||||
viewData.files = []
|
viewData.files = []
|
||||||
@@ -325,8 +349,32 @@ const unionReimburseInfo = {
|
|||||||
if (!Array.isArray(viewData.invoiceDetails)) {
|
if (!Array.isArray(viewData.invoiceDetails)) {
|
||||||
viewData.invoiceDetails = []
|
viewData.invoiceDetails = []
|
||||||
}
|
}
|
||||||
|
const hasLegacyPayment = viewData.paymentWay || viewData.payer || viewData.bankUserName || viewData.bankCardNumber || viewData.bankOfDeposit
|
||||||
|
if (Array.isArray(viewData.paymentDetails) && viewData.paymentDetails.length > 0) {
|
||||||
|
viewData.paymentDetails = viewData.paymentDetails.map(item => this.buildPaymentDetail(item))
|
||||||
|
} else {
|
||||||
|
viewData.paymentDetails = hasLegacyPayment ? [this.buildPaymentDetail({
|
||||||
|
paymentWay: viewData.paymentWay,
|
||||||
|
money: viewData.money,
|
||||||
|
payerName: viewData.payerName,
|
||||||
|
bankUserName: viewData.bankUserName,
|
||||||
|
bankOfDeposit: viewData.bankOfDeposit,
|
||||||
|
bankCardNumber: viewData.bankCardNumber
|
||||||
|
})] : []
|
||||||
|
}
|
||||||
return viewData
|
return viewData
|
||||||
},
|
},
|
||||||
|
buildPaymentDetail(detail) {
|
||||||
|
const currentDetail = detail || {}
|
||||||
|
return {
|
||||||
|
paymentWay: currentDetail.paymentWay || "",
|
||||||
|
money: currentDetail.money || "",
|
||||||
|
payerName: currentDetail.payerName || "",
|
||||||
|
bankUserName: currentDetail.bankUserName || "",
|
||||||
|
bankOfDeposit: currentDetail.bankOfDeposit || "",
|
||||||
|
bankCardNumber: currentDetail.bankCardNumber || ""
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查看页金额统一保留两位小数,和申请页展示口径保持一致。
|
// 查看页金额统一保留两位小数,和申请页展示口径保持一致。
|
||||||
formatMoney(value) {
|
formatMoney(value) {
|
||||||
if (value === null || value === undefined || value === "") {
|
if (value === null || value === undefined || value === "") {
|
||||||
|
|||||||
+734
-115
File diff suppressed because it is too large
Load Diff
@@ -2,118 +2,263 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
template:
|
template:
|
||||||
/*language=HTML*/
|
/*language=HTML*/
|
||||||
`
|
`
|
||||||
<van-action-sheet v-model="visible" title="查看详情">
|
<van-action-sheet v-model="visible" class="union-reimburse-info-sheet">
|
||||||
|
<div class="union-info-header">
|
||||||
|
<div class="union-info-header-title">查看详情</div>
|
||||||
|
<div class="union-info-close" @click="onClose">
|
||||||
|
<van-icon name="cross"></van-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="detail-container">
|
<div class="detail-container">
|
||||||
<van-cell-group title="报销申请">
|
<div class="union-info-scroll">
|
||||||
<van-cell title="工号">{{ viewData.loginName }}</van-cell>
|
<div class="union-info-section">
|
||||||
<van-cell title="经办人">{{ viewData.userName }}</van-cell>
|
<div class="union-info-section-title">报销申请</div>
|
||||||
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="经费来源">
|
<div class="union-info-label">工号</div>
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
<div class="union-info-value">{{ viewData.loginName }}</div>
|
||||||
:value="viewData.reimburseFundSource">
|
</div>
|
||||||
</dict-tag>
|
<div class="union-info-row">
|
||||||
</van-cell>
|
<div class="union-info-label">经办人</div>
|
||||||
<van-cell title="报销项目">
|
<div class="union-info-value union-info-link">{{ viewData.userName }}</div>
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
</div>
|
||||||
:value="viewData.reimburseProject">
|
<div class="union-info-row">
|
||||||
</dict-tag>
|
<div class="union-info-label">联系方式</div>
|
||||||
</van-cell>
|
<div class="union-info-value">{{ viewData.mobile }}</div>
|
||||||
<van-cell title="支付方式">
|
</div>
|
||||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
|
<div class="union-info-row">
|
||||||
:value="viewData.paymentWay">
|
<div class="union-info-label">经费来源</div>
|
||||||
</dict-tag>
|
<div class="union-info-value">
|
||||||
</van-cell>
|
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE" :value="viewData.reimburseFundSource"></dict-tag>
|
||||||
<van-cell title="所属协会" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
|
</div>
|
||||||
{{ viewData.clubName }}
|
</div>
|
||||||
</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="余额" v-if="viewData.reimburseFundSource">{{ formatMoney(viewData.fundBalance) }}</van-cell>
|
<div class="union-info-label">报销项目</div>
|
||||||
|
<div class="union-info-value">
|
||||||
|
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT" :value="viewData.reimburseProject"></dict-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
|
||||||
|
<div class="union-info-label">所属协会</div>
|
||||||
|
<div class="union-info-value">{{ viewData.clubName }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="viewData.reimburseFundSource">
|
||||||
|
<div class="union-info-label">余额</div>
|
||||||
|
<div class="union-info-value">{{ formatMoney(viewData.fundBalance) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
<div class="union-info-section">
|
||||||
<van-cell title="付款人">{{ viewData.payerName }}</van-cell>
|
<div class="union-info-section-title">支付信息</div>
|
||||||
<van-cell title="户名">{{ viewData.bankUserName }}</van-cell>
|
<template v-if="paymentInfoRows.length">
|
||||||
<van-cell title="开户行">{{ viewData.bankOfDeposit }}</van-cell>
|
<div class="union-payment-tabs">
|
||||||
<van-cell title="银行卡号">{{ viewData.bankCardNumber }}</van-cell>
|
<div class="union-payment-tab"
|
||||||
</template>
|
:class="{active: index === currentPaymentIndex}"
|
||||||
|
v-for="(item, index) in paymentInfoRows"
|
||||||
|
:key="index"
|
||||||
|
@click="swipeToPayment(index)">支付信息{{ index + 1 }}</div>
|
||||||
|
</div>
|
||||||
|
<van-swipe ref="paymentInfoSwipe" :loop="false" :show-indicators="false" @change="handlePaymentSwipeChange">
|
||||||
|
<van-swipe-item v-for="(item, index) in paymentInfoRows" :key="index">
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">支付方式</div>
|
||||||
|
<div class="union-info-value">{{ getPaymentWayText(item.paymentWay) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">金额</div>
|
||||||
|
<div class="union-info-value">{{ formatMoney(item.money) }}</div>
|
||||||
|
</div>
|
||||||
|
<template v-if="item.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">付款人</div>
|
||||||
|
<div class="union-info-value">{{ item.payerName }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">户名</div>
|
||||||
|
<div class="union-info-value">{{ item.bankUserName }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">开户行</div>
|
||||||
|
<div class="union-info-value">{{ item.bankOfDeposit }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">银行卡号</div>
|
||||||
|
<div class="union-info-value">{{ item.bankCardNumber }}</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-swipe-item>
|
||||||
|
</van-swipe>
|
||||||
|
</template>
|
||||||
|
<div class="union-empty-text" v-else>暂无支付信息</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
<div class="union-info-section" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
<van-cell title="慰问对象">{{ viewData.condolenceUserName }}</van-cell>
|
<div class="union-info-section-title">慰问信息</div>
|
||||||
<van-cell title="性别">{{ viewData.condolenceSex }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="生日">{{ formatDateText(viewData.condolenceBirthday) }}</van-cell>
|
<div class="union-info-label">慰问对象</div>
|
||||||
<van-cell title="身份证号">{{ viewData.condolenceIdCard }}</van-cell>
|
<div class="union-info-value">{{ viewData.condolenceUserName }}</div>
|
||||||
<van-cell title="联系方式">{{ viewData.condolenceMobile }}</van-cell>
|
</div>
|
||||||
<van-cell title="慰问类型">{{ viewData.typeName || viewData.condolenceTypeName }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="慰问方式">{{ viewData.way }}</van-cell>
|
<div class="union-info-label">性别</div>
|
||||||
<van-cell title="慰问金额">{{ formatMoney(viewData.condolenceMoney) }}</van-cell>
|
<div class="union-info-value">{{ viewData.condolenceSex }}</div>
|
||||||
<van-cell title="慰问时间">{{ formatDateText(viewData.condolenceTime) }}</van-cell>
|
</div>
|
||||||
<van-cell title="结婚时间" v-if="isCondolenceType('cf4ce7af322d464f8f86d818fcc00203')">
|
<div class="union-info-row">
|
||||||
{{ formatDateText(viewData.marryTime) }}
|
<div class="union-info-label">生日</div>
|
||||||
</van-cell>
|
<div class="union-info-value">{{ formatDateText(viewData.condolenceBirthday) }}</div>
|
||||||
<van-cell title="生育时间" v-if="isCondolenceType('c90cb10dce6542e99ae271bee6fe8cc0')">
|
</div>
|
||||||
{{ formatDateText(viewData.fertilityTime) }}
|
<div class="union-info-row">
|
||||||
</van-cell>
|
<div class="union-info-label">身份证号</div>
|
||||||
|
<div class="union-info-value">{{ viewData.condolenceIdCard }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">联系方式</div>
|
||||||
|
<div class="union-info-value">{{ viewData.condolenceMobile }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">慰问类型</div>
|
||||||
|
<div class="union-info-value">{{ viewData.typeName || viewData.condolenceTypeName }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">慰问方式</div>
|
||||||
|
<div class="union-info-value">{{ viewData.way }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">慰问金额</div>
|
||||||
|
<div class="union-info-value">{{ formatMoney(viewData.condolenceMoney) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">慰问时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.condolenceTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="isCondolenceType('cf4ce7af322d464f8f86d818fcc00203')">
|
||||||
|
<div class="union-info-label">结婚时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.marryTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="isCondolenceType('c90cb10dce6542e99ae271bee6fe8cc0')">
|
||||||
|
<div class="union-info-label">生育时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.fertilityTime) }}</div>
|
||||||
|
</div>
|
||||||
<template v-if="isCondolenceType('4e316737e71047e0b01aea78524c1416')">
|
<template v-if="isCondolenceType('4e316737e71047e0b01aea78524c1416')">
|
||||||
<van-cell title="住院病由">{{ viewData.hospitalCausation }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="住院开始时间">{{ formatDateText(viewData.hospitalizationStartTime) }}</van-cell>
|
<div class="union-info-label">住院病由</div>
|
||||||
<van-cell title="住院结束时间">{{ formatDateText(viewData.hospitalizationEndTime) }}</van-cell>
|
<div class="union-info-value">{{ viewData.hospitalCausation }}</div>
|
||||||
<van-cell title="入住医院">{{ viewData.hospital }}</van-cell>
|
</div>
|
||||||
<van-cell title="当年次数">{{ viewData.hospitalCount }}</van-cell>
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">住院开始时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.hospitalizationStartTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">住院结束时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.hospitalizationEndTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">入住医院</div>
|
||||||
|
<div class="union-info-value">{{ viewData.hospital }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">当年次数</div>
|
||||||
|
<div class="union-info-value">{{ viewData.hospitalCount }}</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="isCondolenceType('60f03a87b62b4823855814afdbf5672a')">
|
<template v-if="isCondolenceType('60f03a87b62b4823855814afdbf5672a')">
|
||||||
<van-cell title="去逝时间">{{ formatDateText(viewData.deathTime) }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="与被慰问人关系">{{ viewData.condolenceRelationship }}</van-cell>
|
<div class="union-info-label">去逝时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.deathTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">与被慰问人关系</div>
|
||||||
|
<div class="union-info-value">{{ viewData.condolenceRelationship }}</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<van-cell title="参加随行人员">
|
<div class="union-info-row">
|
||||||
<div style="white-space: pre-line">{{ viewData.participants }}</div>
|
<div class="union-info-label">参加随行人员</div>
|
||||||
</van-cell>
|
<div class="union-info-value">{{ viewData.participants }}</div>
|
||||||
<van-cell title="报销事由">
|
</div>
|
||||||
<div style="white-space: pre-line">{{ viewData.paymentNotes }}</div>
|
<div class="union-info-row">
|
||||||
</van-cell>
|
<div class="union-info-label">报销事由</div>
|
||||||
<van-cell title="备注">
|
<div class="union-info-value">{{ viewData.paymentNotes }}</div>
|
||||||
<div style="white-space: pre-line">{{ viewData.notes }}</div>
|
</div>
|
||||||
</van-cell>
|
<div class="union-info-row">
|
||||||
</template>
|
<div class="union-info-label">备注</div>
|
||||||
|
<div class="union-info-value">{{ viewData.notes }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template v-if="viewData.reimburseProject && viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
<div class="union-info-section" v-if="viewData.reimburseProject && viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||||
<van-cell title="活动名称">{{ viewData.activityName }}</van-cell>
|
<div class="union-info-section-title">活动信息</div>
|
||||||
<van-cell title="活动人数">{{ viewData.activityNumber }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="活动地点">{{ viewData.activityPlace }}</van-cell>
|
<div class="union-info-label">活动名称</div>
|
||||||
<van-cell title="活动时间">{{ formatDateText(viewData.activityTime) }}</van-cell>
|
<div class="union-info-value union-info-link">{{ viewData.activityName }}</div>
|
||||||
<van-cell title="支付内容">
|
</div>
|
||||||
<div style="white-space: pre-line">{{ viewData.paymentNotes }}</div>
|
<div class="union-info-row">
|
||||||
</van-cell>
|
<div class="union-info-label">活动人数</div>
|
||||||
</template>
|
<div class="union-info-value">{{ viewData.activityNumber }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">活动地点</div>
|
||||||
|
<div class="union-info-value">{{ viewData.activityPlace }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">活动时间</div>
|
||||||
|
<div class="union-info-value">{{ formatDateText(viewData.activityTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">支付内容</div>
|
||||||
|
<div class="union-info-value">{{ viewData.paymentNotes }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<van-cell title="附件">
|
<div class="union-info-section">
|
||||||
<template #label>
|
<div class="union-info-section-title">附件</div>
|
||||||
<file-preview :files="viewData.files" complete_result
|
<div class="union-file-preview" v-if="viewData.files && viewData.files.length > 0">
|
||||||
v-if="viewData.files && viewData.files.length > 0"></file-preview>
|
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||||
<span v-else>暂无附件</span>
|
</div>
|
||||||
</template>
|
<div class="union-empty-text" v-else>暂无附件</div>
|
||||||
</van-cell>
|
</div>
|
||||||
</van-cell-group>
|
|
||||||
|
|
||||||
<van-cell-group title="电子发票" v-if="viewData.reimburseProject">
|
<div class="union-info-section" v-if="viewData.reimburseProject">
|
||||||
<van-cell title="报销金额">{{ formatMoney(viewData.money) }}</van-cell>
|
<div class="union-info-section-title">电子发票</div>
|
||||||
<van-cell title="发票张数">{{ viewData.invoiceNumber }}</van-cell>
|
<div class="union-info-row">
|
||||||
<van-cell title="发票明细列表">
|
<div class="union-info-label">报销金额</div>
|
||||||
<template #label>
|
<div class="union-info-value">{{ formatMoney(viewData.money) }}</div>
|
||||||
<template v-if="viewData.invoiceDetails && viewData.invoiceDetails.length > 0">
|
</div>
|
||||||
<div style="margin-top: 8px; padding: 10px 12px; border: 1px solid #ebedf0; border-radius: 6px; background: #fafafa;" v-for="(item, index) in viewData.invoiceDetails" :key="index">
|
<div class="union-info-row">
|
||||||
<div style="margin-top: 4px; color: #323233;">第{{ index + 1 }}张发票</div>
|
<div class="union-info-label">发票张数</div>
|
||||||
<div style="margin-top: 4px;">发票号码:{{ item.invoiceNo || '未填写' }}</div>
|
<div class="union-info-value">{{ viewData.invoiceNumber }}</div>
|
||||||
<div style="margin-top: 4px;">发票金额:{{ formatMoney(item.invoiceAmount) }}</div>
|
</div>
|
||||||
<div style="margin-top: 4px;">销售方信息名称:{{ item.sellerName || '未填写' }}</div>
|
<div class="union-invoice-subtitle">发票明细表</div>
|
||||||
<div style="margin-top: 4px;">项目名称:{{ item.itemName || '未填写' }}</div>
|
<div class="union-invoice-card-list" v-if="viewData.invoiceDetails && viewData.invoiceDetails.length > 0">
|
||||||
<div style="margin-top: 4px;" v-if="item.remark">备注:{{ item.remark }}</div>
|
<div class="union-invoice-card" v-for="(item, index) in viewData.invoiceDetails" :key="index">
|
||||||
<file-preview :files="item.invoiceFiles" complete_result
|
<div class="union-invoice-card-title">第{{ index + 1 }}张发票</div>
|
||||||
v-if="item.invoiceFiles && item.invoiceFiles.length > 0"></file-preview>
|
<div class="union-info-row">
|
||||||
<div style="margin-top: 4px;" v-else>文件:未上传</div>
|
<div class="union-info-label">发票号码</div>
|
||||||
|
<div class="union-info-value">{{ item.invoiceNo || '未填写' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<div class="union-info-row">
|
||||||
<van-empty description="暂无发票明细" v-else></van-empty>
|
<div class="union-info-label">发票金额</div>
|
||||||
</template>
|
<div class="union-info-value">{{ formatMoney(item.invoiceAmount) }}</div>
|
||||||
</van-cell>
|
</div>
|
||||||
</van-cell-group>
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">销售方名称</div>
|
||||||
|
<div class="union-info-value">{{ item.sellerName || '未填写' }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">项目名称</div>
|
||||||
|
<div class="union-info-value">{{ item.itemName || '未填写' }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">备注</div>
|
||||||
|
<div class="union-info-value">{{ item.remark || '未填写' }}</div>
|
||||||
|
</div>
|
||||||
|
<template v-if="item.invoiceFiles && item.invoiceFiles.length > 0">
|
||||||
|
<div class="union-file-preview union-invoice-file-preview">
|
||||||
|
<file-preview :files="item.invoiceFiles" complete_result></file-preview>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="union-empty-text" v-else>文件:未上传</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<van-empty description="暂无发票明细" v-else></van-empty>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <van-cell-group title="电子签名">-->
|
<!-- <van-cell-group title="电子签名">-->
|
||||||
<!-- <van-cell title="签字">-->
|
<!-- <van-cell title="签字">-->
|
||||||
@@ -126,47 +271,54 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
<!-- </van-cell>-->
|
<!-- </van-cell>-->
|
||||||
<!-- </van-cell-group>-->
|
<!-- </van-cell-group>-->
|
||||||
|
|
||||||
<template v-for="(task,index) in doneTasks">
|
<template v-for="(task,index) in doneTasks">
|
||||||
<div class="process-title">
|
<div class="union-info-section">
|
||||||
{{ task.displayName }}
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
</div>
|
<template v-if="task.ext.isFirstTaskNode">
|
||||||
<van-cell-group v-if="task.ext.isFirstTaskNode">
|
<div class="union-info-row">
|
||||||
<van-cell title="申请用户">
|
<div class="union-info-label">申请用户</div>
|
||||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
<div class="union-info-value">{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})</div>
|
||||||
</van-cell>
|
</div>
|
||||||
<van-cell title="申请时间">
|
<div class="union-info-row">
|
||||||
{{ formatCreateTime(task.finishTime) }}
|
<div class="union-info-label">申请时间</div>
|
||||||
</van-cell>
|
<div class="union-info-value">{{ formatCreateTime(task.finishTime) }}</div>
|
||||||
<van-cell title="办理结果">
|
</div>
|
||||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
<div class="union-info-row">
|
||||||
:value="task.ext.submitType"></dict-tag>
|
<div class="union-info-label">办理结果</div>
|
||||||
</van-cell>
|
<div class="union-info-value">
|
||||||
</van-cell-group>
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
|
||||||
<van-cell-group v-else>
|
</div>
|
||||||
<van-cell title="办理用户">
|
</div>
|
||||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
|
||||||
</van-cell>
|
|
||||||
<van-cell title="办理时间">
|
|
||||||
{{ formatCreateTime(task.finishTime) }}
|
|
||||||
</van-cell>
|
|
||||||
<van-cell title="办理结果">
|
|
||||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
|
||||||
:value="task.ext.submitType"></dict-tag>
|
|
||||||
</van-cell>
|
|
||||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
|
|
||||||
<template #label>
|
|
||||||
{{
|
|
||||||
task.taskFormData.opinion
|
|
||||||
}}
|
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
<template v-else>
|
||||||
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
<div class="union-info-row">
|
||||||
<van-image :src="task.ext.tf_userSign"
|
<div class="union-info-label">办理用户</div>
|
||||||
v-if="task.ext.tf_userSign"
|
<div class="union-info-value">{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})</div>
|
||||||
class="signature-image"></van-image>
|
</div>
|
||||||
</van-cell>
|
<div class="union-info-row">
|
||||||
</van-cell-group>
|
<div class="union-info-label">办理时间</div>
|
||||||
</template>
|
<div class="union-info-value">{{ formatCreateTime(task.finishTime) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row">
|
||||||
|
<div class="union-info-label">办理结果</div>
|
||||||
|
<div class="union-info-value">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="!task.ext.isFirstTaskNode">
|
||||||
|
<div class="union-info-label">办理意见</div>
|
||||||
|
<div class="union-info-value">{{ task.taskFormData.opinion }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="union-info-row" v-if="!task.ext.isFirstTaskNode && task.ext.tf_userSign">
|
||||||
|
<div class="union-info-label">签字</div>
|
||||||
|
<div class="union-info-value">
|
||||||
|
<van-image :src="task.ext.tf_userSign" class="signature-image"></van-image>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@@ -178,13 +330,35 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
visible: false,
|
visible: false,
|
||||||
viewData: {},
|
viewData: {},
|
||||||
doneTasks: [],
|
doneTasks: [],
|
||||||
row: null
|
row: null,
|
||||||
|
currentPaymentIndex: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
paymentInfoRows() {
|
||||||
|
return this.viewData.paymentDetails || []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.injectInfoStyle()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
injectInfoStyle() {
|
||||||
|
// 当前组件是普通 JS 对象注册,Vue 不会自动注入 style 字段,这里只为本详情弹窗注入一次样式。
|
||||||
|
const styleId = "union-reimburse-info-style"
|
||||||
|
if (document.getElementById(styleId) || !this.$options.style) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const styleNode = document.createElement("style")
|
||||||
|
styleNode.id = styleId
|
||||||
|
styleNode.type = "text/css"
|
||||||
|
styleNode.appendChild(document.createTextNode(this.$options.style))
|
||||||
|
document.head.appendChild(styleNode)
|
||||||
|
},
|
||||||
onOpen(row) {
|
onOpen(row) {
|
||||||
this.row = row
|
this.row = row
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.currentPaymentIndex = 0
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
this.getDoneTasks()
|
this.getDoneTasks()
|
||||||
},
|
},
|
||||||
@@ -208,11 +382,82 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
isCondolenceType(typeId) {
|
isCondolenceType(typeId) {
|
||||||
return this.viewData.condolenceTypeId === typeId || this.viewData.condolenceType === typeId
|
return this.viewData.condolenceTypeId === typeId || this.viewData.condolenceType === typeId
|
||||||
},
|
},
|
||||||
|
getPaymentWayText(paymentWay) {
|
||||||
|
const matchedPaymentWay = this.dict.type.UNION_REIMBURSE_PAYMENT_WAY.find(item => item.code === paymentWay)
|
||||||
|
return matchedPaymentWay ? matchedPaymentWay.name : ""
|
||||||
|
},
|
||||||
|
buildViewData(data) {
|
||||||
|
const viewData = Object.assign({
|
||||||
|
files: [],
|
||||||
|
invoiceDetails: [],
|
||||||
|
paymentDetails: []
|
||||||
|
}, data || {})
|
||||||
|
if (!Array.isArray(viewData.files)) {
|
||||||
|
viewData.files = []
|
||||||
|
}
|
||||||
|
if (!Array.isArray(viewData.invoiceDetails)) {
|
||||||
|
viewData.invoiceDetails = []
|
||||||
|
}
|
||||||
|
const hasLegacyPayment = viewData.paymentWay || viewData.payer || viewData.bankUserName || viewData.bankCardNumber || viewData.bankOfDeposit
|
||||||
|
if (Array.isArray(viewData.paymentDetails) && viewData.paymentDetails.length > 0) {
|
||||||
|
viewData.paymentDetails = viewData.paymentDetails.map(item => this.buildPaymentDetail(item))
|
||||||
|
} else {
|
||||||
|
viewData.paymentDetails = hasLegacyPayment ? [this.buildPaymentDetail({
|
||||||
|
paymentWay: viewData.paymentWay,
|
||||||
|
money: viewData.money,
|
||||||
|
payerName: viewData.payerName,
|
||||||
|
bankUserName: viewData.bankUserName,
|
||||||
|
bankOfDeposit: viewData.bankOfDeposit,
|
||||||
|
bankCardNumber: viewData.bankCardNumber
|
||||||
|
})] : []
|
||||||
|
}
|
||||||
|
return viewData
|
||||||
|
},
|
||||||
|
buildPaymentDetail(detail) {
|
||||||
|
const currentDetail = detail || {}
|
||||||
|
return {
|
||||||
|
paymentWay: currentDetail.paymentWay || "",
|
||||||
|
money: currentDetail.money || "",
|
||||||
|
payerName: currentDetail.payerName || "",
|
||||||
|
bankUserName: currentDetail.bankUserName || "",
|
||||||
|
bankOfDeposit: currentDetail.bankOfDeposit || "",
|
||||||
|
bankCardNumber: currentDetail.bankCardNumber || ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePaymentSwipeChange(index) {
|
||||||
|
this.currentPaymentIndex = index
|
||||||
|
},
|
||||||
|
swipeToPayment(index) {
|
||||||
|
if (!this.paymentInfoRows.length) {
|
||||||
|
this.currentPaymentIndex = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const targetIndex = Math.max(0, Math.min(index, this.paymentInfoRows.length - 1))
|
||||||
|
this.currentPaymentIndex = targetIndex
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.paymentInfoSwipe && this.$refs.paymentInfoSwipe.swipeTo) {
|
||||||
|
this.$refs.paymentInfoSwipe.swipeTo(targetIndex)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showPrevPayment() {
|
||||||
|
if (this.currentPaymentIndex <= 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.swipeToPayment(this.currentPaymentIndex - 1)
|
||||||
|
},
|
||||||
|
showNextPayment() {
|
||||||
|
if (this.currentPaymentIndex >= this.paymentInfoRows.length - 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.swipeToPayment(this.currentPaymentIndex + 1)
|
||||||
|
},
|
||||||
// 获取申请信息
|
// 获取申请信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.$axios.post("/platform/unionReimburse/apply/info", { id: this.row.id }).then((res) => {
|
this.$axios.post("/platform/unionReimburse/apply/info", { id: this.row.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.viewData = res.data
|
this.viewData = this.buildViewData(res.data)
|
||||||
|
this.currentPaymentIndex = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -230,6 +475,209 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.union-reimburse-info-sheet {
|
||||||
|
height: 92vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-reimburse-info-sheet .van-action-sheet__content {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-header {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 56px;
|
||||||
|
padding: 0 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-top: 4px solid #1677ff;
|
||||||
|
border-bottom: 1px solid #e7ebf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-header-title {
|
||||||
|
color: #111827;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-close {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
color: #8b95a3;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-container {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #f2f4f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-scroll {
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-section {
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-section-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 44px;
|
||||||
|
padding: 0 16px;
|
||||||
|
color: #1f2937;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border-bottom: 1px solid #e7ebf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-section-title::before {
|
||||||
|
content: "";
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background: #1677ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 12px 20px;
|
||||||
|
border-bottom: 1px solid #edf0f4;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-row:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-label {
|
||||||
|
flex: 0 0 96px;
|
||||||
|
color: #8a94a6;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-value {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
color: #1f2937;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: right;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-info-link {
|
||||||
|
color: #1677ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-payment-tabs {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 12px 20px 4px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-payment-tab {
|
||||||
|
height: 30px;
|
||||||
|
padding: 0 13px;
|
||||||
|
border-radius: 999px;
|
||||||
|
color: #8a94a6;
|
||||||
|
background: #f0f2f5;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-payment-tab.active {
|
||||||
|
color: #fff;
|
||||||
|
background: #1677ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-empty-text {
|
||||||
|
padding: 14px 20px;
|
||||||
|
color: #9aa3af;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-file-preview {
|
||||||
|
padding: 12px 20px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-invoice-subtitle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 20px;
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 13px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border-top: 1px solid #edf0f4;
|
||||||
|
border-bottom: 1px solid #edf0f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-invoice-card-list {
|
||||||
|
padding: 12px 16px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-invoice-card {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 14px 14px 12px;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid #e6ebf2;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 1px 3px rgba(31, 35, 41, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-invoice-card-title {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #1677ff;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-invoice-file-preview {
|
||||||
|
padding: 12px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 20px;
|
||||||
|
color: #1f2937;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signature-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 120px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user