Остался отчет
This commit is contained in:
parent
2e505618bc
commit
2a7782eea0
@ -120,5 +120,17 @@ namespace HardwareShopBusinessLogic.BusinessLogics.Storekeeper
|
|||||||
{
|
{
|
||||||
return StatusUpdate(model, OrderStatus.Выдан);
|
return StatusUpdate(model, OrderStatus.Выдан);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Delete(OrderBindingModel model)
|
||||||
|
{
|
||||||
|
CheckModel(model, false);
|
||||||
|
_logger.LogInformation("Delete. Id: {Id}", model.Id);
|
||||||
|
if (_orderStorage.Delete(model) == null)
|
||||||
|
{
|
||||||
|
_logger.LogWarning("Delete operation failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,16 @@ namespace HardwareShopClientApp.Controllers
|
|||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
public IActionResult CreateOrder()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
public IActionResult CreateGood()
|
public IActionResult CreateGood()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult LinkBuilds()
|
public IActionResult LinkBuilds()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
|
@ -10,29 +10,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@{
|
<p>
|
||||||
<p>
|
<a asp-action="CreateComponent" class="mx-2">Создать комплектующее</a>
|
||||||
<a asp-action="CreateComponent" class="mx-2">Создать комплектующее</a>
|
<a href="#" class="mx-2">Изменить комплектующее</a>
|
||||||
<a asp-action="Components" class="mx-2">Изменить комплектующее</a>
|
<a href="#" class="mx-2">Удалить комплектующее</a>
|
||||||
<a asp-action="Components" class="mx-2">Удалить комплектующее</a>
|
<a asp-action="LinkBuilds" class="mx-2">Привязка сборок</a>
|
||||||
<a asp-action="LinkBuilds" class="mx-2">Привязка сборок</a>
|
</p>
|
||||||
</p>
|
<table class="table">
|
||||||
<table class="table">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th>
|
||||||
<th>
|
Название
|
||||||
Название
|
</th>
|
||||||
</th>
|
<th>
|
||||||
<th>
|
Цена
|
||||||
Цена
|
</th>
|
||||||
</th>
|
</tr>
|
||||||
<th>
|
</thead>
|
||||||
Сборки
|
<tbody>
|
||||||
</th>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<label class="form-label">Стоимость</label>
|
<label class="form-label">Стоимость</label>
|
||||||
<input type="number" step="0.01" class="form-control" name="cost">
|
<input type="number" step="0.01" class="form-control" name="cost" min="0.01">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
|
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
|
||||||
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
|
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
|
||||||
|
@ -14,13 +14,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<label class="form-label">Цена</label>
|
<label class="form-label">Цена</label>
|
||||||
<input type="number" step="0.01" class="form-control" name="price" readonly>
|
<input type="number" step="0.01" class="form-control" name="price" readonly min="0.01">
|
||||||
|
</div>
|
||||||
|
<h1 class="display-6">Добавление комплектующих</h1>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<label class="form-label">Комплектующее</label>
|
||||||
|
<select class="form-control" name="component"></select>
|
||||||
|
<label class="form-label">Количество</label>
|
||||||
|
<input type="number" class="form-control" name="count" min="1">
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<button type="submit" class="btn btn-primary mt-3 px-4">Добавить</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th id="name" scope="col">Комплектующее</th>
|
<th id="name" scope="col">Комплектующее</th>
|
||||||
<th id="cost" scope="col">Стоимость</th>
|
<th id="count" scope="col">Количество</th>
|
||||||
|
<th id="sum" scope="col">Сумма</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<label class="form-label">Количество</label>
|
<label class="form-label">Количество</label>
|
||||||
<input type="number" class="form-control" name="count">
|
<input type="number" class="form-control" name="count" min="1">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<label class="form-label">Сумма</label>
|
<label class="form-label">Сумма</label>
|
||||||
|
@ -9,28 +9,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@{
|
<p>
|
||||||
<p>
|
<a asp-action="CreateGood" class="mx-2">Создать товар</a>
|
||||||
<a asp-action="CreateGood" class="mx-2">Создать товар</a>
|
<a asp-action="Goods" class="mx-2">Изменить товар</a>
|
||||||
<a asp-action="Goods" class="mx-2">Изменить товар</a>
|
<a asp-action="Goods" class="mx-2">Удалить товар</a>
|
||||||
<a asp-action="Goods" class="mx-2">Удалить товар</a>
|
</p>
|
||||||
</p>
|
<table class="table">
|
||||||
<table class="table">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th>
|
||||||
<th>
|
Название
|
||||||
Название
|
</th>
|
||||||
</th>
|
<th>
|
||||||
<th>
|
Цена
|
||||||
Цена
|
</th>
|
||||||
</th>
|
<th>
|
||||||
<th>
|
Комплектующие
|
||||||
Комплектующие
|
</th>
|
||||||
</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
@ -12,12 +12,20 @@
|
|||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<label class="form-label">Комплектующее</label>
|
<label class="form-label">Комплектующее</label>
|
||||||
<select class="form-control" name="component"></select>
|
<select class="form-control" name="component"></select>
|
||||||
|
<label class="form-label">Сборка</label>
|
||||||
|
<select class="form-control" name="build"></select>
|
||||||
|
<label class="form-label">Количество</label>
|
||||||
|
<input type="number" class="form-control" name="count" min="1">
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<button type="submit" class="btn btn-primary mt-3 px-4">Привязать</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<h1 class="display-6">Привязанные сборки</h1>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th id="name" scope="col">Сборка</th>
|
<th id="name" scope="col">Сборка</th>
|
||||||
<th id="price" scope="col">Цена</th>
|
<th id="price" scope="col">Количество</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -5,5 +5,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Список сборок</h1>
|
<h1 class="display-4">Получение списка сборок</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form method="post" class="d-flex flex-column align-items-center">
|
||||||
|
<h1 class="display-6">Выбранные товары</h1>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Товар
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="col-sm-2 d-flex justify-content-evenly align-items-baseline">
|
||||||
|
<button type="submit" class="btn btn-primary mt-3 px-4">Подтвердить</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
@ -4,6 +4,47 @@
|
|||||||
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
|
Layout = "~/Views/Shared/_LayoutStorekeeper.cshtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div class="text-center">
|
||||||
привет, мы в заказах
|
<h1 class="display-4">Заказы</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<p>
|
||||||
|
<a asp-action="CreateOrder" class="mx-2">Создать заказ</a>
|
||||||
|
<a href="#" class="mx-2">Удалить заказ</a>
|
||||||
|
<a href="#" class="mx-2">Принят</a>
|
||||||
|
<a href="#" class="mx-2">Выполняется</a>
|
||||||
|
<a href="#" class="mx-2">Готов</a>
|
||||||
|
<a href="#" class="mx-2">Выдан</a>
|
||||||
|
</p>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Номер
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Товар
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Количество
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Сумма
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Статус
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Дата создания
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Дата выполнения
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
@ -11,5 +11,6 @@ namespace HardwareShopContracts.BuisnessLogicsContracts
|
|||||||
bool TakeOrderInWork(OrderBindingModel model);
|
bool TakeOrderInWork(OrderBindingModel model);
|
||||||
bool FinishOrder(OrderBindingModel model);
|
bool FinishOrder(OrderBindingModel model);
|
||||||
bool DeliveryOrder(OrderBindingModel model);
|
bool DeliveryOrder(OrderBindingModel model);
|
||||||
|
bool Delete(OrderBindingModel model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user