Еще сделал странички, связанные с кассиром
This commit is contained in:
parent
361eb95e6b
commit
25b8202424
@ -32,6 +32,22 @@ namespace BankCashierApp.Controllers
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult CreateAccount()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult CreateReport()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult MoneyTransfers()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Accounts()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
|
40
Bank/BankCashierApp/Views/Home/Accounts.cshtml
Normal file
40
Bank/BankCashierApp/Views/Home/Accounts.cshtml
Normal file
@ -0,0 +1,40 @@
|
||||
@using BankContracts.ViewModels
|
||||
|
||||
@model List<AccountViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Cписок счетов";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Счета</h1>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
<p>
|
||||
<a asp-action="CreateAccount">Открыть счёт</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер счёта
|
||||
</th>
|
||||
<th>
|
||||
Имя владельца
|
||||
</th>
|
||||
<th>
|
||||
Отчество владельца
|
||||
</th>
|
||||
<th>
|
||||
Балланс
|
||||
</th>
|
||||
<th>
|
||||
Дата открытия
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
}
|
||||
</div>
|
54
Bank/BankCashierApp/Views/Home/CreateAccount.cshtml
Normal file
54
Bank/BankCashierApp/Views/Home/CreateAccount.cshtml
Normal file
@ -0,0 +1,54 @@
|
||||
@{
|
||||
ViewData["Title"] = "Открытие счёта";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Открытие счёта</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Клиент:</div>
|
||||
<div class="col-8">
|
||||
<select id="client" name="clientId" class="form-control" asp-items="@(new SelectList( @ViewBag.Clients, "Id", "FullName"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Номер счёта:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="accountNumber" class="form-control" name="accountNumber" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="password" class="form-control" name="password" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Баланс:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" id="balance" class="form-control" name="balance" value=0 required min=0 />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="form-control" class="btn btn-dark" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function createNum(len) {
|
||||
chrs = '0123456789';
|
||||
var str = '';
|
||||
for (var i = 0; i < len; i++) {
|
||||
var pos = Math.floor(Math.random() * chrs.length);
|
||||
str += chrs.substring(pos, pos + 1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
document.getElementById("accountNumber").value = createNum(16);
|
||||
document.getElementById("password").value = createNum(4);
|
||||
</script>
|
127
Bank/BankCashierApp/Views/Home/CreateReport.cshtml
Normal file
127
Bank/BankCashierApp/Views/Home/CreateReport.cshtml
Normal file
@ -0,0 +1,127 @@
|
||||
@using BankContracts.ViewModels.Reports;
|
||||
|
||||
@model ReportCashierViewModelForHTML
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Создание отчёта";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Отчёт по счетам за выбранный период</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Клиент:</div>
|
||||
<div class="col-8">
|
||||
<select id="clientId" name="clientId" class="form-control" asp-items="@(new SelectList( @ViewBag.Clients, "Id", "FullName"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Дата начала периода:</div>
|
||||
<div class="col-8">
|
||||
<input id="dateFrom" name="dateFrom" class="form-control" type="date" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Дата конца периода:</div>
|
||||
<div class="col-8">
|
||||
<input id="dateTo" name="dateTo" class="form-control" type="date" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<input type="submit" style="width:100%" value="Сформировать отчёт" class="btn btn-dark" />
|
||||
</div>
|
||||
<hr class="mt-5 mb-3" />
|
||||
@if (Model != null)
|
||||
{
|
||||
<div class="row p-3 text-center">
|
||||
<h3>Отчет отправлен на почту @APICashier.Cashier.Email</h3>
|
||||
<hr class="mt-5 mb-3" />
|
||||
<h4>Отчёт по выдаче наличных со счёта</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер операции
|
||||
</th>
|
||||
<th>
|
||||
Номер счёта
|
||||
</th>
|
||||
<th>
|
||||
Сумма операции
|
||||
</th>
|
||||
<th>
|
||||
Дата операции
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.ReportCashWithdrawal)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.OperationId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AccountPayeeNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SumOperation)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateComplite)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="my-12" />
|
||||
<div class="row p-3 text-center">
|
||||
<h4>Отчёт по денежным переводам между счетами</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер операции
|
||||
</th>
|
||||
<th>
|
||||
Номер счёта отправителя
|
||||
</th>
|
||||
<th>
|
||||
Номер счёта получаетля
|
||||
</th>
|
||||
<th>
|
||||
Сумма операции
|
||||
</th>
|
||||
<th>
|
||||
Дата операции
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.ReportMoneyTransfer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.OperationId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AccountSenderNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AccountPayeeNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SumOperation)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateComplite)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</form>
|
28
Bank/BankCashierApp/Views/Home/MoneyTransfers.cshtml
Normal file
28
Bank/BankCashierApp/Views/Home/MoneyTransfers.cshtml
Normal file
@ -0,0 +1,28 @@
|
||||
@{
|
||||
ViewData["Title"] = "Переводы меджу счетами";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Перевод между счетами</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Номер счёта для снятия:</div>
|
||||
<div class="col-8">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Номер счёта для начисления:</div>
|
||||
<div class="col-8">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">Сумма перевода:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" id="sumMoneyTransfer" class="form-control" name="sumMoneyTransfer" required min=1 value=1 />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<input type="submit" style="width: 100%" value="Перевести" class="btn btn-dark" />
|
||||
</div>
|
||||
</form>
|
@ -7,34 +7,57 @@
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/BankCashierApp.styles.css" asp-append-version="true" />
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<nav class="navbar navbar-expand-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Банк "Вы Банкрот"</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<a class="navbar-brand" asp-controller="Home" asp-action="Index">Банк "Вы Банкрот"</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-sm-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||
<a class="nav-link" asp-controller="Home" asp-action="Accounts">Счета</a>
|
||||
</li>
|
||||
<div class="ms-auto d-flex">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="operationsDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Операции</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="operationsDropdown">
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="Debiting">Заявки на снятие</a></li>
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="Crediting">Заявки на начисление</a></li>
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="MoneyTransfers">Заявки на перевод</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="reportsDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Отчеты</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="reportsDropdown">
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="ReportWithAccounts">Отчёт по аккаунтам</a></li>
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="CreateReport">Отчёт за период</a></li>
|
||||
<li><a class="dropdown-item" asp-controller="Home" asp-action="Diagram">Диаграмма</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary nav-link me-2 text-light" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
<a class="nav-link" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary nav-link text-light" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
<a class="btn btn-primary me-2" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
</li>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
@ -43,12 +66,28 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2024 - BankCashierApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2024 - BankCashierApp - <a asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// Добавьте событие hover для элементов навигации с классом dropdown
|
||||
$('.nav-item.dropdown').hover(
|
||||
function () {
|
||||
// Показываем выпадающее меню при наведении мыши
|
||||
$(this).find('.dropdown-menu').stop(true, true).slideDown(300);
|
||||
},
|
||||
function () {
|
||||
// Скрываем выпадающее меню при выходе мыши
|
||||
$(this).find('.dropdown-menu').stop(true, true).slideUp(300);
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user