add all files

This commit is contained in:
2024-02-29 14:33:21 +03:00
parent 519faa8796
commit ae6c9a6a58
23 changed files with 1082 additions and 0 deletions

7
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

135
static/css/index.css Normal file
View File

@@ -0,0 +1,135 @@
* {
margin: 0;
padding: 0;
}
body {
background-color: #E2F3FD;
min-width: 580px;
}
.row{
text-align: center;
display: flex;
justify-content: center;
border: 1px;
}
header {
text-align: center;
background-color: #6A90B6;
padding: 2px;
}
a:hover {
text-decoration: none;
color: #041322;
}
a{
color: #041322;
}
.container {
margin: 10px;
}
button {
background-color: #E07D54;
margin-top: 5px;
margin-bottom: 5px;
}
.card {
width: 200px;
margin: 10px;
border-radius: 15px;
border-color: #E07D54;
}
h5 {
text-align: center;
}
.hidden-column{
display: none;
}
nav{
width:100%;
}
@media print {
*{
font-family: "Times New Roman", Times, serif;
}
body {
margin: 0;
padding: 0;
background-color: transparent;
}
a {
text-decoration: none;
border: none;
}
@page {
size: A4; /* или letter, legal, tabloid, etc. */
margin: 1cm; /* Устанавливаем поля */
align-items: center;
}
.card {
border: none;
width: 100%;
}
.no-print {
display: none;
}
table.rs-table-bordered{
border:1px solid #000000;
margin-top:20px;
font-size: 14pt;
}
table.rs-table-bordered > thead > tr > th{
border:1px solid #000000;
padding: 2px;
font-size: 14pt;
}
table.rs-table-bordered > tbody > tr > td{
border:1px solid #000000;
padding: 10px;
font-size: 14pt;
}
}

32
static/js/index.js Normal file
View File

@@ -0,0 +1,32 @@
$( document ).ready(function() {
$(".updatebtn").click(function(){
var audid = document.getElementById('auditory_dubl').value;
var invnum = document.getElementById('invnomer').textContent;
console.log('start perenos')
$.ajax({
url: "/perenos",
type: 'get',
contentType: 'application/json',
dataType: 'json',
data: {'audid':audid,
'invnum':invnum
},
error: function(error){
console.log(error);
}
})
invnomer.textContent=''
nazvanie.textContent=''
aud.textContent=''
auditory_dubl.selectedIndex = 0;
})
})

25
static/js/print.js Normal file
View File

@@ -0,0 +1,25 @@
$("#printbutton").click(function(){
let aud = document.getElementById('auditory')
let audtext = aud.options[aud.selectedIndex].text;
const h2 = document.querySelector('h2');
h2.textContent = "Аудитория № " + audtext
document.getElementById("datatable").className="rs-table-bordered px-3"
let column = document.getElementById("proverka")
column.classList.remove("hidden-column")
window.print()
document.getElementById("datatable").className="table"
h2.textContent='распределение мат. ценностей'
column.classList.add("hidden-column")
})

5
static/js/printall.js Normal file
View File

@@ -0,0 +1,5 @@
$("#printallbutton").click(function(){
console.log("aaaaaaa")
})

44
static/js/searchonaud.js Normal file
View File

@@ -0,0 +1,44 @@
$("#searchbutton").click(function(){
const audid = document.getElementById('auditory')
$.ajax({
url: "/searchonaud",
type: "get",
contentType: 'application/json',
dataType: 'json',
data: {
auditory: audid.value
},
success: function(response){
var data = response;
const table = document.getElementById('datatable')
table.innerHTML = ''
var headTable = '<tr> <td>Инв. номер</td><td>Название</td><td class="no-print">Аудитория</td><td id="proverka"class="hidden-column"> Проверено</td> </tr>'
table.innerHTML += headTable
var tr =""
data.forEach(element => {
tr += '<td>' + element.inv_number + '</td>'
tr += '<td>' + element.oboruds_id + '</td>'
tr += '<td class="no-print">' + element.auditory_name + '</td>'
tr += '<td>' + '\n' + '</td>'
tr += '</tr>'
});
table.innerHTML += tr
}
})
})

15
static/js/zametki.js Normal file
View File

@@ -0,0 +1,15 @@
$( document ).ready(function() {
$(".reshbtn").click(function(){
var zmid = this.id
$.ajax({
url: "/zamrm",
type: 'get',
contentType: 'application/json',
dataType: 'json',
data: {'zmid':zmid},
})
var parent = document.getElementById('zambody')
var child = document.getElementById(zmid)
parent.removeChild(child)
})
})