Files
asuinventory/static/js/tmp.js
2024-03-31 23:33:26 +03:00

47 lines
1.0 KiB
JavaScript

function tableclick(x){
// let data = document.getElementById(x.rowIndex)
let datas = x.innerText.split('\t')
invnom.innerText=datas[1]+"\t"
matcen.innerText=datas[2]
if (datas[4].length>0){
rasp.value=datas[4];
}
if (datas[0].length>0){
vedomost.value=datas[0]
}
$('#modalclose').click(function(){
$('#getmodal').modal('hide');
} )
$('#modalsavetodb').click(function(){
$.ajax({
url: "/addraspved",
type: "POST",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: {
rasp: rasp.value,
ved: vedomost.value,
inv: invnomer
},
success:function() {
rasp.value = '';
vedomost.value= '';
data=[];
rasp
$('#getmodal').modal('hide');
getData();
}
})
})}