Browse Source

[fix]

基础资料 报销单
修改报销单列表页面表格,去除申请人显示样式;
修改报销管理列表页面,新增当前状态字段;
修改报销管理、报销单列表查询controller接口;
修改报销单分页查询、获取用户名下可见用户列表、根据角色设置节点变量service方法;
修改列表查询mapper方法,截取日期查询;
新增研发总监审批页面;
dev
王晓迪 1 month ago
parent
commit
f147ab6d44
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java
  2. 49
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java
  3. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java
  4. 202
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java
  5. 2
      ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml
  6. 13
      ruoyi-admin/src/main/resources/templates/financial/expense/expense.html
  7. 19
      ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html
  8. 268
      ruoyi-admin/src/main/resources/templates/system/baseExpense/taskYfzjVerify.html

6
ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java

@ -8,6 +8,7 @@ import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.remind.service.RemindService; import com.ruoyi.remind.service.RemindService;
import com.ruoyi.financial.domain.VO.FinacialExpenseVo; import com.ruoyi.financial.domain.VO.FinacialExpenseVo;
import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo;
import com.ruoyi.system.mapper.BaseExpenseAccountMapper;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.*;
import org.activiti.engine.RuntimeService; import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
@ -84,12 +85,11 @@ public class FinacialExpenseController extends BaseController
@RequiresPermissions("financial:expense:list") @RequiresPermissions("financial:expense:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(FinacialExpense finacialExpense) public TableDataInfo list(FinacialExpense finacialExpense) throws Exception {
{
startPage(); startPage();
BaseExpenseAccountVo baseExpenseAccount = new BaseExpenseAccountVo(); BaseExpenseAccountVo baseExpenseAccount = new BaseExpenseAccountVo();
baseExpenseAccount.setAuditStatus("1"); baseExpenseAccount.setAuditStatus("1");
baseExpenseAccount.setManagerAuditStatus("1"); // baseExpenseAccount.setManagerAuditStatus("1");
List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
return getDataTable(list); return getDataTable(list);
} }

49
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java

