Compare commits

...

3 Commits

Author SHA1 Message Date
zhangsiqi 0dd211ad8f Merge remote-tracking branch 'origin/dev' into dev 3 months ago
zhangsiqi d351136912 [feat]新增:修改:报销单修改页面,编辑报销单页面修改表单获取为serializeArray对象。 3 months ago
zhangsiqi 35fc99b8ae [feat]新增:修改:报销单修改页面,编辑报销单页面修改表单获取为serializeArray对象。 3 months ago
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java
  2. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java
  3. 2
      ruoyi-admin/src/main/resources/templates/financial/expense/edit.html
  4. 11
      ruoyi-admin/src/main/resources/templates/financial/expense/expense.html
  5. 4
      ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html
  6. 6
      ruoyi-admin/src/main/resources/templates/system/baseExpense/detail.html
  7. 2
      ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html

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

@ -252,7 +252,13 @@ public class BaseExpenseAccountController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(@RequestBody BaseExpenseAccount baseExpenseAccount) public AjaxResult editSave(@RequestBody BaseExpenseAccount baseExpenseAccount)
{ {
return toAjax(baseExpenseAccountService.updateBaseExpenseAccount(baseExpenseAccount)); baseExpenseAccount.setCreateBy(ShiroUtils.getLoginName());
baseExpenseAccount.setUseStatus("0");
baseExpenseAccount.setAuditStatus("0");
baseExpenseAccount.setFinanceAuditStatus("0");
baseExpenseAccount.setManagerAuditStatus("0");
baseExpenseAccountService.submitApply(baseExpenseAccount);
return AjaxResult.success();
} }
/** /**

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

@ -306,6 +306,7 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
} }
/** /**
* 提交申请 * 提交申请
* @param baseExpenseAccount * @param baseExpenseAccount
@ -317,11 +318,15 @@ 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());
String applyTitle = "";
if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){ if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){
insertBaseExpenseAccount(baseExpenseAccount); insertBaseExpenseAccount(baseExpenseAccount);
applyTitle = user.getUserName()+"发起了报销单提交审批-"+DateUtils.dateTimeNow();
}else{
updateBaseExpenseAccount(baseExpenseAccount);
applyTitle = user.getUserName()+"发起了报销单修改提交审批-"+DateUtils.dateTimeNow();
} }
// 启动流程 // 启动流程
String applyTitle = user.getUserName()+"发起了报销单提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit"; String instanceType = "submit";
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseExpenseAccount, user); ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseExpenseAccount, user);
String processInstanceId = processInstance.getProcessInstanceId(); String processInstanceId = processInstance.getProcessInstanceId();

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

@ -91,7 +91,7 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/baseExpense" var prefix = ctx + "system/baseExpense"
var costTypeDatas = [[${@category.getChildByCode('costType')}]]; var costTypeDatas = [[${@category.getChildByCode('costType')}]];
$("#form-baseExpense-add").validate({focusCleanup: true}); $("#form-baseExpense-edit").validate({focusCleanup: true});
$(function(){ $(function(){
$.ajax({ $.ajax({
url: prefix + "/getId", url: prefix + "/getId",

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

@ -48,7 +48,7 @@
</li> </li>
<li> <li>
<label>财务审核状态:</label> <label>财务审核状态:</label>
<select name="financeAuditStatus" th:with="type=${@dict.getType('auditStatus')}"> <select name="financeAuditStatus" th:with="type=${@dict.getType('financial_expense_status')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
@ -91,9 +91,9 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:baseExpense:add"> <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:baseExpense:add">-->
<i class="fa fa-plus"></i> 添加 <!-- <i class="fa fa-plus"></i> 添加-->
</a> <!-- </a>-->
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table> <table id="bootstrap-table" style="white-space: nowrap"></table>
@ -112,6 +112,7 @@
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var auditStatusData = [[${@dict.getType('auditStatus')}]]; var auditStatusData = [[${@dict.getType('auditStatus')}]];
var expenseMethodData = [[${@dict.getType('sys_base_expense_method')}]]; var expenseMethodData = [[${@dict.getType('sys_base_expense_method')}]];
var finacialExpenseStatusDatas = [[${@dict.getType('financial_expense_status')}]];
var prefix = ctx + "system/baseExpense"; var prefix = ctx + "system/baseExpense";
$(function() { $(function() {
@ -162,7 +163,7 @@
}, },
{title: '财务审核状态',field: 'financeAuditStatus',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: 'expenseCode',align: 'center',}, {title: '报销单编号',field: 'expenseCode',align: 'center',},

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

@ -48,7 +48,7 @@
</li> </li>
<li> <li>
<label>财务状态:</label> <label>财务状态:</label>
<select name="financeAuditStatus" th:with="type=${@dict.getType('auditStatus')}"> <select name="financeAuditStatus" th:with="type=${@dict.getType('financial_expense_status')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
@ -112,7 +112,7 @@
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var auditStatusData = [[${@dict.getType('auditStatus')}]]; var auditStatusData = [[${@dict.getType('auditStatus')}]];
var expenseMethodData = [[${@dict.getType('sys_base_expense_method')}]]; var expenseMethodData = [[${@dict.getType('sys_base_expense_method')}]];
var finacialExpenseStatusDatas = [[${@dict.getType('finacialExpenseStatus')}]]; var finacialExpenseStatusDatas = [[${@dict.getType('financial_expense_status')}]];
var prefix = ctx + "system/baseExpense"; var prefix = ctx + "system/baseExpense";
$(function() { $(function() {

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

@ -34,7 +34,11 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">报销方式:</label> <label class="col-sm-3 control-label">报销方式:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="detail_expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" class="form-control" type="text" disabled> <select id="detail_expenseMethod" name="expenseMethod" th:with="type=${@dict.getType('sys_base_expense_method')}" th:field="*{expenseMethod}" disabled>
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div> </div>
</div> </div>
<div id="detail_expenseMethodModal" class="container" style="display: none"> <div id="detail_expenseMethodModal" class="container" style="display: none">

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

@ -8,7 +8,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-zozj" th:object="${baseExpenseAccount}"> <form class="form-horizontal m" id="form-baseExpense-edit" th:object="${baseExpenseAccount}">
<input name="expenseId" th:field="*{expenseId}" type="hidden"> <input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="expenseCode" th:field="*{expenseCode}" type="hidden"> <input name="expenseCode" th:field="*{expenseCode}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden"> <input name="instanceId" th:field="*{instanceId}" type="hidden">

Loading…
Cancel
Save