Compare commits
2
Commits
d2b01f56ec
...
c2f3f10c9b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2f3f10c9b | ||
|
|
f1c755c6ec |
@@ -126,7 +126,7 @@ def getall():
|
||||
'nazvanie': oborud.nazvanie,
|
||||
'raspologenie': oborud.raspologenie,
|
||||
'numberved': oborud.numberved,
|
||||
'buhnumberpp': oborud.buhnumberpp,
|
||||
'balancenumber': oborud.balancenumber,
|
||||
'kolichestvo': oborud.kolichestvo,
|
||||
'balancenumber': oborud.balancenumber,
|
||||
'aud_id': oborud.aud_id
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 885bdd7b5161
|
||||
Revises: be7c94c549e5
|
||||
Create Date: 2024-04-02 23:03:59.401369
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '885bdd7b5161'
|
||||
down_revision = 'be7c94c549e5'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('oboruds', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('kolichestvo', sa.Integer(), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('oboruds', schema=None) as batch_op:
|
||||
batch_op.drop_column('kolichestvo')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,6 +19,7 @@ class Oboruds(db.Model):
|
||||
balancenumber = db.Column(db.String(30))
|
||||
raspologenie = db.Column(db.String(200))
|
||||
numberved = db.Column(db.String(100))
|
||||
kolichestvo = db.Column(db.Integer)
|
||||
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
function getData(){
|
||||
|
||||
const audid = document.getElementById('auditory')
|
||||
$.ajax({
|
||||
|
||||
url: "/getall",
|
||||
type: "get",
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
|
||||
success: function(response){
|
||||
|
||||
var data = response;
|
||||
const table = document.getElementById('datatable')
|
||||
table.innerHTML = ''
|
||||
var headTable = '<tr> <td >Номер в Инв. вед</td> <td id="invnomer">Инв. номер</td><td>Название</td><td class="no-print aud">Аудитория</td> <td >Расположение</td> <td id="proverka"class="hidden-column"> Проверено</td> </tr>'
|
||||
table.innerHTML += headTable
|
||||
var tr =""
|
||||
|
||||
|
||||
data.forEach(element => {
|
||||
tr += '<tr onclick="tableclick(this)">'
|
||||
tr += '<td>' + element.num_ved + '</td>'
|
||||
tr += '<td clas="inv">' + element.inv_number + '</td>'
|
||||
tr += '<td>' + element.oboruds_id + '</td>'
|
||||
tr += '<td class="no-print">' + element.auditory_name + '</td>'
|
||||
tr += '<td class="rasp">' +element.raspolog + '</td>'
|
||||
tr += '<td>' + '\n' + '</td>'
|
||||
|
||||
tr += '</tr>'
|
||||
});
|
||||
table.innerHTML += tr
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user