@ -115,18 +115,8 @@ public class BaseExpenseAccountController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(BaseExpenseAccountVo baseExpenseAccount) throws Exception { public TableDataInfo list(BaseExpenseAccountVo baseExpenseAccount) throws Exception {
startPage(); startPage();
SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
// 获取当前登录名下可看用户列表 return getDataTable(list);
Set<String> users = baseExpenseAccountService.userLimitedList(roleKeys,curUser);
List<BaseExpenseAccountVo> matchedList = list.stream()
.filter(expenseAccount -> users.contains(expenseAccount.getApplyUser()))
.collect(Collectors.toList());
return getDataTable(matchedList);
} }
/** /**
@ -136,8 +126,7 @@ public class BaseExpenseAccountController extends BaseController
@Log(title = "报销单", businessType = BusinessType.EXPORT) @Log(title = "报销单", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(BaseExpenseAccountVo baseExpenseAccount) public AjaxResult export(BaseExpenseAccountVo baseExpenseAccount) throws Exception {
{
List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
ExcelUtil<BaseExpenseAccountVo> util = new ExcelUtil<BaseExpenseAccountVo>(BaseExpenseAccountVo.class); ExcelUtil<BaseExpenseAccountVo> util = new ExcelUtil<BaseExpenseAccountVo>(BaseExpenseAccountVo.class);
return util.exportExcel(list, "报销单数据"); return util.exportExcel(list, "报销单数据");
@ -208,7 +197,8 @@ public class BaseExpenseAccountController extends BaseController
map1.put("year", dateArray[0]); map1.put("year", dateArray[0]);
map1.put("month", dateArray[1]); map1.put("month", dateArray[1]);
map1.put("day", dateArray[2]); map1.put("day", dateArray[2]);
map1.put("fullName", baseExpenseAccount.getFullName()); SysUser printUser = sysUserService.selectUserByLoginName(baseExpenseAccount.getFullName());
map1.put("fullName", printUser.getUserName());
BigDecimal sum = BigDecimal.ZERO; BigDecimal sum = BigDecimal.ZERO;
for (BaseExpenseAccountChild baseExpenseAccountChild : list) { for (BaseExpenseAccountChild baseExpenseAccountChild : list) {
BigDecimal baseExpenseAccountChildAmounts = baseExpenseAccountChild.getAmounts(); BigDecimal baseExpenseAccountChildAmounts = baseExpenseAccountChild.getAmounts();
@ -339,12 +329,19 @@ public class BaseExpenseAccountController extends BaseController
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
boolean approvedFlag = processService.complete(taskId, instanceId, baseExpenseAccountVo.getApplyTitle(), boolean approvedFlag = processService.complete(taskId, instanceId, baseExpenseAccountVo.getApplyTitle(),
baseExpenseAccountVo.getExpenseCode(), baseExpenseAccountVo.getExpenseCode(),
"expense", new HashMap<String, Object>(), request); "finacialExpense", new HashMap<String, Object>(), request);
Task nextTask = taskService.createTaskQuery()
.processInstanceId(instanceId)
.singleResult();
String nextVerifyName = "";
if(nextTask != null){
nextVerifyName = nextTask.getTaskDefinitionKey().substring(0, 1).toUpperCase() + nextTask.getTaskDefinitionKey().substring(1);
}
if(!approvedFlag){ if(!approvedFlag){
// 审核状态-审核拒绝 // 审核状态-审核拒绝
if(verifyName.contains("Bxjl")||verifyName.contains("Bxzg")){ if(verifyName.contains("Bxjl")||verifyName.contains("Bxzg")||verifyName.contains("Yfzj")||verifyName.contains("Fzjl")){
baseExpenseAccountVo.setAuditStatus("2"); baseExpenseAccountVo.setAuditStatus("2");
}else if(verifyName.contains("Fzjl")||verifyName.contains("Zozj")){ }else if(verifyName.contains("Zozj")){
baseExpenseAccountVo.setManagerAuditStatus("2"); baseExpenseAccountVo.setManagerAuditStatus("2");
baseExpenseAccountVo.setAuditStatus("2"); baseExpenseAccountVo.setAuditStatus("2");
}else if(verifyName.contains("Cw")){ }else if(verifyName.contains("Cw")){
@ -352,29 +349,25 @@ public class BaseExpenseAccountController extends BaseController
baseExpenseAccountVo.setAuditStatus("2"); baseExpenseAccountVo.setAuditStatus("2");
} }
}else{ }else{
if(verifyName.contains("Bxzg")){ // 审核通过
baseExpenseAccountVo.setAuditStatus("1"); if(nextVerifyName!=null){
}else if(verifyName.contains("Zozj")){ if(nextVerifyName.contains("Cw")){
baseExpenseAccountVo.setManagerAuditStatus("1"); // 进行到财务审核,上级审核通过
baseExpenseAccountVo.setAuditStatus("1"); baseExpenseAccountVo.setAuditStatus("1");
}else if(verifyName.contains("Cw")){ }else if(nextVerifyName.contains("Zozj")){
// 进行到总经理审核,上级审核及财务审核通过
baseExpenseAccountVo.setFinanceAuditStatus("1"); baseExpenseAccountVo.setFinanceAuditStatus("1");
baseExpenseAccountVo.setAuditStatus("1"); baseExpenseAccountVo.setAuditStatus("1");
} }
} }
}
// 如果任务已结束更新业务表状态 方法中传入的值为原来的instanceId,只是做了调整 // 如果任务已结束更新业务表状态 方法中传入的值为原来的instanceId,只是做了调整
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
if (processIsFinish) { if (processIsFinish) {
// 审核通过 // 审核通过
if(verifyName.contains("Bxzg")){
baseExpenseAccountVo.setAuditStatus("1");
}else if(verifyName.contains("Zozj")){
baseExpenseAccountVo.setManagerAuditStatus("1"); baseExpenseAccountVo.setManagerAuditStatus("1");
baseExpenseAccountVo.setAuditStatus("1");
}else if(verifyName.contains("Cw")){
baseExpenseAccountVo.setFinanceAuditStatus("1"); baseExpenseAccountVo.setFinanceAuditStatus("1");
baseExpenseAccountVo.setAuditStatus("1"); baseExpenseAccountVo.setAuditStatus("1");
}
// 提交 // 提交
if("submit".equals(instanceType)){ if("submit".equals(instanceType)){
// 使用状态-是 // 使用状态-是

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java

@ -33,7 +33,7 @@ public interface IBaseExpenseAccountService
*/ */
// public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); // public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount);
public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount); public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) throws Exception;
/** /**
* 新增报销单 * 新增报销单

202
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java

@ -5,6 +5,8 @@ import java.util.stream.Collectors;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.PageDomain;
@ -17,6 +19,8 @@ import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.BaseExpenseAccountChild; import com.ruoyi.system.domain.BaseExpenseAccountChild;
import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo;
import com.ruoyi.system.domain.Vo.BaseRequisitioningOrderVo;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.IBaseExpenseAccountChildService; import com.ruoyi.system.service.IBaseExpenseAccountChildService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
@ -71,6 +75,9 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired
private SysDeptMapper deptMapper;
/** /**
* 查询报销单 * 查询报销单
* *
@ -95,14 +102,26 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
* @return 报销单 * @return 报销单
*/ */
@Override @Override
public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) throws Exception {
{ SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<BaseExpenseAccountVo> Volist = baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount);
// 获取当前登录名下可看用户列表
Set<String> users = userLimitedList(roleKeys,curUser);
List<BaseExpenseAccountVo> matchedList = Volist.stream()
.filter(expenseAccount -> users.contains(expenseAccount.getApplyUser()))
.collect(Collectors.toList());
PageDomain pageDomain = TableSupport.buildPageRequest(); PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum(); Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize(); Integer pageSize = pageDomain.getPageSize();
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
//PageHelper 仅对第一List分页有效 //PageHelper 仅对第一List分页有效
Page<BaseExpenseAccountVo> list = (Page<BaseExpenseAccountVo>) baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount); PageInfo<BaseExpenseAccountVo> pageInfo = new PageInfo<>(matchedList);
List<BaseExpenseAccountVo> list = pageInfo.getList();
Page<BaseExpenseAccountVo> returnList = new Page<>(); Page<BaseExpenseAccountVo> returnList = new Page<>();
for(BaseExpenseAccountVo baseExpenseAccountVo : list){ for(BaseExpenseAccountVo baseExpenseAccountVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(baseExpenseAccountVo.getCreateBy()); SysUser sysUser = userMapper.selectUserByLoginName(baseExpenseAccountVo.getCreateBy());
@ -144,16 +163,18 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
baseExpenseAccountVo.setTaskName("未启动"); baseExpenseAccountVo.setTaskName("未启动");
} }
baseExpenseAccountVo.setTaskStatus(baseExpenseAccountVo.getTaskName()); baseExpenseAccountVo.setTaskStatus(baseExpenseAccountVo.getTaskName());
if(baseExpenseAccountVo.getAuditStatus()!=null){ if(baseExpenseAccountVo.getManagerAuditStatus()!=null){
if(baseExpenseAccountVo.getAuditStatus().equals("1")){ if(baseExpenseAccountVo.getManagerAuditStatus().equals("1")){
baseExpenseAccountVo.setTaskStatus("审核通过"); baseExpenseAccountVo.setTaskStatus("审核通过");
}else if(baseExpenseAccountVo.getAuditStatus().equals("2")){ }else if(baseExpenseAccountVo.getAuditStatus().equals("2")
||baseExpenseAccountVo.getFinanceAuditStatus().equals("2")
||baseExpenseAccountVo.getManagerAuditStatus().equals("2")){
baseExpenseAccountVo.setTaskStatus("审核拒绝"); baseExpenseAccountVo.setTaskStatus("审核拒绝");
} }
} }
returnList.add(baseExpenseAccountVo); returnList.add(baseExpenseAccountVo);
} }
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.size());
returnList.setPageNum(pageNum); returnList.setPageNum(pageNum);
returnList.setPageSize(pageSize); returnList.setPageSize(pageSize);
return returnList; return returnList;
@ -338,6 +359,23 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
SysUser user = ShiroUtils.getSysUser(); SysUser user = ShiroUtils.getSysUser();
baseExpenseAccount.setApplyUser(user.getLoginName()); baseExpenseAccount.setApplyUser(user.getLoginName());
baseExpenseAccount.setApplyTime(DateUtils.getNowDate()); baseExpenseAccount.setApplyTime(DateUtils.getNowDate());
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
if(roleKeys.contains("admin")||roleKeys.contains("ywjlRole")||roleKeys.contains("yfzjRole")
||roleKeys.contains("fzjlRole")||roleKeys.contains("pzjlRole")
||roleKeys.contains("shjlRole") ||roleKeys.contains("cwzgRole")
||roleKeys.contains("zozjRole")){
// 角色包含业务经理、研发总监、副总经理、品质经理、售后经理、财务主管、总经总助、admin 直接到财务审核
// 上级审核设置为通过
baseExpenseAccount.setAuditStatus("1");
}
if(roleKeys.contains("cwshRole")){
//财务审核转到总经理
// 上级审核、财务审核设置为通过
baseExpenseAccount.setAuditStatus("1");
baseExpenseAccount.setFinanceAuditStatus("1");
}
String applyTitle = ""; String applyTitle = "";
if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){ if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){
insertBaseExpenseAccount(baseExpenseAccount); insertBaseExpenseAccount(baseExpenseAccount);
@ -374,7 +412,7 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseExpenseAccount baseExpenseAccount, SysUser user) { private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseExpenseAccount baseExpenseAccount, SysUser user) {
Long expenseId = baseExpenseAccount.getExpenseId(); Long expenseId = baseExpenseAccount.getExpenseId();
String businessKey = expenseId.toString(); // 实体类 ID,作为流程的业务 key String businessKey = expenseId.toString(); // 实体类 ID,作为流程的业务 key
String key = "expense"; String key = "finacialExpense";
Map<String,Object> variables = new HashMap<>(); Map<String,Object> variables = new HashMap<>();
// 构造authority传参 // 构造authority传参
buildAuthority(user, variables); buildAuthority(user, variables);
@ -392,51 +430,83 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("authority",1); variables.put("authority",1);
variables.put("zgExist",false);
variables.put("jlExist",true);
variables.put("yfzjExist",false);
variables.put("fzjlExist",false);
//判断请购人的角色,进入相应的逻辑,设置节点审批人变量 //判断请购人的角色,进入相应的逻辑,设置节点审批人变量
if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")){ if(roleKeys.contains("ywyRole")){
// 业务经理 // 业务员/业务助理--->业务部经理
variables.put("bxjlRole","ywjlRole"); variables.put("bxjlRole","ywjlRole");
// 业务主管 }else if(roleKeys.contains("jggcsRole")){
variables.put("bxzgRole","ywzgRole"); //结构工程师--->工程经理--->研发总监
}else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){
// 采购经理
variables.put("bxjlRole","cgjlRole");
// 采购主管
variables.put("bxzgRole","cgzgRole");
}else if(roleKeys.contains("wwyRole") || roleKeys.contains("wwjlRole") || roleKeys.contains("wwzgRole")){
// 委外经理
variables.put("bxjlRole","wwjlRole");
// 委外主管
variables.put("bxzgRole","wwzgRole");
}else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){
// 工程经理
variables.put("bxjlRole","gcjlRole"); variables.put("bxjlRole","gcjlRole");
// 工程主管 variables.put("yfzjExist",true);
variables.put("bxzgRole","gczgRole"); }else if(roleKeys.contains("dqgcsRole")){
} else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){ //电气工程师--->电气主管--->研发总监
// 生产经理 variables.put("bxzgRole","dqzgRole");
variables.put("jlExist",false);
variables.put("yfzjExist",true);
}else if(roleKeys.contains("rjgcsRole")||roleKeys.contains("csgcsRole")||roleKeys.contains("gcwyRole")
||roleKeys.contains("dqzgRole")||roleKeys.contains("gcjlRole")){
//软件工程师/测试工程师/工程文员--->研发总监
//电气主管 ---> 研发总监
//工程经理 ---> 研发总监
variables.put("jlExist",false);
variables.put("yfzjExist",true);
} else if(roleKeys.contains("cgyRole")||roleKeys.contains("ckzgRole")
||roleKeys.contains("hrjlRole")||roleKeys.contains("scjlRole")){
// 采购员--->副总经理
// 仓库主管 ---> 副总经理
// 人事经理 ---> 副总经理
// 生产经理 ---> 副总经理
variables.put("jlExist",false);
variables.put("fzjlExist",true);
}else if (roleKeys.contains("scyRole")){
// 生产员--->生产经理--->副总经理
variables.put("bxjlRole","scjlRole"); variables.put("bxjlRole","scjlRole");
// 生产主管 variables.put("fzjlExist",true);
variables.put("bxzgRole","sczgRole"); }else if(roleKeys.contains("pzwyRole")||roleKeys.contains("iqczyRole")||roleKeys.contains("ipqczyRole")||roleKeys.contains("fqczyRole")){
}else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){ // IQC/IPQC/FQC/品质文员--->品质经理
// 售后经理 variables.put("bxjlRole","pzjlRole");
variables.put("bmjlRole","shjlRole"); }else if (roleKeys.contains("shgcsRole")){
// 售后主管 // 售后工程师--->售后主管--->售后经理
variables.put("bmzgRole","shzgRole"); variables.put("bxjlRole","shjlRole");
}else if(roleKeys.contains("cgyyRole") || roleKeys.contains("ckjlRole") || roleKeys.contains("ckzgRole")){ variables.put("bxzgRole","shzgRole");
variables.put("bmjlRole","ckjlRole"); variables.put("zgExist",true);
// 仓库主管 }else if (roleKeys.contains("shzgRole")){
variables.put("bmzgRole","ckzgRole"); // 售后主管--->售后经理
}else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")|| roleKeys.contains("cwzgRole")){ variables.put("bxjlRole","shjlRole");
variables.put("bmjlRole","cwjlRole"); } else if(roleKeys.contains("cgyyRole")){
// 财务主管 // 仓库文员--->仓库主管--->副总经理
variables.put("bmzgRole","cwzgRole"); variables.put("bxzgRole","ckzgRole");
}else{ variables.put("zgExist",true);
variables.put("fzjlExist",true);
variables.put("jlExist",false);
}else if(roleKeys.contains("hrzyRole")){
// 人事助理/专员--->人事经理--->副总经理
variables.put("fzjlExist",true);
variables.put("bxjlRole","hrjlRole");
}else if (roleKeys.contains("cwzyRole")){
// 会计--->财务主管
variables.put("bxzgRole","cwzgRole");
variables.put("zgExist",true);
variables.put("jlExist",false);
}
if(roleKeys.contains("admin")||roleKeys.contains("ywjlRole")||roleKeys.contains("yfzjRole")
||roleKeys.contains("fzjlRole")||roleKeys.contains("pzjlRole")
||roleKeys.contains("shjlRole") ||roleKeys.contains("cwzgRole")
||roleKeys.contains("zozjRole")){
// 角色包含业务经理、研发总监、副总经理、品质经理、售后经理、财务主管、总经总助、admin 直接到财务审核
variables.put("jlExist",true);
}
if(roleKeys.contains("cwshRole")){
//财务审核转到总经理
variables.put("authority",2); variables.put("authority",2);
} }
if(roleKeys.contains("admin")){ if(roleKeys.contains("zjlRole")){
// 角色包含业务经理、采购经理、工程经理、生产经理 //总经理直接通过
variables.put("authority",2); variables.put("authority",3);
} }
} }
@Override @Override
@ -458,33 +528,47 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
Set<String> curUserName = new HashSet<>(); Set<String> curUserName = new HashSet<>();
curUserName.add(curUser.getLoginName()); curUserName.add(curUser.getLoginName());
if(roleKeys.contains("zjlRole") || roleKeys.contains("zozjRole") || roleKeys.contains("fzjlRole") || roleKeys.contains("admin")){ if(roleKeys.contains("zjlRole") || roleKeys.contains("zozjRole")
|| roleKeys.contains("fzjlRole") || roleKeys.contains("admin")
|| roleKeys.contains("cwshRole")){
Set<String> users = sysUserlist.stream() Set<String> users = sysUserlist.stream()
.map(SysUser::getLoginName) // 提取每个 SysUser 对象的 name 属性 .map(SysUser::getLoginName) // 提取每个 SysUser 对象的 name 属性
.collect(Collectors.toSet()); .collect(Collectors.toSet());
return users; return users;
}else if(roleKeys.contains("gczgRole") || roleKeys.contains("sczgRole") || roleKeys.contains("cgzgRole") }else if(roleKeys.contains("gcjlRole") || roleKeys.contains("scjlRole") || roleKeys.contains("cgjlRole")
|| roleKeys.contains("ywzgRole")|| roleKeys.contains("wwzgRole")|| roleKeys.contains("shzgRole") || roleKeys.contains("ywjlRole")|| roleKeys.contains("wwjlRole")|| roleKeys.contains("shjlRole")
|| roleKeys.contains("ckzgRole")|| roleKeys.contains("cwzgRole")) { || roleKeys.contains("ckjlRole")|| roleKeys.contains("yfzjRole")|| roleKeys.contains("cwjlRole")) {
// 部门主管查询部门的所有,查看对应部门下的所有 // 部门经理查询部门所属下的所有
// 去除列表中部门id为空的数据
sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList()); sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList());
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); List<SysDept> eyeDepts = deptMapper.selectChildrenDeptById(curUser.getDeptId());
// 提取部门id
Set<Long> deptIds = eyeDepts.stream()
.map(SysDept::getDeptId) // 假设 SysDept 有一个 getDeptId 方法
.collect(Collectors.toSet());
// 添加当前经理部门id
deptIds.add(curUser.getDeptId());
// 过滤 sysUserlist,只保留那些 deptId 存在于 deptIds 集合中的用户
List<SysUser> findUser = sysUserlist.stream()
.filter(item -> deptIds.contains(item.getDeptId()))
.collect(Collectors.toList());
findUser.add(curUser);
Set<String> users = findUser.stream() Set<String> users = findUser.stream()
.map(SysUser::getLoginName) .map(SysUser::getLoginName)
.collect(Collectors.toSet()); // 使用 Set 可以提高查找效率 .collect(Collectors.toSet()); // 使用 Set 可以提高查找效率
return users; return users;
}else if(roleKeys.contains("gcjlRole") || roleKeys.contains("scjlRole") || roleKeys.contains("cgjlRole") }else if(roleKeys.contains("gczgRole") || roleKeys.contains("sczgRole") || roleKeys.contains("cgzgRole")
|| roleKeys.contains("ywjlRole")|| roleKeys.contains("wwjlRole")|| roleKeys.contains("shjlRole") || roleKeys.contains("ywzgRole")|| roleKeys.contains("wwzgRole")|| roleKeys.contains("shzgRole")
|| roleKeys.contains("ckjlRole")|| roleKeys.contains("cwjlRole")) { || roleKeys.contains("ckzgRole")|| roleKeys.contains("cwzgRole")) {
// 部门经理查询部门的所有,查看对应部门下的所有 // 部门主管查看部门的所有,查看自己所属的所有
sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList()); sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList());
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
// 过滤出与 curUser 不同且 roles 包含curUser相同roleKey的用户 // 过滤出与 curUser 不同且 roles 包含curUser相同roleKey的用户
findUser = findUser.stream() findUser = findUser.stream()
.filter(user -> !user.getRoles().stream()//去除部门下主管角色 .filter(user -> !user.getRoles().stream()//去除部门下主管角色
.anyMatch(role -> role.getRoleKey().endsWith("zgRole"))) .anyMatch(role -> role.getRoleKey().endsWith("zgRole")))
.filter(user -> !user.getRoles().stream() .filter(user -> !user.getRoles().stream()//去除同部门下经理角色
.anyMatch(role -> role.getRoleKey().endsWith("jlRole"))) .anyMatch(role -> role.getRoleKey().endsWith("jlRole")))
.collect(Collectors.toList()); .collect(Collectors.toList());

