Browse Source

[feat]财务管理:

应付账款
新增应付账款详情按钮
新增应付账款前端详情页面
dev
liuxiaoxu 7 months ago
parent
commit
7ea73df349
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialAccountsPayableController.java
  2. 134
      ruoyi-admin/src/main/resources/templates/financial/payable/detail.html
  3. 16
      ruoyi-admin/src/main/resources/templates/financial/payable/payable.html

13
ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialAccountsPayableController.java

@ -68,6 +68,19 @@ public class FinancialAccountsPayableController extends BaseController
return util.exportExcel(list, "财务应付账款数据");
}
/**
* 务应付账款详情
*/
@GetMapping("/detail/{accountsPayableId}")
public String detail(@PathVariable("accountsPayableId") Long accountsPayableId, ModelMap mmap)
{
FinancialAccountsPayable financialAccountsPayable = financialAccountsPayableService.selectFinancialAccountsPayableById(accountsPayableId);
mmap.put("financialAccountsPayable", financialAccountsPayable);
return prefix + "/detail";
}
/**
* 新增财务应付账款
*/

134
ruoyi-admin/src/main/resources/templates/financial/payable/detail.html

@ -0,0 +1,134 @@
<!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" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-payable-edit" th:object="${financialAccountsPayable}">
<input name="accountsPayableId" th:field="*{accountsPayableId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">应付单号:</label>
<div class="col-sm-8">
<input name="accountsPayableCode" th:field="*{accountsPayableCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款状态:</label>
<div class="col-sm-8">
<select name="accountsPayableStatus" class="form-control m-b" th:with="type=${@dict.getType('accounts_payable_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{accountsPayableStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="relevanceCode" th:field="*{relevanceCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户银行:</label>
<div class="col-sm-8">
<input name="openBank" th:field="*{openBank}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户账号:</label>
<div class="col-sm-8">
<input name="openAccount" th:field="*{openAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">合同编号:</label>
<div class="col-sm-8">
<input name="contractNumber" th:field="*{contractNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币种:</label>
<div class="col-sm-8">
<select name="currencyType" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{currencyType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税金额:</label>
<div class="col-sm-8">
<input name="priceExcludingTax" th:field="*{priceExcludingTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税金额:</label>
<div class="col-sm-8">
<input name="priceIncludesTax" th:field="*{priceIncludesTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input name="paymentCondition" th:field="*{paymentCondition}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库状态:</label>
<div class="col-sm-8">
<select name="storageStatus" class="form-control m-b" th:with="type=${@dict.getType('erp_inbound_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{storageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购员:</label>
<div class="col-sm-8">
<input name="purchaseBuyer" th:field="*{purchaseBuyer}" class="form-control" type="text">
</div>
</div>
<div class="container">
<!-- 付款记录 -->
<div class="row">
<div class="col-sm-12 select-table table-striped">
<h3 class="mb-4">付款记录</h3>
<table id="bootstrap-payableRecords-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "financial/payable";
$("#form-payable-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-payable-edit').serialize());
}
}
$("input[name='paidTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

16
ruoyi-admin/src/main/resources/templates/financial/payable/payable.html

@ -105,9 +105,8 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('financial:payable:edit')}]];
var detailFlag = [[${@permission.hasPermi('financial:payable:detail')}]];
var removeFlag = [[${@permission.hasPermi('financial:payable:remove')}]];
var cancelFlag = [[${@permission.hasPermi('financial:payable:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('financial:payable:restore')}]];
var accountsPayableStatusDatas = [[${@dict.getType('accounts_payable_status')}]];
var currencyTypeDatas = [[${@dict.getType('sys_common_currency')}]];
var storageStatusDatas = [[${@dict.getType('erp_inbound_status')}]];
@ -225,19 +224,18 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.accountsPayableId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.accountsPayableId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.accountsPayableId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function detail(accountsPayableId){
var url = ctx+'financial/payable/detail/'+accountsPayableId;
$.modal.open("应付款账单详情",url);
}
</script>
</body>
</html>
Loading…
Cancel
Save