From 6b5d92fec3af0915a60f1597310fc2626ae9bb35 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Thu, 11 Jul 2024 20:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9;=E6=8A=A5=E9=94=80=E5=8D=95?= =?UTF-8?q?=E6=96=B0=E5=A2=9Einstance=5FId=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E7=BC=96=E5=86=99=E6=9F=A5=E8=AF=A2=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E3=80=82=E6=96=B0=E5=A2=9E=E6=89=B9=E9=87=8F=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8A=A5=E9=94=80=E5=8D=95=E5=88=86=E7=B1=BB=E6=8A=A5?= =?UTF-8?q?=E9=94=80=E5=AD=90=E8=A1=A8=E5=88=A0=E9=99=A4=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=BA=9F=E5=BC=83=E6=96=B9=E6=B3=95,=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8A=A5=E9=94=80=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8A=A5=E9=94=80=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=A1=AB=E5=86=99=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseExpenseAccountController.java | 123 ++++++++++- .../system/domain/BaseExpenseAccount.java | 14 +- .../domain/BaseExpenseAccountChild.java | 24 +-- .../domain/Vo/BaseExpenseAccountVo.java | 125 +++++++++++ .../mapper/BaseExpenseAccountChildMapper.java | 34 +++ .../mapper/BaseExpenseAccountMapper.java | 39 +++- .../IBaseExpenseAccountChildService.java | 36 +++- .../service/IBaseExpenseAccountService.java | 19 +- .../BaseExpenseAccountChildServiceImpl.java | 20 ++ .../impl/BaseExpenseAccountServiceImpl.java | 187 ++++++++++++++++- .../system/BaseExpenseAccountChildMapper.xml | 71 ++++--- .../system/BaseExpenseAccountMapper.xml | 115 ++++++++-- .../templates/system/baseExpense/add.html | 106 ++++++---- .../system/baseExpense/baseExpense.html | 1 - .../templates/system/baseExpense/detail.html | 4 +- .../templates/system/baseExpense/edit.html | 128 +++++++---- .../system/baseExpense/taskCwVerify.html | 40 ++++ .../system/baseExpense/taskModifyApply.html | 40 ++++ .../system/baseExpense/taskZozjVerify.html | 40 ++++ .../system/baseExpense/taskbxjlVerify.html | 198 ++++++++++++++++++ .../system/baseExpense/taskbxzgVerify.html | 160 ++++++++++++++ 21 files changed, 1342 insertions(+), 182 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseExpenseAccountVo.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/baseExpense/taskCwVerify.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/baseExpense/taskModifyApply.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java index 463e877a..e6c67f41 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java @@ -1,6 +1,23 @@ package com.ruoyi.system.controller; +import java.util.HashMap; import java.util.List; + +import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; +import com.ruoyi.remind.service.RemindService; +import com.ruoyi.system.domain.BaseExpenseAccountChild; +import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; +import com.ruoyi.system.mapper.BaseExpenseAccountChildMapper; +import com.ruoyi.system.mapper.SysUserMapper; +import com.ruoyi.system.service.*; +import org.activiti.engine.RuntimeService; +import org.activiti.engine.TaskService; +import org.activiti.engine.runtime.ProcessInstance; +import org.activiti.engine.task.Task; +import org.apache.commons.lang3.BooleanUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -9,12 +26,14 @@ import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.domain.BaseExpenseAccount; -import com.ruoyi.system.service.IBaseExpenseAccountService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + /** * 报销单Controller * @@ -30,6 +49,32 @@ public class BaseExpenseAccountController extends BaseController @Autowired private IBaseExpenseAccountService baseExpenseAccountService; + @Autowired + private RedisCache redisCache; + + @Autowired + private IBaseExpenseAccountChildService baseExpenseAccountChildService; + + @Autowired + private ISysDictTypeService sysDictTypeService; + @Autowired + private RemindService remindService; + + @Autowired + private ISysRoleService roleService; + + @Autowired + private TaskService taskService; + + @Autowired + private RuntimeService runtimeService; + @Autowired + private ISysUserService sysUserService; + + @Autowired + private IProcessService processService; + @Autowired + @RequiresPermissions("system:baseExpense:view") @GetMapping() public String baseExpense() @@ -43,10 +88,10 @@ public class BaseExpenseAccountController extends BaseController @RequiresPermissions("system:baseExpense:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(BaseExpenseAccount baseExpenseAccount) + public TableDataInfo list(BaseExpenseAccountVo baseExpenseAccount) { startPage(); - List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); + List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); return getDataTable(list); } @@ -59,8 +104,8 @@ public class BaseExpenseAccountController extends BaseController @ResponseBody public AjaxResult export(BaseExpenseAccount baseExpenseAccount) { - List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); - ExcelUtil util = new ExcelUtil(BaseExpenseAccount.class); + List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); + ExcelUtil util = new ExcelUtil(BaseExpenseAccountVo.class); return util.exportExcel(list, "报销单数据"); } @@ -125,7 +170,75 @@ public class BaseExpenseAccountController extends BaseController { return toAjax(baseExpenseAccountService.deleteBaseExpenseAccountByIds(ids)); } + @GetMapping("/showVerifyDialog/{taskId}") + public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) { + Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); + String processInstanceId = task.getProcessInstanceId(); + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + BaseExpenseAccountVo baseExpenseAccountVo = baseExpenseAccountService.selectBaseExpenseAccountById(new Long(processInstance.getBusinessKey())); + mmap.put("formData", baseExpenseAccountVo); + mmap.put("taskId", taskId); + String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); + return prefix + "/task" + verifyName; + } + @ModelAttribute("/preloadObj") + public BaseExpenseAccountVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) { + if (id != null) { + return baseExpenseAccountService.selectBaseExpenseAccountById(id); + } + return new BaseExpenseAccountVo(); + } + /** + * 完成任务 + * + * @return + */ + @RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET}) + @ResponseBody + public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity, + @RequestParam(value = "customerQuoteChildList", required = false) String customerQuoteChildList, + @ModelAttribute("preloadObj") BaseExpenseAccountVo baseExpenseAccountVo, HttpServletRequest request) { + boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity); + baseExpenseAccountVo.setExpenseAccountChildList(JSON.parseArray(customerQuoteChildList, BaseExpenseAccountChild.class)); + + String instanceId = baseExpenseAccountVo.getInstanceId(); + String instanceType = baseExpenseAccountVo.getInstanceType(); + boolean approvedFlag = processService.complete(taskId, instanceId, baseExpenseAccountVo.getApplyTitle(), + baseExpenseAccountVo.getSupplierCode(), + "customerQuote", new HashMap(), request); + if(!approvedFlag){ + // 审核状态-审核拒绝 + baseExpenseAccountVo.setAuditStatus("2"); + } + // 如果任务已结束更新业务表状态 方法中传入的值为原来的instanceId,只是做了调整 + boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); + if (processIsFinish) { + // 审核通过 + baseExpenseAccountVo.setAuditStatus("1"); + // 提交 + if("submit".equals(instanceType)){ + // 使用状态-是 + baseExpenseAccountVo.setUseStatus("1"); + } + // 作废 + else if("cancel".equals(instanceType)){ + // 使用状态-已作废 + baseExpenseAccountVo.setUseStatus("2"); + } + // 恢复 + else if("restore".equals(instanceType)){ + // 使用状态-是 + baseExpenseAccountVo.setUseStatus("1"); + } + } + baseExpenseAccountService.updateBaseExpenseAccount(baseExpenseAccountVo); + // 驳回申请后继续申请,可能修改表单 + if (saveEntityBoolean) { + baseExpenseAccountService.updateBaseExpenseAccount(baseExpenseAccountVo); + } + return success("任务已完成"); + } /** * 作废报销单 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java index 55a42a89..375e5961 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java @@ -50,8 +50,8 @@ public class BaseExpenseAccount extends BaseEntity @Excel(name = "姓名") private String fullName; - /** 报销方式 */ - @Excel(name = "报销方式") + /** 报销方式 个人报销 0,公转报销 1 */ + @Excel(name = "报销方式 个人报销 0,公转报销 1" ) private String expenseMethod; /** 是否是委外/采购采销 */ @@ -82,7 +82,7 @@ public class BaseExpenseAccount extends BaseEntity @Excel(name = "使用状态") private String useStatus; - private String del_flag; + private String delFlag; /** 流程实例ID */ private String instanceId; @@ -174,12 +174,12 @@ public class BaseExpenseAccount extends BaseEntity this.expenseAccountChildList = expenseAccountChildList; } - public String getDel_flag() { - return del_flag; + public String getDelFlag() { + return delFlag; } - public void setDel_flag(String del_flag) { - this.del_flag = del_flag; + public void setDelFlag(String delFlag) { + this.delFlag = delFlag; } public void setExpenseId(Long expenseId) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java index e9562476..e21d06e8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccountChild.java @@ -22,7 +22,7 @@ public class BaseExpenseAccountChild extends BaseEntity /** 关联报销单号 */ @Excel(name = "关联报销单号") - private String quoteId; + private String expenseCode; /** 成本类型 */ @Excel(name = "成本类型") @@ -51,7 +51,7 @@ public class BaseExpenseAccountChild extends BaseEntity /** 采购单号 */ @Excel(name = "采购单号") - private String purcahseCode; + private String purchaseCode; /** 委外单号 */ @Excel(name = "委外单号") @@ -69,14 +69,14 @@ public class BaseExpenseAccountChild extends BaseEntity { return expenseChildId; } - public void setQuoteId(String quoteId) + public void setExpenseCode(String expenseCode) { - this.quoteId = quoteId; + this.expenseCode = expenseCode; } - public String getQuoteId() + public String getExpenseCode() { - return quoteId; + return expenseCode; } public void setCostType(String costType) { @@ -132,14 +132,14 @@ public class BaseExpenseAccountChild extends BaseEntity { return evectionCode; } - public void setPurcahseCode(String purcahseCode) + public void setPurchaseCode(String purchaseCode) { - this.purcahseCode = purcahseCode; + this.purchaseCode = purchaseCode; } - public String getPurcahseCode() + public String getPurchaseCode() { - return purcahseCode; + return purchaseCode; } public void setOutsourceCode(String outsourceCode) { @@ -164,14 +164,14 @@ public class BaseExpenseAccountChild extends BaseEntity public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("expenseChildId", getExpenseChildId()) - .append("quoteId", getQuoteId()) + .append("expenseCode", getExpenseCode()) .append("cost type", getCostType()) .append("costSmallType", getCostSmallType()) .append("purpose", getPurpose()) .append("amounts", getAmounts()) .append("expenseTime", getExpenseTime()) .append("evectionCode", getEvectionCode()) - .append("purcahseCode", getPurcahseCode()) + .append("purchaseCode", getPurchaseCode()) .append("outsourceCode", getOutsourceCode()) .append("createTime", getCreateTime()) .append("createBy", getCreateBy()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseExpenseAccountVo.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseExpenseAccountVo.java new file mode 100644 index 00000000..c0939c53 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseExpenseAccountVo.java @@ -0,0 +1,125 @@ +package com.ruoyi.system.domain.Vo; + +import com.ruoyi.system.domain.BaseExpenseAccount; +import com.ruoyi.system.domain.BaseRequisitioningOrder; + +import java.util.Date; + +/** + * + * @Description 请购单信息Vo + */ + +public class BaseExpenseAccountVo extends BaseExpenseAccount { + private static final long serialVersionUID = 1L; + /** 申请人姓名 */ + private String applyUserName; + /** 任务ID */ + private String taskId; + /** 任务名称 */ + private String taskName; + /** 办理时间 */ + private Date doneTime; + /** 创建人 */ + private String createUserName; + /** 流程实例状态 1 激活 2 挂起 */ + private String suspendState; + /** 待办用户id */ + private String todoUserId; + /** 流程实例类型名称 */ + private String instanceTypeName; + + /** + * 关键词 + */ + private String keyword; + + public String getApplyUserName() { + return applyUserName; + } + + public void setApplyUserName(String applyUserName) { + this.applyUserName = applyUserName; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getTaskName() { + return taskName; + } + + public void setTaskName(String taskName) { + this.taskName = taskName; + } + + public Date getDoneTime() { + return doneTime; + } + + public void setDoneTime(Date doneTime) { + this.doneTime = doneTime; + } + + public String getCreateUserName() { + return createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getSuspendState() { + return suspendState; + } + + public void setSuspendState(String suspendState) { + this.suspendState = suspendState; + } + + public String getTodoUserId() { + return todoUserId; + } + + public void setTodoUserId(String todoUserId) { + this.todoUserId = todoUserId; + } + + public String getInstanceTypeName() { + return instanceTypeName; + } + + public void setInstanceTypeName(String instanceTypeName) { + this.instanceTypeName = instanceTypeName; + } + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + @Override + public String toString() { + return "BaseExpenseAccountVo{" + + "applyUserName='" + applyUserName + '\'' + + ", taskId='" + taskId + '\'' + + ", taskName='" + taskName + '\'' + + ", doneTime=" + doneTime + + ", createUserName='" + createUserName + '\'' + + ", suspendState='" + suspendState + '\'' + + ", todoUserId='" + todoUserId + '\'' + + ", instanceTypeName='" + instanceTypeName + '\'' + + ", keyword='" + keyword + '\'' + + super.toString() + + "} " ; + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java index 3485345e..c4589060 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountChildMapper.java @@ -74,4 +74,38 @@ public interface BaseExpenseAccountChildMapper * @return 结果 */ public int restoreBaseExpenseAccountChildById(Long expenseChildId); + + /** + * 根据报销单号作废报销单分类子表数据化 + * + * @param expenseCode 需要作废的数据ID + * @return 结果 + */ + public int updateBaseExpenseAccountChildByExpenseCode(String expenseCode); + + /** + * 根据报销单号批量作废报销单分类子表数据 + * + * @param expenseCodes 需要作废的数据ID组 + * @return 结果 + */ + public int updateBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes); + + /** + * 根据报销单号删除报销单分类子表数据化 + * + * @param expenseCode 需要作废的数据ID + * @return 结果 + */ + public int deleteBaseExpenseAccountChildByExpenseCode(String expenseCode); + + /** + * 根据报销单号批量删除报销单分类子表数据 + * + * @param expenseCodes 需要作废的数据ID组 + * @return 结果 + */ + public int deleteBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes); + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java index a8fdc2d2..d4cced6b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseExpenseAccountMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.BaseExpenseAccount; +import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; /** * 报销单Mapper接口 @@ -13,11 +14,11 @@ public interface BaseExpenseAccountMapper { /** * 查询报销单 - * + * * @param expenseId 报销单ID * @return 报销单 */ - public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId); + public BaseExpenseAccountVo selectBaseExpenseAccountById(Long expenseId); /** * 查询报销单列表 @@ -25,7 +26,7 @@ public interface BaseExpenseAccountMapper * @param baseExpenseAccount 报销单 * @return 报销单集合 */ - public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); + public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); /** * 新增报销单 @@ -73,5 +74,35 @@ public interface BaseExpenseAccountMapper * @param expenseId 报销单ID * @return 结果 */ - public int restoreBaseExpenseAccountById(Long expenseId); + public Integer restoreBaseExpenseAccountById(Long expenseId); + + /** + * 根据报销单号批量作废 + * @param expenseCodes + * @return + */ + public Integer updateExpenseAccountByExpenseCodes(String[] expenseCodes); + + /** + * 根据报销单号作废 + * @param expenseCode + * @return + */ + public Integer updateExpenseAccountByExpenseCode(String expenseCode); + + /** + * 根据报销单号批量删除 + * @param expenseCodes + * @return + */ + + public Integer deleteBaseExpenseAccountByExpenseCodes(String[] expenseCodes); + + /** + * 根据报销单号删除 + * @param expenseCode + * @return + */ + + public Integer deleteBaseExpenseAccountByExpenseCode(String expenseCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java index c015d483..e10b38ff 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountChildService.java @@ -64,12 +64,40 @@ public interface IBaseExpenseAccountChildService * @param expenseChildId 报销单分类子ID * @return */ - int cancelBaseExpenseAccountChildById(Long expenseChildId); + public int cancelBaseExpenseAccountChildById(Long expenseChildId); + /** - * 恢复报销单分类子 - * @param expenseChildId 报销单分类子ID - * @return + * 根据报销单号作废报销单分类子表数据化 + * + * @param expenseCode 需要作废的数据ID + * @return 结果 */ + public int updateBaseExpenseAccountChildByExpenseCode(String expenseCode); + + /** + * 根据报销单号批量作废报销单分类子表数据 + * + * @param expenseCodes 需要作废的数据ID组 + * @return 结果 + */ + public int updateBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes); + + /** + * 根据报销单号删除报销单分类子表数据化 + * + * @param expenseCode 需要作废的数据ID + * @return 结果 + */ + public int deleteBaseExpenseAccountChildByExpenseCode(String expenseCode); + + /** + * 根据报销单号批量删除报销单分类子表数据 + * + * @param expenseCodes 需要作废的数据ID组 + * @return 结果 + */ + public int deleteBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes); + int restoreBaseExpenseAccountChildById(Long expenseChildId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java index 22c779d6..c1988861 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java @@ -2,6 +2,9 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.BaseExpenseAccount; +import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; +import org.activiti.engine.runtime.ProcessInstance; +import org.springframework.transaction.annotation.Transactional; /** * 报销单Service接口 @@ -13,19 +16,19 @@ public interface IBaseExpenseAccountService { /** * 查询报销单 - * + * * @param expenseId 报销单ID * @return 报销单 */ - public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId); + public BaseExpenseAccountVo selectBaseExpenseAccountById(Long expenseId); /** * 查询报销单列表 - * + * * @param baseExpenseAccount 报销单 * @return 报销单集合 */ - public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); + public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); /** * 新增报销单 @@ -74,5 +77,13 @@ public interface IBaseExpenseAccountService int restoreBaseExpenseAccountById(Long expenseId); + @Transactional(rollbackFor = Exception.class) + public ProcessInstance cancelSysCustomerById(Long id); + + @Transactional(rollbackFor = Exception.class) + public ProcessInstance restoreSysCustomerById(Long id); + + public ProcessInstance submitApply(BaseExpenseAccount baseExpenseAccount); + public Object getId(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java index 5b9c9eef..e6ac2d64 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountChildServiceImpl.java @@ -112,6 +112,26 @@ public class BaseExpenseAccountChildServiceImpl implements IBaseExpenseAccountCh return baseExpenseAccountChildMapper.cancelBaseExpenseAccountChildById(expenseChildId); } + @Override + public int updateBaseExpenseAccountChildByExpenseCode(String expenseCode) { + return baseExpenseAccountChildMapper.updateBaseExpenseAccountChildByExpenseCode(expenseCode); + } + + @Override + public int updateBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes) { + return baseExpenseAccountChildMapper.updateBaseExpenseAccountChildByExpenseCodes(expenseCodes); + } + + @Override + public int deleteBaseExpenseAccountChildByExpenseCode(String expenseCode) { + return baseExpenseAccountChildMapper.deleteBaseExpenseAccountChildByExpenseCode(expenseCode); + } + + @Override + public int deleteBaseExpenseAccountChildByExpenseCodes(String[] expenseCodes) { + return baseExpenseAccountChildMapper.deleteBaseExpenseAccountChildByExpenseCodes(expenseCodes); + } + /** * 恢复报销单分类子信息 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java index 8ea6503f..baad2bbd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java @@ -1,16 +1,31 @@ package com.ruoyi.system.service.impl; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Set; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; +import com.ruoyi.system.domain.BaseExpenseAccountChild; +import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; +import com.ruoyi.system.mapper.SysUserMapper; +import com.ruoyi.system.service.IBaseExpenseAccountChildService; +import com.ruoyi.system.service.ISysRoleService; +import org.activiti.engine.TaskService; +import org.activiti.engine.runtime.ProcessInstance; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.BaseExpenseAccountMapper; import com.ruoyi.system.domain.BaseExpenseAccount; import com.ruoyi.system.service.IBaseExpenseAccountService; import com.ruoyi.common.core.text.Convert; +import org.springframework.transaction.annotation.Transactional; /** * 报销单Service业务层处理 @@ -27,26 +42,44 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService @Autowired private RedisCache redisCache; + @Autowired + private IBaseExpenseAccountChildService baseExpenseAccountChildService; + + @Autowired + private SysUserMapper userMapper; + + @Autowired + private TaskService taskService; + + @Autowired + private BizTodoItemMapper todoItemMapper; + + @Autowired + private IProcessService processService; + + @Autowired + private ISysRoleService roleService; + /** * 查询报销单 - * + * * @param expenseId 报销单ID * @return 报销单 */ @Override - public BaseExpenseAccount selectBaseExpenseAccountById(Long expenseId) + public BaseExpenseAccountVo selectBaseExpenseAccountById(Long expenseId) { return baseExpenseAccountMapper.selectBaseExpenseAccountById(expenseId); } /** * 查询报销单列表 - * + * * @param baseExpenseAccount 报销单 * @return 报销单 */ @Override - public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount) + public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount) { return baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount); } @@ -63,6 +96,19 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService String loginName = ShiroUtils.getLoginName(); baseExpenseAccount.setCreateBy(loginName); baseExpenseAccount.setCreateTime(DateUtils.getNowDate()); + baseExpenseAccount.setAuditStatus("0"); + baseExpenseAccount.setUseStatus("0"); + baseExpenseAccount.setDelFlag("0"); + List baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList(); + int baseExpaneseChildSize = baseExpenseAccountChildList.size(); + if (baseExpaneseChildSize > 0) { + for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) { + baseExpenseAccountChild.setCreateBy(loginName); + baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate()); + //获取父表的单号 + baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode()); + } + } return baseExpenseAccountMapper.insertBaseExpenseAccount(baseExpenseAccount); } @@ -78,6 +124,19 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService String loginName = ShiroUtils.getLoginName(); baseExpenseAccount.setUpdateBy(loginName); baseExpenseAccount.setUpdateTime(DateUtils.getNowDate()); + baseExpenseAccount.setDelFlag("0"); + List baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList(); + baseExpenseAccountChildService.deleteBaseExpenseAccountChildById(baseExpenseAccount.getExpenseId()); + int baseExpenseChildSize = baseExpenseAccountChildList.size(); + if (baseExpenseChildSize > 0) { + baseExpenseAccountChildService.deleteBaseExpenseAccountChildByExpenseCode(baseExpenseAccount.getExpenseCode()); + for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) { + baseExpenseAccountChild.setCreateBy(loginName); + baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate()); + //获取父表的单号 + baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode()); + } + } return baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount); } @@ -128,7 +187,127 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService { return baseExpenseAccountMapper.restoreBaseExpenseAccountById(expenseId); } + @Override + @Transactional(rollbackFor = Exception.class) + public ProcessInstance cancelSysCustomerById(Long id) { + BaseExpenseAccountVo baseExpenseAccountVo = baseExpenseAccountMapper.selectBaseExpenseAccountById(id); + // 审核状态-待审核 + baseExpenseAccountVo.setAuditStatus("0"); + SysUser user = ShiroUtils.getSysUser(); + // 启动流程 + String applyTitle = user.getUserName()+"发起了客户信息作废审批-"+ DateUtils.dateTimeNow(); + String instanceType = "cancel"; + BaseExpenseAccount baseExpenseAccount = new BaseExpenseAccount(); + BeanUtils.copyProperties(baseExpenseAccountVo,baseExpenseAccount); + ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseExpenseAccount, user); + String processInstanceId = processInstance.getProcessInstanceId(); + // 作废实例id + baseExpenseAccount.setCancelInstanceId(processInstanceId); + // 存在提交完就流程结束的情况 + boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); + if(processIsFinish){ + // 审核状态-审核通过 + baseExpenseAccount.setAuditStatus("1"); + // 使用状态-已作废 + baseExpenseAccount.setUseStatus("2"); + } + baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount); + return processInstance; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public ProcessInstance restoreSysCustomerById(Long id) { + BaseExpenseAccountVo baseExpenseAccountVo = baseExpenseAccountMapper.selectBaseExpenseAccountById(id); + // 审核状态-待审核 + baseExpenseAccountVo.setAuditStatus("0"); + SysUser user = ShiroUtils.getSysUser(); + // 启动流程 + String applyTitle = user.getUserName()+"发起了客户恢复审批-"+DateUtils.dateTimeNow(); + String instanceType = "restore"; + BaseExpenseAccount baseExpenseAccount = new BaseExpenseAccount(); + BeanUtils.copyProperties(baseExpenseAccountVo,baseExpenseAccount); + ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseExpenseAccount, user); + String processInstanceId = processInstance.getProcessInstanceId(); + // 恢复实例id + baseExpenseAccount.setRestoreInstanceId(processInstanceId); + // 存在提交完就流程结束的情况 + boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); + if(processIsFinish){ + // 审核状态-审核通过 + baseExpenseAccount.setAuditStatus("1"); + // 使用状态-是 + baseExpenseAccount.setUseStatus("1"); + } + baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount); + return processInstance; + } + + /** + * 提交申请 + * @param baseExpenseAccount + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public ProcessInstance submitApply(BaseExpenseAccount baseExpenseAccount) { + SysUser user = ShiroUtils.getSysUser(); + baseExpenseAccount.setApplyUser(user.getLoginName()); + baseExpenseAccount.setApplyTime(DateUtils.getNowDate()); + if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){ + insertBaseExpenseAccount(baseExpenseAccount); + } + // 启动流程 + String applyTitle = user.getUserName()+"发起了报销单提交审批-"+DateUtils.dateTimeNow(); + String instanceType = "submit"; + ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseExpenseAccount, user); + String processInstanceId = processInstance.getProcessInstanceId(); + // 提交实例id + baseExpenseAccount.setSubmitInstanceId(processInstanceId); + // 存在提交完就流程结束的情况 + boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); + if(processIsFinish){ + // 审核状态-审核通过 + baseExpenseAccount.setAuditStatus("1"); + // 使用状态-是 + baseExpenseAccount.setUseStatus("1"); + } + baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount); + return processInstance; + } + + + private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseExpenseAccount baseExpenseAccount, SysUser user) { + Long customerId = baseExpenseAccount.getExpenseId(); + String businessKey = customerId.toString(); // 实体类 ID,作为流程的业务 key + String key = "customer"; + Map variables = new HashMap<>(); + // 构造authority传参 + buildAuthority(user, variables); + baseExpenseAccount.setApplyTitle(applyTitle); + // 启动流程 + ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle, + baseExpenseAccount.getExpenseCode(), key, variables); + String processInstanceId = processInstance.getId(); + baseExpenseAccount.setInstanceId(processInstanceId); // 建立双向关系 + baseExpenseAccount.setInstanceType(instanceType); + return processInstance; + } + + private void buildAuthority(SysUser user, Map variables) { + Set roleKeys = roleService.selectRoleKeys(user.getUserId()); + // 角色不同审核人不同 + if(roleKeys.contains("zozjRole") || roleKeys.contains("zjlRole") || roleKeys.contains("admin")){ + variables.put("authority",4); + }else if(roleKeys.contains("ywzgRole")){ + variables.put("authority",3); + }else if(roleKeys.contains("ywjlRole")){ + variables.put("authority",2); + }else if(roleKeys.contains("ywyRole")){ + variables.put("authority",1); + } + } @Override public Object getId() { return redisCache.generateBillNo("BX"); diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml index 5d5d8e57..792f7899 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountChildMapper.xml @@ -5,27 +5,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - select expense_child_id, quote_id, cost_type, cost_small_type, - purpose, amounts, expense_time, evection_code, purcahse_code, + select expense_child_id, expense_code, cost_type, cost_small_type, + purpose, amounts, expense_time, evection_code, purchase_code, outsource_code, create_time, create_by, update_by, update_time, del_flag, remark from base_expense_account_child @@ -34,14 +34,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -54,14 +54,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into base_expense_account_child - quote_id, + expense_code, cost_type, cost_small_type, purpose, amounts, expense_time, evection_code, - purcahse_code, + purchase_code, outsource_code, create_time, create_by, @@ -71,14 +71,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, - #{quoteId}, + #{expenseCode}, #{costType}, #{costSmallType}, #{purpose}, #{amounts}, #{expenseTime}, #{evectionCode}, - #{purcahseCode}, + #{purchaseCode}, #{outsourceCode}, #{createTime}, #{createBy}, @@ -92,14 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update base_expense_account_child - quote_id = #{quoteId}, + expense_code = #{expenseCode}, cost_type = #{costType}, cost_small_type = #{costSmallType}, purpose = #{purpose}, amounts = #{amounts}, expense_time = #{expenseTime}, evection_code = #{evectionCode}, - purcahse_code = #{purcahseCode}, + purchase_code = #{purchaseCode}, outsource_code = #{outsourceCode}, create_time = #{createTime}, create_by = #{createBy}, @@ -121,7 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{expenseChildId} - update base_expense_account_child set del_flag = '1' where expense_child_id = #{expenseChildId} @@ -130,4 +129,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update base_expense_account_child set del_flag = '0' where expense_child_id = #{expenseChildId} + + delete from base_expense_account_child where expense_code = #{expenseCode} + + + delete from base_expense_account_child where expense_code in + + #{expenseCode} + + + + update base_expense_account_child set del_flag = '1' where expense_code in + + #{expenseCode} + + + + update base_expense_account_child set del_flag = '1' where expense_code = #{expenseCode} + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml index 13b44b1e..151f3427 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,26 +26,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + select expense_id, audit_status, manager_audit_status, finance_audit_status, expense_code, deptName, postName, fullName, expense_method, is_purchase_outsource, supplier_code, corporate_payee, corporate_receiving_account, public_account_banks, - apply_user, create_by, create_time, update_by, update_time, remark, use_status,del_flag + apply_user, create_by, create_time, update_by, update_time, remark, use_status,del_flag, + instance_id, instance_type, instance_type_name, submit_instance_id, cancel_instance_id, restore_instance_id, + apply_title, apply_user, apply_time from base_expense_account @@ -70,13 +101,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" corporate_payee, corporate_receiving_account, public_account_banks, - apply_user, create_by, create_time, - update_by, - update_time, remark, + audit_status, use_status, + instance_id, + instance_type, + submit_instance_id, + cancel_instance_id, + restore_instance_id, + apply_title, + apply_user, + apply_time, + del_flag, #{auditStatus}, @@ -92,13 +130,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{corporatePayee}, #{corporateReceivingAccount}, #{publicAccountBanks}, - #{applyUser}, #{createBy}, #{createTime}, - #{updateBy}, - #{updateTime}, #{remark}, + #{auditStatus}, #{useStatus}, + #{instanceId}, + #{instanceType}, + #{submitInstanceId}, + #{cancelInstanceId}, + #{restoreInstanceId}, + #{applyTitle}, + #{applyUser}, + #{applyTime}, + #{del_flag}, @@ -118,13 +163,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" corporate_payee = #{corporatePayee}, corporate_receiving_account = #{corporateReceivingAccount}, public_account_banks = #{publicAccountBanks}, - apply_user = #{applyUser}, - create_by = #{createBy}, - create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, + audit_status = #{auditStatus}, use_status = #{useStatus}, + instance_id = #{instanceId}, + instance_type = #{instanceType}, + submit_instance_id = #{submitInstanceId}, + cancel_instance_id = #{cancelInstanceId}, + restore_instance_id = #{restoreInstanceId}, + apply_title = #{applyTitle}, + apply_user = #{applyUser}, + apply_time = #{applyTime}, + del_flag = #{delFlag}, where expense_id = #{expenseId} @@ -148,4 +200,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update base_expense_account set del_flag = '0' where expense_id = #{expenseId} + + update base_expense_account set del_flag = '1' where expense_code in + + #{expenseCode} + + + + + update base_expense_account set del_flag = '1' where expense_code = #{expenseCode} + + + + + delete from base_expense_account where expense_code = #{expenseCode} + + + + delete from base_expense_account where expense_code in + + #{expenseCode} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html index b6149680..ece68343 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html @@ -35,47 +35,47 @@ - -
+
- +
-
- -
- + -
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
@@ -86,6 +86,9 @@ 添加报销 + + 删除报销 +
@@ -93,6 +96,7 @@
+
@@ -103,7 +107,6 @@ var costTypeDatas = [[${@category.getChildByCode('costType')}]]; var $table = $("#bootstrap-sub-table-expense"); var costType; - //获取子表信息 $(function() { getSelections(); @@ -119,7 +122,7 @@ } }, {title: '报销单分项子表',field: 'expenseChildId',visible: false}, - {title: '关联报销单号',field: 'quoteId',visible: false}, + {title: '关联报销单号',field: 'expenseCode',visible: false}, {title: '成本类型',field: 'costType', formatter:function (value, row, index) { return costTypeFormatter(value,row,index); @@ -143,8 +146,8 @@ } }, {title: '报销时间',field: 'expenseTime',editable:{ - type:'text', - mode:'inline', + type:'date', + mode:'inline' } }, {title: '出差单号',field: 'evectionCode',editable:{ @@ -161,13 +164,6 @@ type:'text', mode:'inline', } - }, - {title: '操作', align: 'center', - formatter: function (value, row, index) { - var actions = []; - actions.push('删除 '); - return actions.join(''); - } } ], }; @@ -192,6 +188,7 @@ ajax: { url: '/system/supplier/getSupplier', dataType: 'json', + method: "post", delay: 250, processResults: function (res, params) { var options = []; @@ -210,8 +207,16 @@ } } }); - }); + function handleExpenseMethod(expenseMethodSelect) { + //获取页面元素中的下拉框选中的值 + var expenseMethod = $("#add_expenseMethod option:selected").val(); + if (expenseMethod === '1') { + $("#add_expenseMethodModal").show(); + } else { + $("#add_expenseMethodModal").hide(); + } + } $('#supplierCode').on('select2:select', function (e) { var data = e.params.data; $("input[name='corporatePayee']").val(data.supplierName); @@ -240,7 +245,6 @@ }) } /* 删除指定表格行 */ - function removeRow(index){$table.bootstrapTable('remove', {field: 'index',values: index})}; function submitHandler() { if ($.validate.form()) { var formData = $('#form-baseExpense-add').serializeArray(); @@ -299,7 +303,17 @@ return selectHtml; } } - + function removeRow(){ + var ids = $.table.selectColumns("id"); + if (ids.length == 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + $("#bootstrap-sub-table-1").bootstrapTable('remove', { + field: 'id', + values: ids + }) + } function onCostSmallTypeChange(selectElement, rowIndex) { var newCostSmallType = $(selectElement).val(); var tableData = $table.bootstrapTable('getData'); diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html index c543f1f3..9548dce9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html @@ -123,7 +123,6 @@ pageSize: 10, sortable: true, // 是否启用排序 sortStable: true, // 设置为 true 将获得稳定的排序 - detailView: true, fixedColumns: true, // 启用冻结列 rightFixedColumns:1, fixedRightNumber: 1, // 冻结右列个数 diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/detail.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/detail.html index f504ad79..d503e886 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/detail.html @@ -108,7 +108,7 @@ url: ctx + "system/expenseChild/list", queryParams: function(params) { return { - quoteId: $("#expenseCode").val() + expenseCode: $("#expenseCode").val() }; }, pagination: false, @@ -123,7 +123,7 @@ } }, {title: '报销单分项子表',field: 'expenseChildId',visible: false}, - {title: '关联报销单号',field: 'quoteId',visible: false}, + {title: '关联报销单号',field: 'expenseCode',visible: false}, {title: '成本类型',field: 'costType', formatter:function (value, row, index) { return costTypeFormatter(value,row,index); diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html index eae4f71f..f5a1acf7 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html @@ -31,41 +31,47 @@
-
- -
- -
-
- -
- + +
+
-
- -
- + - -
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
+
+
+ +
+ +
@@ -88,6 +94,7 @@ + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskModifyApply.html new file mode 100644 index 00000000..6d2c95d5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskModifyApply.html @@ -0,0 +1,40 @@ + + + + + + + +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html new file mode 100644 index 00000000..4d7c83ca --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html @@ -0,0 +1,40 @@ + + + + + + + +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html new file mode 100644 index 00000000..b495d3d5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html @@ -0,0 +1,198 @@ + + + + + + + +
+
+ + + + + + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ 选择报销分类信息 + + 添加报销 + +
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html new file mode 100644 index 00000000..b0069de7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html @@ -0,0 +1,160 @@ + + + + + + + +
+
+ + + + + + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 选择报价信息 + + 添加物料 + +
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file