2
ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml

@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null "> and b.apply_time = #{applyTime}</if> <if test="applyTime != null "> and b.apply_time = #{applyTime}</if>
<if test="keyword != null and keyword != ''"> and b.expense_code like concat('%',#{keyword},'%')</if> <if test="keyword != null and keyword != ''"> and b.expense_code like concat('%',#{keyword},'%')</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> <if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
and b.create_time between #{params.beginTime} and #{params.endTime} and Date(b.create_time) between #{params.beginTime} and #{params.endTime}
</if> </if>
<if test="(params.costType != null and params.costType != '') <if test="(params.costType != null and params.costType != '')
or (params.costSmallType != null and params.costSmallType != '') or (params.costSmallType != null and params.costSmallType != '')

13
ruoyi-admin/src/main/resources/templates/financial/expense/expense.html

@ -142,16 +142,18 @@
{title: '待办用户ID',field: 'todoUserId', visible: false,align: 'center',}, {title: '待办用户ID',field: 'todoUserId', visible: false,align: 'center',},
{title: '当前任务名称',field: 'taskName', {title: '当前任务名称',field: 'taskName',
align: 'center', align: 'center',
visible: false,
formatter: function(value, row, index) { formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>'; return '<span class="badge badge-primary">' + value + '</span>';
} }
}, },
{title: '上级审核状态',field: 'auditStatus',align: 'center', {title: '当前状态',field: 'taskStatus',
align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusData, value); return '<span class="badge badge-primary">' + value + '</span>';
} }
}, },
{title: '总经理审核状态',field: 'managerAuditStatus',align: 'center', {title: '上级审核状态',field: 'auditStatus',align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusData, value); return $.table.selectDictLabel(auditStatusData, value);
} }
@ -161,6 +163,11 @@
return $.table.selectDictLabel(finacialExpenseStatusDatas, value); return $.table.selectDictLabel(finacialExpenseStatusDatas, value);
} }
}, },
{title: '总经理审核状态',field: 'managerAuditStatus',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusData, value);
}
},
{title: '报销单编号',field: 'expenseCode',align: 'center',}, {title: '报销单编号',field: 'expenseCode',align: 'center',},
{title: '报销人',field: 'applyUser',align: 'center',}, {title: '报销人',field: 'applyUser',align: 'center',},
{title: '报销方式',field: 'expenseMethod', align: 'center', {title: '报销方式',field: 'expenseMethod', align: 'center',

19
ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html

@ -144,8 +144,8 @@
{title:'流程作废实例ID',field: 'cancelInstanceId',visible: false,align: 'center',}, {title:'流程作废实例ID',field: 'cancelInstanceId',visible: false,align: 'center',},
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false,align: 'center',}, {title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false,align: 'center',},
{title: '流程实例类型', field: 'instanceTypeName',visible: false,align: 'center',}, {title: '流程实例类型', field: 'instanceTypeName',visible: false,align: 'center',},
{title: '<span style="color: red;">申请人</span>',field: 'applyUserName', align: 'center', {title: '申请人',field: 'applyUserName', align: 'center',
formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';} // formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';}
}, },
{title: '申请时间',field: 'applyTime',width: 150,align: 'center',}, {title: '申请时间',field: 'applyTime',width: 150,align: 'center',},
{title: '当前任务ID',field: 'taskId',visible: false,align: 'center',}, {title: '当前任务ID',field: 'taskId',visible: false,align: 'center',},
@ -167,14 +167,14 @@
return $.table.selectDictLabel(auditStatusData, value); return $.table.selectDictLabel(auditStatusData, value);
} }
}, },
{title: '总经理状态',field: 'managerAuditStatus',align: 'center', {title: '财务状态',field: 'financeAuditStatus',align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusData, value); return $.table.selectDictLabel(finacialExpenseStatusDatas, value);
} }
}, },
{title: '财务状态',field: 'financeAuditStatus',align: 'center', {title: '总经理状态',field: 'managerAuditStatus',align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(finacialExpenseStatusDatas, value); return $.table.selectDictLabel(auditStatusData, value);
} }
}, },
{title: '报销单编号',field: 'expenseCode',align: 'center',}, {title: '报销单编号',field: 'expenseCode',align: 'center',},
@ -220,7 +220,7 @@
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
} }
if(row.auditStatus=="1" && row.managerAuditStatus=="1") { if(row.auditStatus=="1" && row.managerAuditStatus=="1") {
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="exportExpense(\'' + row.expenseId + '\')"><i class="fa fa-print"></i> 导出</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="exportExpense(\'' + row.expenseId + '\', \'' + row.expenseCode + '\')"><i class="fa fa-print"></i> 导出</a> ');
} }
if(row.auditStatus=="1" && row.financeAuditStatus=="3" && row.managerAuditStatus=="1") { if(row.auditStatus=="1" && row.financeAuditStatus=="3" && row.managerAuditStatus=="1") {
actions.push('<a class="btn btn-success btn-xs ' + comfrimExpenseFlag + '" href="javascript:void(0)" onclick="financialExpenseAmount(\'' + row.expenseId + '\')"><i class="fa fa-print"></i> 确认打款</a>'); actions.push('<a class="btn btn-success btn-xs ' + comfrimExpenseFlag + '" href="javascript:void(0)" onclick="financialExpenseAmount(\'' + row.expenseId + '\')"><i class="fa fa-print"></i> 确认打款</a>');
@ -297,8 +297,11 @@
$.modal.open("确认打款",prefix + "/confirmExpense/" + expenseId); $.modal.open("确认打款",prefix + "/confirmExpense/" + expenseId);
} }
/*导出报销单*/ /*导出报销单*/
function exportExpense(expenseId){ function exportExpense(expenseId,expenseCode){
var tipMsg = `确定导出 ${expenseCode} 单据吗?`;
$.modal.confirm(tipMsg,function(){
window.location.href = prefix + "/excelExpenseVoucher/" + expenseId; window.location.href = prefix + "/excelExpenseVoucher/" + expenseId;
})
} }
</script> </script>
</body> </body>

268
ruoyi-admin/src/main/resources/templates/system/baseExpense/taskYfzjVerify.html

@ -0,0 +1,268 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('研发总监审核')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-yfzj" th:object="${formData}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="expenseCode" th:field="*{expenseCode}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<input type="hidden" name="p_COM_comment" />
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input name="deptName" th:field="*{deptName}" class="form-control" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<input name="postName" th:field="*{postName}" class="form-control" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<input name="fullName" th:field="*{fullName}" class="form-control" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报销方式:</label>
<div class="col-sm-8">
<select id="yfzj_expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" onchange="handleExpenseMethod(this)"
class="form-control"
th:with="dictList=${@dict.getType('sys_base_expense_method')}" disabled>
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div id="yfzj_expenseMethodModal" class="container" style="display: none;margin-left: 150px;border: 1px dashed #ddd;padding-top: 10px;padding-bottom: 10px;">
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required" style="text-align: left;padding-left: 0px;padding-right: 0px;">是否是委外/采购采销:</label>
<div class="col-sm-6">
<select name="isPurchaseOutsource" class="form-control" th:with="dictList=${@dict.getType('sys_whether')}" disabled required>
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required">供应商ID:</label>
<div class="col-sm-6">
<input id="supplierCode" name="supplierCode" th:field="*{supplierCode}" class="form-control" disabled required>
</div>
</div>
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required">对公收款方:</label>
<div class="col-sm-6">
<input name="corporatePayee" th:field="*{corporatePayee}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required">对公收款账户:</label>
<div class="col-sm-6">
<input name="corporateReceivingAccount" th:field="*{corporateReceivingAccount}" class="form-control" type="text" disabled required>
</div>
</div>
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required">对公开户行:</label>
<div class="col-sm-6">
<input name="publicAccountBanks" th:field="*{publicAccountBanks}" class="form-control" type="text" disabled required>
</div>
</div>
</div>
<div class="form-group" style="padding-top: 10px;">
<label class="col-sm-3 control-label is-required" for="yfzjVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_yfzjVerifyApproved" id="yfzjVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
<div class="form-group" style="padding-top: 10px;">
<label class="col-sm-3 control-label">批注:</label>
<div class="col-sm-8">
<textarea name="comment" class="form-control" width="30%"></textarea>
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报销分类信息</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense-yfzj"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseExpense";
var costTypeDatas = [[${@category.getChildByCode('costType')}]];
var taskId = [[${taskId}]];
var $table = $("#bootstrap-sub-table-expense-yfzj");
$("#form-baseExpense-yfzj").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-expense-yfzj',
url: ctx + "system/expenseChild/list",
queryParams: function(params) {
return {
expenseCode: $("#expenseCode").val()
};
},
pagination: false,
sidePagination: "client",
showFooter: true,
model: "报销单数据",
editable: true,
columns: [
{checkbox: true},
{title: '主键',field: 'index',visible: false,
formatter: function (value, row, index) {
return index;
}
},
{title: '报销单分项子表',field: 'expenseChildId',visible: false},
{title: '关联报销单号',field: 'expenseCode',visible: false},
{title: '成本类型',field: 'costType',
formatter:function (value, row, index) {
return costTypeFormatter(value,row,index);
}
},
{title: '成本小类',field: 'costSmallType',
formatter:function(value, row, index){
return getCostSmallType(value,row,index)
}
},
{title: '用途',field: 'purpose',},
{title: '金额',field: 'amounts',
footerFormatter: function (value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].amounts)|| 0;
}
return "总金额: " + sum.toFixed(2);
}
},
{title: '报销时间',field: 'expenseTime',visible: false},
{title: '出差单号',field: 'evectionCode',},
{title: '采购单号',field: 'purcahseCode',},
{title: '委外单号',field: 'outsourceCode',},
],
};
$.table.init(options);
handleExpenseMethod(this);
});
// 列中获取成本类型的下拉改变数据
function onCostTypeChange(selectElement, rowIndex) {
var newSupplierId = $(selectElement).val();
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据
newRow.costType = newSupplierId; // 更新供应商ID
// 重新渲染成本小类的设备名称列
// 更新行数据
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
}
// 自定义供应商名称列的格式化函数
function costTypeFormatter(value, row, index) {
var selectHtml = '<select class="form-control" disabled onchange="onCostTypeChange(this, ' + index + ')">';
costTypeDatas.forEach(function (child) {
selectHtml += '<option value="' + child.code + '"' + (value === child.code ? ' selected' : '') + '>' + child.name + '</option>' ;
});
selectHtml += '</select>';
return selectHtml;
}
// 自定义设备名称列的格式化函数,依赖于供应商列的选择
function getCostSmallType(value, row, index) {
var selectHtml = '<select class="form-control" disabled onchange="onCostSmallTypeChange(this, ' + index + ')">';
// 假设此函数根据供应商ID返回设备列表
var costSamllTypes = [];
$.ajax({
url: ctx + 'system/category/getChildCode',
type: 'post',
data: {code: row.costType},
async: false,
success: function (result) {
console.log(result);
costSamllTypes = result;
}
});
if (costSamllTypes) {
costSamllTypes.forEach(function (child) {
selectHtml += '<option value="' + child.code + '"' + (value === child.code ? ' selected' : '') + '>' + child.name + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
}
function onCostSmallTypeChange(selectElement, rowIndex) {
var newCostSmallType = $(selectElement).val();
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据
newRow.costSmallType = newCostSmallType;
// 重新渲染当前行的设备名称列
// 更新行数据
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
}
function handleExpenseMethod(expenseMethodSelect) {
//获取页面元素中的下拉框选中的值
var expenseMethod = $("#yfzj_expenseMethod option:selected").val();
if (expenseMethod === '1') {
$("#yfzj_expenseMethodModal").show();
} else {
$("#yfzj_expenseMethodModal").hide();
}
}
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseExpense-yfzj').serialize());
}
}
</script>
</body>
</html>
Loading…
Cancel
Save