2024-08-06 21:21:05 +04:00
|
|
|
|
@using ElectronicsShopContracts.ViewModels
|
|
|
|
|
@model List<PaymeantViewModel>
|
2024-06-06 17:21:39 +04:00
|
|
|
|
@{
|
2024-06-01 02:50:15 +04:00
|
|
|
|
ViewData["Title"] = "Report";
|
|
|
|
|
}
|
2024-08-06 21:21:05 +04:00
|
|
|
|
|
|
|
|
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
2024-06-01 02:50:15 +04:00
|
|
|
|
<div class="text-center">
|
2024-08-06 21:21:05 +04:00
|
|
|
|
<h1 class="display-4">Отчёты</h1>
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
|
|
|
|
|
<div class="text-start">
|
|
|
|
|
<h2 class="display-5">Отчёт за период</h2>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-06-01 02:50:15 +04:00
|
|
|
|
<form method="post">
|
|
|
|
|
<div class="align-content-center row mb-3">
|
|
|
|
|
<div class="col-sm-auto">
|
2024-06-06 17:21:39 +04:00
|
|
|
|
<label>С:</label>
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-3">
|
2024-06-06 17:21:39 +04:00
|
|
|
|
<input name="DateFrom" id="datefrom" type="date" />
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-auto">
|
2024-06-06 17:21:39 +04:00
|
|
|
|
<label>По:</label>
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-3">
|
2024-06-06 17:21:39 +04:00
|
|
|
|
<input name="DateTo" id="dateto" type="date" />
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
2024-06-06 17:21:39 +04:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-8"></div>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
<div class="col-4"><input type="submit" value="Cформировать отчет" class="btn btn-sm btn-outline-danger m-2 p-2" /></div>
|
2024-06-01 02:50:15 +04:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<div class="text-start">
|
|
|
|
|
<h2 class="display-5">Выбрать оплаты в отечет</h2>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
@{
|
|
|
|
|
if (Model == null) {
|
2024-08-07 21:48:54 +04:00
|
|
|
|
<h3 class="display-4">Авторизируйтесь</h3>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
return;
|
|
|
|
|
}
|
2024-08-09 15:14:33 +04:00
|
|
|
|
<div class="text-end">
|
|
|
|
|
<button class="btn btn-sm btn-outline-danger m-2 p-2" id="btnFix">Cформировать отчет</button>
|
|
|
|
|
</div>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
|
2024-08-09 15:14:33 +04:00
|
|
|
|
<table class="table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>
|
|
|
|
|
Номер оплаты
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
Номер заказа
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
Сумма к оплате
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
Статус оплаты
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
Дата оплаты
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
<input type="checkbox" class="form-check-input" id="Select_all" name="Select_all" /> Выбрать все
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach (var item in Model) {
|
|
|
|
|
<tr>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.ID)
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.OrderID)
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.SumPayment)
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.PayOption)
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.DatePaymeant)
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
<input type="checkbox" class="form-check-input" id="Select_rec" name="Select_rec" value="@item.ID" />
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
}
|
2024-08-09 15:14:33 +04:00
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2024-08-06 21:21:05 +04:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$('#Select_all').on('click', function () {
|
|
|
|
|
let checkboxes = document.getElementsByTagName('input');
|
|
|
|
|
let val = null;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < checkboxes.length; i++) {
|
|
|
|
|
if (checkboxes[i].type === 'checkbox') {
|
|
|
|
|
if (val == null) {
|
|
|
|
|
val = checkboxes[i].checked;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
checkboxes[i].checked = val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnFix').on('click', function () {
|
|
|
|
|
let val = [];
|
|
|
|
|
$("input[name='Select_rec']:checked").each(function () {
|
|
|
|
|
val.push($(this).val());
|
|
|
|
|
});
|
|
|
|
|
|
2024-08-07 21:48:54 +04:00
|
|
|
|
|
|
|
|
|
var str = 'ids=';
|
|
|
|
|
for (let i = 0; i < val.length - 1; i++) {
|
|
|
|
|
str += val[i] + '&='
|
|
|
|
|
}
|
|
|
|
|
str += val[val.length - 1];
|
|
|
|
|
|
|
|
|
|
window.location.href = "ReportSearchFix/" + str;
|
|
|
|
|
|
2024-08-06 21:21:05 +04:00
|
|
|
|
});
|
|
|
|
|
</script>
|