This commit is contained in:
2025-08-20 15:16:40 +08:00
parent c4dee115af
commit 65eb86c0dc
41 changed files with 2774 additions and 299 deletions
@@ -65,6 +65,7 @@ public class AssetStocktakingServiceImpl extends BaseServiceImpl<AssetStocktakin
cnd.andEX("t1.assetCategoryId", "=", pageForm.getAssetCategoryId());
cnd.andEX("t1.assetTypeCode", "=", pageForm.getAssetTypeCode());
cnd.andEX("t1.assetUsageStateName", "=", pageForm.getAssetUsageStateName());
cnd.groupBy("t1.id");
sql.setCondition(cnd);
return sql;
}
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.healthCheckup.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.param.PageForm;
@@ -112,7 +113,7 @@ public class HealthCheckupCampusController {
@At
@ApiOperation("查询所有院区")
@SaCheckPermission("healthCheckup.campus")
@SaCheckLogin
public Result queryCampus() {
try {
List<HealthCheckupCampus> campusList = baseService.dao().query(HealthCheckupCampus.class, Cnd.NEW().asc("campusCode"));
@@ -65,6 +65,7 @@ import org.nutz.mvc.upload.UploadAdaptor;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -170,6 +171,9 @@ public class HealthCheckupListController {
public Result doAuditUser(String projectId,
String unionId,
Boolean flag) {
if (StrUtil.isBlank(unionId)) {
unionId = SecurityUtil.getUnionId();
}
if (flag) {
dao.update(HealthCheckupUnionConfirm.class, Chain.make("isAudit", true)
.add("auditTime", DateUtil.date())
@@ -281,15 +285,12 @@ public class HealthCheckupListController {
@ApiOperation("下载体检参加人员导入模版")
@SaCheckPermission("healthCheckup.list.mange")
public void downloadTem(HttpServletResponse response) {
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();) {
EasyExcel.write(byteArrayOutputStream, HealthCheckupImportTemp.class)
.sheet("参加人员导入模版")
.doWrite(ArrayList::new);
CommonDownloadUtil.download("参加人员导入模版.xlsx", byteArrayOutputStream.toByteArray(), response);
} catch (Exception e) {
log.error("下载参加人员导入模版失败", e);
}
List<ExcelExportEntity> entities = new ArrayList<>();
entities.add(new ExcelExportEntity("工号", "loginName", 20));
entities.add(new ExcelExportEntity("姓名", "userName", 20));
ExportParams exportParams = new ExportParams();
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
CommonDownloadUtil.download("参加人员导入模版.xlsx", workbook, response);
}
}
@@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -270,6 +271,7 @@ public class HealthCheckupSingleController {
selection.setSelectUserId(v);
selection.setCampus(campus);
selection.setSubjectId(optionId);
selection.setSelectTime(new Date());
return selection;
}).collect(Collectors.toList());
manyAddOrRenewUtil.asyncExecuteFastInsert(selections,null);
@@ -53,9 +53,10 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
@Override
public HealthCheckupProject findOne(String id) {
if (Strings.isBlank(id)){
return null;
}
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
return project;
}
@@ -1,5 +1,8 @@
package com.budwk.app.zhgh.integral.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
@@ -266,16 +269,71 @@ public class IntegralManageController {
@At
@Ok("void")
@ApiOperation("下载福利名单导入模板")
@ApiOperation("下载积分增加导入模板")
@SaCheckPermission("benefit.user")
public void downloadImport(HttpServletResponse response) {
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();) {
EasyExcel.write(byteArrayOutputStream, BenefitUserTemp.class)
.sheet("福利名单导入模版")
.doWrite(ArrayList::new);
CommonDownloadUtil.download("福利名单导入模版.xlsx", byteArrayOutputStream.toByteArray(), response);
List<ExcelExportEntity> entities = new ArrayList<>();
entities.add(new ExcelExportEntity("工号", "loginName", 20));
entities.add(new ExcelExportEntity("姓名", "userName", 20));
entities.add(new ExcelExportEntity("增加积分", "integral", 20));
ExportParams exportParams = new ExportParams();
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
CommonDownloadUtil.download("积分增加导入模板.xlsx", workbook, response);
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("integral.manage")
@ApiOperation("导入扣减积分名单")
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
public Result doImportAdd(TempFile file){
try {
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), IntegralAddTemp.class, 0, 1);
List<IntegralAddTemp> integralTempList = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(IntegralAddTemp.class);
List<String> loginNames = integralTempList.stream().map(IntegralAddTemp::getLoginName).toList();
List<View_user> userList = integralManageService.dao().query(View_user.class, Cnd.NEW().andEX(View_user::getLoginname, "in", loginNames));
Map<String, String> userMap = userList.stream().collect(Collectors.toMap(View_user::getLoginname, View_user::getId));
List<IntegralAddTemp> errorInfos = new ArrayList<>();
List<IntegralDetail> insertInfos = new ArrayList<>();
integralTempList.forEach(v -> {
if (userMap.containsKey(v.getLoginName().trim())) {
View_user viewUser = userList.stream().filter(user -> user.getLoginname().equals(v.getLoginName())).findFirst().orElse(null);
IntegralDetail detail = new IntegralDetail();
detail.setYear(String.valueOf(DateUtil.thisYear()));
detail.setIntegral(v.getIntegral());
detail.setIntegralTime(new Date());
detail.setIntegralNotes("增加积分导入");
detail.setUserId(viewUser.getId());
detail.setUnionId(viewUser.getUnionId());
detail.setUnitId(viewUser.getUnitId());
detail.setUnionName(viewUser.getUnionName());
detail.setUnitName(viewUser.getUnitName());
insertInfos.add(detail);
} else {
v.setResult("获取不到该用户信息,请检查工号是否正确!");
errorInfos.add(v);
}
});
int successCount = Lang.isNotEmpty(insertInfos) ? integralManageService.insert(insertInfos).size() : 0;
if (Lang.isNotEmpty(errorInfos)) {
NutMap nutMap = new NutMap();
nutMap.setv("totalCount", integralTempList.size());
nutMap.setv("successCount", successCount);
nutMap.setv("errorCount", errorInfos.size());
nutMap.setv("errorList", errorInfos.stream().map(v -> {
return NutMap.NEW().addv("工号", v.getLoginName()).addv("姓名", v.getUserName()).addv("错误原因", v.getResult());
}).collect(Collectors.toList()));
return Result.success(nutMap);
}
return Result.success();
} catch (Exception e) {
log.error("下载福利名单导入模版失败", e);
e.printStackTrace();
return Result.error();
}
}
@@ -358,6 +416,22 @@ public class IntegralManageController {
@ExcelProperty("扣减时间")
private Date integralTime;
@ExcelIgnore
private String result;
}
@Data
@EqualsAndHashCode
public static class IntegralAddTemp {
@ExcelProperty("工号")
private String loginName;
@ExcelProperty("姓名")
private String userName;
@ExcelProperty("积分")
private String integral;
@ExcelIgnore
private String result;
}
@@ -24,6 +24,7 @@ public class IntegralDetail extends BaseModel implements Serializable {
@Column
@Name
@Comment("id")
@Prev(els = {@EL("uuid()")})
@ColDefine(type = ColType.VARCHAR, width = 32)
private String id;
@@ -1,11 +1,14 @@
package com.budwk.app.zhgh.outlay.activityBudget.conteoller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import com.alibaba.excel.EasyExcel;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
import com.budwk.app.zhgh.integral.controller.IntegralManageController;
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
import com.budwk.app.zhgh.outlay.activityBudget.service.ActivityBudgetService;
@@ -68,8 +71,21 @@ public class ActivityBudgetApplyController {
@SaCheckPermission("activity.budget.apply")
@Aop(TransAop.READ_COMMITTED)
@SLog(type = "activityBudgetApply", tag = "年度预算申报-预算申报", msg = "提交年度预算申报")
public Result doSubmit(@Param("activityBudget") ActivityBudget activityBudget, Boolean flag) {
return activityBudgetService.doSubmit(activityBudget, flag);
public Result submit(@Param("data") ActivityBudget activityBudget) {
return activityBudgetService.submit(activityBudget);
}
@At
@SaCheckPermission("activity.budget.apply")
@ApiOperation("保存申请")
@SLog(type = "activityBudgetApply", tag = "年度预算申报-预算申报", msg = "保存年度预算申报")
public Result save(@Param("data") ActivityBudget activityBudget) {
activityBudget.setUserId(SecurityUtil.getUserId());
activityBudget.setLoginName(SecurityUtil.getUserLoginname());
activityBudget.setUserName(SecurityUtil.getUserUsername());
activityBudgetService.insertOrUpdate(activityBudget);
return Result.success();
}
@@ -45,12 +45,6 @@ public class ActivityBudgetSchoolAuditController {
public void index() {
}
@At("/form")
@Ok("beetl:/platform/zhgh/outlay/activityBudget/schoolAudit/form.html")
@SaCheckPermission("activity.budget.schoolAudit")
public void form() {
}
@At
@ApiOperation("分页查询")
@@ -70,6 +64,7 @@ public class ActivityBudgetSchoolAuditController {
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
@@ -78,12 +73,16 @@ public class ActivityBudgetSchoolAuditController {
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariale
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_budget info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -98,16 +97,16 @@ public class ActivityBudgetSchoolAuditController {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.desc("t.createdAt");
cnd.andEX("YEAR(info.applyDate)", "=", year);
cnd.and(Cnd.likeEX("info.activityMatter", activityMatter));
cnd.groupBy("t.id");
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.applyDate");
cnd.desc("t.createdAt").desc("info.applyDate");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
@@ -23,13 +23,12 @@ public class OutlayActBudgetSchoolPostInterceptor implements FlowInterceptor {
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
NutMap activityBudget = Json.fromJson(NutMap.class, formDataStr);
Dao dao = ServiceContext.find(Dao.class);
dao.update(ActivityBudget.class, Chain.make("totalBudgetMoney", execution.getArgs().getStr("tf_totalBudgetMoney")),
Cnd.where("id", "=", activityBudget.getString("id")));
execution.getArgs().set(FlowConst.FORM_DATA, Json.toJson(activityBudget));
/*execution.getArgs().set(FlowConst.FORM_DATA, Json.toJson(activityBudget));
int instanceId = execution.getArgs().getInt(FlowConst.PROCESS_INSTANCE_ID_KEY);
dao.update(ProcessInstance.class, Chain.make("businessNo", activityBudget.getString("id")), Cnd.where(ProcessInstance::getId, "=", instanceId));
dao.update(ProcessInstance.class, Chain.make("businessNo", activityBudget.getString("id")), Cnd.where(ProcessInstance::getId, "=", instanceId));*/
}
}
@@ -17,9 +17,8 @@ public interface ActivityBudgetService extends BaseService<ActivityBudget> {
/**
* 提交年度预算申报
* @param activityBudget
* @param flag
*/
Result doSubmit(ActivityBudget activityBudget, Boolean flag);
Result submit(ActivityBudget activityBudget);
ActivityBudget findOne(String id);
@@ -5,6 +5,7 @@ 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.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant;
@@ -13,6 +14,11 @@ import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.sys.models.Sys_dict;
import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
@@ -51,6 +57,9 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
@Inject
private SysDictService sysDictService;
@Inject
private FlowEngine flowEngine;
@Override
public Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter,Cnd cnd) {
@@ -62,6 +71,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
@@ -70,7 +80,9 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariale
t.variable taskVariale,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
FROM
activity_budget info
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
@@ -113,10 +125,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
}
@Override
public Result doSubmit(ActivityBudget activityBudget, Boolean flag) {
if (flag) {
activityBudget.setAuditState(1);
}
public Result submit(ActivityBudget activityBudget) {
if (StrUtil.isEmpty(activityBudget.getId())) {
activityBudget.setUserId(SecurityUtil.getUserId());
@@ -126,7 +135,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
if (List.of("ACTIVITY_BUDGET_TYPE_TWO").contains(activityBudget.getOutlayManageSource())) {
int activityMatterCount = count(Cnd.where("activityMatter", "=",
activityBudget.getActivityMatter()).and("unionId", "=", SecurityUtil.getUnionId()));
if (flag && activityMatterCount > 0) {
if (activityMatterCount > 0) {
return Result.error(activityBudget.getActivityMatter() + "已填写申请!");
}
}
@@ -136,9 +145,9 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
dao().clear(ActivityBudgetDetails.class, Cnd.where("budgetId", "=", activityBudget.getId()));
}
if (List.of("superadmin").contains(SecurityUtil.getUserLoginname())) {
/* if (List.of("superadmin").contains(SecurityUtil.getUserLoginname())) {
//如果是超级管理员就可以直接提交不用审核
if (flag) {
activityBudget.setAuditState(4);
activityBudget.setTotalBudgetMoney(activityBudget.getDeclareTotalBudgetMoney());
ActivityBudget budget = null;
@@ -173,7 +182,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
//如果不等于校工会预算才往表里面加预算
//代表协会可能用的是校工会的预算
if (!activityBudget.getIsSchoolBudget()) {
/* jf_club jfClub = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
*//* jf_club jfClub = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
.and("club_id", "=", activityBudget.getClubId()));
if (ObjectUtil.isNotEmpty(jfClub)) {
if (StrUtil.isNotBlank(activityBudget.getId())) {
@@ -181,21 +190,21 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
}
jfClub.setTotalQuota(jfClub.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
dao.updateIgnoreNull(jfClub);
}*/
}*//*
}
} else if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_FOUR")) {
// 更新其他经费表
/*JfOther jfOther = dao.fetch(JfOther.class, Cnd.where("year", "=", DateUtil.getYear()));
*//*JfOther jfOther = dao.fetch(JfOther.class, Cnd.where("year", "=", DateUtil.getYear()));
if (ObjectUtil.isNotEmpty(jfOther)) {
if (StrUtil.isNotBlank(activityBudget.getId())) {
jfOther.setTotalQuota(jfOther.getTotalQuota().subtract(budget.getTotalBudgetMoney()));
}
jfOther.setTotalQuota(jfOther.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
dao.updateIgnoreNull(jfOther);
}*/
}
}*//*
}
}
}*/
insertOrUpdate(activityBudget);
@@ -204,14 +213,23 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
}
//添加预算详情表
insert(activityBudget.getBudgetDetails());
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, activityBudget);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("NDYSSB", activityBudget.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
return Result.success();
}
@Override
public ActivityBudget findOne(String id) {
ActivityBudget activityBudget = fetchLinks(fetch(id), "budgetDetails", Cnd.NEW().asc("detailsOrder"));
activityBudget.setSchoolAudit(dao().fetch(Audit.class, Cnd.where("id", "=", activityBudget.getSchoolAuditId())));
// activityBudget.setAllocationEditAuditList(dao().query(Audit.class, Cnd.where("parentId", "=", activityBudget.getId())));
return activityBudget;
}
@@ -0,0 +1,144 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.result.Result;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
import com.budwk.app.zhgh.outlay.outlayReimburse.service.OutlayReimburseApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.swing.*;
import java.util.List;
/**
* @author zhf
* @date 2025/8/19 10:14
* @description 费用报销申请
*/
@IocBean
@At("/platform/outlay/reimburse/apply")
@Ok("json:full")
@Api("费用报销申请")
public class OutlayReimburseApplyController {
@Inject
private OutlayReimburseApplyService outlayReimburseApplyService;
@Inject
private Dao dao;
@Inject
private FlowEngine flowEngine;
@At("/index")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/apply/index.html")
@SaCheckPermission("outlay.reimburse.apply")
public void index() {
}
@At
@ApiOperation("获取预算金额或活动")
@SaCheckPermission("outlay.reimburse.apply")
public Result getBudgetMoneyOrActivity(String outlayManageSource, String clubId, String unionId, String id) {
return Result.success(outlayReimburseApplyService.getBudgetMoneyOrActivity(outlayManageSource, clubId, unionId, id));
}
@At
@ApiOperation("查询这个预算已经报销了的金额")
@SaCheckPermission("outlay.reimburse.apply")
public Result getBxMoneyByBudgetId(String budgetId) {
return Result.success(outlayReimburseApplyService.getBxMoneyByActivityId(budgetId));
}
@At
@ApiOperation("判断这个报销的记录预算是否充足")
@SaCheckPermission("outlay.reimburse.apply")
public Result bxAddValidate(String budgetId, String money, String outlayManageSource, String clubId) {
return outlayReimburseApplyService.bxAddValidate(budgetId, money, outlayManageSource, clubId);
}
@At
@ApiOperation("提交报销申请")
@SaCheckPermission("activity.budget.apply")
@Aop(TransAop.READ_COMMITTED)
@SLog(type = "outlayReimburseApply", tag = "费用报销管理-报销申请", msg = "提交年度预算申报")
public Result submit(@Param("data") OutlayReimburse outlayReimburse) {
//添加预算详情表
if (StrUtil.isBlank(outlayReimburse.getId())){
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
outlayReimburse.setUserId(SecurityUtil.getUserId());
outlayReimburse.setUserName(SecurityUtil.getUserUsername());
outlayReimburse.setLoginName(SecurityUtil.getUserLoginname());
outlayReimburse.setUnitId(SecurityUtil.getUnitId());
outlayReimburse.setUnitName(user.getUnitName());
outlayReimburse.setUnionId(SecurityUtil.getUnionId());
outlayReimburse.setUnionName(user.getUnionName());
outlayReimburse.setApplyTime(DateUtil.now());
}
outlayReimburseApplyService.insertOrUpdate(outlayReimburse);
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, outlayReimburse);
args.set("outlayManageSource", outlayReimburse.getOutlayManageSource());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("FYBXSQ", outlayReimburse.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
return Result.success();
}
@At
@SaCheckPermission("outlay.reimburse.apply")
@ApiOperation("保存申请")
@SLog(type = "outlayReimburseApply", tag = "费用报销管理-报销申请", msg = "保存年度预算申报")
public Result save(@Param("data") OutlayReimburse outlayReimburse) {
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
outlayReimburse.setUserId(SecurityUtil.getUserId());
outlayReimburse.setUserName(SecurityUtil.getUserUsername());
outlayReimburse.setLoginName(SecurityUtil.getUserLoginname());
outlayReimburse.setUnitId(SecurityUtil.getUnitId());
outlayReimburse.setUnitName(user.getUnitName());
outlayReimburse.setUnionId(SecurityUtil.getUnionId());
outlayReimburse.setUnionName(user.getUnionName());
outlayReimburse.setApplyTime(DateUtil.now());
outlayReimburseApplyService.insertOrUpdate(outlayReimburse);
return Result.success();
}
@At
@SaCheckPermission("outlay.reimburse.apply")
@ApiOperation("保存申请")
public Result findOne(String id){
return Result.success(outlayReimburseApplyService.fetch(id));
}
}
@@ -1,12 +1,17 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
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.zhgh.outlay.outlayReimburse.service.OutlayReimburseApplyListService;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.outlay.outlayReimburse.service.OutlayReimburseApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.mvc.annotation.At;
@@ -18,63 +23,60 @@ import org.nutz.mvc.annotation.Ok;
* @description 我的报销
*/
@IocBean
@At("/platform/outlay/reimburse/apply")
@At("/platform/outlay/reimburse/applyList")
@Ok("json:full")
@Api("我的报销")
public class OutlayReimburseApplyListController {
@Inject
private OutlayReimburseApplyListService outlayReimburseApplyListService;
private BaseService baseService;
@At("/index")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/apply/index.html")
@SaCheckPermission("outlay.reimburse.apply")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/applyList/index.html")
@SaCheckPermission("outlay.reimburse.applyList")
public void index() {
}
@At("/form")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/apply/form.html")
@SaCheckPermission("outlay.reimburse.apply")
public void form() {
}
@At("/view")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/view/index.html")
@SaCheckPermission("outlay.reimburse.apply")
public void view() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("outlay.reimburse.apply")
public Result pageData(PageForm pageForm) {
@SaCheckPermission("outlay.reimburse.applyList")
public Result pageData(PageForm pageForm, Integer year) {
return Result.success();
Sql sql = Sqls.create("""
SELECT
info.*,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariale,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask' AND taskState IN (10, 20)) AS startTaskId
FROM
outlay_reimburse info
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
""");
Cnd cnd = Cnd.NEW();
cnd.and("info.userId", "=", SecurityUtil.getUserId());
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("获取预算金额或活动")
@SaCheckPermission("outlay.reimburse.apply")
public Result getBudgetMoneyOrActivity(String outlayManageSource, String clubId, String unionId, String id) {
return Result.success(outlayReimburseApplyListService.getBudgetMoneyOrActivity(outlayManageSource, clubId, unionId, id));
}
@At
@ApiOperation("查询这个预算已经报销了的金额")
@SaCheckPermission("outlay.reimburse.apply")
public Result getBxMoneyByBudgetId(String budgetId) {
return Result.success(outlayReimburseApplyListService.getBxMoneyByActivityId(budgetId));
}
@At
@ApiOperation("判断这个报销的记录预算是否充足")
@SaCheckPermission("outlay.reimburse.apply")
public Result bxAddValidate(String budgetId, String money, String outlayManageSource,String clubId) {
return outlayReimburseApplyListService.bxAddValidate(budgetId,money, outlayManageSource,clubId);
}
}
@@ -0,0 +1,116 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
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.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import java.util.List;
/**
* @author zhf
* @date 2025/8/19 15:18
* @description 出纳审核
*/
@IocBean
@Ok("json:full")
@Slf4j
@Api(tags = "费用报销管理-出纳审核")
@At("/platform/outlay/reimburse/schoolCnAudit")
public class OutlayReimburseSchoolCnAuditController {
@Inject
private BaseService baseService;
@At("/index")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/schoolCnAudit/index.html")
@SaCheckPermission("outlay.reimburse.schoolCnAudit")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("outlay.reimburse.schoolCnAudit")
public Result pageData(PageForm pageForm,
Integer year,
String unionId,
String clubId,
Boolean approval,
String outlayManageSource,
String activityMatter) {
Sql sql = Sqls.create("""
SELECT
info.*,
YEAR(info.applyTime) year,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN outlay_reimburse info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "714574d6-29c3-4a2c-bc63-ecef38a0d6d0");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("info.unionId", "=", unionId);
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.andEX("YEAR(info.applyTime)", "=", year);
cnd.groupBy("t.id");
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("t.createdAt").desc("info.applyTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
}
@@ -0,0 +1,155 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
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.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.models.Sys_dict;
import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
/**
* @author zhf
* @date 2025/8/19 16:50
* @description 会计审核
*/
@IocBean
@Ok("json:full")
@Slf4j
@Api(tags = "费用报销管理-出纳审核")
@At("/platform/outlay/reimburse/schoolKjAudit")
public class OutlayReimburseSchoolKjAuditController {
@Inject
private BaseService baseService;
@Inject
private SysDictService sysDictService;
@At("/index")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/schoolKjAudit/index.html")
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
public Result pageData(PageForm pageForm,
Integer year,
String unionId,
String clubId,
Boolean approval,
String outlayManageSource,
String activityMatter) {
Sql sql = Sqls.create("""
SELECT
info.*,
YEAR(info.applyTime) year,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN outlay_reimburse info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "930aed03-677b-41d7-8920-7d9b45a7abc9");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("info.unionId", "=", unionId);
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.andEX("YEAR(info.applyTime)", "=", year);
cnd.groupBy("t.id");
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("t.createdAt").desc("info.applyTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
@At
@ApiOperation("删除字典表内容")
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
@SLog(type = "outlayReimburseSchoolKjAudit", tag = "费用报销管理-校工会会计审核", msg = "删除字典表内容")
public Result doDeleteDetailsType(@Param("id") String id) {
Sys_dict dict = sysDictService.fetch(id);
sysDictService.deleteAndChild(dict);
sysDictService.clearCache();
return Result.success();
}
@At
@ApiOperation("添加字典表内容")
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
@SLog(type = "outlayReimburseSchoolKjAudit", tag = "费用报销管理-校工会会计审核", msg = "添加字典表内容")
public Result doSubmitDetailsType(@Param("detailsTypeList") Sys_dict[] detailsTypeList) {
Sys_dict fetch = sysDictService.fetch(Cnd.where("code", "=", "ACTIVITY_BUDGET_DETAILS_TYPE"));
if (ObjectUtil.isEmpty(fetch)) {
return Result.error("字典父类不存在!");
}
for (Sys_dict dict : detailsTypeList) {
if (ObjectUtil.isEmpty(dict.getId())) {
sysDictService.save(dict, fetch.getId());
} else {
sysDictService.updateIgnoreNull(dict);
}
}
return Result.success();
}
}
@@ -0,0 +1,124 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
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.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.models.Sys_dict;
import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
/**
* @author zhf
* @date 2025/8/19 16:50
* @description 主席审核
*/
@IocBean
@Ok("json:full")
@Slf4j
@Api(tags = "费用报销管理-主席审核")
@At("/platform/outlay/reimburse/schoolZxAudit")
public class OutlayReimburseSchoolZxAuditController {
@Inject
private BaseService baseService;
@Inject
private SysDictService sysDictService;
@At("/index")
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/schoolZxAudit/index.html")
@SaCheckPermission("outlay.reimburse.schoolZxAudit")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("outlay.reimburse.schoolZxAudit")
public Result pageData(PageForm pageForm,
Integer year,
String unionId,
String clubId,
Boolean approval,
String outlayManageSource,
String activityMatter) {
Sql sql = Sqls.create("""
SELECT
info.*,
YEAR(info.applyTime) year,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN outlay_reimburse info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "c433d966-05f4-45b4-b845-755b600d852a");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("info.unionId", "=", unionId);
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
cnd.andEX("YEAR(info.applyTime)", "=", year);
cnd.groupBy("t.id");
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("t.createdAt").desc("info.applyTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
}
@@ -0,0 +1,29 @@
package com.budwk.app.zhgh.outlay.outlayReimburse.interceptor;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.json.Json;
/**
* @author zhf
* @date 2025/8/20 11:48
* @description 校工会会计审核
*/
public class OutlayReimburseSchoolKjAuditPostInterceptor implements FlowInterceptor {
@Override
public void intercept(Execution execution) {
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
OutlayReimburse outlayReimburse = Json.fromJson(OutlayReimburse.class, formDataStr);
String detailsTypeId = execution.getArgs().getStr("detailsTypeId");
outlayReimburse.setDetailsTypeId(detailsTypeId);
Dao dao = ServiceContext.find(Dao.class);
dao.update(outlayReimburse);
}
}
@@ -86,7 +86,7 @@ public class OutlayReimburse extends BaseModel implements Serializable {
@Column
@Comment("支付内容")
@ColDefine(type = ColType.VARCHAR, width = 30)
@ColDefine(type = ColType.TEXT)
private String paymentContent;
@Column
@@ -120,5 +120,10 @@ public class OutlayReimburse extends BaseModel implements Serializable {
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userSign;
@Column
@Comment("明细类")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String detailsTypeId;
}
@@ -7,7 +7,7 @@ import org.nutz.lang.util.NutMap;
import java.math.BigDecimal;
public interface OutlayReimburseApplyListService extends BaseService<OutlayReimburse> {
public interface OutlayReimburseApplyService extends BaseService<OutlayReimburse> {
/**
@@ -37,4 +37,7 @@ public interface OutlayReimburseApplyListService extends BaseService<OutlayReimb
* @return
*/
Result bxAddValidate(String budgetId, String money, String outlayManageSource,String clubId);
NutMap findOne(String id);
}
@@ -10,7 +10,7 @@ import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool;
import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion;
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
import com.budwk.app.zhgh.outlay.outlayReimburse.service.OutlayReimburseApplyListService;
import com.budwk.app.zhgh.outlay.outlayReimburse.service.OutlayReimburseApplyService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
@@ -19,7 +19,6 @@ import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -29,8 +28,8 @@ import java.util.Objects;
* @description
*/
@IocBean(args = {"refer:dao"})
public class OutlayReimburseApplyListServiceImpl extends BaseServiceImpl<OutlayReimburse> implements OutlayReimburseApplyListService {
public OutlayReimburseApplyListServiceImpl(Dao dao) {
public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimburse> implements OutlayReimburseApplyService {
public OutlayReimburseApplyServiceImpl(Dao dao) {
super(dao);
}
@@ -255,6 +254,14 @@ public class OutlayReimburseApplyListServiceImpl extends BaseServiceImpl<OutlayR
}
return null;
}
@Override
public NutMap findOne(String id) {
return null;
}
}
@@ -163,6 +163,15 @@ public class ThirtyTeachController {
}
@At
@ApiOperation("修改荣誉证办理年月")
@SaCheckPermission("thirtyTeach.manage")
public Result doEditThirtyCertificateProcessingTime(String id,String thirtyCertificateProcessingTime){
sysUserService.update(Chain.make("thirtyCertificateProcessingTime", thirtyCertificateProcessingTime), Cnd.where("id", "=", id));
return Result.success();
}
@At
@Aop(TransAop.READ_COMMITTED)
@@ -42,6 +42,7 @@ public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTea
mobile,
birthday,
thirtyCertificateProcessingTime,
false as isEditThirtyCertificateProcessingTime,
TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE()) AS teachNum
FROM
`vw_user`
@@ -76,19 +76,19 @@ let ASSSET_INFO = {
style="width: 100%"
>
<el-table-column
label="责任人" prop="oldAssetUseUserName">
label="责任人" prop="oldAssetUseUserName">
</el-table-column>
<el-table-column
label="使用/管理部门" prop="oldAssetUseUnionName">
label="使用/管理部门" prop="oldAssetUseUnionName">
</el-table-column>
<el-table-column
label="存放地点" prop="oldAssetStorageLocation">
label="存放地点" prop="oldAssetStorageLocation">
</el-table-column>
<el-table-column
label="使用状况" prop="oldAssetUsageStateName">
label="使用状况" prop="oldAssetUsageStateName">
</el-table-column>
<el-table-column
label="旧使用状况" prop="oldAssetUsageStateName">
label="操作时间" prop="createdAt">
<template v-slot="{row}">
{{$moment(row.createdAt).format('YYYY-MM-DD HH:mm:ss')}}
</template>
@@ -68,6 +68,14 @@ layout("/layouts/platform.html"){
ref="table"
row-key="id"
style="width: 100%">
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -133,6 +141,7 @@ layout("/layouts/platform.html"){
{prop: 'assetNumber', label: '资产编号'},
{prop: 'assetName', label: '资产名称'},
{prop: 'categoryName', label: '类别名称'},
{prop: 'assetTypeCode', label: '资产类型'},
{prop: 'assetStorageLocation', label: '存放地点'},
{prop: 'assetUseUserName', label: '责任人'},
{prop: 'assetRetiredAssetsDate', label: '折旧到期日期'},
@@ -225,7 +225,7 @@ layout("/layouts/platform.html"){
this.notifyWarning("当前分工会没有名单,暂不需要提交")
return
}
const confirm = await this.$confirm('您确定名单都已核实,准确无误?', '提示', {
const confirm = await this.$confirm(flag?'您确定名单都已核实,准确无误?':'您确定取消确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -72,6 +72,9 @@ layout("/layouts/platform.html"){
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'code',data:row}">
二维码
</el-dropdown-item>
<el-dropdown-item
v-if="( row.isWithinChoiceTime || row.canCreated ) && row.isHasUserList===0"
:command="{type:'created',data:row}">
@@ -93,9 +96,7 @@ layout("/layouts/platform.html"){
<el-dropdown-item :command="{type:'delete',data:row}">
删除
</el-dropdown-item>
<!-- <el-dropdown-item :command="{type:'code',data:row}">
二维码
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -296,7 +297,18 @@ layout("/layouts/platform.html"){
></drawer-user-scope>
<!-- <open-qr-code ref="openQRCode" :url="url"></open-qr-code>-->
<el-dialog
title="活动二维码"
:visible.sync="codeDialogVisible"
:close-on-click-modal="false"
width="30%">
<div style=" display: flex;justify-content: center;">
<qrcode :options="{ width: 400 }" :value="activityUrl" ></qrcode>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
</span>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
@@ -359,12 +371,13 @@ layout("/layouts/platform.html"){
}],
},
deleteRowIds: [],
description: ""
description: "",
codeDialogVisible: false,
activityUrl: '',
}
},
components: {
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
// 'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: {
dropdownCommand(command) {
@@ -458,7 +471,8 @@ layout("/layouts/platform.html"){
}
},
openCode(id) {
this.$refs.openQRCode.openCode("/mobile/healthCheckup/list")
this.activityUrl = location.origin + "/platform/healthCheckup/project/mange"
this.codeDialogVisible = true
},
deleteRow(row, index) {
@@ -51,6 +51,7 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="积分列表">
<el-button @click="openImportAdd" size="small" type="primary">增加导入</el-button>
<el-button @click="batchDeductions()" size="small" type="primary">批量扣减
</el-button>
@@ -170,6 +171,12 @@ layout("/layouts/platform.html"){
post_url="/platform/integral/manage/doImport" @flush="$refs.guava.index();pageData()"
></file-import>
</template>
<template #public>
<file-import ref="viewImport" temp_url="/platform/integral/manage/downloadImport"
post_url="/platform/integral/manage/doImportAdd" @flush="$refs.guava.index();pageData()"
></file-import>
</template>
</guava>
@@ -283,6 +290,10 @@ layout("/layouts/platform.html"){
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
},
methods: {
openImportAdd(){
this.$refs.guava.public()
this.$refs.viewImport.resetImportData()
},
openImport() {
this.$refs.guava.edit()
this.$refs.viewImport.resetImportData()
@@ -0,0 +1,342 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<el-card shadow="never">
<snaker-start slot="header" label="年度预算申报" define_key="NDYSSB"></snaker-start>
<el-form :model="formData" :rules="formRules" ref="formRef" class="flow-task-form">
<el-descriptions :column="2" border>
<el-descriptions-item label="申报人姓名">{{formData.userName}}</el-descriptions-item>
<el-descriptions-item label="申报时间">{{formData.applyDate}}</el-descriptions-item>
<el-descriptions-item label="联系方式">
<el-form-item label="联系方式" prop="mobile">
<el-input placeholder="请输入联系方式" v-model="formData.mobile"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="预算类型">
<el-form-item label="预算类型" prop="outlayManageSource">
<el-select @change="budgetTypeCodeChange"
placeholder="请选择预算类型"
style="width: 100%;"
v-model="formData.outlayManageSource">
<el-option
:key="item.code"
:label="item.name"
:value="item.code"
v-for="item in budgetTypeOption">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item label="申报(承办)单位">
<el-form-item label="申报(承办)单位" prop="helpUnitName"
v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(formData.outlayManageSource)">
<el-input placeholder="请输入申报(承办)单位" readonly
type="text" v-model="formData.helpUnitName"></el-input>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="unionId"
v-if="formData.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
<el-select v-model="formData.unionId" filterable @change="unionChange"
clearable
:disabled="!['superadmin'].includes($store.state.user.loginname)"
placeholder="请选择工会" style="width: 100%;">
<el-option v-for="item in unionList" :label="item.name"
:value="item.id"
:key="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="clubId"
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
<el-select @change="clubChange"
placeholder="请选择申报(承办)单位"
style="width: 100%;" v-model="formData.clubId">
<el-option
:key="item.id"
:label="item.clubName"
:value="item.id"
v-for="item in clubOption">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动项目">
<el-form-item
prop="activityMatter" label="活动项目">
<el-input maxlength="50" placeholder="请输入项目"
v-model="formData.activityMatter"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动时间">
<el-form-item
prop="activityDate" label="活动时间">
<el-input maxlength="50" placeholder="请输入活动时间"
v-model="formData.activityDate"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="预算金额(元)">
<el-form-item
prop="declareTotalBudgetMoney" label="预算金额(元)"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number :min="0" :precision="2"
:disabled="formData.budgetDetails&&formData.budgetDetails.length>0"
placeholder="请输入预算金额"
style="width: 100%"
v-model="formData.declareTotalBudgetMoney"></el-input-number>
</el-form-item>
</el-descriptions-item>
<!--<el-descriptions-item label="是否可以重复报销"
v-if="['superadmin'].includes($store.state.user.loginname)">
<el-form-item
prop="isRepeatReimburse" label="是否可以重复报销"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.isRepeatReimburse">
<el-radio-button :label="true">可以</el-radio-button>
<el-radio-button :label="false">不可以</el-radio-button>
</el-radio-group>
</el-form-item>
</el-descriptions-item>-->
<el-descriptions-item label="是否属于校工会预算"
v-if="['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
&&['superadmin'].includes($store.state.user.loginname)" :span="2">
<el-form-item
prop="isSchoolBudget" label="是否属于校工会预算"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.isSchoolBudget">
<el-radio-button :label="true">属于</el-radio-button>
<el-radio-button :label="false">不属于</el-radio-button>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="!['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
&&!['superadmin'].includes($store.state.user.loginname)"></el-descriptions-item>
<el-descriptions-item label="校工会预算" v-if="formData.isSchoolBudget" :span="2">
<el-form-item
prop="schoolBudgetId" label="校工会预算"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
>
<el-select v-model="formData.schoolBudgetId" filterable
default-first-option
placeholder="请选择校工会预算" style="width: 100%">
<el-option :label="item.activityMatter"
:value="item.id"
:key="item.id"
v-for="item in activityList"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动内容(如训练、装备等)" :span="2">
<el-form-item
prop="activityContent" label="活动内容(如训练、装备等)">
<text-editor v-model="formData.activityContent"></text-editor>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
<script>
new Vue({
el: "#app",
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
activityList: [],
budgetTypeOption: [],
unionList: [],
clubOption: [],
formRules: {
outlayManageSource: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
activityMatter: [{required: true, message: '必填', trigger: ['blur', 'change']}],
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
helpUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
unionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
formData: {
budgetDetails: []
},
dialogVisible: false,
editType: "apply"
}
},
methods: {
async findOne(id) {
const resp = await $.get('/platform/activity/budget/applyList/findOne', {id})
if (resp.code === 0) {
if (resp.data.budgets) {
resp.data.budgets = JSON.parse(resp.data.budgets)
}
return resp.data
}
},
init() {
if (this.bizId) {
this.findOne(this.bizId).then(data => {
this.formData = data
})
} else {
this.formData = {
isSchoolBudget: false,
isRepeatReimburse: true,
budgetDetails: [],
applyDate: this.$moment().format('YYYY-MM-DD'),
userName: this.$store.state.user.username,
mobile: this.$store.state.user.mobile,
}
}
},
clubChange(val) {
const club = this.clubOption.find(c => c.id === val)
this.formData.helpUnitName = club.clubName
},
unionChange(id) {
if (id) {
const union = this.unionList.find(c => c.id === id)
this.$set(this.formData, "helpUnitName", union.unionname)
} else {
this.$set(this.formData, "helpUnitName", '')
}
},
budgetTypeCodeChange(val) {
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
this.$set(this.formData, "helpUnitName", "校工会")
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "helpUnitName", this.$store.state.user.union.name)
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
} else if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(val)) {
this.$set(this.formData, "helpUnitName", '')
this.$set(this.formData, "clubId", '')
} else {
this.$set(this.formData, "helpUnitName", "校工会")
}
if (val) {
const budgetType = this.budgetTypeOption.find(b => b.code === val)
this.$set(this.formData, "budgetTypeId", budgetType.code)
}
},
async getActivityBudgetType() {
const data = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
let budgetTypeOption = []
if (this.$auth.hasRoleOr(['SYSADMIN'])) {
this.budgetTypeOption = data
} else {
if (this.$auth.hasRoleOr(['SCHOOL_UNION_ADMIN'])) {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(['BRANCH_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])) {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(['CLUB_PRESIDENT'])) {
data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeOption
}
},
getSchoolBudget() {
this.$axios.post("/platform/activity/budget/apply/getSchoolBudget").then((res) => {
if (res.code === 0) {
this.activityList = res.data
}
})
},
// 保存
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/activity/budget/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
window.location.href = '/platform/activity/budget/applyList'
}
})
})
},
// 提交
onSubmit() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/activity/budget/apply/submit', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/activity/budget/applyList'
}
})
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
processTaskId: GetQueryString("taskId"),
submitType: 5
})
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/activity/budget/applyList'
}
})
})
},
},
async created() {
this.init()
await this.getActivityBudgetType()
await this.getSchoolBudget()
this.unionList = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
})
</script>
<!--#
}
#-->
@@ -87,11 +87,13 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.taskKey === 'startTask' || !row.instanceId">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
:disabled="![0,1].includes(row.auditState)">
v-if="row.taskKey === 'startTask' || !row.instanceId">
删除
</el-button>
</template>
@@ -101,12 +103,15 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #edit>
<template #view>
<activity-budget-info ref="activityBudgetInfo">
</activity-budget-info>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
@@ -133,10 +138,12 @@ layout("/layouts/platform.html"){
auditIds: [],
}
},
components: {},
components: {
"activity-budget-info": ACTIVITY_BUDGET_INFO
},
methods: {
openAdd() {
window.open('/flow/common/approval/form?defineKey=NDYSSB')
window.location.href = '/platform/activity/budget/apply'
},
doExport() {
},
@@ -201,14 +208,31 @@ layout("/layouts/platform.html"){
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
handleSelectionChange(val) {
this.auditIds = val.map(item => item.id)
},
openView(row) {
window.open("/flow/common/approval/form?instanceId=" + row.instanceId + "&businessId=" + row.businessNo + "")
this.$refs.guava.view(()=>{
this.showApprovalForm = false
this.$refs.activityBudgetInfo.onOpen(row)
})
},
openEdit(row) {
window.open("/flow/common/approval/form?businessId=" + row.id + "&defineKey=NDYSSB")
window.location.href = '/platform/activity/budget/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
doDelete(id) {
this.$confirm('确定删除该条数据?', '提示', {
@@ -100,10 +100,10 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary"
<!-- <el-button @click="openEdit(row)" size="mini" type="primary"
:disabled="!['superadmin'].includes($store.state.user.loginname)">
编辑
</el-button>
</el-button>-->
<el-button @click="doDelete(row.id)" size="mini" type="danger"
:disabled="!['superadmin'].includes($store.state.user.loginname)">
删除
@@ -116,13 +116,16 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #view>
<activity-budget-info ref="activityBudgetInfo"></activity-budget-info>
</template>
</guava>
</div>
<script>
<!--#include("../common/apply.js"){}#-->
<!--#include('../info.js'){}#-->
const vue = new Vue({
el: '#app',
store,
@@ -155,9 +158,9 @@ layout("/layouts/platform.html"){
}
},
components: {
"activity-budget-info": ACTIVITY_BUDGET_INFO
},
methods: {
openEdit(row) {
},
@@ -194,9 +197,11 @@ layout("/layouts/platform.html"){
this.doSearch()
this.getApplyMoney()
},
openView(row) {
window.open("/flow/common/approval/form?instanceId=" + row.instanceId + "&businessId=" + row.businessNo+"")
this.$refs.guava.view(() => {
this.showApprovalForm = false
this.$refs.activityBudgetInfo.onOpen(row)
})
},
getApplyMoney() {
this.$axios.post("/platform/activity/budget/applyStatistics/getApplyMoney", this.pageForm).then(resp => {
@@ -0,0 +1,115 @@
const ACTIVITY_BUDGET_INFO = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="申报人">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="联系方式">{{viewData.mobile}}</el-descriptions-item>
<el-descriptions-item label="预算类型">
<dict-tag :options="budgetTypeOption"
:value="viewData.outlayManageSource"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="申报(承办)单位">{{viewData.helpUnitName}}</el-descriptions-item>
<el-descriptions-item label="活动项目">{{viewData.activityMatter}}</el-descriptions-item>
<el-descriptions-item label="活动时间">{{viewData.activityDate}}</el-descriptions-item>
<el-descriptions-item label="申报预算金额(元)">{{viewData.declareTotalBudgetMoney}}
</el-descriptions-item>
<el-descriptions-item label="最终预算金额(元)">{{viewData.totalBudgetMoney}}</el-descriptions-item>
<el-descriptions-item label="申报时间">{{viewData.applyDate}}</el-descriptions-item>
<el-descriptions-item :span="2"></el-descriptions-item>
<el-descriptions-item label="活动内容(如训练、装备等)" :span="3">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="task-panel-header">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="审核金额">
{{task.ext.tf_totalBudgetMoney}}
</el-descriptions-item>
<el-descriptions-item :span="2"></el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion
}}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
viewData: {},
doneTasks: [],
budgetTypeOption: [],
row: null
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
this.visible = true
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE").then(resp => {
this.budgetTypeOption = resp
})
this.getInfo()
this.getDoneTasks()
},
// 获取申请信息
getInfo() {
this.$axios.post('/platform/activity/budget/applyList/findOne', {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
}
}
}
@@ -2,9 +2,8 @@
layout("/layouts/platform.html"){
#-->
<guava ref="guava">
<div id="app">
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
@@ -69,17 +68,50 @@ layout("/layouts/platform.html"){
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">审核</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</guava>
<template #edit>
<activity-budget-info ref="activityBudgetInfo">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审核金额" prop="tf_totalBudgetMoney"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number :min="0" :precision="2"
placeholder="请输入审核金额"
style="width: 100%"
v-model="formData.tf_totalBudgetMoney"></el-input-number>
</el-form-item>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</activity-budget-info>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
@@ -91,22 +123,77 @@ layout("/layouts/platform.html"){
clubOption: [],
unionList: [],
pageForm: {
year: moment().format("YYYY"), auditState: 2,
year: moment().format("YYYY"),
outlayManageSource: "",
activityMatter: "",
unionId: "",
clubId: "",
approval: false
},
formData: {},
showApprovalForm: false
}
},
components: {
"activity-budget-info": ACTIVITY_BUDGET_INFO
},
methods: {
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
openView(row) {
window.open("/flow/common/approval/form?instanceId=" + row.instanceId + "&businessId=" + row.businessNo+"")
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.activityBudgetInfo.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
tf_totalBudgetMoney: 0,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.activityBudgetInfo.onOpen(row)
})
},
openApproval(row) {
window.open("/flow/common/approval/form?taskId=" + row.taskId + "&instanceId=" + row.instanceId + "&businessId=" + row.businessNo)
}
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
@@ -128,127 +128,7 @@
}
},
methods: {
outlayManageSourceChange(val) {
if (!val) {
this.budgetMoney = 0
return
}
this.$set(this.formData, "budgetId", null)
this.getBudgetMoneyOrActivity()
if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
}
},
async budgetIdChange(val) {
if (val) {
if (["ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_ONE"].includes(this.formData.outlayManageSource)) {
//如果是分工会和校工会
const data = this.activityList.find(a => a.id === val)
if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
//如果是分工会
if (data.isSchoolBudget) {
//如果这一条分工会活动预算金额是属于校工会的
this.moneyPlaceholder = "预算金额" + data.totalBudgetMoney + "元"
} else {
//如果这一条分工会活动活动,并且预算金额也是自己分工会的
if (data.isRepeatReimburse) {
//如果这一条活动预算可以重复报销
const money = await this.getBxMoneyByBudgetId(val)
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
//如果如果不能重复报销暂无判断
}
}
} else {
//如果是校工会
if (data.twoLevelBudgetList.length > 0) {
//如果大于0代表肯定有分工会使用校工会的预算,这里要减去分工会的预算
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + data.twoLevelTotalBudgetMoney
} else {
if (data.isRepeatReimburse) {
const money = await this.getBxMoneyByBudgetId(val)
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
//如果如果不能重复报销暂无判断
}
}
}
this.totalBudgetMoney = data.totalBudgetMoney
this.$set(this.formData, 'activityMatter', data.activityMatter)
} else {
this.moneyPlaceholder = "预算金额" + this.budgetMoney + "元"
this.totalBudgetMoney = this.budgetMoney
this.$set(this.formData, 'activityMatter', val)
}
} else {
this.moneyPlaceholder = "请输入金额"
this.totalBudgetMoney = 0
this.$set(this.formData, 'activityMatter', null)
}
},
async getBxMoneyByBudgetId(budgetId) {
const resp = await this.$axios.post("/platform/outlay/reimburse/apply/getBxMoneyByBudgetId", {
budgetId
})
if (resp.code === 0) {
return resp.data
} else {
return 0
}
},
getBudgetMoneyOrActivity() {
this.$axios.post("/platform/outlay/reimburse/apply/getBudgetMoneyOrActivity", {
outlayManageSource: this.formData.outlayManageSource,
clubId: this.formData.clubId,
unionId: this.formData.unionId,
id: this.formData.id
}).then((resp) => {
if (resp.code === 0) {
this.budgetMoney = resp.data.budgetMoney
this.activityList = resp.data.activityList
}
})
},
init() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
} else {
if (this.$auth.hasRoleOr(["SCHOOL_OUTLAY_ADMIN", "SCHOOL_UNION_ADMIN"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_ADMIN"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeOption
}
if (this.id) {
} else {
this.formData = {
userName: this.$store.state.user.username,
loginName: this.$store.state.user.loginname,
mobile: this.$store.state.user.mobile,
}
}
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (valid) {
@@ -3,34 +3,126 @@ layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
</el-card>
<el-card shadow="never">
<table-tool>
<el-button @click="openAdd" size="small" class="ml10" type="primary">
报销申请
</el-button>
</table-tool>
<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 prop="loginName" label="经办人工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="outlayManageSource" label="活动类型"></el-table-column>
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
<el-table-column prop="helpUnitName" label="申报单位"></el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="onOpen(row.id)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<div id="app" v-cloak>
<el-card shadow="never">
<snaker-start slot="header" label="年度预算申报" define_key="FYBXSQ"></snaker-start>
<el-form :model="formData" ref="formRef" class="flow-task-form">
<el-descriptions :column="2" border>
<el-descriptions-item label="活动类型" :span="2">
<el-form-item label="活动类型" prop="outlayManageSource"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.outlayManageSource" @change="outlayManageSourceChange">
<el-radio border :label="i.code" :key="i.code" v-for="i in budgetTypeOption">
{{i.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="申报人姓名">{{formData.userName}}</el-descriptions-item>
<el-descriptions-item label="申报人工号">{{formData.loginName}}</el-descriptions-item>
<el-descriptions-item label="联系方式">
<el-form-item label="联系方式" prop="mobile"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.mobile" placeholder="请输入联系方式"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属协会"
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
<el-form-item label="所属协会" prop="clubId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select v-model="formData.clubId" @change="getBudgetMoneyOrActivity"
style="width: 100%"
placeholder="请选择所属协会">
<el-option
v-for="item in clubList"
:key="item.clubid"
:label="item.clubName"
:value="item.clubid">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="经费余额">
<el-form-item label="经费余额" prop="budgetMoney">
<el-input v-model="budgetMoney" readonly></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动事项"
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
<el-form-item label="活动事项" prop="activityMatter"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.activityMatter" placeholder="请输入活动事项"
maxlength="100"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动事项"
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
<el-form-item label="活动事项" prop="budgetId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select v-model="formData.budgetId" filterable
@change="budgetIdChange"
default-first-option
placeholder="请选择项目名称" style="width: 100%">
<el-option :label="item.activityMatter"
:value="item.id"
v-for="item in activityList"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
<el-descriptions-item label="金额" :span="2">
<el-form-item label="金额" prop="money"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.money" :placeholder="moneyPlaceholder"
type="number"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动时间">
<el-form-item label="活动时间" prop="activityTime"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-date-picker v-model="formData.activityTime"
placeholder="活动时间"
style="width: 100%" type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
<el-descriptions-item label="支付内容" :span="2">
<el-form-item label="支付内容" prop="paymentContent"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.paymentContent" :autosize="{ minRows: 4, maxRows: 8}"
maxlength="500"
placeholder="请填写支付内容" type="textarea"></el-input>
</el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="2">
<el-form-item label="附件" prop="files"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<file-upload :upload_number="10" :value.sync="formData.files"
upload_result_type="url"
complete_result upload_mode="drag"
upload_result_category="array"></file-upload>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<el-form-item label="签字" prop="userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.userSign"></pc-signature>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
<script>
new Vue({
@@ -39,18 +131,217 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/outlay/reimburse/apply/pageData"
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
budgetTypeOption: [],
clubList: [],
activityList: [],
moneyPlaceholder: "请输入金额",
budgetMoney: 0,
}
},
methods: {
openAdd() {
window.open('/flow/common/approval/form?defineKey=FYBXSQ')
// 保存
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/outlay/reimburse/apply/bxAddValidate", this.formData).then(res => {
if (res.code === 0) {
this.$axios.post('/platform/outlay/reimburse/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
window.location.href = '/platform/outlay/reimburse/applyList/index'
}
})
}
})
})
},
// 提交
onSubmit() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/outlay/reimburse/apply/bxAddValidate", this.formData).then(res => {
if (res.code === 0) {
this.$axios.post('/platform/outlay/reimburse/apply/submit', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/outlay/reimburse/applyList/index'
}
})
}
})
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/outlay/reimburse/apply/bxAddValidate", this.formData).then(res => {
if (res.code === 0) {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
processTaskId: GetQueryString("taskId"),
submitType: 5
})
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
window.location.href = '/platform/outlay/reimburse/applyList/index'
}
})
}
})
})
},
async outlayManageSourceChange(val) {
if (!val) {
this.budgetMoney = 0
return
}
this.$set(this.formData, "budgetId", null)
await this.getBudgetMoneyOrActivity()
if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
}
},
async budgetIdChange(val) {
if (val) {
if (["ACTIVITY_BUDGET_TYPE_TWO", "ACTIVITY_BUDGET_TYPE_ONE"].includes(this.formData.outlayManageSource)) {
//如果是分工会和校工会
const data = this.activityList.find(a => a.id === val)
if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
//如果是分工会
if (data.isSchoolBudget) {
//如果这一条分工会活动预算金额是属于校工会的
this.moneyPlaceholder = "预算金额" + data.totalBudgetMoney + "元"
} else {
//如果这一条分工会活动活动,并且预算金额也是自己分工会的
if (data.isRepeatReimburse) {
//如果这一条活动预算可以重复报销
const money = await this.getBxMoneyByBudgetId(val)
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
//如果如果不能重复报销暂无判断
}
}
} else {
//如果是校工会
if (data.twoLevelBudgetList.length > 0) {
//如果大于0代表肯定有分工会使用校工会的预算,这里要减去分工会的预算
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + data.twoLevelTotalBudgetMoney
} else {
if (data.isRepeatReimburse) {
const money = await this.getBxMoneyByBudgetId(val)
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
} else {
//如果如果不能重复报销暂无判断
}
}
}
this.totalBudgetMoney = data.totalBudgetMoney
this.$set(this.formData, 'activityMatter', data.activityMatter)
} else {
this.moneyPlaceholder = "预算金额" + this.budgetMoney + "元"
this.totalBudgetMoney = this.budgetMoney
this.$set(this.formData, 'activityMatter', val)
}
} else {
this.moneyPlaceholder = "请输入金额"
this.totalBudgetMoney = 0
this.$set(this.formData, 'activityMatter', null)
}
},
async getBxMoneyByBudgetId(budgetId) {
const resp = await this.$axios.post("/platform/outlay/reimburse/apply/getBxMoneyByBudgetId", {
budgetId
})
if (resp.code === 0) {
return resp.data
} else {
return 0
}
},
async getBudgetMoneyOrActivity() {
const resp = await this.$axios.post("/platform/outlay/reimburse/apply/getBudgetMoneyOrActivity", {
outlayManageSource: this.formData.outlayManageSource,
clubId: this.formData.clubId,
unionId: this.formData.unionId,
id: this.formData.id
})
if (resp.code === 0) {
this.budgetMoney = resp.data.budgetMoney
this.activityList = resp.data.activityList
}
},
async findOne(id) {
const resp = await $.get('/platform/outlay/reimburse/apply/findOne', {id})
if (resp.code === 0) {
return resp.data
}
},
init() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
} else {
if (this.$auth.hasRoleOr(["SCHOOL_OUTLAY_ADMIN", "SCHOOL_UNION_ADMIN"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_ADMIN"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeOption
}
if (this.bizId) {
this.findOne(this.bizId).then(async data => {
this.formData = data
await this.getBudgetMoneyOrActivity()
if (data.budgetId){
await this.budgetIdChange(data.budgetId)
}
})
} else {
this.formData = {
userName: this.$store.state.user.username,
loginName: this.$store.state.user.loginname,
mobile: this.$store.state.user.mobile,
}
}
},
onOpen(id) {
}
},
created() {
this.pageData()
async created() {
this.init()
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
}
})
</script>
@@ -0,0 +1,108 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
</el-card>
<el-card shadow="never">
<table-tool>
</table-tool>
<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 prop="loginName" label="经办人工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="outlayManageSource" label="活动类型">
<template v-slot="{row}">
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
<el-table-column prop="helpUnitName" label="申报单位">
<template v-slot="{row}">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.outlayManageSource)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.outlayManageSource)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.outlayManageSource)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template v-slot="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary"
v-if="row.taskKey === 'startTask' || !row.instanceId">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger"
v-if="row.taskKey === 'startTask' || !row.instanceId">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/outlay/reimburse/applyList/pageData",
budgetTypeOption: []
}
},
methods: {
openView(row) {
},
openEdit(row) {
window.location.href = '/platform/outlay/reimburse/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
doDelete(id) {
}
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,135 @@
const OUTLAY_REIMBURSE_INFO = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="申请人">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="联系方式">{{viewData.mobile}}</el-descriptions-item>
<el-descriptions-item label="预算类型">
<dict-tag :options="budgetTypeOption"
:value="viewData.outlayManageSource"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="活动事项">
{{viewData.activityMatter}}
</el-descriptions-item>
<el-descriptions-item label="申请金额">
{{viewData.money}}
</el-descriptions-item>
<el-descriptions-item label="活动时间">
{{viewData.activityTime}}
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="支付内容" :span="3">
<div style="white-space: pre-line">{{viewData.paymentContent}}</div>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="3">
<file-preview :files="viewData.files" complete_result></file-preview>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-image :src="viewData.userSign" fit="cover" style="height: 60px"
v-if="viewData.userSign"></el-image>
</el-descriptions-item>
</el-descriptions>
<template v-for="(task,index) in doneTasks">
<div class="task-panel mt10">
<div class="task-panel-header">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="明细类" v-if="!task.ext.isFirstTaskNode&&index===2" :span="3">
<dict-tag :options="detailsTypeOption"
:value="task.ext.detailsTypeId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode" :span="3">
{{
task.taskFormData.opinion
}}
</el-descriptions-item>
<el-descriptions-item label="签字" v-if="!task.ext.isFirstTaskNode" :span="3">
<el-image :src="task.ext.tf_userSign" fit="cover" style="height: 60px"
v-if="task.ext.tf_userSign"></el-image>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
viewData: {},
doneTasks: [],
budgetTypeOption: [],
detailsTypeOption: [],
row: null
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
this.visible = true
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE").then(resp => {
this.budgetTypeOption = resp
})
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE").then(resp => {
this.detailsTypeOption = resp
})
this.getInfo()
this.getDoneTasks()
},
// 获取申请信息
getInfo() {
this.$axios.post('/platform/outlay/reimburse/apply/findOne', {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
}
}
}
@@ -0,0 +1,184 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<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"
value-format="yyyy">
</el-date-picker>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<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 prop="loginName" label="经办人工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="outlayManageSource" label="活动类型">
<template v-slot="{row}">
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
<el-table-column prop="helpUnitName" label="申报单位">
<template v-slot="{row}">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.outlayManageSource)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.outlayManageSource)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.outlayManageSource)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template v-slot="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<outlay-reimburse-info ref="outlayReimburseInfo">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</outlay-reimburse-info>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/outlay/reimburse/schoolCnAudit/pageData",
budgetTypeOption: [],
pageForm: {
year: moment().format("YYYY"),
approval: false
},
showApprovalForm: false
}
},
components: {
"outlay-reimburse-info": OUTLAY_REIMBURSE_INFO
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,342 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<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"
value-format="yyyy">
</el-date-picker>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<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 prop="loginName" label="经办人工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="outlayManageSource" label="活动类型">
<template v-slot="{row}">
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
<el-table-column prop="helpUnitName" label="申报单位">
<template v-slot="{row}">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.outlayManageSource)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.outlayManageSource)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.outlayManageSource)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template v-slot="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<outlay-reimburse-info ref="outlayReimburseInfo">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="openAuditPass" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</outlay-reimburse-info>
</template>
</guava>
<el-dialog
title="提示"
:visible.sync="passDialogVisible"
width="30%">
<el-row>
<el-col :span="20">
<el-select v-model="formData.detailsTypeId"
style="width: 100%"
placeholder="请选择明细类">
<el-option
v-for="item in detailsTypeOption"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-button class="ml5" type="primary"
@click="detailsTypeDialogVisible = true">设置类型
</el-button>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="passDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doAudit">确 定</el-button>
</span>
</el-dialog>
<el-dialog
title="编辑明细类"
:visible.sync="detailsTypeDialogVisible"
width="50%">
<el-table
:data="detailsTypeList"
border
row-key="id"
style="width: 100%">
<el-table-column
type="index"
width="50" label="序号">
</el-table-column>
<el-table-column
prop="code"
label="编码">
<template slot-scope="{row}">
<el-input v-model="row.code" placeholder="请输入编码" disabled></el-input>
</template>
</el-table-column>
<el-table-column
prop="name"
label="名称" width="200">
<template slot-scope="{row}">
<el-input v-model="row.name" placeholder="请输入名称"
style="width: 100%"></el-input>
</template>
</el-table-column>
<el-table-column width="100px">
<template slot="header" slot-scope="{row}">
<el-button type="primary" size="mini"
@click="detailsTypeList.push({code:'ACTIVITY_BUDGET_DETAILS_TYPE_'+(detailsTypeList.length+1),name:''})">
添加
</el-button>
</template>
<template slot-scope="{row,$index}">
<el-button
size="mini"
type="danger"
@click="doDeleteDetailsType($index,row)">删除
</el-button>
</template>
</el-table-column>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="detailsTypeDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doSubmitDetailsType">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/outlay/reimburse/schoolKjAudit/pageData",
budgetTypeOption: [],
pageForm: {
year: moment().format("YYYY"),
approval: false
},
showApprovalForm: false,
passDialogVisible: false,
detailsTypeOption: [],
detailsTypeList: [],
detailsTypeDialogVisible: false
}
},
components: {
"outlay-reimburse-info": OUTLAY_REIMBURSE_INFO
},
methods: {
doDeleteDetailsType(index, row) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.detailsTypeList.splice(index, 1)
if (row.id) {
const res = await this.$axios.post('/platform/outlay/reimburse/schoolKjAudit/doDeleteDetailsType', {id: row.id})
if (res.code === 0) {
this.$message.success('操作成功')
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
} else {
this.$message.error(res.msg)
}
}
})
},
async doSubmitDetailsType() {
const res = await this.$axios.post("/platform/outlay/reimburse/schoolKjAudit/doSubmitDetailsType", {detailsTypeList: JSON.stringify(this.detailsTypeList)})
if (res.code === 0) {
this.$message({
type: 'success',
message: '保存成功!'
});
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
this.detailsTypeList = clone(this.detailsTypeOption)
this.detailsTypeDialogVisible = false
} else {
this.$message({
type: 'error',
message: res.msg
});
}
},
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
openAuditPass() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.passDialogVisible = true;
this.$set(this.formData, "detailsTypeId", null)
}
})
},
doAudit() {
if (!this.formData.detailsTypeId) {
this.$message.error("请选择明细类")
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: 1
})
}).then((res) => {
if (res.code === 0) {
this.passDialogVisible = false
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
this.detailsTypeList = clone(this.detailsTypeOption)
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,184 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<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"
value-format="yyyy">
</el-date-picker>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<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 prop="loginName" label="经办人工号"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="outlayManageSource" label="活动类型">
<template v-slot="{row}">
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
<el-table-column prop="helpUnitName" label="申报单位">
<template v-slot="{row}">
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.outlayManageSource)">校工会</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.outlayManageSource)">{{row.unionName}}</span>
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.outlayManageSource)">{{row.clubName}}</span>
</template>
</el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template v-slot="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<outlay-reimburse-info ref="outlayReimburseInfo">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="签字" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</outlay-reimburse-info>
</template>
</guava>
</div>
<script>
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/outlay/reimburse/schoolZxAudit/pageData",
budgetTypeOption: [],
pageForm: {
year: moment().format("YYYY"),
approval: false
},
showApprovalForm: false
}
},
components: {
"outlay-reimburse-info": OUTLAY_REIMBURSE_INFO
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.outlayReimburseInfo.onOpen(row)
})
},
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -35,13 +35,13 @@ layout("/layouts/platform.html"){
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="办证年">
<search-item label="办证年">
<el-date-picker
format="yyyy"
value-format="yyyy"
v-model="pageForm.thirtyCertificateProcessingTime"
type="year"
placeholder="请选择荣誉证办理年月"
placeholder="请选择荣誉证办理办证年份"
style="width: 100%">
</el-date-picker>
</search-item>
@@ -95,6 +95,7 @@ layout("/layouts/platform.html"){
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:width="column.width"
:key="column.prop"
:sortable="column.sortable"
>
@@ -106,12 +107,30 @@ layout("/layouts/platform.html"){
<i class="fa fa-circle ml5"></i>
</span>
</template>
<template v-else-if="column.prop==='thirtyCertificateProcessingTime'" v-slot="{row}">
<span v-if="row.isEditThirtyCertificateProcessingTime">
<el-date-picker
style="width: 100%;"
v-model="row.thirtyCertificateProcessingTime"
type="month"
placeholder="选择日期时间"
@change="rowThirtyCertificateProcessingTimeChange(row)"
value-format="yyyy-MM">
</el-date-picker>
</span>
<span v-else>
{{row.thirtyCertificateProcessingTime}}
</span>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="180px">
<template slot-scope="{row}">
<!-- <el-button size="mini" type="primary" @click="openView(row.id)">查看</el-button>-->
<el-button size="mini" type="primary"
@click="row.isEditThirtyCertificateProcessingTime=1">编辑
</el-button>
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
</template>
</el-table-column>
@@ -122,7 +141,8 @@ layout("/layouts/platform.html"){
<template #edit>
<file-import ref="viewImport" temp_url="/platform/thirtyTeach/manage/downloadImportTemp"
post_url="/platform/thirtyTeach/manage/doImport" is_show_radio @flush="$refs.guava.index();pageData()"
post_url="/platform/thirtyTeach/manage/doImport" is_show_radio
@flush="$refs.guava.index();pageData()"
></file-import>
</template>
</guava>
@@ -175,7 +195,7 @@ layout("/layouts/platform.html"){
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'member', label: '是否会员', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'thirtyCertificateProcessingTime', label: '《30年教龄荣誉证》办理年月'},
{prop: 'thirtyCertificateProcessingTime', label: '《30年教龄荣誉证》办理年月', width: 200},
],
setThirtyTeachVisible: false,
@@ -197,8 +217,25 @@ layout("/layouts/platform.html"){
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
},
methods: {
rowThirtyCertificateProcessingTimeChange(row) {
row.isEditThirtyCertificateProcessingTime = false
this.$axios.post('/platform/thirtyTeach/manage/doEditThirtyCertificateProcessingTime', {
thirtyCertificateProcessingTime: row.thirtyCertificateProcessingTime,
id: row.id,
}).then(resp => {
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
openEdit(row) {
},
openImport() {
this.$refs.guava.edit(()=>{
this.$refs.guava.edit(() => {
this.$refs.viewImport.resetImportData()
})
@@ -263,7 +300,7 @@ layout("/layouts/platform.html"){
},
openView() {
},
async doDelete(userId) {
async doDelete(userId) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',