не до конца пофикшенный фронт
This commit is contained in:
parent
842531bccd
commit
ed4a896db8
@ -15,6 +15,7 @@
|
|||||||
<div class=" col-sm-8">
|
<div class=" col-sm-8">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="display-4">Сборки</h2>
|
<h2 class="display-4">Сборки</h2>
|
||||||
|
<button type="button" class="btn btn-primary btn-lg" data-bs-toggle="modal" data-bs-target="#createModal">Добавить</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center" name="id">
|
<div class="text-center" name="id">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -48,15 +49,15 @@
|
|||||||
@Html.DisplayFor(modelItem => item.BuildName)
|
@Html.DisplayFor(modelItem => item.BuildName)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#updateModal">
|
||||||
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#updateModal">
|
Обновить
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
</button>
|
||||||
</button>
|
<a class="btn btn-primary btn-lg mb-5" asp-controller="Home" asp-action="LinkPurchase" asp-route-buildId="@item.Id">
|
||||||
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#deleteModal">
|
Привязать
|
||||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
</a>
|
||||||
</button>
|
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-danger btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#deleteModal">
|
||||||
<a class="btn btn-primary btn-lg mb-5" asp-controller="Home" asp-action="LinkPurchase" asp-route-buildId="@item.Id"></a>
|
Удалить
|
||||||
</div>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@ -65,13 +66,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center d-flex flex-column mt-5">
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#createModal">Добавить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg mb-5">Привязать сборку</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<div class=" col-sm-8">
|
<div class=" col-sm-8">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="display-4">Комментарии</h2>
|
<h2 class="display-4">Комментарии</h2>
|
||||||
|
<button type="button" class="btn btn-primary btn-lg" data-bs-toggle="modal" data-bs-target="#createModal">Добавить</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center" name="id">
|
<div class="text-center" name="id">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -29,7 +30,7 @@
|
|||||||
Текст
|
Текст
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Название сборки к которой относиться комментарий
|
Название сборки к которой относится комментарий
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Действия
|
Действия
|
||||||
@ -50,10 +51,8 @@
|
|||||||
@Html.DisplayFor(modelItem => item.BuildName)
|
@Html.DisplayFor(modelItem => item.BuildName)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<button onclick="getComment(@item.Id)" type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateModal">Изменить</button>
|
||||||
<button onclick="getComment(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#updateModal">Изменить</button>
|
<button onclick="getComment(@item.Id)" type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">Удалить</button>
|
||||||
<button onclick="getComment(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#deleteModal">Удалить</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@ -61,10 +60,6 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center d-flex flex-column mt-5">
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#createModal">Добавить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
@ -147,70 +147,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@*<form class="d-flex justify-content-evenly">
|
|
||||||
<div class=" col-sm-8">
|
|
||||||
<div class="text-center">
|
|
||||||
<h2 class="display-4">Товары</h2>
|
|
||||||
</div>
|
|
||||||
<div class="text-center" name="id">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Номер
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Название товара
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Цена
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Количество
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center d-flex flex-column mt-5">
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Сохранить</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Товар</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Товар</label>
|
|
||||||
<select class="form-select">
|
|
||||||
<option value="1">Товар 1</option>
|
|
||||||
<option value="2">Товар 2</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Количество</label>
|
|
||||||
<input type="number" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
|
||||||
<button type="button" class="btn btn-primary">Сохранить</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
*@
|
|
@ -56,24 +56,12 @@
|
|||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.PurchaseStatus)
|
@Html.DisplayFor(modelItem => item.PurchaseStatus)
|
||||||
</td>
|
</td>
|
||||||
@*<td>
|
|
||||||
<div>
|
|
||||||
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#updateModal">Изменить</button>
|
|
||||||
<button onclick="getBuild(@item.Id)" type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#deleteModal">Удалить</button>
|
|
||||||
</div>
|
|
||||||
</td>*@
|
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center d-flex flex-column mt-5">
|
|
||||||
|
|
||||||
@*<button type="submit" class="btn btn-primary btn-lg mb-5">Изменить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>*@
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
const saveBtn = document.getElementById("createpurchase");
|
const saveBtn = document.getElementById("createpurchase");
|
||||||
const countElem = document.getElementById("count");
|
const countElem = document.getElementById("count");
|
||||||
const resultTable = document.getElementById("result");
|
const resultTable = document.getElementById("result");
|
||||||
|
const totalSum = document.getElementById("sum");
|
||||||
|
|
||||||
submitGoodBtn.addEventListener("click", () => {
|
submitGoodBtn.addEventListener("click", () => {
|
||||||
console.log('try to add good')
|
console.log('try to add good')
|
||||||
@ -138,7 +139,10 @@
|
|||||||
</div><td/></tr>`
|
</div><td/></tr>`
|
||||||
count++;
|
count++;
|
||||||
console.log(elem);
|
console.log(elem);
|
||||||
|
price += elem.good.price * elem.count
|
||||||
})
|
})
|
||||||
|
totalSum.value = Math.round(price * 110) / 100
|
||||||
|
console.log(totalSum.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteGood(id) {
|
function deleteGood(id) {
|
||||||
@ -173,70 +177,4 @@
|
|||||||
getPurchase();
|
getPurchase();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@*<form class="d-flex justify-content-evenly">
|
|
||||||
<div class=" col-sm-8">
|
|
||||||
<div class="text-center">
|
|
||||||
<h2 class="display-4">Товары</h2>
|
|
||||||
</div>
|
|
||||||
<div class="text-center" name="id">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Номер
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Название товара
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Цена
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Количество
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center d-flex flex-column mt-5">
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Добавить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5" data-bs-toggle="modal" data-bs-target="#exampleModal">Изменить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Удалить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Обновить</button>
|
|
||||||
<button type="button" class="btn btn-primary btn-lg mb-5">Сохранить</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Товар</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Товар</label>
|
|
||||||
<select class="form-select">
|
|
||||||
<option value="1">Товар 1</option>
|
|
||||||
<option value="2">Товар 2</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="form-label">Количество</label>
|
|
||||||
<input type="number" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
|
||||||
<button type="button" class="btn btn-primary">Сохранить</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
*@
|
|
@ -23,7 +23,7 @@
|
|||||||
<button id="generate-button" class="button-primary text-button mb-2">
|
<button id="generate-button" class="button-primary text-button mb-2">
|
||||||
Показать
|
Показать
|
||||||
</button>
|
</button>
|
||||||
<button id="send-by-mail-button" class="button-primary text-button mb-2">
|
<button id="send-by-mail-button" class="btn btn-primary text-button mb-2">
|
||||||
На почту
|
На почту
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user