some func
This commit is contained in:
47
static/js/tmp.js
Normal file
47
static/js/tmp.js
Normal file
@@ -0,0 +1,47 @@
|
||||
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();
|
||||
}
|
||||
})
|
||||
})}
|
||||
Reference in New Issue
Block a user