update
This commit is contained in:
parent
f5a7076b91
commit
04178c4d38
|
@ -57,11 +57,13 @@ public interface WorkFlowWrapper extends BaseWrapper<WorkFlow, WorkFlowDto> {
|
||||||
|
|
||||||
List<WorkFlowStep> workFlowStepList = workFlowStepService.list(new QueryWrapper<WorkFlowStep>().lambda()
|
List<WorkFlowStep> workFlowStepList = workFlowStepService.list(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
.eq(WorkFlowStep::getFlowId, obj.getId())
|
.eq(WorkFlowStep::getFlowId, obj.getId())
|
||||||
|
.orderByAsc(WorkFlowStep::getStep, WorkFlowStep::getCreatedAt)
|
||||||
);
|
);
|
||||||
|
|
||||||
List<WorkFlowStepLog> workFlowStepLogList =
|
List<WorkFlowStepLog> workFlowStepLogList =
|
||||||
workFlowStepLogService.list(new QueryWrapper<WorkFlowStepLog>().lambda()
|
workFlowStepLogService.list(new QueryWrapper<WorkFlowStepLog>().lambda()
|
||||||
.eq(WorkFlowStepLog::getFlowId, obj.getId())
|
.eq(WorkFlowStepLog::getFlowId, obj.getId())
|
||||||
|
.orderByAsc(WorkFlowStepLog::getStep, WorkFlowStepLog::getCreatedAt)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,7 @@ package com.ydool.oa.workFlow.engine.service;
|
||||||
|
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
|
||||||
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
import com.ydool.oa.workFlow.data.vo.WorkFlowVo;
|
|
||||||
|
|
||||||
public interface IWorkFlowType {
|
public interface IWorkFlowType {
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,151 @@
|
||||||
|
package com.ydool.oa.workFlow.engine.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowNotice;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStepLog;
|
||||||
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
|
import com.ydool.oa.workFlow.engine.service.IWorkFlowType;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowNoticeService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepService;
|
||||||
|
import com.ydool.system.entity.Config;
|
||||||
|
import com.ydool.system.entity.Job;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.service.impl.ConfigServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.JobServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class BudgetWorkFlowService implements IWorkFlowType {
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowService workFlowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepService workFlowStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepLogService workFlowStepLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowNoticeService workFlowNoticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserServiceImpl userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobServiceImpl jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigServiceImpl configService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult first(WorkFlow workFlow) {
|
||||||
|
// 1.流程step+1
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 2.找到领导账号
|
||||||
|
Config leadership = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "leadership")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
|
User leadershipUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, leadership.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
leadershipUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 4.通知领导账号
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, leadershipUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("发起成功") : AjaxResult.fail("发起失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult execute(WorkFlowStepVo vo, WorkFlow workFlow) {
|
||||||
|
// 1.查询当前流程环节 并且执行人是当前登录人
|
||||||
|
WorkFlowStep workFlowStep = workFlowStepService.getOne(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
|
.eq(WorkFlowStep::getFlowId, workFlow.getId())
|
||||||
|
.eq(WorkFlowStep::getStep, workFlow.getStep())
|
||||||
|
.eq(WorkFlowStep::getUserId, StpUtil.getLoginIdAsString())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.判断执行哪个方法
|
||||||
|
switch (workFlow.getStep()) {
|
||||||
|
case 2:
|
||||||
|
// 2.1 预算申请第二步 领导账号审批
|
||||||
|
return second(vo, workFlow, workFlowStep);
|
||||||
|
default:
|
||||||
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public AjaxResult second(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep){
|
||||||
|
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程完结
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.END.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.PASS.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.添加完结流程环节
|
||||||
|
WorkFlowStep doneWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.END.getType(),
|
||||||
|
StpUtil.getLoginIdAsString(), WorkFlowStepStatusEnum.DONE.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(doneWorkFlowStep);
|
||||||
|
|
||||||
|
// 5.记录完结流程环节日志
|
||||||
|
WorkFlowStepLog doneWorkFlowStepLog = new WorkFlowStepLog(doneWorkFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
|
// 6.通知发起人账号
|
||||||
|
String title =
|
||||||
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"已通过审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, workFlow.getUserId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "budget";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
package com.ydool.oa.workFlow.engine.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowNotice;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStepLog;
|
||||||
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
|
import com.ydool.oa.workFlow.engine.service.IWorkFlowType;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowNoticeService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepService;
|
||||||
|
import com.ydool.system.entity.Config;
|
||||||
|
import com.ydool.system.entity.Job;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.service.impl.ConfigServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.JobServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DrugWorkFlowService implements IWorkFlowType {
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowService workFlowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepService workFlowStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepLogService workFlowStepLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowNoticeService workFlowNoticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserServiceImpl userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobServiceImpl jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigServiceImpl configService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult first(WorkFlow workFlow) {
|
||||||
|
// 1.流程step+1
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 2.找到保管人账号
|
||||||
|
Config keeper = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "keeper")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
|
User keeperUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, keeper.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
keeperUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 4.通知保管人账号
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, keeperUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("发起成功") : AjaxResult.fail("发起失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult execute(WorkFlowStepVo vo, WorkFlow workFlow) {
|
||||||
|
// 1.查询当前流程环节 并且执行人是当前登录人
|
||||||
|
WorkFlowStep workFlowStep = workFlowStepService.getOne(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
|
.eq(WorkFlowStep::getFlowId, workFlow.getId())
|
||||||
|
.eq(WorkFlowStep::getStep, workFlow.getStep())
|
||||||
|
.eq(WorkFlowStep::getUserId, StpUtil.getLoginIdAsString())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.判断执行哪个方法
|
||||||
|
switch (workFlow.getStep()) {
|
||||||
|
case 2:
|
||||||
|
// 2.1 药剂领用第二步 保管人账号审批
|
||||||
|
return second(vo, workFlow, workFlowStep);
|
||||||
|
default:
|
||||||
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public AjaxResult second(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep){
|
||||||
|
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程完结
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.END.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.PASS.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.添加完结流程环节
|
||||||
|
WorkFlowStep doneWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.END.getType(),
|
||||||
|
StpUtil.getLoginIdAsString(), WorkFlowStepStatusEnum.DONE.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(doneWorkFlowStep);
|
||||||
|
|
||||||
|
// 5.记录完结流程环节日志
|
||||||
|
WorkFlowStepLog doneWorkFlowStepLog = new WorkFlowStepLog(doneWorkFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
|
// 6.通知发起人账号
|
||||||
|
String title =
|
||||||
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"已通过审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, workFlow.getUserId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "drug";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,323 @@
|
||||||
|
package com.ydool.oa.workFlow.engine.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowNotice;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStepLog;
|
||||||
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
|
import com.ydool.oa.workFlow.engine.service.IWorkFlowType;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowNoticeService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepService;
|
||||||
|
import com.ydool.system.entity.Config;
|
||||||
|
import com.ydool.system.entity.Dept;
|
||||||
|
import com.ydool.system.entity.Job;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.service.impl.ConfigServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.DeptServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.JobServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class FumigationWorkFlowService implements IWorkFlowType {
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowService workFlowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepService workFlowStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepLogService workFlowStepLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowNoticeService workFlowNoticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserServiceImpl userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobServiceImpl jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigServiceImpl configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeptServiceImpl deptService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult first(WorkFlow workFlow) {
|
||||||
|
// 1.流程step+1
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 2.找到库点负责人账号
|
||||||
|
Job libraryPointManager = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
|
.eq(Job::getCode, "library_point_manager")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
|
User libraryPointManagerUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getDept, user.getDept())
|
||||||
|
.eq(User::getJob, libraryPointManager.getId())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
libraryPointManagerUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 4.通知库点负责人账号
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, libraryPointManagerUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("发起成功") : AjaxResult.fail("发起失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult execute(WorkFlowStepVo vo, WorkFlow workFlow) {
|
||||||
|
// 1.查询当前流程环节 并且执行人是当前登录人
|
||||||
|
WorkFlowStep workFlowStep = workFlowStepService.getOne(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
|
.eq(WorkFlowStep::getFlowId, workFlow.getId())
|
||||||
|
.eq(WorkFlowStep::getStep, workFlow.getStep())
|
||||||
|
.eq(WorkFlowStep::getUserId, StpUtil.getLoginIdAsString())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.判断执行哪个方法
|
||||||
|
switch (workFlow.getStep()) {
|
||||||
|
case 2:
|
||||||
|
// 2.1 熏蒸申报第二步 库点负责人账号审批
|
||||||
|
return second(vo, workFlow, workFlowStep);
|
||||||
|
case 3:
|
||||||
|
// 2.2 熏蒸申报第三步 业务科部门的人员账号审批
|
||||||
|
return third(vo, workFlow, workFlowStep);
|
||||||
|
case 4:
|
||||||
|
// 2.3 熏蒸申报第四步 分管负责人账号审批
|
||||||
|
return fourth(vo, workFlow, workFlowStep);
|
||||||
|
case 5:
|
||||||
|
// 2.3 熏蒸申报第五步 粮食科部门的人员账号审批
|
||||||
|
return fifth(vo, workFlow, workFlowStep);
|
||||||
|
default:
|
||||||
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult second(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到业务科部门的人员账号
|
||||||
|
Dept businessDept = deptService.getOne(new QueryWrapper<Dept>().lambda()
|
||||||
|
.eq(Dept::getName, "综合管理部")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
Job businessJob = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
|
.eq(Job::getCode, "business_dept")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
List<User> businessDeptUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getDept, businessDept.getId())
|
||||||
|
.eq(User::getJob, businessJob.getId())
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
List<WorkFlowStep> nextWorkFlowStepList = new ArrayList<WorkFlowStep>();
|
||||||
|
businessDeptUserList.forEach(businessDeptUser -> {
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
businessDeptUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
nextWorkFlowStepList.add(nextWorkFlowStep);
|
||||||
|
});
|
||||||
|
flag = workFlowStepService.saveBatch(nextWorkFlowStepList);
|
||||||
|
|
||||||
|
// 6.通知业务科部门的人员账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
List<WorkFlowNotice> workFlowNoticeList = new ArrayList<WorkFlowNotice>();
|
||||||
|
businessDeptUserList.forEach(businessDeptUser -> {
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, businessDeptUser.getId());
|
||||||
|
workFlowNoticeList.add(workFlowNotice);
|
||||||
|
});
|
||||||
|
flag = workFlowNoticeService.saveBatch(workFlowNoticeList);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult third(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到分管负责人账号
|
||||||
|
Config responsiblePerson = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "responsible.person")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User responsiblePersonUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, responsiblePerson.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
responsiblePersonUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 6.通知分管负责人账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, responsiblePersonUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult fourth(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到粮食科部门的人员账号
|
||||||
|
Dept grainDept = deptService.getOne(new QueryWrapper<Dept>().lambda()
|
||||||
|
.eq(Dept::getName, "综合管理部")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
Job grainJob = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
|
.eq(Job::getCode, "grain_dept")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
List<User> grainDeptUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getDept, grainDept.getId())
|
||||||
|
.eq(User::getJob, grainJob.getId())
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
List<WorkFlowStep> nextWorkFlowStepList = new ArrayList<WorkFlowStep>();
|
||||||
|
grainDeptUserList.forEach(grainDeptUser -> {
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
grainDeptUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
nextWorkFlowStepList.add(nextWorkFlowStep);
|
||||||
|
});
|
||||||
|
flag = workFlowStepService.saveBatch(nextWorkFlowStepList);
|
||||||
|
|
||||||
|
// 6.通知粮食科部门的人员账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
List<WorkFlowNotice> workFlowNoticeList = new ArrayList<WorkFlowNotice>();
|
||||||
|
grainDeptUserList.forEach(grainDeptUser -> {
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, grainDeptUser.getId());
|
||||||
|
workFlowNoticeList.add(workFlowNotice);
|
||||||
|
});
|
||||||
|
flag = workFlowNoticeService.saveBatch(workFlowNoticeList);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult fifth(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程完结
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.END.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.PASS.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.添加完结流程环节
|
||||||
|
WorkFlowStep doneWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.END.getType(),
|
||||||
|
StpUtil.getLoginIdAsString(), WorkFlowStepStatusEnum.DONE.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(doneWorkFlowStep);
|
||||||
|
|
||||||
|
// 5.记录完结流程环节日志
|
||||||
|
WorkFlowStepLog doneWorkFlowStepLog = new WorkFlowStepLog(doneWorkFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
|
// 6.通知发起人
|
||||||
|
String title =
|
||||||
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"已通过审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, workFlow.getUserId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "fumigation";
|
||||||
|
}
|
||||||
|
}
|
|
@ -61,7 +61,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
boolean flag = workFlowService.updateById(workFlow);
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
// 2.找到上级领导
|
// 2.找到上级领导账号
|
||||||
Job superior = jobService.getOne(new QueryWrapper<Job>().lambda()
|
Job superior = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
.eq(Job::getCode, "superior")
|
.eq(Job::getCode, "superior")
|
||||||
.last("limit 1")
|
.last("limit 1")
|
||||||
|
@ -78,7 +78,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
superiorUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
superiorUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
flag = workFlowStepService.save(nextWorkFlowStep);
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
// 4.通知上级领导
|
// 4.通知上级领导账号
|
||||||
String title =
|
String title =
|
||||||
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
"待您审批";
|
"待您审批";
|
||||||
|
@ -104,10 +104,10 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
// 2.判断执行哪个方法
|
// 2.判断执行哪个方法
|
||||||
switch (workFlow.getStep()) {
|
switch (workFlow.getStep()) {
|
||||||
case 2:
|
case 2:
|
||||||
// 2.1 请假流程第二步 上级领导审批
|
// 2.1 请假流程第二步 上级领导账号审批
|
||||||
return second(vo, workFlow, workFlowStep);
|
return second(vo, workFlow, workFlowStep);
|
||||||
case 3:
|
case 3:
|
||||||
// 2.2 请假流程第三步 总经理审批
|
// 2.2 请假流程第三步 总经理账号审批
|
||||||
return third(vo, workFlow, workFlowStep);
|
return third(vo, workFlow, workFlowStep);
|
||||||
default:
|
default:
|
||||||
return AjaxResult.fail("流程环节错误");
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
@ -132,7 +132,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
flag = workFlowService.updateById(workFlow);
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
// 4.找到总经理
|
// 4.找到总经理账号
|
||||||
Config generalManager = configService.getOne(new QueryWrapper<Config>().lambda()
|
Config generalManager = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
.eq(Config::getParamKey, "general.manager")
|
.eq(Config::getParamKey, "general.manager")
|
||||||
.last("limit 1")
|
.last("limit 1")
|
||||||
|
@ -147,7 +147,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
generalManagerUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
generalManagerUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
flag = workFlowStepService.save(nextWorkFlowStep);
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
// 6.通知总经理
|
// 6.通知总经理账号
|
||||||
User user = userService.getById(workFlow.getUserId());
|
User user = userService.getById(workFlow.getUserId());
|
||||||
String title =
|
String title =
|
||||||
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
@ -185,7 +185,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
// 6.通知发起人
|
// 6.通知发起人账号
|
||||||
String title =
|
String title =
|
||||||
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
"已通过审批";
|
"已通过审批";
|
||||||
|
|
|
@ -0,0 +1,264 @@
|
||||||
|
package com.ydool.oa.workFlow.engine.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowNotice;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStepLog;
|
||||||
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
|
import com.ydool.oa.workFlow.engine.service.IWorkFlowType;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowNoticeService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepService;
|
||||||
|
import com.ydool.system.entity.Config;
|
||||||
|
import com.ydool.system.entity.Dept;
|
||||||
|
import com.ydool.system.entity.Job;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.service.impl.ConfigServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.DeptServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.JobServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class RepairWorkFlowService implements IWorkFlowType {
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowService workFlowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepService workFlowStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepLogService workFlowStepLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowNoticeService workFlowNoticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserServiceImpl userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobServiceImpl jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigServiceImpl configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeptServiceImpl deptService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult first(WorkFlow workFlow) {
|
||||||
|
// 1.流程step+1
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 2.找到库点负责人账号
|
||||||
|
Job libraryPointManager = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
|
.eq(Job::getCode, "library_point_manager")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
|
User libraryPointManagerUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getDept, user.getDept())
|
||||||
|
.eq(User::getJob, libraryPointManager.getId())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
libraryPointManagerUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 4.通知库点负责人账号
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, libraryPointManagerUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("发起成功") : AjaxResult.fail("发起失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult execute(WorkFlowStepVo vo, WorkFlow workFlow) {
|
||||||
|
// 1.查询当前流程环节 并且执行人是当前登录人
|
||||||
|
WorkFlowStep workFlowStep = workFlowStepService.getOne(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
|
.eq(WorkFlowStep::getFlowId, workFlow.getId())
|
||||||
|
.eq(WorkFlowStep::getStep, workFlow.getStep())
|
||||||
|
.eq(WorkFlowStep::getUserId, StpUtil.getLoginIdAsString())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.判断执行哪个方法
|
||||||
|
switch (workFlow.getStep()) {
|
||||||
|
case 2:
|
||||||
|
// 2.1维修决算申报第二步 库点负责人账号审批
|
||||||
|
return second(vo, workFlow, workFlowStep);
|
||||||
|
case 3:
|
||||||
|
// 2.2 维修决算申报第三步 业务科部门的人员账号审批
|
||||||
|
return third(vo, workFlow, workFlowStep);
|
||||||
|
case 4:
|
||||||
|
// 2.3 维修决算申报第四步 分管负责人账号审批
|
||||||
|
return fourth(vo, workFlow, workFlowStep);
|
||||||
|
default:
|
||||||
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult second(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到业务科部门的人员账号
|
||||||
|
Dept businessDept = deptService.getOne(new QueryWrapper<Dept>().lambda()
|
||||||
|
.eq(Dept::getName, "综合管理部")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
Job businessJob = jobService.getOne(new QueryWrapper<Job>().lambda()
|
||||||
|
.eq(Job::getCode, "business_dept")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
List<User> businessDeptUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getDept, businessDept.getId())
|
||||||
|
.eq(User::getJob, businessJob.getId())
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
List<WorkFlowStep> nextWorkFlowStepList = new ArrayList<WorkFlowStep>();
|
||||||
|
businessDeptUserList.forEach(businessDeptUser -> {
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
businessDeptUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
nextWorkFlowStepList.add(nextWorkFlowStep);
|
||||||
|
});
|
||||||
|
flag = workFlowStepService.saveBatch(nextWorkFlowStepList);
|
||||||
|
|
||||||
|
// 6.通知业务科部门的人员账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
List<WorkFlowNotice> workFlowNoticeList = new ArrayList<WorkFlowNotice>();
|
||||||
|
businessDeptUserList.forEach(businessDeptUser -> {
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, businessDeptUser.getId());
|
||||||
|
workFlowNoticeList.add(workFlowNotice);
|
||||||
|
});
|
||||||
|
flag = workFlowNoticeService.saveBatch(workFlowNoticeList);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult third(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到分管负责人账号
|
||||||
|
Config responsiblePerson = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "responsible.person")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User responsiblePersonUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, responsiblePerson.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
responsiblePersonUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 6.通知分管负责人账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, responsiblePersonUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult fourth(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程完结
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.END.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.PASS.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.添加完结流程环节
|
||||||
|
WorkFlowStep doneWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.END.getType(),
|
||||||
|
StpUtil.getLoginIdAsString(), WorkFlowStepStatusEnum.DONE.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(doneWorkFlowStep);
|
||||||
|
|
||||||
|
// 5.记录完结流程环节日志
|
||||||
|
WorkFlowStepLog doneWorkFlowStepLog = new WorkFlowStepLog(doneWorkFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
|
// 6.通知发起人
|
||||||
|
String title =
|
||||||
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"已通过审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, workFlow.getUserId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "repair";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,198 @@
|
||||||
|
package com.ydool.oa.workFlow.engine.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlow;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowNotice;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStep;
|
||||||
|
import com.ydool.oa.workFlow.data.entity.WorkFlowStepLog;
|
||||||
|
import com.ydool.oa.workFlow.data.vo.WorkFlowStepVo;
|
||||||
|
import com.ydool.oa.workFlow.engine.service.IWorkFlowType;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowNoticeService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
|
||||||
|
import com.ydool.oa.workFlow.service.WorkFlowStepService;
|
||||||
|
import com.ydool.system.entity.Config;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.service.impl.ConfigServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.JobServiceImpl;
|
||||||
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class RotationWorkFlowService implements IWorkFlowType {
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowService workFlowService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepService workFlowStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowStepLogService workFlowStepLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowNoticeService workFlowNoticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserServiceImpl userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobServiceImpl jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigServiceImpl configService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult first(WorkFlow workFlow) {
|
||||||
|
|
||||||
|
// 1.流程step+1
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
boolean flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 2.找到公司账号
|
||||||
|
Config company = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "company")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
|
User companyUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, company.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
companyUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 4.通知公司账号
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, companyUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("发起成功") : AjaxResult.fail("发起失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult execute(WorkFlowStepVo vo, WorkFlow workFlow) {
|
||||||
|
// 1.查询当前流程环节 并且执行人是当前登录人
|
||||||
|
WorkFlowStep workFlowStep = workFlowStepService.getOne(new QueryWrapper<WorkFlowStep>().lambda()
|
||||||
|
.eq(WorkFlowStep::getFlowId, workFlow.getId())
|
||||||
|
.eq(WorkFlowStep::getStep, workFlow.getStep())
|
||||||
|
.eq(WorkFlowStep::getUserId, StpUtil.getLoginIdAsString())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.判断执行哪个方法
|
||||||
|
switch (workFlow.getStep()) {
|
||||||
|
case 2:
|
||||||
|
// 2.1 轮换申报第二步 公司账号审批
|
||||||
|
return second(vo, workFlow, workFlowStep);
|
||||||
|
case 3:
|
||||||
|
// 2.2 轮换申报第三步 发改局账号审批
|
||||||
|
return third(vo, workFlow, workFlowStep);
|
||||||
|
default:
|
||||||
|
return AjaxResult.fail("流程环节错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult second(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程step+1 进入下一步
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.APPROVAL.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.ACTIVE.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.找到发改局账号
|
||||||
|
Config developmentAndReformBureau = configService.getOne(new QueryWrapper<Config>().lambda()
|
||||||
|
.eq(Config::getParamKey, "development.and.reform.bureau")
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
User developmentAndReformBureauUser = userService.getOne(new QueryWrapper<User>().lambda()
|
||||||
|
.eq(User::getLoginName, developmentAndReformBureau.getParamValue())
|
||||||
|
.last("limit 1")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 5.添加下一步流程环节
|
||||||
|
WorkFlowStep nextWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.APPROVAL.getType(),
|
||||||
|
developmentAndReformBureauUser.getId(), WorkFlowStepStatusEnum.NOT_START.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(nextWorkFlowStep);
|
||||||
|
|
||||||
|
// 6.通知发改局账号
|
||||||
|
User user = userService.getById(workFlow.getUserId());
|
||||||
|
String title =
|
||||||
|
user.getUserName() + "的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"待您审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, developmentAndReformBureauUser.getId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
public AjaxResult third(WorkFlowStepVo vo, WorkFlow workFlow, WorkFlowStep workFlowStep) {
|
||||||
|
|
||||||
|
// 1.流程环节进行变更
|
||||||
|
workFlowStep.setStatus(WorkFlowStepStatusEnum.PASS.getStatus());
|
||||||
|
workFlowStep.setRemarks(vo.getRemarks());
|
||||||
|
boolean flag = workFlowStepService.updateById(workFlowStep);
|
||||||
|
|
||||||
|
// 2.记录流程环节日志
|
||||||
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
|
// 3.流程完结
|
||||||
|
workFlow.setStep(workFlow.getStep() + 1);
|
||||||
|
workFlow.setStepType(WorkFlowStepTypeEnum.END.getType());
|
||||||
|
workFlow.setStatus(WorkFlowStatusEnum.PASS.getStatus());
|
||||||
|
flag = workFlowService.updateById(workFlow);
|
||||||
|
|
||||||
|
// 4.添加完结流程环节
|
||||||
|
WorkFlowStep doneWorkFlowStep = new WorkFlowStep(workFlow, WorkFlowStepTypeEnum.END.getType(),
|
||||||
|
StpUtil.getLoginIdAsString(), WorkFlowStepStatusEnum.DONE.getStatus(), "");
|
||||||
|
flag = workFlowStepService.save(doneWorkFlowStep);
|
||||||
|
|
||||||
|
// 5.记录完结流程环节日志
|
||||||
|
WorkFlowStepLog doneWorkFlowStepLog = new WorkFlowStepLog(doneWorkFlowStep, workFlow.getData());
|
||||||
|
flag = workFlowStepLogService.save(doneWorkFlowStepLog);
|
||||||
|
|
||||||
|
|
||||||
|
// 6.通知发起人
|
||||||
|
String title =
|
||||||
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() +
|
||||||
|
"已通过审批";
|
||||||
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice(title, workFlow, workFlow.getUserId());
|
||||||
|
flag = workFlowNoticeService.save(workFlowNotice);
|
||||||
|
|
||||||
|
return flag ? AjaxResult.ok().msg("审批成功") : AjaxResult.fail("审批失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "rotation";
|
||||||
|
}
|
||||||
|
}
|
|
@ -160,7 +160,7 @@ public class WorkFlowService extends BaseService<WorkFlowMapper, WorkFlow> {
|
||||||
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
WorkFlowStepLog workFlowStepLog = new WorkFlowStepLog(workFlowStep, workFlow.getData());
|
||||||
flag = workFlowStepLogService.save(workFlowStepLog);
|
flag = workFlowStepLogService.save(workFlowStepLog);
|
||||||
|
|
||||||
// 4.发送消息通知给发起人
|
// 4.发送消息通知给发起人账号
|
||||||
User user = userService.getById(StpUtil.getLoginIdAsString());
|
User user = userService.getById(StpUtil.getLoginIdAsString());
|
||||||
String title =
|
String title =
|
||||||
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() + "已被" + user.getUserName() + "驳回";
|
"您的" + WorkFlowTypeEnum.valueOf(workFlow.getType().toUpperCase()).getName() + "已被" + user.getUserName() + "驳回";
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class DeptController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 部门列表
|
* 部门列表
|
||||||
*
|
*
|
||||||
* @param value
|
* @parm value
|
||||||
* @param column
|
* @param column
|
||||||
* @param orderBy
|
* @param orderBy
|
||||||
* @return
|
* @return
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{f as g,h,ag as v,o as s,S as D,T as w,a as o,U as _,Z as V,Y as d,c as r,a7 as b,F as k,a0 as B}from"./@vue-5dd246aa.js";/* empty css */import{_ as x}from"./_plugin-vue_export-helper-c27b6911.js";const C={class:"notification-detail"},L=["innerHTML"],y={class:"notification-detail-files"},T=["onClick"],U={__name:"DetailDialog",props:{dialogVisible:{type:Boolean},dialogData:{}},emits:["update:dialogVisible"],setup(e,{emit:u}){const c=e,l=g(!1),f=t=>{http.downloadFile("/api/alteration/download",{params:{fileName:t.name,path:t.path},responseType:"blob"}).then(i=>{const n=window.URL.createObjectURL(i),a=document.createElement("a");a.download=t.name,a.href=n,a.click()})},m=t=>{u("update:dialogVisible",!1),t()};return h(()=>c.dialogVisible,()=>{c.dialogVisible&&(l.value=!0)},{immediate:!0}),(t,i)=>{const n=v("el-dialog");return s(),D(n,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=a=>l.value=a),title:"通知查看",width:"60%","before-close":m},{default:w(()=>[o("div",C,[_(o("div",{class:"notification-time"},d(e.dialogData.updatedAt),513),[[V,e.dialogData.updatedAt]]),o("h3",null,d(e.dialogData.title),1),o("div",{innerHTML:e.dialogData.content,class:"notification-detail-content"},null,8,L),o("div",y,[(s(!0),r(k,null,b(e.dialogData.files,(a,p)=>(s(),r("span",{class:"fileBox",key:p,onClick:B(F=>f(a),["stop"])},[o("span",null,d(a.name),1)],8,T))),128))])])]),_:1},8,["modelValue"])}}},E=x(U,[["__scopeId","data-v-7f0ad311"]]);export{E as default};
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
System.register(["./@vue-legacy-4de3d5b5.js","./DetailDialog.vue_vue_type_style_index_0_scoped_7f0ad311_lang-legacy-dbc5ca3b.js","./_plugin-vue_export-helper-legacy-762b7923.js"],(function(e,a){"use strict";var l,t,i,o,n,d,s,c,u,p,r,g,f,m,_;return{setters:[e=>{l=e.f,t=e.h,i=e.ag,o=e.o,n=e.S,d=e.T,s=e.a,c=e.U,u=e.Z,p=e.Y,r=e.c,g=e.a7,f=e.F,m=e.a0},null,e=>{_=e._}],execute:function(){const a={class:"notification-detail"},v=["innerHTML"],D={class:"notification-detail-files"},b=["onClick"],h={__name:"DetailDialog",props:{dialogVisible:{type:Boolean},dialogData:{}},emits:["update:dialogVisible"],setup(e,{emit:_}){const h=e,y=l(!1),V=e=>{_("update:dialogVisible",!1),e()};return t((()=>h.dialogVisible),(()=>{h.dialogVisible&&(y.value=!0)}),{immediate:!0}),(l,t)=>{const _=i("el-dialog");return o(),n(_,{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=e=>y.value=e),title:"通知查看",width:"60%","before-close":V},{default:d((()=>[s("div",a,[c(s("div",{class:"notification-time"},p(e.dialogData.updatedAt),513),[[u,e.dialogData.updatedAt]]),s("h3",null,p(e.dialogData.title),1),s("div",{innerHTML:e.dialogData.content,class:"notification-detail-content"},null,8,v),s("div",D,[(o(!0),r(f,null,g(e.dialogData.files,((e,a)=>(o(),r("span",{class:"fileBox",key:a,onClick:m((a=>(e=>{http.downloadFile("/api/alteration/download",{params:{fileName:e.name,path:e.path},responseType:"blob"}).then((a=>{const l=window.URL.createObjectURL(a),t=document.createElement("a");t.download=e.name,t.href=l,t.click()}))})(e)),["stop"])},[s("span",null,p(e.name),1)],8,b)))),128))])])])),_:1},8,["modelValue"])}}};e("default",_(h,[["__scopeId","data-v-7f0ad311"]]))}}}));
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import T from"./Upload-a9b46e5a.js";import{h as _}from"./index-4d581369.js";import{c as $}from"./lodash.clonedeep-2f114c62.js";import{_ as I}from"./_plugin-vue_export-helper-c27b6911.js";import{E as f}from"./element-plus-a215fcb5.js";import{l as v,f as p,a1 as J,k as M,ag as d,o as x,S as D,T as o,a as g,X as C,W as j,d as t,u as b,O as z}from"./@vue-5dd246aa.js";/* empty css */import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const E={class:"tab-content"},P={class:"dialog-footer"},W={__name:"DocumentDialog",emits:["init"],setup(X,{expose:U,emit:V}){const c=v(()=>!["create","edit"].includes(u.value));v(()=>u==="create"),v(()=>u==="edit");const k=p();let N={files:[],remarks:void 0,serialNumber:"",title:""};const l=p({...N}),F=J({title:[{required:!0,message:"请输入标题",trigger:"blur"}],serialNumber:[{required:!0,message:"请输入编号",trigger:"blur"}],files:[{required:!0,message:"请上传文件",trigger:"blur"}]}),r=p(!1),u=p(""),y=p(""),S=(i,e)=>{i==="create"?(r.value=!r.value,u.value="create",l.value=$(N)):(i==="edit"||i==="check")&&_.get("/api/document/detail",{id:e}).then(s=>{r.value=!r.value,l.value={files:JSON.parse(s.data.files),remarks:s.data.remarks,serialNumber:s.data.serialNumber,title:s.data.title},y.value=e,u.value=i})},q=async i=>{i&&await i.validate(async(e,s)=>{if(e){let m={...l.value,files:JSON.stringify(l.value.files)};if(u.value==="create"){let n=await _.post("/api/document/save",m);n.code==200?(f({message:"新增成功",type:"success"}),r.value=!1,V("init")):f.error(n.message)}else{let n=await _.put(`/api/document/edit?id=${y.value}`,m);n.code==200?(f({message:"修改成功",type:"success"}),r.value=!1,V("init")):f.error(n.message)}}})};return M(()=>{}),U({changeDialog:S}),(i,e)=>{const s=d("el-input"),m=d("el-form-item"),n=d("el-col"),B=d("el-row"),O=d("el-form"),w=d("el-button"),R=d("el-dialog");return x(),D(R,{modelValue:r.value,"onUpdate:modelValue":e[6]||(e[6]=a=>r.value=a),title:"文件管理",width:"60%"},{footer:o(()=>[g("span",P,[g("div",null,[u.value!="check"?(x(),D(w,{key:0,type:"primary",onClick:e[4]||(e[4]=a=>q(k.value))},{default:o(()=>[C("保存")]),_:1})):j("",!0),t(w,{onClick:e[5]||(e[5]=a=>r.value=!1)},{default:o(()=>[C("关闭")]),_:1})])])]),default:o(()=>[g("div",E,[t(O,{ref_key:"ruleFormRef",ref:k,model:l.value,rules:F,"label-width":"180px",disabled:b(c),class:z(b(c)?"el-form-diabled":"")},{default:o(()=>[t(B,null,{default:o(()=>[t(n,{span:24},{default:o(()=>[t(m,{label:"标题:",prop:"title"},{default:o(()=>[t(s,{modelValue:l.value.title,"onUpdate:modelValue":e[0]||(e[0]=a=>l.value.title=a)},null,8,["modelValue"])]),_:1}),t(m,{label:"编号:",prop:"serialNumber"},{default:o(()=>[t(s,{modelValue:l.value.serialNumber,"onUpdate:modelValue":e[1]||(e[1]=a=>l.value.serialNumber=a)},null,8,["modelValue"])]),_:1}),t(m,{label:"备注:",prop:"remarks"},{default:o(()=>[t(s,{modelValue:l.value.remarks,"onUpdate:modelValue":e[2]||(e[2]=a=>l.value.remarks=a)},null,8,["modelValue"])]),_:1}),t(m,{label:"相关附件:",class:"form-item-upload",prop:"files"},{default:o(()=>[t(T,{modelValue:l.value.files,"onUpdate:modelValue":e[3]||(e[3]=a=>l.value.files=a),disabled:b(c)},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled","class"])])]),_:1},8,["modelValue"])}}},Ne=I(W,[["__scopeId","data-v-a8454a5e"]]);export{Ne as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{h as v}from"./index-4d581369.js";import{c as g}from"./lodash.clonedeep-2f114c62.js";import{_ as R}from"./_plugin-vue_export-helper-c27b6911.js";import{f as r,h as I,k as L,ag as c,o as u,c as b,d as s,T as a,a as j,X as _,F as A,a7 as F,S as M,Y as q}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./element-plus-a215fcb5.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const z={class:"export"},G={class:"dialog-footer"},O={__name:"Export",props:{dialogVisible:[Boolean]},emits:["update:dialogVisible"],setup(k,{emit:x}){const C=k,d=r(!1),l=r([]),V=r({academy:"毕业院校",alterationSign:"变更标志",annualSalary:"年薪",birthday:"出生日期",companyName:"企业名称",contractModality:"合同形式",education:"学历",finalTrialRemark:"终审意见",firstTrialRemark:"初审意见",freshGraduate:"是否应届毕业生",gender:"性别",hireDate:"入职时间",hireType:"录用方式",jobTitle:"专业技术职称",nation:"民族",numberId:"身份证号",personnelCharacter:"人员性质",personnelType:"人员类型",politicsStatus:"政治面貌",position:"岗位职务",presentDept:"所在部门",qualification:"执业资格证书",receipts:"单据状态",recruitNumber:"人员招聘单号",remark:"备注",resignationTime:"离职时间",retirementTime:"退休时间",socialCreditCode:"统一社会信用代码",specialty:"专业",txfpEndTime:"退休返聘结束时间",txfpStartTime:"退休返聘开始时间",userName:"姓名",workState:"工作状态"}),p=r(),m=r(!1),n=r([]),f=()=>{d.value=!1,x("update:dialogVisible",!1),n.value=g(l.value),p.value=!1,m.value=!1},y=e=>{f(),e()},T=()=>{v.export("/api/person/export",{ids:n.value}).then(e=>{const t=window.URL.createObjectURL(e.data),i=document.createElement("a");i.download=decodeURIComponent(e.headers["content-disposition"].split(";")[1].split("=")[1]),i.href=t,i.click()})},w=e=>{n.value=e?l.value:[],m.value=!1},S=e=>{const t=e.length;p.value=t===l.value.length,m.value=t>0&&t<l.value.length};I(()=>C.dialogVisible,e=>{d.value=e,p.value=!0});const E=()=>{v.get("/api/person/getEntityParam").then(e=>{e.code===200&&(l.value=e.data,n.value=g(e.data))})};return L(()=>{E()}),(e,t)=>{const i=c("el-checkbox"),B=c("el-checkbox-group"),D=c("el-form"),h=c("el-button"),N=c("el-dialog");return u(),b("div",z,[s(N,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=o=>d.value=o),title:"导出选项",width:"36%","before-close":y},{footer:a(()=>[j("span",G,[s(h,{onClick:T},{default:a(()=>[_("导出")]),_:1}),s(h,{onClick:f,type:"primary"},{default:a(()=>[_("关闭")]),_:1})])]),default:a(()=>[s(D,null,{default:a(()=>[s(i,{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=o=>p.value=o),label:"全选",class:"is-checked-all",size:"large",indeterminate:m.value,onChange:w},null,8,["modelValue","indeterminate"]),s(B,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=o=>n.value=o),onChange:S},{default:a(()=>[(u(!0),b(A,null,F(l.value,(o,U)=>(u(),M(i,{class:"el-checkbox-width",label:o,key:U},{default:a(()=>[_(q(V.value[o]),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}}},ge=R(O,[["__scopeId","data-v-e0be88eb"]]);export{ge as default};
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{h as v}from"./index-4d581369.js";import{c as X}from"./lodash.clonedeep-2f114c62.js";/* empty css */import{_ as A}from"./_plugin-vue_export-helper-c27b6911.js";import{t as G}from"./tools-0351b48a.js";import{E as D}from"./element-plus-a215fcb5.js";import{l as y,f as i,a1 as H,k as J,ag as r,o as f,S as g,T as a,a as k,X as C,W as R,d as s,u,O as T,c as K,a7 as Q,F as Y}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";/* empty css */import"./core-js-c6c47c20.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";const Z={class:"tab-content"},ee={class:"dialog-footer"},te={__name:"FoodDialog",emits:["init"],setup(oe,{expose:B,emit:N}){const U=G.data.get("identity"),V=y(()=>!["create","edit","rk","ck"].includes(d.value));y(()=>d.value==="create");const _=y(()=>d.value==="ck"||d.value==="rk"),I=i();let F={deptId:void 0,foodTypeId:void 0,amount:0};const l=i({...F}),q=H({foodTypeId:[{required:!0,message:"请输入粮食类型",trigger:"blur"}],amount:[{required:!0,message:"请输入库存",trigger:"blur"}],deptId:[{required:!0,message:"请输入粮仓类型",trigger:"blur"}]}),n=i(!1),d=i(""),E=i(""),z=(t,e)=>{t==="create"?(n.value=!n.value,d.value="create",l.value=X(F)):(t==="rk"||t==="ck"||t==="check")&&v.get("/api/foodReserves/detail",{id:e}).then(p=>{n.value=!n.value,l.value={deptId:p.data.deptId,foodTypeId:p.data.foodTypeId,amount:t==="check"?p.data.amount:0},E.value=e,d.value=t})},L=async t=>{t&&await t.validate(async(e,p)=>{if(e){let m={...l.value},b={create:"add",rk:"warehousing",ck:"out_of_stock"};m.operationType=b[d.value];let c=await v.post("/api/foodReserves/operation",m);c.code==200?(D({message:c.message,type:"success"}),n.value=!1,N("init")):D.error(c.message)}})},h=i([]),M=()=>{v.get("/api/foodType/page",{size:999999,current:1}).then(t=>{t.code==200&&(h.value=t.data.records)})},w=i([]),P=()=>{v.get("/api/dept/tree").then(t=>{t.code==200&&(w.value=t.data.data)})};return J(()=>{M(),P()}),B({changeDialog:z}),(t,e)=>{const p=r("el-tree-select"),m=r("el-form-item"),b=r("el-option"),c=r("el-select"),S=r("el-input"),$=r("el-col"),j=r("el-row"),O=r("el-form"),x=r("el-button"),W=r("el-dialog");return f(),g(W,{modelValue:n.value,"onUpdate:modelValue":e[5]||(e[5]=o=>n.value=o),title:"粮食库存",width:"40%"},{footer:a(()=>[k("span",ee,[k("div",null,[d.value!="check"?(f(),g(x,{key:0,type:"primary",onClick:e[3]||(e[3]=o=>L(I.value))},{default:a(()=>[C("保存")]),_:1})):R("",!0),s(x,{onClick:e[4]||(e[4]=o=>n.value=!1)},{default:a(()=>[C("关闭")]),_:1})])])]),default:a(()=>[k("div",Z,[s(O,{ref_key:"ruleFormRef",ref:I,model:l.value,rules:q,"label-width":"180px",disabled:u(V),class:T(u(V)?"el-form-diabled":"")},{default:a(()=>[s(j,null,{default:a(()=>[s($,{span:24},{default:a(()=>[u(U).isLeader?(f(),g(m,{key:0,label:"粮仓类型:",prop:"deptId",class:T(u(_)?"form-item-diabled":"")},{default:a(()=>[s(p,{modelValue:l.value.deptId,"onUpdate:modelValue":e[0]||(e[0]=o=>l.value.deptId=o),data:w.value,clearable:"","check-strictly":"",placeholder:"请选择","render-after-expand":!1,disabled:u(_)},null,8,["modelValue","data","disabled"])]),_:1},8,["class"])):R("",!0),s(m,{label:"粮食类型:",prop:"foodTypeId",class:T(u(_)?"form-item-diabled":"")},{default:a(()=>[s(c,{modelValue:l.value.foodTypeId,"onUpdate:modelValue":e[1]||(e[1]=o=>l.value.foodTypeId=o),placeholder:"请选择",disabled:u(_)},{default:a(()=>[(f(!0),K(Y,null,Q(h.value,o=>(f(),g(b,{label:o.type,value:o.id},null,8,["label","value"]))),256))]),_:1},8,["modelValue","disabled"])]),_:1},8,["class"]),s(m,{label:d.value=="create"?"库存:":"变更库存:",prop:"amount"},{default:a(()=>[s(S,{modelValue:l.value.amount,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value.amount=o),type:"number",oninput:"value=value.replace(/^0+(\\d)|[^\\d]+/g,'')",min:"0"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","rules","disabled","class"])])]),_:1},8,["modelValue"])}}},Ne=A(te,[["__scopeId","data-v-9f2db06e"]]);export{Ne as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{h as f}from"./index-4d581369.js";import{c as M}from"./lodash.clonedeep-2f114c62.js";/* empty css */import{_ as S}from"./_plugin-vue_export-helper-c27b6911.js";import{E as c}from"./element-plus-a215fcb5.js";import{l as _,f as p,a1 as U,k as j,ag as s,o as T,S as x,T as l,a as v,X as F,W as q,d as n,u as C,O as z}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";/* empty css */import"./core-js-c6c47c20.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";const E={class:"tab-content"},O={class:"dialog-footer"},P={__name:"FoodTypeDialog",emits:["init"],setup(W,{expose:h,emit:g}){const y=_(()=>!["create","edit"].includes(a.value));_(()=>a.value==="create"),_(()=>a.value==="edit");const b=p();let V={type:""};const i=p({...V}),D=U({type:[{required:!0,message:"请输入粮食类型",trigger:"blur"}]}),t=p(!1),a=p(""),k=p(""),N=(o,e)=>{o==="create"?(t.value=!t.value,a.value="create",i.value=M(V)):(o==="edit"||o==="check")&&f.get("/api/foodType/detail",{id:e}).then(m=>{t.value=!t.value,i.value={type:m.data.type},k.value=e,a.value=o})},B=async o=>{o&&await o.validate(async(e,m)=>{if(e){let d={...i.value};if(a.value==="create"){let r=await f.post("/api/foodType/save",d);r.code==200?(c({message:"新增成功",type:"success"}),t.value=!1,g("init")):c.error(r.message)}else{let r=await f.put(`/api/foodType/edit?id=${k.value}`,d);r.code==200?(c({message:"修改成功",type:"success"}),t.value=!1,g("init")):c.error(r.message)}}})};return j(()=>{}),h({changeDialog:N}),(o,e)=>{const m=s("el-input"),d=s("el-form-item"),r=s("el-col"),R=s("el-row"),$=s("el-form"),w=s("el-button"),I=s("el-dialog");return T(),x(I,{modelValue:t.value,"onUpdate:modelValue":e[3]||(e[3]=u=>t.value=u),title:"粮食类型",width:"40%"},{footer:l(()=>[v("span",O,[v("div",null,[a.value!="check"?(T(),x(w,{key:0,type:"primary",onClick:e[1]||(e[1]=u=>B(b.value))},{default:l(()=>[F("保存")]),_:1})):q("",!0),n(w,{onClick:e[2]||(e[2]=u=>t.value=!1)},{default:l(()=>[F("关闭")]),_:1})])])]),default:l(()=>[v("div",E,[n($,{ref_key:"ruleFormRef",ref:b,model:i.value,rules:D,"label-width":"180px",disabled:C(y),class:z(C(y)?"el-form-diabled":"")},{default:l(()=>[n(R,null,{default:l(()=>[n(r,{span:24},{default:l(()=>[n(d,{label:"粮食类型:",prop:"type"},{default:l(()=>[n(m,{modelValue:i.value.type,"onUpdate:modelValue":e[0]||(e[0]=u=>i.value.type=u)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled","class"])])]),_:1},8,["modelValue"])}}},be=S(P,[["__scopeId","data-v-82a014d8"]]);export{be as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{h as y}from"./index-4d581369.js";import"./lodash.clonedeep-2f114c62.js";/* empty css */import{_ as x}from"./_plugin-vue_export-helper-c27b6911.js";import{a as S}from"./vue-router-ab2ba79f.js";import{f as b,k,ag as _,o as s,c as u,S as v,W as L,F as w,a7 as B,T as o,d as i,a as t,Y as r,ax as I,ay as q}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./element-plus-a215fcb5.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const p=e=>(I("data-v-16a0ab5c"),e=e(),q(),e),C={class:"tab-content"},N={class:"item-container"},T=p(()=>t("div",null,"处理人:",-1)),V={class:"item-container"},D=p(()=>t("div",null,"处理时间:",-1)),F={class:"item-container"},$=p(()=>t("div",null,"处理状态:",-1)),A={class:"item-container"},E=p(()=>t("div",null,"处理意见:",-1)),M={__name:"Log",setup(e){const d=S(),c=b([]),h=()=>{let m={edit:"personnel",change:"change",approve:"personnel",approve_change:"change"};y.get(`/api/alteration/audtiLog?id=${d.query.id}&personnelType=${m[d.query.type]}`).then(l=>{l.code===200&&(c.value=l.data)})};return k(()=>{h()}),(m,l)=>{const g=_("el-empty"),a=_("el-col"),f=_("el-row");return s(),u("div",C,[c.value.length===0?(s(),v(g,{key:0,description:"暂无"})):L("",!0),(s(!0),u(w,null,B(c.value,n=>(s(),v(f,null,{default:o(()=>[i(a,{span:8},{default:o(()=>[t("div",N,[T,t("div",null,r(n.approver),1)])]),_:2},1024),i(a,{span:8},{default:o(()=>[t("div",V,[D,t("div",null,r(n.createdAt),1)])]),_:2},1024),i(a,{span:8},{default:o(()=>[t("div",F,[$,t("div",null,r(n.auditState),1)])]),_:2},1024),i(a,{span:24},{default:o(()=>[t("div",A,[E,t("div",null,r(n.opinion),1)])]),_:2},1024)]),_:2},1024))),256))])}}},ut=x(M,[["__scopeId","data-v-16a0ab5c"]]);export{ut as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{_}from"./TableBody-480ae430.js";import{h as c}from"./index-4d581369.js";import{u as D}from"./vue-router-ab2ba79f.js";import w from"./FoodDialog-6ade21c3.js";import{t as x}from"./tools-0351b48a.js";import{E as m}from"./element-plus-a215fcb5.js";import{f as i,a1 as R,k as B,o as H,c as I,d as p,Q as L}from"./@vue-5dd246aa.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./@element-plus-ba666efa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";/* empty css */import"./lodash.clonedeep-2f114c62.js";import"./core-js-c6c47c20.js";/* empty css */import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";const P={class:"example"},me={__name:"Manage",setup(N){const d=x.data.get("identity");D();const s=i(),u=i(),a=R({tableType:{selection:!0,tableLoading:!1,tableIndex:!1,changeHeight:356},tableHeader:[{buttons:[{type:"custom",name:"create",title:"新增",icon:"Plus",isOpen:"custom",disabled:!1,permission:"gxcc:lskcgl:create"},{type:"custom",name:"customCK",title:"出库",icon:"Upload",isOpen:"single",permission:"gxcc:lskcgl:ck"},{type:"custom",name:"customRK",title:"入库",icon:"Download",isOpen:"single",permission:"gxcc:lskcgl:rk"},{type:"custom",name:"check",title:"查看",icon:"View",isOpen:"single",permission:"gxcc:lskcgl:check"},{type:"popconfirm",name:"customDelete",title:"删除",icon:"Delete",isOpen:"single",permission:"gxcc:lskcgl:delete"}]},{buttons:[{name:"sort",options:[{label:"创建时间",value:"createdAt"},{label:"更新时间",value:"updatedAt"}]},"search"]}],tableList:[{name:"deptName",label:"粮仓类型",show:!0},{name:"foodTypeName",label:"粮食类型",show:!0},{name:"amount",label:"库存",show:!0},{name:"createdName",label:"创建人",show:!0},{name:"createdAt",label:"创建时间",show:!0},{name:"updatedName",label:"更新人",show:!0},{name:"updatedAt",label:"更新时间",show:!0}],tableData:[],pagination:{pageSize:10,current:1,total:0}}),g={current:a.pagination.current,size:a.pagination.pageSize,column:void 0,orderBy:void 0,value:void 0},o=i({...g}),n=()=>{a.tableType.tableLoading=!0,c.get("/api/foodReserves/page",o.value).then(e=>{e.code==200&&(a.tableData=e.data.records,a.tableType.tableLoading=!1,a.pagination.total=e.data.total)}).catch(()=>{a.tableType.tableLoading=!1})},f=({type:e,data:t})=>{switch(e){case"create":T();break;case"check":h(t);break;case"customCK":r(t,"ck");break;case"customRK":r(t,"rk");break;case"sort":v(t);break;case"search":y(t);break;case"customDelete":k(t);break}},b=e=>{a.pagination.current=e,o.value.current=e,n()},h=e=>{const t=e[0].id;s.value.changeDialog("check",t)},k=e=>{let t={deptId:d.isLeader?e[0].deptId:void 0,foodTypeId:e[0].foodTypeId,operationType:"delete",amount:0};c.post("/api/foodReserves/operation",t).then(l=>{l.code==200?(m({message:"删除成功",type:"success"}),n()):m({message:l.message,type:"success"})})},y=e=>{o.value.value=e.value,n()},v=e=>{e.name===""?(o.value.orderBy=void 0,o.value.column=void 0):(o.value.orderBy=e.sortType,o.value.column=e.name),n()},T=()=>{s.value.changeDialog("create")},r=(e,t)=>{const l=e[0].id;s.value.changeDialog(t,l)};return B(()=>{n()}),(e,t)=>(H(),I("div",P,[p(_,L(a,{onHandleTableHeader:f,onHandleTablePagination:b,ref_key:"TableBodyRef",ref:u}),null,16),p(w,{ref_key:"formDialog",ref:s,onInit:n},null,512)]))}};export{me as default};
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./TableBody-legacy-63f11311.js","./index-legacy-5ff7821d.js","./vue-router-legacy-1e8e1d15.js","./FoodDialog-legacy-0d46fc37.js","./tools-legacy-fa9cbc87.js","./element-plus-legacy-efe0366d.js","./@vue-legacy-4de3d5b5.js","./_plugin-vue_export-helper-legacy-762b7923.js","./@element-plus-legacy-bb874362.js","./jspdf-legacy-62dde53b.js","./@babel-legacy-633f46ed.js","./fflate-legacy-e1443086.js","./pinia-legacy-631d9b21.js","./vue-demi-legacy-97cfbb01.js","./axios-legacy-6abb032a.js","./form-data-legacy-f3fd8c46.js","./js-cookie-legacy-c7672909.js","./DetailDialog.vue_vue_type_style_index_0_scoped_7f0ad311_lang-legacy-dbc5ca3b.js","./lodash.clonedeep-legacy-81abd881.js","./core-js-legacy-b197ddf1.js","./Upload.vue_vue_type_style_index_0_scoped_f028b45f_lang-legacy-097b069f.js","./lodash-es-legacy-19b348e6.js","./@vueuse-legacy-c8e81244.js","./@popperjs-legacy-16895e05.js","./@ctrl-legacy-79e027b8.js","./dayjs-legacy-b8c949e6.js","./async-validator-legacy-b9dd2ff7.js","./memoize-one-legacy-599ef04d.js","./escape-html-legacy-ae962a8c.js","./normalize-wheel-es-legacy-f7d8e481.js","./@floating-ui-legacy-212d790c.js"],(function(e,l){"use strict";var a,s,t,n,o,c,i,u,g,d,r,p,y;return{setters:[e=>{a=e._},e=>{s=e.h},e=>{t=e.u},e=>{n=e.default},e=>{o=e.t},e=>{c=e.E},e=>{i=e.f,u=e.a1,g=e.k,d=e.o,r=e.c,p=e.d,y=e.Q},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){const l={class:"example"};e("default",{__name:"Manage",setup(e){const m=o.data.get("identity");t();const b=i(),v=i(),j=u({tableType:{selection:!0,tableLoading:!1,tableIndex:!1,changeHeight:356},tableHeader:[{buttons:[{type:"custom",name:"create",title:"新增",icon:"Plus",isOpen:"custom",disabled:!1,permission:"gxcc:lskcgl:create"},{type:"custom",name:"customCK",title:"出库",icon:"Upload",isOpen:"single",permission:"gxcc:lskcgl:ck"},{type:"custom",name:"customRK",title:"入库",icon:"Download",isOpen:"single",permission:"gxcc:lskcgl:rk"},{type:"custom",name:"check",title:"查看",icon:"View",isOpen:"single",permission:"gxcc:lskcgl:check"},{type:"popconfirm",name:"customDelete",title:"删除",icon:"Delete",isOpen:"single",permission:"gxcc:lskcgl:delete"}]},{buttons:[{name:"sort",options:[{label:"创建时间",value:"createdAt"},{label:"更新时间",value:"updatedAt"}]},"search"]}],tableList:[{name:"deptName",label:"粮仓类型",show:!0},{name:"foodTypeName",label:"粮食类型",show:!0},{name:"amount",label:"库存",show:!0},{name:"createdName",label:"创建人",show:!0},{name:"createdAt",label:"创建时间",show:!0},{name:"updatedName",label:"更新人",show:!0},{name:"updatedAt",label:"更新时间",show:!0}],tableData:[],pagination:{pageSize:10,current:1,total:0}}),h={current:j.pagination.current,size:j.pagination.pageSize,column:void 0,orderBy:void 0,value:void 0},f=i({...h}),k=()=>{j.tableType.tableLoading=!0,s.get("/api/foodReserves/page",f.value).then((e=>{200==e.code&&(j.tableData=e.data.records,j.tableType.tableLoading=!1,j.pagination.total=e.data.total)})).catch((()=>{j.tableType.tableLoading=!1}))},_=({type:e,data:l})=>{switch(e){case"create":z();break;case"check":D(l);break;case"customCK":B(l,"ck");break;case"customRK":B(l,"rk");break;case"sort":L(l);break;case"search":w(l);break;case"customDelete":T(l)}},x=e=>{console.log(e),j.pagination.current=e,f.value.current=e,k()},D=e=>{const l=e[0].id;b.value.changeDialog("check",l)},T=e=>{console.log(e[0]);let l={deptId:m.isLeader?e[0].deptId:void 0,foodTypeId:e[0].foodTypeId,operationType:"delete",amount:0};s.post("/api/foodReserves/operation",l).then((e=>{200==e.code?(c({message:"删除成功",type:"success"}),k()):c({message:e.message,type:"success"})}))},w=e=>{console.log(e.value),f.value.value=e.value,k()},L=e=>{""===e.name?(f.value.orderBy=void 0,f.value.column=void 0):(f.value.orderBy=e.sortType,f.value.column=e.name),k()},z=()=>{b.value.changeDialog("create")},B=(e,l)=>{const a=e[0].id;b.value.changeDialog(l,a)};return g((()=>{k()})),(e,s)=>(d(),r("div",l,[p(a,y(j,{onHandleTableHeader:_,onHandleTablePagination:x,ref_key:"TableBodyRef",ref:v}),null,16),p(n,{ref_key:"formDialog",ref:b,onInit:k},null,512)]))}})}}}));
|
|
|
@ -1 +0,0 @@
|
||||||
import{a1 as x,aq as E,o as r,c as d,a as o,a0 as f,U as c,Z as b,d as m,u as i,O as N,Y as v,aj as S,S as u,F as $,a7 as q}from"./@vue-5dd246aa.js";import z from"./NodeType-3ba0f1d3.js";import{r as B,t as L}from"./optionConfig-cdce2392.js";import{a as D}from"./approver-8c13d8a1.js";import{C as M,E as V,P as W,a as j}from"./@icon-park-904b8974.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";const O={class:"y-flow-middle"},F={class:"y-flow-insert-wrapper"},P={class:"y-flow-insert"},T={key:0,class:"text"},U={class:"span"},R=o("div",{class:"y-flow-apply-list y-flow-head"},"节点负责人:",-1),Y={class:"person-list"},Z={class:"y-flow-line"},te={__name:"NodeItem",props:{parentNode:{type:Object,default:{}},nodeItem:{type:Object,default:{}}},emits:["addApprover","addCondition","removeApprover"],setup(y,{emit:a}){const e=y,l=D(),p=x({roleArray:B,typeArray:L,defaultRole:"未知",activeIndex:-1}),I=(s,t)=>{a("addApprover",e.nodeItem,t)},w=()=>{a("addCondition",e.nodeItem,"add")},k=()=>{a("removeApprover",e.nodeItem,e.parentNode)},h=(s,t)=>{s.titleEdit=t},_=(s,t)=>{s.title||(s.title="审批节点"),l.editTtitle(s.title),s.titleEdit=t},A=s=>{l.changeApprover(s),l.toggleApproverVisible(!0)};return(s,t)=>{const C=E("focus");return r(),d("div",O,[o("div",F,[o("div",P,[o("div",{class:"y-flow-node-wrapper",onMouseenter:t[4]||(t[4]=f(n=>p.activeIndex=e.nodeItem.nodeId,["self"])),onMouseleave:t[5]||(t[5]=f(n=>p.activeIndex=-1,["self"]))},[c(o("div",{class:"y-flow-node-del",onClick:k},[m(i(M),{theme:"outline",size:"20",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})],512),[[b,e.nodeItem.nodeId==p.activeIndex]]),o("div",{class:"y-flow-node",onClick:t[3]||(t[3]=n=>A(e.nodeItem))},[o("div",{class:N(["y-flow-node-head",[e.nodeItem.type==="approver"?"y-flow-actual-approverbg":"y-flow-actual-fillbg"]])},[o("div",{class:"y-flow-node-title",onClick:t[2]||(t[2]=f(n=>h(e.nodeItem,!0),["stop"]))},[e.nodeItem.titleEdit?c((r(),d("input",{key:1,class:"y-input",type:"text","onUpdate:modelValue":t[0]||(t[0]=n=>e.nodeItem.title=n),onBlur:t[1]||(t[1]=n=>_(e.nodeItem,!1))},null,544)),[[S,e.nodeItem.title],[C]]):(r(),d("div",T,[o("span",U,v(e.nodeItem.title||e.nodeItem.name),1),m(i(V),{theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})]))]),e.nodeItem.type==="approver"?(r(),u(i(W),{key:0,theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})):(r(),u(i(j),{key:1,theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"}))],2),R,o("div",Y,[(r(!0),d($,null,q(e.nodeItem.properties.persons,(n,g)=>(r(),d("div",{class:"person-add-item",key:g},v(n.realName),1))),128))])]),o("div",Z,[m(z,{branchItem:e.nodeItem,onAddApprover:I,onChangeCondition:w},null,8,["branchItem"])])],32)])])])}}};export{te as default};
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./@vue-legacy-4de3d5b5.js","./NodeType-legacy-dfb789fa.js","./optionConfig-legacy-708250f5.js","./approver-legacy-7cc2a2bc.js","./@icon-park-legacy-d73df4b1.js","./pinia-legacy-631d9b21.js","./vue-demi-legacy-97cfbb01.js"],(function(e,t){"use strict";var o,l,n,d,a,i,s,r,p,c,f,u,v,m,y,I,k,g,w,h,A,j,C,b;return{setters:[e=>{o=e.a1,l=e.aq,n=e.o,d=e.c,a=e.a,i=e.a0,s=e.U,r=e.Z,p=e.d,c=e.u,f=e.O,u=e.Y,v=e.aj,m=e.S,y=e.F,I=e.a7},e=>{k=e.default},e=>{g=e.r,w=e.t},e=>{h=e.a},e=>{A=e.C,j=e.E,C=e.P,b=e.a},null,null],execute:function(){const t={class:"y-flow-middle"},x={class:"y-flow-insert-wrapper"},q={class:"y-flow-insert"},N={key:0,class:"text"},z={class:"span"},E=a("div",{class:"y-flow-apply-list y-flow-head"},"节点负责人:",-1),L={class:"person-list"},W={class:"y-flow-line"};e("default",{__name:"NodeItem",props:{parentNode:{type:Object,default:{}},nodeItem:{type:Object,default:{}}},emits:["addApprover","addCondition","removeApprover"],setup(e,{emit:O}){const B=e,M=h(),S=o({roleArray:g,typeArray:w,defaultRole:"未知",activeIndex:-1}),T=(e,t)=>{O("addApprover",B.nodeItem,t)},U=()=>{O("addCondition",B.nodeItem,"add")},V=()=>{O("removeApprover",B.nodeItem,B.parentNode)};return(e,o)=>{const g=l("focus");return n(),d("div",t,[a("div",x,[a("div",q,[a("div",{class:"y-flow-node-wrapper",onMouseenter:o[4]||(o[4]=i((e=>S.activeIndex=B.nodeItem.nodeId),["self"])),onMouseleave:o[5]||(o[5]=i((e=>S.activeIndex=-1),["self"]))},[s(a("div",{class:"y-flow-node-del",onClick:V},[p(c(A),{theme:"outline",size:"20",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})],512),[[r,B.nodeItem.nodeId==S.activeIndex]]),a("div",{class:"y-flow-node",onClick:o[3]||(o[3]=e=>{return t=B.nodeItem,M.changeApprover(t),void M.toggleApproverVisible(!0);var t})},[a("div",{class:f(["y-flow-node-head",["approver"===B.nodeItem.type?"y-flow-actual-approverbg":"y-flow-actual-fillbg"]])},[a("div",{class:"y-flow-node-title",onClick:o[2]||(o[2]=i((e=>{return t=B.nodeItem,o=!0,void(t.titleEdit=o);var t,o}),["stop"]))},[B.nodeItem.titleEdit?s((n(),d("input",{key:1,class:"y-input",type:"text","onUpdate:modelValue":o[0]||(o[0]=e=>B.nodeItem.title=e),onBlur:o[1]||(o[1]=e=>{return t=B.nodeItem,o=!1,t.title||(t.title="审批节点"),M.editTtitle(t.title),void(t.titleEdit=o);var t,o})},null,544)),[[v,B.nodeItem.title],[g]]):(n(),d("div",N,[a("span",z,u(B.nodeItem.title||B.nodeItem.name),1),p(c(j),{theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})]))]),"approver"===B.nodeItem.type?(n(),m(c(C),{key:0,theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"})):(n(),m(c(b),{key:1,theme:"outline",size:"18",fill:"#fff",strokeWidth:3,strokeLinecap:"square"}))],2),E,a("div",L,[(n(!0),d(y,null,I(B.nodeItem.properties.persons,((e,t)=>(n(),d("div",{class:"person-add-item",key:t},u(e.realName),1)))),128))])]),a("div",W,[p(k,{branchItem:B.nodeItem,onAddApprover:T,onChangeCondition:U},null,8,["branchItem"])])],32)])])])}}})}}}));
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{b as h,c as v,d as u,B as k}from"./@icon-park-904b8974.js";import{f as l,ag as b,o as C,S as g,T as d,a as e,d as t,u as o}from"./@vue-5dd246aa.js";const w={class:"y-flow-select"},y={class:"item-icon"},B=e("p",{class:"item-des"},"审批节点",-1),q={class:"item-icon"},x=e("p",{class:"item-des"},"填写节点",-1),z={class:"item-icon"},L=e("p",{class:"item-des"},"条件分支",-1),N={class:"add-btn"},A={__name:"NodeType",props:{branchItem:{type:Object,default:{}}},emits:["addApprover","changeCondition"],setup(p,{emit:i}){const n=p;l(!1);const a=l(),r=c=>{a.value.hide(),i("addApprover",n.branchItem,c)},_=()=>{a.value.hide(),i("changeCondition",n.branchItem,"add")};return(c,s)=>{const f=b("el-popover");return C(),g(f,{placement:"top-start",width:250,trigger:"click",title:"标题",ref_key:"popoverRef",ref:a},{reference:d(()=>[e("span",N,[t(o(h),{theme:"filled",size:"16",fill:"#f5bc21",strokeWidth:3,strokeLinecap:"square"})])]),default:d(()=>[e("div",w,[e("div",{class:"item-wrapper",onClick:s[0]||(s[0]=m=>r("approver"))},[e("span",y,[t(o(v),{theme:"filled",size:"30",fill:"#3296fa",strokeWidth:3,strokeLinecap:"square"})]),B]),e("div",{class:"item-wrapper",onClick:s[1]||(s[1]=m=>r("fill"))},[e("span",q,[t(o(u),{theme:"filled",size:"30",fill:"#324963",strokeWidth:3,strokeLinecap:"square"})]),x]),e("div",{class:"item-wrapper",onClick:_},[e("span",z,[t(o(k),{theme:"filled",size:"30",fill:"#15bc83",strokeWidth:3,strokeLinecap:"square"})]),L])])]),_:1},512)}}};export{A as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{_ as P}from"./index-f69aa2e1.js";import S from"./Upload-a9b46e5a.js";import{u as U,a as I}from"./vue-router-ab2ba79f.js";import{h as g}from"./index-4d581369.js";/* empty css */import{_ as R}from"./_plugin-vue_export-helper-c27b6911.js";import B from"./DetailDialog-5be9cf82.js";import{E as u}from"./element-plus-a215fcb5.js";import{l as y,f as d,k as A,ag as c,o as E,c as J,d as i,u as b,a as f,T as n,X as V,ax as M,ay as O}from"./@vue-5dd246aa.js";import"./@wangeditor-61a2cfac.js";import"./lodash.clonedeep-2f114c62.js";import"./core-js-c6c47c20.js";/* empty css */import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const w=p=>(M("data-v-20ed7e4d"),p=p(),O(),p),T={class:"card"},j=w(()=>f("div",{class:"line"},null,-1)),X={class:"page-content"},z=w(()=>f("p",{class:"page-content-title"},"制度新增",-1)),G={class:"bottom-item"},H={__name:"PageForm",setup(p){const x=U(),a=I(),_=y(()=>!["create","edit"].includes(a.query.type));y(()=>a.query.type==="create"),y(()=>a.query.type==="edit");const F=d(),t=d({content:"",files:[],title:""}),D=d({title:[{required:!0,message:"请输入",trigger:"blur"}]}),v=d(!1),q=d({}),h=()=>{v.value=!0,q.value={...t.value}},k=()=>{x.go(-1)},$=async r=>{r&&await r.validate(async(e,m)=>{if(e){if(!t.value.content)return u.warning("请填写内容");let o={...t.value,files:JSON.stringify(t.value.files)};if(a.query.type==="create"){let l=await g.post("/api/institution/save",o);l.code==200?(u({message:l.message,type:"success"}),k()):u.error(l.message)}else if(a.query.type==="edit"){let l=await g.put(`/api/institution/edit?id=${a.query.id}`,o);l.code==200?(u({message:l.message,type:"success"}),k()):u.error(l.message)}}})},C=()=>{var r,e;if(((r=a.query)==null?void 0:r.type)==="check"||((e=a.query)==null?void 0:e.type)==="edit"){let m=a.query.id;g.get(`/api/institution/detail?id=${m}`).then(o=>{o.code==200&&(t.value={content:o.data.content,files:JSON.parse(o.data.files),title:o.data.title,updatedAt:o.data.updatedAt})})}};return A(()=>{C()}),(r,e)=>{const m=c("el-input"),o=c("el-form-item"),l=c("el-button"),N=c("el-form");return E(),J("div",T,[i(P,{height:"60vh",value:t.value.content,"onUpdate:value":e[0]||(e[0]=s=>t.value.content=s),disabled:b(_)},null,8,["value","disabled"]),j,f("div",X,[z,i(N,{ref_key:"ruleFormRef",ref:F,"label-position":"top",model:t.value,rules:D.value,"label-width":"120px",disabled:b(_),"status-icon":""},{default:n(()=>[i(o,{label:"标题",prop:"title"},{default:n(()=>[i(m,{modelValue:t.value.title,"onUpdate:modelValue":e[1]||(e[1]=s=>t.value.title=s)},null,8,["modelValue"])]),_:1}),i(o,{label:"附件",prop:"files"},{default:n(()=>[i(S,{modelValue:t.value.files,"onUpdate:modelValue":e[2]||(e[2]=s=>t.value.files=s),type:"create",disabled:b(_)},null,8,["modelValue","disabled"])]),_:1}),f("div",G,[i(l,{type:"primary",onClick:h},{default:n(()=>[V(" 预览内容 ")]),_:1}),i(l,{type:"primary",onClick:e[3]||(e[3]=s=>$(F.value))},{default:n(()=>[V(" 保存 ")]),_:1}),i(l,{onClick:e[4]||(e[4]=s=>r.$router.back())},{default:n(()=>[V(" 返回 ")]),_:1})])]),_:1},8,["model","rules","disabled"])]),i(B,{dialogVisible:v.value,"onUpdate:dialogVisible":e[5]||(e[5]=s=>v.value=s),dialogData:q.value},null,8,["dialogVisible","dialogData"])])}}},$e=R(H,[["__scopeId","data-v-20ed7e4d"]]);export{$e as default};
|
|
|
@ -1 +0,0 @@
|
||||||
import{_ as D}from"./index-f69aa2e1.js";import O from"./Upload-a9b46e5a.js";import{U as $}from"./index-da1a3844.js";import h from"./DetailDialog-5be9cf82.js";import{u as B,a as J}from"./vue-router-ab2ba79f.js";import{h as g}from"./index-4d581369.js";import{_ as P}from"./_plugin-vue_export-helper-c27b6911.js";import{E as p}from"./element-plus-a215fcb5.js";import{l as y,f as n,k as R,ag as c,o as q,c as A,d as l,a as f,T as u,S as E,W as M,X as b,ax as T,ay as j}from"./@vue-5dd246aa.js";import"./@wangeditor-61a2cfac.js";import"./lodash.clonedeep-2f114c62.js";import"./core-js-c6c47c20.js";/* empty css */import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css *//* empty css */const F=d=>(T("data-v-cc161ff9"),d=d(),j(),d),W={class:"card"},X=F(()=>f("div",{class:"line"},null,-1)),z={class:"page-content"},G=F(()=>f("p",{class:"page-content-title"},"通知新增",-1)),H={class:"bottom-item"},K={__name:"PageForm",setup(d){const w=B(),a=J();y(()=>!["create","edit"].includes(a.query.type)),y(()=>a.query.type==="create"),y(()=>a.query.type==="edit");const I=n(),t=n({userIds:[],content:"",files:[],title:""}),U=n({title:[{required:!0,message:"请输入",trigger:"blur"}],userIds:[{required:!0,message:"请输入选择人员",trigger:"blur"}]}),v=n(!1),V=n({}),N=()=>{v.value=!0,V.value={...t.value}},k=()=>{w.go(-1)},S=async i=>{i&&await i.validate(async(e,m)=>{if(e){if(!t.value.content)return p.warning("请填写通知内容");let o={...t.value,files:JSON.stringify(t.value.files),userIds:JSON.stringify(t.value.userIds)};if(a.query.type==="create"){let r=await g.post("/api/notice/save",o);r.code==200?(p({message:r.message,type:"success"}),k()):p.error(r.message)}else if(a.query.type==="edit"){let r=await g.put(`/api/notice/edit?id=${a.query.id}`,o);r.code==200?(p({message:r.message,type:"success"}),k()):p.error(r.message)}}})},_=n(!1),x=()=>{var i,e;if(((i=a.query)==null?void 0:i.type)==="check"||((e=a.query)==null?void 0:e.type)==="edit"){let m=a.query.id;g.get(`/api/notice/detail?id=${m}`).then(o=>{o.code==200&&(t.value={userIds:JSON.parse(o.data.userIds),content:o.data.content,files:JSON.parse(o.data.files),title:o.data.title,updatedAt:o.data.updatedAt},_.value=!0)})}else _.value=!0};return R(()=>{x()}),(i,e)=>{const m=c("el-input"),o=c("el-form-item"),r=c("el-button"),C=c("el-form");return q(),A("div",W,[l(D,{height:"60vh",value:t.value.content,"onUpdate:value":e[0]||(e[0]=s=>t.value.content=s)},null,8,["value"]),X,f("div",z,[G,l(C,{ref_key:"ruleFormRef",ref:I,"label-position":"top",model:t.value,rules:U.value,"label-width":"120px","status-icon":""},{default:u(()=>[l(o,{label:"标题",prop:"title"},{default:u(()=>[l(m,{modelValue:t.value.title,"onUpdate:modelValue":e[1]||(e[1]=s=>t.value.title=s)},null,8,["modelValue"])]),_:1}),l(o,{label:"接收人",prop:"userIds"},{default:u(()=>[_.value?(q(),E($,{key:0,userIds:t.value.userIds,"onUpdate:userIds":e[2]||(e[2]=s=>t.value.userIds=s)},null,8,["userIds"])):M("",!0)]),_:1}),l(o,{label:"附件",prop:"files"},{default:u(()=>[l(O,{modelValue:t.value.files,"onUpdate:modelValue":e[3]||(e[3]=s=>t.value.files=s),type:"create",disabled:!1},null,8,["modelValue"])]),_:1}),f("div",H,[l(r,{type:"primary",onClick:N},{default:u(()=>[b(" 预览内容 ")]),_:1}),l(r,{type:"primary",onClick:e[4]||(e[4]=s=>S(I.value))},{default:u(()=>[b(" 保存 ")]),_:1}),l(r,{onClick:e[5]||(e[5]=s=>i.$router.back())},{default:u(()=>[b(" 返回 ")]),_:1})])]),_:1},8,["model","rules"])]),l(h,{dialogVisible:v.value,"onUpdate:dialogVisible":e[6]||(e[6]=s=>v.value=s),dialogData:V.value},null,8,["dialogVisible","dialogData"])])}}},De=P(K,[["__scopeId","data-v-cc161ff9"]]);export{De as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{_ as R}from"./TableBody-480ae430.js";import{h as m}from"./index-4d581369.js";import C from"./FoodDialog-6ade21c3.js";import{t as D}from"./tools-0351b48a.js";import{f as r,a1 as N,k as I,ag as i,o as s,c as p,d,T as b,u as P,S as f,W as S,F as A,a7 as z,Q as F}from"./@vue-5dd246aa.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./element-plus-a215fcb5.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";/* empty css */import"./lodash.clonedeep-2f114c62.js";/* empty css */const q={class:"example"},_e={__name:"Record",setup(U){const g=D.data.get("identity"),u=r(),h=r(),o=N({tableType:{selection:!0,tableLoading:!1,tableIndex:!1,changeHeight:356},tableHeader:[{buttons:[]},{buttons:[{name:"sort",options:[{label:"创建时间",value:"createdAt"},{label:"更新时间",value:"updatedAt"}]},"search"]}],tableList:[{name:"deptName",label:"粮仓类型",show:!0},{name:"foodTypeName",label:"粮食类型",show:!0},{name:"type",label:"操作",show:!0},{name:"amount",label:"变更库存",show:!0},{name:"createdName",label:"创建人",show:!0},{name:"createdAt",label:"创建时间",show:!0},{name:"updatedName",label:"更新人",show:!0},{name:"updatedAt",label:"更新时间",show:!0}],tableData:[],pagination:{pageSize:10,current:1,total:0}}),v={current:o.pagination.current,size:o.pagination.pageSize,column:void 0,orderBy:void 0,value:void 0,type:void 0,deptId:void 0},a=r({...v}),l=()=>{o.tableType.tableLoading=!0,m.get("/api/foodReservesLog/page",a.value).then(e=>{e.code==200&&(o.tableData=e.data.records,o.tableType.tableLoading=!1,o.pagination.total=e.data.total)}).catch(()=>{o.tableType.tableLoading=!1})},_=({type:e,data:t})=>{switch(e){case"check":k(t);break;case"sort":w(t);break;case"search":T(t);break}},y=e=>{o.pagination.current=e,a.value.current=e,l()},k=e=>{const t=e[0].id;u.value.changeDialog("check",t)},T=e=>{a.value.value=e.value,l()},w=e=>{e.name===""?(a.value.orderBy=void 0,a.value.column=void 0):(a.value.orderBy=e.sortType,a.value.column=e.name),l()},B=r([{name:"新增",value:"add"},{name:"删除",value:"delete"},{name:"入库",value:"warehousing"},{name:"出库",value:"out_of_stock"}]),c=r([]),L=()=>{m.get("/api/dept/tree").then(e=>{e.code==200&&(c.value=e.data.data)})};return I(()=>{l(),L()}),(e,t)=>{const V=i("el-tree-select"),x=i("el-option"),H=i("el-select");return s(),p("div",q,[d(R,F(o,{onHandleTableHeader:_,onHandleTablePagination:y,ref_key:"TableBodyRef",ref:h}),{TableHeaderRight:b(({selectData:E})=>[P(g).isLeader?(s(),f(V,{key:0,modelValue:a.value.deptId,"onUpdate:modelValue":t[0]||(t[0]=n=>a.value.deptId=n),data:c.value,clearable:"","check-strictly":"",placeholder:"请选择粮仓类型","render-after-expand":!1,class:"status-select",onChange:l},null,8,["modelValue","data"])):S("",!0),d(H,{modelValue:a.value.type,"onUpdate:modelValue":t[1]||(t[1]=n=>a.value.type=n),placeholder:"请选择操作类型",onChange:l,clearable:"",class:"status-select"},{default:b(()=>[(s(!0),p(A,null,z(B.value,n=>(s(),f(x,{key:n.value,label:n.name,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},16),d(C,{ref_key:"formDialog",ref:u,onInit:l},null,512)])}}};export{_e as default};
|
|
|
@ -1 +0,0 @@
|
||||||
import{h as i}from"./index-4d581369.js";import{a as c}from"./vue-router-ab2ba79f.js";import{_ as m}from"./_plugin-vue_export-helper-c27b6911.js";import{f as s,ag as l,o as _,c as d,d as t,T as h}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./element-plus-a215fcb5.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const u={class:"tab-content"},b={__name:"Record",setup(f){const o=c(),a=s([]);return(()=>{let r=o.query.id,p={edit:"personnel",change:"change",approve:"personnel",approve_change:"change"};i.get(`/api/alteration/alterationPage?id=${r}&personnelType=${p[o.query.type]}`).then(e=>{e.code==200&&(a.value=e.data)})})(),(r,p)=>{const e=l("el-table-column"),n=l("el-table");return _(),d("div",u,[t(n,{data:a.value,style:{width:"100%"},"header-cell-style":{background:"#EEF1F4"}},{default:h(()=>[t(e,{type:"index",width:"80",align:"center",label:"序号"}),t(e,{prop:"details",label:"变更内容"}),t(e,{prop:"beforeChange",label:"变更前"}),t(e,{prop:"afterChange",label:"变更后"}),t(e,{prop:"createdName",label:"变更人"}),t(e,{prop:"createdAt",label:"变更时间"})]),_:1},8,["data"])])}}},M=m(b,[["__scopeId","data-v-cd583a47"]]);export{M as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import"./index-4d581369.js";import"./lodash.clonedeep-2f114c62.js";/* empty css */import{_ as d}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import{l as _,o as s,c as n,a as i,F as u,a7 as m,M as p,P as v,u as f,O as b,Y as y}from"./@vue-5dd246aa.js";const h={class:"entDeclaration"},k={class:"entDeclaration-nav"},g=["onClick"],x={class:"entDeclaration-main"},A={__name:"Tab",props:{tabList:{type:Array,required:!0,default:()=>[]},isActive:{type:String,default:""}},emits:["clickItem"],setup(t,{emit:o}){const r=t,c=_(()=>e=>r.tabList.length-e);return(e,D)=>(s(),n("section",h,[i("nav",k,[(s(!0),n(u,null,m(t.tabList,(a,l)=>(s(),n("div",{style:v({zIndex:f(c)(l)}),class:b(["entDeclaration-nav-item",t.isActive===a?"active":""]),onClick:I=>o("clickItem",a)},y(a),15,g))),256))]),i("main",x,[p(e.$slots,"default",{isActive:t.isActive},void 0,!0)])]))}},F=d(A,[["__scopeId","data-v-441b1381"]]);export{F as T};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{f as _,h as L,ag as r,o as i,c as p,d as n,T as d,X as N,U as S,Z as A,a as h,F as z,a7 as T,W as v,a0 as b,Y as q,S as E}from"./@vue-5dd246aa.js";import{h as y}from"./index-4d581369.js";import{c as k}from"./lodash.clonedeep-2f114c62.js";/* empty css */import{_ as I}from"./_plugin-vue_export-helper-c27b6911.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./element-plus-a215fcb5.js";import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";import"./js-cookie-40e39767.js";/* empty css */const R={class:"upload"},$={class:"empty"},j=["onClick"],M={__name:"Upload",props:{modelValue:{},type:{type:String,default:"create"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(w,{emit:c}){const a=w;_([]);const t=_([]),C=e=>!0,m=e=>k(e),g=e=>k(e);L(()=>a.modelValue,e=>{if(e===""||e===void 0||!e)return t.value=[];if(a.type==="edit"&&!Array.isArray(e)&&typeof e=="string")return t.value=[];t.value=g(a.modelValue)},{immediate:!0});const F=e=>{let s=e.file;const l=new FormData;l.append("file",s),y.post("/api/attachment/upload",l).then(o=>{o.code==200&&(t.value.push({name:o.data.name,path:o.data.path,size:s.size,suffix:o.data.suffix}),c("update:modelValue",m(t.value)))})},x=e=>{t.value.splice(e,1),c("update:modelValue",m(t.value))},B=e=>{y.downloadFile("/api/alteration/download",{params:{fileName:e.name,path:e.path},responseType:"blob"}).then(s=>{const l=window.URL.createObjectURL(s),o=document.createElement("a");o.download=e.name,o.href=l,o.click()})};return(e,s)=>{const l=r("el-button"),o=r("el-upload"),U=r("CircleCloseFilled"),V=r("el-icon");return i(),p("div",R,[n(o,{multiple:"","show-file-list":!1,"before-upload":C,"http-request":F,disabled:a.disabled},{default:d(()=>[n(l,{type:"primary",plain:"",disabled:a.disabled},{default:d(()=>[N("选择文件")]),_:1},8,["disabled"])]),_:1},8,["disabled"]),S(h("span",$,"未选择任何文件",512),[[A,t.value.length===0]]),t.value.length>0?(i(!0),p(z,{key:0},T(t.value,(u,f)=>(i(),p("span",{class:"fileBox",key:f,onClick:b(D=>B(u),["stop"])},[h("span",null,q(u.name),1),a.disabled?v("",!0):(i(),E(V,{key:0,class:"fileBoxDel",size:16,color:"#729880",onClick:b(D=>x(f),["stop"])},{default:d(()=>[n(U)]),_:2},1032,["onClick"]))],8,j))),128)):v("",!0)])}}},be=I(M,[["__scopeId","data-v-f028b45f"]]);export{be as default};
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./@vue-legacy-4de3d5b5.js","./index-legacy-5ff7821d.js","./lodash.clonedeep-legacy-81abd881.js","./Upload.vue_vue_type_style_index_0_scoped_f028b45f_lang-legacy-097b069f.js","./_plugin-vue_export-helper-legacy-762b7923.js","./jspdf-legacy-62dde53b.js","./@babel-legacy-633f46ed.js","./fflate-legacy-e1443086.js","./vue-router-legacy-1e8e1d15.js","./tools-legacy-fa9cbc87.js","./pinia-legacy-631d9b21.js","./vue-demi-legacy-97cfbb01.js","./axios-legacy-6abb032a.js","./form-data-legacy-f3fd8c46.js","./element-plus-legacy-efe0366d.js","./lodash-es-legacy-19b348e6.js","./@vueuse-legacy-c8e81244.js","./@element-plus-legacy-bb874362.js","./@popperjs-legacy-16895e05.js","./@ctrl-legacy-79e027b8.js","./dayjs-legacy-b8c949e6.js","./core-js-legacy-b197ddf1.js","./async-validator-legacy-b9dd2ff7.js","./memoize-one-legacy-599ef04d.js","./escape-html-legacy-ae962a8c.js","./normalize-wheel-es-legacy-f7d8e481.js","./@floating-ui-legacy-212d790c.js","./js-cookie-legacy-c7672909.js","./DetailDialog.vue_vue_type_style_index_0_scoped_7f0ad311_lang-legacy-dbc5ca3b.js"],(function(e,l){"use strict";var a,s,t,n,o,u,c,d,i,p,y,r,g,j,m,f,v,_,h,b;return{setters:[e=>{a=e.f,s=e.h,t=e.ag,n=e.o,o=e.c,u=e.d,c=e.T,d=e.X,i=e.U,p=e.Z,y=e.a,r=e.F,g=e.a7,j=e.W,m=e.a0,f=e.Y,v=e.S},e=>{_=e.h},e=>{h=e.c},null,e=>{b=e._},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){const l={class:"upload"},x={class:"empty"},k=["onClick"],w={__name:"Upload",props:{modelValue:{},type:{type:String,default:"create"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:b}){const w=e;a([]);const V=a([]),z=e=>!0,C=e=>h(e);s((()=>w.modelValue),(e=>{return""!==e&&void 0!==e&&e&&("edit"!==w.type||Array.isArray(e)||"string"!=typeof e)?void(V.value=(l=w.modelValue,h(l))):V.value=[];var l}),{immediate:!0});const U=e=>{let l=e.file;const a=new FormData;a.append("file",l),_.post("/api/attachment/upload",a).then((e=>{console.log(e,"res"),200==e.code&&(V.value.push({name:e.data.name,path:e.data.path,size:l.size,suffix:e.data.suffix}),b("update:modelValue",C(V.value)),console.log(w.modelValue,V.value))}))};return(e,a)=>{const s=t("el-button"),h=t("el-upload"),B=t("CircleCloseFilled"),D=t("el-icon");return n(),o("div",l,[u(h,{multiple:"","show-file-list":!1,"before-upload":z,"http-request":U,disabled:w.disabled},{default:c((()=>[u(s,{type:"primary",plain:"",disabled:w.disabled},{default:c((()=>[d("选择文件")])),_:1},8,["disabled"])])),_:1},8,["disabled"]),i(y("span",x,"未选择任何文件",512),[[p,0===V.value.length]]),V.value.length>0?(n(!0),o(r,{key:0},g(V.value,((e,l)=>(n(),o("span",{class:"fileBox",key:l,onClick:m((l=>(e=>{_.downloadFile("/api/alteration/download",{params:{fileName:e.name,path:e.path},responseType:"blob"}).then((l=>{const a=window.URL.createObjectURL(l),s=document.createElement("a");s.download=e.name,s.href=a,s.click()}))})(e)),["stop"])},[y("span",null,f(e.name),1),w.disabled?j("",!0):(n(),v(D,{key:0,class:"fileBoxDel",size:16,color:"#729880",onClick:m((e=>(e=>{V.value.splice(e,1),b("update:modelValue",C(V.value))})(l)),["stop"])},{default:c((()=>[u(B)])),_:2},1032,["onClick"]))],8,k)))),128)):j("",!0)])}}};e("default",b(w,[["__scopeId","data-v-f028b45f"]]))}}}));
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
System.register(["./pinia-legacy-631d9b21.js"],(function(e,t){"use strict";var r;return{setters:[e=>{r=e.d}],execute:function(){e("a",r("approver",{state:()=>({approverModalVisible:!1,approverItem:{properties:{}}}),actions:{editTtitle(e){this.approverItem.title=e,console.log(this.approverItem,"store标题")},toggleApproverVisible(e){this.$patch((t=>{t.approverModalVisible=e}))},changeApprover(e){this.$patch((t=>{t.approverItem=e}))},setNewApprover(e){this.$patch((t=>{console.log(e,"设置传入的值"),t.approverItem.title=e.title,t.approverItem.properties=e.properties,t.approverItem.authSettings=e.authSettings}))}}}))}}}));
|
|
|
@ -1 +0,0 @@
|
||||||
import{u as b}from"./vue-router-ab2ba79f.js";import{h,a as k}from"./index-4d581369.js";import{t as x}from"./tools-0351b48a.js";import{E as c}from"./element-plus-a215fcb5.js";import{f as u,ag as t,o as C,S as y,T as s,a as F,d as r,X as g}from"./@vue-5dd246aa.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";import"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@element-plus-ba666efa.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./core-js-c6c47c20.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";const se={__name:"change_password",setup(U){const m=b(),i=u(!0),p=u(null),P=u({oldPassword:[{required:!0,message:"请输入旧密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认新密码",trigger:"blur"},{validator:(d,e,a)=>{e!==o.value.newPassword?a(new Error("密码不一致")):a()},trigger:"blur"}]}),o=u({oldPassword:void 0,newPassword:void 0,confirmPassword:void 0}),_=()=>{p.value.validate(d=>{if(d)h.put("/api/auth/editPassword",{newPassword:o.value.newPassword,oldPassword:o.value.oldPassword}).then(e=>{e.code===200?(x.data.clear("user"),k("token"),c({message:e.message,type:"success"}),m.push("/grain/login")):c({message:e.message,type:"error"})});else return!1})},w=d=>{m.go(-1)};return(d,e)=>{const a=t("el-input"),n=t("el-form-item"),v=t("el-form"),f=t("el-button"),V=t("el-dialog");return C(),y(V,{modelValue:i.value,"onUpdate:modelValue":e[3]||(e[3]=l=>i.value=l),title:"修改密码",width:"350px","before-close":w},{footer:s(()=>[F("span",null,[r(f,{type:"primary",onClick:_},{default:s(()=>[g("保存")]),_:1}),r(f,{onClick:w},{default:s(()=>[g("关闭")]),_:1})])]),default:s(()=>[r(v,{ref_key:"ruleFormRef",ref:p,model:o.value,rules:P.value,"label-width":"100px"},{default:s(()=>[r(n,{label:"旧密码",prop:"oldPassword"},{default:s(()=>[r(a,{modelValue:o.value.oldPassword,"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.oldPassword=l),"show-password":""},null,8,["modelValue"])]),_:1}),r(n,{label:"新密码",prop:"newPassword"},{default:s(()=>[r(a,{modelValue:o.value.newPassword,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.newPassword=l),"show-password":""},null,8,["modelValue"])]),_:1}),r(n,{label:"新密码确认",prop:"confirmPassword"},{default:s(()=>[r(a,{modelValue:o.value.confirmPassword,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.confirmPassword=l),"show-password":""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}};export{se as default};
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./vue-router-legacy-1e8e1d15.js","./index-legacy-5ff7821d.js","./tools-legacy-fa9cbc87.js","./element-plus-legacy-efe0366d.js","./@vue-legacy-4de3d5b5.js","./jspdf-legacy-62dde53b.js","./@babel-legacy-633f46ed.js","./fflate-legacy-e1443086.js","./pinia-legacy-631d9b21.js","./vue-demi-legacy-97cfbb01.js","./axios-legacy-6abb032a.js","./form-data-legacy-f3fd8c46.js","./js-cookie-legacy-c7672909.js","./_plugin-vue_export-helper-legacy-762b7923.js","./DetailDialog.vue_vue_type_style_index_0_scoped_7f0ad311_lang-legacy-dbc5ca3b.js","./lodash-es-legacy-19b348e6.js","./@vueuse-legacy-c8e81244.js","./@element-plus-legacy-bb874362.js","./@popperjs-legacy-16895e05.js","./@ctrl-legacy-79e027b8.js","./dayjs-legacy-b8c949e6.js","./core-js-legacy-b197ddf1.js","./async-validator-legacy-b9dd2ff7.js","./memoize-one-legacy-599ef04d.js","./escape-html-legacy-ae962a8c.js","./normalize-wheel-es-legacy-f7d8e481.js","./@floating-ui-legacy-212d790c.js"],(function(e,l){"use strict";var a,s,o,u,r,d,n,t,c,g,i,m,w;return{setters:[e=>{a=e.u},e=>{s=e.h,o=e.a},e=>{u=e.t},e=>{r=e.E},e=>{d=e.f,n=e.ag,t=e.o,c=e.S,g=e.T,i=e.a,m=e.d,w=e.X},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",{__name:"change_password",setup(e){const l=a(),p=d(!0),y=d(null),j=d({oldPassword:[{required:!0,message:"请输入旧密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认新密码",trigger:"blur"},{validator:(e,l,a)=>{console.log(f.newPassword),console.log(l),l!==f.value.newPassword?a(new Error("密码不一致")):a()},trigger:"blur"}]}),f=d({oldPassword:void 0,newPassword:void 0,confirmPassword:void 0}),v=()=>{y.value.validate((e=>{if(!e)return console.log("error submit!"),!1;s.put("/api/auth/editPassword",{newPassword:f.value.newPassword,oldPassword:f.value.oldPassword}).then((e=>{200===e.code?(u.data.clear("user"),o("token"),r({message:e.message,type:"success"}),l.push("/grain/login")):r({message:e.message,type:"error"})}))}))},P=e=>{l.go(-1)};return(e,l)=>{const a=n("el-input"),s=n("el-form-item"),o=n("el-form"),u=n("el-button"),r=n("el-dialog");return t(),c(r,{modelValue:p.value,"onUpdate:modelValue":l[3]||(l[3]=e=>p.value=e),title:"修改密码",width:"350px","before-close":P},{footer:g((()=>[i("span",null,[m(u,{type:"primary",onClick:v},{default:g((()=>[w("保存")])),_:1}),m(u,{onClick:P},{default:g((()=>[w("关闭")])),_:1})])])),default:g((()=>[m(o,{ref_key:"ruleFormRef",ref:y,model:f.value,rules:j.value,"label-width":"100px"},{default:g((()=>[m(s,{label:"旧密码",prop:"oldPassword"},{default:g((()=>[m(a,{modelValue:f.value.oldPassword,"onUpdate:modelValue":l[0]||(l[0]=e=>f.value.oldPassword=e),"show-password":""},null,8,["modelValue"])])),_:1}),m(s,{label:"新密码",prop:"newPassword"},{default:g((()=>[m(a,{modelValue:f.value.newPassword,"onUpdate:modelValue":l[1]||(l[1]=e=>f.value.newPassword=e),"show-password":""},null,8,["modelValue"])])),_:1}),m(s,{label:"新密码确认",prop:"confirmPassword"},{default:g((()=>[m(a,{modelValue:f.value.confirmPassword,"onUpdate:modelValue":l[2]||(l[2]=e=>f.value.confirmPassword=e),"show-password":""},null,8,["modelValue"])])),_:1})])),_:1},8,["model","rules"])])),_:1},8,["modelValue"])}}})}}}));
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./global-legacy-645676bb.js","./pinia-legacy-631d9b21.js"],(function(n,e){"use strict";var t,r;return{setters:[n=>{t=n.U},n=>{r=n.d}],execute:function(){n({a:function(n){if(!Array.isArray(n))return;let e=[];for(var t=0;t<n.length;t++){let c=n[t];for(var r=0;r<c.length;r++){let n={queAuth:2,queId:c[r].obj.name||c[r].obj.name};e.push(n)}}return e},b:function(n,e=[],r){for(let c=0;c<n;c++){let n={type:"condition",title:"条件名称",prevId:r,nodeId:"condition_"+t(),properties:{conditions:[[]]}};e.push(n)}return e},g:function(n,e){return{title:"审批节点",type:e,prevId:n,nodeId:"approver_"+t(),properties:{personJson:{},persons:[]}}},s:function(n,e,t){if(n instanceof Array){for(;e<0;)e+=n.length;for(;t<0;)t+=n.length;if(t>=n.length)for(var r=t-n.length+1;r--;)n.push(void 0);return n.splice(t,0,n.splice(e,1)[0]),n}console.log("arr must be Array!")}}),n("c",r("condition",{state:()=>({conditionModalVisible:!1,conditionAll:{},checkedCondition:[],branchInfo:{},currentBranch:{},currentBranchParent:{},currentBranchIndex:0}),actions:{addCondition(n){this.$patch((e=>{n&&delete e.conditionAll[n]}))},changeChecked(n){this.$patch((e=>{e.checkedCondition=n}))},changeBranch(n){this.$patch((e=>{e.branchInfo=n,e.currentBranch=n.branch,e.currentBranchIndex=n.index,e.currentBranchParent=n.parentBranch}))},changeBranchIndex(n){this.$patch((e=>{e.currentBranchIndex=n}))},setNewBranch({branch:n,index:e,conditions:t}){this.$patch((r=>{r.currentBranch.title=n.title,r.currentBranch.properties.conditions=t,r.currentBranchIndex=e}))},toggleVisible(n){this.$patch((e=>{e.conditionModalVisible=n}))}}}))}}}));
|
|
|
@ -1 +0,0 @@
|
||||||
import{_ as B}from"./TableBody-480ae430.js";import{y as F}from"./yd_diaInput-f70e9f5c.js";import{h as i}from"./index-4d581369.js";import{E as n}from"./element-plus-a215fcb5.js";import{f as m,a1 as p,k as L,o as x,c as A,d as y,Q as E}from"./@vue-5dd246aa.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./@element-plus-ba666efa.js";import"./lodash.clonedeep-2f114c62.js";import"./core-js-c6c47c20.js";import"./jspdf-28a20e90.js";import"./@babel-5a4b8c9a.js";import"./fflate-8981c52c.js";import"./vue-router-ab2ba79f.js";import"./tools-0351b48a.js";import"./pinia-6e226388.js";import"./vue-demi-71ba0ef2.js";import"./axios-46f5fd04.js";import"./form-data-d2a9677b.js";import"./js-cookie-40e39767.js";/* empty css */import"./lodash-es-b9271f86.js";import"./@vueuse-77cc1d99.js";import"./@popperjs-c75af06c.js";import"./@ctrl-1c80e935.js";import"./dayjs-88f1e3c5.js";import"./async-validator-a1293421.js";import"./memoize-one-297ddbcb.js";import"./escape-html-1d60d822.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-f831ca66.js";const q={class:"example"},pe={__name:"department",setup(D){const c=m(!1),d=p({tableType:{selection:!1,tableLoading:!1,tableIndex:!1,tableTree:!0,tableTreeName:"children",isHiddenPagination:!0,changeHeight:!1},tableHeader:[{buttons:["create","edit","delete"]},{buttons:[{name:"sort",options:[{label:"排序",value:"sortNo"},{label:"创建时间",value:"createdAt"}]},"search"]}],tableList:[{name:"name",label:"部门名称",show:!0},{name:"code",label:"部门编码",show:!0},{name:"remarks",label:"备注",show:!0},{name:"sortNo",label:"排序",show:!0}],tableData:[]}),r=p({value:!1,changeValue:e=>{r.value=e}}),h=p([{type:"treeSelect",title:"上级部门",model:"pid",placeholder:"请选择上级部门",control:!1,row:24,options:[]},{type:"input",title:"部门编码",model:"code",placeholder:"请输入部门编码",control:!1,row:24},{type:"input",title:"部门名称",placeholder:"请输入部门名称",control:!1,model:"name",row:24},{type:"number",title:"排序",model:"sortNo",row:24},{type:"input",title:"备注",control:!1,placeholder:"请输入备注",model:"remarks",row:24}]),u=m({code:"",name:"",pid:"",remarks:"",sortNo:0}),b=m({type:"create",name:"新增",id:""}),v=m({code:[{required:!0,message:"请输入部门编码",trigger:"blur"}],name:[{required:!0,message:"请输入部门名称",trigger:"blur"}]}),l=p({column:void 0,orderBy:void 0,value:void 0}),f=()=>{i.get("/api/dept/tree").then(e=>{e.code==200&&(h[0].options=e.data.data)})},s=()=>{d.tableType.tableLoading=!0,i.get("/api/dept/list",l).then(e=>{e.code==200&&(d.tableData=e.data,d.tableType.tableLoading=!1)}).catch(()=>{d.tableType.tableLoading=!1})},k=({type:e,data:t})=>{switch(e){case"create":w();break;case"edit":T(t);break;case"delete":N(t);break;case"sort":V(t);break;case"search":H(t);break}},N=e=>{const t=e.map(a=>a.id);i.delete("/api/dept/remove",{params:{id:t[0]}}).then(a=>{a.code==200?(n({message:"删除成功",type:"success"}),s(),f()):n({message:a.message,type:"error"})})},_=(e,t,a)=>{if(e==="create"){let o={...t};t.pid===""&&(o={...o,pid:0}),i.post("/api/dept/save",o).then(g=>{g.code==200?(n({message:g.message,type:"success"}),r.value=!1,s(),f()):n.error(g.message)})}else e==="edit"&&i.put(`/api/dept/edit?id=${a}`,t).then(o=>{o.code==200?(n({message:o.message,type:"success"}),r.value=!1,s()):n.error(o.message)})},w=()=>{r.value=!0,b.value={type:"create",name:"新增",id:""},c.value=!1,u.value={code:"",name:"",pid:"",remarks:"",sortNo:0}},T=e=>{const t=e[0].id;c.value=!1,i.get("/api/dept/detail",{id:t}).then(a=>{a.code===200&&(r.value=!0,u.value={paramKey:a.data.paramKey,paramValue:a.data.paramValue,remarks:a.data.remarks,sortNo:a.data.sortNo,code:a.data.data.code,name:a.data.data.name,pid:a.data.data.pid==0?"":a.data.data.pid,remarks:a.data.data.remarks,sortNo:a.data.data.sortNo},b.value={type:"edit",name:"编辑",id:t})})},H=e=>{l.value=e.value,s()},V=e=>{e.name===""?(l.orderBy=void 0,l.column=void 0):(l.orderBy=e.sortType,l.column=e.name),s()};return L(()=>{s(),f()}),(e,t)=>(x(),A("div",q,[y(B,E(d,{onHandleTableHeader:k}),null,16),y(F,{inputArray:h,onHandleFrom:_,dialogVisible:r,control:c.value,buttonName:b.value,ruleForm:u.value,rules:v.value,diawidth:25},null,8,["inputArray","dialogVisible","control","buttonName","ruleForm","rules"])]))}};export{pe as default};
|
|
|
@ -1 +0,0 @@
|
||||||
System.register(["./TableBody-legacy-63f11311.js","./yd_diaInput-legacy-0b3ee090.js","./index-legacy-5ff7821d.js","./element-plus-legacy-efe0366d.js","./@vue-legacy-4de3d5b5.js","./_plugin-vue_export-helper-legacy-762b7923.js","./@element-plus-legacy-bb874362.js","./lodash.clonedeep-legacy-81abd881.js","./core-js-legacy-b197ddf1.js","./jspdf-legacy-62dde53b.js","./@babel-legacy-633f46ed.js","./fflate-legacy-e1443086.js","./vue-router-legacy-1e8e1d15.js","./tools-legacy-fa9cbc87.js","./pinia-legacy-631d9b21.js","./vue-demi-legacy-97cfbb01.js","./axios-legacy-6abb032a.js","./form-data-legacy-f3fd8c46.js","./js-cookie-legacy-c7672909.js","./DetailDialog.vue_vue_type_style_index_0_scoped_7f0ad311_lang-legacy-dbc5ca3b.js","./lodash-es-legacy-19b348e6.js","./@vueuse-legacy-c8e81244.js","./@popperjs-legacy-16895e05.js","./@ctrl-legacy-79e027b8.js","./dayjs-legacy-b8c949e6.js","./async-validator-legacy-b9dd2ff7.js","./memoize-one-legacy-599ef04d.js","./escape-html-legacy-ae962a8c.js","./normalize-wheel-es-legacy-f7d8e481.js","./@floating-ui-legacy-212d790c.js"],(function(e,a){"use strict";var l,t,o,s,r,n,d,c,u,i,p;return{setters:[e=>{l=e._},e=>{t=e.y},e=>{o=e.h},e=>{s=e.E},e=>{r=e.f,n=e.a1,d=e.k,c=e.o,u=e.c,i=e.d,p=e.Q},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){const a={class:"example"};e("default",{__name:"department",setup(e){const g=r(!1),m=n({tableType:{selection:!1,tableLoading:!1,tableIndex:!1,tableTree:!0,tableTreeName:"children",isHiddenPagination:!0,changeHeight:!1},tableHeader:[{buttons:["create","edit","delete"]},{buttons:[{name:"sort",options:[{label:"排序",value:"sortNo"},{label:"创建时间",value:"createdAt"}]},"search"]}],tableList:[{name:"name",label:"部门名称",show:!0},{name:"code",label:"部门编码",show:!0},{name:"remarks",label:"备注",show:!0},{name:"sortNo",label:"排序",show:!0}],tableData:[]}),y=n({value:!1,changeValue:e=>{y.value=e}}),v=n([{type:"treeSelect",title:"上级部门",model:"pid",placeholder:"请选择上级部门",control:!1,row:24,options:[]},{type:"input",title:"部门编码",model:"code",placeholder:"请输入部门编码",control:!1,row:24},{type:"input",title:"部门名称",placeholder:"请输入部门名称",control:!1,model:"name",row:24},{type:"number",title:"排序",model:"sortNo",row:24},{type:"input",title:"备注",control:!1,placeholder:"请输入备注",model:"remarks",row:24}]),b=r({code:"",name:"",pid:"",remarks:"",sortNo:0}),j=r({type:"create",name:"新增",id:""}),h=r({code:[{required:!0,message:"请输入部门编码",trigger:"blur"}],name:[{required:!0,message:"请输入部门名称",trigger:"blur"}]}),k=n({column:void 0,orderBy:void 0,value:void 0}),_=()=>{o.get("/api/dept/tree").then((e=>{200==e.code&&(console.log("res",e),v[0].options=e.data.data)}))},f=()=>{m.tableType.tableLoading=!0,o.get("/api/dept/list",k).then((e=>{200==e.code&&(m.tableData=e.data,m.tableType.tableLoading=!1)})).catch((()=>{m.tableType.tableLoading=!1}))},w=({type:e,data:a})=>{switch(console.log(e,a),e){case"create":x();break;case"edit":console.log(e,a),H(a);break;case"delete":N(a);break;case"sort":B(a);break;case"search":L(a)}},N=e=>{const a=e.map((e=>e.id));console.log(a[0]),o.delete("/api/dept/remove",{params:{id:a[0]}}).then((e=>{200==e.code?(s({message:"删除成功",type:"success"}),f(),_()):s({message:e.message,type:"error"})}))},T=(e,a,l)=>{if(console.log(e,a,l),"create"===e){let e={...a};""===a.pid&&(e={...e,pid:0}),o.post("/api/dept/save",e).then((e=>{console.log(e),200==e.code?(s({message:e.message,type:"success"}),y.value=!1,f(),_()):s.error(e.message)}))}else"edit"===e&&(o.put(`/api/dept/edit?id=${l}`,a).then((e=>{200==e.code?(s({message:e.message,type:"success"}),y.value=!1,f()):s.error(e.message)})),console.log(l))},x=()=>{y.value=!0,j.value={type:"create",name:"新增",id:""},g.value=!1,b.value={code:"",name:"",pid:"",remarks:"",sortNo:0}},H=e=>{const a=e[0].id;g.value=!1,o.get("/api/dept/detail",{id:a}).then((e=>{200===e.code&&(console.log(e),y.value=!0,b.value={paramKey:e.data.paramKey,paramValue:e.data.paramValue,remarks:e.data.remarks,sortNo:e.data.sortNo,code:e.data.data.code,name:e.data.data.name,pid:0==e.data.data.pid?"":e.data.data.pid,remarks:e.data.data.remarks,sortNo:e.data.data.sortNo},j.value={type:"edit",name:"编辑",id:a})}))},L=e=>{console.log(e.value),k.value=e.value,f()},B=e=>{""===e.name?(k.orderBy=void 0,k.column=void 0):(k.orderBy=e.sortType,k.column=e.name),f()};return d((()=>{f(),_()})),(e,o)=>(c(),u("div",a,[i(l,p(m,{onHandleTableHeader:w}),null,16),i(t,{inputArray:v,onHandleFrom:T,dialogVisible:y,control:g.value,buttonName:j.value,ruleForm:b.value,rules:h.value,diawidth:25},null,8,["inputArray","dialogVisible","control","buttonName","ruleForm","rules"])]))}})}}}));
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue