Browse Source

[fix]

财务管理 报销管理
修改报销管理列表页面表格定义;
修改报销管理列表查询controller接口;
dev
王晓迪 2 months ago
parent
commit
86259c727f
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java
  2. 31
      ruoyi-admin/src/main/resources/templates/financial/expense/expense.html

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

@ -7,6 +7,7 @@ import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.remind.service.RemindService;
import com.ruoyi.financial.domain.VO.FinacialExpenseVo;
import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo;
import com.ruoyi.system.service.*;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
@ -67,6 +68,9 @@ public class FinacialExpenseController extends BaseController
@Autowired
private IProcessService processService;
@Autowired
private IBaseExpenseAccountService baseExpenseAccountService;
@RequiresPermissions("financial:expense:view")
@GetMapping()
public String expense()
@ -83,7 +87,10 @@ public class FinacialExpenseController extends BaseController
public TableDataInfo list(FinacialExpense finacialExpense)
{
startPage();
List<FinacialExpense> list = finacialExpenseService.selectFinacialExpenseList(finacialExpense);
BaseExpenseAccountVo baseExpenseAccount = new BaseExpenseAccountVo();
baseExpenseAccount.setAuditStatus("1");
baseExpenseAccount.setManagerAuditStatus("1");
List<BaseExpenseAccountVo> list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount);
return getDataTable(list);
}

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

@ -113,18 +113,13 @@
var auditStatusData = [[${@dict.getType('auditStatus')}]];
var expenseMethodData = [[${@dict.getType('sys_base_expense_method')}]];
var finacialExpenseStatusDatas = [[${@dict.getType('financial_expense_status')}]];
var prefix = ctx + "system/baseExpense";
var prefix = ctx + "financial/expense";
var prefix1 = ctx +"system/baseExpense";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
detailUrl: prefix1 + "/detail/{id}",
modalName: "报销单",
pageSize: 10,
sortable: true, // 是否启用排序
@ -185,14 +180,14 @@
{title: '使用状态',field: 'useStatus',visible: false,align: 'center',},
{title: '操作',align: 'center', formatter: function (value, row, index) {
var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1") {
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.expenseId + '\')"><i class="fa fa-remove"></i> 作废</a>');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if(row.useStatus=="2" ){
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.expenseId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// if(row.auditStatus=="1" && row.useStatus=="1") {
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.expenseId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
// }
// // 有流程实例id
// if(row.useStatus=="2" ){
// actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.expenseId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
// }
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
@ -200,7 +195,7 @@
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix1 + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
@ -244,7 +239,7 @@
}
function selectUserAll(){
$.ajax({
url: prefix + '/getExpenseUser',
url: prefix1 + '/getExpenseUser',
type: 'post',
async: false,
success: function (result) {

Loading…
Cancel
Save