add all files
This commit is contained in:
32
static/js/index.js
Normal file
32
static/js/index.js
Normal 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
25
static/js/print.js
Normal 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
5
static/js/printall.js
Normal file
@@ -0,0 +1,5 @@
|
||||
$("#printallbutton").click(function(){
|
||||
|
||||
console.log("aaaaaaa")
|
||||
|
||||
})
|
||||
44
static/js/searchonaud.js
Normal file
44
static/js/searchonaud.js
Normal 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
15
static/js/zametki.js
Normal 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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user